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 |
|---|---|---|---|---|---|---|---|---|
79f351e0dcb138d2fe55319f0018b2638dd59804 | Add unit tests for security_groups_client | vedujoshi/tempest,LIS/lis-tempest,Juniper/tempest,xbezdick/tempest,flyingfish007/tempest,masayukig/tempest,cisco-openstack/tempest,izadorozhna/tempest,rakeshmi/tempest,bigswitch/tempest,sebrandon1/tempest,Tesora/tesora-tempest,sebrandon1/tempest,Tesora/tesora-tempest,openstack/tempest,Juniper/tempest,rakeshmi/tempest,v... | tempest/tests/services/compute/test_security_groups_client.py | tempest/tests/services/compute/test_security_groups_client.py | # Copyright 2015 NEC 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 copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | apache-2.0 | Python | |
ca30516df8037cfb0745f84481f7ada936447a8a | Support of old profile names | zhenkyn/vkfeedd,zhenkyn/vkfeedd,tol1k/vkfeed,kostkost/vkfeed,ALERTua/vkfeed,flyer2001/vkrss,KonishchevDmitry/vkfeed,antonsotin/vkfeedtrue,Densvin/RSSVK,ALERTua/vkfeed,Evorvian/vkfeed,KonishchevDmitry/vkfeed,flyer2001/vkrss,greengeez/vkfeed,schelkovo/rss,greengeez/vkfeed,lokineverdie/parservkrss1488,lokineverdie/parserv... | vkfeed/pages/main.py | vkfeed/pages/main.py | # -*- coding: utf-8 -*-
'''Generates the main page.'''
import re
from google.appengine.ext import webapp
import vkfeed.util
class MainPage(webapp.RequestHandler):
'''Generates the main page.'''
def get(self):
'''Processes a GET request.'''
self.response.out.write(vkfeed.util.render_temp... | # -*- coding: utf-8 -*-
'''Generates the main page.'''
import re
from google.appengine.ext import webapp
import vkfeed.util
class MainPage(webapp.RequestHandler):
'''Generates the main page.'''
def get(self):
'''Processes a GET request.'''
self.response.out.write(vkfeed.util.render_temp... | bsd-2-clause | Python |
970516424632cb8cb3d70a1409f82822ff925c9f | Add cli keys lib for the saltkeys command | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | salt/cli/key.py | salt/cli/key.py | '''
The actual saltkey functional code
'''
import os
import sys
import shutil
class Key(object):
'''
The object that encapsulates saltkey actions
'''
def __init__(self, opts):
self.opts = opts
def _list_pre(self):
'''
List the unaccepted keys
'''
pre_dir = ... | apache-2.0 | Python | |
e67eb99442732339c8aee8a856ceb135fd8ff85d | move to python, mainly for json comparison | ministryofjustice/courtfinder-govuk-publisher-test,ministryofjustice/courtfinder-govuk-publisher-test | scripts/test.py | scripts/test.py | #!/usr/bin/env python
import requests
import json
base_url='http://127.0.0.1:8000/court/'
court_file='../data/sample_court.json'
oauth_token='foobar'
with open('../data/sample_court.json') as f:
sample_court_json = f.read()
headers = {'Authorization': 'Bearer '+oauth_token}
def is_in(small, big):
s = json.... | mit | Python | |
4dfd34f002c613ab0f73f07fe4cae30e2ef9be6f | add a simple export tool for JSON performance scenarios | ejona86/grpc,stanley-cheung/grpc,vjpai/grpc,stanley-cheung/grpc,vjpai/grpc,grpc/grpc,ejona86/grpc,ejona86/grpc,jtattermusch/grpc,nicolasnoble/grpc,stanley-cheung/grpc,nicolasnoble/grpc,stanley-cheung/grpc,jtattermusch/grpc,ejona86/grpc,donnadionne/grpc,donnadionne/grpc,grpc/grpc,grpc/grpc,stanley-cheung/grpc,donnadionn... | tools/run_tests/performance/scenario_config_exporter.py | tools/run_tests/performance/scenario_config_exporter.py | #!/usr/bin/env python3
# Copyright 2020 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | Python | |
6dd7e2da8c87a663fe1fa68df4b727f2c12c4b21 | Create emailer.py | jvillacortam/SES_mailer | emailer.py | emailer.py | import threading
import boto, time
#Fill this array with a DB or CSV
emails = ['success@simulator.amazonses.com','success@simulator.amazonses.com','success@simulator.amazonses.com','success@simulator.amazonses.com','success@simulator.amazonses.com']
class SES():
client = None
def __init__(self):
self.... | apache-2.0 | Python | |
eec91552f05ca02fa8a8b9ad05bc732c5c099719 | Update postgresql.py | aaronkaplan/intelmq-old,aaronkaplan/intelmq-old,aaronkaplan/intelmq-old,Phantasus/intelmq,s4n7h0/intelmq | src/bots/outputs/postgresql/postgresql.py | src/bots/outputs/postgresql/postgresql.py | import sys
import psycopg2
from lib.bot import *
from lib.utils import *
from lib.event import *
class PostgreSQLBot(Bot):
def init(self):
try:
self.logger.debug("Connecting to PostgreSQL")
self.con = psycopg2.connect(
database=self.parameters.dat... | import sys
import psycopg2
from lib.bot import *
from lib.utils import *
from lib.event import *
class PostgreSQLBot(Bot):
def init(self):
try:
self.logger.debug("Connecting to PostgreSQL")
self.con = psycopg2.connect(
database=self.parameters.dat... | agpl-3.0 | Python |
9a0c4225b542c2406e63f692a96222b2a8bd9940 | Use get_page_models instead of get_page_types in replace_text command | iansprice/wagtail,thenewguy/wagtail,kaedroho/wagtail,quru/wagtail,hamsterbacke23/wagtail,nealtodd/wagtail,kaedroho/wagtail,nutztherookie/wagtail,gogobook/wagtail,davecranwell/wagtail,mixxorz/wagtail,zerolab/wagtail,thenewguy/wagtail,zerolab/wagtail,kurtw/wagtail,torchbox/wagtail,torchbox/wagtail,rsalmaso/wagtail,JoshBa... | wagtail/wagtailcore/management/commands/replace_text.py | wagtail/wagtailcore/management/commands/replace_text.py | from django.core.management.base import BaseCommand
from django.db import models
from modelcluster.models import get_all_child_relations
from wagtail.wagtailcore.models import PageRevision, get_page_models
def replace_in_model(model, from_text, to_text):
text_field_names = [field.name for field in model._meta.f... | from django.core.management.base import BaseCommand
from django.db import models
from modelcluster.models import get_all_child_relations
from wagtail.wagtailcore.models import PageRevision, get_page_types
def replace_in_model(model, from_text, to_text):
text_field_names = [field.name for field in model._meta.fi... | bsd-3-clause | Python |
dfcab560e684afc1463896c98b7a7eeffedf127d | Add oed command. | kivhift/qmk,kivhift/qmk | src/commands/oxford-english-dictionary.py | src/commands/oxford-english-dictionary.py | #
# Copyright (c) 2014 Joshua Hughes <kivhift@gmail.com>
#
import urllib
import webbrowser
import qmk
class OEDCommand(qmk.Command):
'''Look up the given argument using Oxford's dictionary search. A new tab
will be opened with the results.'''
def __init__(self):
self._name = 'oed'
self._h... | mit | Python | |
6080a7475daef38037b8e8462a7a734380179e3f | Add script to find out click annotations missing help text | valohai/valohai-cli | scripts/ensure_click_help.py | scripts/ensure_click_help.py | import ast
import argparse
import sys
def stringify_name(name: ast.AST):
if isinstance(name, ast.Attribute):
return f"{stringify_name(name.value)}.{stringify_name(name.attr)}"
if isinstance(name, ast.Name):
return name.id
if isinstance(name, str):
return name
raise NotImplement... | mit | Python | |
55e247b407cf677c68c564f60a5cd2d5885e1a25 | add new package (#24929) | LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack | var/spack/repos/builtin/packages/py-pydocstyle/package.py | var/spack/repos/builtin/packages/py-pydocstyle/package.py | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPydocstyle(PythonPackage):
"""Python docstring style checker."""
homepage = "https:... | lgpl-2.1 | Python | |
d570a0f32375cc4719bb6815da25a5b3168f2313 | Add execute script | pcostesi/hookit,pcostesi/hookit | execute.py | execute.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from hookit import *
def consume_event(event):
event.dispatched = True
event.save()
return event
def process_events(events):
for event in events:
print event
consume_event(event)
#recipe = f... | mit | Python | |
b838c9eb504f4510537d66d504c9d4d2e1a81de5 | add tools for extracting some info | DeercoderPractice/tools,DeercoderPractice/tools | extract.py | extract.py | #!/usr/bin/env python
handler = open("pinpow1800MW.out", "r+")
lines = handler.readlines()
output = open("data.out", "w+")
writing = False
for line in lines:
# print line
if "Material powers" in line:
writing = True
elif "--------------------------------------------------------------" in line:
... | apache-2.0 | Python | |
3154563f5b21b8728d6ed9eadd1ed031cd223131 | Update classifier | PlutusApp/templates,PlutusApp/templates,PlutusApp/templates | scilearn.py | scilearn.py | from sklearn import tree
import json
data = 0
with open('./training_data/data.txt') as json_data:
data = json.load(json_data)
targets = 0
with open('./training_data/targets.txt') as json_data:
targets = json.load(json_data)
print(data)
clf = tree.DecisionTreeClassifier()
clf = clf.fit(data,targets)
print('... | mit | Python | |
a142472b86044395e428abea2fa5ff28b892d1fb | Create attr-utils module; create attribute memoization helper | fire-uta/iiix-data-parser | attr_utils.py | attr_utils.py | def _set_attr( obj, attr_name, value_to_set ):
setattr( obj, attr_name, value_to_set )
return getattr( obj, attr_name )
def _memoize_attr( obj, attr_name, value_to_set ):
return getattr( obj, attr_name, _set_attr( obj, attr_name, value_to_set ) )
| mit | Python | |
c563972de0260201300ef2e9b97746d20f02b824 | add quadruplets.py | pepincho/Python101-and-Algo1-Courses,pepincho/HackBulgaria,pepincho/Python101-and-Algo1-Courses,pepincho/HackBulgaria | Algo-1/week2/3-Quadruplets/quadruplets.py | Algo-1/week2/3-Quadruplets/quadruplets.py | # Returns the number of quadruplets that sum to zero.
# a - [int]
# b - [int]
# d - [int]
# c - [int]
# a + b == -(c + d)
# sort
# binary search
def zero_quadruplets_count(a, b, c, d):
left_sums = []
right_sums = []
result = 0
for i in a:
for j in b:
left_sums.append(i + j)
... | mit | Python | |
74e261b0f68426cd9d82e7b8f832d0f9913dd4ae | Test for apikeys, was missing in bd40e3122bf448946c4ea505c28b4a947b26d5e1 | amiv-eth/amivapi,amiv-eth/amivapi,amiv-eth/amivapi | amivapi/tests/test_apikeys.py | amivapi/tests/test_apikeys.py | from amivapi.tests import util
class APIKeyTest(util.WebTest):
def test_get_users_with_apikey(self):
apikey = u"dsfsjkdfsdhkfhsdkfjhsdfjh"
self.app.config['APIKEYS'][apikey] = {
'name': 'Testkey',
'users': {'GET': 1},
}
items = self.api.get("/users", token... | agpl-3.0 | Python | |
72ffe438270fb54a1ce163faff6d2083079c77e2 | Add unit test of utils module. | gvkalra/python-anydo,gvkalra/python-anydo | anydo/lib/tests/test_utils.py | anydo/lib/tests/test_utils.py | # -*- coding: utf-8 -*-
import unittest
import re
import sys
import os.path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from anydo.lib import utils
class UtilsTests(unittest.TestCase):
def setUp(self):
self.pattern = re.compile('(^([\w-]+)==$)', flags=re.U)
def test_create_uuid(sel... | mit | Python | |
75ca02b335c4aa20cbb139e68c660e1242800cc0 | Add the init method to the user model. | yiyangyi/cc98-tornado | model/user.py | model/user.py | #!/usr/bin/env python
# coding=utf-8
class UserModel(Query):
def __init__(self, db):
self.db = db
self.table_name = 'user'
super(UserModel, self).__init__()
| mit | Python | |
6ebcd970d980a93c1fca66463e74b52b451eef61 | Create a new wifi download test for ChromeOS | TheTypoMaster/chromium-crosswalk,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,nacl-webkit/chrome_deps,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,Just-D/chromium-1,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,PeterWangInt... | chrome/test/functional/wifi_downloads.py | chrome/test/functional/wifi_downloads.py | #!/usr/bin/python
# Copyright (c) 2011 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.
import hashlib
import logging
import os
import time
import pyauto_functional # Must be imported before pyauto
import pyauto
import py... | bsd-3-clause | Python | |
7875ebfb51d21cfd92d08288e03a3642e7ceb33e | Create pset3.py | gaurav61/MIT6.00x | pset3.py | pset3.py | # PROBLEM 1 : Radiation Exposure
def radiationExposure(start, stop, step):
'''
Computes and returns the amount of radiation exposed
to between the start and stop times. Calls the
function f (defined for you in the grading script)
to obtain the value of the function at any point.
start: intege... | mit | Python | |
d065ee15d2c189e2b0885d111aaaa109ca02ab99 | add stupid image extract program | JamisHoo/Distributed-Image-Search-Engine,JamisHoo/Distributed-Image-Search-Engine,JamisHoo/Distributed-Image-Search-Engine,JamisHoo/Distributed-Image-Search-Engine | src/image_extract.py | src/image_extract.py | #!/usr/bin/env python
###############################################################################
# Copyright (c) 2015 Jamis Hoo
# Distributed under the MIT license
# (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT)
#
# Project:
# Filename: image_extract.py
# Version: ... | mit | Python | |
36a2f0de9f525ea030e4cc805b8ccc7eb29c8098 | Add dependency function (not finished yet) | howl-anderson/vimapt,howl-anderson/vimapt | src/vimapt/library/vimapt/Dependency.py | src/vimapt/library/vimapt/Dependency.py | import networkx as nx
class Dependency(object):
def __init__(self, package_name):
self.package_name = package_name
self.dependency_graph = nx.DiGraph()
self.dependency_graph.add_node(self.package_name)
self.top_node_name = self.package_name
def parse(self, dependency_specific... | mit | Python | |
ac3d92025c033a77718467fe611d15055f87f1b7 | add member.py (in models package) | dsarkozi/care4care-sdp-grp4 | Care4Care/C4CApplication/models/member.py | Care4Care/C4CApplication/models/member.py | from django.db import models
class Member(models.Model):
mail = models.EmailField(primary_key=True)
first_name = models.CharField(max_length=20)
last_name = models.CharField(max_length=30)
picture = models.ImageField()
birthday = models.DateField()
tag = models.SmallIntegerField()
status =... | agpl-3.0 | Python | |
bea711b4560cf0373188f9e198fb2aa228227ee4 | add python ver | heLomaN/let_mosquito_go | mosquitogo.py | mosquitogo.py | #!/usr/bin/env python3
import wave
from struct import pack
from math import sin, pi
RATE=44100
## GENERATE MONO FILE ##
wv = wave.open('mg.wav', 'w')
wv.setparams((1, 2, RATE, 0, 'NONE', 'not compressed'))
maxVol=2**15-1.0 #maximum amplitude
wvData=b""
for i in range(0, RATE*3):
wvData+=pack('h', round(maxVol*sin(... | apache-2.0 | Python | |
e7b85a4afc9f40073e59a51f9335a72afb543d87 | Add flask service. | supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer | app/services/flask/service.py | app/services/flask/service.py | from .base import BaseService
def configure_flask_logging(app):
for handler in logging.getLogger().handlers:
app.logger.addHandler(handler)
class FlaskServer(BaseService):
def __init__(self):
params = {
"template_folder": "../templates",
"static_folder": "../static"
... | mit | Python | |
6b364f7f76fd897000d9e6f9140a2ad7794bc1ed | make it easier to create superuser | avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf,avlach/univbris-ocf | src/python/scripts/create-superuser.py | src/python/scripts/create-superuser.py | '''
Created on Jun 30, 2010
@author: jnaous
'''
def run():
from django.contrib.auth.models import User
import os
if "SUPERUSER_PASSWD" not in os.environ:
print "SUPERUSER_PASSWD environment is not set. Set this var to the\
password of the super user."
return
if "SUPERUSER_USERNAM... | bsd-3-clause | Python | |
fac2449c5e1e5c3509ca39e7e40a75c4b1b0bfa9 | Create items.py | Alex55ok/Huxiu_Startup_Data | items.py | items.py | # -*- coding: utf-8 -*-
from scrapy.item import Item,Field
class HuxiuItem(Item):
huxiuNo = Field()
Name = Field()
Website = Field()
CompanyName = Field()
FoundDate = Field()
District = Field()
CompanyScale = Field()
FinancingStage = Field()
Tag = Field()
Intro = Field()
... | mit | Python | |
a66cfb92b119810d7220d017ea6d214d8476ca6e | Add Tester to _strategies.py | ranjinidas/Axelrod,marcharper/Axelrod,ranjinidas/Axelrod,marcharper/Axelrod | axelrod/strategies/_strategies.py | axelrod/strategies/_strategies.py | from alternator import *
from appeaser import *
from averagecopier import *
from cooperator import *
from darwin import *
from defector import *
from forgiver import *
from geller import *
from gobymajority import *
from grudger import *
from grumpy import *
from hunter import *
from inverse import *
from mathematicalc... | from alternator import *
from appeaser import *
from averagecopier import *
from cooperator import *
from darwin import *
from defector import *
from forgiver import *
from geller import *
from gobymajority import *
from grudger import *
from grumpy import *
from hunter import *
from inverse import *
from mathematicalc... | mit | Python |
91f21f0e66be8290de94bfb23b50aa8bdeec3b18 | Add files via upload | shenlinqijing/predl,shenlinqijing/predl | classfy.py | classfy.py | #! /usr/bin/env python
#coding=utf-8
import numpy as np
import sys,os
# 设置当前的工作环境在caffe下
caffe_root = '/home/dandan/DL/caffe/'
# 我们也把caffe/python也添加到当前环境
sys.path.insert(0, caffe_root + 'python')
import caffe
os.chdir(caffe_root)#更换工作目录
# 设置网络结构
#net_file=caffe_root + 'models/bvlc_reference_caffenet/deplo... | mit | Python | |
3c1c434d1b88cff110f84dac99db6465c6df2519 | Add command line tool | janten/lcfam | lcfam.py | lcfam.py | #!/usr/bin/env python
import sys, warnings
from skimage import io, color, img_as_ubyte
if len(sys.argv) != 4:
print 'Usage: %s <cfam.png> <fam.png> <outfile.png>' % sys.argv[0]
sys.exit(1)
fam = io.imread(sys.argv[2])
fam_norm = fam.astype(float) / 255
cfam = io.imread(sys.argv[1])[:, :, 0:3]
cfam_lab = colo... | mit | Python | |
77dcd404e3b5a65268dc4ff2ecdd25c27358967f | add script for automatic robot checking WIP | bit-bots/bitbots_misc,bit-bots/bitbots_misc,bit-bots/bitbots_misc | bitbots_bringup/scripts/check_robot.py | bitbots_bringup/scripts/check_robot.py | #!/usr/bin/python3
import rospy
import rosnode
import roslaunch
import rospkg
import rostopic
from bitbots_msgs.msg import FootPressure
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
... | mit | Python | |
0a0a9addea16d5adf4d9edb3d56e1d890b6214e5 | Add tests for new complext date time field. | nzlosh/st2,punalpatel/st2,pixelrebel/st2,dennybaa/st2,StackStorm/st2,lakshmi-kannan/st2,nzlosh/st2,jtopjian/st2,peak6/st2,pinterb/st2,Plexxi/st2,tonybaloney/st2,jtopjian/st2,grengojbo/st2,emedvedev/st2,dennybaa/st2,armab/st2,StackStorm/st2,dennybaa/st2,tonybaloney/st2,jtopjian/st2,tonybaloney/st2,armab/st2,pixelrebel/s... | st2common/tests/unit/test_db_fields.py | st2common/tests/unit/test_db_fields.py | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | apache-2.0 | Python | |
1b6966cf0e90da0ac060a43349bbe4ce0f5fc365 | Create a model-based form for whitelist requests | Jonpro03/Minecrunch_Web,Jonpro03/Minecrunch_Web,Jonpro03/Minecrunch_Web | src/whitelist/whitelist_form.py | src/whitelist/whitelist_form.py | from django.forms import ModelForm
from whitelist.models import Player
class WhitelistForm(ModelForm):
""" Automatically generate a form based on the Player model
"""
class Meta:
model = Player
fields = ('ign', 'email')
| mit | Python | |
bf6ce0b61c1f66cbb88c3e5d12174242e04c9c87 | Add PROJECT_CONSTANTS configuration file | elc1798/chessley-tan,elc1798/chessley-tan,elc1798/chessley-tan | static/neural-net/PROJECT_CONSTANTS.py | static/neural-net/PROJECT_CONSTANTS.py | import os
PGN_FILE_DIRECTORY = os.path.dirname(os.path.realpath(__file__)) + "/game-files"
| mit | Python | |
adfc4d376338a185c56ee3a1932801e6a8c26917 | Add spectra making script | sbird/vw_spectra | make_spectra.py | make_spectra.py | import halospectra as hs
import randspectra as rs
import sys
snapnum=sys.argv[1]
sim=sys.argv[2]
#base="/n/hernquistfs1/mvogelsberger/projects/GFM/Production/Cosmo/Cosmo"+str(sim)+"_V6/L25n512/output/"
#savedir="/n/home11/spb/scratch/Cosmo/Cosmo"+str(sim)+"_V6_512/snapdir_"+str(snapnum).rjust(3,'0')
base="/n/hernquist... | mit | Python | |
5dc7b9e6d58ff0aee770cebd1c61f46827702ff9 | add setup.py | Bachmann1234/heart-rate-hud | setup.py | setup.py | from setuptools import setup, find_packages
# You need to install https://github.com/Bachmann1234/CMS50Dplus
setup(
name='heart-rate-hud',
version='1',
author='Matt Bachmann',
url='https://github.com/Bachmann1234/heart-rate-hud',
description='Tkinter window to display heartrate',
packages=find... | apache-2.0 | Python | |
d493f295c9af0eff76710599da6f05946ba50ed1 | Move test-only deps from REQUIRE_SETUP to REQUIRE_TEST. | frlen/simian,sillywilly42/simian,alexandregz/simian,googlearchive/simian,sillywilly42/simian,selfcommit/simian,frlen/simian,sillywilly42/simian,alexandregz/simian,frlen/simian,alexandregz/simian,selfcommit/simian,selfcommit/simian,alexandregz/simian,selfcommit/simian,googlearchive/simian,googlearchive/simian,sillywilly... | setup.py | setup.py | #!/usr/bin/env python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | #!/usr/bin/env python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | Python |
5457fa3c39d5ebe016c9f171878aaf1580ee4730 | add setup | TRI-AMDD/piro,TRI-AMDD/piro,TRI-AMDD/piro,TRI-AMDD/piro,TRI-AMDD/piro | setup.py | setup.py | from setuptools import setup, find_packages
import warnings
DESCRIPTION = "rxn is software designed to assist in prediction of synthesis pathway"
LONG_DESCRIPTION = """
The rxn software package enables prediction of synthesis pathways
and determination of pareto-optimal frontiers for synthesis of
specific materials
"... | apache-2.0 | Python | |
f52cba89474bf7ef4045a8dd12eef228b60a1555 | Make it installable | abakar/django-whatever,abakar/django-whatever,kmmbvnr/django-any | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='django-fsm',
version='0.0.1',
description='Unobtrusive test models creation for django.',
author='Mikhail Podgurskiy',
author_email='kmmbvnr@gmail.com',
url='http://github.com/kmmbvnr/django-any',
keywords = "django",
packages=['... | mit | Python | |
a64f29d7c492a772474ff1c5a4855a368ed10d2d | Create setup.py file. | Artanis/pygcui,Artanis/pygcui | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name="pygcui", version="0.1-dev",
author="Erik Youngren", author_email="artanis.00@gmail.com",
url="https://github.com/Artanis/pygcui",
license="Simplified BSD License",
keywords=" pygame pygcurse ... | bsd-2-clause | Python | |
cf68f6488f7f1afff4f7e6532ecc4a7f89186688 | Add setup.py | lmcinnes/hypergraph | setup.py | setup.py | from setuptools import setup
def readme():
with open('README.rst') as readme_file:
return readme_file.read()
configuration = {
'name' : 'hypergraph',
'version' : '0.1',
'description' : 'Hypergraph tools and algorithms',
'long_description' : readme(),
'classifiers' : [
'Developm... | lgpl-2.1 | Python | |
48c5f707640fe0e216f1a454d6c52265d02de1e7 | Add setup.py script. | kxepal/python-couchdb-auditor | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 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.
#
try:
from setuptools import setup
except ImportError:
from distutils.core... | bsd-3-clause | Python | |
0a301924b9050580979f65af96e9b91a7ae2f746 | Add setup.py so it is possible to pip install it from github | dangra/txtulip | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='txtulip',
version='0.0.1',
license='MIT',
description='Run Twisted on the Tulip/asyncio event loop',
url='https://github.com/itamarst/txtulip',
packages=find_packages(),
include_package_data=True,
zip_zafe=False,
platforms=['... | mit | Python | |
ed55dbe5a3967d8a73bbb76f19df470b1ab90b2a | Create SpecialArray.py | JLJTECH/TutorialTesting | Edabit/SpecialArray.py | Edabit/SpecialArray.py | #!/usr/bin/env python3
'''
Return True if every even index contains an even number and every odd index contains an odd number. Else return False
'''
def is_special_array(lst):
a = [i for i in lst[::2] if i % 2 == 1]
b = [i for i in lst[1::2] if i % 2 == 0]
return len(a) == len(b)
#Alternative Solutions
def is_spec... | mit | Python | |
d38a838f58f17e514a554e4533313bf3f1f80178 | Add factorial example | waltermoreira/tartpy | factorial.py | factorial.py | import rt
class Factorial(rt.Actor):
def __init__(self):
super().__init__()
self.behavior = self.factorial_beh
def factorial_beh(self, message):
customer, n = message
if n == 0:
customer(1)
else:
multiply_by_n = Multiplier.create(customer, n)
... | mit | Python | |
656dc608bea00c9cdaaef9354f8ddac956b2afc9 | add setup.py | mozilla/agithub,jpaugh/agithub | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='agithub',
version='1.3',
author='Jonathan Paugh',
py_modules=['agithub'])
| mit | Python | |
791cbbe340c2777310fad55889ab991086d9f31d | support py2.7.5 | simon-weber/gmusicapi,peetahzee/Unofficial-Google-Music-API,nvbn/Unofficial-Google-Music-API,dvirtz/gmusicapi,simon-weber/Unofficial-Google-Music-API,dvirtz/gmusicapi,TheOpenDevProject/gmusicapi,thebigmunch/gmusicapi,tanhaiwang/gmusicapi | setup.py | setup.py | #!/usr/bin/env python
import re
from setuptools import setup, find_packages
import sys
#Only 2.6-2.7 are supported.
if not ((2, 6, 0) <= sys.version_info[:3] <= (2, 7, 5)):
sys.stderr.write('gmusicapi does not officially support this Python version.\n')
#try to continue anyway
dynamic_requires = []
if sys.v... | #!/usr/bin/env python
import re
from setuptools import setup, find_packages
import sys
#Only 2.6-2.7 are supported.
if not ((2, 6, 0) <= sys.version_info[:3] <= (2, 7, 4)):
sys.stderr.write('gmusicapi does not officially support this Python version.\n')
#try to continue anyway
dynamic_requires = []
if sys.v... | bsd-3-clause | Python |
4d3ad6b218726ec4a881a2a41740b44f1292ecfd | Add basic setup.py | worldcomputerxchange/inventory-control,codeforsanjose/inventory-control | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name = "WCX Inventory Control",
version = "0.0.1",
packages = find_packages(),
) | mit | Python | |
5a3b4773b0e416101716443a9526b47cd47e21a7 | Update version. v2.0.1 | appliedx/python-saml,appliedx/python-saml,tachang/python-saml,mobify/python-saml,ninadpdr/python-saml,onelogin/python3-saml,vivekgarhewal/med,pitbulk/python3-saml,ninadpdr/python-saml,onelogin/python-saml,mpaulweeks/python-saml,tachang/python-saml,pitbulk/python3-saml,mpaulweeks/python-saml,novafloss/python-saml,jkgneu... | setup.py | setup.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014, OneLogin, Inc.
# All rights reserved.
from setuptools import setup
setup(
name='python-saml',
version='2.0.1',
description='Onelogin Python Toolkit. Add SAML support to your Python software using this library',
classifiers=[
... | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014, OneLogin, Inc.
# All rights reserved.
from setuptools import setup
setup(
name='python-saml',
version='2.0.0',
description='Onelogin Python Toolkit. Add SAML support to your Python software using this library',
classifiers=[
... | bsd-3-clause | Python |
bcc2e85be21321e4f27ccc673513ce90e20ab1b3 | Fix setup.py | giumas/python-acoustics,felipeacsi/python-acoustics,antiface/python-acoustics,python-acoustics/python-acoustics,FRidh/python-acoustics | setup.py | setup.py | import os
from setuptools import setup, find_packages
from Cython.Build import cythonize
import numpy as np
if os.path.exists('README.md'):
long_description = open('README.md').read()
else:
long_description = "A Python library aimed at acousticians."
setup(
name='acoustics',
version='0.0',
d... | import os
from setuptools import setup, find_packages
from Cython.Build import cythonize
import numpy as np
if os.path.exists('README.md'):
long_description = open('README.md').read()
else:
long_description = "A Python library aimed at acousticians."
setup(
name='acoustics',
version='0.0',
d... | bsd-3-clause | Python |
0c0ca6d4473669842a1caba9e3ec450e7969eebc | add setup.py | swstack/simpcli,swstack/simpcli | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name="simpcli",
description="Simple command line interfaces",
url="https://github.com/swstack/simpcli",
author="Stack, Stephen",
author_email="ss@stephenstack.com",
packages=find_packages(),
version='dev'
)
| mit | Python | |
c6c2f49014e650a07d450d9b5dd2b532f38ac5a4 | Create setup.py | Embed-Engineering/python-github-backup,josegonzalez/python-github-backup,josegonzalez/python-github-backup | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from github_backup import __version__
try:
from setuptools import setup
setup # workaround for pyflakes issue #13
except ImportError:
from distutils.core import setup
# Hack to prevent stupid TypeError: 'NoneType' object is not callable error on
# exit of pyt... | mit | Python | |
64192b2d13d2503b144f02d8fbc9bfdf02aca1d5 | Create setup.py | ggreco77/GWsky | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='GWsky' )
| bsd-2-clause | Python | |
f09817a210d1f621c8ac714233bccbf14786c551 | Add preprocessor | kiyomaro927/stdbt | source/utils/preprocessor.py | source/utils/preprocessor.py | # -*- coding: utf-8 -*-
import re
class Preprocessor:
def __init__(self):
pass
def __call__(self, string):
# add space
string += ' '
# eliminate '@' pattern
at_pattern = re.compile(u'@.*?\s|@.*?(?m)', re.S)
string = at_pattern.sub('', string)
# eliminat... | mit | Python | |
267e539e927d97db0cfb22805569effdea964e37 | Add setup.py | 9seconds/pep3134 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from setuptools.command.test import test
REQUIREMENTS = []
# with open("README.rst", "r") as resource:
# LONG_DESCRIPTION = resource.read()
# copypasted from http://pytest.org/latest/goodpractises.html
class PyTest(tes... | mit | Python | |
e78e93d5f2a3c35e92b03ba85f0cdad9a5f893d2 | Add script for uploading bdists | bmorris3/conda-builder-affiliated,Cadair/conda-builder-affiliated,astropy/conda-build-tools,astropy/conda-builder-affiliated,cdeil/conda-builder-affiliated,astropy/conda-build-tools,cdeil/conda-builder-affiliated,kbarbary/conda-builder-affiliated,mwcraig/conda-builder-affiliated,astropy/conda-builder-affiliated,kbarbar... | affiliate-builder/upload_bdists.py | affiliate-builder/upload_bdists.py | from __future__ import (division, print_function, absolute_import,
unicode_literals)
import os
import glob
from conda import config
#from conda_build.metadata import MetaData
from binstar_client.inspect_package.conda import inspect_conda_package
from obvci.conda_tools.build import upload
fro... | bsd-3-clause | Python | |
cedc0ccda68b3b1bc84b2c19cb7dc010b16da5f6 | Add setup.py | jbowes/markymark | setup.py | setup.py | #!/usr/bin/python
#
# Copyright (c) 2009 James Bowes <jbowes@dangerouslyinc.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights... | mit | Python | |
8171812c67d9189779aa39ba718f1d7cd8e7a045 | Add a setup.py file for scattering. | dopplershift/Scattering | setup.py | setup.py | from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
from os.path import join
flags = ['-W', '-Wall', '-march=opteron', '-O3']
def configuration(parent_package='', top_path=None):
config = Configuration('scattering', parent_pac... | bsd-2-clause | Python | |
952476575244cea3d0a4f8da4066b455a6b0ee4b | Add simple setup.py script | moble/h5py_cache,moble/h5py_cache | setup.py | setup.py | #!/usr/bin/env python
# Copyright (c) 2016, Michael Boyle
# See LICENSE file for details: <https://github.com/moble/h5py_cache/blob/master/LICENSE>
from distutils.core import setup
setup(name='h5py_cache',
description='Create h5py File object with specified cache',
author='Michael Boyle',
# author_... | mit | Python | |
7e3ad724cf2390e1cf7a7031834c880eaf6aecef | Add basic setup.py | mitchgu/TAMProxy-pyHost | setup.py | setup.py | from setuptools import setup
setup(
name='tamproxy',
version='0.0.1',
description='TAMProxy Python Host',
url='https://github.com/mitchgu/TAMProxy-pyHost',
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python :: 2.7',
],
keywords=... | mit | Python | |
bdb46f1e4181648202f37670e630b6584a760996 | Create lists.py | davidone/misc,davidone/misc | lists.py | lists.py | #!/usr/bin/env python2
'''
Generates automatically two arrays, a and b.
Return an arrays containing common elements in arrays
a and b.
'''
import random
SIZE_LIST_A = 10
SIZE_LIST_B = 20
a = []
b = []
def populate_arrays():
for i in range(0, SIZE_LIST_A):
a.append(random.randint(1, 100))
for i in range(0, ... | mit | Python | |
73bbce4a13f2dae5d0a3c59ff2369e7140b59a79 | fix #1, add setup.py | relekang/rob | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name="rob",
version='0.1.0',
description='Make python objects persistent with Redis.',
url='http://github.com/relekang/rob',
author='Rolf Erik Lekang',
packages=find_packages(),
install_requires=[
'redis',
]
)
| mit | Python | |
d2fd48e19316ecce3f529155a5d07160ba1318e5 | add setup.py | Islast/BrainNetworksInPython,Islast/BrainNetworksInPython | setup.py | setup.py | from distutils.core import setup
if __name__ == '__main__':
setup(
name='BrainNetworksInPython',
version='0.1dev',
packages=['SCRIPTS','WRAPPERS'],
license='MIT license',
)
| mit | Python | |
1fd28ba1488e8f7c49f20f7846f6e1b3bf1baaf3 | add FocusPyJS.py | jaredly/pyjamas,jaredly/pyjamas,jaredly/pyjamas,jaredly/pyjamas | library/pyjamas/ui/platform/FocusPyJS.py | library/pyjamas/ui/platform/FocusPyJS.py |
def blur(elem):
JS("""
elem.blur();
""")
def createFocusable():
JS("""
var e = $doc.createElement("DIV");
e.tabIndex = 0;
return e;
""")
def focus(elem):
JS("""
elem.focus();
""")
def getTabIndex(elem):
JS("""
return elem.tabIndex;
""")
def setAccessKey(elem,... | apache-2.0 | Python | |
504e2321a001144d5466cb492c77f01e045c89d5 | Add "dbm" to "python-imports" test | emilevauge/official-images,chorrell/official-images,docker-solr/official-images,davidl-zend/official-images,jperrin/official-images,docker-solr/official-images,davidl-zend/official-images,31z4/official-images,nodejs-docker-bot/official-images,emilevauge/official-images,davidl-zend/official-images,chorrell/official-imag... | test/tests/python-imports/container.py | test/tests/python-imports/container.py | import curses
import dbm
import readline
import bz2
assert(bz2.decompress(bz2.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS')
import platform
if platform.python_implementation() != 'PyPy' and platform.python_version_tuple()[0] != '2':
# PyPy and Python 2 don't support lzma
import lz... | import curses
import readline
import bz2
assert(bz2.decompress(bz2.compress(b'IT WORKS IT WORKS IT WORKS')) == b'IT WORKS IT WORKS IT WORKS')
import platform
if platform.python_implementation() != 'PyPy' and platform.python_version_tuple()[0] != '2':
# PyPy and Python 2 don't support lzma
import lzma
asse... | apache-2.0 | Python |
f6ea09312fd3f261c2273ffca703e93f0ae33bda | Create analysis.py | alexiskulash/ia-caucus-sentiment | src/analysis.py | src/analysis.py | def normalize(token):
token = token.replace(".","")
token = token.replace(",","")
token = token.replace("'","")
token = token.replace(";","")
token = token.replace("\n","")
token = token.replace("\'","")
token = token.replace("\"","")
token = token.replace("#","")
token = token.lower... | mit | Python | |
8e9a0f54e6bd0448264537a1b61c0810ae8fc4d4 | Add files via upload | QuirinoC/Python | palindrome.py | palindrome.py | not_aceptable_characters = [".",",","?","!","@","#","\"", "\'", \
"(", ")","'", " ","-",";","\n",'',"-"]
'''
Copyright Quirino...
jk use it as yours if you want.
#Documenting after writing is boring
'''
#Realized classes are not that dificult, this class is realy useful
#Th... | apache-2.0 | Python | |
df10bd85bcf94aba9661e397960a1cd3b4dd090d | Test for ISO NC creator | danheeks/heekscnc,danheeks/heekscnc,danheeks/heekscnc,danheeks/heekscnc | POST_TEST.py | POST_TEST.py | from posts.nc import *
import posts.iso
output('POST_TEST.txt')
program_begin(123, 'Test program')
absolute()
metric()
set_plane(0)
feedrate(420)
rapid(100,120)
rapid(z=50)
feed(z=0)
rapid(z=50)
rapid_home()
program_end()
| bsd-3-clause | Python | |
373b026c6ae0e1cae8236a0ba6d0bd8ce3ccab7c | Add missing module | vmalloc/backslash-python,slash-testing/backslash-python | backslash/compatibility.py | backslash/compatibility.py | class Compatibility(object):
def __init__(self, client):
super(Compatibility, self).__init__()
self.client = client
| bsd-3-clause | Python | |
eeff8a4e33a72b4efe5fb3a43bef2b60cd9b6752 | add image processing | vsimonis/worm1 | imgProc.py | imgProc.py | """
Created on Wed Dec 04 21:53:29 201
@author: Valerie
"""
from skimage import io, morphology, exposure,util
from skimage.measure import regionprops
#import matplotlib.pyplot as plt
import numpy as np
class imgProc:
def __init__():
def applyThresh( self, imgIn, t ):
imgIn1 = imgIn.r... | mit | Python | |
7d9410b90f03355ad22e562b568ec50efdcc96f4 | Create settings.py and add default path settings | hedderich/aqbanking-cli-wrapper | settings.py | settings.py | import os
AQBANKING_PATH = os.path.expanduser('~/.aqbanking/')
CACHE_PATH = os.path.join(AQBANKING_PATH, 'tmp')
BALANCE_PATH = os.path.join(CACHE_PATH, 'balance.ctx') | apache-2.0 | Python | |
53af7a4c8750a6660e34fad476f64198ab97443e | add - settings | anastasia/WARC-diff-tools | settings.py | settings.py | DECOMPRESS = True
| mit | Python | |
834a570a8073028fff86c91bd808ffc5ce6a835f | add settings to set constant ntulearn login url | manzaigit/ntulearndownloader,manzaigit/ntulearndownloader | settings.py | settings.py | NTULEARN_URL = "https://ntulearn.ntu.edu.sg/webapps/login/"
| mit | Python | |
53cb211fda4b46d38a10808893b8713cfb17d080 | Create ShinyAppsApp | mfcovington/djangocms-shiny-app,mfcovington/djangocms-shiny-app,mfcovington/djangocms-shiny-app | cms_shiny/cms_app.py | cms_shiny/cms_app.py | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from cms.app_base import CMSApp
from cms.apphook_pool import apphook_pool
from cms_shiny.menu import ShinyAppsMenu
class ShinyAppsApp(CMSApp):
name = _("Shiny Apps App")
urls = ["cms_shiny.urls"]
app_name = "cms_shiny"
m... | bsd-3-clause | Python | |
48984b9ab60c14c5d47ee329ef906d47b35b8ade | Add common tests for query endpoint | biothings/biothings.api,biothings/biothings.api | biothings/tests/test_query.py | biothings/tests/test_query.py | '''
Biothings Query Component Common Tests
'''
import os
from nose.core import main
from biothings.tests import BiothingsTestCase
class QueryTests(BiothingsTestCase):
''' Test against server specified in environment variable BT_HOST
and BT_API or MyGene.info production server V3 by def... | apache-2.0 | Python | |
fb41b16f95490b15190075403aa3d87fcfa34853 | Create smash.py | GaryBrittain/Smashrun | smash.py | smash.py | import urllib, urllib2, json
from stravalib.client import Client
from stravalib import unithelper
import dateutil.parser as parser
from pytz import timezone
activityId = 321998419
client = Client(access_token="")
activity = client.get_activity(activityId)
localtz = timezone(str(activity.timezone))
types = ['distanc... | mit | Python | |
8a39e7993bdf67c85d7f2e25ccf7fe3f82502479 | Create Problem14.py | xiaoyougang/ProjectEulerSolution | Problem14.py | Problem14.py | import time
def f(n):
if n%2==1 and n>1:
return f(3*n+1)+1
elif n%2==0:
return f(n/2)+1
return 1
m,value=0,0
begin=time.time()
for i in range(1,1000000):
tmp=f(i)
if tmp>m:
value=i
m=tmp
print time.time()-begin
print m,value
| apache-2.0 | Python | |
1b36957858c5ceba018d23be19b04e730c231ff6 | Implement timer to support Timer.Interval.* events | JokerQyou/Modder2 | modder/timer.py | modder/timer.py | # coding: utf-8
import threading
import time
class TimerThread(threading.Thread):
def __init__(self, queue, stop_event):
super(TimerThread, self).__init__()
self.__queue = queue
self.__stopped = stop_event
self.__wait = .5
now = time.time()
self.__last_trigger_minu... | mit | Python | |
638e2d7a33f522007d80d39e0a8e5bface654286 | Add unit tests for utility methods. | alexisrolland/data-quality,alexisrolland/data-quality,alexisrolland/data-quality,alexisrolland/data-quality | test/test_scripts/test_utils.py | test/test_scripts/test_utils.py | from scripts.init import utils
import unittest
class TestUtils(unittest.TestCase):
@classmethod
def setUpClass(self):
pass
def test_get_parameter(self):
api = utils.get_parameter('api')
url = utils.get_parameter('api', 'url')
# Assert parameters are not empty
self... | apache-2.0 | Python | |
9e42b39ffcab22b1a2f684353ce1242ce4a238d4 | Add support for export of graphs in DOT format | MD-Studio/MDStudio,MD-Studio/MDStudio,MD-Studio/MDStudio,MD-Studio/MDStudio,MD-Studio/MDStudio | components/lie_graph/lie_graph/graph_io/io_dot_format.py | components/lie_graph/lie_graph/graph_io/io_dot_format.py | # -*- coding: utf-8 -*-
"""
file: io_dict_format.py
Functions for exporting and importing graphs to and from graph description
language (DOT) format
"""
import sys
import json
if sys.version_info[0] < 3:
import StringIO
else:
from io import StringIO
from lie_graph import __module__, __version__
def write... | apache-2.0 | Python | |
c227eb585817cd7385486a4292814c1c6bbca3da | Add test_webcast_india_gov.py | back-to/streamlink,bastimeyer/streamlink,wlerin/streamlink,melmorabity/streamlink,melmorabity/streamlink,beardypig/streamlink,chhe/streamlink,javiercantero/streamlink,gravyboat/streamlink,wlerin/streamlink,bastimeyer/streamlink,back-to/streamlink,beardypig/streamlink,javiercantero/streamlink,streamlink/streamlink,chhe/... | tests/test_webcast_india_gov.py | tests/test_webcast_india_gov.py | import unittest
from streamlink.plugins.webcast_india_gov import WebcastIndiaGov
class TestPluginWebcastIndiaGov(unittest.TestCase):
def test_can_handle_url(self):
# should match
self.assertTrue(WebcastIndiaGov.can_handle_url("http://webcast.gov.in/ddpunjabi/"))
self.assertTrue(W... | bsd-2-clause | Python | |
d1b0da728d408cdb6c3acdb17b1cf9a54667a09b | Add first fraft Outlier Detection class Fix #26 | ericfourrier/auto-clean | autoc/outliersdetection.py | autoc/outliersdetection.py | """
@author: efourrier
Purpose : This is a simple experimental class to detect outliers. This class
can be used to detect missing values encoded as outlier (-999, -1, ...)
"""
from autoc.explorer import DataExploration, pd
import numpy as np
#from autoc.utils.helpers import cserie
from exceptions import NotNumericC... | mit | Python | |
3c9067381158e773936b4dc47f488b43044e7bf8 | move file exceptions to resources folder | pagarme/pagarme-python | pagarme/resources/exceptions.py | pagarme/resources/exceptions.py | # encoding: utf-8
class PagarmeApiError(Exception): pass
class PagarmeTransactionError(Exception): pass
class NotPaidException(PagarmeTransactionError): pass
class NotBoundException(PagarmeTransactionError): pass
| mit | Python | |
f30c5daebc5e3b2f4cb5a636c5dbdbbbec682727 | add migration for related name of association rules | lucashanke/houseofdota,lucashanke/houseofdota,lucashanke/houseofdota | app/migrations/0013_auto_20170705_2007.py | app/migrations/0013_auto_20170705_2007.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-07-05 20:07
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('app', '0012_auto_20170703_2246'),
]
operations = [
... | mit | Python | |
dde20ff437e2f9b9f0fb05de3f03c2c3b22bc563 | add an invoke builder for project development | scrapinghub/streamparse,Parsely/streamparse,hodgesds/streamparse,scrapinghub/streamparse,msmakhlouf/streamparse,Parsely/streamparse,eric7j/streamparse,codywilbourn/streamparse,petchat/streamparse,petchat/streamparse,petchat/streamparse,msmakhlouf/streamparse,scrapinghub/streamparse,petchat/streamparse,scrapinghub/strea... | tasks.py | tasks.py | from invoke import run, task
import os
@task
def lint():
for src in os.listdir("pystorm"):
if src.endswith(".py"):
run("pyflakes pystorm/{}".format(src))
#run("pep8 pystorm/{}".format(src))
@task
def build(docs=False):
run("python setup.py build")
if docs:
run("sphi... | apache-2.0 | Python | |
0cd883c22f82e33d05f6177fa9b99e2adf7cc644 | Add tasks file for use with Invoke | thebigmunch/gmusicapi-wrapper | tasks.py | tasks.py | # coding=utf-8
"""Useful task commands for development and maintenance."""
from invoke import run, task
@task
def build(clean):
"""Build sdist and bdist_wheel distributions."""
run('python setup.py sdist bdist_wheel')
@task(build)
def deploy():
"""Build and upload gmusicapi_wrapper distributions."""
upload(... | mit | Python | |
bf9f053f4382fadba3901b3b5c247b3eaac22ea3 | Add test/unit/modules/sfp_apple_itunes.py | smicallef/spiderfoot,smicallef/spiderfoot,smicallef/spiderfoot | test/unit/modules/sfp_apple_itunes.py | test/unit/modules/sfp_apple_itunes.py | # test_sfp_apple_items.py
import unittest
from modules.sfp_apple_itunes import sfp_apple_itunes
from sflib import SpiderFoot
from spiderfoot import SpiderFootEvent, SpiderFootTarget
class TestModuleAppleItunes(unittest.TestCase):
"""
Test modules.sfp_apple_itunes
"""
default_options = {
'_de... | mit | Python | |
5bab29cbdb1d5db9949a9379656cf1a925fcf20a | Add test suite for SettingFunction | onitake/Uranium,onitake/Uranium | tests/Settings/TestSettingFunction.py | tests/Settings/TestSettingFunction.py | # Copyright (c) 2016 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
import pytest
import UM.Settings.SettingFunction
## Individual test cases for the good setting functions.
#
# Each test will be executed with each of these functions. These functions are
# all good and should work... | agpl-3.0 | Python | |
99d33908b6610385f9c9f83678533611a515f5aa | Create List_Slicing.py | UmassJin/Leetcode | Python/List_Slicing.py | Python/List_Slicing.py | Array Slicing
a[start:end] # items start through end-1
a[start:] # items start through the rest of the array
a[:end] # items from the beginning through end-1
a[:] # a copy of the whole array
There is also the step value, which can be used with any of the above:
a[start:end:step] # start through not p... | mit | Python | |
2bf6f29195c2e2c6079c2f851b337341b1a74629 | Add fabfile | idan/telostats,idan/telostats,idan/telostats | fabfile.py | fabfile.py | from fabric.api import local
def deploy_staticfiles():
local('STATIC_S3=1 ./manage.py collectstatic --noinput')
def deploy_heroku():
local('git push heroku')
def deploy():
deploy_staticfiles()
deploy_heroku()
| bsd-3-clause | Python | |
e78a3ada15092873d2bd7f0cd6b6f987bb62a50a | Migrate User#verified | jgorset/fandjango,jgorset/fandjango | fandjango/migrations/0008_auto__del_field_user_verified.py | fandjango/migrations/0008_auto__del_field_user_verified.py | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'User.verified'
db.delete_column('fandjango_user', 'verified')
def backwards(self, ... | mit | Python | |
4ef9940a6f04dc37489e9deef164fb7c7edaf7f4 | fix import | ploxiln/fabric,mathiasertl/fabric,rodrigc/fabric | tests/support/tree/system/__init__.py | tests/support/tree/system/__init__.py | from fabric.api import task
from support.tree.system import debian
@task
def install_package():
pass
| from fabric.api import task
import debian
@task
def install_package():
pass
| bsd-2-clause | Python |
bf6d5b13eb6b5830390968814ebf3b2256011242 | Create find_mutation.py | elecabfer/Diverse,elecabfer/Diverse,elecabfer/Diverse,elecabfer/Diverse | find_mutation.py | find_mutation.py | import re
dir="/scratch/cluster/monthly/ecabello/Wareed/"
inputfiles=["gDNA5_S1", "gDNA-T75_S2" , "gDNA-TQ5_S3","Telo5_S4","Telo-T75_S5","Telo-TQ5_S6", "Telo-EV40_S7", "Telo-T740_S8", "Telo-TQ40_S9"]
#output = open("/scratch/cluster/monthly/ecabello/Wareed/new_sequencing/output_mutatio
strand="f"#raw_input("Strand? f/r... | mit | Python | |
5c7e096cb3847059d2212e5518852993e7ae4724 | Add sample query count_all_persons.py | google/personfinder,AwesomeTurtle/personfinder,groschovskiy/personfinder,clobrano/personfinder,kspviswa/personfinder,gauribhoite/personfinder,namanjain236/personfinder,AwesomeTurtle/personfinder,gauribhoite/personfinder,gauribhoite/personfinder,gauribhoite/personfinder,namanjain236/personfinder,gimite/personfinder,gaur... | tools/sample_queries/count_all_persons.py | tools/sample_queries/count_all_persons.py | # Sample query for counting all the Person entries between dates.
query = Person.all(filter_expired=False).filter(
'entry_date >=', datetime.datetime(2013, 1, 1, 0, 0, 0)).filter(
'entry_date <', datetime.datetime(2014, 1, 1, 0, 0, 0))
count = 0
while True:
current_count = query.count()
if current_coun... | apache-2.0 | Python | |
61ded6588895c163fb3a37880b4de80bd8c3c85c | add new package (#27112) | LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack | var/spack/repos/builtin/packages/r-dtplyr/package.py | var/spack/repos/builtin/packages/r-dtplyr/package.py | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RDtplyr(RPackage):
"""Data Table Back-End for 'dplyr'.
Provides a data.table backend ... | lgpl-2.1 | Python | |
2b1afecd6bcf6c06cdc941552aad2c0737fa89cb | Add githook.py, an analog to hghook.py. | Khan/khan-linter,Khan/khan-linter,Khan/khan-linter,Khan/khan-linter | githook.py | githook.py | #!/usr/bin/env python
"""Commit hook for git that does lint testing.
It runs the lint checker (runlint.py) on all the open files in
the current commit.
To install (for git >= 1.7.1), run the following:
% git config --global init.templatedir '~/.git_template'
and then create a symlink from
~/.git_template/hooks... | apache-2.0 | Python | |
86f41d5d57bc2fdfd91b18ee72efa7902d7bdc16 | add a module for programmatically generating jinja2 templates | fretboardfreak/netify | src/template.py | src/template.py | # Copyright 2015 Curtis Sand
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | Python | |
43873584dbb28feced2fc28a0721521a1758e09d | Print hello world | pk-python/basics | print.py | print.py | print('Hello World!') | mit | Python | |
8e8e2b99a0fc0ce572b31451078628709a80e7d5 | add short tutorial for geometric transformations | emmanuelle/scikits.image,ofgulban/scikit-image,paalge/scikit-image,newville/scikit-image,SamHames/scikit-image,bsipocz/scikit-image,warmspringwinds/scikit-image,paalge/scikit-image,GaZ3ll3/scikit-image,paalge/scikit-image,dpshelio/scikit-image,keflavich/scikit-image,almarklein/scikit-image,juliusbierk/scikit-image,oew1... | doc/examples/applications/plot_geometric.py | doc/examples/applications/plot_geometric.py | """
===============================
Using geometric transformations
===============================
In this example, we will see how to use geometric transformations in the context
of image processing.
"""
import math
import numpy as np
import matplotlib.pyplot as plt
from skimage import data
from skimage import tra... | bsd-3-clause | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.