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
f80919dc5a5b568b7ec8215d82004fe844b9e679
add base class for experiments execution
credp/lisa,ARM-software/lisa,arnoldlu/lisa,credp/lisa,joelagnel/lisa,ARM-software/lisa,mdigiorgio/lisa,ARM-software/lisa,joelagnel/lisa,credp/lisa,bjackman/lisa,credp/lisa,mdigiorgio/lisa,JaviMerino/lisa,arnoldlu/lisa,ARM-software/lisa,bjackman/lisa
libs/utils/test.py
libs/utils/test.py
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2015, ARM Limited and contributors. # # 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 # # ...
apache-2.0
Python
74305170ee64a0129d5c8eec8d908e4a8696d038
Migrate old comments over jobs.JobReviewComment
manhhomienbienthuy/pythondotorg,python/pythondotorg,manhhomienbienthuy/pythondotorg,manhhomienbienthuy/pythondotorg,proevo/pythondotorg,Mariatta/pythondotorg,Mariatta/pythondotorg,python/pythondotorg,python/pythondotorg,Mariatta/pythondotorg,Mariatta/pythondotorg,proevo/pythondotorg,proevo/pythondotorg,python/pythondot...
jobs/migrations/0012_auto_20170809_1849.py
jobs/migrations/0012_auto_20170809_1849.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import apps as global_apps from django.contrib.contenttypes.management import update_contenttypes from django.db import models, migrations from django.utils.timezone import now MARKER = '.. Migrated from django_comments_xtd.Comment model...
apache-2.0
Python
9577d890c458c6025d51f699005a5dc5b6ac4f42
add py-flameprof (#25539)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/py-flameprof/package.py
var/spack/repos/builtin/packages/py-flameprof/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyFlameprof(PythonPackage): """Flamegraph generator for python's cProfile stats.""" h...
lgpl-2.1
Python
55d0713c6f05bcb7292d762e27e2b94d9564908d
add NS/NG CPU load and memory usage check model.
maxli99/SmartChecker,maxli99/SmartChecker
modules/flexins/FlexiNS_Performance_Traffic_UnitInterface.py
modules/flexins/FlexiNS_Performance_Traffic_UnitInterface.py
# -*- coding: utf-8 -*- u""" 检查Flexi NS设备丢包数量。 --通过网管数据库获取MME/SGSN的丢包数量。 --获取数据指令: OSS_query_v2.exe -D2016/07/25 -T1000 -d2016/07/25 -t1200 -cTCPIP_IPS_TOTAL,TCPIP_IPS_DELIVERED,TCPIP_TCPS_SNDTOTAL,TCPIP_TCPS_SNDPACK -uMME -l1 --如果出现丢包较多的现象,请联系现场工程师修复。 """ import re import json from libs.checker ...
mit
Python
1921c82e1a8f0a60ed665184c49647b38ea4978c
Add simple sleep timer script for Windows
iluxonchik/python-general-repo
scripts/proc_sleep_timer.py
scripts/proc_sleep_timer.py
# Kills process by image name after a specified timeout # Useful as a sleep timer for some apps that don't support it natively, like VLC # Works only on Windows! # Example usage: python proc_sleep_timer vlc.exe 3600 import sched, time, subprocess, sys if (len(sys.argv) != 3): print("Usage: python proc_sleep_timer.py ...
mit
Python
0975d62ee38101e7e1eacddb9dd8f3375dddd040
add python preprocessing script
dgcrouse/torch-rnn,spaceraccoon/bilabot,oneyanshi/transcend-exe,JackHopkins/torch-rnn,phanhuy1502/FYP,JackHopkins/torch-rnn,tmp6154/torch-rnn,JackHopkins/torch-rnn,jcjohnson/torch-rnn,gabrielegiannini/torch-rnn-repo,JackHopkins/torch-rnn,billzorn/torch-rnn,antihutka/torch-rnn,phanhuy1502/FYP,JackHopkins/torch-rnn,JackH...
preprocess.py
preprocess.py
import argparse, json, os import numpy as np import h5py parser = argparse.ArgumentParser() parser.add_argument('--input_txt', default='data/tiny-shakespeare.txt') parser.add_argument('--output_h5', default='data/tiny-shakespeare.h5') parser.add_argument('--output_json', default='data/tiny-shakespeare.json') parser.a...
mit
Python
a37260c4d233107e6df3dc6435b7735b07bbdc74
Solve problem 30
mazayus/ProjectEuler
problem030.py
problem030.py
#!/usr/bin/env python3 from itertools import * def digits(number): yield from map(int, str(number)) maxpower = next(dropwhile(lambda n: n * 9**5 > 10**n, count(1))) print(sum(n for n in range(2, 10**maxpower+1) if n == sum(d**5 for d in digits(n))))
mit
Python
625da425679b19d10b8dea73907e4ff4bfb4c966
add test script to interact with deamon
Ertinfagor/RCHome,Ertinfagor/RCHome,Ertinfagor/RCHome
python/demonize.py
python/demonize.py
#!/usr/bin/python import time # Open a file fo = open("/Log.txt", "a+") fo.write( "Python is a great language.\nYeah its great!!\n"); fo.flush(); time.sleep(2); print fo.readline();
apache-2.0
Python
1a6948e2e8b00b99418d7bf147b274de9dfe2dd6
add migration
nextcloud/appstore,clone1612/appstore,clone1612/appstore,clone1612/appstore,clone1612/appstore,nextcloud/appstore,nextcloud/appstore,clone1612/appstore,nextcloud/appstore,nextcloud/appstore,nextcloud/appstore
nextcloudappstore/core/migrations/0004_auto_20160705_2119.py
nextcloudappstore/core/migrations/0004_auto_20160705_2119.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-05 21:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0003_remove_app_recommendations'), ] operations = [ migrations.Alter...
agpl-3.0
Python
2252848823e862bdf0f5b70d1cc54f168faf6c1c
add script to delete flights by some criteria
Harry-R/skylines,TobiasLohner/SkyLines,kerel-fs/skylines,Turbo87/skylines,skylines-project/skylines,shadowoneau/skylines,snip/skylines,Turbo87/skylines,skylines-project/skylines,RBE-Avionik/skylines,RBE-Avionik/skylines,shadowoneau/skylines,Turbo87/skylines,Harry-R/skylines,RBE-Avionik/skylines,TobiasLohner/SkyLines,ke...
scripts/delete_flight_by.py
scripts/delete_flight_by.py
#!/usr/bin/env python # # Delete flights by given criteria # import sys import os import argparse from config import to_envvar import shutil sys.path.append(os.path.dirname(sys.argv[0])) parser = argparse.ArgumentParser(description='Copy flight files by one or more properties.') parser.add_argument('--config', metav...
agpl-3.0
Python
24cc974e0b67e2e6a1921f90f3de7aba00f86521
Add a tiny script to dump __test__.nbt results manually.
TkTech/PyNBT
tests/dump.py
tests/dump.py
#!/usr/bin/env python # -*- coding: utf8 -*- import sys from pynbt import NBTFile def main(argv): with open(sys.argv[1], 'rb') as fin: n = NBTFile(fin, compression=NBTFile.Compression.GZIP) print(n.pretty()) if __name__ == '__main__': sys.exit(main(sys.argv))
mit
Python
59ad38f1e78b4431d446b13f3aedfde3a47d9cad
add tests
Elvin9/Neo,dT9r/Neo
tests/test.py
tests/test.py
import numpy as np import gnumpy as gp import time size = 1000 na = np.random.randn(size, size) nb = np.random.randn(size, size) start_t = time.time() a = gp.garray(na) b = gp.garray(nb) end_t = time.time() print('Initialization time: %f' % (end_t - start_t)) for i in range(4): start_t = time.time() res =...
mit
Python
5eaae9cf63a087372a2ee9aed3cc5df21d3d3c6a
fix admin image widget
feinheit/zipfelchappe,feinheit/zipfelchappe,feinheit/zipfelchappe,feinheit/zipfelchappe
zipfelchappe/widgets.py
zipfelchappe/widgets.py
from django import forms from django.utils.html import escape, conditional_escape from django.utils.encoding import StrAndUnicode, force_unicode from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.widgets import AdminFileWidget from feincms.te...
from django import forms from django.utils.html import escape, conditional_escape from django.utils.encoding import StrAndUnicode, force_unicode from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.widgets import AdminFileWidget from feincms.te...
bsd-3-clause
Python
7d3beda2a865b06111f846095b34c13acc9962bd
update tests
chares-zhang/you-get,cnbeining/you-get,shanyimin/you-get,FelixYin66/you-get,j4s0nh4ck/you-get,forin-xyz/you-get,flwh/you-get,smart-techs/you-get,rain1988/you-get,XiWenRen/you-get,xyuanmu/you-get,qzane/you-get,qzane/you-get,runningwolf666/you-get,tigerface/you-get,kzganesan/you-get,pastebt/you-get,lilydjwg/you-get,candl...
tests/test.py
tests/test.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from you_get import * from you_get.__main__ import url_to_module def test_urls(urls): for url in urls: url_to_module(url).download(url, info_only = True) class YouGetTests(unittest.TestCase): def test_freesound(self): test_ur...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from you_get import * from you_get.__main__ import url_to_module def test_urls(urls): for url in urls: url_to_module(url).download(url, info_only = True) class YouGetTests(unittest.TestCase): def test_freesound(self): test_ur...
mit
Python
044c1b2ded23a23669c496a71eccc6f451bdb79a
Add a new area for mixins and add a GC mixin
gmr/rejected,gmr/rejected
rejected/mixins.py
rejected/mixins.py
import gc import logging LOGGER = logging.getLogger(__name__) class GarbageCollectorMixin(object): """Consumer mixin to periodically call ``gc.collect`` periodically in the :meth:`on_finish` method. By default, ``gc.collect`` is invoked every 10,000 messages. To configure frequency of collection, i...
bsd-3-clause
Python
b4fa6da46698f2dbb2b2c2773f952a3d73c3f705
remove mission image migration
Connexions/openstax-cms,openstax/openstax-cms,Connexions/openstax-cms,openstax/openstax-cms,openstax/openstax-cms,openstax/openstax-cms
pages/migrations/0118_remove_researchpage_mission_image.py
pages/migrations/0118_remove_researchpage_mission_image.py
# Generated by Django 2.0.2 on 2018-07-06 14:39 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('pages', '0117_merge_20180622_1401'), ] operations = [ migrations.RemoveField( model_name='researchpage', name='mission_image...
agpl-3.0
Python
27a002c1459773cee3a6c09e546e50466c41a731
create problem 1 file
jonathanazulay/project-euler
1.py
1.py
""" Multiples of 3 and 5 https://projecteuler.net/problem=1 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. """
mit
Python
ee847bfbc03d6e745d1c165aba538fa32eb42c4a
add logic for getting pol data (including id)
atlefren/beerdatabase,atlefren/beerdatabase,atlefren/beerdatabase,atlefren/beerdatabase
dbupdate/update_pol_shops.py
dbupdate/update_pol_shops.py
# -*- coding: utf-8 -*- import re import requests from beertools.util import get_line_parser, parsers from db import run_upserts URL = 'http://www.vinmonopolet.no/api/butikker' FIELDS = [ {'name': 'Datotid', 'parser': parsers.string_parser}, {'name': 'Butikknavn', 'parser': parsers.string_parser}, {'na...
mit
Python
7c57e833746e8d69b5d4d9e12afb1ee7291f4abb
Create create_index_on_time_log.py
ShashaQin/erpnext,ShashaQin/erpnext,ShashaQin/erpnext,ShashaQin/erpnext
erpnext/patches/v6_27/create_index_on_time_log.py
erpnext/patches/v6_27/create_index_on_time_log.py
import frappe def execute(): frappe.db.sql('''alter table `tabTime Log` add index idx_combine(date_worked,employee,activity_type,project,support_ticket)''')
agpl-3.0
Python
4a9d402b5917b052cae60f4d9d15cbf906dadf7d
Add script to split dataset into validation and training data
johnmartinsson/bird-species-classification,johnmartinsson/bird-species-classification
split_data.py
split_data.py
import glob import os import tqdm import numpy as np import shutil from bird import loader as l source_dir = "./datasets/birdClef2016Whole/" classes = os.listdir(os.path.join(source_dir, "train")) percentage_validation_sampels = 0.10 progress = tqdm.tqdm(range(len(classes))) class_segmentss = [(c, glob.glob(os.path....
mit
Python
2b6fd903bff2e1809d48ed2e73ce1ffa84604363
Create b911.py
EmmettTsai/OnlineJudge,EmmettTsai/OnlineJudge
ZeroJudge/b911.py
ZeroJudge/b911.py
import math while True: try: n = int(input()) print(str(int(math.log2(n) + 1))) except EOFError: break
mit
Python
8645b2e074c1f43d8b0f74bf0bcdee0e7418410a
Add dhke tests
divkakwani/cryptos
tests/dhke.py
tests/dhke.py
import unittest from cryptos.dhke import DHKEInvoker, DHKEParty class TestDHKE(unittest.TestCase): def test_consistency(self): for x in range(1000): invoker = DHKEInvoker() other = DHKEParty(invoker.get_param()) other.receive_partial_key(invoker.get_partial_key()) ...
mit
Python
556a990f56f8c8161234b00f8c16b5d503ca7c37
add new announcer class
IanDCarroll/xox
source/announcer_2_chair.py
source/announcer_2_chair.py
from scriptographer.desk import * class Announcer(Scriptographer): def show(self, text): print text def ask_human(self): return raw_input(self.prompt)
mit
Python
4ba8abef0854699b92bc9ea88089d2ba836c22b2
Add AI module.
Javex/qllbot,sqall01/qllbot,qll/qllbot
modules/ai.py
modules/ai.py
import lib.cmd import lib.events import lib.irc import random import settings GREETINGS = ('hi', 'hey ho', 'yoyo!', 'sup\'') @lib.events.subscribe('join') def say_hello(bot=None, sender=None, channel=None): """Greets the channel when joining it.""" if sender == settings.NICKNAME: bot.send(lib.irc.sa...
bsd-2-clause
Python
50117a2576ab8d002d95e36b5dccfb4e16122622
Move forvo downloads for easier Anki creation.
AndrzejR/Scripts
move_forvo.py
move_forvo.py
"""Move and rename pronunciations downloaded from forvo for easier Anki creation.""" import os import shutil import time FROM_DIR = '' TO_DIR = '' while True: for f in os.listdir(FROM_DIR): if f[:17] == 'pronunciation_de_': print('moving ' + f) shutil.move(os.path.join(FROM_DIR, f), os.path.jo...
mit
Python
13e665da2db562cd3b427f344e7a78a42671a35c
Add some helper utils
johnttan/libnacl,saltstack/libnacl,mindw/libnacl,RaetProtocol/libnacl,coinkite/libnacl,cachedout/libnacl
nacl/utils.py
nacl/utils.py
# Import nacl libs import nacl # Import python libs import time import binascii def salsa_key(): ''' Generates a salsa2020 key ''' return nacl.randombytes(nacl.crypto_secretbox_KEYBYTES) def time_nonce(): ''' Generates a safe nonce The nonce generated here is done by grabbing the 20 di...
apache-2.0
Python
d498a43a8499818d8b4fd49f52be4628f346a4af
Create numberings.py
wrCisco/SigilPlugin_EndNotesToParagraphs
numberings.py
numberings.py
#!/usr/bin/env python lowercase_letters = [chr(x) for x in range(97, 123)] uppercase_letters = [chr(x) for x in range(65, 91)] def italianize(case): if case == 'lower': italian_letters = lowercase_letters.copy() for letter in ('k', 'j', 'w', 'x', 'y'): italian_letters.remove(letter) ...
mit
Python
292338553c4f5ae3972f77aa2f007c1a35f41f3a
Create sample-applicants.py
staeiou/applicant-datasets
sample-applicants.py
sample-applicants.py
# sample-applicants.py # Description: Randomly generates a CSV list of participants, based on various criteria for distribution # By: Stuart Geiger (@staeiou) # Licensed: Revised BSD 3-clause # For: Semi-Automated Participant Selection Project, Astro Hack Week 2015 # https://hackpad.com/Semi-Automatic-Participant-Sele...
bsd-3-clause
Python
2522bc2298e740f8ca6dd5bcdc68008ff6844698
Fix calling node in coffeelint.
ervinb/electron,tinydew4/electron,bright-sparks/electron,seanchas116/electron,MaxGraey/electron,RIAEvangelist/electron,fireball-x/atom-shell,IonicaBizauKitchen/electron,gbn972/electron,rsvip/electron,mirrh/electron,ianscrivener/electron,cos2004/electron,mhkeller/electron,gabriel/electron,saronwei/electron,yalexx/electr...
script/coffeelint.py
script/coffeelint.py
#!/usr/bin/env python import glob import os import subprocess import sys SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__)) def main(): os.chdir(SOURCE_ROOT) coffeelint = os.path.join(SOURCE_ROOT, 'node_modules', 'coffeelint', 'bin', 'coffeelint') settings = ['--quiet', '-f...
#!/usr/bin/env python import glob import os import subprocess import sys SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__)) def main(): os.chdir(SOURCE_ROOT) coffeelint = os.path.join(SOURCE_ROOT, 'node_modules', 'coffeelint', 'bin', 'coffeelint') settings = ['--quiet', '-f...
mit
Python
eca911a1b1623368f991dbf47002c0b59abc15db
Update libchromiumcontent: Suppress CFAllocator warning.
jjz/electron,Ivshti/electron,howmuchcomputer/electron,simonfork/electron,takashi/electron,SufianHassan/electron,micalan/electron,tylergibson/electron,Gerhut/electron,mattdesl/electron,edulan/electron,edulan/electron,d-salas/electron,gerhardberger/electron,micalan/electron,brenca/electron,stevekinney/electron,pandoraui/...
script/lib/config.py
script/lib/config.py
#!/usr/bin/env python NODE_VERSION = 'v0.11.10' BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = 'aa4874a6bcc51fdd87ca7ae0928514ce83645988'
#!/usr/bin/env python NODE_VERSION = 'v0.11.10' BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '1df8e7cdac8aa74c91c19ae0691ce512d560ab3e'
mit
Python
b31e742638c743baa26adae99ae13cd8f4993ed3
mark heisentest as skipped: it randomly passes 3 out of 5 times on my box with pyamg installed
davidgbe/scikit-learn,nesterione/scikit-learn,rahul-c1/scikit-learn,hsiaoyi0504/scikit-learn,lbishal/scikit-learn,jlegendary/scikit-learn,meduz/scikit-learn,nvoron23/scikit-learn,jzt5132/scikit-learn,jayflo/scikit-learn,olologin/scikit-learn,fengzhyuan/scikit-learn,pypot/scikit-learn,nhejazi/scikit-learn,nesterione/sci...
scikits/learn/cluster/tests/test_spectral.py
scikits/learn/cluster/tests/test_spectral.py
""" Testing for Clustering methods """ import numpy as np from numpy.testing import assert_equal from scipy import sparse import nose from .. import SpectralClustering def test_spectral_clustering(): S = np.array([[1, 5, 2, 1, 0, 0, 0], [5, 1, 3, 1, 0, 0, 0], [2, 3, 1, 1, 0,...
""" Testing for Clustering methods """ import numpy as np from numpy.testing import assert_equal from scipy import sparse from .. import SpectralClustering def test_spectral_clustering(): S = np.array([[1, 5, 2, 1, 0, 0, 0], [5, 1, 3, 1, 0, 0, 0], [2, 3, 1, 1, 0, 0, 0], ...
bsd-3-clause
Python
0ff4f235789ddbeb7cbf6174c16e6ce434c57c4f
Add support for Assembla
foauth/foauth.org,foauth/foauth.org,foauth/foauth.org
services/assembla.py
services/assembla.py
import foauth.providers class Assembla(foauth.providers.OAuth2): # General info about the provider provider_url = 'https://www.assembla.com/' docs_url = 'http://api-doc.assembla.com/content/api_reference.html' category = 'Code' # URLs to interact with the API authorize_url = 'https://api.asse...
bsd-3-clause
Python
6413e9ce4aa36042bf097f702e3d3ae6be0a9acd
Create setup.py
zzeromin/RetroPie-Coin,zzeromin/RetroPie-Coin
setup.py
setup.py
# How to Setup : # cd /home/pi # git clone https://github.com/zzeromin/RetroPie-Coin.git # cd RetroPie-Coin/ # chmod 755 setup.sh # sudo ./setup.sh cd /home/pi/ git clone https://github.com/zzeromin/RetroPie-Coin.git cd RetroPie-Coin/ cp coin.service /lib/systemd/system/ systemctl enable coin.service echo "RetroPie-C...
mit
Python
fb053caa20e992d4a060c45729540d9a13d5678f
add setup.py
what-studio/astdispatch
setup.py
setup.py
# -*- coding: utf-8 -*- """ """ from __future__ import with_statement import re from setuptools import setup from setuptools.command.test import test # detect the current version with open('astdispatch.py') as f: version = re.search(r'__version__\s*=\s*\'(.+?)\'', f.read()).group(1) assert version # use pytest ...
bsd-3-clause
Python
04c39be6013c1232615c5acfb82297bf29410091
Add simple setup file.
snarfed/beautifulsoup,h4ck3rm1k3/BeautifulSoup4,h4ck3rm1k3/BeautifulSoup4,h4ck3rm1k3/BeautifulSoup4,snarfed/beautifulsoup
setup.py
setup.py
from distutils.core import setup try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # 2.x from distutils.command.build_py import build_py setup(name="BeautifulSoup", version="4.0alpha", author="Leonard Richardson", url="http://www.crummy.com/software/Bea...
mit
Python
7240aab96ded9ca30a1d0f174798d63000a73a68
Package SatNOGS client.
cshields/satnogs-client,adamkalis/satnogs-client,cshields/satnogs-client,adamkalis/satnogs-client
setup.py
setup.py
from setuptools import setup setup(name='SatNOGS client', packages=['satnogsclient'], version='0.1', description='SatNOGS Client')
agpl-3.0
Python
ea270e47b0273431a2d7bdd0ea50763f07234706
Add repository url to setup.py
systemovich/eulerlib,transmogrifier/eulerlib
setup.py
setup.py
# -*- coding: utf-8 -*- # Copyright 2015 Sameer Suhas Marathe # # 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 re...
# -*- coding: utf-8 -*- # Copyright 2015 Sameer Suhas Marathe # # 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 re...
apache-2.0
Python
6258ca252726994b7559c2666faa4ef232ab009a
Add setup file
markbrough/exchangerates
setup.py
setup.py
from setuptools import setup, find_packages setup( name='exchangerates', version='0.1.0', description="A module to make it easier to handle historical exchange rates", long_description="", classifiers=[ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", ...
mit
Python
3327bcbfeda3045ee57d89ff54c08b1ccfd8b263
Add setup.py for pip
hq6/smux
setup.py
setup.py
from setuptools import setup long_description=\ """ smux ==================== The minimal tmux launcher, with the fewest options to set and the fastest ramp-up time. Originally created to be tool to make it easier to reproduce (and interactively debug) distributed systems bugs that required sshing into a lot of serv...
mit
Python
60e9698737a51cec33176c2e1ab94852456ed0df
Add setup.py
natasha/natasha
setup.py
setup.py
from setuptools import setup, find_packages setup( name='natasha', version='0.1.0', description='Named-entity recognition for russian language', url='https://github.com/bureaucratic-labs/natasha', author='Dmitry Veselov', author_email='d.a.veselov@yandex.ru', license='MIT', classifiers=...
mit
Python
169e730cdb8117c98d5eb3ed0a95d9a3a1d11a1f
Fix typo 'zip_zafe' in setup.py
ArturGaspar/w3lib,scrapy/w3lib
setup.py
setup.py
from setuptools import setup, find_packages setup( name='w3lib', version='1.13.0', license='BSD', description='Library of web-related functions', author='Scrapy project', author_email='info@scrapy.org', url='https://github.com/scrapy/w3lib', packages=find_packages(exclude=('tests', 'te...
from setuptools import setup, find_packages setup( name='w3lib', version='1.13.0', license='BSD', description='Library of web-related functions', author='Scrapy project', author_email='info@scrapy.org', url='https://github.com/scrapy/w3lib', packages=find_packages(exclude=('tests', 'te...
bsd-3-clause
Python
9d7892d802210a31df1237d7bb18843049741497
Add 'setup.py' #14
7pairs/wp2mt,7pairs/wp2mt
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import find_packages, setup from wp2mt import __version__ setup( name='wp2mt', version=__version__, description='Tools for converting WordPress to Movable Type', author='Jun-ya HASEBA', author_email='7pairs@gmail.com', url='http://seven-pairs.hatenablo...
apache-2.0
Python
2b68d4464f9e70b19c14b81cc5ae44009a0bc4ff
upgrade requests
tanhaiwang/gmusicapi,simon-weber/gmusicapi,nvbn/Unofficial-Google-Music-API,dvirtz/gmusicapi,peetahzee/Unofficial-Google-Music-API,simon-weber/Unofficial-Google-Music-API,TheOpenDevProject/gmusicapi,thebigmunch/gmusicapi,dvirtz/gmusicapi,jimyx17/gmusic
setup.py
setup.py
#!/usr/bin/env python import re from setuptools import setup, find_packages import sys #Only 2.6-2.7 are supported. if not ((2, 6, 0) <= sys.version_info[:3] <= (2, 7, 3)): sys.stderr.write('gmusicapi does not officially support this Python version.\n') #try to continue anyway dynamic_requires = [] if sys.v...
#!/usr/bin/env python import re from setuptools import setup, find_packages import sys #Only 2.6-2.7 are supported. if not ((2, 6, 0) <= sys.version_info[:3] <= (2, 7, 3)): sys.stderr.write('gmusicapi does not officially support this Python version.\n') #try to continue anyway dynamic_requires = [] if sys.v...
bsd-3-clause
Python
ff2336a039acfa5ecc525747d8b0502ce7a178d0
add setup.py
unt-libraries/pyuntl
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup( name='pyuntl', version='1.0.0', author='Mark Phillips', author_email='mark.phillips@unt.edu', url='https://github.com/unt-libraries/edtf-validate', license='BSD', packages=['pyuntl'], install_requires=[ 'lxml', ...
bsd-3-clause
Python
e20c5e7f5ceda009861968e3185e7fbcad76fcc7
make a package
larisahax/awc
setup.py
setup.py
from setuptools import setup setup(name='awc', version='0.1', description='Adaptive Weights Clustering', url='https://github.com/larisahax/awc', author='Efimov K., Adamyan L., Spokoiny V.', author_email='ladamyan@hu-berlin.de', license='MIT', packages=['awc'], zip_safe=F...
mit
Python
c8733fcba0197680f9a9f203e45edf790d2dda03
update setup.py
krysros/mailthon,ashgan-dev/mailthon,eugene-eeo/mailthon
setup.py
setup.py
import sys from setuptools import setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = ['--strict', '--verbose', '--tb=long', 'tests'] self.test_suite = True def run_tes...
import sys from setuptools import setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.test_args = ['--strict', '--verbose', '--tb=long', 'tests'] self.test_suite = True def run_tes...
mit
Python
2f0b4e4261790e3daa01e58d68555cb64571d1a9
Create setup.py
TheSighing/climber,TheSighing/climber
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distutils.core import setup def get_version(*file_paths): filename = os.path.join(os.path.dirname(__file__), *file_paths) version_file = open(filename).read() ve...
mit
Python
a33691d501a3ebcc9258d24a0f8cb2b7608b95de
Create setup.py
EricRohlfs/FortifyCompare
setup.py
setup.py
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.absp...
mit
Python
6e777eaeab2484012e90c6e90c9b655d212eb8b5
Add setup.py
pedrospdc/pinger
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import setuptools from setuptools import setup, find_packages if setuptools.__version__ < '0.7': raise RuntimeError("setuptools must be newer than 0.7") setup( name="pinger", version="0.1.0", author="Pedro Palhares (pedrospdc)", author_email="pedrosp...
mit
Python
18cc4ff34569b49ee161597504517b9a41c28828
add setup.py
alex8224/Rpdb-Shell
setup.py
setup.py
#!/usr/bin/env python #-*-coding:utf-8 -*- # #Author: tony - birdaccp at gmail.com #Create by:2015-04-28 10:22:20 #Last modified:2015-04-28 10:29:50 #Filename:setup.py #Description: from distutils.core import setup setup(name='rpdb', version='1.0', description='Python Remote pdb', packages=['rpdb'], )...
apache-2.0
Python
b3972c2622aa28bab32a89f732610c87c593ccf1
Add setup.py
alexforencich/lantz_drivers,LabPy/lantz_drivers,MatthieuDartiailh/lantz_drivers,elopezga/lantz_drivers
setup.py
setup.py
#!/usr/bin/env python from __future__ import with_statement # http://docs.python.org/distutils/ # http://packages.python.org/distribute/ try: from setuptools import setup except: from distutils.core import setup import os.path version_py = os.path.join(os.path.dirname(__file__), 'lantz_drivers', 'version.py...
bsd-3-clause
Python
f18b87ee89fabeb692bb0ced13b3721e785b7476
Add setup.py
ruipgil/ProcessMySteps,ruipgil/ProcessMySteps
setup.py
setup.py
""" Setup script """ from distutils.core import setup REQS = [ 'tracktotrip', 'flask', 'psycopg2', 'ppygis' ] setup( name='processmysteps', packages=['processmysteps'], version='0.1', description='Track processing manager', author='Rui Gil', author_email='ruipgil@gmail.com', ...
mit
Python
133ae4315059ea6986f2bd6649e4573d2a75afdd
Bump up version to 1.3.4
mpenkov/smart_open,RaRe-Technologies/smart_open,RaRe-Technologies/smart_open,mpenkov/smart_open,piskvorky/smart_open
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). import io import os import sys if sys.version_info < (2, 6): raise ImportError("smart_open requires python >= 2.6") ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). import io import os import sys if sys.version_info < (2, 6): raise ImportError("smart_open requires python >= 2.6") ...
mit
Python
e6172822e8b71572e1fd0e189c71cdeacba2a6eb
solve 1 problem
Shuailong/Leetcode
solutions/rectangle-area.py
solutions/rectangle-area.py
#!/usr/bin/env python # encoding: utf-8 """ rectangle-area.py Created by Shuailong on 2016-02-28. https://leetcode.com/problems/rectangle-area/. """ class Solution(object): def computeArea(self, A, B, C, D, E, F, G, H): """ :type A: int :type B: int :type C: int :type D...
mit
Python
0e1d7c0779e1bb6675ba918da68dad529c457085
Add tasks.py
asvetlov/aiodns,saghul/aiodns
tasks.py
tasks.py
import invoke # Based on https://github.com/pyca/cryptography/blob/master/tasks.py @invoke.task def release(version): invoke.run("git tag -a aiodns-{0} -m \"aiodns {0} release\"".format(version)) invoke.run("git push --tags") invoke.run("python setup.py sdist") invoke.run("twine upload -r pypi dist...
mit
Python
5aa6f31f6fcef93c2d867be0e7ffdb2df29733b6
Add very simple server
visdesignlab/TulipPaths,visdesignlab/TulipPaths
server/api.py
server/api.py
from flask import Flask from flask_restful import Resource, Api, reqparse from flask.ext.cors import CORS from tulip import * from tulipgui import * import tulippaths as tp app = Flask(__name__) api = Api(app) CORS(app) import json parser = reqparse.RequestParser() parser.add_argument('graph') parser.add_argument('pa...
mit
Python
c4f1e95860febcb738d9b9c0cca5ad3c6365024b
Add script to calibrate the ESC
bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc
control/calibrate_esc.py
control/calibrate_esc.py
"""Programs the ESC.""" from control import driver as driver_module from control.driver import Driver from control.test.dummy_logger import DummyLogger from control.test.dummy_telemetry import DummyTelemetry def main(): """Main function.""" # First, shut the damn car up throttle_percentage = 0.0 # And...
mit
Python
02acb60e44f586dfec1b22a905304a3b6de19f82
Save full country name in ES
qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/pillows/domain.py
corehq/pillows/domain.py
import copy from corehq.apps.accounting.models import Subscription from corehq.apps.domain.models import Domain from corehq.pillows.base import HQPillow from corehq.pillows.mappings.domain_mapping import DOMAIN_MAPPING, DOMAIN_INDEX from dimagi.utils.decorators.memoized import memoized from django.conf import settings ...
import copy from corehq.apps.accounting.models import Subscription from corehq.apps.domain.models import Domain from corehq.pillows.base import HQPillow from corehq.pillows.mappings.domain_mapping import DOMAIN_MAPPING, DOMAIN_INDEX from dimagi.utils.decorators.memoized import memoized from django.conf import settings ...
bsd-3-clause
Python
0ca9317783e4f479a3e011247ea2b459f6f22151
Add problem 5
severinkaderli/Project-Euler-Python
005.py
005.py
#!/usr/bin/env python3 # Author: Severin Kaderli <severin.kaderli@gmail.com> # # Project Euler - Problem 5: # What is the smallest positive number that is evenly divisible by all of the # numbers from 1 to 20? from functools import reduce def gcd(a, b): """Returns the greatest common divisor using Euclid's Algorit...
mit
Python
4d1b9da2791572298b893944df54562e139b095a
Solve #344
Zmiecer/leetcode,Zmiecer/leetcode
344.py
344.py
class Solution(object): def reverseString(self, s): """ :type s: str :rtype: str """ return s[::-1]
mit
Python
ab1a9b987e2f6ba922510f1f4c9da59f144698e6
Add files via upload
CollinRoess/random
RPS.py
RPS.py
#!usr/bin/env python import time, random print("Rock, Paper, Scissors, Shoot!") def evaluate(user_choice, computer_choice): possible_choices=("rock", "paper", "scissors") usr_choice_index=possible_choices.index(user_choice) cpu_choice_index=possible_choices.index(computer_choice) if usr_choice_index...
mit
Python
4bbed82c1375b884f09116d88011e592284678ac
merge merged migrations
zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA
OIPA/iati_synchroniser/migrations/0027_merge_20210914_1033.py
OIPA/iati_synchroniser/migrations/0027_merge_20210914_1033.py
# Generated by Django 2.0.13 on 2021-09-14 10:33 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('iati_synchroniser', '0026_dataset_old_date_marker'), ('iati_synchroniser', '0026_interruptincrementalparse'), ] operations = [ ]
agpl-3.0
Python
2daf2087583b57c3339a923889c9bb4132f1db34
Add tool info for CoVeriTest
sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,sosy-lab/benchexec,dbeyer/benchexec,ultimate-pa/benchexec,dbeyer/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec
benchexec/tools/coveritest.py
benchexec/tools/coveritest.py
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.tools.cpachecker as cpachecker class Tool(cpachecker.Tool): """Tool...
apache-2.0
Python
8429a5a5d171b78ae68a525bf836e09d30852e3f
Add example demo
robotadam/socketconsole
example/sockdemo.py
example/sockdemo.py
import time import threading import socketconsole socketconsole.launch() def waiter(): time.sleep(500) ts = [threading.Thread(target=waiter) for i in range(3)] for i, t in enumerate(ts): t.name = "thread-%d" % i t.daemon = True t.start() print "Started", t.name waiter()
bsd-3-clause
Python
aa7af7d7a67ee080a9e8d94dc8561d8afb899d48
Add merge migration
HalcyonChimera/osf.io,baylee-d/osf.io,CenterForOpenScience/osf.io,baylee-d/osf.io,felliott/osf.io,cslzchen/osf.io,saradbowman/osf.io,brianjgeiger/osf.io,felliott/osf.io,erinspace/osf.io,erinspace/osf.io,mfraezz/osf.io,pattisdr/osf.io,adlius/osf.io,baylee-d/osf.io,erinspace/osf.io,brianjgeiger/osf.io,CenterForOpenScienc...
osf/migrations/0125_merge_20180824_1856.py
osf/migrations/0125_merge_20180824_1856.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-08-24 18:56 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('osf', '0124_merge_20180816_1229'), ('osf', '0121_remove_waffle_flags'), ] operatio...
apache-2.0
Python
da11af2893719677a9113ce391d37b0dada6585c
fix nova/tests/test_test.py
imsplitbit/nova,leilihh/novaha,shail2810/nova,maelnor/nova,TwinkleChawla/nova,fajoy/nova,JioCloud/nova,mandeepdhami/nova,fajoy/nova,fnordahl/nova,paulmathews/nova,zhimin711/nova,mahak/nova,yatinkumbhare/openstack-nova,tealover/nova,NewpTone/stacklab-nova,sridevikoushik31/nova,plumgrid/plumgrid-nova,luogangyi/bcec-nova,...
nova/tests/test_test.py
nova/tests/test_test.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
Python
6b85513e7087f072c5233dd7e280e22902577de9
Add ielex/lexicon/migrations/0009_languagebranches.py
lingdb/CoBL-public,lingdb/CoBL-public,lingdb/CoBL-public,lingdb/CoBL-public
ielex/lexicon/migrations/0009_languagebranches.py
ielex/lexicon/migrations/0009_languagebranches.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lexicon', '0008_auto_20151202_1146'), ] operations = [ migrations.CreateModel( name='LanguageBranches', ...
bsd-2-clause
Python
cc2be04140d232bce1680481aad59b8bb87ab8c2
add get_counts
Akagi201/learning-python,Akagi201/learning-python,Akagi201/learning-python,Akagi201/learning-python,Akagi201/learning-python
misc/get_counts.py
misc/get_counts.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- def get_counts(sequence): counts = {} for x in sequence: if x in counts: counts[x] += 1 else: counts[x] = 1 return counts from collections import defaultdict def get_counts2(sequence): counts = defaultdict(int) # va...
mit
Python
4e0b1e8a036771776b381d38864a8fa5a3bf792a
Add medicament import
moodpulse/l2,moodpulse/l2,moodpulse/l2,moodpulse/l2,moodpulse/l2
users/management/commands/medicment_import.py
users/management/commands/medicment_import.py
from django.core.management.base import BaseCommand from openpyxl import load_workbook from directions.models import KeyValue class Command(BaseCommand): def add_arguments(self, parser): """ :param path - файл с кодами МКБ10.2019 + расшифровка """ parser.add_argument('path', type=s...
mit
Python
cab9ef8d58adeceaf94d8855aa6d598d7fa01f33
Add export csv template tests
edofic/ggrc-core,edofic/ggrc-core,NejcZupec/ggrc-core,hasanalom/ggrc-core,jmakov/ggrc-core,andrei-karalionak/ggrc-core,j0gurt/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,jmakov/ggrc-core,hyperNURb/ggrc-core,hyperNURb/ggrc-core,hyperNURb/ggrc-core,plamut/ggrc-core,NejcZupec/ggrc-core,josthkko/ggrc...
src/tests/ggrc/converters/test_export_csv.py
src/tests/ggrc/converters/test_export_csv.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com from os.path import abspath, dirname, join from flask.json import dumps from te...
apache-2.0
Python
8da9a8ffe4f5fc8773c96cc6aef96bf4f0b7c01c
Add demo on finding bluetooth host controllers
solus-project/linux-driver-management,solus-project/linux-driver-management
examples/find-bt.py
examples/find-bt.py
#!/usr/bin/env python2 # # This file is Public Domain and provided only for documentation purposes. # # Run : python2 ./find-bt.py # # Note: This will happily run with Python3 too, I just picked a common baseline # import gi gi.require_version('Ldm', '1.0') from gi.repository import Ldm, GObject class BluezPlugin(Ldm...
lgpl-2.1
Python
d58758621460426fd0cec0c5f2326030e1fe584e
add Settings class for sharing it across all objects to use common settings
pankshok/xoinvader,pkulev/xoinvader
common.py
common.py
""" Module for common shared objects. """ class Settings(object): def __init__(self): self._settings = {} def __getattr__(self, name): return self._settings[name] def __setattr_(self, name, value): self._settings[name] = value
mit
Python
a215bc6fd165baf46d341016b1c28922e5dfbc74
Add old metrics script from production server
adlius/osf.io,cosenal/osf.io,adlius/osf.io,sbt9uc/osf.io,Nesiehr/osf.io,AndrewSallans/osf.io,mattclark/osf.io,MerlinZhang/osf.io,zkraime/osf.io,sbt9uc/osf.io,aaxelb/osf.io,felliott/osf.io,aaxelb/osf.io,himanshuo/osf.io,petermalcolm/osf.io,doublebits/osf.io,fabianvf/osf.io,jeffreyliu3230/osf.io,jolene-esposito/osf.io,br...
scripts/metrics.py
scripts/metrics.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Old metrics script.""" from math import log from urlparse import urlsplit from pymongo import Connection import website.settings.defaults as settings import itertools from framework.auth import User from framework.analytics import get_basic_counters from website.mode...
apache-2.0
Python
2efb5f97b51fc9868026487ffdd9423c16e9181e
Create im_client.py
GiladE/birde,GiladE/birde,GiladE/birde,GiladE/birde,GiladE/birde,GiladE/birde,GiladE/birde
birde/im_client.py
birde/im_client.py
__author__ = 'JontyHome' import socket HOST = '192.168.0.10' # The remote host PORT = 9999 # The same port as used by the server s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) chat_partner = raw_input("Enter the IP of the client you wish to chat with") while True: send...
mit
Python
1629f3a6a57a42e275679b210e1803ef4626c289
Create avoidSameName.py
armslave00/zipWholeFolder
src/avoidSameName.py
src/avoidSameName.py
import sys import os.path def avoidSameName(originPath): # if os.path.exists(originPath): if True: pathSplit = os.path.split(originPath) fileDir, fileName = pathSplit[0], pathSplit[1] fileNameSplit = fileName.split('.') fileNameNoExt = fileNameSplit[0] Exts = '.'.join(fileNameSplit[1:]) rep...
mit
Python
b3ad1a33715f3db4b06e1196958b4248f9a8039d
Add south migration for new field type.
0x07Ltd/django-generic-counter,0x07Ltd/django-generic-counter
django_generic_counter/south_migrations/0003_auto__chg_field_counter_count.py
django_generic_counter/south_migrations/0003_auto__chg_field_counter_count.py
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Counter.count' db.alter_column(u'django_generic_counte...
unlicense
Python
f96881d9b7459e1bdd3c1d5bb38f20a61a464bfb
Add merge migration.
baylee-d/osf.io,adlius/osf.io,mattclark/osf.io,adlius/osf.io,mfraezz/osf.io,CenterForOpenScience/osf.io,mfraezz/osf.io,mattclark/osf.io,mfraezz/osf.io,cslzchen/osf.io,baylee-d/osf.io,cslzchen/osf.io,pattisdr/osf.io,mfraezz/osf.io,cslzchen/osf.io,felliott/osf.io,aaxelb/osf.io,pattisdr/osf.io,aaxelb/osf.io,mattclark/osf....
osf/migrations/0159_merge_20190331_2301.py
osf/migrations/0159_merge_20190331_2301.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-03-31 23:01 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('osf', '0158_fix_fork_last_logged'), ('osf', '0156_auto_20190306_1648'), ] operatio...
apache-2.0
Python
912c7a580649a8b5cd59c352bfb9d8247ac9c578
add the address detector
deanmalmgren/scrubadub,deanmalmgren/scrubadub,datascopeanalytics/scrubadub,datascopeanalytics/scrubadub
scrubadub/detectors/address.py
scrubadub/detectors/address.py
""" This modules provides a detector for addresses. It is based on the python package `pyap` and so only supports the countries that pyap supports: US, GB and CA. The results from `pyap` are cross-checked using `pypostal`, which builds upon openvenues' `libpostal` library. `libpostal` needs to be compiled from source ...
mit
Python
22551bb3ad45c2ca61700e6b3a4e3bcf3d53c1dd
Create sudoku_solver.py
UmassJin/Leetcode
Array/sudoku_solver.py
Array/sudoku_solver.py
''' Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there will be only one unique solution. ''' class Solution: # @param {character[][]} board # @return {void} Do not return anything, modify board in-place instead. d...
mit
Python
7cc3a1659891d1e3f6f239c00e1ae5ecf21c81b2
add batch_pandaseq
briney/10xNBDs,bryanbriney/10xNBDs
batch_pandaseq.py
batch_pandaseq.py
#!/usr/bin/python # filename: batch_pandaseq.py import os import glob import argparse import subprocess as sp from multiprocessing import cpu_count parser = argparse.ArgumentParser("Parses through merged MiSeq reads and appends the UAID to the sequence name.") parser.add_argument('-in', dest='input',required=True, he...
mit
Python
2326e62d6f1581e5fa6ae0515b700b73a6d9ee7b
Create initial unit tests
byanofsky/bookmarks,byanofsky/bookmarks,byanofsky/bookmarks
tests/test_bookmarks.py
tests/test_bookmarks.py
import bookmarks import unittest class FlaskrTestCase(unittest.TestCase): def setUp(self): bookmarks.app.config['DATABASE_NAME'] = bookmarks.app.config['TEST_DATABASE_NAME'] bookmarks.app.testing = True self.app = bookmarks.app.test_client() with bookmarks.app.app_context(): ...
apache-2.0
Python
de6c3e55336abe8881b4dc512403691a4d80f9ca
Add a proper __main__ script
Arcensoth/cogbot
cogbot/__main__.py
cogbot/__main__.py
import cogbot.run
mit
Python
3189b82167955e713fcc6e92d34b220feeb122a7
Add unit tests for different verbosity levels
johnveitch/cpnest
tests/test_verbosity.py
tests/test_verbosity.py
import unittest import numpy as np import cpnest.model class GaussianModel(cpnest.model.Model): """ A simple gaussian model with parameters mean and sigma """ names=['mean','sigma'] bounds=[[-5,5],[0.05,1]] data = np.array([x for x in np.random.normal(0.5,0.5,size=10)]) analyticZ = np.log(0...
mit
Python
fac3f2fdef8413e1e0c2ba4985533df2db264a23
Update settings.py
ocefpaf/ODM2-Admin,miguelcleon/ODM2-Admin,ocefpaf/ODM2-Admin,miguelcleon/ODM2-Admin,miguelcleon/ODM2-Admin,ocefpaf/ODM2-Admin,miguelcleon/ODM2-Admin,ocefpaf/ODM2-Admin
odm2testsite/settings.py
odm2testsite/settings.py
""" Django settings for odm2testsite project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, .....
""" Django settings for odm2testsite project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, .....
mit
Python
cb455c030c1f0a7969c89a13379def6989a63a4c
Add test cases for pipchecker
django-extensions/django-extensions,django-extensions/django-extensions,django-extensions/django-extensions
tests/management/commands/test_pipchecker.py
tests/management/commands/test_pipchecker.py
# -*- coding: utf-8 -*- import importlib import os import subprocess import sys import pip from django.core.management import call_command from django.test import TestCase from django.utils.six import StringIO from pip._internal.exceptions import InstallationError class PipCheckerTests(TestCase): def test_pipch...
mit
Python
f3d91a8d233a9f688ed384ef11e0c6ee5cd43ddd
Test run script
mihaimaruseac/dphcar
run.py
run.py
datasets = ['kosarak', 'mushroom', 'pumsb_star', 'retail'] thresholds = [ 9900, 81, 490, 881] k = 100 cmd_template = "./dph data/datasets/{0}.dat r {2} {1} 0.5 0.1 {3} 1000 5 {4}" redirect = " > shelves/{0}_sh_{1}_bins_{2}" for dataset, t in zip(datasets, thresholds): for sh in range(1...
bsd-3-clause
Python
891c9a19bc5231d88735f1122854c21f84ccc5e0
Add run.py for run default
tranhuucuong91/simple-notebooks,tranhuucuong91/simple-notebooks,tranhuucuong91/simple-notebooks
run.py
run.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from app import app #from app import database #if app.debug is not True: #import logging #from logging.handlers import RotatingFileHandler #file_handler = RotatingFileHandler('logs/glossary.log', maxBytes=1024 * 1024 * 100, backupCount=20) ##file_handler...
mit
Python
3d9672ac6a2fce01898627372680c5e4ada7aa9b
Add run script, which prints a dataframe of the forum counts
petebachant/CFD-online-forums-analysis
run.py
run.py
#!/usr/bin/env python """ This script parses the cfd-online.com main forum page for thread and post counts. """ import requests from bs4 import BeautifulSoup import re import pandas as pd soup = BeautifulSoup(requests.get("http://cfd-online.com/Forums/").text, "lxml") # Find all numbers in tables on the page numbers...
mit
Python
518630a944acd85d9e31c082ce12fae31cce9378
add various koji functions to work with repos
sgallagher/baseruntime-package-lists,fedora-modularity/baseruntime-package-lists,sgallagher/baseruntime-package-lists,fedora-modularity/baseruntime-package-lists,fedora-modularity/baseruntime-package-lists,sgallagher/baseruntime-package-lists
koji-tools.py
koji-tools.py
#!/usr/bin/env python import os import click import koji from six.moves.urllib_parse import urljoin KOJIPKGS = "https://kojipkgs.fedoraproject.org/" KOJIHUB = "https://koji.fedoraproject.org/kojihub" @click.group() def kojicli(): pass @kojicli.command("get-latest-repo") @click.argument("tag") def get_latest_rep...
mit
Python
03e417acebd69627f75b6975b0b04c89ee9111a9
Fix test_get_template_* tests
amit0701/rally,vganapath/rally,openstack/rally,group-policy/rally,gluke77/rally,yeming233/rally,eonpatapon/rally,eayunstack/rally,gluke77/rally,gluke77/rally,openstack/rally,amit0701/rally,group-policy/rally,amit0701/rally,openstack/rally,vganapath/rally,vganapath/rally,vganapath/rally,eayunstack/rally,openstack/rally,...
tests/unit/ui/test_utils.py
tests/unit/ui/test_utils.py
# Copyright 2014: Mirantis 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 b...
# Copyright 2014: Mirantis 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 b...
apache-2.0
Python
ac741ca26061e863fbaadde764dbd0cb1067cead
add non manifold tester
sol-ansano-kim/medic,sol-ansano-kim/medic,sol-ansano-kim/medic
python/medic/plugins/Tester/nonManifold.py
python/medic/plugins/Tester/nonManifold.py
from medic.core import testerBase from maya import OpenMaya class NonManifold(testerBase.TesterBase): Name = "NonManifold" def __init__(self): super(NonManifold, self).__init__() def Match(self, node): return node.object().hasFn(OpenMaya.MFn.kMesh) def Test(self, node): it =...
mit
Python
0195d05fb443ec9025242a6f68e51ad1d8327966
Add a snippet (python/numpy/random/multivariate_normal).
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/numpy/random/multivariate_normal.py
python/numpy/random/multivariate_normal.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import math import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d mu = np.array([0., 0.]) cov = np.array([[1., 0.], [0., 1.]]) num_points = 10000 x = np.random.multivariate_normal(mu, cov, num_points) plt.plot(x[:,0], x...
mit
Python
80de6974086884ae32e61da6c1538c65318fc09a
add tests for application in new file tests.py
davidnjakai/bc-8-todo-console-application
tests.py
tests.py
import unittest import todo_list import todo_item class TodoTests(unittest.TestCase): def test_todo_list_instantiation(self): test_list = todo_list.ToDoList() self.assertEqual(type(todo_list.ToDoList('My List', 'A list containing test to do items', [todo_item.ToDoItem('to do item 1')])), type(test_list)) def te...
mit
Python
94564a1bd710195b7098196cf35c7bce65fc918e
add a tool for parse title and content from xml file
xuleiboy1234/autoTitle,xuleiboy1234/autoTitle,xuleiboy1234/autoTitle,xuleiboy1234/autoTitle,xuleiboy1234/autoTitle,xuleiboy1234/autoTitle,xuleiboy1234/autoTitle,xuleiboy1234/autoTitle,xuleiboy1234/autoTitle
tool/split_title_content.py
tool/split_title_content.py
#encoding=UTF-8 from bs4 import BeautifulSoup with open("C:/Users/xulei/zhiziyun/autoTitle/Data/news_sohusite_xml.dat","r",encoding="gb18030") as fread,open("C:/Users/xulei/zhiziyun/autoTitle/Data/news_sohusite_title.txt","w",encoding="UTF-8") as fwrite_title, open("C:/Users/xulei/zhiziyun/autoTitle/Data/news_sohusite...
mit
Python
9fa40470a520f4874bac49516efb7e1b3ec5f4ca
Load generator client
fabiomorais/load_generator,fabiomorais/load_generator
load_generator_client.py
load_generator_client.py
import threading as t import time import subprocess import sys from flask import Flask, request from collections import deque app = Flask(__name__) QUEUE = deque() def get_ncpus(): return str(subprocess.Popen(['nproc'], stderr=subprocess.PIPE, stdout=subprocess.PIPE).communicate()[0]) def is_cpu_value_a...
apache-2.0
Python
515c03809b7e7736b6e7679170985e53986f82d9
Add http upload server
dgengtek/scripts,dgengtek/scripts
tools/http_server_upload.py
tools/http_server_upload.py
#!/bin/env python3 import BaseHTTPServer import random SERVER = "192.168.0.1" PORT = 8080 def get_filename(): chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' fn = ''.join([random.choice(chars) for i in xrange(12)]) return fn class PostHandler(BaseHTTPServer.BaseHTTPRequestHandl...
mit
Python
39720db318e84d0a1b67037d70b1c62e2b717c5e
refactor configs
mattvonrocketstein/smash,mattvonrocketstein/smash,mattvonrocketstein/smash,mattvonrocketstein/smash
smashlib/config.py
smashlib/config.py
""" smashlib.config """ import os, shutil import demjson from IPython.core.profiledir import ProfileDir from smashlib.data import SMASH_ETC, SMASH_DIR, SMASHLIB_DIR, main_profile_name from smashlib.python import create_dir_if_not_exists, ope, opj from smashlib.data import USER_CONFIG_PATH class SmashConfig(object): ...
mit
Python
891c0a597d93de20326e087c80b4e7b9b1c1c8f2
Create A.py
Pouf/CodingCompetition,Pouf/CodingCompetition
Google-Code-Jam/2016-A/A.py
Google-Code-Jam/2016-A/A.py
mit
Python
c88243305254cab3a504a6cfb6990173da0e478b
Add migration for new release products list
mozilla/nucleus,mozilla/nucleus,mozilla/nucleus,mozilla/nucleus
nucleus/rna/migrations/0004_auto_20211005_1522.py
nucleus/rna/migrations/0004_auto_20211005_1522.py
# Generated by Django 2.2.13 on 2021-10-05 15:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('rna', '0003_auto_20210930_1841'), ] operations = [ migrations.AlterField( model_name='release', name='product', ...
mpl-2.0
Python
f71d45109bf413ea0596cd8b85150239e509b699
Add a script for finding chatty CloudWatch log groups (#2181)
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
monitoring/find_chatty_cloudwatch_log_groups.py
monitoring/find_chatty_cloudwatch_log_groups.py
#!/usr/bin/env python # -*- encoding: utf-8 """ Find chatty CloudWatch log groups. This script looks at all the log groups in your account, and prints a bar chart showing the groups with the most stored logs. This can be helpful whe trying to find unusually chatty applications. """ import boto3 def describe_all_l...
mit
Python