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
bb649f299538c76d555e30ac0d31e2560e0acd3e
Add test
kamaxeon/fap
tests/test_calculator.py
tests/test_calculator.py
import unittest from app.calculator import Calculator class TestCalculator(unittest.TestCase): def setUp(self): self.calc = Calculator() def test_calculator_addition_method_returns_correct_result(self): calc = Calculator() result = calc.addition(2,2) self.assertEqual(4, result) def test_calculator_subtraction_method_returns_correct_result(self): calc = Calculator() result = calc.subtraction(4,2) self.assertEqual(2, result)
apache-2.0
Python
630309837989e79ba972358a3098df40892982f5
Create rrd_ts_sync.py
ninjawil/weather-station,ninjawil/weather-station,ninjawil/weather-station,ninjawil/weather-station,ninjawil/weather-station,ninjawil/weather-station,ninjawil/weather-station
rrd_ts_sync.py
rrd_ts_sync.py
#------------------------------------------------------------------------------- # # Controls shed weather station # # The MIT License (MIT) # # Copyright (c) 2015 William De Freitas # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # #------------------------------------------------------------------------------- #!usr/bin/env python #=============================================================================== # Import modules #=============================================================================== import settings as s import rrdtool import thingspeak #=============================================================================== # MAIN #=============================================================================== def main(): # --- Set up thingspeak account --- #Set up inital values for variables thingspeak_write_api_key = '' #Set up thingspeak account thingspeak_acc = thingspeak.ThingspeakAcc(s.THINGSPEAK_HOST_ADDR, s.THINGSPEAK_API_KEY_FILENAME, s.THINGSPEAK_CHANNEL_ID) #Create RRD files if none exist if not os.path.exists(s.RRDTOOL_RRD_FILE): return # ========== Timed Loop ========== try: while True: #Fetch values from rrd data_values = rrdtool.fetch(s.RRDTOOL_RRD_FILE, 'LAST', '-s', str(s.UPDATE_RATE * -2)) # --- Send data to thingspeak --- #Create dictionary with field as key and value sensor_data = {} for key, value in sorted(sensors.items(), key=lambda e: e[1][0]): sensor_data[value[s.TS_FIELD]] = value[s.VALUE] response = thingspeak_acc.update_channel(sensor_data) # ========== User exit command ========== except KeyboardInterrupt: sys.exit(0) #=============================================================================== # Boiler plate #=============================================================================== if __name__=='__main__': main()
mit
Python
b20a6ccc211060644ff3e6f89428420fa59f5a5d
add a couple of tests for the build_scripts command
pypa/setuptools,pypa/setuptools,pypa/setuptools
tests/test_build_scripts.py
tests/test_build_scripts.py
"""Tests for distutils.command.build_scripts.""" import os import unittest from distutils.command.build_scripts import build_scripts from distutils.core import Distribution from distutils.tests import support class BuildScriptsTestCase(support.TempdirManager, unittest.TestCase): def test_default_settings(self): cmd = self.get_build_scripts_cmd("/foo/bar", []) self.assert_(not cmd.force) self.assert_(cmd.build_dir is None) cmd.finalize_options() self.assert_(cmd.force) self.assertEqual(cmd.build_dir, "/foo/bar") def test_build(self): source = self.mkdtemp() target = self.mkdtemp() expected = self.write_sample_scripts(source) cmd = self.get_build_scripts_cmd(target, [os.path.join(source, fn) for fn in expected]) cmd.finalize_options() cmd.run() built = os.listdir(target) for name in expected: self.assert_(name in built) def get_build_scripts_cmd(self, target, scripts): dist = Distribution() dist.scripts = scripts dist.command_obj["build"] = support.DummyCommand( build_scripts=target, force=1 ) return build_scripts(dist) def write_sample_scripts(self, dir): expected = [] expected.append("script1.py") self.write_script(dir, "script1.py", ("#! /usr/bin/env python2.3\n" "# bogus script w/ Python sh-bang\n" "pass\n")) expected.append("script2.py") self.write_script(dir, "script2.py", ("#!/usr/bin/python\n" "# bogus script w/ Python sh-bang\n" "pass\n")) expected.append("shell.sh") self.write_script(dir, "shell.sh", ("#!/bin/sh\n" "# bogus shell script w/ sh-bang\n" "exit 0\n")) return expected def write_script(self, dir, name, text): f = open(os.path.join(dir, name), "w") f.write(text) f.close() def test_suite(): return unittest.makeSuite(BuildScriptsTestCase)
mit
Python
3cf30bac4d20dbebf6185351ba0c10426a489de9
Add sanity linter to catch future use
Vizerai/grpc,jboeuf/grpc,vjpai/grpc,carl-mastrangelo/grpc,carl-mastrangelo/grpc,ncteisen/grpc,grpc/grpc,dgquintas/grpc,chrisdunelm/grpc,ctiller/grpc,nicolasnoble/grpc,jtattermusch/grpc,mehrdada/grpc,sreecha/grpc,chrisdunelm/grpc,firebase/grpc,ncteisen/grpc,jboeuf/grpc,jboeuf/grpc,jboeuf/grpc,pszemus/grpc,thinkerou/grpc,nicolasnoble/grpc,sreecha/grpc,chrisdunelm/grpc,muxi/grpc,firebase/grpc,muxi/grpc,nicolasnoble/grpc,chrisdunelm/grpc,jtattermusch/grpc,grpc/grpc,thinkerou/grpc,firebase/grpc,ejona86/grpc,nicolasnoble/grpc,jboeuf/grpc,jtattermusch/grpc,thinkerou/grpc,firebase/grpc,grpc/grpc,muxi/grpc,pszemus/grpc,donnadionne/grpc,pszemus/grpc,donnadionne/grpc,mehrdada/grpc,jtattermusch/grpc,vjpai/grpc,sreecha/grpc,nicolasnoble/grpc,stanley-cheung/grpc,muxi/grpc,grpc/grpc,muxi/grpc,sreecha/grpc,stanley-cheung/grpc,donnadionne/grpc,jtattermusch/grpc,nicolasnoble/grpc,sreecha/grpc,carl-mastrangelo/grpc,carl-mastrangelo/grpc,dgquintas/grpc,Vizerai/grpc,ejona86/grpc,firebase/grpc,pszemus/grpc,mehrdada/grpc,Vizerai/grpc,pszemus/grpc,vjpai/grpc,muxi/grpc,pszemus/grpc,muxi/grpc,vjpai/grpc,mehrdada/grpc,sreecha/grpc,sreecha/grpc,Vizerai/grpc,firebase/grpc,dgquintas/grpc,pszemus/grpc,vjpai/grpc,ejona86/grpc,ejona86/grpc,nicolasnoble/grpc,dgquintas/grpc,jboeuf/grpc,jtattermusch/grpc,thinkerou/grpc,ctiller/grpc,firebase/grpc,sreecha/grpc,dgquintas/grpc,jboeuf/grpc,ncteisen/grpc,thinkerou/grpc,Vizerai/grpc,muxi/grpc,pszemus/grpc,Vizerai/grpc,thinkerou/grpc,nicolasnoble/grpc,grpc/grpc,sreecha/grpc,ctiller/grpc,jtattermusch/grpc,stanley-cheung/grpc,mehrdada/grpc,donnadionne/grpc,vjpai/grpc,nicolasnoble/grpc,ctiller/grpc,chrisdunelm/grpc,Vizerai/grpc,chrisdunelm/grpc,carl-mastrangelo/grpc,stanley-cheung/grpc,jtattermusch/grpc,ncteisen/grpc,grpc/grpc,carl-mastrangelo/grpc,pszemus/grpc,mehrdada/grpc,stanley-cheung/grpc,jtattermusch/grpc,dgquintas/grpc,pszemus/grpc,chrisdunelm/grpc,ctiller/grpc,donnadionne/grpc,ejona86/grpc,dgquintas/grpc,firebase/grpc,Vizerai/grpc,jboeuf/grpc,Vizerai/grpc,grpc/grpc,sreecha/grpc,nicolasnoble/grpc,jtattermusch/grpc,jboeuf/grpc,thinkerou/grpc,ejona86/grpc,jtattermusch/grpc,ncteisen/grpc,ejona86/grpc,jboeuf/grpc,carl-mastrangelo/grpc,firebase/grpc,donnadionne/grpc,stanley-cheung/grpc,grpc/grpc,ejona86/grpc,donnadionne/grpc,donnadionne/grpc,vjpai/grpc,mehrdada/grpc,stanley-cheung/grpc,carl-mastrangelo/grpc,Vizerai/grpc,vjpai/grpc,grpc/grpc,ejona86/grpc,sreecha/grpc,donnadionne/grpc,mehrdada/grpc,ejona86/grpc,stanley-cheung/grpc,stanley-cheung/grpc,ctiller/grpc,mehrdada/grpc,stanley-cheung/grpc,ejona86/grpc,muxi/grpc,ncteisen/grpc,thinkerou/grpc,firebase/grpc,stanley-cheung/grpc,mehrdada/grpc,ncteisen/grpc,dgquintas/grpc,ncteisen/grpc,chrisdunelm/grpc,carl-mastrangelo/grpc,mehrdada/grpc,chrisdunelm/grpc,sreecha/grpc,jtattermusch/grpc,chrisdunelm/grpc,pszemus/grpc,stanley-cheung/grpc,Vizerai/grpc,donnadionne/grpc,mehrdada/grpc,grpc/grpc,carl-mastrangelo/grpc,thinkerou/grpc,grpc/grpc,ctiller/grpc,dgquintas/grpc,firebase/grpc,ctiller/grpc,muxi/grpc,carl-mastrangelo/grpc,vjpai/grpc,donnadionne/grpc,jboeuf/grpc,dgquintas/grpc,vjpai/grpc,carl-mastrangelo/grpc,jboeuf/grpc,ncteisen/grpc,ejona86/grpc,nicolasnoble/grpc,vjpai/grpc,ctiller/grpc,thinkerou/grpc,vjpai/grpc,dgquintas/grpc,pszemus/grpc,nicolasnoble/grpc,thinkerou/grpc,thinkerou/grpc,ncteisen/grpc,firebase/grpc,ncteisen/grpc,ctiller/grpc,ncteisen/grpc,chrisdunelm/grpc,ctiller/grpc,muxi/grpc,muxi/grpc,donnadionne/grpc,ctiller/grpc,grpc/grpc
tools/run_tests/sanity/check_channel_arg_usage.py
tools/run_tests/sanity/check_channel_arg_usage.py
#!/usr/bin/env python # Copyright 2018 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from __future__ import print_function import os import sys os.chdir(os.path.join(os.path.dirname(sys.argv[0]), '../../..')) # set of files that are allowed to use the raw GRPC_ARG_* types _EXCEPTIONS = set([ 'src/core/lib/channel/channel_args.cc', 'src/core/lib/channel/channel_args.h', ]) _BANNED = set([ "GRPC_ARG_POINTER", ]) errors = 0 num_files = 0 for root, dirs, files in os.walk('src/core'): for filename in files: num_files += 1 path = os.path.join(root, filename) if path in _EXCEPTIONS: continue with open(path) as f: text = f.read() for banned in _BANNED: if banned in text: print('Illegal use of "%s" in %s' % (banned, path)) errors += 1 assert errors == 0 # This check comes about from this issue: # https://github.com/grpc/grpc/issues/15381 # Basically, a change rendered this script useless and we did not realize it. # This dumb check ensures that this type of issue doesn't occur again. assert num_files > 300 # we definitely have more than 300 files
apache-2.0
Python
51d0623da276aa60a0da4d48343f215f0c517a29
Add module for ids2vecs
explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,spacy-io/thinc,explosion/thinc
thinc/neural/ids2vecs.py
thinc/neural/ids2vecs.py
from ._classes.window_encode import MaxoutWindowEncode
mit
Python
ada91bd1ed76d59b7ec41d765af188aed2f8fd62
add a module for collecting Warnings
michaellaier/pymor,michaellaier/pymor,michaellaier/pymor,michaellaier/pymor
src/pymor/core/warnings.py
src/pymor/core/warnings.py
''' Created on Nov 19, 2012 @author: r_milk01 ''' class CallOrderWarning(UserWarning): '''I am raised when there's a preferred call order, but the user didn't follow it. For an Example see pymor.discretizer.stationary.elliptic.cg ''' pass
bsd-2-clause
Python
03c1f7040cc971c6e05f79f537fc501c550edaa8
Add back manage.py (doh).
CTPUG/pyconza2014,CTPUG/pyconza2014,CTPUG/pyconza2014
manage.py
manage.py
#!/usr/bin/env python import os import sys if __name__ == "__main__": conf = os.path.dirname(__file__) wafer = os.path.join(conf, '..', 'wafer') sys.path.append(wafer) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
mit
Python
0b88d652ddb23a385e79bfccb1db89c954d7d27f
Set up Restaurant class
JustineKay/psychic-octo-carnival
get_a_lunch_spot.py
get_a_lunch_spot.py
import json restaurants_string = """[{ "name" : "sweetgreen" }]""" print restaurants_string restaurants_json = json.loads(restaurants_string) print restaurants_json class Restaurant: name = "" def __init__(self, data): self.name = self.getName(data) def getName(self, data): for i in data: return i['name'] restaurant_response = Restaurant(restaurants_json) print restaurant_response.name class GetALunchSpotResponse: restaurant = None def _init_(self, intent): self.restaurant = self.restaurants[0] def generateStringResponse(): return "Why don't you go to: " + restaurant.name
mit
Python
6757f4b74f29142b0be7e32b8bdf210d109056ea
Create missing.py
abhishekg2389/youtube-8m-challenge
missing.py
missing.py
import tensorflow as tf import glob as glob import getopt import sys import cPickle as pkl import numpy as np opts, _ = getopt.getopt(sys.argv[1:],"",["chunk_file_path=", "comp_file_path=", "means_file_path=", "output_dir=", "input_dir="]) chunk_file_path = "../video_level_feat_v1/train*.tfrecord" comp_file_path = "../video_level_feat_v1/train*.tfrecord" means_file_path = "../video_level_feat_v1/means.pkl" output_dir = "../video_level_feat_v1/" input_dir = "../video_level_feat_v1/" print(opts) for opt, arg in opts: if opt in ("--chunk_file_path"): chunk_file_path = arg if opt in ("--comp_file_path"): comp_file_path = arg if opt in ("--means_file_path"): means_file_path = arg if opt in ("--output_dir"): output_dir = arg if opt in ("--input_dir"): input_dir = arg # filepaths to do f = file(chunk_file_path, 'rb') records_chunk = pkl.load(f) f.close() # means f = open(means_file_path, 'rb') means = pkl.load(f) f.close() filepaths = [input_dir+x for x in records_chunk] filepaths_queue = tf.train.string_input_producer(filepaths, num_epochs=1) reader = tf.TFRecordReader() _, serialized_example = reader.read(filepaths_queue) features_format = {} feature_names = [] for x in ['q0', 'q1', 'q2', 'q3', 'q4', 'mean', 'stddv', 'skew', 'kurt', 'iqr', 'rng', 'coeffvar', 'efficiency']: features_format[x + '_rgb_frame'] = tf.FixedLenFeature([1024], tf.float32) features_format[x + '_audio_frame'] = tf.FixedLenFeature([128], tf.float32) feature_names.append(str(x + '_rgb_frame')) feature_names.append(str(x + '_audio_frame')) features_format['video_id'] = tf.FixedLenFeature([], tf.string) features_format['labels'] = tf.VarLenFeature(tf.int64) features_format['video_length'] = tf.FixedLenFeature([], tf.float32) features = tf.parse_single_example(serialized_example,features=features_format) start_time = time.time() for record in records_chunk: # filepaths done f = file(comp_file_path, 'rb') records_comp = pkl.load(f) f.close() if record in records_comp: print(record + ' : Skipped') print(len(records_comp)/float(len(records_chunk))) continue new_filepath = output_dir+record writer = tf.python_io.TFRecordWriter(new_filepath) with tf.Session() as sess: init_op = tf.group(tf.global_variables_initializer(),tf.local_variables_initializer()) sess.run(init_op) coord = tf.train.Coordinator() threads = tf.train.start_queue_runners(coord=coord) counter = 0 try: while True: features_proc, = sess.run([features]) counter += 1 for feature_name in feature_names: if np.isnan(proc_features[feature_name]).sum() > 0: proc_features[feature_name][np.isnan(proc_features[feature_name])] = means[feature_name][np.isnan(proc_features[feature_name])] elif np.isinf(proc_features[feature_name]).sum() > 0: proc_features[feature_name][np.isinf(proc_features[feature_name])] = means[feature_name][np.isinf(proc_features[feature_name])] # writing tfrecord v1 features_to_write = {key : value for key, value in features.items()} features_to_write['video_id'] = [video_id] features_to_write['video_length'] = [video_length] features_to_write['labels'] = labels.values tf_features_format = {} for key, value in features_to_write.items(): if key == 'video_id': tf_features_format[key] = tf.train.Feature(bytes_list=tf.train.BytesList(value=value)) elif key == 'labels': tf_features_format[key] = tf.train.Feature(int64_list=tf.train.Int64List(value=value)) else: tf_features_format[key] = tf.train.Feature(float_list=tf.train.FloatList(value=value)) example = tf.train.Example(features=tf.train.Features(feature=tf_features_format)) writer.write(example.SerializeToString()) if(counter%100000 == 1): print(counter) except tf.errors.OutOfRangeError, e: coord.request_stop(e) finally: coord.request_stop() coord.join(threads) print(record + ' : Done') records_comp[filepath] = 1 print(len(records_comp)/float(len(records_chunk))) f = file(comp_file_path, 'wb') pkl.dump(records_comp, f, protocol=pkl.HIGHEST_PROTOCOL) f.close() # writing tfrecord v1 writer.close() print(time.time() - start_time)
mit
Python
23e778c78c2d77a9eeb0904856429546e379f8b5
change the version of openerp
mkieszek/odoo,Ernesto99/odoo,SerpentCS/odoo,savoirfairelinux/odoo,juanalfonsopr/odoo,avoinsystems/odoo,elmerdpadilla/iv,addition-it-solutions/project-all,provaleks/o8,klunwebale/odoo,lsinfo/odoo,odooindia/odoo,ThinkOpen-Solutions/odoo,lgscofield/odoo,Drooids/odoo,rowemoore/odoo,fjbatresv/odoo,hanicker/odoo,Nowheresly/odoo,hassoon3/odoo,sv-dev1/odoo,SAM-IT-SA/odoo,stephen144/odoo,hanicker/odoo,xzYue/odoo,hifly/OpenUpgrade,odoousers2014/odoo,juanalfonsopr/odoo,fdvarela/odoo8,shaufi10/odoo,Endika/OpenUpgrade,ccomb/OpenUpgrade,apocalypsebg/odoo,dsfsdgsbngfggb/odoo,makinacorpus/odoo,JCA-Developpement/Odoo,markeTIC/OCB,cedk/odoo,hip-odoo/odoo,ApuliaSoftware/odoo,papouso/odoo,prospwro/odoo,jesramirez/odoo,aviciimaxwell/odoo,Kilhog/odoo,credativUK/OCB,VitalPet/odoo,codekaki/odoo,Danisan/odoo-1,Eric-Zhong/odoo,JGarcia-Panach/odoo,jesramirez/odoo,QianBIG/odoo,leoliujie/odoo,ojengwa/odoo,Noviat/odoo,JGarcia-Panach/odoo,jolevq/odoopub,n0m4dz/odoo,jpshort/odoo,savoirfairelinux/odoo,vrenaville/ngo-addons-backport,gvb/odoo,TRESCLOUD/odoopub,charbeljc/OCB,luistorresm/odoo,jpshort/odoo,Bachaco-ve/odoo,alhashash/odoo,nuncjo/odoo,dariemp/odoo,fossoult/odoo,nitinitprof/odoo,gorjuce/odoo,Noviat/odoo,rahuldhote/odoo,poljeff/odoo,feroda/odoo,0k/odoo,mlaitinen/odoo,lsinfo/odoo,odoo-turkiye/odoo,bplancher/odoo,shivam1111/odoo,funkring/fdoo,ramitalat/odoo,salaria/odoo,leoliujie/odoo,sadleader/odoo,CubicERP/odoo,omprakasha/odoo,spadae22/odoo,CopeX/odoo,savoirfairelinux/odoo,blaggacao/OpenUpgrade,markeTIC/OCB,alqfahad/odoo,slevenhagen/odoo-npg,AuyaJackie/odoo,fgesora/odoo,ramadhane/odoo,steedos/odoo,cloud9UG/odoo,dgzurita/odoo,damdam-s/OpenUpgrade,mvaled/OpenUpgrade,n0m4dz/odoo,lombritz/odoo,gsmartway/odoo,x111ong/odoo,ovnicraft/odoo,syci/OCB,florian-dacosta/OpenUpgrade,ujjwalwahi/odoo,oihane/odoo,makinacorpus/odoo,alhashash/odoo,markeTIC/OCB,leorochael/odoo,hmen89/odoo,Elico-Corp/odoo_OCB,simongoffin/website_version,GauravSahu/odoo,NeovaHealth/odoo,frouty/odoogoeen,ingadhoc/odoo,bobisme/odoo,GauravSahu/odoo,NL66278/OCB,prospwro/odoo,brijeshkesariya/odoo,Daniel-CA/odoo,apanju/GMIO_Odoo,jiachenning/odoo,shingonoide/odoo,javierTerry/odoo,tinkhaven-organization/odoo,fossoult/odoo,sergio-incaser/odoo,Drooids/odoo,charbeljc/OCB,shivam1111/odoo,Gitlab11/odoo,alqfahad/odoo,grap/OpenUpgrade,fuhongliang/odoo,cysnake4713/odoo,alexcuellar/odoo,hoatle/odoo,ovnicraft/odoo,erkrishna9/odoo,abdellatifkarroum/odoo,leoliujie/odoo,sinbazhou/odoo,JonathanStein/odoo,dezynetechnologies/odoo,sve-odoo/odoo,OpenUpgrade/OpenUpgrade,podemos-info/odoo,dezynetechnologies/odoo,cloud9UG/odoo,funkring/fdoo,grap/OCB,jfpla/odoo,guerrerocarlos/odoo,mkieszek/odoo,KontorConsulting/odoo,jaxkodex/odoo,collex100/odoo,bkirui/odoo,bealdav/OpenUpgrade,Antiun/odoo,alexteodor/odoo,ramadhane/odoo,datenbetrieb/odoo,incaser/odoo-odoo,osvalr/odoo,omprakasha/odoo,draugiskisprendimai/odoo,fossoult/odoo,codekaki/odoo,nexiles/odoo,feroda/odoo,vrenaville/ngo-addons-backport,windedge/odoo,christophlsa/odoo,florentx/OpenUpgrade,cpyou/odoo,bguillot/OpenUpgrade,bguillot/OpenUpgrade,virgree/odoo,ecosoft-odoo/odoo,grap/OpenUpgrade,dalegregory/odoo,gvb/odoo,fuhongliang/odoo,minhtuancn/odoo,OpenPymeMx/OCB,mmbtba/odoo,leoliujie/odoo,janocat/odoo,shaufi/odoo,numerigraphe/odoo,hoatle/odoo,PongPi/isl-odoo,nhomar/odoo-mirror,jolevq/odoopub,n0m4dz/odoo,sebalix/OpenUpgrade,kybriainfotech/iSocioCRM,zchking/odoo,cedk/odoo,papouso/odoo,tarzan0820/odoo,osvalr/odoo,lombritz/odoo,alexcuellar/odoo,rdeheele/odoo,wangjun/odoo,joariasl/odoo,bakhtout/odoo-educ,podemos-info/odoo,nexiles/odoo,deKupini/erp,jiangzhixiao/odoo,ecosoft-odoo/odoo,deKupini/erp,hubsaysnuaa/odoo,JGarcia-Panach/odoo,lgscofield/odoo,luistorresm/odoo,highco-groupe/odoo,jpshort/odoo,lightcn/odoo,jesramirez/odoo,ecosoft-odoo/odoo,OpenPymeMx/OCB,Danisan/odoo-1,VitalPet/odoo,kifcaliph/odoo,rahuldhote/odoo,dezynetechnologies/odoo,agrista/odoo-saas,markeTIC/OCB,damdam-s/OpenUpgrade,Antiun/odoo,cpyou/odoo,aviciimaxwell/odoo,BT-fgarbely/odoo,bakhtout/odoo-educ,laslabs/odoo,cloud9UG/odoo,rubencabrera/odoo,alqfahad/odoo,hopeall/odoo,abstract-open-solutions/OCB,JGarcia-Panach/odoo,hifly/OpenUpgrade,jaxkodex/odoo,mvaled/OpenUpgrade,ccomb/OpenUpgrade,sve-odoo/odoo,csrocha/OpenUpgrade,SerpentCS/odoo,dkubiak789/odoo,shaufi10/odoo,optima-ict/odoo,OpenUpgrade-dev/OpenUpgrade,chiragjogi/odoo,stonegithubs/odoo,demon-ru/iml-crm,syci/OCB,apocalypsebg/odoo,odooindia/odoo,salaria/odoo,realsaiko/odoo,prospwro/odoo,slevenhagen/odoo-npg,agrista/odoo-saas,luiseduardohdbackup/odoo,hip-odoo/odoo,rubencabrera/odoo,goliveirab/odoo,fjbatresv/odoo,JonathanStein/odoo,RafaelTorrealba/odoo,Adel-Magebinary/odoo,RafaelTorrealba/odoo,ingadhoc/odoo,idncom/odoo,ojengwa/odoo,wangjun/odoo,Endika/OpenUpgrade,acshan/odoo,eino-makitalo/odoo,acshan/odoo,goliveirab/odoo,gdgellatly/OCB1,bguillot/OpenUpgrade,FlorianLudwig/odoo,bobisme/odoo,NL66278/OCB,Antiun/odoo,minhtuancn/odoo,feroda/odoo,hubsaysnuaa/odoo,windedge/odoo,shingonoide/odoo,nuuuboo/odoo,aviciimaxwell/odoo,JonathanStein/odoo,GauravSahu/odoo,ccomb/OpenUpgrade,damdam-s/OpenUpgrade,shaufi/odoo,klunwebale/odoo,blaggacao/OpenUpgrade,slevenhagen/odoo-npg,nuuuboo/odoo,kirca/OpenUpgrade,Endika/odoo,windedge/odoo,ThinkOpen-Solutions/odoo,srsman/odoo,oasiswork/odoo,Endika/odoo,laslabs/odoo,fuselock/odoo,hoatle/odoo,tinkerthaler/odoo,jiachenning/odoo,KontorConsulting/odoo,wangjun/odoo,shaufi/odoo,GauravSahu/odoo,Noviat/odoo,arthru/OpenUpgrade,x111ong/odoo,SerpentCS/odoo,alexteodor/odoo,ehirt/odoo,rdeheele/odoo,Ernesto99/odoo,datenbetrieb/odoo,gvb/odoo,kirca/OpenUpgrade,Noviat/odoo,rschnapka/odoo,funkring/fdoo,patmcb/odoo,sinbazhou/odoo,frouty/odoogoeen,fgesora/odoo,steedos/odoo,datenbetrieb/odoo,Endika/OpenUpgrade,brijeshkesariya/odoo,nhomar/odoo,frouty/odoo_oph,ClearCorp-dev/odoo,Eric-Zhong/odoo,Gitlab11/odoo,charbeljc/OCB,sinbazhou/odoo,jiangzhixiao/odoo,apocalypsebg/odoo,bguillot/OpenUpgrade,grap/OpenUpgrade,optima-ict/odoo,jaxkodex/odoo,provaleks/o8,chiragjogi/odoo,andreparames/odoo,oasiswork/odoo,tangyiyong/odoo,simongoffin/website_version,janocat/odoo,synconics/odoo,feroda/odoo,srimai/odoo,christophlsa/odoo,havt/odoo,hoatle/odoo,jiachenning/odoo,dllsf/odootest,n0m4dz/odoo,rdeheele/odoo,abdellatifkarroum/odoo,bakhtout/odoo-educ,storm-computers/odoo,oasiswork/odoo,0k/OpenUpgrade,storm-computers/odoo,aviciimaxwell/odoo,takis/odoo,hifly/OpenUpgrade,bplancher/odoo,abenzbiria/clients_odoo,incaser/odoo-odoo,grap/OpenUpgrade,factorlibre/OCB,colinnewell/odoo,syci/OCB,andreparames/odoo,guewen/OpenUpgrade,diagramsoftware/odoo,alhashash/odoo,srimai/odoo,goliveirab/odoo,virgree/odoo,SerpentCS/odoo,codekaki/odoo,bakhtout/odoo-educ,grap/OCB,sysadminmatmoz/OCB,naousse/odoo,fjbatresv/odoo,hubsaysnuaa/odoo,srimai/odoo,hoatle/odoo,shaufi/odoo,ramitalat/odoo,colinnewell/odoo,Daniel-CA/odoo,Kilhog/odoo,bplancher/odoo,synconics/odoo,eino-makitalo/odoo,Elico-Corp/odoo_OCB,NeovaHealth/odoo,TRESCLOUD/odoopub,Nick-OpusVL/odoo,fgesora/odoo,odootr/odoo,gavin-feng/odoo,feroda/odoo,dalegregory/odoo,ChanduERP/odoo,numerigraphe/odoo,zchking/odoo,x111ong/odoo,dfang/odoo,frouty/odoogoeen,CatsAndDogsbvba/odoo,BT-astauder/odoo,ehirt/odoo,ApuliaSoftware/odoo,spadae22/odoo,grap/OCB,papouso/odoo,idncom/odoo,JonathanStein/odoo,sadleader/odoo,avoinsystems/odoo,wangjun/odoo,poljeff/odoo,dsfsdgsbngfggb/odoo,acshan/odoo,collex100/odoo,tvibliani/odoo,datenbetrieb/odoo,gdgellatly/OCB1,leorochael/odoo,hbrunn/OpenUpgrade,chiragjogi/odoo,jaxkodex/odoo,nitinitprof/odoo,vnsofthe/odoo,draugiskisprendimai/odoo,Eric-Zhong/odoo,x111ong/odoo,ujjwalwahi/odoo,stonegithubs/odoo,cloud9UG/odoo,jesramirez/odoo,Ichag/odoo,ClearCorp-dev/odoo,pplatek/odoo,Antiun/odoo,dariemp/odoo,sebalix/OpenUpgrade,nitinitprof/odoo,Bachaco-ve/odoo,frouty/odoogoeen,xzYue/odoo,inspyration/odoo,MarcosCommunity/odoo,OpenUpgrade-dev/OpenUpgrade,oliverhr/odoo,pedrobaeza/odoo,odootr/odoo,addition-it-solutions/project-all,ygol/odoo,avoinsystems/odoo,rgeleta/odoo,apocalypsebg/odoo,Antiun/odoo,SAM-IT-SA/odoo,syci/OCB,alexteodor/odoo,rgeleta/odoo,cdrooom/odoo,QianBIG/odoo,ThinkOpen-Solutions/odoo,luistorresm/odoo,havt/odoo,KontorConsulting/odoo,pplatek/odoo,oihane/odoo,BT-rmartin/odoo,CopeX/odoo,arthru/OpenUpgrade,nexiles/odoo,CopeX/odoo,poljeff/odoo,OpenPymeMx/OCB,KontorConsulting/odoo,ShineFan/odoo,savoirfairelinux/odoo,srimai/odoo,rschnapka/odoo,jusdng/odoo,credativUK/OCB,hbrunn/OpenUpgrade,dgzurita/odoo,ShineFan/odoo,christophlsa/odoo,Maspear/odoo,glovebx/odoo,virgree/odoo,waytai/odoo,nagyistoce/odoo-dev-odoo,lombritz/odoo,christophlsa/odoo,FlorianLudwig/odoo,nhomar/odoo-mirror,bkirui/odoo,draugiskisprendimai/odoo,rowemoore/odoo,hanicker/odoo,ihsanudin/odoo,havt/odoo,idncom/odoo,gsmartway/odoo,guewen/OpenUpgrade,omprakasha/odoo,RafaelTorrealba/odoo,slevenhagen/odoo-npg,Codefans-fan/odoo,hanicker/odoo,agrista/odoo-saas,nhomar/odoo,Codefans-fan/odoo,JonathanStein/odoo,lightcn/odoo,Nick-OpusVL/odoo,arthru/OpenUpgrade,tarzan0820/odoo,mkieszek/odoo,klunwebale/odoo,nagyistoce/odoo-dev-odoo,JCA-Developpement/Odoo,AuyaJackie/odoo,collex100/odoo,dezynetechnologies/odoo,stonegithubs/odoo,idncom/odoo,tvibliani/odoo,RafaelTorrealba/odoo,rowemoore/odoo,ujjwalwahi/odoo,apanju/odoo,Adel-Magebinary/odoo,dalegregory/odoo,Danisan/odoo-1,charbeljc/OCB,apanju/odoo,odootr/odoo,gorjuce/odoo,elmerdpadilla/iv,makinacorpus/odoo,patmcb/odoo,lgscofield/odoo,bguillot/OpenUpgrade,nuuuboo/odoo,VielSoft/odoo,hopeall/odoo,sve-odoo/odoo,ubic135/odoo-design,dkubiak789/odoo,BT-rmartin/odoo,camptocamp/ngo-addons-backport,JCA-Developpement/Odoo,damdam-s/OpenUpgrade,Eric-Zhong/odoo,dezynetechnologies/odoo,factorlibre/OCB,BT-astauder/odoo,leorochael/odoo,TRESCLOUD/odoopub,shingonoide/odoo,cdrooom/odoo,Kilhog/odoo,lightcn/odoo,jpshort/odoo,tinkhaven-organization/odoo,jeasoft/odoo,BT-fgarbely/odoo,Ernesto99/odoo,Daniel-CA/odoo,joariasl/odoo,inspyration/odoo,codekaki/odoo,steedos/odoo,shaufi10/odoo,deKupini/erp,x111ong/odoo,xujb/odoo,mustafat/odoo-1,goliveirab/odoo,eino-makitalo/odoo,diagramsoftware/odoo,sinbazhou/odoo,ubic135/odoo-design,virgree/odoo,gorjuce/odoo,fgesora/odoo,srimai/odoo,VitalPet/odoo,windedge/odoo,tvibliani/odoo,christophlsa/odoo,jeasoft/odoo,Noviat/odoo,frouty/odoogoeen,fdvarela/odoo8,fevxie/odoo,chiragjogi/odoo,kifcaliph/odoo,nuncjo/odoo,shaufi10/odoo,laslabs/odoo,ubic135/odoo-design,Endika/OpenUpgrade,synconics/odoo,grap/OCB,eino-makitalo/odoo,sebalix/OpenUpgrade,collex100/odoo,nhomar/odoo-mirror,BT-ojossen/odoo,ovnicraft/odoo,sve-odoo/odoo,QianBIG/odoo,abstract-open-solutions/OCB,frouty/odoo_oph,bobisme/odoo,FlorianLudwig/odoo,abdellatifkarroum/odoo,cedk/odoo,highco-groupe/odoo,hifly/OpenUpgrade,Nowheresly/odoo,Elico-Corp/odoo_OCB,nhomar/odoo-mirror,hanicker/odoo,virgree/odoo,Danisan/odoo-1,odoo-turkiye/odoo,nexiles/odoo,CopeX/odoo,OpenUpgrade/OpenUpgrade,tinkerthaler/odoo,KontorConsulting/odoo,joshuajan/odoo,provaleks/o8,pedrobaeza/OpenUpgrade,BT-ojossen/odoo,rgeleta/odoo,abstract-open-solutions/OCB,kifcaliph/odoo,OpenPymeMx/OCB,mustafat/odoo-1,osvalr/odoo,abenzbiria/clients_odoo,avoinsystems/odoo,oihane/odoo,glovebx/odoo,kittiu/odoo,mustafat/odoo-1,frouty/odoogoeen,luiseduardohdbackup/odoo,csrocha/OpenUpgrade,oihane/odoo,nuuuboo/odoo,jeasoft/odoo,SAM-IT-SA/odoo,ingadhoc/odoo,bobisme/odoo,hmen89/odoo,tinkerthaler/odoo,rahuldhote/odoo,poljeff/odoo,apanju/GMIO_Odoo,hassoon3/odoo,florentx/OpenUpgrade,gavin-feng/odoo,ChanduERP/odoo,kybriainfotech/iSocioCRM,Noviat/odoo,savoirfairelinux/OpenUpgrade,takis/odoo,pedrobaeza/odoo,glovebx/odoo,naousse/odoo,apocalypsebg/odoo,rahuldhote/odoo,tinkhaven-organization/odoo,makinacorpus/odoo,credativUK/OCB,nitinitprof/odoo,x111ong/odoo,ShineFan/odoo,bwrsandman/OpenUpgrade,factorlibre/OCB,credativUK/OCB,jiangzhixiao/odoo,podemos-info/odoo,Codefans-fan/odoo,sv-dev1/odoo,oasiswork/odoo,0k/odoo,vrenaville/ngo-addons-backport,rdeheele/odoo,shivam1111/odoo,goliveirab/odoo,Nick-OpusVL/odoo,massot/odoo,RafaelTorrealba/odoo,omprakasha/odoo,realsaiko/odoo,grap/OCB,podemos-info/odoo,microcom/odoo,jiangzhixiao/odoo,hubsaysnuaa/odoo,bwrsandman/OpenUpgrade,nagyistoce/odoo-dev-odoo,omprakasha/odoo,alhashash/odoo,ihsanudin/odoo,zchking/odoo,bplancher/odoo,tarzan0820/odoo,bkirui/odoo,optima-ict/odoo,jusdng/odoo,optima-ict/odoo,Ichag/odoo,apanju/GMIO_Odoo,tinkhaven-organization/odoo,hopeall/odoo,abenzbiria/clients_odoo,jolevq/odoopub,Bachaco-ve/odoo,nagyistoce/odoo-dev-odoo,sv-dev1/odoo,bealdav/OpenUpgrade,brijeshkesariya/odoo,n0m4dz/odoo,naousse/odoo,0k/odoo,tarzan0820/odoo,hanicker/odoo,mlaitinen/odoo,pedrobaeza/OpenUpgrade,steedos/odoo,mmbtba/odoo,Elico-Corp/odoo_OCB,nhomar/odoo-mirror,synconics/odoo,pedrobaeza/odoo,arthru/OpenUpgrade,ygol/odoo,Adel-Magebinary/odoo,abstract-open-solutions/OCB,fdvarela/odoo8,dalegregory/odoo,VitalPet/odoo,0k/odoo,cpyou/odoo,podemos-info/odoo,slevenhagen/odoo,alhashash/odoo,PongPi/isl-odoo,guerrerocarlos/odoo,OpusVL/odoo,colinnewell/odoo,Drooids/odoo,charbeljc/OCB,havt/odoo,gsmartway/odoo,addition-it-solutions/project-all,srsman/odoo,arthru/OpenUpgrade,GauravSahu/odoo,salaria/odoo,gdgellatly/OCB1,tangyiyong/odoo,bkirui/odoo,tvtsoft/odoo8,xujb/odoo,hopeall/odoo,BT-astauder/odoo,fjbatresv/odoo,nitinitprof/odoo,cedk/odoo,storm-computers/odoo,jaxkodex/odoo,hubsaysnuaa/odoo,wangjun/odoo,srsman/odoo,erkrishna9/odoo,osvalr/odoo,goliveirab/odoo,rschnapka/odoo,OpenUpgrade-dev/OpenUpgrade,agrista/odoo-saas,fevxie/odoo,Elico-Corp/odoo_OCB,srimai/odoo,luiseduardohdbackup/odoo,nexiles/odoo,ygol/odoo,jeasoft/odoo,guewen/OpenUpgrade,rubencabrera/odoo,frouty/odoogoeen,waytai/odoo,apanju/odoo,Nick-OpusVL/odoo,naousse/odoo,jfpla/odoo,factorlibre/OCB,markeTIC/OCB,dalegregory/odoo,windedge/odoo,klunwebale/odoo,sve-odoo/odoo,codekaki/odoo,mvaled/OpenUpgrade,x111ong/odoo,guewen/OpenUpgrade,Gitlab11/odoo,slevenhagen/odoo,tvibliani/odoo,numerigraphe/odoo,jusdng/odoo,luiseduardohdbackup/odoo,inspyration/odoo,ihsanudin/odoo,sadleader/odoo,mszewczy/odoo,nuncjo/odoo,gsmartway/odoo,ramitalat/odoo,csrocha/OpenUpgrade,bwrsandman/OpenUpgrade,ccomb/OpenUpgrade,dezynetechnologies/odoo,bealdav/OpenUpgrade,gdgellatly/OCB1,sysadminmatmoz/OCB,Danisan/odoo-1,lgscofield/odoo,deKupini/erp,cdrooom/odoo,realsaiko/odoo,mustafat/odoo-1,fjbatresv/odoo,csrocha/OpenUpgrade,incaser/odoo-odoo,Grirrane/odoo,lightcn/odoo,jolevq/odoopub,storm-computers/odoo,diagramsoftware/odoo,ThinkOpen-Solutions/odoo,Adel-Magebinary/odoo,Kilhog/odoo,nexiles/odoo,Danisan/odoo-1,dgzurita/odoo,sysadminmatmoz/OCB,VielSoft/odoo,ovnicraft/odoo,factorlibre/OCB,collex100/odoo,rahuldhote/odoo,NeovaHealth/odoo,goliveirab/odoo,Endika/OpenUpgrade,OpusVL/odoo,ojengwa/odoo,tinkhaven-organization/odoo,odoousers2014/odoo,ChanduERP/odoo,gvb/odoo,florentx/OpenUpgrade,minhtuancn/odoo,thanhacun/odoo,eino-makitalo/odoo,codekaki/odoo,optima-ict/odoo,podemos-info/odoo,takis/odoo,vnsofthe/odoo,poljeff/odoo,bobisme/odoo,OpenUpgrade-dev/OpenUpgrade,tinkerthaler/odoo,bakhtout/odoo-educ,hassoon3/odoo,shaufi10/odoo,hubsaysnuaa/odoo,bguillot/OpenUpgrade,prospwro/odoo,acshan/odoo,Maspear/odoo,Drooids/odoo,CatsAndDogsbvba/odoo,abstract-open-solutions/OCB,0k/OpenUpgrade,jusdng/odoo,hbrunn/OpenUpgrade,javierTerry/odoo,OpenPymeMx/OCB,takis/odoo,ojengwa/odoo,minhtuancn/odoo,slevenhagen/odoo-npg,salaria/odoo,stonegithubs/odoo,addition-it-solutions/project-all,camptocamp/ngo-addons-backport,camptocamp/ngo-addons-backport,leoliujie/odoo,dllsf/odootest,kirca/OpenUpgrade,realsaiko/odoo,mszewczy/odoo,NeovaHealth/odoo,osvalr/odoo,rowemoore/odoo,takis/odoo,BT-astauder/odoo,alexcuellar/odoo,OpenUpgrade/OpenUpgrade,alexcuellar/odoo,gdgellatly/OCB1,chiragjogi/odoo,windedge/odoo,dllsf/odootest,n0m4dz/odoo,thanhacun/odoo,tangyiyong/odoo,provaleks/o8,fuselock/odoo,tangyiyong/odoo,camptocamp/ngo-addons-backport,Danisan/odoo-1,dariemp/odoo,nuuuboo/odoo,vnsofthe/odoo,shaufi10/odoo,Ernesto99/odoo,csrocha/OpenUpgrade,JCA-Developpement/Odoo,zchking/odoo,BT-fgarbely/odoo,bplancher/odoo,ujjwalwahi/odoo,sadleader/odoo,storm-computers/odoo,luistorresm/odoo,MarcosCommunity/odoo,SAM-IT-SA/odoo,bealdav/OpenUpgrade,avoinsystems/odoo,CatsAndDogsbvba/odoo,BT-rmartin/odoo,sebalix/OpenUpgrade,shingonoide/odoo,Endika/odoo,OpenUpgrade-dev/OpenUpgrade,pedrobaeza/OpenUpgrade,lightcn/odoo,markeTIC/OCB,odootr/odoo,dariemp/odoo,damdam-s/OpenUpgrade,janocat/odoo,shaufi/odoo,andreparames/odoo,cysnake4713/odoo,MarcosCommunity/odoo,tinkhaven-organization/odoo,Ernesto99/odoo,OpenPymeMx/OCB,FlorianLudwig/odoo,KontorConsulting/odoo,gsmartway/odoo,ihsanudin/odoo,jeasoft/odoo,Grirrane/odoo,odootr/odoo,CopeX/odoo,fossoult/odoo,credativUK/OCB,tvibliani/odoo,VielSoft/odoo,NL66278/OCB,ShineFan/odoo,dsfsdgsbngfggb/odoo,joariasl/odoo,OpusVL/odoo,laslabs/odoo,OpenUpgrade/OpenUpgrade,javierTerry/odoo,jiachenning/odoo,dfang/odoo,hanicker/odoo,ehirt/odoo,BT-rmartin/odoo,florian-dacosta/OpenUpgrade,ubic135/odoo-design,waytai/odoo,blaggacao/OpenUpgrade,hip-odoo/odoo,fjbatresv/odoo,mszewczy/odoo,guerrerocarlos/odoo,mmbtba/odoo,papouso/odoo,lombritz/odoo,nuuuboo/odoo,glovebx/odoo,Gitlab11/odoo,oasiswork/odoo,hifly/OpenUpgrade,vnsofthe/odoo,nuuuboo/odoo,rschnapka/odoo,cysnake4713/odoo,cpyou/odoo,Daniel-CA/odoo,kittiu/odoo,ovnicraft/odoo,lightcn/odoo,poljeff/odoo,synconics/odoo,JonathanStein/odoo,srsman/odoo,BT-rmartin/odoo,ecosoft-odoo/odoo,PongPi/isl-odoo,nitinitprof/odoo,oliverhr/odoo,fuselock/odoo,rubencabrera/odoo,doomsterinc/odoo,apanju/odoo,sv-dev1/odoo,camptocamp/ngo-addons-backport,microcom/odoo,sadleader/odoo,funkring/fdoo,microcom/odoo,erkrishna9/odoo,laslabs/odoo,florian-dacosta/OpenUpgrade,Ichag/odoo,xzYue/odoo,podemos-info/odoo,BT-ojossen/odoo,javierTerry/odoo,BT-fgarbely/odoo,gorjuce/odoo,cloud9UG/odoo,Ichag/odoo,ojengwa/odoo,tinkerthaler/odoo,nagyistoce/odoo-dev-odoo,pplatek/odoo,ovnicraft/odoo,FlorianLudwig/odoo,ShineFan/odoo,factorlibre/OCB,abenzbiria/clients_odoo,grap/OCB,tvibliani/odoo,xzYue/odoo,fossoult/odoo,apanju/GMIO_Odoo,OpenUpgrade/OpenUpgrade,kybriainfotech/iSocioCRM,dfang/odoo,odoo-turkiye/odoo,matrixise/odoo,CubicERP/odoo,Drooids/odoo,minhtuancn/odoo,rubencabrera/odoo,OpenPymeMx/OCB,oasiswork/odoo,stonegithubs/odoo,Ichag/odoo,dkubiak789/odoo,dgzurita/odoo,prospwro/odoo,rschnapka/odoo,alqfahad/odoo,cedk/odoo,apanju/GMIO_Odoo,BT-fgarbely/odoo,sergio-incaser/odoo,ThinkOpen-Solutions/odoo,waytai/odoo,slevenhagen/odoo,mszewczy/odoo,camptocamp/ngo-addons-backport,thanhacun/odoo,ehirt/odoo,fuhongliang/odoo,sv-dev1/odoo,jiachenning/odoo,wangjun/odoo,javierTerry/odoo,dalegregory/odoo,diagramsoftware/odoo,nexiles/odoo,Endika/odoo,MarcosCommunity/odoo,gavin-feng/odoo,doomsterinc/odoo,mszewczy/odoo,draugiskisprendimai/odoo,collex100/odoo,hassoon3/odoo,ygol/odoo,havt/odoo,rubencabrera/odoo,csrocha/OpenUpgrade,OpenUpgrade/OpenUpgrade,sebalix/OpenUpgrade,odoousers2014/odoo,demon-ru/iml-crm,pedrobaeza/OpenUpgrade,eino-makitalo/odoo,0k/OpenUpgrade,nhomar/odoo,hopeall/odoo,ojengwa/odoo,ingadhoc/odoo,simongoffin/website_version,ihsanudin/odoo,bakhtout/odoo-educ,pplatek/odoo,n0m4dz/odoo,tinkerthaler/odoo,nuncjo/odoo,odoousers2014/odoo,glovebx/odoo,aviciimaxwell/odoo,odoousers2014/odoo,ChanduERP/odoo,CatsAndDogsbvba/odoo,odooindia/odoo,jusdng/odoo,salaria/odoo,rdeheele/odoo,acshan/odoo,christophlsa/odoo,KontorConsulting/odoo,JGarcia-Panach/odoo,lsinfo/odoo,dllsf/odootest,Elico-Corp/odoo_OCB,bkirui/odoo,guewen/OpenUpgrade,abdellatifkarroum/odoo,kirca/OpenUpgrade,bwrsandman/OpenUpgrade,Gitlab11/odoo,jeasoft/odoo,rubencabrera/odoo,jeasoft/odoo,nhomar/odoo,bealdav/OpenUpgrade,mszewczy/odoo,oihane/odoo,JGarcia-Panach/odoo,nhomar/odoo,Maspear/odoo,stephen144/odoo,OSSESAC/odoopubarquiluz,xzYue/odoo,apanju/odoo,apanju/GMIO_Odoo,ehirt/odoo,pplatek/odoo,numerigraphe/odoo,joshuajan/odoo,poljeff/odoo,kirca/OpenUpgrade,jfpla/odoo,shaufi10/odoo,ccomb/OpenUpgrade,lsinfo/odoo,gsmartway/odoo,markeTIC/OCB,gavin-feng/odoo,hassoon3/odoo,slevenhagen/odoo-npg,aviciimaxwell/odoo,realsaiko/odoo,agrista/odoo-saas,klunwebale/odoo,kybriainfotech/iSocioCRM,sv-dev1/odoo,nuncjo/odoo,erkrishna9/odoo,thanhacun/odoo,fgesora/odoo,csrocha/OpenUpgrade,leorochael/odoo,massot/odoo,luiseduardohdbackup/odoo,joariasl/odoo,dgzurita/odoo,papouso/odoo,massot/odoo,cloud9UG/odoo,janocat/odoo,tvibliani/odoo,ojengwa/odoo,doomsterinc/odoo,gorjuce/odoo,fuselock/odoo,bwrsandman/OpenUpgrade,hbrunn/OpenUpgrade,gvb/odoo,QianBIG/odoo,stonegithubs/odoo,spadae22/odoo,oihane/odoo,ThinkOpen-Solutions/odoo,MarcosCommunity/odoo,credativUK/OCB,jolevq/odoopub,sinbazhou/odoo,juanalfonsopr/odoo,OSSESAC/odoopubarquiluz,dsfsdgsbngfggb/odoo,srsman/odoo,addition-it-solutions/project-all,OpenPymeMx/OCB,shivam1111/odoo,joariasl/odoo,ramadhane/odoo,PongPi/isl-odoo,vnsofthe/odoo,CatsAndDogsbvba/odoo,JGarcia-Panach/odoo,joshuajan/odoo,ehirt/odoo,oihane/odoo,odootr/odoo,JCA-Developpement/Odoo,vrenaville/ngo-addons-backport,Bachaco-ve/odoo,ramadhane/odoo,vnsofthe/odoo,MarcosCommunity/odoo,feroda/odoo,funkring/fdoo,gavin-feng/odoo,stephen144/odoo,javierTerry/odoo,klunwebale/odoo,incaser/odoo-odoo,ujjwalwahi/odoo,rgeleta/odoo,waytai/odoo,waytai/odoo,jaxkodex/odoo,pedrobaeza/odoo,thanhacun/odoo,microcom/odoo,collex100/odoo,shingonoide/odoo,andreparames/odoo,vrenaville/ngo-addons-backport,frouty/odoo_oph,ihsanudin/odoo,leorochael/odoo,bealdav/OpenUpgrade,fuselock/odoo,jusdng/odoo,abdellatifkarroum/odoo,Kilhog/odoo,idncom/odoo,ClearCorp-dev/odoo,tangyiyong/odoo,alqfahad/odoo,0k/OpenUpgrade,datenbetrieb/odoo,brijeshkesariya/odoo,matrixise/odoo,apanju/odoo,joshuajan/odoo,incaser/odoo-odoo,sergio-incaser/odoo,nagyistoce/odoo-dev-odoo,gavin-feng/odoo,acshan/odoo,lgscofield/odoo,hbrunn/OpenUpgrade,stephen144/odoo,guewen/OpenUpgrade,andreparames/odoo,christophlsa/odoo,NeovaHealth/odoo,apocalypsebg/odoo,dariemp/odoo,jiangzhixiao/odoo,mmbtba/odoo,blaggacao/OpenUpgrade,Endika/OpenUpgrade,oasiswork/odoo,ApuliaSoftware/odoo,mvaled/OpenUpgrade,kifcaliph/odoo,xzYue/odoo,aviciimaxwell/odoo,RafaelTorrealba/odoo,inspyration/odoo,PongPi/isl-odoo,alexcuellar/odoo,ccomb/OpenUpgrade,alqfahad/odoo,oliverhr/odoo,rgeleta/odoo,ramadhane/odoo,stephen144/odoo,savoirfairelinux/OpenUpgrade,xujb/odoo,odoo-turkiye/odoo,jesramirez/odoo,kirca/OpenUpgrade,savoirfairelinux/OpenUpgrade,ccomb/OpenUpgrade,waytai/odoo,grap/OCB,janocat/odoo,glovebx/odoo,Ichag/odoo,glovebx/odoo,doomsterinc/odoo,dezynetechnologies/odoo,vrenaville/ngo-addons-backport,hifly/OpenUpgrade,MarcosCommunity/odoo,spadae22/odoo,mvaled/OpenUpgrade,dgzurita/odoo,salaria/odoo,idncom/odoo,storm-computers/odoo,minhtuancn/odoo,oliverhr/odoo,slevenhagen/odoo-npg,PongPi/isl-odoo,mmbtba/odoo,Nick-OpusVL/odoo,arthru/OpenUpgrade,lgscofield/odoo,frouty/odoo_oph,bwrsandman/OpenUpgrade,colinnewell/odoo,thanhacun/odoo,Endika/odoo,luistorresm/odoo,fuhongliang/odoo,hassoon3/odoo,cpyou/odoo,florentx/OpenUpgrade,dllsf/odootest,AuyaJackie/odoo,shivam1111/odoo,Ichag/odoo,kittiu/odoo,AuyaJackie/odoo,sergio-incaser/odoo,microcom/odoo,Eric-Zhong/odoo,CubicERP/odoo,dalegregory/odoo,ecosoft-odoo/odoo,tvtsoft/odoo8,sysadminmatmoz/OCB,kybriainfotech/iSocioCRM,bplancher/odoo,Grirrane/odoo,VielSoft/odoo,kybriainfotech/iSocioCRM,juanalfonsopr/odoo,havt/odoo,ApuliaSoftware/odoo,grap/OpenUpgrade,0k/OpenUpgrade,hmen89/odoo,OSSESAC/odoopubarquiluz,gsmartway/odoo,gvb/odoo,rowemoore/odoo,Nowheresly/odoo,xujb/odoo,tinkerthaler/odoo,mlaitinen/odoo,charbeljc/OCB,savoirfairelinux/OpenUpgrade,addition-it-solutions/project-all,blaggacao/OpenUpgrade,steedos/odoo,ujjwalwahi/odoo,naousse/odoo,zchking/odoo,bakhtout/odoo-educ,fuhongliang/odoo,provaleks/o8,mustafat/odoo-1,ChanduERP/odoo,osvalr/odoo,srsman/odoo,frouty/odoogoeen,chiragjogi/odoo,funkring/fdoo,syci/OCB,CatsAndDogsbvba/odoo,frouty/odoo_oph,doomsterinc/odoo,deKupini/erp,savoirfairelinux/odoo,apanju/odoo,demon-ru/iml-crm,Grirrane/odoo,guerrerocarlos/odoo,joshuajan/odoo,leorochael/odoo,NL66278/OCB,Adel-Magebinary/odoo,hbrunn/OpenUpgrade,alexcuellar/odoo,mlaitinen/odoo,camptocamp/ngo-addons-backport,guewen/OpenUpgrade,papouso/odoo,rgeleta/odoo,abdellatifkarroum/odoo,spadae22/odoo,florian-dacosta/OpenUpgrade,pedrobaeza/odoo,Antiun/odoo,OpenUpgrade/OpenUpgrade,spadae22/odoo,lgscofield/odoo,pedrobaeza/OpenUpgrade,funkring/fdoo,oliverhr/odoo,Drooids/odoo,jiachenning/odoo,demon-ru/iml-crm,lombritz/odoo,Codefans-fan/odoo,dsfsdgsbngfggb/odoo,damdam-s/OpenUpgrade,ingadhoc/odoo,guerrerocarlos/odoo,vrenaville/ngo-addons-backport,cdrooom/odoo,jfpla/odoo,mmbtba/odoo,pplatek/odoo,mlaitinen/odoo,datenbetrieb/odoo,tinkhaven-organization/odoo,SAM-IT-SA/odoo,grap/OCB,nhomar/odoo,ApuliaSoftware/odoo,sergio-incaser/odoo,mlaitinen/odoo,jiangzhixiao/odoo,AuyaJackie/odoo,joshuajan/odoo,xzYue/odoo,camptocamp/ngo-addons-backport,dkubiak789/odoo,BT-astauder/odoo,windedge/odoo,SAM-IT-SA/odoo,patmcb/odoo,Kilhog/odoo,patmcb/odoo,odoo-turkiye/odoo,cedk/odoo,lombritz/odoo,gdgellatly/OCB1,nuncjo/odoo,matrixise/odoo,provaleks/o8,dfang/odoo,alexteodor/odoo,doomsterinc/odoo,apanju/GMIO_Odoo,OSSESAC/odoopubarquiluz,takis/odoo,numerigraphe/odoo,florentx/OpenUpgrade,steedos/odoo,eino-makitalo/odoo,kittiu/odoo,Noviat/odoo,slevenhagen/odoo,alqfahad/odoo,damdam-s/OpenUpgrade,Maspear/odoo,janocat/odoo,slevenhagen/odoo,Ernesto99/odoo,florentx/OpenUpgrade,brijeshkesariya/odoo,OSSESAC/odoopubarquiluz,mkieszek/odoo,tvtsoft/odoo8,draugiskisprendimai/odoo,incaser/odoo-odoo,gdgellatly/OCB1,VielSoft/odoo,Daniel-CA/odoo,shaufi/odoo,gvb/odoo,savoirfairelinux/OpenUpgrade,fevxie/odoo,makinacorpus/odoo,BT-ojossen/odoo,jiangzhixiao/odoo,hip-odoo/odoo,ramadhane/odoo,Nowheresly/odoo,Gitlab11/odoo,shaufi/odoo,rahuldhote/odoo,ihsanudin/odoo,fevxie/odoo,fgesora/odoo,microcom/odoo,sinbazhou/odoo,ujjwalwahi/odoo,provaleks/o8,javierTerry/odoo,brijeshkesariya/odoo,dsfsdgsbngfggb/odoo,laslabs/odoo,abstract-open-solutions/OCB,diagramsoftware/odoo,sysadminmatmoz/OCB,joariasl/odoo,dariemp/odoo,Bachaco-ve/odoo,colinnewell/odoo,steedos/odoo,gorjuce/odoo,TRESCLOUD/odoopub,rschnapka/odoo,Grirrane/odoo,synconics/odoo,ovnicraft/odoo,alexteodor/odoo,hubsaysnuaa/odoo,salaria/odoo,hifly/OpenUpgrade,numerigraphe/odoo,kifcaliph/odoo,klunwebale/odoo,hoatle/odoo,joariasl/odoo,NeovaHealth/odoo,ygol/odoo,gavin-feng/odoo,ehirt/odoo,sebalix/OpenUpgrade,abstract-open-solutions/OCB,hmen89/odoo,ecosoft-odoo/odoo,ingadhoc/odoo,dfang/odoo,ygol/odoo,ApuliaSoftware/odoo,jusdng/odoo,VitalPet/odoo,synconics/odoo,gdgellatly/OCB1,nitinitprof/odoo,ygol/odoo,ramitalat/odoo,doomsterinc/odoo,Antiun/odoo,mvaled/OpenUpgrade,fevxie/odoo,Codefans-fan/odoo,ShineFan/odoo,Maspear/odoo,draugiskisprendimai/odoo,rahuldhote/odoo,codekaki/odoo,massot/odoo,stonegithubs/odoo,CubicERP/odoo,juanalfonsopr/odoo,lombritz/odoo,BT-ojossen/odoo,bkirui/odoo,Eric-Zhong/odoo,fevxie/odoo,RafaelTorrealba/odoo,factorlibre/OCB,Nowheresly/odoo,numerigraphe/odoo,charbeljc/OCB,jpshort/odoo,Grirrane/odoo,odoo-turkiye/odoo,janocat/odoo,ThinkOpen-Solutions/odoo,VitalPet/odoo,fossoult/odoo,Endika/odoo,makinacorpus/odoo,fdvarela/odoo8,andreparames/odoo,jfpla/odoo,odooindia/odoo,AuyaJackie/odoo,massot/odoo,Nowheresly/odoo,QianBIG/odoo,andreparames/odoo,wangjun/odoo,NL66278/OCB,fuselock/odoo,hip-odoo/odoo,Gitlab11/odoo,srimai/odoo,stephen144/odoo,BT-rmartin/odoo,kittiu/odoo,AuyaJackie/odoo,shingonoide/odoo,matrixise/odoo,optima-ict/odoo,sv-dev1/odoo,bwrsandman/OpenUpgrade,cysnake4713/odoo,jpshort/odoo,matrixise/odoo,dgzurita/odoo,Endika/OpenUpgrade,odoousers2014/odoo,tangyiyong/odoo,srsman/odoo,erkrishna9/odoo,mszewczy/odoo,GauravSahu/odoo,codekaki/odoo,slevenhagen/odoo,tvtsoft/odoo8,Maspear/odoo,elmerdpadilla/iv,jfpla/odoo,BT-ojossen/odoo,savoirfairelinux/OpenUpgrade,lsinfo/odoo,ubic135/odoo-design,GauravSahu/odoo,Endika/odoo,mvaled/OpenUpgrade,patmcb/odoo,lsinfo/odoo,BT-fgarbely/odoo,abdellatifkarroum/odoo,cysnake4713/odoo,jfpla/odoo,CubicERP/odoo,osvalr/odoo,hopeall/odoo,Bachaco-ve/odoo,blaggacao/OpenUpgrade,jpshort/odoo,alhashash/odoo,mlaitinen/odoo,rowemoore/odoo,CopeX/odoo,xujb/odoo,lsinfo/odoo,lightcn/odoo,pedrobaeza/OpenUpgrade,luiseduardohdbackup/odoo,highco-groupe/odoo,Maspear/odoo,rschnapka/odoo,leorochael/odoo,avoinsystems/odoo,cedk/odoo,abenzbiria/clients_odoo,diagramsoftware/odoo,alexcuellar/odoo,sebalix/OpenUpgrade,idncom/odoo,bobisme/odoo,nuncjo/odoo,Daniel-CA/odoo,Bachaco-ve/odoo,hip-odoo/odoo,chiragjogi/odoo,credativUK/OCB,sysadminmatmoz/OCB,dfang/odoo,patmcb/odoo,slevenhagen/odoo,oliverhr/odoo,jeasoft/odoo,Nick-OpusVL/odoo,fgesora/odoo,mmbtba/odoo,dariemp/odoo,luistorresm/odoo,frouty/odoo_oph,minhtuancn/odoo,ingadhoc/odoo,BT-rmartin/odoo,vrenaville/ngo-addons-backport,ChanduERP/odoo,SerpentCS/odoo,pplatek/odoo,ramitalat/odoo,ramadhane/odoo,OpusVL/odoo,dkubiak789/odoo,sinbazhou/odoo,colinnewell/odoo,ClearCorp-dev/odoo,mkieszek/odoo,Kilhog/odoo,VielSoft/odoo,VitalPet/odoo,nagyistoce/odoo-dev-odoo,ecosoft-odoo/odoo,highco-groupe/odoo,pedrobaeza/OpenUpgrade,juanalfonsopr/odoo,bguillot/OpenUpgrade,mustafat/odoo-1,OpenUpgrade-dev/OpenUpgrade,brijeshkesariya/odoo,florian-dacosta/OpenUpgrade,diagramsoftware/odoo,savoirfairelinux/odoo,FlorianLudwig/odoo,Adel-Magebinary/odoo,Nick-OpusVL/odoo,VitalPet/odoo,elmerdpadilla/iv,TRESCLOUD/odoopub,shingonoide/odoo,NeovaHealth/odoo,rowemoore/odoo,leoliujie/odoo,Drooids/odoo,CatsAndDogsbvba/odoo,prospwro/odoo,naousse/odoo,SerpentCS/odoo,demon-ru/iml-crm,apocalypsebg/odoo,acshan/odoo,fdvarela/odoo8,pedrobaeza/odoo,ChanduERP/odoo,fuhongliang/odoo,PongPi/isl-odoo,MarcosCommunity/odoo,QianBIG/odoo,colinnewell/odoo,sysadminmatmoz/OCB,sergio-incaser/odoo,luiseduardohdbackup/odoo,guerrerocarlos/odoo,Adel-Magebinary/odoo,grap/OpenUpgrade,CopeX/odoo,jaxkodex/odoo,bkirui/odoo,tvtsoft/odoo8,tarzan0820/odoo,luistorresm/odoo,0k/OpenUpgrade,CubicERP/odoo,Codefans-fan/odoo,kybriainfotech/iSocioCRM,datenbetrieb/odoo,xujb/odoo,xujb/odoo,draugiskisprendimai/odoo,ClearCorp-dev/odoo,incaser/odoo-odoo,fossoult/odoo,credativUK/OCB,JonathanStein/odoo,blaggacao/OpenUpgrade,rgeleta/odoo,virgree/odoo,ShineFan/odoo,CubicERP/odoo,mustafat/odoo-1,hoatle/odoo,zchking/odoo,spadae22/odoo,prospwro/odoo,BT-ojossen/odoo,SAM-IT-SA/odoo,Daniel-CA/odoo,juanalfonsopr/odoo,Ernesto99/odoo,grap/OpenUpgrade,ramitalat/odoo,SerpentCS/odoo,zchking/odoo,syci/OCB,ApuliaSoftware/odoo,omprakasha/odoo,highco-groupe/odoo,shivam1111/odoo,dkubiak789/odoo,hopeall/odoo,fevxie/odoo,Nowheresly/odoo,VielSoft/odoo,makinacorpus/odoo,oliverhr/odoo,rschnapka/odoo,OSSESAC/odoopubarquiluz,kittiu/odoo,fuselock/odoo,Eric-Zhong/odoo,shivam1111/odoo,mkieszek/odoo,hmen89/odoo,avoinsystems/odoo,bobisme/odoo,cloud9UG/odoo,patmcb/odoo,gorjuce/odoo,dsfsdgsbngfggb/odoo,odoo-turkiye/odoo,thanhacun/odoo,dkubiak789/odoo,vnsofthe/odoo,omprakasha/odoo,leoliujie/odoo,odooindia/odoo,tarzan0820/odoo,simongoffin/website_version,virgree/odoo,elmerdpadilla/iv,havt/odoo,naousse/odoo,takis/odoo,tangyiyong/odoo,0k/odoo,BT-fgarbely/odoo,Codefans-fan/odoo,florian-dacosta/OpenUpgrade,feroda/odoo,kittiu/odoo,tarzan0820/odoo,kirca/OpenUpgrade,fjbatresv/odoo,simongoffin/website_version,tvtsoft/odoo8,papouso/odoo,fuhongliang/odoo,FlorianLudwig/odoo,odootr/odoo,guerrerocarlos/odoo
bin/release.py
bin/release.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2004-2008 Tiny SPRL (http://tiny.be) All Rights Reserved. # # $Id$ # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # consequences resulting from its eventual inadequacies and bugs # End users who are looking for a ready-to-use solution with commercial # garantees and support are strongly adviced to contract a Free Software # Service Company # # 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 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ############################################################################### name = 'openerp-server' version = '4.3.99' description = 'OpenERP Server' long_desc = '''\ OpenERP is a complete ERP and CRM. The main features are accounting (analytic and financial), stock management, sales and purchases management, tasks automation, marketing campaigns, help desk, POS, etc. Technical features include a distributed server, flexible workflows, an object database, a dynamic GUI, customizable reports, and SOAP and XML-RPC interfaces. ''' classifiers = """\ Development Status :: 5 - Production/Stable License :: OSI Approved :: GNU General Public License Version 2 (GPL-2) Programming Language :: Python """ url = 'http://www.openerp.com' author = 'Tiny.be' author_email = 'info@tiny.be' license = 'GPL-2' # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
#!/usr/bin/env python # -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2004-2008 Tiny SPRL (http://tiny.be) All Rights Reserved. # # $Id$ # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # consequences resulting from its eventual inadequacies and bugs # End users who are looking for a ready-to-use solution with commercial # garantees and support are strongly adviced to contract a Free Software # Service Company # # 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 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ############################################################################### name = 'openerp-server' version = '4.3.0' description = 'OpenERP Server' long_desc = '''\ OpenERP is a complete ERP and CRM. The main features are accounting (analytic and financial), stock management, sales and purchases management, tasks automation, marketing campaigns, help desk, POS, etc. Technical features include a distributed server, flexible workflows, an object database, a dynamic GUI, customizable reports, and SOAP and XML-RPC interfaces. ''' classifiers = """\ Development Status :: 5 - Production/Stable License :: OSI Approved :: GNU General Public License Version 2 (GPL-2) Programming Language :: Python """ url = 'http://www.openerp.com' author = 'Tiny.be' author_email = 'info@tiny.be' license = 'GPL-2' # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
agpl-3.0
Python
23257c56b58c26694773fb12d3ba167de43bd43b
Add validate.py tool
hkjn/hkjninfra,hkjn/hkjninfra,hkjn/hkjninfra
validate.py
validate.py
import json import sys import urllib2 data=json.loads(open("bootstrap/{}.json".format(sys.argv[1])).read()) for f in data['storage']['files']: if 'source' not in f['contents'] or 'http' not in f['contents']['source']: continue url = f['contents']['source'] digest = f['contents']['verification']['hash'].lstrip('sha512-') print('{} {}'.format(url, digest)) print('Fetching {}..'.format(url)) response = urllib2.urlopen(url) html = response.read() with open('/tmp/{}'.format(digest), 'w+') as tmpfile: tmpfile.write(html) print('Wrote /tmp/{}'.format(digest)) # if 'source', fetch and compare with 'verification'['hash']
mit
Python
dd1c49eb12bf69580a8727353aa19741059df6d5
add 102
EdisonAlgorithms/ProjectEuler,EdisonAlgorithms/ProjectEuler,zeyuanxy/project-euler,zeyuanxy/project-euler,EdisonAlgorithms/ProjectEuler,zeyuanxy/project-euler,zeyuanxy/project-euler,EdisonAlgorithms/ProjectEuler
vol3/102.py
vol3/102.py
import urllib2 if __name__ == "__main__": ans = 0 for line in urllib2.urlopen('https://projecteuler.net/project/resources/p102_triangles.txt'): ax, ay, bx, by, cx, cy = map(int, line.split(',')) a = ax * by - ay * bx > 0 b = bx * cy - by * cx > 0 c = cx * ay - cy * ax > 0 ans += a == b == c print ans
mit
Python
feac5a01059a95910c76a0de5f83ad2473cf09c8
Create app.py
kuldeepdadhich/fin
app.py
app.py
import os import sys import tweepy import requests import numpy as np import json import os from __future__ import print_function from future.standard_library import install_aliases install_aliases() from urllib.parse import urlparse, urlencode from urllib.request import urlopen, Request from urllib.error import HTTPError from flask import Flask from flask import request from flask import make_response # Flask app should start in global layout app = Flask(__name__) from keras.models import Sequential from keras.layers import Dense from textblob import TextBlob # Where the csv file will live FILE_NAME = 'historical.csv' @app.route('/webhook', methods=['POST']) def webhook(): req = request.get_json(silent=True, force=True) print("Request:") print(json.dumps(req, indent=4)) res = processRequest(req) res = json.dumps(res, indent=4) # print(res) r = make_response(res) r.headers['Content-Type'] = 'application/json' return r def processRequest(req): quote=req.get("result").get("parameters").get("STOCK") get_historical(quote) res = stock_prediction() return res def get_historical(quote): # Download our file from google finance url = 'http://www.google.com/finance/historical?q=NASDAQ%3A'+quote+'&output=csv' r = requests.get(url, stream=True) if r.status_code != 400: with open(FILE_NAME, 'wb') as f: for chunk in r: f.write(chunk) return True def stock_prediction(): # Collect data points from csv dataset = [] with open(FILE_NAME) as f: for n, line in enumerate(f): if n != 0: dataset.append(float(line.split(',')[1])) dataset = np.array(dataset) # Create dataset matrix (X=t and Y=t+1) def create_dataset(dataset): dataX = [dataset[n+1] for n in range(len(dataset)-2)] return np.array(dataX), dataset[2:] trainX, trainY = create_dataset(dataset) # Create and fit Multilinear Perceptron model model = Sequential() model.add(Dense(8, input_dim=1, activation='relu')) model.add(Dense(1)) model.compile(loss='mean_squared_error', optimizer='adam') model.fit(trainX, trainY, nb_epoch=200, batch_size=2, verbose=2) # Our prediction for tomorrow prediction = model.predict(np.array([dataset[0]])) result = 'The price will move from %s to %s' % (dataset[0], prediction[0][0]) return result return { "speech": result, "displayText": , # "data": data, # "contextOut": [], } # We have our file so we create the neural net and get the prediction print stock_prediction() # We are done so we delete the csv file os.remove(FILE_NAME)
mit
Python
1490f438693a5727c722d933a712c889d3c09556
test where SSL proxying works
marcellodesales/svnedge-console,marcellodesales/svnedge-console,marcellodesales/svnedge-console,marcellodesales/svnedge-console,marcellodesales/svnedge-console
test/others/ProxyTest.py
test/others/ProxyTest.py
import urllib2 httpTarget = "http://www.collab.net" httpsTargetTrusted = "https://ctf.open.collab.net/sf/sfmain/do/home" httpsTargetUntrusted = "https://www.collab.net" proxyHost = "cu182.cloud.sp.collab.net" proxyPort = "80" proxyUser = "proxyuser" proxyPwd = "proxypass" def main(): print "Testing proxy: %s\n" % (getProxyUrl(),) testProxy(httpTarget) testProxy(httpsTargetTrusted) testProxy(httpsTargetUntrusted) def getProxyUrl(): proxyUrl = "http://%s:%s@%s:%s" % (proxyUser, proxyPwd, proxyHost, proxyPort) return proxyUrl def testProxy(url): req = urllib2.Request(url) scheme = "https" if url.startswith("https") else "http" # build a new opener that uses a proxy requiring authorization proxy_support = urllib2.ProxyHandler({scheme : getProxyUrl()}) opener = urllib2.build_opener(proxy_support, urllib2.HTTPHandler) # install it urllib2.install_opener(opener) try: print "Testing proxy to target: %s ..." % (url, ) response = urllib2.urlopen(req) if response.read(): print "Proxy connection was successful\n" except IOError, e: if hasattr(e, 'reason'): print 'Failed to reach a server.' print 'Reason: \n', e.reason elif hasattr(e, 'code'): print 'The server couldn\'t fulfill the request.' print 'Error code: \n', e.code if __name__ == "__main__": main()
agpl-3.0
Python
d15ba379ec48c2c5bc76eeb0f8a514625f5b9e2f
add unit test to test whether the parallel implementation is alright
mir-group/flare,mir-group/flare
tests/test_gp_algebra.py
tests/test_gp_algebra.py
import pytest import pickle import os import json import numpy as np from pytest import raises from flare.gp import GaussianProcess from flare.env import AtomicEnvironment from flare.struc import Structure from flare import mc_simple from flare.otf_parser import OtfAnalysis from flare.env import AtomicEnvironment from flare.mc_simple import two_plus_three_body_mc, two_plus_three_body_mc_grad from flare.mc_sephyps import two_plus_three_body_mc as two_plus_three_body_mc_multi from flare.mc_sephyps import two_plus_three_body_mc_grad as two_plus_three_body_mc_grad_multi from flare import gp_algebra, gp_algebra_multi def get_random_training_set(nenv): """Create a random test structure """ np.random.seed(0) cutoffs = np.array([0.8, 0.8]) hyps = np.array([1, 1, 1, 1, 1]) kernel = (two_plus_three_body_mc, two_plus_three_body_mc_grad) kernel_m = (two_plus_three_body_mc_multi, two_plus_three_body_mc_grad_multi) hyps_mask = {'nspec': 1, 'spec_mask': np.zeros(118, dtype=int), 'nbond': 1, 'bond_mask': np.array([0]), 'ntriplet': 1, 'triplet_mask': np.array([0])} # create test data cell = np.eye(3) unique_species = [2, 1] noa = 5 training_data = [] training_labels = [] for idenv in range(nenv): positions = np.random.uniform(-1, 1, [noa,3]) species = np.random.randint(0, len(unique_species), noa) struc = Structure(cell, species, positions) training_data += [AtomicEnvironment(struc, 1, cutoffs)] training_labels += [np.random.uniform(-1, 1, 3)] return hyps, training_data, training_labels, kernel, cutoffs, \ kernel_m, hyps_mask def test_ky_mat(): hyps, training_data, training_labels, kernel, cutoffs, \ kernel_m, hyps_mask = \ get_random_training_set(10) func = [gp_algebra.get_ky_mat, gp_algebra.get_ky_mat_par, gp_algebra_multi.get_ky_mat, gp_algebra_multi.get_ky_mat_par] ky_mat0 = func[0](hyps, training_data, training_labels, kernel[0], cutoffs) # parallel version ky_mat = func[1](hyps, training_data, training_labels, kernel[0], cutoffs, no_cpus=2) diff = (np.max(np.abs(ky_mat-ky_mat0))) assert (diff==0), "parallel implementation is wrong" # check multi hyps implementation ky_mat = func[2](hyps, training_data, training_labels, kernel_m[0], cutoffs, hyps_mask) diff = (np.max(np.abs(ky_mat-ky_mat0))) assert (diff==0), "multi hyps parameter implementation is wrong" # check multi hyps parallel implementation ky_mat = func[3](hyps, training_data, training_labels, kernel_m[0], cutoffs, hyps_mask, no_cpus=2) diff = (np.max(np.abs(ky_mat-ky_mat0))) assert (diff==0), "multi hyps parameter parallel "\ "implementation is wrong" def test_ky_and_hyp(): hyps, training_data, training_labels, kernel, cutoffs, \ kernel_m, hyps_mask = \ get_random_training_set(10) func = [gp_algebra.get_ky_and_hyp, gp_algebra.get_ky_and_hyp_par, gp_algebra_multi.get_ky_and_hyp, gp_algebra_multi.get_ky_and_hyp_par] hypmat_0, ky_mat0 = func[0](hyps, training_data, training_labels, kernel[1], cutoffs) # parallel version hypmat, ky_mat = func[1](hyps, training_data, training_labels, kernel[1], cutoffs, no_cpus=2) diff = (np.max(np.abs(ky_mat-ky_mat0))) assert (diff==0), "parallel implementation is wrong" # check multi hyps implementation hypmat, ky_mat = func[2](hyps, hyps_mask, training_data, training_labels, kernel_m[1], cutoffs) diff = (np.max(np.abs(ky_mat-ky_mat0))) assert (diff==0), "multi hyps parameter implementation is wrong" # check multi hyps parallel implementation hypmat, ky_mat = func[3](hyps, hyps_mask, training_data, training_labels, kernel_m[1], cutoffs, no_cpus=2) diff = (np.max(np.abs(ky_mat-ky_mat0))) assert (diff==0), "multi hyps parameter parallel "\ "implementation is wrong"
mit
Python
aa1808c9a13894751953c8a1c816c89861e514d1
Create new package. (#6061)
mfherbst/spack,iulian787/spack,lgarren/spack,iulian787/spack,LLNL/spack,krafczyk/spack,iulian787/spack,EmreAtes/spack,skosukhin/spack,EmreAtes/spack,skosukhin/spack,mfherbst/spack,tmerrick1/spack,mfherbst/spack,krafczyk/spack,tmerrick1/spack,lgarren/spack,LLNL/spack,lgarren/spack,EmreAtes/spack,LLNL/spack,krafczyk/spack,LLNL/spack,krafczyk/spack,tmerrick1/spack,EmreAtes/spack,iulian787/spack,iulian787/spack,mfherbst/spack,LLNL/spack,matthiasdiener/spack,mfherbst/spack,skosukhin/spack,matthiasdiener/spack,matthiasdiener/spack,lgarren/spack,lgarren/spack,EmreAtes/spack,tmerrick1/spack,krafczyk/spack,tmerrick1/spack,skosukhin/spack,matthiasdiener/spack,matthiasdiener/spack,skosukhin/spack
var/spack/repos/builtin/packages/r-iso/package.py
var/spack/repos/builtin/packages/r-iso/package.py
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # # For details, see https://github.com/llnl/spack # Please also see the NOTICE and LICENSE files for our notice and the LGPL. # # This program 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) version 2.1, February 1999. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and # conditions of the GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * class RIso(RPackage): """Linear order and unimodal order (univariate) isotonic regression; bivariate isotonic regression with linear order on both variables.""" homepage = "https://cran.r-project.org/package=Iso" url = "https://cran.rstudio.com/src/contrib/Iso_0.0-17.tar.gz" list_url = "https://cran.rstudio.com/src/contrib/Archive/Iso" version('0.0-17', 'bf99821efb6a44fa75fdbf5e5c4c91e4')
lgpl-2.1
Python
4dd36d68225311e328cc4a909b3c56bf9b6e8e53
Create picture.py
voidJeff/Picture,tiggerntatie/Picture,anoushkaalavilli/Picture,CriticalD20/Picture,adamglueck/Picture,willl4/Picture,sarahdunbar/Picture,VinzentM/Picture,anoushkaalavilli/Picture,jasminelou/Picture,kingmayonaise/Picture,SSupattapone/Picture,T045T3R/Picture,CriticalD20/Picture,morganmeliment/Picture,BautiG/Picture,ChubbyPotato/Picture,CANDYISLIFE/Picture,sarahdunbar/Picture,kingmayonaise/Picture,AverageNormalSchoolBoy/Picture,danielwilson2017/Picture,CANDYISLIFE/Picture,HHStudent/Picture,HaginCodes/Picture,sawyerhanlon/Picture,ryankynor/Picture,APikielny/Picture,kezarberger/Picture,APikielny/Picture,SSupattapone/Picture,y0g1bear/Picture,Aqkotz/Picture,davidwilson826/Picture,haydenhatfield/Picture,dina-hertog/Picture,jasminelou/Picture,xNimbleNavigatorx/Picture,T045T3R/Picture,voidJeff/Picture,kezarberger/Picture,sawyerhanlon/Picture,Aqkotz/Picture,eliwoloshin/Picture,glenpassow/Picture,glenpassow/Picture,tesssny/Picture,eliwoloshin/Picture,mcfey/Picture,averywallis/Picture,danielwilson2017/Picture,EthanAdner/Picture,nilskingston/Picture,ryankynor/Picture,Jetzal/Picture,RDanilek/Picture,liama482/Picture,HHS-IntroProgramming/Picture,VinzentM/Picture,HHS-IntroProgramming/Picture,nilskingston/Picture,liama482/Picture,EthanAdner/Picture,dina-hertog/Picture,ChubbyPotato/Picture,HHStudent/Picture,Funjando/Picture,tesssny/Picture,averywallis/Picture,AverageNormalSchoolBoy/Picture,mcfey/Picture,adamglueck/Picture,xNimbleNavigatorx/Picture,davidwilson826/Picture,morganmeliment/Picture,Funjando/Picture,haydenhatfield/Picture,willl4/Picture,HaginCodes/Picture,BautiG/Picture,RDanilek/Picture,tiggerntatie/Picture,y0g1bear/Picture,Jetzal/Picture
picture.py
picture.py
from ggame import App myapp = App() myapp.run()
mit
Python
b3a3376e90d1eede9b2d33d0a4965c1f4920f20a
Add a memoizer
JasonGross/coq-tools,JasonGross/coq-tools
memoize.py
memoize.py
# from http://code.activestate.com/recipes/578231-probably-the-fastest-memoization-decorator-in-the-/ __all__ = ["memoize"] def memoize(f): """ Memoization decorator for a function taking one or more arguments. """ class memodict(dict): def __getitem__(self, *key): return dict.__getitem__(self, key) def __missing__(self, key): ret = self[key] = f(*key) return ret return memodict().__getitem__
mit
Python
9a902049212ceea29b7b0e440acd33e3c63c7beb
Add timer tests script.
iabdalkader/openmv,openmv/openmv,iabdalkader/openmv,kwagyeman/openmv,kwagyeman/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,iabdalkader/openmv,kwagyeman/openmv,openmv/openmv,iabdalkader/openmv
scripts/examples/02-Board-Control/timer_tests.py
scripts/examples/02-Board-Control/timer_tests.py
# Timer Test Example # # This example tests all the timers. import time from pyb import Pin, Timer, LED blue_led = LED(3) # Note: functions that allocate memory are Not allowed in callbacks def tick(timer): blue_led.toggle() print("") for i in range(1, 18): try: print("Testing TIM%d... "%(i), end="") tim = Timer(i, freq=10) # create a timer object using timer 4 - trigger at 1Hz tim.callback(tick) # set the callback to our tick function time.sleep(1000) tim.deinit() except ValueError as e: print(e) continue print("done!")
mit
Python
11447d409756f2bcd459a6db9d51967358272780
move flags to constant module
danbradham/hotline
hotline/constant.py
hotline/constant.py
# -*- coding: utf-8 -*- class flags(object): DontHide = object() Hide = object() _list = [DontHide, Hide]
mit
Python
0295a1cbad1dfa2443e6b8e8d639b7d845adaebf
Add lc0225_implement_stack_using_queues.py
bowen0701/algorithms_data_structures
lc0225_implement_stack_using_queues.py
lc0225_implement_stack_using_queues.py
"""Leetcode 225. Implement Stack using Queues Easy URL: https://leetcode.com/problems/implement-stack-using-queues/ Implement the following operations of a stack using queues. - push(x) -- Push element x onto stack. - pop() -- Removes the element on top of the stack. - top() -- Get the top element. - empty() -- Return whether the stack is empty. Example: MyStack stack = new MyStack(); stack.push(1); stack.push(2); stack.top(); // returns 2 stack.pop(); // returns 2 stack.empty(); // returns false Notes: - You must use only standard operations of a queue -- which means only push to back, peek/pop from front, size, and is empty operations are valid. - Depending on your language, queue may not be supported natively. You may simulate a queue by using a list or deque (double-ended queue), as long as you use only standard operations of a queue. - You may assume that all operations are valid (for example, no pop or top operations will be called on an empty stack). """ class MyStack(object): def __init__(self): """ Initialize your data structure here. """ pass def push(self, x): """ Push element x onto stack. :type x: int :rtype: None """ pass def pop(self): """ Removes the element on top of the stack and returns that element. :rtype: int """ pass def top(self): """ Get the top element. :rtype: int """ pass def empty(self): """ Returns whether the stack is empty. :rtype: bool """ pass def main(): # obj = MyStack() # obj.push(x) # param_2 = obj.pop() # param_3 = obj.top() # param_4 = obj.empty() pass if __name__ == '__main__': main()
bsd-2-clause
Python
0a48d3dc2286db9cff5ec757d8b5f0b45f35ab7d
update : some minor fixes
black-perl/ptop
ptop/interfaces/__init__.py
ptop/interfaces/__init__.py
from .GUI import PtopGUI
mit
Python
261b2477cf6f086028a1028c7d8a02f1b1631018
add solution for Jump Game
zhyu/leetcode,zhyu/leetcode
src/jumpGame.py
src/jumpGame.py
class Solution: # @param A, a list of integers # @return a boolean def canJump(self, A): if not A: return False max_dist = 0 for i in xrange(len(A)): if i > max_dist: return False max_dist = max(max_dist, i+A[i]) return True
mit
Python
99f9f14039749f8e3e4340d6bf0e0394e3483ca2
add basic propfind test
cernbox/smashbox,cernbox/smashbox,cernbox/smashbox,cernbox/smashbox
protocol/test_protocol_propfind.py
protocol/test_protocol_propfind.py
from smashbox.utilities import * from smashbox.utilities.hash_files import * from smashbox.protocol import * @add_worker def main(step): d = make_workdir() reset_owncloud_account() URL = oc_webdav_url() ls_prop_desktop20(URL,depth=0) logger.info("Passed 1") ls_prop_desktop20(URL,depth=1) logger.info("Passed 2") ls_prop_desktop17(URL,depth=0) logger.info("Passed 3") ls_prop_desktop17(URL,depth=1) logger.info("Passed 4") all_prop_android(URL,depth=0) logger.info("Passed 5") all_prop_android(URL,depth=1) logger.info("Passed 6")
agpl-3.0
Python
6bbdd1d9d60b03429dc2bc1ff3ba5d06353fad9a
Add a Bug class.
monsieurp/libzilla
libzilla/bug.py
libzilla/bug.py
class Bug: def __init__(self, bug_number, comment=None, resolution=None, status=None): self.bug_number = bug_number self.resolution = resolution self.status = status self.comment = comment def __str__(self): return """Bug #: [%s] RESOLUTION: [%s] STATUS: [%s] Comment: %s""" % ( self.bug_number, self.resolution, self.status, self.comment )
mit
Python
2dad699b9281fea70c5e078166236f3175ef739a
add parse2.py file to take advantage of new patXML interface
yngcan/patentprocessor,nikken1/patentprocessor,nikken1/patentprocessor,yngcan/patentprocessor,funginstitute/patentprocessor,yngcan/patentprocessor,funginstitute/patentprocessor,nikken1/patentprocessor,funginstitute/patentprocessor
parse2.py
parse2.py
#!/usr/bin/env python import logging # http://docs.python.org/howto/argparse.html import argparse import os import datetime import re import mmap import contextlib import multiprocessing import itertools import sys sys.path.append( '.' ) sys.path.append( './lib/' ) import shutil from patXML import XMLPatent from patXML import uniasc from fwork import * regex = re.compile(r""" ([<][?]xml[ ]version.*?[>] #all XML starts with ?xml .*? [<][/]us[-]patent[-]grant[>]) #and here is the end tag """, re.I+re.S+re.X) def list_files(directories, patentroot, xmlregex): """ Returns listing of all files within all directories relative to patentroot whose filenames match xmlregex """ files = [patentroot+'/'+directory+'/'+fi for directory in directories for fi in \ os.listdir(patentroot+'/'+directory) \ if re.search(xmlregex, fi, re.I) != None] return files def parse_file(filename): parsed_xmls = [] size = os.stat(filename).st_size with open(filename,'r') as f: with contextlib.closing(mmap.mmap(f.fileno(), size, access=mmap.ACCESS_READ)) as m: parsed_xmls.extend(regex.findall(m)) return parsed_xmls def parallel_parse(filelist): pool = multiprocessing.Pool(multiprocessing.cpu_count()) return list(itertools.chain(*pool.imap_unordered(parse_file, filelist))) # setup argparse parser = argparse.ArgumentParser(description=\ 'Specify source directory/directories for xml files to be parsed') parser.add_argument('--directory','-d', type=str, nargs='+', default='', help='comma separated list of directories relative to $PATENTROOT that \ parse.py will search for .xml files') parser.add_argument('--patentroot','-p', type=str, nargs='?', default=os.environ['PATENTROOT'] \ if os.environ.has_key('PATENTROOT') else '/', help='root directory of all patent files/directories') parser.add_argument('--xmlregex','-x', type=str, nargs='?', default=r"ipg\d{6}.xml", help='regex used to match xml files in each directory') parser.add_argument('--verbosity', '-v', type = int, nargs='?', default=0, help='Set the level of verbosity for the computation. The higher the \ verbosity level, the less restrictive the print policy. 0 (default) \ = error, 1 = warning, 2 = info, 3 = debug') # double check that variables are actually set # we ignore the verbosity argument when determining # if any variables have been set by the user specified = [arg for arg in sys.argv if arg.startswith('-')] nonverbose = [opt for opt in specified if '-v' not in opt] if len(nonverbose)==0: parser.print_help() sys.exit(1) # parse arguments and assign values args = parser.parse_args() DIRECTORIES = args.directory XMLREGEX = args.xmlregex PATENTROOT = args.patentroot # adjust verbosity levels based on specified input logging_levels = {0: logging.ERROR, 1: logging.WARNING, 2: logging.INFO, 3: logging.DEBUG} VERBOSITY = logging_levels[args.verbosity] logfile = "./" + 'xml-parsing.log' logging.basicConfig(filename=logfile, level=VERBOSITY) t1 = datetime.datetime.now() #get a listing of all files within the directory that follow the naming pattern files = list_files(DIRECTORIES, PATENTROOT, XMLREGEX) logging.info("Total files: %d" % (len(files))) # list of parsed xml strings parsed_xmls = parallel_parse(files) logging.info(" - Total Patents: %d" % (len(parsed_xmls))) tables = ["assignee", "citation", "class", "inventor", "patent",\ "patdesc", "lawyer", "sciref", "usreldoc"] total_count = 0 total_patents = 0 for filename in parsed_xmls: xmllist = [] count = 0 patents = 0 for i, x in enumerate(parsed_xmls): try: xmllist.append(XMLPatent(x)) #TODO: this is the slow part (parallelize) patents += 1 except Exception as inst: #print type(inst) logging.error(type(inst)) logging.error(" - Error: %s (%d) %s" % (filename, i, x[175:200])) count += 1 #print xmllist logging.info(" - number of patents: %d %s ", len(xmllist), datetime.datetime.now()-t1) logging.info( " - number of errors: %d", count) total_count += count total_patents += patents for table in tables: # Cut the chaining here to better parameterize the call, allowing # the databases to be built in place # (/var/share/patentdata/patents/<year>) # outdb = PATENTROOT + "/" + table x.insertcallbacks[table]() logging.info(" - %s", datetime.datetime.now()-t1) logging.info(" - total errors: %d", total_count) logging.info(" - total patents: %d", total_patents)
bsd-2-clause
Python
17bd35df32dd68d1cbc0fe73fcda186d13a66db0
Add run.py
marksamman/pylinkshortener
run.py
run.py
#!/usr/bin/env python3 # # Copyright (c) 2014 Mark Samman <https://github.com/marksamman/pylinkshortener> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. import threading from app import app from websocket import websocketThread if __name__ == "__main__": threading.Thread(target=websocketThread).start() app.run()
mit
Python
7613285ba24990d62cf2273387a143aa74ce8bb0
add shortcut to send sms message
japsu/django-nexmo,tracon/django-nexmo,thibault/django-nexmo
nexmo/utils.py
nexmo/utils.py
from .libpynexmo.nexmomessage import NexmoMessage from django.conf import settings def send_message(to, message): """Shortcut to send a sms using libnexmo api. Usage: >>> from nexmo import send_message >>> send_message('+33612345678', 'My sms message body') """ params = { 'username': settings.NEXMO_USERNAME, 'password': settings.NEXMO_PASSWORD, 'type': 'unicode', 'from': settings.NEXMO_FROM, 'to': to, 'text': message.encode('utf-8'), } sms = NexmoMessage(params) response = sms.send_request() return response
bsd-2-clause
Python
49b68f35bb6555eaad7cd5e3bfeb4e7fadb500ba
Add intermediate tower 4
arbylee/python-warrior
pythonwarrior/towers/intermediate/level_004.py
pythonwarrior/towers/intermediate/level_004.py
# ---- # |C s | # | @ S| # |C s>| # ---- level.description("Your ears become more in tune with the surroundings. " "Listen to find enemies and captives!") level.tip("Use warrior.listen to find spaces with other units, " "and warrior.direction_of to determine what direction they're in.") level.clue("Walk towards an enemy or captive with " "warrior.walk_(warrior.direction_of(warrior.listen()[0])), " "once len(warrior.listen()) == 0 then head for the stairs.") level.time_bonus(55) level.ace_score(144) level.size(4, 3) level.stairs(3, 2) def add_abilities(warrior): warrior.add_abilities('listen') warrior.add_abilities('direction_of') level.warrior(1, 1, 'east', func=add_abilities) level.unit('captive', 0, 0, 'east') level.unit('captive', 0, 2, 'east') level.unit('sludge', 2, 0, 'south') level.unit('thick_sludge', 3, 1, 'west') level.unit('sludge', 2, 2, 'north')
mit
Python
7662d0a0701381b37f60d42e7dbf04d7950c18ad
add management command to print out duplicate bihar tasks
dimagi/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq
custom/bihar/management/commands/bihar_cleanup_tasks.py
custom/bihar/management/commands/bihar_cleanup_tasks.py
import csv from django.core.management.base import BaseCommand from corehq.apps.hqcase.utils import get_cases_in_domain from dimagi.utils.decorators.log_exception import log_exception class Command(BaseCommand): """ Creates the backlog of repeat records that were dropped when bihar repeater infrastructure went down. """ @log_exception() def handle(self, *args, **options): domain = 'care-bihar' root_types = ('cc_bihar_pregnancy', 'cc_bihar_newborn') TASK_TYPE = 'task' # loop through all mother cases, then all child cases # for each case get all associated tasks # if any duplicates found, clean up / print them with open('bihar-duplicate-tasks.csv', 'wb') as f: writer = csv.writer(f, dialect=csv.excel) _dump_headings(writer) for case_type in root_types: for parent_case in get_cases_in_domain(domain, case_type): try: tasks = filter(lambda subcase: subcase.type == TASK_TYPE, parent_case.get_subcases()) if tasks: types = [_task_id(t) for t in tasks] unique_types = set(types) if len(unique_types) != len(tasks): for type_being_checked in unique_types: matching_cases = [t for t in tasks if _task_id(t) == type_being_checked] if len(matching_cases) > 1: _dump(parent_case, matching_cases, writer) except Exception, e: print 'error with case %s (%s)' % (parent_case._id, e) def _task_id(task_case): id = getattr(task_case, 'task_id', None) if id is None: print '%s has no task id' % task_case._id return id def _dump_headings(csv_writer): csv_writer.writerow([ 'parent case id', 'task case id', 'task id', 'date created', 'closed?', 'keep?', ]) def _dump(parent, tasklist, csv_writer): tasklist = sorted(tasklist, key=lambda case: (not case.closed, case.opened_on)) for i, task in enumerate(tasklist): csv_writer.writerow([ parent._id, task._id, _task_id(task), task.opened_on, task.closed, i==0, ])
bsd-3-clause
Python
c9f5c9bf8fffe4f513fc8564eb92ca86a76f4087
add cluster
mmagnuski/mypy
mypy/cluster.py
mypy/cluster.py
import os from os.path import split import numpy as np from scipy import sparse from scipy.io import loadmat # import matplotlib.pyplot as plt from mne.stats.cluster_level import _find_clusters base_dir = split(split(__file__)[0])[0] chan_path = os.path.join(base_dir, 'data', 'chan') # read channel connectivity def get_chan_conn(): pth = os.path.join(chan_path, 'BioSemi64_chanconn.mat') return loadmat(pth)['chan_conn'].astype('bool') # plt.imshow(chan_conn, interpolation='none') # plt.show() def cluster_1d(data, connectivity=None): if connectivity is not None: connectivity = sparse.coo_matrix(connectivity) return _find_clusters(data, 0.5, connectivity=connectivity) def cluster_3d(matrix, chan_conn): ''' parameters ---------- matrix - 3d matrix: channels by dim2 by dim3 chan_conn - 2d boolean matrix with information about channel adjacency. If chann_conn[i, j] is True that means channel i and j are adjacent. returns ------- clusters - 3d integer matrix with cluster labels ''' # matrix has to be bool assert matrix.dtype == np.bool # nested import from skimage.measure import label # label each channel separately clusters = np.zeros(matrix.shape, dtype='int') max_cluster_id = 0 n_chan = matrix.shape[0] for ch in range(n_chan): clusters[ch, :, :] = label(matrix[ch, :, :], connectivity=1, background=False) # relabel so that layers do not have same cluster ids num_clusters = clusters[ch, :, :].max() clusters[ch, clusters[ch,:]>0] += max_cluster_id max_cluster_id += num_clusters # unrolled views into clusters for ease of channel comparison: unrolled = [clusters[ch, :].ravel() for ch in range(n_chan)] # check channel neighbours and merge clusters across channels for ch in range(n_chan-1): # last chan will be already checked ch1 = unrolled[ch] ch1_ind = np.where(ch1)[0] if ch1_ind.shape[0] == 0: continue # no clusters, no fun... # get unchecked neighbours neighbours = np.where(chan_conn[ch+1:, ch])[0] if neighbours.shape[0] > 0: neighbours += ch + 1 for ngb in neighbours: ch2 = unrolled[ngb] for ind in ch1_ind: # relabel clusters if adjacent and not the same id if ch2[ind] and not (ch1[ind] == ch2[ind]): c1 = min(ch1[ind], ch2[ind]) c2 = max(ch1[ind], ch2[ind]) clusters[clusters==c2] = c1 return clusters def relabel_mat(mat, label_map): '''change values in a matrix of integers such that mapping given in label_map dict is fulfilled parameters ---------- mat - numpy array of integers label_map - dictionary, how to remap integer labels returns ------- mat_relab - relabeled numpy array ''' mat_relab = mat.copy() for k, v in label_map.items(): mat_relab[mat == k] = v return mat_relab
mit
Python
245879ce699b275edc3ee17e4cba1146241f25de
Add GLib mainllop transport for xmlrpcserver
wizbit-archive/wizbit,wizbit-archive/wizbit
wizbit/xmlrpcdeferred.py
wizbit/xmlrpcdeferred.py
import gobject import xmlrpclib class XMLRPCDeferred (gobject.GObject): """Object representing the delayed result of an XML-RPC request. .is_ready: bool True when the result is received; False before then. .value : any Once is_ready=True, this attribute contains the result of the request. If this value is an instance of the xmlrpclib.Fault class, then some exception occurred during the request's processing. """ __gsignals__ = { 'ready': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ()) } def __init__ (self, transport, http): self.__gobject_init__() self.transport = transport self.http = http self.value = None self.is_ready = False sock = self.http._conn.sock self.src_id = gobject.io_add_watch(sock, gobject.IO_IN | gobject.IO_HUP, self.handle_io) def handle_io (self, source, condition): # Triggered when there's input available on the socket. # The assumption is that all the input will be available # relatively quickly. self.read() # Returning false prevents this callback from being triggered # again. We also remove the monitoring of this file # descriptor. gobject.source_remove(self.src_id) return False def read (self): errcode, errmsg, headers = self.http.getreply() if errcode != 200: raise ProtocolError( host + handler, errcode, errmsg, headers ) try: result = xmlrpclib.Transport._parse_response(self.transport, self.http.getfile(), None) except xmlrpclib.Fault, exc: result = exc self.value = result self.is_ready = True self.emit('ready') def __len__ (self): # XXX egregious hack!!! # The code in xmlrpclib.ServerProxy calls len() on the object # returned by the transport, and if it's of length 1 returns # the contained object. Therefore, this __len__ method # returns a completely fake length of 2. return 2 class GXMLRPCTransport (xmlrpclib.Transport): def request(self, host, handler, request_body, verbose=0): # issue XML-RPC request h = self.make_connection(host) if verbose: h.set_debuglevel(1) self.send_request(h, handler, request_body) self.send_host(h, host) self.send_user_agent(h) self.send_content(h, request_body) self.verbose = verbose return XMLRPCDeferred(self, h)
lgpl-2.1
Python
0880d067f478ba6474e433e620a1e48e23ed9c34
Add nginx+uWSGI for 10% perf improvement over gunicorn
hamiltont/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,sxend/FrameworkBenchmarks,leafo/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,valyala/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,grob/FrameworkBenchmarks,sxend/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,torhve/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,herloct/FrameworkBenchmarks,doom369/FrameworkBenchmarks,joshk/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,denkab/FrameworkBenchmarks,methane/FrameworkBenchmarks,jamming/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,doom369/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,methane/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,jamming/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,actframework/FrameworkBenchmarks,sgml/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,khellang/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,sgml/FrameworkBenchmarks,actframework/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,valyala/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,valyala/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zloster/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,zloster/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,doom369/FrameworkBenchmarks,denkab/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,zloster/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,leafo/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,valyala/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,sgml/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,zloster/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,Verber/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,leafo/FrameworkBenchmarks,methane/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,khellang/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,sxend/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,khellang/FrameworkBenchmarks,testn/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,sxend/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,herloct/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,grob/FrameworkBenchmarks,methane/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,zapov/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,torhve/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,dmacd/FB-try1,mfirry/FrameworkBenchmarks,khellang/FrameworkBenchmarks,denkab/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,zloster/FrameworkBenchmarks,actframework/FrameworkBenchmarks,sxend/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,dmacd/FB-try1,sanjoydesk/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,grob/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,sxend/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,grob/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,torhve/FrameworkBenchmarks,Verber/FrameworkBenchmarks,actframework/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,zloster/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,herloct/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,zapov/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,zloster/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,testn/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,dmacd/FB-try1,diablonhn/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,jamming/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,khellang/FrameworkBenchmarks,jamming/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,jamming/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,jamming/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,leafo/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,methane/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,khellang/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,leafo/FrameworkBenchmarks,testn/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,torhve/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,actframework/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,torhve/FrameworkBenchmarks,valyala/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,herloct/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,khellang/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,zapov/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,doom369/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,zapov/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Verber/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,grob/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,grob/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,denkab/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,denkab/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,sgml/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,doom369/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,sgml/FrameworkBenchmarks,doom369/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,sxend/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,jamming/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,valyala/FrameworkBenchmarks,methane/FrameworkBenchmarks,torhve/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,testn/FrameworkBenchmarks,sxend/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,denkab/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,zapov/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,dmacd/FB-try1,Verber/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,denkab/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,testn/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,zapov/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,sgml/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,valyala/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,methane/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,torhve/FrameworkBenchmarks,grob/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,zapov/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,herloct/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,khellang/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,testn/FrameworkBenchmarks,sxend/FrameworkBenchmarks,valyala/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,doom369/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,joshk/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,torhve/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,zloster/FrameworkBenchmarks,actframework/FrameworkBenchmarks,testn/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,sgml/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,testn/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,doom369/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,testn/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,joshk/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,Verber/FrameworkBenchmarks,dmacd/FB-try1,k-r-g/FrameworkBenchmarks,methane/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,torhve/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,sgml/FrameworkBenchmarks,actframework/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,leafo/FrameworkBenchmarks,doom369/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,actframework/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,actframework/FrameworkBenchmarks,dmacd/FB-try1,ratpack/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,zapov/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,testn/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,joshk/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,zloster/FrameworkBenchmarks,grob/FrameworkBenchmarks,khellang/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,dmacd/FB-try1,valyala/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,Verber/FrameworkBenchmarks,methane/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,grob/FrameworkBenchmarks,jamming/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Verber/FrameworkBenchmarks,actframework/FrameworkBenchmarks,doom369/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,jamming/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,Verber/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,dmacd/FB-try1,zdanek/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,khellang/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,leafo/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,zloster/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,joshk/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,leafo/FrameworkBenchmarks,joshk/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,sxend/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,actframework/FrameworkBenchmarks,grob/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,leafo/FrameworkBenchmarks,jamming/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,joshk/FrameworkBenchmarks,valyala/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,testn/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,joshk/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,Verber/FrameworkBenchmarks,denkab/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,denkab/FrameworkBenchmarks,leafo/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,torhve/FrameworkBenchmarks,grob/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,dmacd/FB-try1,Rydgel/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,Verber/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,methane/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,torhve/FrameworkBenchmarks,leafo/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,zloster/FrameworkBenchmarks,zapov/FrameworkBenchmarks,zapov/FrameworkBenchmarks,doom369/FrameworkBenchmarks,dmacd/FB-try1,circlespainter/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,testn/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,methane/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Verber/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,denkab/FrameworkBenchmarks,denkab/FrameworkBenchmarks,sgml/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,zapov/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,sgml/FrameworkBenchmarks,valyala/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,zloster/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,joshk/FrameworkBenchmarks,sxend/FrameworkBenchmarks,grob/FrameworkBenchmarks,herloct/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,grob/FrameworkBenchmarks,doom369/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,denkab/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,methane/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,herloct/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,valyala/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,zloster/FrameworkBenchmarks,jamming/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,doom369/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,testn/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,khellang/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,sgml/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,doom369/FrameworkBenchmarks,jamming/FrameworkBenchmarks,khellang/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,doom369/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,khellang/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,Verber/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,testn/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,sgml/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,actframework/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,dmacd/FB-try1,alubbe/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,sxend/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,valyala/FrameworkBenchmarks,Verber/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,herloct/FrameworkBenchmarks,denkab/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,zapov/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,stefanocasazza/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,jamming/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,sxend/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,sgml/FrameworkBenchmarks,joshk/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,Synchro/FrameworkBenchmarks,ashawnbandy-te-tfb/FrameworkBenchmarks,kbrock/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,leafo/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,zloster/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,seem-sky/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,zdanek/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,joshk/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,actframework/FrameworkBenchmarks,denkab/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,torhve/FrameworkBenchmarks,doom369/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,joshk/FrameworkBenchmarks,circlespainter/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,zapov/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,joshk/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,sxend/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,jamming/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,knewmanTE/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,doom369/FrameworkBenchmarks,valyala/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,sgml/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,nbrady-techempower/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,fabianmurariu/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,raziel057/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,methane/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,sanjoydesk/FrameworkBenchmarks,nathana1/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,Rayne/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,nkasvosve/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,s-ludwig/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,sxend/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,marko-asplund/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,youprofit/FrameworkBenchmarks,jetty-project/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,Eyepea/FrameworkBenchmarks,hamiltont/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,hperadin/FrameworkBenchmarks,donovanmuller/FrameworkBenchmarks,alubbe/FrameworkBenchmarks,greenlaw110/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,mfirry/FrameworkBenchmarks,zapov/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,grob/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,sagenschneider/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,herloct/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,joshk/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,greg-hellings/FrameworkBenchmarks,MTDdk/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Dith3r/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,sxend/FrameworkBenchmarks,herloct/FrameworkBenchmarks,kellabyte/FrameworkBenchmarks,zapov/FrameworkBenchmarks,methane/FrameworkBenchmarks,ratpack/FrameworkBenchmarks,zhuochenKIDD/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,steveklabnik/FrameworkBenchmarks,zapov/FrameworkBenchmarks,jaguililla/FrameworkBenchmarks,Verber/FrameworkBenchmarks,waiteb3/FrameworkBenchmarks,markkolich/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,julienschmidt/FrameworkBenchmarks,Jesterovskiy/FrameworkBenchmarks,khellang/FrameworkBenchmarks,victorbriz/FrameworkBenchmarks,xitrum-framework/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,zane-techempower/FrameworkBenchmarks,diablonhn/FrameworkBenchmarks,PermeAgility/FrameworkBenchmarks,dmacd/FB-try1,nkasvosve/FrameworkBenchmarks,psfblair/FrameworkBenchmarks,k-r-g/FrameworkBenchmarks
wsgi/setup_nginxuwsgi.py
wsgi/setup_nginxuwsgi.py
import subprocess import multiprocessing import os bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py2/bin') config_dir = os.path.expanduser('~/FrameworkBenchmarks/config') NCPU = multiprocessing.cpu_count() def start(args): try: subprocess.check_call('sudo /usr/local/nginx/sbin/nginx -c ' + config_dir + '/nginx_uwsgi.conf', shell=True) # Run in the background, but keep stdout/stderr for easy debugging subprocess.Popen(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi.ini' + ' --processes ' + str(NCPU) + ' --wsgi hello:app', shell=True, cwd='wsgi') return 0 except subprocess.CalledProcessError: return 1 def stop(): subprocess.call('sudo /usr/local/nginx/sbin/nginx -s stop', shell=True) subprocess.call(bin_dir + '/uwsgi --ini ' + config_dir + '/uwsgi_stop.ini', shell=True) return 0
bsd-3-clause
Python
8fe4b03d7944f2facf8f261d440e7220c4d1228b
add file
familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG,familug/FAMILUG
Python/mapexp.py
Python/mapexp.py
#!/usr/bin/env python """ map(fun, iterable,...) Return a list of the results of applying the function to the items of the argument sequence(s). If more than one sequence is given, the function is called with an argument list consisting of the corresponding item of each sequence, substituting None for missing values when not all sequences have the same length. If the function is None, return a list of the items of the sequence (or a list of tuples if more than one sequenc:e). """ li1 = [1, 2, 3, 4, 5] li2 = [1, 2, 3, 4, 7] li3 = [2, 3, 4, "hehe"] #return a list of sum of corresponding element in each list ret = map(lambda x,y : x + y, li1, li2) print ret ret = map(lambda x, y : str(x) + str(y), li2, li3 ) print ret #return a tubple consis of corresponding items from two list ret = map(None, li2, li3) print ret #convert to list of list ret = map(list, ret) print ret #flat list la = [] for e in ret: la += e print la #flat list ret = reduce(lambda x, y: x + y, ret) print ret
bsd-2-clause
Python
6dd4b6ee9b9457d2362404aac71fd73e907bf535
Add Timeline class.
VISTAS-IVES/pyvistas
source/vistas/ui/controls/timeline.py
source/vistas/ui/controls/timeline.py
import datetime from bisect import insort class TimelineFilter: pass # Todo: implement class Timeline: _global_timeline = None @classmethod def app(cls): """ Global timeline """ if cls._global_timeline is None: cls._global_timeline = Timeline() return cls._global_timeline def __init__(self, start_time=None, end_time=None, current_time=None): self._start_time = start_time self._end_time = end_time self._current_time = current_time self._min_step = None self._timestamps = [] # Todo: implement TimelineFilter # self._filtered_timestamps = [] # potentially unneeded, since we can filter on the fly now # self._use_filter = False @property def timestamps(self): # return self._filtered_timestamps if self._use_filter else self._timestamps return self._timestamps @property def num_timestamps(self): return len(self._timestamps) @property def start_time(self): return self._start_time @start_time.setter def start_time(self, value: datetime.datetime): self._start_time = value # Todo: TimelineEvent? @property def end_time(self): return self._end_time @end_time.setter def end_time(self, value): self._end_time = value # Todo: TimelineEvent? @property def current_time(self): return self._current_time @current_time.setter def current_time(self, value: datetime.datetime): if value not in self._timestamps: if value > self._timestamps[-1]: value = self._timestamps[-1] elif value < self._timestamps[0]: value = self._timestamps[0] else: # Go to nearest floor step value = list(filter(lambda x: x > value, self._timestamps))[0] self._current_time = value # Todo: TimelineEvent? @property def min_step(self): return self._min_step def reset(self): self._timestamps = [] self._start_time, self._end_time, self._current_time = [datetime.datetime.fromtimestamp(0)] * 3 def add_timestamp(self, timestamp: datetime.datetime): if timestamp not in self._timestamps: if timestamp > self._timestamps[-1]: self.end_time = timestamp elif timestamp < self._timestamps[0]: self.start_time = timestamp insort(self._timestamps, timestamp) # unique and sorted # recalculate smallest timedelta self._min_step = self._timestamps[-1] - self._timestamps[0] for i in range(len(self._timestamps) - 1): diff = self._timestamps[i+1] - self._timestamps[i+1] self._min_step = diff if diff < self._min_step else self._min_step def index_at_time(self, time: datetime.datetime): return self._timestamps.index(time) @property def current_index(self): return self.index_at_time(self._current_time) def time_at_index(self, index): return self.timestamps[index]
bsd-3-clause
Python
560d82cd4b7de72a4fada77b0fe13bfb1caa9790
package script
JangXa/tutorpgdp
package.py
package.py
import os import sys for root, dirs, files in os.walk(os.path.dirname(os.path.abspath(__file__))): for name in files: if name.endswith((".java")): file = open(name, "r") lines = file.readlines() file.close() file = open(name, "w") for line in lines: if "package" not in line: file.write(line) file.close() #filename = "hello.java" #file = open(filename, "r") #lines = file.readlines() #file.close() #file = open(filename, "w") #for line in lines: # if "package" not in line: # file.write(line) # #file.close()
mit
Python
cc9ce576a33c60acc9f60f12b42e56f474b760ac
Add json_jinja renderer
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/renderers/json_jinja.py
salt/renderers/json_jinja.py
''' The default rendering engine, yaml_jinja, this renderer will take a yaml file with the jinja template and render it to a high data format for salt states. ''' # Import python libs import os import json # Import Third Party libs from jinja2 import Template def render(template): ''' Render the data passing the functions and grains into the rendering system ''' if not os.path.isfile(template): return {} passthrough = {} passthrough.update(__salt__) passthrough.update(__grains__) template = Template(open(template, 'r').read()) json_data = template.render(**passthrough) return json.loads(json_data)
apache-2.0
Python
e35711d368faadaa017186200092297f264648fe
Add web ui
cberner/rospilot,rospilot/rospilot,cberner/rospilot,rospilot/rospilot,cberner/rospilot,cberner/rospilot,rospilot/rospilot,rospilot/rospilot,cberner/rospilot,rospilot/rospilot,cberner/rospilot,rospilot/rospilot
nodes/web_ui.py
nodes/web_ui.py
#!/usr/bin/env python import roslib; roslib.load_manifest('rospilot') import rospy from pymavlink import mavutil import rospilot.msg from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer PORT_NUMBER = 8085 armed = None #This class will handles any incoming request from #the browser class HttpHandler(BaseHTTPRequestHandler): #Handler for the GET requests def do_GET(self): self.send_response(200) self.send_header('Content-type','text/html') self.send_header('Refresh','1;url=/') self.end_headers() # Send the html message self.wfile.write( "<html>" "<body>" "<h2" + (" style='color:red;'" if armed else "") + ">" + ("ARMED" if armed else "DISARMED") + "</h2>" "<a href='/arm'>" + ("disarm" if armed else "arm") + "</a>" "</body>" "</html>") if 'arm' in self.path: node.send_arm(not armed) return class WebUiNode: def __init__(self): self.pub_set_mode = rospy.Publisher('set_mode', rospilot.msg.BasicMode) rospy.Subscriber("basic_status", rospilot.msg.BasicMode, self.handle_status) self.http_server = HTTPServer(('', PORT_NUMBER), HttpHandler) def handle_status(self, data): global armed armed = data.armed def send_arm(self, arm): self.pub_set_mode.publish(arm) def run(self): rospy.init_node('rospilot_webui') rospy.loginfo("Running") while not rospy.is_shutdown(): self.http_server.handle_request() self.http_server.close() if __name__ == '__main__': node = WebUiNode() node.run()
apache-2.0
Python
c8ede03a393ae1287a9a34e86af40cd6a8b3027b
add missing module (RBL-3757)
sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint
mint/targets.py
mint/targets.py
# # Copyright (c) 2008 rPath, Inc. # # All Rights Reserved # from mint import database, mint_error import simplejson class TargetsTable(database.KeyedTable): name = 'Targets' key = 'targetId' fields = ('targetId', 'targetType', 'targetName') def addTarget(self, targetType, targetName): cu = self.db.cursor() targetId = self.getTargetId(targetType, targetName, None) if targetId: raise mint_error.TargetExists( \ "Target named '%s' of type '%s' already exists", targetName, targetType) cu = cu.execute("INSERT INTO Targets (targetType, targetName) VALUES(?, ?)", targetType, targetName) self.db.commit() return cu.lastid() def getTargetId(self, targetType, targetName, default = -1): cu = self.db.cursor() cu.execute("""SELECT targetId FROM Targets WHERE targetType=? AND targetName=?""", targetType, targetName) res = cu.fetchone() if res: return res[0] if default == -1: raise mint_error.TargetMissing("No target named '%s' of type '%s'", targetName, targetType) return default def deleteTarget(self, targetId): cu = self.db.cursor() cu.execute("DELETE FROM Targets WHERE targetId=?", targetId) self.db.commit() class TargetDataTable(database.DatabaseTable): name = 'TargetData' fields = ('targetId', 'name', 'value') def addTargetData(self, targetId, targetData): cu = self.db.cursor() # perhaps check the id to be certain it's unique for name, value in targetData.iteritems(): value = simplejson.dumps(value) cu.execute("INSERT INTO TargetData VALUES(?, ?, ?)", targetId, name, value) self.db.commit() def getTargetData(self, targetId): cu = self.db.cursor() cu.execute("SELECT name, value FROM TargetData WHERE targetId=?", targetId) res = {} for name, value in cu.fetchall(): res[name] = simplejson.loads(value) return res def deleteTargetData(self, targetId): cu = self.db.cursor() cu.execute("DELETE FROM TargetData WHERE targetId=?", targetId) self.db.commit()
apache-2.0
Python
3709bcbd421d82f9404ab3b054989546d95c006f
Fix another broken sc2reader.plugins reference.
ggtracker/sc2reader,GraylinKim/sc2reader,vlaufer/sc2reader,StoicLoofah/sc2reader,GraylinKim/sc2reader,StoicLoofah/sc2reader,ggtracker/sc2reader,vlaufer/sc2reader
sc2reader/scripts/sc2json.py
sc2reader/scripts/sc2json.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals, division import sc2reader from sc2reader.factories.plugins.replay import toJSON def main(): import argparse parser = argparse.ArgumentParser(description="Prints replay data to a json string.") parser.add_argument('--indent', '-i', type=int, default=None, help="The per-line indent to use when printing a human readable json string") parser.add_argument('--encoding', '-e', type=str, default='UTF-8', help="The character encoding use..") parser.add_argument('path', metavar='path', type=str, nargs=1, help="Path to the replay to serialize.") args = parser.parse_args() factory = sc2reader.factories.SC2Factory() factory.register_plugin("Replay", toJSON(encoding=args.encoding, indent=args.indent)) replay_json = factory.load_replay(args.path[0]) print(replay_json) if __name__ == '__main__': main()
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals, division import sc2reader from sc2reader.plugins.replay import toJSON def main(): import argparse parser = argparse.ArgumentParser(description="Prints replay data to a json string.") parser.add_argument('--indent', '-i', type=int, default=None, help="The per-line indent to use when printing a human readable json string") parser.add_argument('--encoding', '-e', type=str, default='UTF-8', help="The character encoding use..") parser.add_argument('path', metavar='path', type=str, nargs=1, help="Path to the replay to serialize.") args = parser.parse_args() factory = sc2reader.factories.SC2Factory() factory.register_plugin("Replay", toJSON(encoding=args.encoding, indent=args.indent)) replay_json = factory.load_replay(args.path[0]) print(replay_json) if __name__ == '__main__': main()
mit
Python
c3c559f893e31e728a429cf446039781cea1f25d
Add unit tests for `%tensorflow_version`
googlecolab/colabtools,googlecolab/colabtools
tests/test_tensorflow_magics.py
tests/test_tensorflow_magics.py
# Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Tests for the `%tensorflow_version` magic.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import unittest from google.colab import _tensorflow_magics class TensorflowMagicsTest(unittest.TestCase): @classmethod def setUpClass(cls): super(TensorflowMagicsTest, cls).setUpClass() cls._original_version = _tensorflow_magics._tf_version cls._original_sys_path = sys.path[:] def setUp(self): super(TensorflowMagicsTest, self).setUp() _tensorflow_magics._tf_version = self._original_version sys.path[:] = self._original_sys_path def test_switch_1x_to_2x(self): _tensorflow_magics._tensorflow_version("2.x") tf2_path = _tensorflow_magics._available_versions["2.x"] self.assertEqual(sys.path[1:], self._original_sys_path) self.assertTrue(sys.path[0].startswith(tf2_path), (sys.path[0], tf2_path)) def test_switch_back(self): _tensorflow_magics._tensorflow_version("2.x") _tensorflow_magics._tensorflow_version("1.x") self.assertEqual(sys.path, self._original_sys_path) if __name__ == "__main__": unittest.main()
apache-2.0
Python
fe879d7f6f56db410eb5d3d9aeb5691d020661c7
Create shackbullet.py
Haxim/ShackBullet,Haxim/ShackBullet
shackbullet.py
shackbullet.py
#Import the modules import requests import json import uuid #Edit these to your shacknews login credentials shackname = 'Username' shackpass = 'ShackPassword' pushbulletkey = 'access token from https://www.pushbullet.com/account' #Fun Bbegins #generate uuid from namespace uuid = uuid.uuid5(uuid.NAMESPACE_DNS, 'winchatty.com') #setup registration payload payload = { 'id' : uuid, 'name' : 'shackbullet', 'username' : shackname, 'password' : shackpass } #register this client r = requests.post("https://winchatty.com/v2/notifications/registerRichClient", data=payload) #We are setup so start waiting for notifications #setup checking payload payload = { 'clientId' : uuid } bulletheaders = { 'Authorization' : 'Bearer ' + pushbulletkey } #main loop to check for notifications while True: #wait for notifications r = requests.post("http://notifications.winchatty.com/v2/notifications/waitForNotification", data=payload) #got one, now setup the payload for pushbullet bulletpayload = { 'type' : 'link', 'title' : data['messages'][0]['subject'] + ': ' + data['messages'][0]['body'], 'body' : data['messages'][0]['body'], 'url' : 'http://www.shacknews.com/chatty?id=' + str(data['messages'][0]['postId']) + '#item_' + str(data['messages'][0]['postId']) } #send the notification to pushbullet r = requests.post("https://api.pushbullet.com/v2/pushes", headers=bulletheaders, data=bulletpayload)
mit
Python
0b419a71a414e605af57029286b627e286c5df47
add session
NCSSM-CS/CSAssess,NCSSM-CS/CSAssess,NCSSM-CS/CSAssess,NCSSM-CS/CSAssess
controller/addSession.py
controller/addSession.py
#!/usr/local/bin/python3 """ created_by: Aninda Manocha created_date: 3/5/2015 last_modified_by: Aninda Manocha last_modified_date: 3/5/2015 """ import constants import utils import json from sql.session import Session from sql.user import User #Format of session #requestType: addSession #token: "string" #ip: "string" #user: User def iChooseU(json): thisUser = utils.findUser(json) token = json["token"] ip = json["ip"] user = json["user"] theUser = User.get(user["id"])[0] newSession = Session.noID(token, ip, user, ACTIVE) newSession.add() return utils.successJson(json)
mit
Python
d83e30cc2ec46eeb2f7c27c26e0fc3d2d3e6de90
add an environment checker
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
scripts/check_environment.py
scripts/check_environment.py
""" Something to run to make sure our machine is up to snuff! """ import pg import xlwt
mit
Python
ef78460a3303216f424247203cf0b5e1ecc88197
Add test for ticket #1074.
lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,scipy/scipy-svn,scipy/scipy-svn,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,scipy/scipy-svn,scipy/scipy-svn,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor
scipy/optimize/tests/test_regression.py
scipy/optimize/tests/test_regression.py
"""Regression tests for optimize. """ from numpy.testing import * import numpy as np class TestRegression(TestCase): def test_newton_x0_is_0(self): """Ticket #1074""" import scipy.optimize tgt = 1 res = scipy.optimize.newton(lambda x: x - 1, 0) assert_almost_equal(res, tgt)
bsd-3-clause
Python
c654841595fd679c511d2d3b91c2edc9335c78cc
Create Quiz-Problem8.py
iharsh234/MIT6.00x
Quiz-Problem8.py
Quiz-Problem8.py
# PROBLEM 8 def satisfiesF(L): """ Assumes L is a list of strings Assume function f is already defined for you and it maps a string to a Boolean Mutates L such that it contains all of the strings, s, originally in L such that f(s) returns True, and no other elements Returns the length of L after mutation """ harsh = L[:] for x in harsh: if f(x) == False: a = L.index(x) del L[a] return len(L) run_satisfiesF(L, satisfiesF)
mit
Python
aa3cf6a383c38a9f17172ae2a754a8e67243e318
add new form to bulk import indicators from json file
dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
corehq/apps/indicators/forms.py
corehq/apps/indicators/forms.py
from django import forms from django.utils.translation import ugettext_noop, ugettext as _ from bootstrap3_crispy import bootstrap as twbs from bootstrap3_crispy.helper import FormHelper from bootstrap3_crispy import layout as crispy from corehq.apps.style.crispy import FormActions class ImportIndicatorsFromJsonFileForm(forms.Form): json_file = forms.FileField( label=ugettext_noop("Exported File"), required=False, ) override_existing = forms.BooleanField( label=_("Override Existing Indicators"), required=False, ) def __init__(self, *args, **kwargs): super(ImportIndicatorsFromJsonFileForm, self).__init__(*args, **kwargs) self.helper = FormHelper() self.helper.form_method = 'POST' self.helper.form_class = 'form-horizontal' self.helper.label_class = 'col-lg-2' self.helper.field_class = 'col-lg-8' self.helper.layout = crispy.Layout( crispy.Field('json_file'), crispy.Field('override_existing'), FormActions( twbs.StrictButton(_("Import Indicators"), type='submit', css_class='btn-primary'), ), )
bsd-3-clause
Python
42fbeda997d5c8f67231ee5c8f420a7140870c26
Add gce_img module for utilizing GCE image resources
thaim/ansible,thaim/ansible
lib/ansible/modules/extras/cloud/google/gce_img.py
lib/ansible/modules/extras/cloud/google/gce_img.py
#!/usr/bin/python # Copyright 2015 Google Inc. All Rights Reserved. # # This file is part of Ansible # # Ansible 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. # # Ansible is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Ansible. If not, see <http://www.gnu.org/licenses/>. """An Ansible module to utilize GCE image resources.""" import sys # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.gce import * try: from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver from libcloud.common.google import GoogleBaseError from libcloud.common.google import ResourceNotFoundError _ = Provider.GCE except ImportError: print('failed=True ' "msg='libcloud with GCE support is required for this module.'") sys.exit(1) DOCUMENTATION = ''' --- module: gce_img short_description: utilize GCE image resources description: - This module can create and delete GCE private images from gzipped compressed tarball containing raw disk data or from existing detached disks in any zone. U(https://cloud.google.com/compute/docs/images) options: name: description: - the name of the image to create required: true default: null aliases: [] source: description: - the source disk or the Google Cloud Storage URI to create the image from required: false default: null aliases: [] state: description: - desired state of the image required: false default: "present" choices: ["active", "present", "absent", "deleted"] aliases: [] zone: description: - the zone of the disk specified by source required: false default: "us-central1-a" aliases: [] service_account_email: version_added: "1.6" description: - service account email required: false default: null aliases: [] pem_file: version_added: "1.6" description: - path to the pem file associated with the service account email required: false default: null aliases: [] project_id: version_added: "1.6" description: - your GCE project ID required: false default: null aliases: [] requirements: [ "libcloud" ] author: Peter Tan <ptan@google.com> ''' EXAMPLES = ''' # Create an image named test-image from the disk 'test-disk' in zone us-central1-a. - gce_img: name: test-image source: test-disk zone: us-central1-a state: present # Delete an image named test-image in zone us-central1-a. - gce_img: name: test-image zone: us-central1-a state: deleted ''' def main(): module = AnsibleModule( argument_spec=dict( name=dict(required=True), source=dict(), state=dict(default='present'), zone=dict(default='us-central1-a'), service_account_email=dict(), pem_file=dict(), project_id=dict(), ) ) gce = gce_connect(module) name = module.params.get('name') source = module.params.get('source') state = module.params.get('state') zone = module.params.get('zone') changed = False try: image = gce.ex_get_image(name) except GoogleBaseError, e: module.fail_json(msg=str(e), changed=False) # user wants to create an image. if state in ['active', 'present'] and not image: if not source: module.fail_json(msg='Must supply a source', changed=False) if source.startswith('https://storage.googleapis.com'): # source is a Google Cloud Storage URI volume = source else: try: volume = gce.ex_get_volume(source, zone) except ResourceNotFoundError: module.fail_json(msg='Disk %s not found in zone %s' % (source, zone), changed=False) except GoogleBaseError, e: module.fail_json(msg=str(e), changed=False) try: image = gce.ex_create_image(name, volume) changed = True except GoogleBaseError, e: module.fail_json(msg=str(e), changed=False) # user wants to delete the image. if state in ['absent', 'deleted'] and image: try: gce.ex_delete_image(image) changed = True except GoogleBaseError, e: module.fail_json(msg=str(e), changed=False) module.exit_json(changed=changed, name=name) sys.exit(0) main()
mit
Python
04f851706b4384add01e6cd41f31305d587f7a36
Create pushbullet.py
dendory/scripts,dendory/scripts
pushbullet.py
pushbullet.py
# Python unofficial Pushbullet client # (C) 2015 Patrick Lambert - http://dendory.net - Provided under MIT License import urllib.request import sys api_key = "XXXXXXXXX" title = "My Title" message = "My Body" def notify(key, title, text): post_params = { 'type': 'note', 'title': title, 'body': text } post_args = urllib.parse.urlencode(post_params) data = post_args.encode() request = urllib.request.Request(url='https://api.pushbullet.com/v2/pushes', headers={'Authorization': 'Bearer ' + key}, data=data) result = urllib.request.urlopen(request) return result.read().decode('utf-8') if '-key' in sys.argv: api_key = sys.argv[sys.argv.index('-key')+1] if '-title' in sys.argv: title = sys.argv[sys.argv.index('-title')+1] if '-message' in sys.argv: message = sys.argv[sys.argv.index('-message')+1] print(notify(api_key, title, message))
mit
Python
57b19c56b8be8c8131cc3d98cb9f30da3398412b
create a reporting helper for logging channel info
alfredodeza/remoto,ceph/remoto
remoto/log.py
remoto/log.py
def reporting(conn, result): log_map = {'debug': conn.logger.debug, 'error': conn.logger.error} while True: try: received = result.receive() level_received, message = received.items()[0] log_map[level_received](message.strip('\n')) except EOFError: break
mit
Python
371df7c27fa1c4130214c58ececa83b0e0b6b165
Create palindrome3.py
dushmis/illacceptanything,JeffreyCA/illacceptanything,illacceptanything/illacceptanything,ultranaut/illacceptanything,paladique/illacceptanything,tjhorner/illacceptanything,1yvT0s/illacceptanything,dushmis/illacceptanything,paladique/illacceptanything,paladique/illacceptanything,oneminot/illacceptanything,ds84182/illacceptanything,triggerNZ/illacceptanything,triggerNZ/illacceptanything,tjhorner/illacceptanything,JeffreyCA/illacceptanything,dushmis/illacceptanything,JeffreyCA/illacceptanything,JeffreyCA/illacceptanything,oneminot/illacceptanything,TheWhiteLlama/illacceptanything,oneminot/illacceptanything,triggerNZ/illacceptanything,oneminot/illacceptanything,ds84182/illacceptanything,ultranaut/illacceptanything,ds84182/illacceptanything,paladique/illacceptanything,ds84182/illacceptanything,TheWhiteLlama/illacceptanything,caioproiete/illacceptanything,illacceptanything/illacceptanything,TheWhiteLlama/illacceptanything,paladique/illacceptanything,TheWhiteLlama/illacceptanything,oneminot/illacceptanything,dushmis/illacceptanything,JeffreyCA/illacceptanything,oneminot/illacceptanything,JeffreyCA/illacceptanything,caioproiete/illacceptanything,caioproiete/illacceptanything,caioproiete/illacceptanything,TheWhiteLlama/illacceptanything,JeffreyCA/illacceptanything,dushmis/illacceptanything,oneminot/illacceptanything,ultranaut/illacceptanything,caioproiete/illacceptanything,triggerNZ/illacceptanything,ds84182/illacceptanything,dushmis/illacceptanything,tjhorner/illacceptanything,tjhorner/illacceptanything,dushmis/illacceptanything,ds84182/illacceptanything,1yvT0s/illacceptanything,ultranaut/illacceptanything,caioproiete/illacceptanything,oneminot/illacceptanything,1yvT0s/illacceptanything,ultranaut/illacceptanything,1yvT0s/illacceptanything,oneminot/illacceptanything,illacceptanything/illacceptanything,1yvT0s/illacceptanything,dushmis/illacceptanything,ultranaut/illacceptanything,tjhorner/illacceptanything,ultranaut/illacceptanything,paladique/illacceptanything,dushmis/illacceptanything,1yvT0s/illacceptanything,caioproiete/illacceptanything,tjhorner/illacceptanything,oneminot/illacceptanything,paladique/illacceptanything,paladique/illacceptanything,tjhorner/illacceptanything,caioproiete/illacceptanything,paladique/illacceptanything,paladique/illacceptanything,tjhorner/illacceptanything,illacceptanything/illacceptanything,ds84182/illacceptanything,ds84182/illacceptanything,paladique/illacceptanything,illacceptanything/illacceptanything,ultranaut/illacceptanything,dushmis/illacceptanything,illacceptanything/illacceptanything,triggerNZ/illacceptanything,ds84182/illacceptanything,paladique/illacceptanything,TheWhiteLlama/illacceptanything,TheWhiteLlama/illacceptanything,triggerNZ/illacceptanything,ds84182/illacceptanything,tjhorner/illacceptanything,triggerNZ/illacceptanything,triggerNZ/illacceptanything,illacceptanything/illacceptanything,tjhorner/illacceptanything,illacceptanything/illacceptanything,ultranaut/illacceptanything,JeffreyCA/illacceptanything,TheWhiteLlama/illacceptanything,1yvT0s/illacceptanything,ds84182/illacceptanything,JeffreyCA/illacceptanything,illacceptanything/illacceptanything,triggerNZ/illacceptanything,illacceptanything/illacceptanything,paladique/illacceptanything,caioproiete/illacceptanything,TheWhiteLlama/illacceptanything,TheWhiteLlama/illacceptanything,tjhorner/illacceptanything,ultranaut/illacceptanything,1yvT0s/illacceptanything,oneminot/illacceptanything,TheWhiteLlama/illacceptanything,dushmis/illacceptanything,oneminot/illacceptanything,TheWhiteLlama/illacceptanything,ds84182/illacceptanything,illacceptanything/illacceptanything,JeffreyCA/illacceptanything,JeffreyCA/illacceptanything,1yvT0s/illacceptanything,triggerNZ/illacceptanything,1yvT0s/illacceptanything,ultranaut/illacceptanything,oneminot/illacceptanything,ultranaut/illacceptanything,dushmis/illacceptanything,dushmis/illacceptanything,dushmis/illacceptanything,oneminot/illacceptanything,illacceptanything/illacceptanything,ultranaut/illacceptanything,paladique/illacceptanything,TheWhiteLlama/illacceptanything,caioproiete/illacceptanything,JeffreyCA/illacceptanything,JeffreyCA/illacceptanything,caioproiete/illacceptanything,paladique/illacceptanything,JeffreyCA/illacceptanything,triggerNZ/illacceptanything,triggerNZ/illacceptanything,ds84182/illacceptanything,dushmis/illacceptanything,tjhorner/illacceptanything,caioproiete/illacceptanything,illacceptanything/illacceptanything,illacceptanything/illacceptanything,JeffreyCA/illacceptanything,triggerNZ/illacceptanything,caioproiete/illacceptanything,oneminot/illacceptanything,caioproiete/illacceptanything,triggerNZ/illacceptanything,tjhorner/illacceptanything,1yvT0s/illacceptanything,tjhorner/illacceptanything,TheWhiteLlama/illacceptanything,caioproiete/illacceptanything,tjhorner/illacceptanything,TheWhiteLlama/illacceptanything,1yvT0s/illacceptanything,illacceptanything/illacceptanything,1yvT0s/illacceptanything,ultranaut/illacceptanything,triggerNZ/illacceptanything,ultranaut/illacceptanything,1yvT0s/illacceptanything,ds84182/illacceptanything,1yvT0s/illacceptanything,ds84182/illacceptanything
palindrome3.py
palindrome3.py
palindrome3 = lambda x: str(x) == str(x)[::-1]
mit
Python
5129dd5de6f4a8c0451adbb5631940bb82b51a26
Add a script to enact updates to positions & alternative names
geoffkilpin/pombola,hzj123/56th,geoffkilpin/pombola,mysociety/pombola,patricmutwiri/pombola,patricmutwiri/pombola,patricmutwiri/pombola,ken-muturi/pombola,mysociety/pombola,ken-muturi/pombola,geoffkilpin/pombola,mysociety/pombola,geoffkilpin/pombola,hzj123/56th,hzj123/56th,hzj123/56th,patricmutwiri/pombola,hzj123/56th,patricmutwiri/pombola,mysociety/pombola,ken-muturi/pombola,ken-muturi/pombola,ken-muturi/pombola,geoffkilpin/pombola,ken-muturi/pombola,hzj123/56th,geoffkilpin/pombola,patricmutwiri/pombola,mysociety/pombola,mysociety/pombola
mzalendo/kenya/management/commands/kenya_apply_updates.py
mzalendo/kenya/management/commands/kenya_apply_updates.py
from collections import defaultdict import csv import datetime import errno import hmac import hashlib import itertools import json import os import re import requests import sys from django.core.management.base import NoArgsCommand, CommandError from django.template.defaultfilters import slugify from django_date_extensions.fields import ApproximateDate from settings import IEBC_API_ID, IEBC_API_SECRET from optparse import make_option from core.models import Place, PlaceKind, Person, ParliamentarySession, Position, PositionTitle, Organisation, OrganisationKind from iebc_api import * data_directory = os.path.join(sys.path[0], 'kenya', '2013-election-data') headings = ['Place Name', 'Place Type', 'Race Type', 'Old?', 'Existing Aspirant Position ID', 'Existing Aspirant Person ID', 'Existing Aspirant External ID', 'Existing Aspirant Legal Name', 'Existing Aspirant Other Names', 'API Normalized Name', 'API Code', 'Action'] class Command(NoArgsCommand): help = 'Update the database with aspirants from the IEBC website' option_list = NoArgsCommand.option_list + ( make_option('--commit', action='store_true', dest='commit', help='Actually update the database'), ) def handle_noargs(self, **options): csv_filename = os.path.join(data_directory, 'positions-to-end-delete-and-alternative-names.csv') with open(csv_filename) as fp: reader = csv.DictReader(fp) for row in reader: alternative_names_to_add = row['Alternative Names To Add'] if not alternative_names_to_add: continue position = Position.objects.get(pk=row["Existing Aspirant Position ID"]) if alternative_names_to_add == '[endpos]': position.end_date = yesterday_approximate_date maybe_save(position, **options) elif alternative_names_to_add == '[delpos]': if options['commit']: position.delete() else: print "------------------------------------------------------------------------" print alternative_names_to_add names_to_add = [an.title().strip() for an in alternative_names_to_add.split(', ')] for n in names_to_add: person = Person.objects.get(pk=row['Existing Aspirant Person ID']) person.add_alternative_name(n) maybe_save(person, **options) # for each county, representative, ward: # for each contest_type: # get all the current aspirants # for each aspirant: # find each other aspirant that has this aspirant as an alternative name # (make a mapping of (person with multiple names) => all people whose names match those) # for each value in that mapping, check that they have the same API CODE # set the key person's API CODE # check that there's no extra data attached to the values peope, then remove the position + the person # check - if we're deleting a position, because there's already an older one there, make sure any IEBC code of the former is applied to the latter
agpl-3.0
Python
67e7d530b4b4ffa86c9f147751cf17828e024cba
add migration to create job table
Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok
migrations/versions/5706baf73b01_add_jobs_table.py
migrations/versions/5706baf73b01_add_jobs_table.py
"""Add jobs table Revision ID: 5706baf73b01 Revises: 6bd350cf4748 Create Date: 2016-09-14 15:53:50.394610 """ # revision identifiers, used by Alembic. revision = '5706baf73b01' down_revision = '6bd350cf4748' from alembic import op import sqlalchemy as sa import server def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_table('job', sa.Column('created', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=False), sa.Column('id', sa.Integer(), nullable=False), sa.Column('updated', sa.DateTime(timezone=True), nullable=True), sa.Column('status', sa.Enum('queued', 'running', 'finished', name='status'), nullable=False), sa.Column('user_id', sa.Integer(), nullable=False), sa.Column('course_id', sa.Integer(), nullable=False), sa.Column('name', sa.String(length=255), nullable=False), sa.Column('description', sa.Text(), nullable=False), sa.Column('failed', sa.Boolean(), nullable=False), sa.Column('log', sa.Text(), nullable=True), sa.ForeignKeyConstraint(['course_id'], ['course.id'], name=op.f('fk_job_course_id_course')), sa.ForeignKeyConstraint(['user_id'], ['user.id'], name=op.f('fk_job_user_id_user')), sa.PrimaryKeyConstraint('id', name=op.f('pk_job')) ) op.create_index(op.f('ix_job_course_id'), 'job', ['course_id'], unique=False) op.create_index(op.f('ix_job_user_id'), 'job', ['user_id'], unique=False) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_index(op.f('ix_job_user_id'), table_name='job') op.drop_index(op.f('ix_job_course_id'), table_name='job') op.drop_table('job') ### end Alembic commands ###
apache-2.0
Python
ec841c86348302dc67b48af93d2b3b5c8fb96b6e
add list
Akagi201/learning-python,Akagi201/learning-python,Akagi201/learning-python,Akagi201/learning-python,Akagi201/learning-python
misc/list.py
misc/list.py
#!/usr/bin/env python # Python 3: List comprehensions fruits = ['Banana', 'Apple', 'Lime'] loud_fruits = [fruit.upper() for fruit in fruits] print(loud_fruits) # List and the enumerate function print(list(enumerate(fruits)))
mit
Python
427fa7f57776a73b5ec0e5045114d5ac330e6a57
Create misc.py
CounterClops/Counter-Cogs
misc/misc.py
misc/misc.py
mit
Python
0612769b07e88eae9865a16f1ae8162502fe65f9
Add senate evacuation
laichunpongben/CodeJam
2016/1c/senate_evacuation.py
2016/1c/senate_evacuation.py
#!/usr/bin/env python from __future__ import print_function def parse_senates(senates_str): return [int(_) for _ in senates_str.split(' ')] def get_evacuation_plan(senates): if not isinstance(senates, list): raise TypeError num_parties = len(senates) remaining_senates = senates[:] evacuation = [] while sum(remaining_senates) > 0: sorted_index = get_sorted_index(remaining_senates) party_index0, party_index1 = sorted_index[:2] if remaining_senates[party_index0] > 0: evacuated_party0 = get_party(party_index0) evacuation.append(evacuated_party0) if remaining_senates[party_index1] > 0: evacuated_party1 = get_party(party_index1) evacuation.append(evacuated_party1) evacuation.append(' ') remaining_senates[party_index0] += -1 remaining_senates[party_index1] += -1 evacuation_plan = ''.join(evacuation)[:-1] if evacuation_plan[-2] == ' ': evacuation_plan = evacuation_plan[:-3] + ' ' + evacuation_plan[-3] + evacuation_plan[-1] return evacuation_plan def get_sorted_index(seq): return sorted(range(len(seq)), key=lambda i:-seq[i]) def get_party(party_index): return chr(party_index + 65) if __name__ == '__main__': import os samples = ['2 2', '3 2 2', '1 1 2', '2 3 1'] for sample in samples: senates = parse_senates(sample) print(get_evacuation_plan(senates)) data_files = ['A-small-practice', 'A-large-practice'] for f in data_files: with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), '{0}.in'.format(f)), 'r') as input_file: lines = input_file.readlines() input_count = int(lines[0].replace('\n' ,'')) inputs = [line.replace('\n', '') for line in lines[2::2]] i = 1 with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), '{0}.out'.format(f)), 'w') as output_file: for in_ in inputs: senates = parse_senates(in_) output_file.write('Case #{0}: {1}\n'.format(i, get_evacuation_plan(senates))) i += 1
apache-2.0
Python
aabb57148cced94b31109b46adf83a43ca23f7a3
allow to apply std functions back
moskytw/mosql,uranusjr/mosql
mosql/std.py
mosql/std.py
#!/usr/bin/env python # -*- coding: utf-8 -*- '''It applies the standard functions to :mod:`mosql.util`. The usage: :: import mosql.std If you want to patch again: :: mosql.std.patch() It will replace the functions in :mod:`mosql.util` with original standard functions. ''' import mosql.util def patch(): mosql.util.escape = mosql.util.std_escape mosql.util.format_param = mosql.util.std_format_param mosql.util.delimit_identifier = mosql.util.std_delimit_identifier mosql.util.stringify_bool = mosql.util.std_stringify_bool mosql.util.escape_identifier = mosql.util.std_escape_identifier patch() # patch it when load this module
mit
Python
69892066449a40322a34b3a7b8e60e3fa99eef41
Create deobfuscator.py
Antelox/FOPO-PHP-Deobfuscator,Antelox/FOPO-PHP-Deobfuscator
ver.-0.1/deobfuscator.py
ver.-0.1/deobfuscator.py
mit
Python
3c396700a52571d5aae2a12fac601f063a7af761
Add missing add_master.py.
digibib/ls.ext,digibib/ls.ext,digibib/ls.ext,digibib/ls.ext
devops/deployment/add_master.py
devops/deployment/add_master.py
#!/usr/bin/env python # script to add minion config import yaml import sys import os f=open("/etc/salt/minion", 'r') settings=yaml.load(f) f.close() ip=os.environ["MASTER_IP"] if settings["master"].__class__ == str: settings["master"] = [settings["master"]] settings["master"] = [ip] #if not ip in settings["master"]: # settings["master"].insert(0, ip) f=open("/etc/salt/minion", 'w') f.write(yaml.dump(settings)) f.close() print "Success:"
mit
Python
00a059f172e1d6214d858370829e1034c2742ce4
add gevent run script
cenkalti/pypi-notifier,cenkalti/pypi-notifier
run_gevent.py
run_gevent.py
from gevent.monkey import patch_all; patch_all() from gevent.wsgi import WSGIServer from pypi_notifier import create_app app = create_app('ProductionConfig') http_server = WSGIServer(('0.0.0.0', 5001), app) http_server.serve_forever()
mit
Python
916b7fe4ee4c3c5c55278927a7116a4d1e0ad6d1
Add solarized256.py
gthank/solarized-dark-pygments,john2x/solarized-pygment
solarized256.py
solarized256.py
# -*- coding: utf-8 -*- """ solarized256 ------------ A Pygments style inspired by Solarized's 256 color mode. :copyright: (c) 2011 by Hank Gay, (c) 2012 by John Mastro. :license: BSD, see LICENSE for more details. """ from pygments.style import Style from pygments.token import Token, Comment, Name, Keyword, Generic, Number, \ Operator, String BASE03 = "#1c1c1c" BASE02 = "#262626" BASE01 = "#4e4e4e" BASE00 = "#585858" BASE0 = "#808080" BASE1 = "#8a8a8a" BASE2 = "#d7d7af" BASE3 = "#ffffd7" YELLOW = "#af8700" ORANGE = "#d75f00" RED = "#af0000" MAGENTA = "#af005f" VIOLET = "#5f5faf" BLUE = "#0087ff" CYAN = "#00afaf" GREEN = "#5f8700" class Solarized256Style(Style): background_color = BASE03 styles = { Keyword: GREEN, Keyword.Constant: ORANGE, Keyword.Declaration: BLUE, Keyword.Namespace: ORANGE, #Keyword.Pseudo Keyword.Reserved: BLUE, Keyword.Type: RED, #Name Name.Attribute: BASE1, Name.Builtin: BLUE, Name.Builtin.Pseudo: BLUE, Name.Class: BLUE, Name.Constant: ORANGE, Name.Decorator: BLUE, Name.Entity: ORANGE, Name.Exception: YELLOW, Name.Function: BLUE, #Name.Label #Name.Namespace #Name.Other Name.Tag: BLUE, Name.Variable: BLUE, #Name.Variable.Class #Name.Variable.Global #Name.Variable.Instance #Literal #Literal.Date String: CYAN, String.Backtick: BASE01, String.Char: CYAN, String.Doc: CYAN, #String.Double String.Escape: RED, String.Heredoc: CYAN, #String.Interpol #String.Other String.Regex: RED, #String.Single #String.Symbol Number: CYAN, #Number.Float #Number.Hex #Number.Integer #Number.Integer.Long #Number.Oct Operator: BASE1, Operator.Word: GREEN, #Punctuation: ORANGE, Comment: BASE01, #Comment.Multiline Comment.Preproc: GREEN, #Comment.Single Comment.Special: GREEN, #Generic Generic.Deleted: CYAN, Generic.Emph: 'italic', Generic.Error: RED, Generic.Heading: ORANGE, Generic.Inserted: GREEN, #Generic.Output #Generic.Prompt Generic.Strong: 'bold', Generic.Subheading: ORANGE, #Generic.Traceback Token: BASE1, Token.Other: ORANGE, }
mit
Python
07a122374abb60140e05b09f49ef942bd14c05f6
add missed migration
mvillis/measure-mate,rloomans/measure-mate,mvillis/measure-mate,rloomans/measure-mate,mvillis/measure-mate,rloomans/measure-mate,mvillis/measure-mate,rloomans/measure-mate
measure_mate/migrations/0026_auto_20160531_0716.py
measure_mate/migrations/0026_auto_20160531_0716.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-05-31 07:16 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import re class Migration(migrations.Migration): dependencies = [ ('measure_mate', '0025_auto_20160516_0046'), ] operations = [ migrations.AlterField( model_name='tag', name='name', field=models.SlugField(unique=True, validators=[django.core.validators.RegexValidator(re.compile(b'[A-Z]'), "Enter a valid 'slug' consisting of lowercase letters, numbers, underscores or hyphens.", b'invalid', True)], verbose_name=b'Tag Name'), ), ]
mit
Python
d3b4053c2ef39eda9246af2000bdf9460730b33b
convert json to git-versionable versions which current TinyDB user can live with.
ConnectableUs/gkp,ConnectableUs/gkp
prettifyjson.py
prettifyjson.py
#!/usr/bin/env python from os import path import sys import json if len(sys.argv) > 1: print("usage:\n\t{} < your_json_file > your_prettified_json_file".format( path.basename(sys.argv[0]))) sys.exit(1) json.dump(json.load(sys.stdin), sys.stdout, indent=2)
bsd-3-clause
Python
caf0b00bc21208515d0ddded3cbb934735d45939
add migration to create new model fields
rsalmaso/django-fluo-coupons,rsalmaso/django-fluo-coupons
coupons/migrations/0004_auto_20151105_1456.py
coupons/migrations/0004_auto_20151105_1456.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('coupons', '0003_auto_20150416_0617'), ] operations = [ migrations.CreateModel( name='CouponUser', fields=[ ('id', models.AutoField(serialize=False, auto_created=True, primary_key=True, verbose_name='ID')), ('redeemed_at', models.DateTimeField(blank=True, verbose_name='Redeemed at', null=True)), ], ), migrations.AddField( model_name='coupon', name='user_limit', field=models.PositiveIntegerField(verbose_name='User limit', default=1), ), migrations.AlterField( model_name='coupon', name='type', field=models.CharField(choices=[('monetary', 'Money based coupon'), ('percentage', 'Percentage discount'), ('virtual_currency', 'Virtual currency')], verbose_name='Type', max_length=20), ), migrations.AddField( model_name='couponuser', name='coupon', field=models.ForeignKey(related_name='users', to='coupons.Coupon'), ), migrations.AddField( model_name='couponuser', name='user', field=models.ForeignKey(null=True, to=settings.AUTH_USER_MODEL, blank=True, verbose_name='User'), ), ]
bsd-3-clause
Python
b181f2a57d57caaa6e53e193e88002a15e284fd0
add the missing file. i are senior dvlpr
dstufft/cryptography,dstufft/cryptography,Hasimir/cryptography,Ayrx/cryptography,kimvais/cryptography,kimvais/cryptography,bwhmather/cryptography,skeuomorf/cryptography,skeuomorf/cryptography,kimvais/cryptography,dstufft/cryptography,Ayrx/cryptography,dstufft/cryptography,Hasimir/cryptography,dstufft/cryptography,Ayrx/cryptography,bwhmather/cryptography,skeuomorf/cryptography,sholsapp/cryptography,sholsapp/cryptography,Ayrx/cryptography,kimvais/cryptography,bwhmather/cryptography,Hasimir/cryptography,bwhmather/cryptography,sholsapp/cryptography,sholsapp/cryptography,skeuomorf/cryptography,Hasimir/cryptography
cryptography/hazmat/backends/openssl/utils.py
cryptography/hazmat/backends/openssl/utils.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. # See the License for the specific language governing permissions and # limitations under the License. from __future__ import absolute_import, division, print_function import six def _truncate_digest(digest, order_bits): digest_len = len(digest) if 8 * digest_len > order_bits: digest_len = (order_bits + 7) // 8 digest = digest[:digest_len] if 8 * digest_len > order_bits: rshift = 8 - (order_bits & 0x7) assert rshift > 0 and rshift < 8 mask = 0xFF >> rshift << rshift # Set the bottom rshift bits to 0 digest = digest[:-1] + six.int2byte(six.indexbytes(digest, -1) & mask) return digest
bsd-3-clause
Python
4a0e00574fc551dde74db1a817229eeb23c4e0a8
Create prueba.py
aescoda/TFG
prueba.py
prueba.py
from flask import Flask from flask import request import os import xml.etree.ElementTree as ET from threading import Thread import email_lib app = Flask(__name__) xml = "" def send_email(xml): print "2" email_lib.prueba() print xml email_lib.email_alert(customer_email,iccid, admin_details[1]) return None @app.route('/webhook', methods=['POST','GET']) def webhook(): print "webhook" global xml xml = "hola" t = Thread(target=send_email, args=(xml,)) t.start() print "acabando" #Jasper resend the notification unless it receives a status 200 confirming the reception return '',200 @app.route('/response', methods=['POST','GET']) def response(): print xml #Comprobar como comparto la variable. return "Acabamos de procesar su peticion, en breve recibira un email con los detalles" if __name__ == '__main__': port = int(os.getenv('PORT', 5000)) app.run(debug=True, port=port, host='0.0.0.0', threaded=True)
from flask import Flask from flask import request import os import xml.etree.ElementTree as ET from threading import Thread import email_lib app = Flask(__name__) xml = "" def send_email(xml): print "2" email_lib.prueba() print xml return None @app.route('/webhook', methods=['POST','GET']) def webhook(): print "webhook" global xml xml = "hola" t = Thread(target=send_email, args=(xml,)) t.start() print "acabando" #Jasper resend the notification unless it receives a status 200 confirming the reception return '',200 @app.route('/response', methods=['POST','GET']) def response(): print xml #Comprobar como comparto la variable. return "Acabamos de procesar su peticion, en breve recibira un email con los detalles" if __name__ == '__main__': port = int(os.getenv('PORT', 5000)) app.run(debug=True, port=port, host='0.0.0.0', threaded=True)
apache-2.0
Python
7e4fd6b92040788bda1760cb261730f627ca6a10
Add example from listing 7.6
oysstu/pyopencl-in-action
ch7/profile_read.py
ch7/profile_read.py
''' Listing 7.6: Profiling data transfer ''' import numpy as np import pyopencl as cl import pyopencl.array import utility from time import sleep NUM_VECTORS = 8192 NUM_ITERATIONS = 2000 kernel_src = ''' __kernel void profile_read(__global char16 *c, int num) { for(int i=0; i<num; i++) { c[i] = (char16)(5); } } ''' # Get device and context, create command queue and program dev = utility.get_default_device() context = cl.Context(devices=[dev], properties=None, dev_type=None, cache_dir=None) # Create a command queue with the profiling flag enabled queue = cl.CommandQueue(context, dev, properties=cl.command_queue_properties.PROFILING_ENABLE) # Build program in the specified context using the kernel source code prog = cl.Program(context, kernel_src) try: prog.build(options=['-Werror'], devices=[dev], cache_dir=None) except: print('Build log:') print(prog.get_build_info(dev, cl.program_build_info.LOG)) raise # Data c = np.empty(shape=(NUM_VECTORS,), dtype=cl.array.vec.char16) # Create output buffer c_buff = cl.Buffer(context, cl.mem_flags.WRITE_ONLY, size=c.nbytes) # Enqueue kernel (with argument specified directly) global_size = (1,) local_size = None # Execute the kernel repeatedly using enqueue_read read_time = 0.0 for i in range(NUM_ITERATIONS): # __call__(queue, global_size, local_size, *args, global_offset=None, wait_for=None, g_times_l=False) # Store kernel execution event (return value) kernel_event = prog.profile_read(queue, global_size, local_size, c_buff, np.int32(NUM_VECTORS)) # Enqueue command to copy from buffers to host memory # Store data transfer event (return value) prof_event = cl.enqueue_copy(queue, dest=c, src=c_buff, is_blocking=True) read_time += prof_event.profile.end - prof_event.profile.start # Execute the kernel repeatedly using enqueue_map_buffer map_time = 0.0 for i in range(NUM_ITERATIONS): # __call__(queue, global_size, local_size, *args, global_offset=None, wait_for=None, g_times_l=False) # Store kernel execution event (return value) kernel_event = prog.profile_read(queue, global_size, local_size, c_buff, np.int32(NUM_VECTORS)) # Enqueue command to map from buffer two to host memory (result_array, prof_event) = cl.enqueue_map_buffer(queue, buf=c_buff, flags=cl.map_flags.READ, offset=0, shape=(NUM_VECTORS,), dtype=cl.array.vec.char16) map_time += prof_event.profile.end - prof_event.profile.start # Release the mapping (is this necessary?) result_array.base.release(queue) # Print averaged results print('Average read time (ms): {}'.format(read_time / ( NUM_ITERATIONS * 1000))) print('Average map time (ms): {}'.format(map_time / ( NUM_ITERATIONS * 1000)))
mit
Python
8ecac8170a3f9323f76aa9252a9d3b2f57f7660c
Include duration in analysis output
ihmeuw/vivarium
ceam/analysis.py
ceam/analysis.py
# ~/ceam/ceam/analysis.py import argparse import pandas as pd import numpy as np def confidence(seq): mean = np.mean(seq) std = np.std(seq) runs = len(seq) interval = (1.96*std)/np.sqrt(runs) return mean, mean-interval, mean+interval def difference_with_confidence(a, b): mean_diff = np.mean(a) - np.mean(b) interval = 1.96*np.sqrt(np.std(a)**2/len(a)+np.std(b)**2/len(b)) return mean_diff, int(mean_diff-interval), int(mean_diff+interval) def analyze_results(results): intervention = results[results.intervention == True] non_intervention = results[results.intervention == False] i_dalys = intervention.ylds + intervention.ylls ni_dalys = non_intervention.ylds + non_intervention.ylls print('Total runs', len(intervention)) print('Mean duration', results.duration.mean()) print('DALYs (intervention)', confidence(i_dalys), 'DALYs (non-intervention)', confidence(ni_dalys)) print('DALYs averted', difference_with_confidence(ni_dalys,i_dalys)) print('Total Intervention Cost', confidence(intervention.intervention_cost)) print('Cost per DALY', confidence(intervention.intervention_cost.values/(ni_dalys.values-i_dalys.values))) print('IHD Count (intervention)',confidence(intervention.ihd_count), 'IHD Count (non-intervention)', confidence(non_intervention.ihd_count)) print('Stroke Count (intervention)',confidence(intervention.hemorrhagic_stroke_count), 'Stroke Count (non-intervention)', confidence(non_intervention.hemorrhagic_stroke_count)) print('Healthcare Access Events per year (intervention):', confidence((intervention.general_healthcare_access+intervention.followup_healthcare_access)/20)) print('Healthcare Access Events per year (non-non_intervention):', confidence((non_intervention.general_healthcare_access+non_intervention.followup_healthcare_access)/20)) def dump_results(results, path): results.to_csv(path) def load_results(paths): results = pd.DataFrame() for path in paths: results = results.append(pd.read_csv(path)) return results def main(): import sys analyze_results(load_results(sys.argv[1:])) if __name__ == '__main__': main() # End.
# ~/ceam/ceam/analysis.py import argparse import pandas as pd import numpy as np def confidence(seq): mean = np.mean(seq) std = np.std(seq) runs = len(seq) interval = (1.96*std)/np.sqrt(runs) return mean, mean-interval, mean+interval def difference_with_confidence(a, b): mean_diff = np.mean(a) - np.mean(b) interval = 1.96*np.sqrt(np.std(a)**2/len(a)+np.std(b)**2/len(b)) return mean_diff, int(mean_diff-interval), int(mean_diff+interval) def analyze_results(results): intervention = results[results.intervention == True] non_intervention = results[results.intervention == False] i_dalys = intervention.ylds + intervention.ylls ni_dalys = non_intervention.ylds + non_intervention.ylls print('Total runs', len(intervention)) print('DALYs (intervention)', confidence(i_dalys), 'DALYs (non-intervention)', confidence(ni_dalys)) print('DALYs averted', difference_with_confidence(ni_dalys,i_dalys)) print('Total Intervention Cost', confidence(intervention.intervention_cost)) print('Cost per DALY', confidence(intervention.intervention_cost.values/(ni_dalys.values-i_dalys.values))) print('IHD Count (intervention)',confidence(intervention.ihd_count), 'IHD Count (non-intervention)', confidence(non_intervention.ihd_count)) print('Stroke Count (intervention)',confidence(intervention.hemorrhagic_stroke_count), 'Stroke Count (non-intervention)', confidence(non_intervention.hemorrhagic_stroke_count)) print('Healthcare Access Events per year (intervention):', confidence((intervention.general_healthcare_access+intervention.followup_healthcare_access)/20)) print('Healthcare Access Events per year (non-non_intervention):', confidence((non_intervention.general_healthcare_access+non_intervention.followup_healthcare_access)/20)) def dump_results(results, path): results.to_csv(path) def load_results(paths): results = pd.DataFrame() for path in paths: results = results.append(pd.read_csv(path)) return results def main(): import sys analyze_results(load_results(sys.argv[1:])) if __name__ == '__main__': main() # End.
bsd-3-clause
Python
0ee4afce4ba81cff6d13152ab082157afc4718f1
Create pyspark.py
mapattacker/cheatsheets,mapattacker/cheatsheets,mapattacker/cheatsheets,mapattacker/cheatsheets,mapattacker/cheatsheets,mapattacker/cheatsheets
pyspark.py
pyspark.py
from pyspark import SparkConf, SparkContext conf = SparkConf().setMaster("local").setAppName("MinTemperatures") sc = SparkContext(conf = conf) lines = sc.textFile("file:///Users/Spark/1800.csv") parsedLines = lines.map(parseLine)
mit
Python
af495c7a69611f2c1fa744dce000c49033eb2dd7
Add test for sys.intern().
pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython,pfalcon/micropython
tests/basics/sys_intern.py
tests/basics/sys_intern.py
# test sys.intern() function import sys try: sys.intern except AttributeError: print('SKIP') raise SystemExit s1 = "long long long long long long" s2 = "long long long" + " long long long" print(id(s1) == id(s2)) i1 = sys.intern(s1) i2 = sys.intern(s2) print(id(i1) == id(i2)) i2_ = sys.intern(i2) print(id(i2_) == id(i2)) try: sys.intern(1) except TypeError: print("TypeError")
mit
Python
7323565bdc2a290e97617857da475e8f41d5a43f
Add tee plugin
Muzer/smartbot,Cyanogenoid/smartbot,tomleese/smartbot,thomasleese/smartbot-old
plugins/tee.py
plugins/tee.py
class Plugin: def on_command(self, bot, msg, stdin, stdout, reply): text = stdin.read().strip() reply(text) print(text, file=stdout) def on_help(self): return "Copy standard input to reply, and also to standard output."
mit
Python
b8ea356af5121ffd612ccf708fe2372fbae3cc3d
add custom hasher for crypt_sha512
aipescience/django-daiquiri,aipescience/django-daiquiri,aipescience/django-daiquiri
daiquiri/core/hashers.py
daiquiri/core/hashers.py
# inspired by https://djangosnippets.org/snippets/10572/ from collections import OrderedDict from django.contrib.auth.hashers import CryptPasswordHasher, mask_hash from django.utils.encoding import force_str from django.utils.crypto import get_random_string, constant_time_compare from django.utils.translation import ugettext_noop as _ class CrypdSHA512PasswordHasher(CryptPasswordHasher): algorithm = 'crypt_sha512' def salt(self): return '$6$' + get_random_string(16) def encode(self, password, salt): crypt = self._load_library() data = crypt.crypt(force_str(password), salt) return "%s%s" % (self.algorithm, data) def verify(self, password, encoded): crypt = self._load_library() algorithm, rest = encoded.split('$', 1) salt, hash = rest.rsplit('$', 1) salt = '$' + salt assert algorithm == self.algorithm return constant_time_compare('%s$%s' % (salt, hash), crypt.crypt(force_str(password), salt)) def safe_summary(self, encoded): algorithm, prefix, salt, hash = encoded.split('$') assert algorithm == self.algorithm return OrderedDict([ (_('algorithm'), algorithm), (_('prefix'), prefix), (_('salt'), mask_hash(salt)), (_('hash'), mask_hash(hash)), ])
apache-2.0
Python
042d0d899896342e9f2e7b083f8543e8077bf19a
Add tests.py to app skeleton.
dimagi/rapidsms-core-dev,caktus/rapidsms,lsgunth/rapidsms,unicefuganda/edtrac,ehealthafrica-ci/rapidsms,lsgunth/rapidsms,ken-muturi/rapidsms,rapidsms/rapidsms-core-dev,ken-muturi/rapidsms,caktus/rapidsms,peterayeni/rapidsms,eHealthAfrica/rapidsms,rapidsms/rapidsms-core-dev,unicefuganda/edtrac,catalpainternational/rapidsms,catalpainternational/rapidsms,lsgunth/rapidsms,eHealthAfrica/rapidsms,dimagi/rapidsms,dimagi/rapidsms-core-dev,dimagi/rapidsms,ehealthafrica-ci/rapidsms,peterayeni/rapidsms,unicefuganda/edtrac,caktus/rapidsms,eHealthAfrica/rapidsms,ehealthafrica-ci/rapidsms,ken-muturi/rapidsms,lsgunth/rapidsms,peterayeni/rapidsms,peterayeni/rapidsms,catalpainternational/rapidsms,catalpainternational/rapidsms
lib/rapidsms/skeleton/app/tests.py
lib/rapidsms/skeleton/app/tests.py
from rapidsms.tests.scripted import TestScript from app import App class TestApp (TestScript): apps = (App,) # define your test scripts here. # e.g.: # # testRegister = """ # 8005551212 > register as someuser # 8005551212 < Registered new user 'someuser' for 8005551212! # 8005551212 > tell anotheruser what's up?? # 8005550000 < someuser said "what's up??" # """ # # You can also do normal unittest.TestCase methods: # # def testMyModel (self): # self.assertEquals(...)
bsd-3-clause
Python
27a7079f9edf01abce7912eb52c5091279bc85a1
ADD | 添加pygal path的变量设定源码
mytliulei/DCNRobot
src/lib/PygalPath.py
src/lib/PygalPath.py
#-*- coding:UTF-8 -*- import socket import os __all__ = ['PYGAL_TOOLTIPS_PATH', 'SVG_JQUERY_PATH'] SERVER_WUHAN = '192.168.60.60' SERVER_WUHAN_PRE = '192.168.6' SERVER_BEIJING = '192.168.50.193' SERVER_BEIJING_PRE = '192.168.5' SERVER = '10.1.145.70' #根据本机IP获取pygal模块生成svg文件所需的js文件路径 sname=socket.gethostname() ipList = socket.gethostbyname_ex(sname)[2] for ip in ipList: if SERVER_BEIJING_PRE in ip: path = SERVER_BEIJING break elif SERVER_WUHAN_PRE in ip: path = SERVER_WUHAN break else: path = SERVER break PYGAL_TOOLTIPS_PATH = 'http://%s/pygal-tooltips.js' % path SVG_JQUERY_PATH = 'http://%s/svg.jquery.js' % path
apache-2.0
Python
a3db0306133bc3da1cc00d3c745396539a152839
Add release script
LukeStebbing/Sequence-Scroller,LukeStebbing/Sequence-Scroller,LukeStebbing/Sequence-Scroller
release.py
release.py
#!/usr/bin/env python from collections import OrderedDict from itertools import zip_longest import json import os import re from subprocess import check_output, CalledProcessError import sys from zipfile import ZipFile def sh(command, v=False): if v: print(command) return check_output(command, text=True).strip() def parse_version(v): return [int(s) for s in v.split(".")] def dereference(link): try: return sh(f"git rev-parse --verify -q {link}^0") except CalledProcessError: return "" version_string = sys.argv[1] prefixed_version = f"v{version_string}" version = parse_version(version_string) os.chdir(os.path.dirname(os.path.realpath(__file__))) assert not sh("git status --porcelain") assert sh("git branch") == "* master" with open("manifest.json") as f: manifest = json.load(f, object_pairs_hook=OrderedDict) manifest_version = parse_version(manifest["version"]) if version != manifest_version: delta = list( vs[0] - vs[1] for vs in zip_longest(version, manifest_version, fillvalue=0) ) increment = delta.index(1) assert all(i == 0 for i in delta[0:increment]) assert all(i <= 0 for i in delta[increment + 1 :]) manifest["version"] = version_string with open("manifest.json", "w", newline="\n") as f: json.dump(manifest, f, indent=2) print("", file=f) sh(f"git commit -a -m {prefixed_version}", v=True) tag_commit = dereference(prefixed_version) if tag_commit: assert tag_commit == dereference("HEAD") else: sh(f"git tag {prefixed_version} -m {prefixed_version}", v=True) sh("git merge-base --is-ancestor origin/master master") if dereference("master") != dereference("origin/master"): sh("git push --follow-tags", v=True) files = ["manifest.json", "config.js"] for file in sh("git ls-files").splitlines(): m = lambda p: re.search(p, file) if m(r"\.(html|js)$") and not m(r"\btest\b"): files.append(file) with ZipFile("ergometer.zip", "w") as zip: for file in files: print(f"zipping {file}") zip.write(file)
apache-2.0
Python
9ad9808b9bf7c202bc6dbbe8abd74e1c642982ae
structure migration
fosfataza/protwis,cmunk/protwis,fosfataza/protwis,cmunk/protwis,fosfataza/protwis,fosfataza/protwis,protwis/protwis,cmunk/protwis,protwis/protwis,protwis/protwis,cmunk/protwis
structure/migrations/0002_structure_refined.py
structure/migrations/0002_structure_refined.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-09-20 07:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('structure', '0001_initial'), ] operations = [ migrations.AddField( model_name='structure', name='refined', field=models.BooleanField(default=False), ), ]
apache-2.0
Python
be01980afe4b1dbd5a1d5b07651cd7a54c771d01
Add unit tests for disk module
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
tests/modules/test_disk.py
tests/modules/test_disk.py
# pylint: disable=C0103,C0111 import mock import unittest import tests.mocks as mocks from bumblebee.input import LEFT_MOUSE from bumblebee.modules.disk import Module class MockVFS(object): def __init__(self, perc): self.f_blocks = 1024*1024 self.f_frsize = 1 self.f_bavail = self.f_blocks - self.f_blocks*(perc/100.0) class TestDiskModule(unittest.TestCase): def setUp(self): mocks.setup_test(self, Module) self._os = mock.patch("bumblebee.modules.disk.os") self.os = self._os.start() self.config.set("disk.path", "somepath") def tearDown(self): self._os.stop() mocks.teardown_test(self) def test_leftclick(self): module = Module(engine=self.engine, config={"config":self.config}) mocks.mouseEvent(stdin=self.stdin, button=LEFT_MOUSE, inp=self.input, module=module) self.popen.assert_call("nautilus {}".format(self.module.parameter("path"))) def test_warning(self): self.config.set("disk.critical", "80") self.config.set("disk.warning", "70") self.os.statvfs.return_value = MockVFS(75.0) self.module.update_all() self.assertTrue("warning" in self.module.state(self.anyWidget)) def test_critical(self): self.config.set("disk.critical", "80") self.config.set("disk.warning", "70") self.os.statvfs.return_value = MockVFS(85.0) self.module.update_all() self.assertTrue("critical" in self.module.state(self.anyWidget)) # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
mit
Python
da52f7c8c9280fe644a01a324eaad5512870dccb
add models.py
SakuraSa/TenhouLoggerX,SakuraSa/TenhouLoggerX,SakuraSa/TenhouLoggerX
core/models.py
core/models.py
#!/usr/bin/env python # coding = utf-8 """ core.models """ __author__ = 'Rnd495' import datetime import hashlib from sqlalchemy import create_engine from sqlalchemy import Column, Integer, Float, String, DateTime, Text, Index from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from configs import Configs configs = Configs.instance() Base = declarative_base() class User(Base): __tablename__ = 'T_User' id = Column(Integer, primary_key=True, autoincrement=True) name = Column(String(length=64), nullable=False, unique=True, index=Index('User_index_name')) pwd = Column(String(length=128), nullable=False) role_id = Column(Integer, nullable=False, index=Index('User_index_role_id')) register_time = Column(DateTime, nullable=False) header_url = Column(String(length=256), nullable=True) def __init__(self, name, pwd, role_id=0, header_url=None): self.name = name self.pwd = User.password_hash(pwd) self.register_time = datetime.datetime.now() self.role_id = role_id self.header_url = header_url def __repr__(self): return "<%s[%s]: %s>" % (type(self).__name__, self.id, self.name) def get_is_same_password(self, password): return User.password_hash(password) == self.pwd def set_password(self, password): self.pwd = hashlib.sha256(self.name + password) class Role(Base): __tablename__ = 'T_Role' id = Column(Integer, primary_key=True, autoincrement=True) name = Column(String(length=64), nullable=False) def __init__(self, name, id=None): self.name = name if id is not None: self.id = id def __repr__(self): return "<%s[%s]: %s>" % (type(self).__name__, self.id, self.name) _engine = None _session_maker = None _session = None def get_engine(): global _engine if not _engine: _engine = create_engine(configs.database_url, echo=False) Base.metadata.create_all(_engine) return _engine def get_session_maker(): global _session_maker if not _session_maker: _session_maker = sessionmaker(bind=get_engine()) return _session_maker def get_global_session(): global _session if not _session: _session = get_session_maker()() return _session def get_new_session(): return get_session_maker()()
mit
Python
ecacda9bab83cd66f25a3ce85f36646c13a61f3f
put full example in its own module
kelle/astropy,joergdietrich/astropy,pllim/astropy,funbaker/astropy,AustereCuriosity/astropy,bsipocz/astropy,pllim/astropy,kelle/astropy,DougBurke/astropy,pllim/astropy,MSeifert04/astropy,astropy/astropy,StuartLittlefair/astropy,MSeifert04/astropy,pllim/astropy,larrybradley/astropy,kelle/astropy,AustereCuriosity/astropy,funbaker/astropy,lpsinger/astropy,lpsinger/astropy,larrybradley/astropy,larrybradley/astropy,aleksandr-bakanov/astropy,mhvk/astropy,joergdietrich/astropy,dhomeier/astropy,lpsinger/astropy,AustereCuriosity/astropy,tbabej/astropy,bsipocz/astropy,astropy/astropy,mhvk/astropy,mhvk/astropy,aleksandr-bakanov/astropy,aleksandr-bakanov/astropy,MSeifert04/astropy,mhvk/astropy,saimn/astropy,stargaser/astropy,DougBurke/astropy,StuartLittlefair/astropy,kelle/astropy,tbabej/astropy,astropy/astropy,StuartLittlefair/astropy,mhvk/astropy,joergdietrich/astropy,bsipocz/astropy,kelle/astropy,stargaser/astropy,dhomeier/astropy,joergdietrich/astropy,aleksandr-bakanov/astropy,saimn/astropy,StuartLittlefair/astropy,saimn/astropy,astropy/astropy,dhomeier/astropy,stargaser/astropy,saimn/astropy,joergdietrich/astropy,lpsinger/astropy,larrybradley/astropy,MSeifert04/astropy,tbabej/astropy,bsipocz/astropy,funbaker/astropy,dhomeier/astropy,DougBurke/astropy,astropy/astropy,StuartLittlefair/astropy,tbabej/astropy,pllim/astropy,tbabej/astropy,saimn/astropy,stargaser/astropy,funbaker/astropy,dhomeier/astropy,lpsinger/astropy,larrybradley/astropy,DougBurke/astropy,AustereCuriosity/astropy,AustereCuriosity/astropy
docs/coordinates/sgr-example.py
docs/coordinates/sgr-example.py
# coding: utf-8 """ Astropy coordinate class for the Sagittarius coordinate system """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os, sys # Third-party import numpy as np from numpy import radians, degrees, cos, sin import astropy.coordinates as coord import astropy.units as u from astropy.coordinates import transformations from astropy.coordinates.angles import rotation_matrix __all__ = ["SgrCoordinates"] class SgrCoordinates(coord.SphericalCoordinatesBase): """ A spherical coordinate system defined by the orbit of the Sagittarius dwarf galaxy, as described in http://adsabs.harvard.edu/abs/2003ApJ...599.1082M and further explained in http://www.astro.virginia.edu/~srm4n/Sgr/. """ __doc__ = __doc__.format(params=coord.SphericalCoordinatesBase. \ _init_docstring_param_templ. \ format(lonnm='Lambda', latnm='Beta')) def __init__(self, *args, **kwargs): super(SgrCoordinates, self).__init__() if len(args) == 1 and len(kwargs) == 0 and isinstance(args[0], coord.SphericalCoordinatesBase): newcoord = args[0].transform_to(self.__class__) self.Lambda = newcoord.Lambda self.Beta = newcoord.Beta self._distance = newcoord._distance else: super(SgrCoordinates, self). _initialize_latlon('Lambda', 'Beta', False, args, kwargs, anglebounds=((0, 360), (-90,90))) def __repr__(self): if self.distance is not None: diststr = ', Distance={0:.2g} {1!s}'.format(self.distance._value, self.distance._unit) else: diststr = '' msg = "<{0} Lambda={1:.5f} deg, Beta={2:.5f} deg{3}>" return msg.format(self.__class__.__name__, self.Lambda.degrees, self.Beta.degrees, diststr) @property def lonangle(self): return self.Lambda @property def latangle(self): return self.Beta # Define the Euler angles phi = radians(180+3.75) theta = radians(90-13.46) psi = radians(180+14.111534) rot11 = cos(psi)*cos(phi)-cos(theta)*sin(phi)*sin(psi) rot12 = cos(psi)*sin(phi)+cos(theta)*cos(phi)*sin(psi) rot13 = sin(psi)*sin(theta) rot21 = -sin(psi)*cos(phi)-cos(theta)*sin(phi)*cos(psi) rot22 = -sin(psi)*sin(phi)+cos(theta)*cos(phi)*cos(psi) rot23 = cos(psi)*sin(theta) rot31 = sin(theta)*sin(phi) rot32 = -sin(theta)*cos(phi) rot33 = cos(theta) rotation_matrix = np.array([[rot11, rot12, rot13], [rot21, rot22, rot23], [rot31, rot32, rot33]]) # Galactic to Sgr coordinates @transformations.transform_function(coord.GalacticCoordinates, SgrCoordinates) def galactic_to_sgr(galactic_coord): """ Compute the transformation from Galactic spherical to Sgr coordinates. """ l = galactic_coord.l.radians b = galactic_coord.b.radians X = cos(b)*cos(l) Y = cos(b)*sin(l) Z = sin(b) # Calculate X,Y,Z,distance in the Sgr system Xs, Ys, Zs = rotation_matrix.dot(np.array([X, Y, Z])) Zs = -Zs # Calculate the angular coordinates lambda,beta Lambda = degrees(np.arctan2(Ys,Xs)) if Lambda<0: Lambda += 360 Beta = degrees(np.arcsin(Zs/np.sqrt(Xs*Xs+Ys*Ys+Zs*Zs))) return SgrCoordinates(Lambda, Beta, distance=galactic_coord.distance, unit=(u.degree, u.degree)) @transformations.transform_function(SgrCoordinates, coord.GalacticCoordinates) def sgr_to_galactic(sgr_coord): L = sgr_coord.Lambda.radians B = sgr_coord.Beta.radians Xs = cos(B)*cos(L) Ys = cos(B)*sin(L) Zs = sin(B) Zs = -Zs X, Y, Z = rotation_matrix.T.dot(np.array([Xs, Ys, Zs])) l = degrees(np.arctan2(Y,X)) b = degrees(np.arcsin(Z/np.sqrt(X*X+Y*Y+Z*Z))) if l<0: l += 360 return coord.GalacticCoordinates(l, b, distance=sgr_coord.distance, unit=(u.degree, u.degree))
bsd-3-clause
Python
4bf1a14f6b6d3b30f30732bb45f4e8a501dfcbf6
test github backup
radiasoft/pykern,radiasoft/pykern
tests/pkcli/github_test.py
tests/pkcli/github_test.py
# -*- coding: utf-8 -*- u"""test github :copyright: Copyright (c) 2019 Bivio Software, Inc. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function import pytest def test_backup(): from pykern import pkconfig pkconfig.reset_state_for_testing({ 'PYKERN_PKCLI_GITHUB_TEST_MODE': '1', 'PYKERN_PKCLI_GITHUB_API_PAUSE_SECONDS': '0', }) from pykern.pkcli import github from pykern import pkunit from pykern import pkio with pkunit.save_chdir_work(): github.backup() github.backup()
apache-2.0
Python
8fdaeea43e31a1c429703cd4f441a748bcfa8197
Create create_mask.py
hochthom/char-repeat
create_mask.py
create_mask.py
from __future__ import print_function import argparse from PIL import ImageFont, ImageDraw, Image def create_mask(text, font_type, font_size=84): ''' Creates an image with the given text in it. ''' # initialize fond with given size font = ImageFont.truetype(font_type, font_size) dx, dy = font.getsize(text) # draw the text to the image mask = Image.new('RGB', (dx, max(dy, font_size))) draw = ImageDraw.Draw(mask) draw.text((0,-int(0.15*font_size)), text, font=font) return mask if __name__ == '__main__': parser = argparse.ArgumentParser(description='Create a mask for char repeat') parser.add_argument('text', help='the text to print on the image') parser.add_argument('font', help='select a font (e.g. SourceCodePro-Black.ttf)') parser.add_argument('-s', dest='font_size', default=84, type=int, help='size of the font') parser.add_argument('-p', action='store_true', dest='plot', help='show image') param = parser.parse_args() mask = create_mask(param.text, param.font, param.font_size) mask.save('mask_%s.png' % param.text) if param.plot: dx, dy = mask.size import matplotlib.pyplot as plt plt.figure() plt.imshow(mask) plt.title('text: %s (mask size = %i x %i)' % (param.text, dx, dy)) plt.show()
mit
Python
79e55030736572608841bbdd3a6022fc2420be45
implement recursive permutation generation algorithm with switch
huiyiqun/permutation-algorithms
switch.py
switch.py
### # A permutation generation algorithm. # this algorithm is implemented by switching neighboring number. # # Under here is two implementation recursive and iterative ### def recursive_PGA_with_switch(width): ''' Recursive permutation generation algorithm with switch ''' # condition assert width > 0 assert type(width) is int # boundary if width == 1: yield '1' return # recursion left = True # direction to move for sub_permutation in recursive_PGA_with_switch(width-1): # positions to insert new number positions = reversed(range(width)) if left else range(width) left = not left for i in positions: perm = [sub_permutation[:i], str(width), sub_permutation[i:]] #print(perm) yield(''.join(perm)) if __name__ == '__main__': for permutation in recursive_PGA_with_switch(3): print(permutation)
mit
Python
dfab68c27b3f25f448c0a2a6d0cee347bae2b08f
Add tests for canonicalize
kvesteri/intervals
tests/test_canonicalize.py
tests/test_canonicalize.py
from intervals import Interval, canonicalize def test_canonicalize(): assert canonicalize(Interval([1, 4])).normalized == '[1, 5)' assert canonicalize( Interval((1, 7)), lower_inc=True, upper_inc=True ).normalized == '[2, 6]' assert canonicalize( Interval([1, 7]), lower_inc=False, upper_inc=True ).normalized == '(0, 7]'
bsd-3-clause
Python
76468926c1efe4d18477a70d767f91d4c6e38768
Add test for dotted circles in sample text
googlefonts/lang
tests/test_dottedcircle.py
tests/test_dottedcircle.py
import uharfbuzz as hb import gflanguages import pytest langs = gflanguages.LoadLanguages() @pytest.fixture def hb_font(): # Persuade Harfbuzz we have a font that supports # every codepoint. face = hb.Face(b"") font = hb.Font(face) funcs = hb.FontFuncs.create() funcs.set_nominal_glyph_func((lambda font,cp,data: cp), None) font.funcs = funcs return font @pytest.mark.parametrize("lang", langs.keys()) def test_dotted_circle(lang, hb_font): item = langs[lang] samples = [x for (_,x) in item.sample_text.ListFields()] for sample in sorted(samples, key=lambda x:len(x)): buf = hb.Buffer() buf.add_str(sample) buf.guess_segment_properties() hb.shape(hb_font, buf) ok = not any(info.codepoint == 0x25CC for info in buf.glyph_infos) assert ok, f"Dotted circle found in {sample} ({lang})"
apache-2.0
Python
7c69ec08967dc38463cfc5e1323d69fd5f261333
Create config.py
yearofthepython/pyvty
config.py
config.py
#!/usr/bin/env python import pyvty user = 'admin' password = 'password' host = '10.36.65.227' config_file = 'config.txt' # name of text file containing config commands. logfile = 'config_' + host + '.log' # terminal output will be saved in this file. try: input_file = open(config_file) commands = input_file.readlines() input_file.close() except IOError as e: print(e) exit() term = pyvty.Terminal(host=host, username=user, password=password, logfile=logfile) term.send('config term') for command in commands: results = term.send(command.rstrip()) for line in results: print(line.rstrip()) # term.send('write mem') ''' save configuration to disk ''' term.send('end') term.write('exit')
mit
Python
7864c8e8591d1de14f18ecfaf880e79de6c7702e
add tests for placeholder class
alphagov/notifications-utils
tests/test_placeholders.py
tests/test_placeholders.py
import re import pytest from notifications_utils.field import Placeholder @pytest.mark.parametrize('body, expected', [ ('((with-brackets))', 'with-brackets'), ('without-brackets', 'without-brackets'), ]) def test_placeholder_returns_name(body, expected): assert Placeholder(body).name == expected @pytest.mark.parametrize('body, is_conditional', [ ('not a conditional', False), ('not? a conditional', False), ('a?? conditional', True), ]) def test_placeholder_identifies_conditional(body, is_conditional): assert Placeholder(body).is_conditional() == is_conditional @pytest.mark.parametrize('body, conditional_text', [ ('a??b', 'b'), ('a?? b ', ' b '), ('a??b??c', 'b??c'), ]) def test_placeholder_gets_conditional_text(body, conditional_text): assert Placeholder(body).conditional_text == conditional_text def test_placeholder_raises_if_accessing_conditional_text_on_non_conditional(): with pytest.raises(ValueError): Placeholder('hello').conditional_text @pytest.mark.parametrize('body, value, result', [ ('a??b', 'Yes', 'b'), ('a??b', 'No', ''), ]) def test_placeholder_gets_conditional_body(body, value, result): assert Placeholder(body).get_conditional_body(value) == result def test_placeholder_raises_if_getting_conditional_body_on_non_conditional(): with pytest.raises(ValueError): Placeholder('hello').get_conditional_body('Yes') def test_placeholder_can_be_constructed_from_regex_match(): match = re.search(r'\(\(.*\)\)', 'foo ((bar)) baz') assert Placeholder.from_match(match).name == 'bar'
mit
Python
9b1f9e9abd2890bc3e4d9f38109f12de8b488b66
Create config.py
Reckasta/FacilityAI
config.py
config.py
username = "facility_ai" password = "UncloakIsADick" client_id = "GORfUXQGjNIveA" client_secret = "SzPFXaqgVbRxm_V9-IfGL05npPE"
mit
Python
17f71bfb81393241759e38fb9dce01561aeca3d5
Add tests to product tags
car3oon/saleor,itbabu/saleor,UITools/saleor,KenMutemi/saleor,maferelo/saleor,KenMutemi/saleor,jreigel/saleor,mociepka/saleor,mociepka/saleor,itbabu/saleor,tfroehlich82/saleor,HyperManTT/ECommerceSaleor,UITools/saleor,HyperManTT/ECommerceSaleor,jreigel/saleor,UITools/saleor,UITools/saleor,tfroehlich82/saleor,itbabu/saleor,UITools/saleor,tfroehlich82/saleor,car3oon/saleor,KenMutemi/saleor,maferelo/saleor,HyperManTT/ECommerceSaleor,mociepka/saleor,car3oon/saleor,jreigel/saleor,maferelo/saleor
tests/test_product_tags.py
tests/test_product_tags.py
from mock import Mock from saleor.product.templatetags.product_images import get_thumbnail, product_first_image def test_get_thumbnail(): instance = Mock() cropped_value = Mock(url='crop.jpg') thumbnail_value = Mock(url='thumb.jpg') instance.crop = {'10x10': cropped_value} instance.thumbnail = {'10x10': thumbnail_value} cropped = get_thumbnail(instance, '10x10', method='crop') assert cropped == cropped_value.url thumb = get_thumbnail(instance, '10x10', method='thumbnail') assert thumb == thumbnail_value.url def test_get_thumbnail_no_instance(): output = get_thumbnail(instance=None, size='10x10', method='crop') assert output == '/static/images/product-image-placeholder.png' def test_product_first_image(): mock_product_image = Mock() mock_product_image.image = Mock() mock_product_image.image.crop = {'10x10': Mock(url='crop.jpg')} mock_queryset = Mock() mock_queryset.all.return_value = [mock_product_image] mock_product = Mock(images=mock_queryset) out = product_first_image(mock_product, '10x10', method='crop') assert out == 'crop.jpg'
bsd-3-clause
Python
27444dfefa70759694b755185c2eb6f25216d326
Remove Node - migration.
devilry/devilry-django,devilry/devilry-django,devilry/devilry-django,devilry/devilry-django
devilry/apps/core/migrations/0037_auto_20170620_1515.py
devilry/apps/core/migrations/0037_auto_20170620_1515.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2017-06-20 15:15 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0036_auto_20170523_1748'), ] operations = [ migrations.AlterUniqueTogether( name='node', unique_together=set([]), ), migrations.RemoveField( model_name='node', name='admins', ), migrations.RemoveField( model_name='node', name='parentnode', ), migrations.RemoveField( model_name='subject', name='parentnode', ), migrations.DeleteModel( name='Node', ), ]
bsd-3-clause
Python
f1cb5af4f42ccf437cdd6ef06a2056993e54b604
Create sum13.py
dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey
Python/CodingBat/sum13.py
Python/CodingBat/sum13.py
# http://codingbat.com/prob/p167025 def sum13(nums): sum = 0 i = 0 while i < len(nums): if nums[i] == 13: i += 2 continue else: sum += nums[i] i += 1 return sum
mit
Python
d408ae00d2e5c0a0e7c5e90e98088d52815c5e49
Create WikiScrape.py
jonathanelbailey/PowerShell-Code-Samples,jonathanelbailey/PowerShell-Code-Samples,jebaile7964/PowerShell-Code-Samples,jebaile7964/PowerShell-Code-Samples
Python/WikiScrape.py
Python/WikiScrape.py
## This script was tested using Python 2.7.9 ## The MWClient library was used to access the api. It can be found at: ## https://github.com/mwclient/mwclient import mwclient site = mwclient.Site(('https', 'en.wikipedia.org')) site.login('$user', '$pass') # credentials are sanitized from the script. listpage = site.Pages['User:jebaile7964/World_of_Warcraft'] text = listpage.text() for page in site.Categories['World_of_Warcraft']: text += "* [[:" + page.name + "]]\n" listpage.save(text, summary='Creating list from [[Category:World_of_Warcraft]]') ## results are found at: ## https://en.wikipedia.org/wiki/User:Jebaile7964/World_of_Warcraft
mit
Python
e455d459590a4f2b16b9a9360b6e33640f5ec7bf
Add a script to check that __all__ in __init__.py is correct
daviddrysdale/python-phonenumbers,roubert/python-phonenumbers,daodaoliang/python-phonenumbers,titansgroup/python-phonenumbers,dongguangming/python-phonenumbers,daviddrysdale/python-phonenumbers,agentr13/python-phonenumbers,gencer/python-phonenumbers,SergiuMir/python-phonenumbers,shikigit/python-phonenumbers,daviddrysdale/python-phonenumbers
python/allcheck.py
python/allcheck.py
#!/usr/bin/env python import sys import re import glob import phonenumbers INTERNAL_FILES = ['phonenumbers/util.py', 'phonenumbers/re_util.py', 'phonenumbers/unicode_util.py'] CLASS_RE = re.compile(r"^class +([A-Za-z][_A-Za-z0-9]+)[ \(:]") FUNCTION_RE = re.compile("^def +([A-Za-z][_A-Za-z0-9]+)[ \(]") CONSTANT_RE = re.compile("^([A-Z][_A-Z0-9]+) *= *") grepped_all = set() for filename in glob.glob('phonenumbers/*.py'): if filename in INTERNAL_FILES: continue with file(filename, "r") as infile: for line in infile: m = CLASS_RE.match(line) if m: grepped_all.add(m.group(1)) m = FUNCTION_RE.match(line) if m: grepped_all.add(m.group(1)) m = CONSTANT_RE.match(line) if m: grepped_all.add(m.group(1)) code_all = set(phonenumbers.__all__) code_not_grepped = (code_all - grepped_all) grepped_not_code = (grepped_all - code_all) if len(code_not_grepped) > 0: print >> sys.stderr, "Found the following in __all__ but not in grepped code:" for identifier in code_not_grepped: print >> sys.stderr, " %s" % identifier if len(grepped_not_code) > 0: print >> sys.stderr, "Found the following in grepped code but not in__all__:" for identifier in grepped_not_code: print >> sys.stderr, " %s" % identifier
apache-2.0
Python
0deec6fecb527f12ff6851c47820b76db8196a34
Add files via upload
annamacmillan/python-drabbles
rosette.py
rosette.py
# This is a basic program showing the functionality of the turtle module. # It generates a very pretty spiraling pattern. import turtle # import the turtle module so we can draw import math # import the math module, we need this for e and pi t = turtle.Pen() # set a variable to draw with t.reset() # clear the screen just in case of leftovers x = 0 # set some variables to play with y = 5 z = 10 while x <= 999: # the more repeats, the larger the pattern t.circle(x,13,2) # this basically sets up 3 arcs which can be varied t.circle(y,17,3) t.circle(z,19,5) x = x + 1 # increment or decrement the radius of each arc by an interesting value y = y / math.e z = z / math.pi
mit
Python
48c844e602eaa182c4efaaa0b977765f4248d0a0
Add a data migration tool
Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot
tools/network_migration.py
tools/network_migration.py
import argparse, shelve def renameDictKeys(storageDict): for key in storageDict.iterkeys(): if isinstance(storageDict[key], dict): renameDictKeys(storageDict[key]) if key == options.oldnetwork: storageDict[options.newnetwork] = storageDict[options.oldnetwork] del storageDict[options.oldnetwork] if __name__ == "__main__": # Parse the command line arguments parser = argparse.ArgumentParser(description="A tool for PyHeufyBot to migrate all storage data from one network " "to another.") parser.add_argument("-s", "--storage", help="The storage file to use", type=str, default="../heufybot.db") parser.add_argument("-o", "--oldnetwork", help="The name of the old network that the data should be migrated " "from.", type=str, required=True) parser.add_argument("-n", "--newnetwork", help="The name of the new network that the data should be migrated to.", type=str, required=True) options = parser.parse_args() storage = shelve.open(options.storage) d = dict(storage) renameDictKeys(d) storage.clear() storage.update(d) storage.close() print "Data has been migrated from '{}' to '{}'.".format(options.oldnetwork, options.newnetwork)
mit
Python
20269212705bdfd8748be468a50567ba290ad4a1
Bump PROVISION_VERSION for new APNS.
hackerkid/zulip,dhcrzf/zulip,kou/zulip,jackrzhang/zulip,rht/zulip,timabbott/zulip,eeshangarg/zulip,mahim97/zulip,jackrzhang/zulip,hackerkid/zulip,punchagan/zulip,showell/zulip,showell/zulip,zulip/zulip,brockwhittaker/zulip,verma-varsha/zulip,dhcrzf/zulip,tommyip/zulip,punchagan/zulip,zulip/zulip,timabbott/zulip,shubhamdhama/zulip,mahim97/zulip,andersk/zulip,kou/zulip,andersk/zulip,brainwane/zulip,synicalsyntax/zulip,tommyip/zulip,synicalsyntax/zulip,zulip/zulip,eeshangarg/zulip,shubhamdhama/zulip,dhcrzf/zulip,rht/zulip,mahim97/zulip,mahim97/zulip,punchagan/zulip,rht/zulip,showell/zulip,synicalsyntax/zulip,timabbott/zulip,punchagan/zulip,amanharitsh123/zulip,jackrzhang/zulip,tommyip/zulip,Galexrt/zulip,synicalsyntax/zulip,hackerkid/zulip,brainwane/zulip,eeshangarg/zulip,mahim97/zulip,rht/zulip,zulip/zulip,synicalsyntax/zulip,synicalsyntax/zulip,verma-varsha/zulip,rht/zulip,hackerkid/zulip,shubhamdhama/zulip,Galexrt/zulip,amanharitsh123/zulip,zulip/zulip,amanharitsh123/zulip,timabbott/zulip,shubhamdhama/zulip,brainwane/zulip,hackerkid/zulip,hackerkid/zulip,andersk/zulip,punchagan/zulip,Galexrt/zulip,brockwhittaker/zulip,rht/zulip,synicalsyntax/zulip,dhcrzf/zulip,showell/zulip,Galexrt/zulip,andersk/zulip,rishig/zulip,timabbott/zulip,eeshangarg/zulip,Galexrt/zulip,timabbott/zulip,dhcrzf/zulip,verma-varsha/zulip,verma-varsha/zulip,rishig/zulip,punchagan/zulip,zulip/zulip,tommyip/zulip,andersk/zulip,kou/zulip,rishig/zulip,rishig/zulip,eeshangarg/zulip,Galexrt/zulip,punchagan/zulip,tommyip/zulip,verma-varsha/zulip,amanharitsh123/zulip,kou/zulip,Galexrt/zulip,zulip/zulip,hackerkid/zulip,brainwane/zulip,mahim97/zulip,timabbott/zulip,brockwhittaker/zulip,jackrzhang/zulip,brainwane/zulip,rishig/zulip,kou/zulip,tommyip/zulip,shubhamdhama/zulip,andersk/zulip,andersk/zulip,dhcrzf/zulip,brockwhittaker/zulip,rishig/zulip,showell/zulip,shubhamdhama/zulip,verma-varsha/zulip,brainwane/zulip,amanharitsh123/zulip,kou/zulip,brainwane/zulip,brockwhittaker/zulip,tommyip/zulip,jackrzhang/zulip,jackrzhang/zulip,kou/zulip,dhcrzf/zulip,jackrzhang/zulip,eeshangarg/zulip,showell/zulip,amanharitsh123/zulip,brockwhittaker/zulip,showell/zulip,rht/zulip,rishig/zulip,eeshangarg/zulip,shubhamdhama/zulip
version.py
version.py
ZULIP_VERSION = "1.6.0+git" PROVISION_VERSION = '9.4'
ZULIP_VERSION = "1.6.0+git" PROVISION_VERSION = '9.3'
apache-2.0
Python
bd2cfd63ce51c55c695a12dc13e9ac52872cea5a
Add ternary_axes_subplot.py
marcharper/python-ternary,btweinstein/python-ternary
ternary/ternary_axes_subplot.py
ternary/ternary_axes_subplot.py
""" Wrapper class for all ternary plotting functions. """ from matplotlib import pyplot import heatmapping import lines import plotting def figure(ax=None, scale=None): """ Wraps a Matplotlib AxesSubplot or generates a new one. Emulates matplotlib's > figure, ax = pyplot.subplot() Parameters ---------- ax: AxesSubplot, None The AxesSubplot to wrap scale: float, None The scale factor of the ternary plot """ ternary_ax = TernaryAxesSubplot(ax=ax, scale=scale) return ternary_ax.get_figure(), ternary_ax class TernaryAxesSubplot(object): """Wrapper for python-ternary and matplotlib figure.""" def __init__(self, ax=None, scale=None): if not scale: scale = 1.0 if ax: self.ax = ax self.figure = ax.get_figure() else: self.figure, self.ax = pyplot.subplots() self.set_scale(scale=scale) def __repr__(self): return "TernaryAxesSubplot: %s" % self.ax.__hash__() def resize_drawing_canvas(self): plotting.resize_drawing_canvas(self.ax, scale=self.get_scale()) def get_figure(self): return self.figure def set_scale(self, scale=None): self._scale = scale self.resize_drawing_canvas() def get_scale(self): return self._scale def get_axes(self): return self.ax def scatter(self, points, **kwargs): plot_ = plotting.scatter(points, ax=self.ax, **kwargs) return plot_ def plot(self, points, **kwargs): plotting.plot(points, ax=self.ax, **kwargs) def clear_matplotlib_ticks(self, axis="both"): plotting.clear_matplotlib_ticks(ax=self.ax, axis=axis) def left_axis_label(self, label, **kwargs): plotting.left_axis_label(self.ax, label, **kwargs) def right_axis_label(self, label, **kwargs): plotting.right_axis_label(self.ax, label, **kwargs) def bottom_axis_label(self, label, **kwargs): plotting.bottom_axis_label(self.ax, label, **kwargs) def heatmap(self, data, scale=None, cmap_name=None, scientific=False, style='triangular', colorbar=True): if not scale: scale = self._scale heatmapping.heatmap(data, scale, cmap_name=cmap_name, style=style, ax=self.ax, scientific=scientific, colorbar=colorbar) def heatmapf(self, func, scale=None, cmap_name=None, boundary=True, style='triangular', colorbar=True, scientific=True): if not scale: scale = self._scale heatmapping.heatmapf(func, scale, cmap_name=cmap_name, style=style, boundary=boundary, ax=self.ax, scientific=scientific, colorbar=colorbar) def line(self, p1, p2, **kwargs): lines.line(self.ax, p1, p2, **kwargs) def horizontal_line(self, i, **kwargs): lines.horizontal_line(self.ax, self.get_scale(), i, **kwargs) def left_parallel_line(self, i, **kwargs): lines.left_parallel_line(self.ax, self.get_scale(), i, **kwargs) def right_parallel_line(self, i, **kwargs): lines.right_parallel_line(self.ax, self.get_scale(), i, **kwargs) def boundary(self, scale=None, **kwargs): # Sometimes you want to draw a bigger boundary if not scale: scale = self.get_scale() lines.boundary(scale=scale, ax=self.ax, **kwargs) def gridlines(self, multiple=None, **kwargs): lines.gridlines(scale=self.get_scale(), multiple=multiple, ax=self.ax, **kwargs) def set_title(self, title, **kwargs): self.ax.set_title(title, **kwargs) def save_fig(self, filename, dpi=200, format=None): self.figure.save_fig(filename, format=format, dpi=dpi) def legend(self): self.ax.legend() def show(self): pyplot.show()
mit
Python
426f9c0b63adf7d7085a45bfe3520eb36a2ad6f7
Fix indents.
ayust/evelink,FashtimeDotCom/evelink,bastianh/evelink,Morloth1274/EVE-Online-POCO-manager,zigdon/evelink
evelink/parsing/assets.py
evelink/parsing/assets.py
from evelink import api from evelink import constants def parse_assets(api_result): def handle_rowset(rowset, parent_location): results = [] for row in rowset.findall('row'): item = {'id': int(row.attrib['itemID']), 'item_type_id': int(row.attrib['typeID']), 'location_id': int(row.attrib.get('locationID', parent_location)), 'location_flag': int(row.attrib['flag']), 'quantity': int(row.attrib['quantity']), 'packaged': row.attrib['singleton'] == '0', } contents = row.find('rowset') if contents: item['contents'] = handle_rowset(contents, item['location_id']) results.append(item) return results result_list = handle_rowset(api_result.find('rowset'), None) # For convenience, key the result by top-level location ID. result_dict = {} for item in result_list: location = item['location_id'] result_dict.setdefault(location, {}) result_dict[location]['location_id'] = location result_dict[location].setdefault('contents', []) result_dict[location]['contents'].append(item) return result_dict
from evelink import api from evelink import constants def parse_assets(api_result): def handle_rowset(rowset, parent_location): results = [] for row in rowset.findall('row'): item = {'id': int(row.attrib['itemID']), 'item_type_id': int(row.attrib['typeID']), 'location_id': int(row.attrib.get('locationID', parent_location)), 'location_flag': int(row.attrib['flag']), 'quantity': int(row.attrib['quantity']), 'packaged': row.attrib['singleton'] == '0', } contents = row.find('rowset') if contents: item['contents'] = handle_rowset(contents, item['location_id']) results.append(item) return results result_list = handle_rowset(api_result.find('rowset'), None) # For convenience, key the result by top-level location ID. result_dict = {} for item in result_list: location = item['location_id'] result_dict.setdefault(location, {}) result_dict[location]['location_id'] = location result_dict[location].setdefault('contents', []) result_dict[location]['contents'].append(item) return result_dict
mit
Python
35076b373913381a90aa65e8052036eb51eece46
add unicode_literals in utils
9p0le/simiki,zhaochunqi/simiki,9p0le/simiki,zhaochunqi/simiki,tankywoo/simiki,zhaochunqi/simiki,tankywoo/simiki,tankywoo/simiki,9p0le/simiki
simiki/utils.py
simiki/utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals import os import shutil import errno from os import path as osp RESET_COLOR = "\033[0m" COLOR_CODES = { "debug" : "\033[1;34m", # blue "info" : "\033[1;32m", # green "warning" : "\033[1;33m", # yellow "error" : "\033[1;31m", # red "critical" : "\033[1;41m", # background red } def color_msg(level, msg): return COLOR_CODES[level] + msg + RESET_COLOR def check_path_exists(path): """Check if the path(include file and directory) exists""" if osp.exists(path): return True return False def check_extension(filename): """Filter file by suffix If the file suffix not in the allowed suffixes, the return true and filter. The `fnmatch` module can also get the suffix: patterns = ["*.md", "*.mkd", "*.markdown"] fnmatch.filter(files, pattern) """ # Allowed suffixes ( aka "extensions" ) exts = {".md", ".mkd", ".mdown", ".markdown"} return osp.splitext(filename)[1] in exts #def copytree(src, dst): # try: # shutil.copytree(src, dst) # except OSError as exc: # python >2.5 # if exc.errno == errno.ENOTDIR: # shutil.copy(src, dst) # else: raise def copytree(src, dst, symlinks=False, ignore=None): # OSError: [Errno 17] File exists: '/home/tankywoo/simiki/html/css' if not osp.exists(dst): os.makedirs(dst) for item in os.listdir(src): s = osp.join(src, item) d = osp.join(dst, item) if osp.isdir(s): shutil.copytree(s, d, symlinks, ignore) else: shutil.copy2(s, d) if __name__ == "__main__": print(color_msg("debug", "DEBUG")) print(color_msg("info", "DEBUG")) print(color_msg("warning", "WARNING")) print(color_msg("error", "ERROR")) print(color_msg("critical", "CRITICAL"))
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import shutil import errno from os import path as osp RESET_COLOR = "\033[0m" COLOR_CODES = { "debug" : "\033[1;34m", # blue "info" : "\033[1;32m", # green "warning" : "\033[1;33m", # yellow "error" : "\033[1;31m", # red "critical" : "\033[1;41m", # background red } def color_msg(level, msg): return COLOR_CODES[level] + msg + RESET_COLOR def check_path_exists(path): """Check if the path(include file and directory) exists""" if osp.exists(path): return True return False def check_extension(filename): """Filter file by suffix If the file suffix not in the allowed suffixes, the return true and filter. The `fnmatch` module can also get the suffix: patterns = ["*.md", "*.mkd", "*.markdown"] fnmatch.filter(files, pattern) """ # Allowed suffixes ( aka "extensions" ) exts = {".md", ".mkd", ".mdown", ".markdown"} return osp.splitext(filename)[1] in exts #def copytree(src, dst): # try: # shutil.copytree(src, dst) # except OSError as exc: # python >2.5 # if exc.errno == errno.ENOTDIR: # shutil.copy(src, dst) # else: raise def copytree(src, dst, symlinks=False, ignore=None): # OSError: [Errno 17] File exists: '/home/tankywoo/simiki/html/css' if not osp.exists(dst): os.makedirs(dst) for item in os.listdir(src): s = osp.join(src, item) d = osp.join(dst, item) if osp.isdir(s): shutil.copytree(s, d, symlinks, ignore) else: shutil.copy2(s, d) if __name__ == "__main__": print(color_msg("debug", "DEBUG")) print(color_msg("info", "DEBUG")) print(color_msg("warning", "WARNING")) print(color_msg("error", "ERROR")) print(color_msg("critical", "CRITICAL"))
mit
Python
d72d2e38d177476470b22ded061dd06b2be3ee88
Add the quantity-safe allclose from spectral-cube
e-koch/TurbuStat,Astroua/TurbuStat
turbustat/tests/helpers.py
turbustat/tests/helpers.py
from __future__ import print_function, absolute_import, division from astropy import units as u from numpy.testing import assert_allclose as assert_allclose_numpy, assert_array_equal def assert_allclose(q1, q2, **kwargs): """ Quantity-safe version of Numpy's assert_allclose Copyright (c) 2014, spectral-cube developers All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ if isinstance(q1, u.Quantity) and isinstance(q2, u.Quantity): assert_allclose_numpy(q1.to(q2.unit).value, q2.value, **kwargs) elif isinstance(q1, u.Quantity): assert_allclose_numpy(q1.value, q2, **kwargs) elif isinstance(q2, u.Quantity): assert_allclose_numpy(q1, q2.value, **kwargs) else: assert_allclose_numpy(q1, q2, **kwargs)
mit
Python
6c3d92a2d3eb043e466e3d6ab8e303c025cc7e0a
add ColorPrinter.py
legend80s/ColorPrinter
ColorPrinter.py
ColorPrinter.py
class ColorPrinter: """ print message to terminal with colored header """ def __init__(self, header=''): self.__header = header self.__levels = { 'log': '\033[0m', # terminal color header 'info': '\033[1;32;40m', # green header 'warn': '\033[1;33;40m', # yellow header 'error': '\033[1;31;40m', # red header } def setHeader(self, header=''): self.__header = header def __format(self, message, level='log'): header = self.__levels.get(level, self.__levels['log']) + self.__header + self.__levels['log'] if self.__header else '' body = ' ' + message if message else '' return header + body # `info` print the message with terminal color header def log(self, message='', *others): print self.__format(' '.join((message,) + others), 'log') return self # `info` print the message with green header def info(self, message='', *others): print self.__format(' '.join((message,) + others), 'info') return self # `warn` print the message with yellow header def warn(self, message='', *others): print self.__format(' '.join((message,) + others), 'warn') return self # `error` print the message with red header def error(self, message='', *others): print self.__format(' '.join((message,) + others), 'error') return self
mit
Python