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
d8a04ecfc1035620270447c40e4a47cfda03a6df
Update pixel baselines after Intel D3D11 change.
fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,dednal/chromium.src,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,cro...
content/test/gpu/page_sets/pixel_tests.py
content/test/gpu/page_sets/pixel_tests.py
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry.page.actions.all_page_actions import * from telemetry.page import page as page_module from telemetry.page import ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry.page.actions.all_page_actions import * from telemetry.page import page as page_module from telemetry.page import ...
bsd-3-clause
Python
fb5841bada45d17c2e0edb52508f24d50127c0ae
remove lca19 title hack
xfxf/veyepar,xfxf/veyepar,CarlFK/veyepar,CarlFK/veyepar,xfxf/veyepar,CarlFK/veyepar,xfxf/veyepar,xfxf/veyepar,CarlFK/veyepar,CarlFK/veyepar
dj/scripts/mk_titles.py
dj/scripts/mk_titles.py
#!/usr/bin/python # creates svg titles for all the episodes # used to preview the title slides, # enc.py will re-run the same code. import os import subprocess from enc import enc from main.models import Client, Show, Location, Episode, Raw_File, Cut_List class mk_title(enc): ready_state = None def proce...
#!/usr/bin/python # creates svg titles for all the episodes # used to preview the title slides, # enc.py will re-run the same code. import os import subprocess # from enc import enc from lca2019_enc import enc from main.models import Client, Show, Location, Episode, Raw_File, Cut_List class mk_title(enc): rea...
mit
Python
49ed704f02b686888aef81eafb1a3c57910f9d74
Add a script which split your region in smaller sample
aguijarro/DataSciencePython
DataWrangling/CaseStudy/sample_file.py
DataWrangling/CaseStudy/sample_file.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import xml.etree.ElementTree as ET # Use cElementTree or lxml if too slow import os OSM_FILE = "san-francisco-bay_california.osm" # Replace this with your osm file SAMPLE_FILE = "sample_sfb.osm" k = 20 # Parameter: take every k-th top level element def get_element(osm...
mit
Python
3fe83c86334fbec2811e37333796a3137865a345
Create java8.py
hatchery/Genepool2,hatchery/genepool
java8.py
java8.py
# this is the dumb, blocking version from genes import app, debconf, ppa, brew, cask import platform op_sys = platform.system() dist = platform.linux_distribution() if os_sys == "Linux" and (dist == 'Ubuntu' or dist == 'Debian'): apt.update() apt.install('software-properties-common', 'python-software-properti...
mit
Python
23e953749e4024130db102d30b2088e9bfae0e3b
Bump version to 1.2.15 for new release.
bileto/transitfeed,google/transitfeed,Censio/transitfeed,galvinford/transitfeed,avilaton/transitfeed,digideskio/transitfeed,zarnold/transitfeed,galvinford/transitfeed,avilaton/transitfeed,Censio/transitfeed,bileto/transitfeed,zarnold/transitfeed,zarnold/transitfeed,digideskio/transitfeed,google/transitfeed,Censio/trans...
transitfeed/version.py
transitfeed/version.py
# Copyright (C) 2014 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 writ...
# Copyright (C) 2014 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 writ...
apache-2.0
Python
38f43f5555a799afbec8adb2fc09e895a3c71637
Add utility to strip HTML
cdown/srt
strip-html.py
strip-html.py
#!/usr/bin/env python import re import srt import utils def strip_html_from_subs(subtitles): for subtitle in subtitles: subtitle_lines = subtitle.content.splitlines() stripped_subtitle_lines = ( re.sub('<[^<]+?>', '', line) for line in subtitle_lines ) subtitle.content...
mit
Python
6749e116f47b9307571e016762b3ff918445ba9e
Add Tweet / update status example
tweepy/tweepy,svven/tweepy
examples/update_status.py
examples/update_status.py
import tweepy consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth) # Tweet / Update Status # The app and the corresponding credentials must have th...
mit
Python
c6d2a791a9984855dbaad026e741723ad129c137
Convert the data from a Matlab -v6 file to numpy "npz".
castelao/python-gsw,lukecampbell/python-gsw,rabernat/python-gsw,TEOS-10/python-gsw,ocefpaf/python-gsw
gsw/utilities/mat2npz.py
gsw/utilities/mat2npz.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # mat2npz.py # # purpose: Convert matlab file from TEOS-10 group to a npz file # author: Filipe P. A. Fernandes # e-mail: ocefpaf@gmail # web: http://ocefpaf.tiddlyspot.com/ # created: 06-Jun-2011 # modified: Wed 02 May 2012 04:29:32 PM EDT # # obs: # import n...
mit
Python
192c3316422b4c3f844ec60b3686cc8f3e790335
add solution for Add Digits
zhyu/leetcode,zhyu/leetcode
algorithms/addDigits/addDigits.py
algorithms/addDigits/addDigits.py
class Solution: # @param {integer} num # @return {integer} def addDigits(self, num): if num == 0: return 0 rem = num % 9 if rem == 0: return 9 return rem
mit
Python
30277582cbd3a98d0f6bf640effee15fae4d11dd
add example for points overlay on maps
altair-viz/altair,jakevdp/altair
altair/examples/airports_count.py
altair/examples/airports_count.py
""" Locations of US Airports ======================== This is a layered geographic visualization that shows the positions of US airports on a background of US states. """ # category: maps import altair as alt from vega_datasets import data airports = data.airports() airports_counts = airports[['state','latitude', 'lon...
bsd-3-clause
Python
1e57db3c0b7eb75a7f72ced846d3d12090b72757
Add lc0349_intersection_of_two_arrays.py
bowen0701/algorithms_data_structures
lc0349_intersection_of_two_arrays.py
lc0349_intersection_of_two_arrays.py
"""Leetcode 349. Intersection of Two Arrays Easy URL: Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2] Example 2: Input: nums1 = [4,9,5], nums2 = [9,4,9,8,4] Output: [9,4] Note: - Each element in the result must be unique. - The resul...
bsd-2-clause
Python
23b80f5a5bd5f418e8da229f39d9912b0b4e8e77
Add a main function with top-level logic
robbie-c/git-lang-guesser
git-lang-guesser/guesser.py
git-lang-guesser/guesser.py
import argparse import http.client import pprint from . import exceptions from . import git_requester from . import guess_lang def main(): parser = argparse.ArgumentParser("git-lang-guesser") parser.add_argument("username") parser.add_argument("--list-all", action="store_true") args = parser.parse_...
mit
Python
803b25401dde19240a78e511357998871968fc8c
Add setup.py for official models.
tombstone/models,alexgorban/models,tombstone/models,alexgorban/models,tombstone/models,tombstone/models,tombstone/models,alexgorban/models,alexgorban/models,alexgorban/models,tombstone/models
official/pip_package/setup.py
official/pip_package/setup.py
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
Python
24e73e790c97ea74a2316a40852283bc26fce8a9
add ftp_upload
J216/gimp_be,J216/gimp_be
gimp_be/network/ftp_upload.py
gimp_be/network/ftp_upload.py
def qRC(opt='0',ftp_home="." ): if opt =='0': global session session = ftplib.FTP('192.168.0.121','dave','DaveTroB4E') if not ftp_home == ".": session.cwd(ftp_home) print 'FTP Connected' return session def listFTPFolders(ftp=''): if ftp == '': ftp = qRC() ...
mit
Python
51a02400370a9d8b361122a5aa13a0f28f1e412c
add solution to problem 1
eito/project-euler
p0001.py
p0001.py
#!/usr/bin/env python # returns set of natural numbers less # than 'less_than' and a multiple of the values in 'multiples_of' # e.g. less_than=10 and multiple_of=[3,5] would return [0, 3, 5, 6, 9] def natural_numbers_multiple(less_than=0, multiples_of=[]): return set([x for x in xrange(0,less_than) for m in multiple...
mit
Python
8a6992f87d74d9f0006fec12b02eb7d381c35974
solve even_tree challenge
talevy/challenges,talevy/challenges
even_tree/python/main.py
even_tree/python/main.py
import collections import sys def update_counts(root, nodes, counts): for c in nodes[root]: update_counts(c, nodes, counts) counts[root] = sum([counts[c] for c in nodes[root]]) + 1 def cut_even_forest(root, nodes, counts): child_cut_count = 0 for c in nodes[root]: if counts[c] % 2 == 0...
mit
Python
2cfac1776d27fc4997e19cd5ce1daaa5722cb66e
Add generate_table.py which I've only been using locally
FichteFoll/InsertDate,FichteFoll/InsertDate
generate_table.py
generate_table.py
"""This is just the code I use to generate the example table for the readme. """ from format_date import FormatDate formats = [ { 'format': "%d/%m/%Y %I:%M %p"}, { 'format': "%d. %b %y"}, { 'format': "%H:%M:%S.%f%z"}, { 'format': "%Y-%m-%dT%H:%M:%S.%f%z"}, { 'format': "iso", 'tz_out': "UTC"}...
mit
Python
12627a359e71bdf645d25f4fdaab9c9767264f30
Add generate graph example
JackyTung/tensorgraph,JackyTung/tensorgraph
gengraph/mnist.py
gengraph/mnist.py
# ************************************************************************** # MIT License # # Copyright (c) [2016-2018] [Jacky-Tung] # # 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...
mit
Python
ded91226a41c0c7a11b5c9e2e3388755cbd6dd01
Create Main.py2.py
neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu...
POH7/Mizugi/Main.py2.py
POH7/Mizugi/Main.py2.py
# coding: utf-8 # Try POH # author: Leonardone @ NEETSDKASU # ------------------------------------------------------ def gs(): return raw_input().strip() def gi(): return int(gs()) def gl(): return long(gs()) def gss(): return gs().split() def gis(): return map(int, gss()) def nmapf(n, f): return [f() for _ in ...
mit
Python
609d1fdf8002c70cffc5c5b1ab4ce8da7d545983
Create 0001_1.py
Yrthgze/prueba-sourcetree2,Show-Me-the-Code/python,Yrthgze/prueba-sourcetree2,Show-Me-the-Code/python,Show-Me-the-Code/python,Show-Me-the-Code/python,Show-Me-the-Code/python,Yrthgze/prueba-sourcetree2,Yrthgze/prueba-sourcetree2,Yrthgze/prueba-sourcetree2,Show-Me-the-Code/python,Yrthgze/prueba-sourcetree2
pylyria/0001/0001_1.py
pylyria/0001/0001_1.py
# -*- coding: utf-8 -*- #!/usr/bin/env python #第 0001 题:做为 Apple Store App 独立开发者,你要搞限时促销,为你的应用生成激活码(或者优惠券),使用 Python 如何生成 200 个激活码(或者优惠券)? import random import string def activation_code(chars = string.ascii_uppercase + string.digits, length=16): return ''.join([random.choice(chars) for i in range(length)]) if __...
mit
Python
0ea33e658cdbf0605ee4a2f28a1e0cd24a57b608
Add AGS (Adventure Game Studio) example
yask123/rockstar,varunparkhe/rockstar,monsterwater/rockstar,gokaygurcan/rockstar,haosdent/rockstar,jrajath94/RockStar,ActuallyACat/rockstar,Endika/rockstar,jehb/rockstar,avinassh/rockstar
examples/ags_rockstar.py
examples/ags_rockstar.py
from rockstar import RockStar ags_code = "Display("Hello, world!");" rock_it_bro = RockStar(days=777, file_name='helloworld.asc', code=ags_code) rock_it_bro.make_me_a_rockstar()
mit
Python
b0689763492bd0713bb7cff444fc354f4c2656a8
Add missing data migration
MTG/dunya,MTG/dunya,MTG/dunya,MTG/dunya
data/migrations/0005_auto_20181205_0923.py
data/migrations/0005_auto_20181205_0923.py
# Generated by Django 2.1.2 on 2018-12-05 08:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('data', '0004_delete_visitlog'), ] operations = [ migrations.AlterField( model_name='collection', name='permission', ...
agpl-3.0
Python
7b527400c162ad6810f938c38e06fdb68e488467
Create Multiplication table in Excel
terrameijar/useful_scripts
multiplication_table.py
multiplication_table.py
#! /usr/bin/env python # multiplication_table.py -- Creates a multiplication table in excel import sys import openpyxl from openpyxl.styles import Font # A program that takes a number N from the command line # and creates an NxN multiplication table in an Excel spreadsheet. try: usr_input = int(sys.argv[1]) excep...
mit
Python
f30567316610a4f0e3eb78ac4b04aec3f42fe77d
Add a context processor for Inboxen/webite#67
Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/infrastructure
inboxen/context_processors.py
inboxen/context_processors.py
## # Copyright (C) 2013 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen front-end. # # Inboxen front-end is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 ...
agpl-3.0
Python
1cad7cd82866383624f4bcc0c16a1d7b3b39e75b
Create vk_post_sqllite_saver.py
kawaiigamer/py_parsers
vk_post_sqllite_saver.py
vk_post_sqllite_saver.py
import vk_api,datetime,requests,sqlite3,collections def get_vk_image(url): try: response = requests.get(url) if response.status_code == 200: return response.content else: return None except Exception: return None def ddict_examp(src): l = [] for...
unlicense
Python
8a1ae3d21b96f1ad2742537a5bf5ce9ac0ce215e
add atomic open/write operation
hgn/hippod,hgn/hippod,hgn/hippod,hgn/hippod
hippod/utils_file.py
hippod/utils_file.py
import os import datetime from contextlib import contextmanager @contextmanager def atomic_write(filepath, binary=False): tmppath = filepath + '~' while os.path.isfile(tmppath): tmppath += '~' try: with open(tmppath, 'wb' if binary else 'w') as file: yield file file...
mit
Python
f14ae99f77ec6e929826d0626fe2b89e0ec2e100
Create networkAddProperties.py
hua372494277/protein-contact-maps
networkAddProperties.py
networkAddProperties.py
# calculate the clustering coefficient, characteristic path length, entropy, assortativity coefficient, # Diameter and Radius of the network based on the coordinate of C atoms import math import networkx as nx fromP = r'D:\NextIdea\pdbChain' fr = open(r'D:\NextIdea\Dataset\scopClassHelixSheetpercentageNew.csv') fw = ...
bsd-3-clause
Python
559a0ea0f43f183170ee2d0d71f100fdd75ec355
read ar files without requiring binutils
fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary
conary/lib/ar.py
conary/lib/ar.py
# Copyright (c) 2008 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/permanent/li...
apache-2.0
Python
01775ed317aeb20a278b57136784905e774c5356
Add tests for defaultnamedtuple
nvander1/skrt
tests/test_defaultnamedtuple.py
tests/test_defaultnamedtuple.py
from nose.tools import raises from skrt.containers import defaultnamedtuple def setup_module(): global Name Name = defaultnamedtuple('Name', 'first', 'last', middle='', prefix='Mr.') def test_positional_arg_assignment(): john_doe = Name('John', 'Doe') assert john_doe.first == 'John' assert john...
mit
Python
01a5f56238b7a0906414b538ee21d463dd583d98
Improve stack tests
jay-tyler/data-structures,jonathanstallings/data-structures
test_stack.py
test_stack.py
from __future__ import unicode_literals import pytest from stack import Stack @pytest.fixture def base_stack(): return Stack([1, 2, 3]) def test_construct_from_iterable_valid(base_stack): expected_output = "(1, 2, 3)" assert base_stack.__repr__() == expected_output def test_construct_from_nested_iter...
mit
Python
835538ba0240c823d7bb5fb6dc4bd66a7e346823
add solution to problem 6
eito/project-euler
p0006.py
p0006.py
#!/usr/bin/env python """ The sum of the squares of the first ten natural numbers is, 12 + 22 + ... + 102 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)2 = 552 = 3025 Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is...
mit
Python
1959e163c9644933fb1838cb9c75865dd65d8da0
add roles schema
rohitdatta/pepper,rohitdatta/pepper,rohitdatta/pepper
nucleus/roles/models.py
nucleus/roles/models.py
from nucleus.app import DB class Role(DB.Model): id = DB.Column(DB.Integer, primary_key=True) name = DB.Column(DB.String(50), unique=True) class UserRoles(DB.Model): id = DB.Column(DB.Integer, primary_key=True) user_id = DB.Column(DB.Integer, DB.ForeignKey('user.id', ondelete='CASCADE')) role_id = DB.Column(DB.I...
agpl-3.0
Python
f7c73cf3a9e768a713bf4276076667c7244ccd98
Purge contrail DB
pedro-r-marques/examples,pedro-r-marques/examples,pedro-r-marques/examples,rombie/examples,rombie/examples
purge.py
purge.py
import vnc_api.vnc_api NETWORKS_EXCLUDE=[ 'default-domain:default-project:__link_local__', 'default-domain:default-project:default-virtual-network', 'default-domain:default-project:ip-fabric', 'default-domain:default-project:Public', ] POLICIES_EXCLUDE=[ 'default-domain:default-project:default...
cc0-1.0
Python
175d2c1b1a56142d2511adefe1b24177580c997a
Add merge migration
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
portal/migrations/versions/167b44b795e4_.py
portal/migrations/versions/167b44b795e4_.py
"""empty message Revision ID: 167b44b795e4 Revises: ('481d8266a4c0', 'c3d394d9dfd1') Create Date: 2021-01-21 00:41:30.655455 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '167b44b795e4' down_revision = ('481d8266a4c0', 'c3d394d9dfd1') def upgrade(): pas...
bsd-3-clause
Python
bd432e58e5f9c40bb6735840928b300fbd911639
add basic email handler
masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api
web/impact/impact/minimal_email_handler.py
web/impact/impact/minimal_email_handler.py
from django.conf import settings from django.core.mail import EmailMultiAlternatives class MinimalEmailHandler: ''' A simplistic outgoing email handler, to consolidate outgoing mail sending needs of impact-api calls attachment, if any, should be a triple of (filename, content, filetype) attach_alte...
mit
Python
f2608bbfb2270907c93b694dec8638ac0fe45424
add slow_ops_2_gtrace.py
daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine,daverigby/kv_engine
engines/ep/management/slow_ops_2_gtrace.py
engines/ep/management/slow_ops_2_gtrace.py
#!/usr/bin/env python # Copyright 2018 Couchbase, 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 ap...
bsd-3-clause
Python
39147b41147cb4551e60d1356be1795822ae7d72
Upgrade to backfill existing observations with a dummy audit row so we can require audits for all observations.
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
migrations/versions/12113d3fcab1_.py
migrations/versions/12113d3fcab1_.py
"""empty message Revision ID: 12113d3fcab1 Revises: 85ee128c8304 Create Date: 2016-05-26 16:35:36.442452 """ # revision identifiers, used by Alembic. revision = '12113d3fcab1' down_revision = '85ee128c8304' from datetime import datetime from alembic import op import sqlalchemy as sa from sqlalchemy.sql import text ...
bsd-3-clause
Python
829f3e2c45b7d0454e7245d1dc688687b2ffeb54
Add migration back
Zarkantho/placebo.gov,Zarkantho/placebo.gov,Zarkantho/placebo.gov
migrations/versions/1262886607dc_.py
migrations/versions/1262886607dc_.py
"""empty message Revision ID: 1262886607dc Revises: 375bc72d1423 Create Date: 2015-05-09 22:03:46.514608 """ # revision identifiers, used by Alembic. revision = '1262886607dc' down_revision = '375bc72d1423' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
bsd-3-clause
Python
66ee9c37fb9e2a243c7b9ff1b427ecec74752636
Add new pickle impl from 5.0.0 as IRNewPickleField
kata198/indexedredis,kata198/indexedredis
IndexedRedis/fields/new_pickle.py
IndexedRedis/fields/new_pickle.py
# Copyright (c) 2014, 2015, 2016, 2017 Timothy Savannah under LGPL version 2.1. See LICENSE for more information. # # fields.pickle - Some types and objects related to pickled . Use this in place of IRField ( in FIELDS array ) to activate # vim:set ts=8 shiftwidth=8 softtabstop=8 noexpandtab : import sys from . imp...
lgpl-2.1
Python
ac32c977ff648f7cb4736c8baff1112f4943850d
Create httplib2_brute.py
liorvh/pythonpentest,liorvh/pythonpentest,liorvh/pythonpentest,funkandwagnalls/pythonpentest,funkandwagnalls/pythonpentest,funkandwagnalls/pythonpentest
httplib2_brute.py
httplib2_brute.py
#!/usr/bin/env python ''' Author: Christopher Duffy Date: April 2015 Name: httpllib2_brute.py Purpose: Prototype code that allows you to build a multiple request response train with the httplib2 library ''' import urllib, httplib2, argparse, sys def host_test(users, passes, target): with open(users) as f: ...
bsd-3-clause
Python
40470fae600a68ceeb81edcd5d2cbc1468d46f95
add cutfill cli tool
mrahnis/orangery
orangery/cli/cutfill.py
orangery/cli/cutfill.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Displays a plot of a repeat survey with cut and fill. The console prompts the user to assign a material to each polygon along the line of section. Then saves a CSV file containing the net gain or loss of fine sediment. """ # use a different backend such as TkAgg or We...
bsd-3-clause
Python
a45fb5a9fcbc5281f12aa8f2edfde8e86bbef54b
add test cases for issue #129
12yujim/pymtl,jck/pymtl,tj93/pymtl,cfelton/pymtl,jck/pymtl,Glyfina-Fernando/pymtl,cornell-brg/pymtl,tj93/pymtl,tj93/pymtl,Glyfina-Fernando/pymtl,12yujim/pymtl,jck/pymtl,cfelton/pymtl,jjffryan/pymtl,cornell-brg/pymtl,12yujim/pymtl,Glyfina-Fernando/pymtl,cfelton/pymtl,jjffryan/pymtl,cornell-brg/pymtl,jjffryan/pymtl
pymtl/tools/translation/verilog_bug_test.py
pymtl/tools/translation/verilog_bug_test.py
#======================================================================= # verilog_bug_test.py #======================================================================= from pymtl import * pytestmark = requires_verilator #----------------------------------------------------------------------- # Point BitStruct #-----...
bsd-3-clause
Python
ad34ab11f685b71f34db421bb5c214534d0bd5e0
Add helpers.py
Samuel-L/cli-ws,Samuel-L/cli-ws
web_scraper/helpers.py
web_scraper/helpers.py
def read_file_into_list(file_location): """Return list of elements from file :param str file_location: location of the file containing the proxies :return: list of elements from file :rtype: list """ return_list = [] with open(file_location, 'r') as File: for line in File: ...
mit
Python
a648ff738c88a41cfae4f915a4391c7d66261b64
add support for XLM-RoBERTa model
huggingface/transformers,huggingface/transformers,huggingface/pytorch-transformers,huggingface/transformers,huggingface/transformers
transformers/configuration_xlm_roberta.py
transformers/configuration_xlm_roberta.py
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
apache-2.0
Python
6b43ba637e9d31b420c2736c2fe48a00fd39468a
FIX res.partner name_search
adhoc-dev/odoo-personalizations,ingadhoc/odoo-personalizations
transindar_personalization/res_partner.py
transindar_personalization/res_partner.py
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fields class re...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fields class re...
agpl-3.0
Python
53d5dc0479576defb748c48f8f2d0d2b07b20303
Create servo.py
LukeB89/RPi-Servo-Controls
servo.py
servo.py
import RPi.GPIO as GPIO import time print " Values must be between -90 and 90" GPIO.setmode(GPIO.BOARD) GPIO.setup(18,GPIO.OUT) pwm = GPIO.PWM(18,50) pwm.start(5) while (True): x = raw_input('--> ') if type(int(x)) == int and int(x) <= int(90) and x >= int(-90): DC = 1.9+(0.045*(int(x)+...
unlicense
Python
d17bec6bb965243440ad63f5b793931b469214f7
Create setup.py
Sixem/imageboard-dl
setup.py
setup.py
from setuptools import setup setup(name="imageboard-dl", version="1.0.42", description="Python based image downloader for various imageboards and online image albums.", url="https://github.com/Sixem/imageboard-dl", author="bentkrisell", author_email="bentkrisell@gmail.com", license='MIT', packages=["imageboard...
mit
Python
ede47b64d892878e21178aeda2a16f24db59567b
Add tentative support for installation via pip
psynteract/psynteract-py
setup.py
setup.py
"""Python Bindings for Psynteract. """ # This is built on the demo package as described at # https://packaging.python.org/en/latest/distributing.html # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here ...
apache-2.0
Python
6282745ce33e357c952ec5bdc0c80ed81b10aa1b
Add setup.py to make the package installable.
obi1kenobi/python-bootstrap
setup.py
setup.py
from setuptools import find_packages, setup package_name = 'example_package' setup(name=package_name, version='0.0.1', packages=find_packages(), install_requires=[], )
mit
Python
2c6394127751d35c6bc9400a5767ae53953bd0fe
Create LeetCode-ReverseWordsinaString.py
lingcheng99/Algorithm
LeetCode-ReverseWordsinaString.py
LeetCode-ReverseWordsinaString.py
""" Reverse words in a string Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". """ class Solution(object): def reverseWords(self, s): """ :type s: str :rtype: str """ reverse=s.split(' ')[::-1] ...
mit
Python
254e77a5953d66f1bd1a06d0ed9f3d4de963b1e1
Add setup.py
etgalloway/powershellmagic
setup.py
setup.py
"""Setup file for powershellmagic.""" from setuptools import setup from powershellmagic import __version__ description = 'IPython magic for Windows PowerShell' with open('README.rst') as file: long_description = file.read() _classifiers = [ 'Environment :: Win32 (MS Windows)', 'Framework :: IPython', ...
bsd-3-clause
Python
9c762d01b6dafd48d227c0ef927b844a257ff1b9
Increase test coverage for energy classes
ryanpepper/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python
joommf/energies/test_demag.py
joommf/energies/test_demag.py
from demag import Demag def test_demag_mif(): demag = Demag() mif_string = demag.get_mif() assert 'Specify Oxs_Demag {}' in mif_string assert demag.__repr__() == "This is the energy class of type Demag" def test_demag_formatting(): demag = Demag() mif_string = demag.get_mif() assert mif_s...
from demag import Demag def test_demag_mif(): demag = Demag() mif_string = demag.get_mif() assert 'Specify Oxs_Demag {}' in mif_string def test_demag_formatting(): demag = Demag() mif_string = demag.get_mif() assert mif_string[0] == 'S' assert mif_string[-1] == '\n' assert mif_string...
bsd-2-clause
Python
c893b17841b9686d49074b68af18e91df76163ec
add script to performance of trace processor ingestion
google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto
tools/measure_tp_performance.py
tools/measure_tp_performance.py
#!/usr/bin/env python3 # Copyright (C) 2021 The Android Open Source Project # # 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 requ...
apache-2.0
Python
df16ba8130937c20e2dedbc067ca4e458fa5eb8b
add serialization test
dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq
corehq/form_processor/tests/test_serialization.py
corehq/form_processor/tests/test_serialization.py
# -*- coding: utf-8 -*- import uuid from django.test import TestCase from django.test.utils import override_settings from corehq.apps.receiverwrapper.util import submit_form_locally from corehq.form_processor.tests.utils import FormProcessorTestUtils from corehq.form_processor.utils import get_simple_form_xml @over...
bsd-3-clause
Python
58fb3a2fd42b70ad4e8594548177d63550440d4a
Add egg setup file
potatolondon/deferredmanager,potatolondon/deferredmanager,potatolondon/deferredmanager
setup.py
setup.py
import os from setuptools import setup, find_packages ROOT = os.path.abspath(os.path.dirname(__file__)) setup( name='gae_defer_manager', version='0.1', description='Wrapper around Google App Engine\'s deferred library to aid task management', long_description=open(os.path.join(ROOT, 'README.md')).rea...
mit
Python
2b90e7460a86ad3ef870f18ba7ffffe4c6cf7c4d
Add mongo backup example
voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts,voidabhi/python-scripts
mongobackup.py
mongobackup.py
#!/usr/bin/env python import os import argparse import logging import datetime import urlparse import subprocess logging.basicConfig(level=logging.INFO) parser = argparse.ArgumentParser(description='Backup Mongolab DBs') parser.add_argument('-u', '--url', type=str, required=False, default=Non...
mit
Python
bd303aa652cd071a612060e7c0e6b0b11dc91018
Add a first test script.
bsamorodov/selenium-py-training-samorodov
php4dvd/test_php4dvd.py
php4dvd/test_php4dvd.py
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.common.exceptions import NoSuchElementException import unittest class TestPhp4dvd(unittest.TestCase): def setUp(self): self.driver = webdriver.Firefox() self.driver.implicitly_wait(10) self.base_url = "http://hub.wart.ru/...
bsd-2-clause
Python
5cd212c9d4095e5bf2bc63788ab26fc306dde5e0
Create letter-case-permutation.py
tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015
Python/letter-case-permutation.py
Python/letter-case-permutation.py
# Time: O(n * 2^n) # Space: O(1) # Given a string S, we can transform every letter individually to be lowercase # or uppercase to create another string. Return a list of all possible strings we could create. # # Examples: # Input: S = "a1b2" # Output: ["a1b2", "a1B2", "A1b2", "A1B2"] # # Input: S = "3z4" # Output: [...
mit
Python
6aed21ef3ee8a5e76755928abb0f42080ece8f4f
Add cli entry_point to setup.py
RaoUmer/distarray,RaoUmer/distarray,enthought/distarray,enthought/distarray
setup.py
setup.py
# encoding: utf-8 # ----------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. # ----------------------------------------------------------------------------- ...
# encoding: utf-8 # ----------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. # ----------------------------------------------------------------------------- ...
bsd-3-clause
Python
1dcb175b9c6bf29c25845da36bd0b3d4d0b26f25
add batch train example
Adirockzz95/Piwho
examples/batch_train.py
examples/batch_train.py
import os from piwho import recognition speakers = ['Aditya','Ankit','Abhishek','Abhinav','Rishi','Mansi','Shivangi','Devika','Kranti'] data_folders = ['sp_Aditya','sp_Ankit','sp_Abhishek','sp_Abhinav','sp_Rishi','sp_Mansi','sp_Shivangi','sp_Devika','sp_Kranti'] folder_path = '/home/pi/train_data/' def train(): ...
mit
Python
b27e9cb73fec6bb52be4bd960cfced4869f531e4
add missing test file
minghuascode/pyj,minghuascode/pyj,certik/pyjamas,minghuascode/pyj,certik/pyjamas,Hasimir/pyjs,andreyvit/pyjamas,anandology/pyjamas,pombredanne/pyjs,pombredanne/pyjs,Hasimir/pyjs,pombredanne/pyjs,spaceone/pyjs,Hasimir/pyjs,lovelysystems/pyjamas,lancezlin/pyjs,gpitel/pyjs,lovelysystems/pyjamas,pyjs/pyjs,anandology/pyjama...
examples/libtest/foo.py
examples/libtest/foo.py
# this module is used in tests class Bar: X = 1 bar = Bar()
apache-2.0
Python
c75af2e5ee846f897b6bf23b9aa570e76e930f25
Add list folder example
mohan3d/PyOpenload
examples/list_folder.py
examples/list_folder.py
from __future__ import print_function from openload import OpenLoad username = 'FTP Username/API Login' key = 'FTP Password/API Key' openload = OpenLoad(username, key) resp = openload.list_folder() pprint(resp)
mit
Python
01428c6eca0351ad6a1767ac39969408c961aec1
Add an example to push raw transaction to the network via RPC
sr-gi/bitcoin_tools
examples/push_tx.py
examples/push_tx.py
from bitcoinrpc.authproxy import AuthServiceProxy ################################################# # Sending a transation to the network with RPC # ################################################# # --------------------------------------------------------------------------------------------------------------------...
bsd-3-clause
Python
6d231dc424ff37f0b3b4141912f350195b60afd7
Add leetcode 065 problem
aiden0z/snippets,aiden0z/snippets,aiden0z/snippets,aiden0z/snippets,aiden0z/snippets,aiden0z/snippets
leetcode/065_valid_number.py
leetcode/065_valid_number.py
""" Valid Number A valid number can be split up into these components (in order): 1. A decimal number or an integer. 2. (Optional) An 'e' or 'E', followed by an integer. A decimal number can be split up into these components (in order): 1. (Optional) A sign character (either '+' or '-' ). 2. One of t...
mit
Python
15952c0fb5a98374e9dff6ee692139d15c2f101d
add missing assimpobjloader
TangibleDisplay/twiz
libs/garden/garden.ddd/assimpobjloader.py
libs/garden/garden.ddd/assimpobjloader.py
from pyassimp import load, postprocess class AssimpObjLoader(object): def __init__(self, source): # super(AssimpObjLoader, **kwargs) # source = kwargs.get('source', '') if not source: print "no source given!" return self.scene = scene = load( so...
mit
Python
57fe924b5ba9e7ca27820510d2a3f2578dc55c80
Add setup.py
maxmalysh/disposable-emails
setup.py
setup.py
from setuptools import setup setup( name='disposable-emails', version='0.9', description='Weed out disposable email providers with ease', url='https://github.com/maxmalysh/disposable-emails', author='Max Malysh', author_email='hello@maxmalysh.com', license='MIT', packages=['disposable_e...
mit
Python
2fb9a31376e6849587a7a9d46120eb4d503b1509
add setup file
laginha/custom-user-profiles
setup.py
setup.py
#!/usr/bin/env python # encoding: utf-8 from setuptools import setup, find_packages from pip.req import parse_requirements install_reqs = parse_requirements("requirements.txt") reqs = [str(each.req) for each in install_reqs if each.req] setup( name = 'custom-user-profiles', version = '1.0...
mit
Python
74180c712523c3438e31a63d10128fb3801a0ec3
test client
zemogle/pyOculus,zemogle/pyOculus
indiclient_alt.py
indiclient_alt.py
import sys, time, logging import PyIndi import io class IndiClient(PyIndi.BaseClient): device=None imgIdx=0 def __init__(self): super(IndiClient, self).__init__() self.logger = logging.getLogger('PyQtIndi.IndiClient') self.logger.info('creating an instance of PyQtIndi.IndiClient') def newDevice(self, ...
bsd-2-clause
Python
525f2ed584f189254b77e68197391f236e684a0b
Add deploy script
renfredxh/compilebot
compilebot/deploy.py
compilebot/deploy.py
import time import traceback import compilebot as bot SLEEP_TIME = 60 def main(): try: bot.log("Initializing bot") while True: try: bot.main() except Exception as e: bot.log("Error running bot.main: {error}".format( er...
apache-2.0
Python
237c74a0fc23fbed4c9c486268e94c84dccb60eb
Add initial weasel.py with fitness operator, selection and population evaluation
MichaelAquilina/me-thinks-it-is-like-a-weasel
weasel.py
weasel.py
#! /usr/bin/python3 """ Simple script which generates the phrase 'ME THINKS ITS LIKE A WEASEL' using an extremely simple genetic algorithm. This was completely inspired and based off what Richard Dawkin's performs in his book 'The Blind Watchmaker' as a way of explaining accumulations of small change through the use o...
mit
Python
6b69ee0c524b7997814305186df57723fa0e4ee3
Add minimal setup.py
LWJensen/coala-bears,Shade5/coala-bears,Vamshi99/coala-bears,Shade5/coala-bears,shreyans800755/coala-bears,mr-karan/coala-bears,gs0510/coala-bears,sims1253/coala-bears,shreyans800755/coala-bears,sims1253/coala-bears,chriscoyfish/coala-bears,dosarudaniel/coala-bears,nishant-mor/coala-bears,Shade5/coala-bears,sims1253/co...
setup.py
setup.py
#!/usr/bin/env python3 import locale import sys # Start ignoring PyImportSortBear as imports below may yield syntax errors from bears import assert_supported_version assert_supported_version() # Stop ignoring import setuptools.command.build_py from bears import Constants from setuptools import find_packages, setup ...
agpl-3.0
Python
f9555f56384d935df2aa3e397d8c7cfa04b98f5e
add gridspec
theislab/scvelo
scvelo/plotting/gridspec.py
scvelo/plotting/gridspec.py
from .scatter import scatter from .velocity_embedding import velocity_embedding from .velocity_embedding_grid import velocity_embedding_grid from .velocity_embedding_stream import velocity_embedding_stream from .velocity_graph import velocity_graph from .docs import doc_scatter, doc_params import matplotlib.pyplot as ...
bsd-3-clause
Python
07451bb5c098e4c4a4f55b3fcbb9e2356f660f34
add wrapper
francois-berder/PyLetMeCreate
letmecreate/click/adc.py
letmecreate/click/adc.py
#!/usr/bin/env python3 """Python binding of ADC Click Wrapper of LetMeCreate library. You must initialise the SPI bus and select the right one before calling get_raw_value. """ import ctypes _LIB = ctypes.CDLL('libletmecreate_click.so') ADC_CLICK_CHANNEL_1 = 0 ADC_CLICK_CHANNEL_2 = 1 ADC_CLICK_CHANNEL_3 = 2 ADC_CLI...
bsd-3-clause
Python
b703a8708e086bbf2818ff86fc7594e20e0730ba
Add graph queries
indico/indico-plugins,indico/indico-plugins,ThiefMaster/indico-plugins,ThiefMaster/indico-plugins,ThiefMaster/indico-plugins,indico/indico-plugins,ThiefMaster/indico-plugins,indico/indico-plugins
piwik/indico_piwik/queries/graphs.py
piwik/indico_piwik/queries/graphs.py
from base64 import b64encode from . import PiwikQueryReportEventBase class PiwikQueryEventGraphBase(PiwikQueryReportEventBase): """Base Piwik query for retrieving PNG graphs""" def call(self, apiModule, apiAction, height=None, width=None, graphType='verticalBar', **query_params): if height is not No...
mit
Python
37bf830cd740c12516124ebd29621620a61d322a
Create ipregex.py
gimbi/randomScripts
ipregex.py
ipregex.py
""" Quick CLI regex for IP addrs. Great for... finding IP addrs. @gimbi """ import re, sys, subprocess ipaddrs = [] ip_regex = re.compile('(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)') def usage(name): print "Usage: %s <inputFile>" % name def scanForIpAddresses(txt): ...
mit
Python
b97d5d6ac944942a71da875c5f7d61cb96db4e15
add auto-create features/_scratch/ directory
hoopes/python-pptx,AlexMooney/python-pptx,kevingu1003/python-pptx,biggihs/python-pptx,scanny/python-pptx,cchanrhiza/python-pptx
features/environment.py
features/environment.py
# -*- coding: utf-8 -*- # # environment.py # # Copyright (C) 2013 Steve Canny scanny@cisco.com # # This module is part of python-pptx and is released under the MIT License: # http://www.opensource.org/licenses/mit-license.php """ Used by behave to set testing environment before and after running acceptance tests. """ ...
mit
Python
661d742f5352c710b76dcf04a6fe3755995b28cc
Create elasticsearch_query.py
rendoaw/notes
python/elasticsearch_query.py
python/elasticsearch_query.py
#!/usr/bin/env python import json import argparse from elasticsearch import Elasticsearch,helpers def jsonpretty(text): return json.dumps(text, indent=4, sort_keys=True) def arguments_parser(): parser = argparse.ArgumentParser(description="Options:") parser.add_argument('--host', help='hostname', defaul...
mit
Python
8cf275207bac5bdaa554db8fbdea5735959bdcf8
Prepare v2.18.12.dev
Flexget/Flexget,ianstalk/Flexget,ianstalk/Flexget,ianstalk/Flexget,Danfocus/Flexget,JorisDeRieck/Flexget,tobinjt/Flexget,crawln45/Flexget,tobinjt/Flexget,Danfocus/Flexget,JorisDeRieck/Flexget,JorisDeRieck/Flexget,malkavi/Flexget,tobinjt/Flexget,Danfocus/Flexget,gazpachoking/Flexget,malkavi/Flexget,malkavi/Flexget,crawl...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
5f159b734f4f975420568779febe91177d6f1251
add basic vim integration
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
clang-rename/tool/clang-rename.py
clang-rename/tool/clang-rename.py
''' Minimal clang-rename integration with Vim. Before installing make sure one of the following is satisfied: * clang-rename is in your PATH * `g:clang_rename_path` in ~/.vimrc points to valid clang-rename executable * `binary` in clang-rename.py points to valid to clang-rename executable To install, simply put this...
apache-2.0
Python
df85defaa81be058fdd778e440790fdbe3e922f4
add unit test for coifwavf
holgern/pyyawt,holgern/pyyawt
pyyawt/tests/test_coifwavf.py
pyyawt/tests/test_coifwavf.py
# -*- coding: utf-8 -*- # Copyright (c) 2015 Holger Nahrstaedt from __future__ import division, print_function, absolute_import import os import numpy as np import sys import unittest import pyyawt class TestCoifwavf(unittest.TestCase): def test_sum(self): for N in np.arange(1,18): w = pyyaw...
mit
Python
13a59b1c13f88e7353c97d55e2e2ed56e1ae7ed6
create a boilerplate .py test that people can use to create their own tests -- this is NOT actually a test
Bitcoin-com/BUcash,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Bitcoin-com/BUcash,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Bitcoin-com/BUcash,Justaphf/BitcoinUnlimited,Justaphf/BitcoinUnlimit...
qa/rpc-tests/test_template.py
qa/rpc-tests/test_template.py
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Unlimited developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # This is a template to make creating new QA tests easy. # You can also use this template to quickly...
mit
Python
322212f51ee08d7941538bd93adc7d34d2a60b20
Add setup.py
spatialaudio/nbsphinx,spatialaudio/nbsphinx,spatialaudio/nbsphinx
setup.py
setup.py
from setuptools import setup # "import" __version__ for line in open("nbsphinx.py"): if line.startswith("__version__"): exec(line) break setup( name='nbsphinx', version=__version__, py_modules=['nbsphinx'], install_requires=[ 'docutils', 'nbconvert', 'nbform...
mit
Python
bd0c5200a8cd31f28c06b8366862311e769f8355
add setup
biothings/biothings_explorer,biothings/biothings_explorer
setup.py
setup.py
from setuptools import setup install_requires = [ 'jsonschema>=3.0.1', 'networkx>=2.3', 'jsonpath-rw>=1.4.0', 'requests>=2.21.0', 'grequests>=0.4.0', 'graphviz>=0.11.1' ] setup( name="biothings_schema", version="0.0.1", author="Jiwen Xin, Chunlei Wu", author_email="cwu@scripp...
apache-2.0
Python
0121c9ebb57fbb8e946242c395bfb40e51cf6285
Create flags module
raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten
nn/flags.py
nn/flags.py
import tensorflow as tf FLAGS = tf.app.flags.FLAGS DROPOUT_PROB = FLAGS.dropout_prob DROPOUT_KEEP_PROB = 1 - DROPOUT_PROB
unlicense
Python
1fa42a287517be83b2da4da42e0e8056a4be548a
Add fake setup.py (#1836)
encode/starlette,encode/starlette
setup.py
setup.py
import sys from setuptools import setup sys.stderr.write( """ =============================== Unsupported installation method =============================== Starlette no longer supports installation with `python setup.py install`. Please use `python -m pip install .` instead. """ ) sys.exit(1) # The below code...
bsd-3-clause
Python
3225483af0e4f572b10556f6c16f392410c199b4
Fix travis build
ubibene/mwclient,mwclient/mwclient
setup.py
setup.py
#!/usr/bin/env python # encoding=utf-8 from __future__ import print_function import os import sys try: from setuptools import setup from setuptools.command.test import test as TestCommand except ImportError: print("This package requires 'setuptools' to be installed.") sys.exit(1) class PyTest(TestCom...
#!/usr/bin/env python # encoding=utf-8 from __future__ import print_function import os import sys try: from setuptools import setup from setuptools.command.test import test as TestCommand except ImportError: print("This package requires 'setuptools' to be installed.") sys.exit(1) class PyTest(TestCom...
mit
Python
f797b77a201ae07dcc101bd2c4387aa2e7621948
test port scan
rdeits/meshcat-python
src/meshcat/tests/test_ports.py
src/meshcat/tests/test_ports.py
from __future__ import absolute_import, division, print_function import unittest import os import subprocess import meshcat import meshcat.geometry as g class TestPortScan(unittest.TestCase): """ Test that the ZMQ server can correctly handle its default ports already being in use. """ def setU...
mit
Python
2e3e0a2dbeaad418c310d3dd3221204df23d6289
add setup.py
encorehu/django-issues
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='issues', version="0.1", author='encorehu', author_email='huyoo353@126.com', description='a django issues', url='https://github.com/encorehu/django-issues', packages=find_packages(), zip_safe = False, inc...
mit
Python
136392c7cf370b1b5a28b22946a8d295f0411b1b
Add support for discovering spotify connect (#111)
balloob/netdisco
netdisco/discoverables/spotify_connect.py
netdisco/discoverables/spotify_connect.py
"""Discover devices that implement the Spotify Connect platform.""" from . import MDNSDiscoverable # pylint: disable=too-few-public-methods class Discoverable(MDNSDiscoverable): """Add support for discovering Spotify Connect service.""" def __init__(self, nd): """Initialize the Cast discovery.""" ...
mit
Python
fbb57b0e928f09fd24735f90a355b3306c82c289
Use default protocol resolution if no settings
diefenbach/django-lfs,diefenbach/django-lfs,diefenbach/django-lfs
lfs/core/sitemaps.py
lfs/core/sitemaps.py
from django.conf import settings from django.contrib.sitemaps import Sitemap from django.utils import timezone from lfs.catalog.models import Category from lfs.catalog.models import Product from lfs.core.models import Shop from lfs.page.models import Page class ProductSitemap(Sitemap): """Google's XML sitemap fo...
from django.conf import settings from django.contrib.sitemaps import Sitemap from django.utils import timezone from lfs.catalog.models import Category from lfs.catalog.models import Product from lfs.core.models import Shop from lfs.page.models import Page class ProductSitemap(Sitemap): """Google's XML sitemap fo...
bsd-3-clause
Python
cdb84aa3a640269eda1c1bfd6bf5ae379e457a65
Create setup.py
Alecyrus/Allegro
setup.py
setup.py
""" Sanic """ import codecs import os import re from distutils.errors import DistutilsPlatformError from distutils.util import strtobool from setuptools import setup with codecs.open(os.path.join(os.path.abspath(os.path.dirname( __file__)), 'enigma', '__init__.py'), 'r', 'latin1') as fp: try: vers...
mit
Python
0c356d215f2d5836a511624174fcd5fafe188235
add python 3.3 support tag
JioCloud/stevedore,JioCloud/stevedore,mandeepdhami/stevedore,varunarya10/stevedore,nelsnelson/stevedore,varunarya10/stevedore,citrix-openstack-build/stevedore,mandeepdhami/stevedore,citrix-openstack-build/stevedore,openstack/stevedore,nelsnelson/stevedore
setup.py
setup.py
#!/usr/bin/env python # Bootstrap installation of Distribute import distribute_setup distribute_setup.use_setuptools() from setuptools import setup, find_packages try: long_description = open('README.rst', 'rt').read() except IOError: long_description = '' install_requires = ['distribute', ...
#!/usr/bin/env python # Bootstrap installation of Distribute import distribute_setup distribute_setup.use_setuptools() from setuptools import setup, find_packages try: long_description = open('README.rst', 'rt').read() except IOError: long_description = '' install_requires = ['distribute', ...
apache-2.0
Python
7745c66781ed0fa8b98bc0ffb9ccd715dfd29325
Move setup.py entrypoint to use main.py
pfmoore/invoke,pyinvoke/invoke,mkusz/invoke,mattrobenolt/invoke,frol/invoke,mkusz/invoke,frol/invoke,pyinvoke/invoke,mattrobenolt/invoke,pfmoore/invoke
setup.py
setup.py
#!/usr/bin/env python # Support setuptools only, distutils has a divergent and more annoying API and # few folks will lack setuptools. from setuptools import setup, find_packages # Version info -- read without importing _locals = {} with open('invoke/_version.py') as fp: exec(fp.read(), None, _locals) version = _...
#!/usr/bin/env python # Support setuptools only, distutils has a divergent and more annoying API and # few folks will lack setuptools. from setuptools import setup, find_packages # Version info -- read without importing _locals = {} with open('invoke/_version.py') as fp: exec(fp.read(), None, _locals) version = _...
bsd-2-clause
Python
51965dc3b26abfd0f9fb730c3076ee16b13612bc
Hide spurious numpy warnings about divide by zeros and nans.
yangjl/dadi,ChenHsiang/dadi,cheese1213/dadi,ChenHsiang/dadi,RyanGutenkunst/dadi,cheese1213/dadi,niuhuifei/dadi,paulirish/dadi,beni55/dadi,yangjl/dadi,RyanGutenkunst/dadi,niuhuifei/dadi,beni55/dadi,paulirish/dadi
dadi/__init__.py
dadi/__init__.py
""" For examples of dadi's usage, see the examples directory in the source distribution. Documentation of all methods can be found in doc/api/index.html of the source distribution. """ import logging logging.basicConfig() import Demographics1D import Demographics2D import Inference import Integration import Misc impo...
""" For examples of dadi's usage, see the examples directory in the source distribution. Documentation of all methods can be found in doc/api/index.html of the source distribution. """ import logging logging.basicConfig() import Demographics1D import Demographics2D import Inference import Integration import Misc impo...
bsd-3-clause
Python
407837066d62547167a12708619a057e56e2fed2
Create ping_parallel.py
rendoaw/notes
python/ping_parallel.py
python/ping_parallel.py
#!/usr/bin/env python import threading import subprocess import os import sys MAX_PROCESSES = 25 semaphore = threading.Semaphore(MAX_PROCESSES) def read_file(filename): cmds = "" lines = [] if str(filename) is not '' and not os.stat(filename).st_size == 0: try: finput = open(filenam...
mit
Python
013f61cff8a073c3de4631ac32153d08cd806375
Create setup.py
widoyo/simpleapp
setup.py
setup.py
# -*- encoding: utf-8 -*- # setup.py
mit
Python
6b7e4e978aa5a18effc3be6cc788dc2187c7b949
Add setup.py
renalreg/cornflake
setup.py
setup.py
from setuptools import setup, find_packages import cornflake setup( name='cornflake', version=cornflake.__version__, long_description=cornflake.__doc__, author='Rupert Bedford', author_email='rupert.bedford@renalregistry.nhs.uk', url='https://www.renalreg.org/', packages=find_packages(), ...
mit
Python
5246126a4abcc672dd709f10ba3c022cad05173f
Create setup.py
tonimichel/djpl-wkhtml2pdf
setup.py
setup.py
#! /usr/bin/env python import os from setuptools import setup, find_packages def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except IOError: return '' setup( name='djpl-wkhtml2pdf', version='0.1', description='A simple wrapper around wkhtml2...
mit
Python
21c52f3dce21cc5446aa6ab5a5c65b246d191f5c
add setup.py, publish to pypi
reorx/httpstat,reorx/httpstat
setup.py
setup.py
#!/usr/bin/env python # coding=utf-8 from setuptools import setup package_name = 'httpstat' filename = package_name + '.py' def get_version(): import ast with open(filename) as input_file: for line in input_file: if line.startswith('__version__'): return ast.parse(line)...
mit
Python
54c894fd3a3160950f4b410005a589fd314929dc
add basic setup.py
polysimtools/pysimm,polysimtools/pysimm
setup.py
setup.py
import pysimm import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="pysimm", version=pysimm.__version__, author="Mike Fortunato", author_email="mef231@gmail.com", description="python simulation interface for molecular modeling", long_desc...
mit
Python