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
d195358bc5814301e91a97f5d2ae95ede4a72bbc
Make some twitter plots of SVR,TOR freq hour
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
scripts/feature/warnings/simple_county.py
scripts/feature/warnings/simple_county.py
import matplotlib.colors as mpcolors import matplotlib.cm as cm import psycopg2 import numpy as np from pyiem.plot import MapPlot POSTGIS = psycopg2.connect(database='postgis', host='localhost', user='nobody', port=5555) pcursor = POSTGIS.cursor() cmap = cm.get_cmap("jet") cmap.set_under("#...
mit
Python
d3124554c6ae81ad2f0a5daea96c29de45343bff
Add main gui file.
takavfx/Mantle
gui.py
gui.py
#!/usr/bin/env python
mit
Python
1b926a21ac26cc2b0cbc3c837ab69e0a1394fae4
Create textRank.py
ab93/Text-Summarization
textRank.py
textRank.py
import pprint import math from preprocess import readData import operator import sys min_delta=0 class Node: def __init__(self,name,count,p_dist): self.name=name self.position=count self.PRscore=0 self.position_dist=p_dist def __repr__(self): return self.name def __eq__(self, other): return self.name...
apache-2.0
Python
6a3598f96251c54db9d5436c9860593974fa95a3
add migration
citationfinder/scholarly_citation_finder
scholarly_citation_finder/apps/core/migrations/0019_auto_20160319_0021.py
scholarly_citation_finder/apps/core/migrations/0019_auto_20160319_0021.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-19 00:21 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0018_auto_20160318_2226'), ] operations = [...
mit
Python
15b955cdaa07dc2816e712c4e80ec7dae146baef
Add initial DB migrations This is now needed to have these columns in the DB.
MidwestFurryFandom/mff-rams-plugin,MidwestFurryFandom/mff-rams-plugin
alembic/versions/af64b33e950a_initial_migration.py
alembic/versions/af64b33e950a_initial_migration.py
"""Initial migration Revision ID: af64b33e950a Revises: 735063d71b57 Create Date: 2018-05-08 23:18:35.150928 """ # revision identifiers, used by Alembic. revision = '6fd3a80ca4e0' down_revision = '1ed43776064f' branch_labels = ('mff_rams_plugin',) depends_on = None from alembic import op import sqlalchemy as sa im...
agpl-3.0
Python
7aa6053ac881ee91435c1dceda158494faf92abb
Create 2-guess-number.py
wezil/interactive-programming-python
2-guess-number.py
2-guess-number.py
""" IIPP Mini-Project 2: Guess the Number Author: Weikang Sun Date: 6/9/15 codeskulptor source: http://www.codeskulptor.org/#user40_9uCFBsoLw2_2.py """ # template for "Guess the number" mini-project # input will come from buttons and an input field # all output for the game will be printed in the console import sim...
mit
Python
bdc37e3344a2bee9d88cad0bc3d8f7d62447b0e9
Add var calling only temp script
GastonLab/ddb-scripts,dgaston/ddb-ngsflow-scripts,dgaston/ddb-scripts
workflow-var_call_exome_multi_lib.py
workflow-var_call_exome_multi_lib.py
#!/usr/bin/env python # Standard packages import sys import argparse # Third-party packages from toil.job import Job # Package methods from ddb import configuration from ddb_ngsflow import gatk from ddb_ngsflow import annotation from ddb_ngsflow import pipeline from ddb_ngsflow.align import bwa from ddb_ngsflow.vari...
mit
Python
aaeb837db409442579d260f703e2f2ca705020ca
handle TLS SNI if we have twisted>=14.0
taito/scrapy,ylcolala/scrapy,coderabhishek/scrapy,rolando/scrapy,fqul/scrapy,w495/scrapy,agreen/scrapy,CENDARI/scrapy,rootAvish/scrapy,kazitanvirahsan/scrapy,ramiro/scrapy,WilliamKinaan/scrapy,Allianzcortex/scrapy,pablohoffman/scrapy,cyberplant/scrapy,liyy7/scrapy,aivarsk/scrapy,redapple/scrapy,yidongliu/scrapy,cleydso...
scrapy/core/downloader/contextfactory.py
scrapy/core/downloader/contextfactory.py
from OpenSSL import SSL from twisted.internet.ssl import ClientContextFactory try: # available since twisted 14.0 from twisted.internet._sslverify import ClientTLSOptions except ImportError: ClientTLSOptions = None class ScrapyClientContextFactory(ClientContextFactory): "A SSL context factory which is...
from OpenSSL import SSL from twisted.internet.ssl import ClientContextFactory class ScrapyClientContextFactory(ClientContextFactory): "A SSL context factory which is more permissive against SSL bugs." # see https://github.com/scrapy/scrapy/issues/82 # and https://github.com/scrapy/scrapy/issues/26 de...
bsd-3-clause
Python
03374b25129af9a7cc66137b002c06d59775d603
add migrate script
doublebits/osf.io,caseyrygt/osf.io,petermalcolm/osf.io,alexschiller/osf.io,HarryRybacki/osf.io,GaryKriebel/osf.io,jinluyuan/osf.io,pattisdr/osf.io,zkraime/osf.io,GageGaskins/osf.io,monikagrabowska/osf.io,icereval/osf.io,caseyrollins/osf.io,haoyuchen1992/osf.io,ckc6cz/osf.io,GaryKriebel/osf.io,Ghalko/osf.io,leb2dg/osf.i...
scripts/migrate_github_oauth_settings.py
scripts/migrate_github_oauth_settings.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to migrate nodes with invalid categories.""" import sys from modularodm import Q from website.app import init_app from tests.base import OsfTestCase from framework.auth import User from website.addons.github.api import GitHub from website.addons.github.model imp...
apache-2.0
Python
72c5e83968ffe6baf2d3b9a3fc37f8ade449b161
Add forgotten file.
astrobin/astrobin,astrobin/astrobin,astrobin/astrobin,astrobin/astrobin
astrobin_apps_donations/utils.py
astrobin_apps_donations/utils.py
from subscription.models import UserSubscription def user_is_donor(user): if user.is_authenticated: return UserSubscription.objects.filter(user = user, subscription__name = 'AstroBin Donor').count() > 0 return False
agpl-3.0
Python
e015aabfbcc5f196fa58ea3f5766525b1eb5a861
Add api object
devicehive/devicehive-python
devicehive/api_object.py
devicehive/api_object.py
class Request(object): """Request class.""" def __init__(self, url, action, request, **params): self._action = action self._request = request self._params = params self._params['url'] = url def action(self): return self._action def request(self): return...
apache-2.0
Python
58320c67c99c43d7dfa5b0fe27b8333a1b226063
add initial gyp file
gypified/libvorbis,gypified/libvorbis,gypified/libvorbis,gypified/libvorbis,gypified/libvorbis
libvorbis.gyp
libvorbis.gyp
# This file is used with the GYP meta build system. # http://code.google.com/p/gyp # To build try this: # svn co http://gyp.googlecode.com/svn/trunk gyp # ./gyp/gyp -f make --depth=. libvorbis.gyp # make # ./out/Debug/test { 'variables': { 'target_arch%': 'ia32', # built for a 32-bit CPU by default }, ...
bsd-3-clause
Python
c35dda2fa80c28de66208048947a46fb0c411937
Add validators.
liminspace/dju-common,liminspace/dju-common,liminspace/dju-common
dju_common/validators.py
dju_common/validators.py
from django.core.exceptions import ValidationError from django.utils.translation import ugettext as _ from . import settings as dju_settings def validate_email_domain(email): """ Validates email domain by blacklist. """ try: domain = email.split('@', 1)[1].lower().strip() except IndexError: ...
mit
Python
85a64427678df33bfd4fd7b73b16b2591f08a54d
Add run.py and prelim_checks
hellboy2k8/Upgrade-ODL
run.py
run.py
import wget import optparse import os class UpgradeCeph(object): ''' Tool to Upgrade ODL ''' def __init__(self): self.parser = self._get_opt_parser() cls = UpgradeCeph cls.options, cls.arguments = self.parser.parse_args() if self.prelim_checks(cls.options.old_dir,...
mit
Python
b62739fbfe18c885a0172c8371b89a4010b086fb
Add regression test for #1654
spacy-io/spaCy,honnibal/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,recognai/spaCy,aikramer2/spaCy,explosion/spaCy,recognai/spaCy,aikramer2/spaCy,honnibal/spaCy,recognai/spaCy,explosion/spaCy,aikramer2/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,honnibal/spaCy,aikramer2/spaCy,aikramer2/spaCy,explosion/s...
spacy/tests/regression/test_issue1654.py
spacy/tests/regression/test_issue1654.py
# coding: utf8 from __future__ import unicode_literals import pytest from ...language import Language from ...vocab import Vocab @pytest.mark.xfail def test_issue1654(): nlp = Language(Vocab()) assert not nlp.pipeline nlp.add_pipe(lambda doc: doc, name='1') nlp.add_pipe(lambda doc: doc, name='2', af...
mit
Python
7ec0956e8de75320fc70e49b77799428573e5917
Add regression test (issue #1769)
aikramer2/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,honnibal/spaCy,aikramer2/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,honnibal/spaCy,aikramer2/spaCy,aikramer2/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,recognai/spaCy,spacy-io/spaCy,aikramer2/spaCy,explosion/spaCy,aikramer2/...
spacy/tests/regression/test_issue1769.py
spacy/tests/regression/test_issue1769.py
# coding: utf-8 from __future__ import unicode_literals from ...lang.da.lex_attrs import like_num as da_like_num from ...lang.en.lex_attrs import like_num as en_like_num from ...lang.fr.lex_attrs import like_num as fr_like_num from ...lang.id.lex_attrs import like_num as id_like_num from ...lang.nl.lex_attrs import li...
mit
Python
8010e7a13c9fd9abc9c2fa345a136b027314db98
Add init
waldenner/robotframework,waldenner/robotframework,ldtri0209/robotframework,fiuba08/robotframework,fiuba08/robotframework,fiuba08/robotframework,fiuba08/robotframework,ldtri0209/robotframework,ldtri0209/robotframework,waldenner/robotframework,fiuba08/robotframework,ldtri0209/robotframework,ldtri0209/robotframework,walde...
src/robot/result/__init__.py
src/robot/result/__init__.py
# Copyright 2008-2011 Nokia Siemens Networks Oyj # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
Python
7c25719fb36514793357cea064436983876ae361
add qisrc list-groups
dmerejkowsky/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,aldebaran/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,dmerejkowsky/qibuild
python/qisrc/actions/list_groups.py
python/qisrc/actions/list_groups.py
""" List the available groups """ from qisys import ui import qisrc.parsers import qisys.qixml import sys import os def configure_parser(parser): qisrc.parsers.worktree_parser(parser) def do(args): git_worktree = qisrc.parsers.get_git_worktree(args) local_groups = git_worktree._syncer.manifest.groups ...
bsd-3-clause
Python
c038954ff18472255c9643195bd27ba981b02a96
Add errors.py for location of error codes and messages
mandeep/conda-verify
conda_verify/errors.py
conda_verify/errors.py
def error(filepath, code, message): """""" return '{}: {}: {}' .format(filepath, code, message) C100 = error('./meta.yaml', 'C100', 'something') print(C100)
bsd-3-clause
Python
2396a4110f9d765f677ab9e58c060d904ab79973
use dict to store graph
igemsoftware2016/USTC-Software-2016,igemsoftware2016/USTC-Software-2016,igemsoftware2016/USTC-Software-2016
plugins/path_finder2.py
plugins/path_finder2.py
#!/usr/bin/env/python3 # encoding=utf-8 from queue import Queue, PriorityQueue from datetime import * from database import DBSession from models import Node, Link inf = 100 Graph = {} dis = {} node_count = 0 class State: def __init__(self, f, g, cur, prepath): # f is the distance to src, g is the distance to ...
agpl-3.0
Python
e3f97f30291a407a54a021d7e4a1805e75c1ec41
Add Tunnel Zone and Tunnel Zone Host API handlers
midonet/python-neutron-plugin-midonet,midonet/python-neutron-plugin-midonet,JoeMido/networking-midonet,yamt/networking-midonet,midokura/python-neutron-plugin-midonet,yamt/networking-midonet,JoeMido/networking-midonet,midokura/python-neutron-plugin-midonet
midonet/neutron/api.py
midonet/neutron/api.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2014 Midokura SARL. # 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.o...
apache-2.0
Python
ab06b8f1302965c4684d872b3df1139a63eacb6e
Create answer form
patrickspencer/compass,patrickspencer/compass-python,patrickspencer/compass,patrickspencer/compass,patrickspencer/compass,patrickspencer/compass-python,patrickspencer/compass-python,patrickspencer/compass,patrickspencer/compass-python,patrickspencer/compass-python
webapp/apps/student/forms.py
webapp/apps/student/forms.py
from django import forms class AnswerForm(forms.Form): value = forms.CharField(label='Answer', max_length=1000)
apache-2.0
Python
b6bb33aae60239d882cd86640313ed9e9802a5cc
Add local type driver unittests
gkotton/vmware-nsx,gkotton/vmware-nsx
neutron/tests/unit/ml2/test_type_local.py
neutron/tests/unit/ml2/test_type_local.py
# Copyright (c) 2014 Thales Services SAS # 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 r...
apache-2.0
Python
b8fa587b4d68087fe1ca5851098f111c495946fa
create showlog_long for quick long log plotting
imrehg/labhardware,imrehg/labhardware
projects/voltrecord/showlog_long.py
projects/voltrecord/showlog_long.py
import numpy as np import pylab as pl from ourgui import openFile def plotline(maxx, minx=0, value=0, style="k-", plotfunc=pl.plot): plotfunc([minx, maxx], [value, value], style) def quickplot(filename): data = np.loadtxt(filename, comments="#") maxdata, mindata, stddata, meandata = np.max(data),...
mit
Python
19d7180c139272b2aa983cbc8af0d1a5545f333b
add ICapImage and BaseImage
willprice/weboob,sputnick-dev/weboob,yannrouillard/weboob,sputnick-dev/weboob,laurent-george/weboob,willprice/weboob,frankrousseau/weboob,yannrouillard/weboob,laurent-george/weboob,Konubinix/weboob,nojhan/weboob-devel,Boussadia/weboob,frankrousseau/weboob,nojhan/weboob-devel,willprice/weboob,RouxRC/weboob,yannrouillard...
weboob/capabilities/image.py
weboob/capabilities/image.py
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon, Christophe Benz, Noé Rubinstein # Copyright(C) 2013 Pierre Mazière # # This file is part of weboob. # # weboob 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...
agpl-3.0
Python
73ed33ed967ec94c911aea967a0a2b414b2b2c71
Set the html_theme variable explicitly.
sxfmol/tornado,wsyzxcn/tornado,AlphaStaxLLC/tornado,xinyu7/tornado,felixonmars/tornado,Callwoola/tornado,eklitzke/tornado,jonashagstedt/tornado,bywbilly/tornado,codecov/tornado,ydaniv/tornado,fengshao0907/tornado,codecov/tornado,ColorFuzzy/tornado,obsh/tornado,ovidiucp/tornado,elijah513/tornado,yuyangit/tornado,NoyaInR...
website/sphinx/conf.py
website/sphinx/conf.py
# Ensure we get the local copy of tornado instead of what's on the standard path import os import sys sys.path.insert(0, os.path.abspath("../..")) import tornado master_doc = "index" project = "Tornado" copyright = "2011, Facebook" version = release = tornado.version extensions = ["sphinx.ext.autodoc", "sphinx.ext....
# Ensure we get the local copy of tornado instead of what's on the standard path import os import sys sys.path.insert(0, os.path.abspath("../..")) import tornado master_doc = "index" project = "Tornado" copyright = "2011, Facebook" version = release = tornado.version extensions = ["sphinx.ext.autodoc", "sphinx.ext....
apache-2.0
Python
6d8a975941b1894f41f390caf1836145eb402230
add setup.py
swistakm/frules
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from frules import __version__ as version import os def strip_comments(l): return l.split('#', 1)[0].strip() def reqs(*f): return list(filter(None, [strip_comments(l) for l in open( os.path.join(os.getcwd(), *f)).readlines()])) insta...
bsd-3-clause
Python
6c33ef61b038cb738f7ce670516f377b6b65d3c7
Create pug.py
chillipeper/will,chillipeper/will,mike-love/will,fredsmith/will,brandonsturgeon/will,grahamhayes/will,pcurry/will,dmuntean/will,pcurry/will,shadow7412/will,jacobbridges/will,dmuntean/will,skoczen/will,chillipeper/will,wontonst/will,jacobbridges/will,dmuntean/will,Ironykins/will,Regner/will,wontonst/will,Regner/will,sha...
will/plugins/friendly/pug.py
will/plugins/friendly/pug.py
import requests from will.plugin import WillPlugin from will.decorators import respond_to, periodic, hear, randomly, route, rendered_template, require_settings class PugPlugin(WillPlugin): @hear('pug') def talk_on_pug(self, message): req = requests.get('http://pugme.herokuapp.com/random') if...
mit
Python
1edb86e0c92bb186fccd9e0179b0d8b6dcc27902
Add custom style which imitates the offical coloring
kirbyfan64/pygments-unofficial,kirbyfan64/pygments-unofficial,kirbyfan64/pygments-unofficial,kirbyfan64/pygments-unofficial,kirbyfan64/pygments-unofficial,kirbyfan64/pygments-unofficial,kirbyfan64/pygments-unofficial,kirbyfan64/pygments-unofficial,kirbyfan64/pygments-unofficial,kirbyfan64/pygments-unofficial,kirbyfan64...
pygments/styles/igor.py
pygments/styles/igor.py
from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic class IgorStyle(Style): default_style = "" styles = { Comment: 'italic #FF0000', Keyword: '#0000FF', Name.Function: ...
bsd-2-clause
Python
658279e73631f384a11fa89c2d0c71ffb7b4609b
Create create_pwd_alias.py
rbheemana/Sqoop-Automated
code/scripts/create_pwd_alias.py
code/scripts/create_pwd_alias.py
#!/usr/bin/python # Purpose: accept table and aguments for run_oozie_workflow.py import sys, os, commands, envvars import shutil from optparse import OptionParser def get_keystore_root(key_store,app, common_root, service_root): keystore_root="" print "key_store = ", key_store if key_store.lower() == "co...
apache-2.0
Python
3ffd4a176c4fee26843c6500314889a52fe43703
Add MetalPDB methods
SBRG/ssbio,nmih/ssbio,nmih/ssbio,SBRG/ssbio
ssbio/databases/metalpdb.py
ssbio/databases/metalpdb.py
import glob import os.path as op from ssbio.protein.structure.structprop import StructProp def get_metalpdb_info(metalpdb_lig_file): """Parse a MetalPDB .lig file and return a tuple of the chain ID it represents, along with metal binding information. Args: metalpdb_lig_file (str): Path to .lig file ...
mit
Python
b018247752c68b292e94e292e29fe074a8b2b5f6
Revert "Tests.py"
mstone121/myuw-selenium,mattventura/myuw-selenium
myuw_selenium/tests.py
myuw_selenium/tests.py
#from myuw_selenium.test.card_order import CardOrderTest #from myuw_selenium.test.card_order import * #from myuw_selenium.test.muwm_testing import * #from myuw_selenium.test.muwm_acal import * # Needed to do both lines to get the dynamically made classes #from myuw_selenium.test.card_order import CardOrderTest #from m...
from myuw_selenium.test.card_order import CardOrderTest from myuw_selenium.test.card_order import * from myuw_selenium.test.muwm_testing import * from myuw_selenium.test.muwm_acal import * # Needed to do both lines to get the dynamically made classes from myuw_selenium.test.card_order import CardOrderTest from myuw_se...
apache-2.0
Python
56f59026e9742ec8cb656f6b6bb7f727ac9073e4
add basic setup.py
VanushVaswani/amcparser
setup.py
setup.py
from setuptools import setup, find_packages setup(name='amcparser', version='0.1', description='Get data from and view asf/amc files', author='Vanush Vaswani', author_email='vanush@gmail.com', packages=find_packages(), install_requires=['numpy', 'cgkit', 'asciitree', 'tqdm'], )...
mpl-2.0
Python
4501ec88ef21dc0e2c9c1c94e1309cc9986faa6b
bump version to 1.2
ArturGaspar/w3lib,Youwotma/w3lib,scrapy/w3lib
setup.py
setup.py
from distutils.core import setup setup( name='w3lib', version='1.2', license='BSD', description='Library of web-related functions', author='Scrapy project', author_email='info@scrapy.org', url='http://github.com/scrapy/w3lib', packages=['w3lib'], platforms = ['Any'], classifiers...
from distutils.core import setup setup( name='w3lib', version='1.1', license='BSD', description='Library of web-related functions', author='Scrapy project', author_email='info@scrapy.org', url='http://github.com/scrapy/w3lib', packages=['w3lib'], platforms = ['Any'], classifiers...
bsd-3-clause
Python
fad7c2c038723b688a5d8ad6fbb53e4327d885d3
Add setup.py.
martey/django-shortcodes,writepython/django-shortcodes,writepython/django-shortcodes,martey/django-shortcodes
setup.py
setup.py
from distutils.core import setup setup( name="django-shortcodes", version="0.1", description="WordPress shortcode support for Django", author="bluemilkshake", author_email="bluemilkshake@googlemail.com", packages=["shortcodes"], )
mit
Python
a02322cfaeb35ca99f8bcf1d784c606f2b06a1c2
Add packaging information.
EmilStenstrom/json-traverse
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup VERSION = '0.1' PKG_NAME = 'json-traverse' setup( name=PKG_NAME, packages=[PKG_NAME.replace("-", "")], version=VERSION, description='Query complex JSON structures using a simple query syntax.', author=u'Emil Stenström', author_email='em@kth....
mit
Python
1bf1d6ea53f7975ad2a15e7ea34c5d0ae7b6764f
Add a setup file
futhewo/paxton
setup.py
setup.py
from setuptools import setup setup(name='paxton', version='0.01', description='A tool that aim to produce outputs similar to a given input.', url='http://github.com/futhewo/paxton', author='FuzzTheWorld', author_email='fuzztheworld@gmail.com', license='Apache2', packages=['pax...
apache-2.0
Python
d3d1f03a148d8f17e1e0280e37a9763abe900e34
Add setup.py for building and packaging
Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server
setup.py
setup.py
#!/usr/bin/env python from launch_control import __version__ as version import os import sys try: import DistUtilsExtra.auto except ImportError: print >> sys.stderr, 'To build launch-control you need https://launchpad.net/python-distutils-extra' sys.exit(1) assert DistUtilsExtra.auto.__version__ >= '2....
agpl-3.0
Python
82a134f316b8d74e314469921a091f14dfbbcdc0
Add a setup.py file to ease setuptools installation, thanks Ariel Nunez
lukegb/django-oauth-plus,amrox/django-oauth-plus
setup.py
setup.py
from setuptools import setup, find_packages setup( name='django-oauth', version='0.1', description='Support of OAuth in Django.', author='David Larlet', author_email='david@larlet.fr', url='http://code.welldev.org/django-oauth/', packages=find_packages(), classifiers=[ 'Develop...
bsd-3-clause
Python
e26b80f4ea714966b4b9d8b0cf46a9edfa742a4a
Add setup.py
gwob/Maarifa,gwob/Maarifa,gwob/Maarifa,gwob/Maarifa,gwob/Maarifa
setup.py
setup.py
from setuptools import setup dep_links = ['git+https://github.com/taarifa/TaarifaAPI#egg=TaarifaAPI-dev'] setup(name='TaarifaWaterpoints', version='dev', description='Waterpoint management system for Tanzania', long_description=open('README.rst').read(), author='The Taarifa Organisation', ...
apache-2.0
Python
2788088a18ce652d9c27d624db767b3ee1132a96
update version to 0.5 in setup.py
thegooglecodearchive/mpmath,tectronics/mpmath,Alwnikrotikz/mpmath,thegooglecodearchive/mpmath,Alwnikrotikz/mpmath,upiterbarg/mpmath,upiterbarg/mpmath,tectronics/mpmath
setup.py
setup.py
from distutils.core import setup setup(name='mpmath', description = 'Python library for arbitrary-precision floating-point arithmetic', version='0.5', url='http://mpmath.googlecode.com', author='Fredrik Johansson', author_email='fredrik.johansson@gmail.com', license = 'BSD',...
from distutils.core import setup setup(name='mpmath', description = 'Python library for arbitrary-precision floating-point arithmetic', version='0.4', url='http://mpmath.googlecode.com', author='Fredrik Johansson', author_email='fredrik.johansson@gmail.com', license = 'BSD',...
bsd-3-clause
Python
99dad9551a01ed4c466ba423475c7f0ca3232b22
Add setuptools based setup.py
marietje/maried
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup(name='maried', version='0.1.0a1', description='MarieD music daemon', author='Bas Westerbaan', author_email='bas@westerbaan.name', url='http://github.com/bwesterb/maried/', packages=['maried'], zip_safe=False, pack...
agpl-3.0
Python
d3486e61e25eea13af90386cd0cbae3243bd3d5a
Add a setup file.
asteroide/immo_spider,asteroide/immo_spider,asteroide/immo_spider,asteroide/immo_spider
setup.py
setup.py
from setuptools import setup, find_packages import spider setup( name='immo_spider', version=spider.__version__, packages=find_packages(), author="Asteroide", author_email="asteroide__AT__domtombox.net", description="A Spider server", long_description=open('README.md').read(), #...
apache-2.0
Python
8df6e6882166f164b227ee286941f2aa5f199652
fix setup.py to include the newly created openid module
matthiask/django-admin-sso,diegobz/django-admin-sso,matthiask/django-admin-sso,allink/django-admin-sso,allink/django-admin-sso,frog32/django-admin-sso,diegobz/django-admin-sso,frog32/django-admin-sso,flatfox-ag/django-admin-sso,flatfox-ag/django-admin-sso
setup.py
setup.py
#! /usr/bin/env python import os from setuptools import setup import admin_sso setup( name='django-admin-sso', version=admin_sso.__version__, description='django sso solution', long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst')).read(), author='Marc Egli', author_email=...
#! /usr/bin/env python import os from setuptools import setup import admin_sso setup( name='django-admin-sso', version=admin_sso.__version__, description='django sso solution', long_description=open(os.path.join(os.path.dirname(__file__), 'README.rst')).read(), author='Marc Egli', author_email=...
bsd-3-clause
Python
0d3ee329bac5467fd7bac256856a58d9963de81a
Update setup.py
julbright/beautifulhue,allanbunch/beautifulhue
setup.py
setup.py
from distutils.core import setup from beautifulhue import __version__ setup( name='BeautifulHue', version=__version__, author='Allan Bunch', packages=['beautifulhue', 'beautifulhue.api', 'beautifulhue.libs'], url='https://github.com/allanbunch/beautifulhue', license='MIT', description='A Py...
from distutils.core import setup from beautifulhue import __version__ setup( name='BeautifulHue', version=__version__, author='Allan Bunch', packages=['beautifulhue', 'beautifulhue.api', 'beautifulhue.libs'], url='https://github.com/allanbunch/beautifulhue', license='MIT', description='A Py...
mit
Python
0a731568d46401bbadd0637f9b97325b8542ce4d
solve 13.
bm5w/pychal
13.py
13.py
"""Python challenge #13: http://www.pythonchallenge.com/pc/return/disproportional.html""" import xmlrpclib url = 'http://www.pythonchallenge.com/pc/phonebook.php' def send_xml(): server = xmlrpclib.ServerProxy(url) print server.system.listMethods() print server.phone('Bert') def main(): send_xml() ...
mit
Python
a331e32e993dbbf64985059d8ced2435582fe077
Enable PostGIS.
openchattanooga/cpd-zones-old,openchattanooga/cpd-zones-old
app/migrations/versions/4ef20b76cab1_.py
app/migrations/versions/4ef20b76cab1_.py
"""Enable PostGIS Revision ID: 4ef20b76cab1 Revises: 55004b0f00d6 Create Date: 2015-02-11 20:49:42.303864 """ # revision identifiers, used by Alembic. revision = '4ef20b76cab1' down_revision = '55004b0f00d6' from alembic import op import sqlalchemy as sa def upgrade(): op.execute("CREATE EXTENSION postgis;") ...
mit
Python
b5b236b93f102b42f3bb2e7e124b0831fa2a7a11
Create ETL international data covid19
Datawheel/datausa-site,Datawheel/datausa-site,DataUSA/datausa-site,Datawheel/datausa-site,DataUSA/datausa-site
static/jhcovid19.py
static/jhcovid19.py
#!/usr/bin/env python # coding: utf-8 import pandas as pd import numpy as np import datetime as dt import simplejson as json today = dt.date.today() start_day = dt.date(2020, 1, 22) diff = today - start_day days = diff.days dates = pd.date_range("2020-01-22", periods=days+1, freq="D").strftime('%m-%d-%Y') dates = pd....
agpl-3.0
Python
90dea56f8c905b8343d05aa112991edfa983e02c
Create stt-wavs.py
exDeos/hello-world
pytorch-stt/stt-wavs.py
pytorch-stt/stt-wavs.py
# to be entered
unlicense
Python
8f34b6dd367728531b8a75e55bb76f2dd8ce556e
add test
parrt/msan501-starterkit
stats/test_runif.py
stats/test_runif.py
from stats import * import numpy as np seed_666 = [0.00521236192678, 0.604166903349, 0.233144581892, 0.460987861017, 0.822980116505, 0.826818094508, 0.331714398848, 0.1239014343, 0.411406287184, 0.505468696591] seed_235423 = [0.8425073301617556, 0.02069802862624546, 0.8717671213074...
bsd-2-clause
Python
207af736412cf65f240dc48bf2793f9d8d5d85e1
Add storm collection list wrapper
liujiantong/storm,ccampbell/storm
storm/collection.py
storm/collection.py
class Collection(list): def __init__(self): self.total_count = None self.page = None self.page_size = None super(Collection, self).__init__(self)
mit
Python
a47b82f7feb18da55cf402e363508141764a180f
Add solution v2 for Labelmaker.
changyuheng/hacker-cup-solutions
2014/round-1/labelmaker-v2.py
2014/round-1/labelmaker-v2.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- def solve(): L, N = input().split(' ') N = int(N) result = '' while N > 0: N -= 1 result = L[N % len(L)] + result N = int(N / len(L)) return result def main(): T = int(input()) for i in range(T): print('Case #...
mit
Python
c1dd24062de9a3378715f13a814f995f8b82388f
Add 'deprecated_reason' to osapi opts
jianghuaw/nova,hanlind/nova,gooddata/openstack-nova,rahulunair/nova,cloudbase/nova,mahak/nova,jianghuaw/nova,sebrandon1/nova,alaski/nova,vmturbo/nova,rajalokan/nova,mikalstill/nova,mahak/nova,klmitch/nova,rajalokan/nova,gooddata/openstack-nova,mahak/nova,gooddata/openstack-nova,sebrandon1/nova,Juniper/nova,rajalokan/no...
nova/conf/osapi_v21.py
nova/conf/osapi_v21.py
# Copyright 2015 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# needs:check_deprecation_status # Copyright 2015 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/lice...
apache-2.0
Python
57aa9f922fb9544920ecec55d3d2d17ce64a4581
create model zoo
cleverhans-lab/cleverhans,cleverhans-lab/cleverhans,openai/cleverhans,carlini/cleverhans,carlini/cleverhans,cleverhans-lab/cleverhans
cleverhans/model_zoo/__init__.py
cleverhans/model_zoo/__init__.py
""" A module for hosting a variety of models of interest to the adversarial example community. Warning: This module is not nearly as conservative as the rest of CleverHans. Most of CleverHans is used to create rigorous vulnerability benchmarks. For example, the error rate caused by an Attack is considered to be ...
mit
Python
2c45ebaac9918d4c9229a6022dc13b9ab6e125d5
Add Profile to admin panel
nkantar/Starminder
starminder/main/admin.py
starminder/main/admin.py
from django.contrib import admin from django.contrib.admin import ModelAdmin from starminder.main.models import Profile class ProfileAdmin(ModelAdmin): list_display = ("id", "username", "email", "day", "time", "number") list_display_links = ("id", "username", "email") admin.site.register(Profile, ProfileAdm...
mit
Python
6e2418ada89e5a193a7742e8d344df2788ea0910
add new management command that finds a uuid in your db and tells you about it
archesproject/arches,archesproject/arches,archesproject/arches,archesproject/arches
arches/management/commands/whatisthis.py
arches/management/commands/whatisthis.py
from django.core import management from django.core.management.base import BaseCommand, CommandError from django.conf import settings import psycopg2 import json import uuid class Command(BaseCommand): help = 'finds a uuid throughout your database and prints info from postgres' def add_arguments(self, parser...
agpl-3.0
Python
da5a3d5bf9d7a6130f05339f36798b3e5d93e7a2
Add script for downloading the modern PRISM climate data
goelakash/retriever,davharris/retriever,goelakash/retriever,davharris/retriever,henrykironde/deletedret,embaldridge/retriever,embaldridge/retriever,embaldridge/retriever,henrykironde/deletedret,davharris/retriever
scripts/prism_4km_monthly_modern.py
scripts/prism_4km_monthly_modern.py
#retriever """Retriever script for direct download of PRISM climate data""" from retriever.lib.templates import Script import urlparse class main(Script): def __init__(self, **kwargs): Script.__init__(self, **kwargs) self.name = "PRISM Climate Data" self.shortname = "PRISM" self.r...
mit
Python
1db3922f09776c7ec3b597b3cf1e15b66c6d0af8
Add python template
takahasi/utility,takahasi/utility,takahasi/utility,takahasi/utility
templates/python_command.py
templates/python_command.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ python script for sample This is xxx """ import sys import argparse def func(xxx): """ This functions is xxx """ print(xxx) def main(args): """ Main routine """ parser = argparse.ArgumentParser(description='This is command for xxx') parser.add...
mit
Python
46d868d8be398f3beb023d4f560ed0457551b69a
Implement hog test
Hookscript/lang-python,Hookscript/lang-python
t/hog.py
t/hog.py
from hookscript import request resource = request.values.get('resource') if resource == 'cpu': while True: pass elif resource == 'mem': x = 'xxxxxxxxxxxxxxxxxx' while True: x += x elif resource == 'disk': f = open('junk','w') while True: print('junk', file=f) elif resource =...
unlicense
Python
b53bd8c6d75194705ec10eacf50518408fb11345
Add tasks for downloading built wheels
python-hyper/brotlipy
tasks.py
tasks.py
# -*- coding: utf-8 -*- from __future__ import print_function import os.path import requests import invoke JENKINS_URL = "https://jenkins.cryptography.io/job/brotlipy-wheel-builder" @invoke.task def download_artifacts(): session = requests.Session() response = session.get( "{0}/lastBuild/api/json...
mit
Python
e4b1da404739c32992ec243ba3103d92334500c3
add scylla-only test for querying system tables
scylladb/scylla,avikivity/scylla,scylladb/scylla,scylladb/scylla,avikivity/scylla,avikivity/scylla,scylladb/scylla
alternator-test/test_system_tables.py
alternator-test/test_system_tables.py
# Copyright 2020 ScyllaDB # # This file is part of Scylla. # # Scylla 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 of the License, or # (at your option) any later version. # # Scylla...
agpl-3.0
Python
62513585437d2c86f8668eb26eebb6f8c5a1a656
Test branja serijskega vmesnika na Ubuntu-ju. Branje z naprave Arduino UNO.
blazdivjak/rzpproject
Testiranje/Serijski.py
Testiranje/Serijski.py
''' Created on Nov 24, 2013 @author: gregor ''' from serial import * from threading import Thread last_received = '' def receiving(ser): while True: print ser.readline() if __name__ == '__main__': #ser = Serial(port=None, baudrate=9600, bytesize=EIGHTBITS, parity=PARITY_NONE, stopbits=STOPBITS_ONE,...
mit
Python
da80b3deb8d1b3a0172a11fb46af99c1af003c56
Add script for experiment records
belemizz/mimic2_tools,belemizz/mimic2_tools
clinical_db/experiment_script.py
clinical_db/experiment_script.py
''' Experiments are recorded in this script ''' # Experiment Date:06/24/2015 def compare_lab_tests_and_vitals(): ''' Compare the ability of prediction with lab tests and vital test for HF patients''' if __name__ == '__main__':
mit
Python
7f343049bc419b78dcf9d167362cbf3e210ae8cb
add optimizer
oculusstorystudio/kraken,oculusstorystudio/kraken
Python/kraken/core/optimizer.py
Python/kraken/core/optimizer.py
"""Kraken - traverser module. Classes: Traverser - Base Traverser. """ from kraken.core.objects.scene_item import SceneItem from kraken.core.objects.object_3d import Object3D from kraken.core.objects.components.component import Component from kraken.core.objects.attributes.attribute_group import AttributeGroup from ...
bsd-3-clause
Python
28acda0265c8913e761f9a63315fe17c09a3e5fc
Add test for dummy rendering (belongs to commit:be85116)
ZeitOnline/zeit.content.text
src/zeit/content/text/tests/test_jinja.py
src/zeit/content/text/tests/test_jinja.py
import zeit.cms.testing import zeit.content.text.jinja import zeit.content.text.testing class PythonScriptTest(zeit.cms.testing.FunctionalTestCase): layer = zeit.content.text.testing.ZCML_LAYER def create(self, text): result = zeit.content.text.jinja.JinjaTemplate() result.uniqueId = 'http:/...
bsd-3-clause
Python
de8d507e64894bdaaf036f99f179637c2660f0f1
Test script show how we might use the Python logger more effectively
amdouglas/OpenPNM,amdouglas/OpenPNM,stadelmanma/OpenPNM,PMEAL/OpenPNM,TomTranter/OpenPNM
tests/issue0078.py
tests/issue0078.py
# -*- coding: utf-8 -*- """ Created on Thu Nov 21 22:09:10 2013 @author: Jeff """ import logging try: print('Logger already instantiated, named: ', logger.name) except: # create logger logger = logging.getLogger() logger.setLevel(logging.CRITICAL) # create console handler with a higher log level ch...
mit
Python
f160cf57e500b6bfce14e7170430109311c7b060
Create velocity.py
ariegg/webiopi-drivers,ariegg/webiopi-drivers
abstractions/sensor/velocity/velocity.py
abstractions/sensor/velocity/velocity.py
class LinearVelocity(): def __family__(self): return "LinearVelocity" def __getMeterPerSecondX__(self): raise NotImplementedError def __getMeterPerSecondY__(self): raise NotImplementedError def __getMeterPerSecondZ__(self): raise NotImplementedErr...
apache-2.0
Python
2b7a2e0ffde981afd96395e5422eb9574e4ff51f
Add svm experiment on test data
sarahannnicholson/FNC
svm_experiments.py
svm_experiments.py
from svm import SVMModel if __name__ == '__main__': features = [ # 'refuting', 'ngrams', # 'polarity', 'named', # 'jaccard' ] model = SVMModel() train_data = model.get_data('data/train_bodies.csv', 'data/train_stances.csv') test_data = model.get_data('data/compet...
apache-2.0
Python
1d9549d552cd8f917881002c058ae0d48f9f67d7
convert puppet hiera to ping list
0312birdzhang/alerta,skob/alerta,guardian/alerta,skob/alerta,mrkeng/alerta,0312birdzhang/alerta,skob/alerta,0312birdzhang/alerta,mrkeng/alerta,mrkeng/alerta,skob/alerta,mrkeng/alerta,guardian/alerta,guardian/alerta,guardian/alerta
contrib/puppet/hiera2pinglist.py
contrib/puppet/hiera2pinglist.py
#!/usr/bin/python import os import sys import yaml #rootdir = sys.argv[1] rootdir = '/home/nsatterl/git/puppet/hieradata' ping_list = list() for root, subFolders, files in os.walk(rootdir): for f in files: full_path = os.path.join(root, f) if f == 'common.yaml': continue if...
apache-2.0
Python
970efa406b15ecab164cadf28034c75838bad5f2
test command-line args
ludobox/ludobox,ludobox/ludobox-ui,ludobox/ludobox,ludobox/ludobox,ludobox/ludobox,ludobox/ludobox-ui,ludobox/ludobox-ui
tests/test_main.py
tests/test_main.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import unittest from mock import patch from ludobox.main import config_parser, main class TestLudoboxMain(unittest.TestCase): """Testing the main Ludobox CLI tool""" def test_config_parser_serve(self) : testargs = ["ludobox", "serve"...
agpl-3.0
Python
d8b2585bc6bdedeb06978fbf1ef3cc6d3d008751
Add missing file.
jakesyl/ruby-card,jakesyl/ruby-card
mnemosyne/mnemosyne/pyqt_ui/qwebview2.py
mnemosyne/mnemosyne/pyqt_ui/qwebview2.py
# # qwebview2.py <Peter.Bienstman@UGent.be> # from PyQt4 import QtWebKit class QWebView2(QtWebKit.QWebView): """QWebView which restores the focus to the review widget, so that the keyboard shortcuts still continue to work. """ def focusInEvent(self, event): self.parent().restore_focus(...
agpl-3.0
Python
6b67a2e68a138bd6e279f99ab223edc7874945aa
Create wsgi.py
bardia73/Graph,bardia-heydarinejad/Graph,bardia-heydarinejad/Graph,bardia73/Graph
Graph/wsgi.py
Graph/wsgi.py
""" WSGI config for Graph project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Graph.settings") from django.core.wsgi ...
mit
Python
b7a57ceccc477d687bc071754cf4ab91a7443287
Create News_Class.py
aljohnso/Market_Dreams
News_Class.py
News_Class.py
class News: def __init__(self, Company_name): """ the constructor for the TextModel class all dictionaries are started at empty the name is just for our own purposes, to keep things organized """ self.Company_name = Company_name self.t...
mit
Python
3bd4cddf9fb8d77cb9d452f791419dac316f360e
Add missing file
potatolondon/djangae,potatolondon/djangae
djangae/contrib/search/tokens.py
djangae/contrib/search/tokens.py
import re from .constants import SPLIT_RE def tokenize_content(content): """ We inherit the rules from the App Engine Search API when it comes to punctuation. We have a list of punctuation chars which break the content into tokens, and then some special cases where it make...
bsd-3-clause
Python
f6e9e152531b6a370c52eb3ae0c516ebd6135b84
Bump version to 5.2.5a4
platformio/platformio,platformio/platformio-core,platformio/platformio-core
platformio/__init__.py
platformio/__init__.py
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
apache-2.0
Python
d0b0a98292caa9c3d67e1ee24bef486496ca29ba
add alternatives example
salilab/rmf,salilab/rmf,salilab/rmf,salilab/rmf
examples/alternatives.py
examples/alternatives.py
# \example alternatives.py # The RMF format supports storing alternative representations of the structure # through the RMF::decorator::Alternatives decorator and associated types. # Multiple versions of the hierarchy are stored, all representing the same # biological entity. Different representations can be used for d...
apache-2.0
Python
b3bd5dfb63825a111075d9693fa12f4fbbb0a111
Add ncurses rule
BreakawayConsulting/xyz
rules/ncurses.py
rules/ncurses.py
import xyz class Ncurses(xyz.Package): pkg_name = 'ncurses' def configure(self): self.host_lib_configure('--with-shared', '--without-cxx-binding', enable_shared=True) def install(self): super().install() self.rmtree('{prefix_dir}', 'man') self.rmtree('{prefix_dir}', 'share...
mit
Python
8bad594a152c1f54f7f3759902ae61890a1fcbf2
Add module mapper.py
fsteinmetz/runlib
runlib/mapper.py
runlib/mapper.py
from pathlib import Path import typing from tempfile import TemporaryDirectory from functools import wraps import shutil def check_f(func): ''' A wrapper to check that func can be properly mapped (in particular, that it returns the generated file) ''' @wraps(func) def wrapped(f_in, f_out, *arg...
mit
Python
3463aec9e8fa99d3dc964d3ceab1992136cf132c
Add basic forms for Address and School models
tbabej/roots,rtrembecky/roots,matus-stehlik/roots,matus-stehlik/roots,rtrembecky/roots,rtrembecky/roots,tbabej/roots,matus-stehlik/roots,tbabej/roots
schools/forms.py
schools/forms.py
from django import forms from crispy_forms.helper import FormHelper from .models import School, Address class AddressForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(AddressForm, self).__init__(*args, **kwargs) self.helper = FormHelper() self.helper.form_tag = False ...
mit
Python
1c4e1dc0fbd4681fbb1bf5c63145a2fbed130890
Add script to analyze bloatview logs
amccreight/mochitest-logs
xpcom-leak-analyzer.py
xpcom-leak-analyzer.py
#!/usr/bin/python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import sys import os import re bloatStartPatt = re.compile('^..:..:.. INFO - \|<----------...
mpl-2.0
Python
ef8a02d14a498e406e1349a6c41c5839d26e0db5
add voxelization, works for one slice, display broken
swenger/glitter,swenger/glitter,swenger/glitter
examples/voxelization.py
examples/voxelization.py
""" import logging logger = logging.getLogger("rawgl") logger.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) formatter = logging.Formatter("%(asctime)s: %(message)s") ch.setFormatter(formatter) logger.addHandler(ch) """ import h5py from glitter import Framebuffer, ShaderProgram, Textu...
mit
Python
5cfebd8ec3745918991bbdb82f49b9209ca55720
Add test_index for testing the main page
jelly/arch-security-tracker,anthraxx/arch-security-tracker,anthraxx/arch-security-tracker,archlinux/arch-security-tracker,jelly/arch-security-tracker,anthraxx/arch-security-tracker,archlinux/arch-security-tracker
test/test_index.py
test/test_index.py
from flask import url_for from werkzeug.exceptions import NotFound from .conftest import DEFAULT_GROUP_ID from .conftest import DEFAULT_GROUP_NAME from .conftest import create_group from .conftest import create_package @create_package(name='foo', version='1.2.3-4') @create_group(id=DEFAULT_GROUP_ID, packages=['foo']...
mit
Python
608151edd0886b64dac17a175556ffca5fff3c08
Add pyglet/window/event.py. Whoops.
infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore
pyglet/window/event.py
pyglet/window/event.py
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import pyglet.window.key EVENT_HANDLED = None EVENT_UNHANDLED = 1 EVENT_KEYPRESS = 1 EVENT_KEYRELEASE = 2 EVENT_TEXT = 3 _event_types = { 'on_keypress': EVENT_KEYPRESS, 'on_keyrelease': EVENT_KEYRELEASE, 'on_text':...
bsd-3-clause
Python
148f4ec4f2f4a7b03373c5d1803568b21ab76000
Update encode-n-ary-tree-to-binary-tree.py
kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,kamyu104/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015
Python/encode-n-ary-tree-to-binary-tree.py
Python/encode-n-ary-tree-to-binary-tree.py
# Time: O(n) # Space: O(h) # Definition for a Node. class Node(object): def __init__(self, val, children): self.val = val self.children = children # Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.ri...
# Time: O(n) # Space: O(h) """ # Definition for a Node. class Node(object): def __init__(self, val, children): self.val = val self.children = children """ """ # Definition for a binary tree node. class TreeNode(object): def __init__(self, x): self.val = x self.left = None ...
mit
Python
0a70799d2af893cb2a4b1dc75d3b7ef2a32700f8
add visualization module
planetlabs/notebooks,planetlabs/notebooks
jupyter-notebooks/pixels-to-tabular-data/visual.py
jupyter-notebooks/pixels-to-tabular-data/visual.py
import matplotlib.pyplot as plt import matplotlib.colors as colors import numpy as np """ The NDVI values will range from -1 to 1. You want to use a diverging color scheme to visualize the data, and you want to center the colorbar at a defined midpoint. The class below allows you to normalize the colorbar. """ class M...
apache-2.0
Python
ecd3f926320ebb93320039c28bac5caec09e4e1b
Add a missing file
suminb/transporter,suminb/transporter
transporter/api.py
transporter/api.py
from flask import Blueprint, render_template, request, redirect, url_for from flask import request, render_template, redirect, jsonify from transporter.models import Station, Route api_module = Blueprint( 'api', __name__, template_folder='templates/api') @api_module.route('/nearest_stations') def nearest_station...
mit
Python
966a50cc41cd5bdb53a8e1a5f3906b8a63a7036c
bump version to 14.7.0.dev
ArvinPan/pyzmq,Mustard-Systems-Ltd/pyzmq,swn1/pyzmq,dash-dash/pyzmq,ArvinPan/pyzmq,ArvinPan/pyzmq,yyt030/pyzmq,dash-dash/pyzmq,caidongyun/pyzmq,dash-dash/pyzmq,yyt030/pyzmq,yyt030/pyzmq,swn1/pyzmq,Mustard-Systems-Ltd/pyzmq,caidongyun/pyzmq,Mustard-Systems-Ltd/pyzmq,caidongyun/pyzmq,swn1/pyzmq
zmq/sugar/version.py
zmq/sugar/version.py
"""PyZMQ and 0MQ version functions.""" # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. from zmq.backend import zmq_version_info VERSION_MAJOR = 14 VERSION_MINOR = 7 VERSION_PATCH = 0 VERSION_EXTRA = "dev" __version__ = '%i.%i.%i' % (VERSION_MAJOR, VERSION_MINOR, VERSION_...
"""PyZMQ and 0MQ version functions.""" # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. from zmq.backend import zmq_version_info VERSION_MAJOR = 14 VERSION_MINOR = 6 VERSION_PATCH = 0 VERSION_EXTRA = "" __version__ = '%i.%i.%i' % (VERSION_MAJOR, VERSION_MINOR, VERSION_PAT...
bsd-3-clause
Python
722a20aa57df9939ba588c2e90d0a5c13e8859ac
Create type_of_service.py
adhimoni/Personal-Network-Packet-Sniffer
type_of_service.py
type_of_service.py
#!/usr/bin/python #Extraction of Type of Service, i.e. TOS generally 8-bits def getType_Of_Service(packet_data): precedence = {0: "Routine", 1: "Priority", 2: "Immediate", 3: "Flash", 4: "Flash override", 5: "CRITIC/ECP", 6: "Internetwork control", 7: "Network control"} delay = {0: "Normal delay", 1: "Low delay"} ...
mit
Python
ac9f6e708fa6a045eba87aa2d5c1b1a3b56ee181
bump logfetch version
calebTomlinson/Singularity,calebTomlinson/Singularity,andrhamm/Singularity,acbellini/Singularity,hs-jenkins-bot/Singularity,acbellini/Singularity,andrhamm/Singularity,HubSpot/Singularity,calebTomlinson/Singularity,acbellini/Singularity,calebTomlinson/Singularity,tejasmanohar/Singularity,tejasmanohar/Singularity,grepsr/...
scripts/setup.py
scripts/setup.py
from setuptools import setup, find_packages requirements = [ 'argparse==1.2.2', 'ConfigParser==3.5.0b2', 'grequests==0.2.0', 'requests==2.5.0', 'termcolor==1.1.0' ] setup( name='singularity-logfetch', version='0.17.0', description='Singularity log fetching and searching', author="HubSpot", ...
from setuptools import setup, find_packages requirements = [ 'argparse==1.2.2', 'ConfigParser==3.5.0b2', 'grequests==0.2.0', 'requests==2.5.0', 'termcolor==1.1.0' ] setup( name='singularity-logfetch', version='0.16.0', description='Singularity log fetching and searching', author="HubSpot", ...
apache-2.0
Python
51684f41a484b9b4b0198d93fe8b0c306c3650e5
Create scrolling_env.py
kajackdfw/python_rpi_sense_hat_demos
scrolling_env.py
scrolling_env.py
from sense_hat import SenseHat sense = SenseHat() while True: t = sense.get_temperature() p = sense.get_pressure() h = sense.get_humidity() t = round(t, 1) p = round(p, 1) h = round(h, 1) if t > 18.3 and t < 26.7: bg = [0, 100, 0] # green else: bg = [100, 0, 0] # red...
cc0-1.0
Python
98cacb46e59f907b6b83d803353c7b2f22e6a648
Add wrap template filter
plfiorini/django-gems
django_gems/templatetags/wrap.py
django_gems/templatetags/wrap.py
# # Django Gems. # # Copyright (C) 2016 Pier Luigi Fiorini # # Author(s): # Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> # # 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 r...
bsd-3-clause
Python
385d00dbd0b105af9083b401d0ce1abd68eacc2a
Add test_jsonify.py
bulv1ne/django-utils,bulv1ne/django-utils
utils/tests/test_jsonify.py
utils/tests/test_jsonify.py
from django.template import Context, Template from django.test import TestCase template = '{% load jsonify %}{{ content | jsonify:2 }}' template_html = '''[ "foo", "bar", "ba<" ]''' class MarkdownTestCase(TestCase): def test_markdown(self): data = { 'content': [ 'foo', ...
mit
Python
eee9576301de4104e609b756074b82e0373e6c15
add leetcode 148
weixsong/algorithm,weixsong/algorithm,weixsong/algorithm
leetcode/148.py
leetcode/148.py
#!/usr/bin/env python """ Sort a linked list in O(n log n) time using constant space complexity. """ # Definition for singly-linked list. class ListNode(object): def __init__(self, x): self.val = x self.next = None class Solution(object): def sortList(self, head): """ :type hea...
mit
Python
882e98ba3ecda1a82dae6ecdfd66b8b1a04d0c4d
Add chunk tests
lumapps/lumbda,lumapps/lumbda
tests/test_chunk.py
tests/test_chunk.py
from lumbda.collection import chunk def test_chunk(): """ Test that the chunk function splits the iterator """ numbers = range(1, 100) assert len(list(chunk(numbers, size=20))) == 5, 'It should be cut in 5 lists' flat_chunks = [elem for sublist in chunk(numbers, size=20) for elem in sublist]...
mit
Python
149879c6029efac02bec30b67d13592287f2898c
Add a unit test for flatc
adsharma/flattools,adsharma/flattools,adsharma/flattools
tests/test_flatc.py
tests/test_flatc.py
import pytest # TODO: Duplicate code # Figure out how to import from flatc.py def get_attrs_dict(attrs): attrs_dict = {x[0]: x[1] for x in attrs if len(x) == 2} ret = {x[0]: None for x in attrs} ret.update(attrs_dict) return ret def test_attrs_dict(): assert get_attrs_dict(['a', ['b', 10], 'c'])...
mit
Python
eb6a44e4aee0c17f232dfff52cd45cee23359b2a
add some testing
ivoire/ReactOBus,ivoire/ReactOBus
tests/test_core.py
tests/test_core.py
# -*- coding: utf-8 -*- # vim: set ts=4 # Copyright 2016 Rémi Duraffort # This file is part of ReactOBus. # # ReactOBus 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 of the License, ...
agpl-3.0
Python
cd88e724f7f2f8293a509db3dc0558904beee6e4
Add a script to validate PSA targets
mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed,mbedmicro/mbed
tools/test/psa/psa_target_config_test.py
tools/test/psa/psa_target_config_test.py
#!/usr/bin/env python """ Copyright (c) 2019-2020 ARM Limited. All rights reserved. SPDX-License-Identifier: Apache-2.0 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/licens...
apache-2.0
Python
542a1d11378d67cd50cc2a6b9b09a5538a991b92
add LeiUtil with LEI validator (lexical and checksum)
sternshus/Arelle,sternshus/Arelle,sternshus/Arelle,sternshus/Arelle,sternshus/Arelle
arelle/LeiUtil.py
arelle/LeiUtil.py
''' Created on Apr 25, 2015 @author: Mark V Systems Limited (c) Copyright 2015 Mark V Systems Limited, All rights reserved. Implementation of ISO 17442:2012(E) Appendix A ''' try: import regex as re except ImportError: import re LEI_VALID = 0 LEI_INVALID_LEXICAL = 1 LEI_INVALID_CHECKSUM = 2 LEI_RESULTS = (...
apache-2.0
Python
0b45d22cfd5025e2b3c75db4c9791a9865340244
Add encoding constant.
briankip/python-astm,eddiep1101/python-astm,LogicalKnight/python-astm,AlanZatarain/python-astm,mhaulo/python-astm,kxepal/python-astm,MarcosHaenisch/python-astm,pombreda/python-astm,andrexmd/python-astm,tectronics/python-astm,asingla87/python-astm,Iskander1b/python-astm,kxepal/python-astm,tinoshot/python-astm,Alwnikroti...
astm/constants.py
astm/constants.py
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # ENCODING = 'utf-8' STX = '\x02' ETX = '\x03' EOT = '\x04' ENQ = '\x05' ACK = '\x06' NAK = '\x15' ETB =...
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # STX = '\x02' ETX = '\x03' EOT = '\x04' ENQ = '\x05' ACK = '\x06' NAK = '\x15' ETB = '\x17' LF = '\x0A'...
bsd-3-clause
Python
85da0b9062d8266a3e3fe4cd29fbb5ea79a7cedf
Add LocalDataGrabber class so tests work with local data.
davidalber/Geneagrapher,davidalber/Geneagrapher
tests/geneagrapher/local_data_grabber.py
tests/geneagrapher/local_data_grabber.py
import os import sys from BeautifulSoup import BeautifulSoup from geneagrapher.grabber import get_record_from_tree class LocalDataGrabber: """A class for grabbing locally-cached test data.""" def __init__(self): pass def __enter__(self): return self def __exit__(self, exc_type, exc_v...
mit
Python