commit
stringlengths
40
40
subject
stringlengths
1
3.25k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
old_contents
stringlengths
0
26.3k
lang
stringclasses
3 values
proba
float64
0
1
diff
stringlengths
0
7.82k
8117b3bee367afea107f7ef4b2003006e0ea857e
Create anteater.py
anteater.py
anteater.py
Python
0.000005
@@ -0,0 +1,1854 @@ +#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0A%0A###########################################%0A# 27.11.2012 %7C word scraper bot wsb.py #%0A# by PirateSecurity # http://piratesec.de #%0A###########################################%0A%0Aimport mechanize%0Aimport cookielib%0Aimport urllib2%0Afrom bs...
f2c47ccf852e1a2b2a68f4d7ac1e72409ddfad3e
Create scratch.py
scratch.py
scratch.py
Python
0.000002
@@ -0,0 +1,513 @@ +import os%0Aimport urllib%0A%0ADOWNLOADS_DIR = '/python-downloader/downloaded'%0A%0A# For every line in the file%0Afor url in open('urls.txt'):%0A # Split on the rightmost / and take everything on the right side of that%0A name = url.rsplit('/', 1)%5B-1%5D%0A%0A # Combine the name and the do...
8e3b2b6103a591dae2b99d7e219722e0992dae65
Add CatagoryMgr
CatagoryManager.py
CatagoryManager.py
Python
0.000003
@@ -0,0 +1,854 @@ +from DbHelper import DbHelper%0A%0A%0Aclass CatagoryManager(object):%0A TABLE_NAME = %22cactagory%22%0A FIELD_TITLE = %22title%22%0A FIELD_COUNT = %22count%22%0A%0A def __init__(self):%0A self.db = DbHelper()%0A sql = %22CREATE TABLE IF NOT EXISTS %60%22 + self.TABLE_NAME + ...
dcc64e9fd8bb3cb407959a30a2054fc180596bae
Add Pandas integration unit tests
tests/test_pandas_integration.py
tests/test_pandas_integration.py
Python
0
@@ -0,0 +1,1321 @@ +from unittest import TestCase%0A%0Aimport numpy as np%0Aimport pandas as pd%0Aimport numpy.testing as npt%0A%0Afrom nimble import Events%0A%0A%0Aclass TestAsPandasCondition(TestCase):%0A def setUp(self):%0A conditional_series = pd.Series(%5B0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1%5D)%0A ...
1696ca33e644d3cb1138d7ee4c48239b7a757cfd
Add the first script to try a led light
python_scripts/gpio_test.py
python_scripts/gpio_test.py
Python
0.000001
@@ -0,0 +1,198 @@ +import RPi.GPIO as GPIO%0Aimport time%0AGPIO.setmode(GPIO.BOARD)%0AGPIO.setup(7,GPIO.OUT)%0Afor x in range(0,10):%0A GPIO.output(7,True)%0A time.sleep(1)%0A GPIO.output(7,False)%0A time.sleep(1)%0AGPIO.cleanup()%0A
5c091ea20a531692c676f9d4e0f450c0e642f740
Create module for uptime retrieval
Modules/Uptime.py
Modules/Uptime.py
Python
0
@@ -0,0 +1,1229 @@ +from collections import OrderedDict%0Afrom ModuleInterface import ModuleInterface%0Afrom IRCResponse import IRCResponse, ResponseType%0Aimport datetime%0A%0A%0Aclass Module(ModuleInterface):%0A triggers = %5B%22uptime%22%5D%0A help = %22uptime -- returns the uptime for the bot%22%0A%0A def ...
e39270b69e1e8831c177bf4e5051726e6a678407
Add wsgi python script [ci skip]
app/wsgi.py
app/wsgi.py
Python
0
@@ -0,0 +1,384 @@ +import os%0Aimport sys%0A%0Aroot = os.path.dirname(os.path.realpath(__file__ + '/..'))%0A%0A# activate the virtual env%0Aactivate_this = root + '/venv/bin/activate_this.py'%0Aexecfile(activate_this, dict(__file__=activate_this))%0A%0Asys.path.insert(0, root)%0A%0A# set the environment variable to pro...
655bf4b4159e70b4a99185a1735ac63c3ee951dc
Add script to filter result by result type.
analysis/filter-by-result-type.py
analysis/filter-by-result-type.py
Python
0
@@ -0,0 +1,1142 @@ +#!/usr/bin/env python%0Aimport argparse%0Aimport os%0Aimport logging%0Aimport pprint%0Aimport sys%0Aimport yaml%0A%0A# HACK%0A_file = os.path.abspath(__file__)%0A_dir = os.path.dirname(os.path.dirname(_file))%0Asys.path.insert(0, _dir)%0Afrom BoogieRunner.ResultType import ResultType%0A%0Adef main(a...
983a89d7b400ec71806311cfe6a576d85dd59958
Create distance.py
abstractions/sensor/distance/distance.py
abstractions/sensor/distance/distance.py
Python
0.001409
@@ -0,0 +1,1646 @@ +# This code has to be added to __init__.py in folder .../devices/sensor%0A%0Aclass Distance():%0A def __family__(self):%0A return %22Distance%22%0A%0A def __getMillimeter__(self):%0A raise NotImplementedError%0A%0A @api(%22Distance%22, 0)%0A @request(%22GET%22, %22sensor/...
bf93b3b4c8965e31e5b9b8ebdbf3f1b1d258e15e
Add a new script to simplify profiling of cvs2svn.py. Document in the script how to use kcachegrind to view the results.
tools/cvs2svn/profile-cvs2svn.py
tools/cvs2svn/profile-cvs2svn.py
Python
0.000009
@@ -0,0 +1,1068 @@ +#!/usr/bin/env python%0A#%0A# Use this script to profile cvs2svn.py using Python's hotshot profiler.%0A#%0A# The profile data is stored in cvs2svn.hotshot. To view the data using%0A# hotshot, run the following in python:%0A# %0A# import hotshot.stats%0A# stats = hotshot.stats.load('cvs2sv...
61f06365254c57ced68beb83714164186164d939
add solutin for LRU Cache
src/LRUCache.py
src/LRUCache.py
Python
0
@@ -0,0 +1,1519 @@ +class LRUCache:%0A%0A class ListNode:%0A%0A def __init__(self, val):%0A self.val = val%0A self.next = None%0A self.prev = None%0A%0A # @param capacity, an integer%0A def __init__(self, capacity):%0A self.capacity = capacity%0A self.size ...
3a0fdcf51e1db8abab900a6cc1b4596d0dc4b054
automate fab process
automata.py
automata.py
Python
0.000818
@@ -0,0 +1,529 @@ +import pexpect%0Aimport getpass%0A%0Aversion = raw_input('Version: ')%0Asecret = getpass.getpass('Enter Passphrase: ')%0Agithub_username = 'ianjuma'%0A%0Aclean = pexpect.spawn('fab clean')%0Aclean.expect('Passphrase for private key:')%0Aclean.send(secret)%0A%0Adeploy = pexpect.spawn('fab deploy:%25s'...
5ea95763c541b30a4b3f9ef5dbfa201b24ae5293
Create get_gg_list_result.py
get_gg_list_result.py
get_gg_list_result.py
Python
0.000003
@@ -0,0 +1,1681 @@ +import time%0Afrom splinter import Browser%0A%0Adef splinter(url,browser):%0A #login 126 email websize%0A browser.visit(url)%0A #wait web element loading%0A time.sleep(5)%0A #fill in account and password%0A browser.find_by_id('idInput').fill('xxxxxx')%0A browser.find_by_id('pwdI...
3095142aa814e51e8fcde4d53633a93a54a7574f
Index main label reference
migrations/versions/e679554261b2_main_label_index.py
migrations/versions/e679554261b2_main_label_index.py
Python
0
@@ -0,0 +1,469 @@ +%22%22%22Main label index%0A%0ARevision ID: e679554261b2%0ARevises: e2be4ab896d3%0ACreate Date: 2019-05-09 18:55:24.472216%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = 'e679554261b2'%0Adown_revision = 'e2be4ab896d3'%0A%0Afrom alembic import op%0Aimport sqlalchemy as sa #...
ff51c695b516ea7e16518779c66ebd827b4f6230
Clean up Encode
python/pyphantomjs/encoding.py
python/pyphantomjs/encoding.py
''' This file is part of the PyPhantomJS project. Copyright (C) 2011 James Roe <roejames12@hotmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or ...
Python
0.951529
@@ -950,54 +950,8 @@ ing%0A - self._encoding = encoding.lower()%0A @@ -1057,53 +1057,8 @@ ault -%0A self._encoding = default.lower() %0A%0A
815d758f74e01bc7a460e211ffb9cb81fedb9726
add 0002
Jaccorot/0002/0002.py
Jaccorot/0002/0002.py
Python
0.999998
@@ -0,0 +1,1033 @@ +#!/usr/local/bin/python%0A#coding=utf-8%0A%0A#%E7%AC%AC 0002 %E9%A2%98%EF%BC%9A%E5%B0%86 0001 %E9%A2%98%E7%94%9F%E6%88%90%E7%9A%84 200 %E4%B8%AA%E6%BF%80%E6%B4%BB%E7%A0%81%EF%BC%88%E6%88%96%E8%80%85%E4%BC%98%E6%83%A0%E5%88%B8%EF%BC%89%E4%BF%9D%E5%AD%98%E5%88%B0 MySQL %E5%85%B3%E7%B3%BB%E5%9E%8B%E6%9...
715be73c6fc5f3e5d151a0534309d097c73f1963
Fix listsinceblock.py
qa/rpc-tests/listsinceblock.py
qa/rpc-tests/listsinceblock.py
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal c...
Python
0.000014
@@ -1657,16 +1657,17 @@ ce(), 50 +0 )%0A
f015f18d1d4c495cb0b909b93e51d97f00301d59
Set the id of the person, not the roll call item
pupa/importers/votes.py
pupa/importers/votes.py
from pupa.models import Vote from .utils import (people_by_jurisdiction_and_name, orgs_by_jurisdiction_and_name, bills_by_jurisdiction_and_name) from .base import BaseImporter class VoteImporter(BaseImporter): _type = 'vote' _model_class = Vote def __init__(self, j...
Python
0.000012
@@ -2133,16 +2133,26 @@ vote%5B' +person'%5D%5B' id'%5D = p
c3e8a9a60410ca4494038ba9f3a774b960a8a29e
Create quiz3.py
Laboratorios/quiz3.py
Laboratorios/quiz3.py
Python
0.000002
@@ -0,0 +1,160 @@ +%0Asegundos = 0%0Awhile chance %3C 6:%0Amints_seg = int ((%22ingrese el tiempo en segundos:%22))%0A%09chance +=1%0A%09if mints_seg / 60%0A%09segundos =60 time_seg%2560%0A%09print (segundos)%0A
71a6d0a032896f4ef2e9a4cda541d142f2c48171
Add unittests for environment handler.
typhon/tests/test_environment.py
typhon/tests/test_environment.py
Python
0
@@ -0,0 +1,1117 @@ +# -*- coding: utf-8 -*-%0A%22%22%22Testing the environment/configuration handler.%0A%22%22%22%0Aimport os%0Afrom copy import copy%0A%0Aimport pytest%0A%0Afrom typhon import environment%0A%0A%0Aclass TestEnvironment:%0A %22%22%22Testing the environment handler.%22%22%22%0A def setup_method(self...
d84a0b0d50fb4d01b2a2354d5317afd181f1053c
Add Random Forest Regression in Python
Regression/RandomForestRegression/regularRandomForestRegression.py
Regression/RandomForestRegression/regularRandomForestRegression.py
Python
0.000002
@@ -0,0 +1,2237 @@ +# -*- coding: utf-8 -*-%0A%22%22%22Random Forest Regression for machine learning.%0A%0ARandom forest algorithm is a supervised classification algorithm. As the name%0Asuggest, this algorithm creates the forest with a number of decision trees.%0A%0AIn general, the more trees in the forest the more ro...
8bdab0460cf280a63538e8c56650a90109cda283
add PermMissingElem.py - working
PermMissinElem.py
PermMissinElem.py
Python
0
@@ -0,0 +1,88 @@ +def solution(A):%0A euler = (len(A) + 1) * (len(A) + 2) / 2%0A return euler - sum(A) %0A
8f60b540e44fd13787c11303d81f570861c74bcf
make M5_PATH a real search path
configs/common/SysPaths.py
configs/common/SysPaths.py
# Copyright (c) 2006 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list ...
Python
0.000858
@@ -1755,16 +1755,203 @@ _path)%0A%0A +def searchpath(path, file):%0A for p in path:%0A f = joinpath(p, file)%0A if os.path.exists(f):%0A return f%0A raise IOError, %22Can't find file '%25s' on path.%22 %25 file%0A%0A def disk @@ -1978,28 +1978,30 @@ %0A return -join +search path(...
32d12ae035d1c8cebd3a163f9e35c538628e5bc7
Add test_message.py
tests/test_message.py
tests/test_message.py
Python
0
@@ -0,0 +1,1181 @@ +#!/usr/bin/env python3%0A#%0A# Copyright 2016 Red Hat, Inc.%0A#%0A# Authors:%0A# Fam Zheng %3Cfamz@redhat.com%3E%0A#%0A# This work is licensed under the MIT License. Please see the LICENSE file or%0A# http://opensource.org/licenses/MIT.%0A%0Aimport sys%0Aimport os%0Aimport time%0Aimport datetim...
a965c542e8a2ea4bb74e522eae34161d8a6c3efa
Add minimal product test
tests/test_product.py
tests/test_product.py
Python
0.000069
@@ -0,0 +1,1659 @@ +# -*- coding: utf-8 -*-%0A%0Aimport unittest%0Aimport os%0A%0Afrom context import epages%0A%0Aclass TestProduct(unittest.TestCase):%0A%0A client = None%0A product_service = None%0A product_id = None%0A%0A @classmethod%0A def setUpClass(cls):%0A host = os.environ%5B'EPAGES_HOST'...
cf8ff340597d29431eaed8265a67205a1b021ee7
add host_evacuate task
rock/tasks/host_evacuate.py
rock/tasks/host_evacuate.py
Python
0.000002
@@ -0,0 +1,1214 @@ +from flow_utils import BaseTask%0Afrom actions import NovaAction%0Afrom server_evacuate import ServerEvacuateTask%0Aimport logging%0A%0Aclass HostEvacuateTask(BaseTask,NovaAction):%0A%0A def execute(self, host):%0A n_client = self._get_client()%0A%0A evacuated_host = host%0A ...
ceb3c0535f2701d595d440552d60da876d7cd0b8
Move some functions from 'model.utils' to 'core.xrf_utils'
pyxrf/core/xrf_utils.py
pyxrf/core/xrf_utils.py
Python
0
@@ -0,0 +1,2570 @@ +import xraylib%0A%0A%0Adef parse_compound_formula(compound_formula):%0A r%22%22%22%0A Parses the chemical formula of a compound and returns the dictionary,%0A which contains element name, atomic number, number of atoms and mass fraction%0A in the compound.%0A%0A Parameters%0A -----...
2a6ec396512c435413f6e3848d1448af839fa9a6
Add unittests for FindQuery
tests/test_storage.py
tests/test_storage.py
Python
0
@@ -0,0 +1,681 @@ +import time%0A%0Afrom graphite_api.storage import FindQuery%0A%0Afrom . import TestCase%0A%0A%0Aclass StorageTestCase(TestCase):%0A def test_find_query(self):%0A end = int(time.time())%0A start = end - 3600%0A%0A query = FindQuery('collectd', None, None)%0A self.assertE...
e4396938425bc27fc730d580a6cd4ee6e3fd09e9
Remove v1.0 and v1.1 API from version info.
quantum/api/versions.py
quantum/api/versions.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Citrix Systems. # 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...
Python
0.000001
@@ -1144,17 +1144,17 @@ %22id%22: %22v -1 +2 .0%22,%0A @@ -1181,211 +1181,15 @@ %22: %22 -DEPRECATED%22,%0A %7D,%0A %7B%0A %22id%22: %22v1.1%22,%0A %22status%22: %22CURRENT%22,%0A %7D,%0A %7B%0A %22id%22: %22v2.0%22,%0A ...
5db291b8a745f8dc640e7cdc7a274535abcc63af
Create rPiEinkQR.py
rPiEinkQR.py
rPiEinkQR.py
Python
0.000001
@@ -0,0 +1,708 @@ +import os%0Afrom PIL import Image%0Afrom epyper.displayCOGProcess import Display%0Afrom epyper.displayController import DisplayController%0A%0A# code to create QR code of good size for eink screen%0A# qrencode -o qrcode.png -s 7 -l L -v 1 -m 1 %22TestThree003%22%0A%0AQRname = %22qrencode -o qrcode.pn...
dff76b6518b1de1be56def7469180d841a9e6121
Create __init__.py
Tools/__init__.py
Tools/__init__.py
Python
0.000429
@@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*-%0A
a152c7c48baa0f1c82e7d84bebbee674eb4f2761
Add command to queue expired tiles
tilequeue/commands.py
tilequeue/commands.py
Python
0.000001
@@ -0,0 +1,2634 @@ +from tilequeue.queues import make_sqs_queue%0Afrom tilequeue.tile import explode_with_parents%0Afrom tilequeue.tile import parse_expired_coord_string%0Aimport argparse%0Aimport os%0A%0Adef add_aws_cred_options(arg_parser):%0A arg_parser.add_argument('--aws_access_key_id')%0A arg_parser.add_arg...
707781ac58318af002cc1e75d8c31839d4e66e77
add module to support search result export
arches/app/utils/geos_to_pyshp.py
arches/app/utils/geos_to_pyshp.py
Python
0
@@ -0,0 +1,872 @@ +from django.contrib.gis.geos import MultiPoint%0Afrom django.contrib.gis.geos import MultiLineString%0Afrom django.contrib.gis.geos import MultiPolygon%0A%0Adef convert_geom(geos_geom):%0A if geos_geom.geom_type == 'Point':%0A multi_geom = MultiPoint(geos_geom)%0A shp_geom = %5B%5Bc for c ...
3e0903ba2f74d5f73241d1ffc5056f2a77c709e0
Add a simple test for SetupPrometheusEndpointOnPortRange
tests/test_exports.py
tests/test_exports.py
Python
0.000001
@@ -0,0 +1,367 @@ +#!/usr/bin/env python%0Afrom django_prometheus.exports import SetupPrometheusEndpointOnPortRange%0Aimport unittest%0A%0A%0Aclass ExportTest(unittest.TestCase):%0A def testPortRange(self):%0A port_range = %5B8000, 8001%5D%0A SetupPrometheusEndpointOnPortRange(port_range)%0A Set...
a4ce015943da37335114aa8b384f2ee7371f6446
Test in app-factory.
tests/test_factory.py
tests/test_factory.py
Python
0
@@ -0,0 +1,1658 @@ +from flask import Flask%0Afrom flask_sslify import SSLify%0Afrom pytest import fixture%0A%0A%0Aclass AppFactoryContext(object):%0A%0A def __init__(self):%0A self.sslify = SSLify()%0A self.app = None%0A self.appctx = None%0A%0A def __enter__(self):%0A self.app = self...
a866b7e2de7e76e8bfb3b1feb22d7692afa5111d
Add test exposing stale promise job store cache (connected to #817)
src/toil/test/src/promisesTest.py
src/toil/test/src/promisesTest.py
Python
0
@@ -0,0 +1,1253 @@ +# Copyright (C) 2015 UCSC Computational Genomics Lab%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A# http://www.apache.org/licenses/LICENSE-2.0%0A#...
e99807f81dea6bac82f373a210af0c4f26b61334
test - Test for exception on syntax error
tests/test_request.py
tests/test_request.py
Python
0
@@ -0,0 +1,318 @@ +import pytest%0A%0Aimport overpy%0A%0A%0Aclass TestQuery(object):%0A def test_syntax_error(self):%0A with pytest.raises(overpy.exception.OverpassBadRequest):%0A api = overpy.Overpass()%0A # Missing ; after way(1)%0A api.query((%0A %22way(1)%22...
69c5015a1a9dc3233530d691d20befa529f7c880
Create lookupAndStoreTweets.py utility.
app/utils/insert/lookupAndStoreTweets.py
app/utils/insert/lookupAndStoreTweets.py
Python
0
@@ -0,0 +1,1164 @@ +#!/usr/bin/env python2%0A# -*- coding: utf-8 -*-%0A%22%22%22%0ALookup and Store Tweets utility.%0A%22%22%22%0Aimport argparse%0Aimport os%0Aimport sys%0A%0A# Allow imports to be done when executing this file directly.%0AappDir = os.path.abspath(os.path.join(os.path.dirname(__file__),%0A ...
bb2644fc14dd92cf54c6a22da6fe3a66f89535e6
Create VNSautoRotator.py
VNSautoRotator.py
VNSautoRotator.py
Python
0
@@ -0,0 +1,993 @@ +import numpy as np%0Aimport sys, os%0Aimport nrrd%0A%0Aif (len(sys.argv) %3C 2):%0A print 'Error: missing arguments!'%0A print 'e.g. python VNSautoRotator.py imageIn.nrrd %5BImageOut.nrrd%5D'%0A print 'rotate RPI to LPS orientation for CMTK (as it doesn't like RPI)'%0Aelse:%0A print 'Proc...
16b73476daedaf1b111e900c0db947dcdab1c9a6
Add zits crawler
comics/crawler/crawlers/zits.py
comics/crawler/crawlers/zits.py
Python
0
@@ -0,0 +1,863 @@ +from comics.crawler.utils.lxmlparser import LxmlParser%0Afrom comics.crawler.base import BaseComicCrawler%0Afrom comics.crawler.meta import BaseComicMeta%0A%0Aclass ComicMeta(BaseComicMeta):%0A name = 'Zits'%0A language = 'en'%0A url = 'http://www.arcamax.com/zits'%0A start_date = '1997-0...
9b0d6239bf73dce4cc981f13dd16d3c5f46b40b3
Create dominick.py
dominick.py
dominick.py
Python
0
@@ -0,0 +1 @@ +%0A
5ffdaf778157d112c26b96020408f80ec3820e02
Create __init__.py
crispy/actions/__init__.py
crispy/actions/__init__.py
Python
0.000429
@@ -0,0 +1,34 @@ +from crispy.actions.core import *%0A
fb9915a481e3161325eb5200db2232e6e34b2acc
Add support for Jawbone
services/jawbone.py
services/jawbone.py
Python
0
@@ -0,0 +1,1866 @@ +from oauthlib.common import add_params_to_uri%0Aimport foauth.providers%0A%0A%0Aclass Jawbone(foauth.providers.OAuth2):%0A # General info about the provider%0A provider_url = 'https://jawbone.com/'%0A docs_url = 'https://jawbone.com/up/developer/endpoints'%0A category = 'Fitness'%0A%0A ...
4f50891c1a7d918010dbcecd640bb4b83f7bd2a3
ADD taobao login
socialoauth/sites/taobao.py
socialoauth/sites/taobao.py
Python
0
@@ -0,0 +1,1066 @@ +# -*- coding: utf-8 -*-%0A%0Afrom socialoauth.sites.base import OAuth2%0A%0A%0Aclass TaoBao(OAuth2):%0A AUTHORIZE_URL = 'https://oauth.taobao.com/authorize'%0A ACCESS_TOKEN_URL = 'https://oauth.taobao.com/token'%0A TAOBAO_API_URL = 'https://eco.taobao.com/router/rest'%0A%0A %0A def bu...
20eb83e4e8e0391c9efaca7f30a80220f9a14e9a
Add codelists management tools
maediprojects/query/codelists.py
maediprojects/query/codelists.py
Python
0.000001
@@ -0,0 +1,816 @@ +from maediprojects import db, models%0Aimport datetime%0A%0Adef create_code(data):%0A codelistcode = models.CodelistCode()%0A %0A for attr, val in data.items():%0A setattr(codelistcode, attr, val)%0A db.session.add(codelistcode)%0A db.session.commit()%0A return codelistcode%0...
c4578461b82dbe0f94439e6823669af536ae3f09
add index on _id_document field
apps/archive_history/service.py
apps/archive_history/service.py
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import loggi...
Python
0.000002
@@ -1458,24 +1458,33 @@ _indexes = %7B +%0A 'item_id': ( @@ -1522,16 +1522,93 @@ : True%7D) +,%0A '_id_document': (%5B('_id_document', 1)%5D, %7B'background': True%7D),%0A %7D%0A%0A%0Aclas
1c810e9026f2d2c7ce3722d89a0cd7d333904e0f
add ipdb.py for easier debugging
examples/ipdb.py
examples/ipdb.py
Python
0.000001
@@ -0,0 +1,1802 @@ +%22%22%22%0AThis module provides a quick n dirty way to get a debug ipython shell.%0A2 ways to achieve that:%0A%0A1. call set_trace() will immediately stop your program at that position%0A2. import ipdb will overwrite sys.excepthook with ipdb.info. This will%0A provide the ipython shell%0A%22%22%2...
b71fddfab16cd5d3716f15a0d2e2a9abe2e36c8a
Fix SSH connection caching.
push/ssh.py
push/ssh.py
import select import getpass import paramiko # hack to add paramiko support for AES encrypted private keys if "AES-128-CBC" not in paramiko.PKey._CIPHER_TABLE: from Crypto.Cipher import AES paramiko.PKey._CIPHER_TABLE["AES-128-CBC"] = dict(cipher=AES, keysize=16, blocksize=16, mode=AES.MODE_CBC) class SshEr...
Python
0
@@ -3976,32 +3976,76 @@ nnection = None%0A + if not self.current_connection:%0A self.cur
da4436ec5ec3c982e42e9f85749ac8c8cf8b8a94
add codegen submodule
altair/codegen.py
altair/codegen.py
Python
0.000001
@@ -0,0 +1,1553 @@ +%22%22%22%0AObject for generating Python code calls%0A%22%22%22%0A%0Aclass CodeGen(object):%0A def __init__(self, name, args=None, kwargs=None, methods=None):%0A self.name = name%0A self.args = (args or %5B%5D)%0A self.kwargs = (kwargs or %7B%7D)%0A self.methods = (met...
9d20d1f87f509ce51fde5c51460ff0b17c051ca1
Create pytest_setup.py
utils/pytest_setup.py
utils/pytest_setup.py
Python
0.000007
@@ -0,0 +1,113 @@ +pip install -U pytest-xdist%0Apip install -U parameterized%0Apip install -U pytest-flake8%0Apip install -U pytest-html%0A
7039e4f25d8eecdf2d5d2b4a4a769e05c5075222
Fix description of 'api_read_full_member' permission
bluebottle/members/migrations/0020_auto_20171031_1048.py
bluebottle/members/migrations/0020_auto_20171031_1048.py
Python
0.000052
@@ -0,0 +1,604 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.10.8 on 2017-10-31 09:48%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Adef rename_full_member_permission(apps, schema_editor):%0A Permission = apps.get_model('auth', 'Permission')%0A%0A perm = Permission...
4b4e9bc8f9605519b12d4da25dc6822baa629d2e
Add test_core
unit_tests/test_core.py
unit_tests/test_core.py
Python
0.000001
@@ -0,0 +1,374 @@ +from lcapy import *%0Aimport unittest%0Aimport sympy as sym%0A%0As = sym.var('s')%0A%0Aclass LcapyTester(unittest.TestCase):%0A %22%22%22Unit tests for lcapy%0A%0A %22%22%22%0A%0A def test_sExpr(self):%0A %22%22%22Lcapy: check sExpr%0A%0A %22%22%22%0A a = sExpr('(s+2)/(s...
30be74075e761f932a10ea0806a08991b8fd9cb4
Add script to list nodes without an external ID
code/python/find-nodes-without-external-id.py
code/python/find-nodes-without-external-id.py
Python
0
@@ -0,0 +1,2328 @@ +#!/usr/bin/env python%0A%0Aimport httplib%0Aimport urllib%0Aimport json%0Aimport ssl%0Aimport argparse%0Aimport re%0A%0Aparser = argparse.ArgumentParser(description='Find any node that does not have an external ID set.')%0Aparser.add_argument('--target-url', required=True, help='URL for the UpGuard ...
f12af379ec31b8c14bf871768c558c81bad95301
Add grains for the cloud metadata server
salt/grains/metadata.py
salt/grains/metadata.py
Python
0
@@ -0,0 +1,1241 @@ +# -*- coding: utf-8 -*-%0A'''%0AGrains from cloud metadata servers at 169.254.169.254%0A%0A.. versionadded:: Nitrogen%0A%0A:depends: requests%0A'''%0Afrom __future__ import absolute_import%0A%0A# Import python libs%0Aimport os%0Aimport socket%0A%0A# Import salt libs%0Aimport salt.utils.http as http%...
101189c319c2d0fadc97fd1077a87c11ab159a12
add a new test folder.
Test/new_module.py
Test/new_module.py
Python
0
@@ -0,0 +1,394 @@ +#!/usr/bin/env python3%0A#%0A# Copyright (c) 2016 Zhixian MA %3Czxma_sjtu@qq.com%3E%0A# MIT license%0A%0A%22%22%22%0AA test script to learn the grammar and code tyle of python, and try to make interesting docstrings.%0A%22%22%22%0A%0Aimport os%0Aimport sys%0Aimport argparse%0Aimport logging%0A%0Aimpo...
3d624b5693a753ee8ecdd6f979eaa3d17736dca7
Create Syllabifier.py
cltk/corpus/middle_english/Syllabifier.py
cltk/corpus/middle_english/Syllabifier.py
Python
0.000001
@@ -0,0 +1,379 @@ +%22%22%22%0ASonority hierarchy for Middle English%0A%22%22%22%0A%0ASyllabifier = %7B%0A 'a': 1,%0A '%C3%A6': 1,%0A 'e': 1,%0A 'i': 1,%0A 'o': 1,%0A 'u': 1,%0A 'y': 1,%0A 'm': 2,%0A 'n': 2,%0A 'p': 3,%0A 'b': 3,%0A 'd': 3,%0A 'g': 3,%0A 't': 3,%0A 'k': 3,%0...
bace8f65e696211db5a6ffa2cefc70d2e061b950
Add Support for /r/greentext
greentext/app.py
greentext/app.py
Python
0
@@ -0,0 +1,1900 @@ +#encoding:utf-8%0A%0Afrom utils import get_url, weighted_random_subreddit%0Afrom utils import SupplyResult%0A%0A%0A# Subreddit that will be a source of content%0Asubreddit = weighted_random_subreddit(%7B%0A 'greentext': 1.0,%0A # If we want get content from several subreddits%0A # please pr...
b1af12dfc111c6550c166d00fdabf7fa707bfc1b
Create main.py
challenge_0/python/wost/main.py
challenge_0/python/wost/main.py
Python
0.000001
@@ -0,0 +1,167 @@ +'''%0AWritten in Python 3.6%0A'''%0A%0Adef main(text):%0A%09print(f%22Hello world, additional text: %7Btext%7D%22)%0A%0Aif __name__ == %22__main__%22:%0A%09main(input(%22What would you like to say?%22))%0A
14aba0695514866439164f48fe1f66390719431f
Add selcet_gamma.py (authored by Amnon)
scripts/select_gamma.py
scripts/select_gamma.py
Python
0
@@ -0,0 +1,2394 @@ +#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0A%22%22%22%0ACreated on Fri Oct 18 10:13:48 2013%0A%0A@author: amnon%0A%0A### 80 char max please%0A%0ALook at all the gammaproteobacteria and select candidate contamination sequence%0A OTUs%0Aoutput: a list of sorted gammaproteobacteria (or other) otui...
83fe6892c5b061f5fbba64c9f870f30c80b1a12a
create word bigram matrix
dsl/features/word_level.py
dsl/features/word_level.py
Python
0.999995
@@ -0,0 +1,1914 @@ +import logging%0Afrom os import path%0Afrom argparse import ArgumentParser%0Afrom featurize import Tokenizer, BigramModel%0A%0A%0Adef parse_args():%0A p = ArgumentParser()%0A p.add_argument('--train', type=str)%0A p.add_argument('--test', type=str)%0A p.add_argument('--raw-matrix-dir', t...
fec8de91954230b44b717f4b3d5a3a774c108fdf
Create monitor.py
assets/monitor.py
assets/monitor.py
Python
0.000001
@@ -0,0 +1,2263 @@ +#!/usr/bin/env python%0A%0Aimport sqlite3%0A%0Aimport os%0Aimport time%0Aimport glob%0A%0A# global variables%0Asperiod=(15*60)-1%0Adbname='/var/www/templog.db'%0A%0A%0A%0A# store the temperature in the database%0Adef log_temperature(temp):%0A%0A conn=sqlite3.connect(dbname)%0A curs=conn.cursor...
81b178677a3c217f62be85bf16964a1f0717930f
fix #1
commons_util/os_utils/memory.py
commons_util/os_utils/memory.py
Python
0.000002
@@ -0,0 +1,23 @@ +__author__ = 'Danyang'%0A
cd1ed470e319c6aa5d2ed5206d6fb6fba63876ee
add k-fold splitter
splitter.py
splitter.py
Python
0.000002
@@ -0,0 +1,1647 @@ +%22%22%22%0AStuff which splits dataset into train and test sets.%0A%22%22%22%0A%0Aclass KFoldSplitter(object):%0A %22%22%22Splitter that splits a table into k groups of (almost) equal size.%0A Before using this splitter, make sure the table to split has a %60group_id%60 column.%0A%0A Sample...
6119f7998d918d3b38f129b7afd720f9a35e35c1
Add script for fetching metadata from audio file
audio-metadata.py
audio-metadata.py
Python
0
@@ -0,0 +1,1763 @@ +#! /usr/bin/env python %0Aimport os%0Aimport sys%0Aimport re%0Aimport tempfile%0A%0Adef getVideoDetails(filepath):%0A tmpf = tempfile.NamedTe...
21df69e2b2be4d59b5c8257d7efbf27a75eeb8dd
Add priming_output example
examples/priming_output.py
examples/priming_output.py
Python
0.00023
@@ -0,0 +1,793 @@ +#!/usr/bin/env python3%0A%22%22%22Test priming output buffer.%0A%0ASee http://www.portaudio.com/docs/proposals/020-AllowCallbackToPrimeStream.html%0A%0ANote that this is only supported in some of the host APIs.%0A%0A%22%22%22%0Aimport sounddevice as sd%0A%0A%0Adef callback(indata, outdata, frames, ti...
98398398f590c3a98733193fc0ea45a1948edd0e
Add example to compare layers in a char-rnn task.
examples/recurrent-text.py
examples/recurrent-text.py
Python
0
@@ -0,0 +1,2017 @@ +#!/usr/bin/env python%0A%0Aimport climate%0Aimport matplotlib.pyplot as plt%0Aimport numpy as np%0Aimport theanets%0A%0Aimport utils%0A%0Aclimate.enable_default_logging()%0A%0ACOLORS = %5B'#d62728', '#1f77b4', '#2ca02c', '#9467bd', '#ff7f0e',%0A '#e377c2', '#8c564b', '#bcbd22', '#7f7f7f', '...
f41dc1eb966da1505d4dedd00034debf79774807
add tests
smalltalk_like/tests.py
smalltalk_like/tests.py
Python
0
@@ -0,0 +1,1917 @@ +from obj_model import Class, Instance, TYPE, OBJECT%0A%0A%0Adef test_creation():%0A test_attribute()%0A test_subclass()%0A test_callmethod()%0A%0A%0Adef test_attribute():%0A%0A # Python Code%0A class A(object):%0A pass%0A%0A obj = A()%0A obj.a = 1%0A assert obj.a == 1%...
6c9cf71064cf8a0c47147efeb742b2d66caa1c47
add stub models file
corehq/apps/toggle_ui/models.py
corehq/apps/toggle_ui/models.py
Python
0
@@ -0,0 +1,93 @@ +# Stub models file%0Afrom couchdbkit.ext.django.schema import Document%0A%0Aclass _(Document): pass
01c8d16df94ce558593b29974e30aa96679c6862
add stylize.py for feed-forward mode
stylize.py
stylize.py
Python
0
@@ -0,0 +1,917 @@ +%22%22%22%0ACopyright 2016-present Tony Peng%0A%0ALoad a trained feed-forward model to stylize an image.%0A%22%22%22%0A%0Aimport nets%0Aimport numpy as np%0Aimport tensorflow as tf%0Aimport utils%0Aimport time%0A%0AMODEL_PATH = 'models/trained/Udnie'%0ACONTENT_IMAGE_PATH = 'runs/Udnie/content_small.j...
544c9cf63f54ca9e77fa37ab5e529791f9e00c3c
Create sysinfo.py
sysinfo.py
sysinfo.py
Python
0.000002
@@ -0,0 +1,61 @@ +#!/usr/bin/env python3%0A%0Aif __name__ == '__main__':%0A print%0A
277eca85f5eaf009c9ae7a38ef28801a747f9efa
Add copyright notice
nose2/util.py
nose2/util.py
import os import re import sys try: from compiler.consts import CO_GENERATOR except ImportError: # IronPython doesn't have a complier module CO_GENERATOR=0x20 try: from inspect import isgeneratorfunction # new in 2.6 except ImportError: import inspect # backported from Python 2.6 def isgen...
Python
0
@@ -1,12 +1,294 @@ +%22%22%22%0AThis module contains some code copied from unittest2/loader.py and other%0Acode developed in reference to that module and others within unittest2.%0A%0Aunittest2 is Copyright (c) 2001-2010 Python Software Foundation; All%0ARights Reserved. See: http://docs.python.org/license.html%0A%0A%2...
5dd7f77f97e897591bc1d7615a986dbe0ad4f183
Add `caption` and `tbody` tags to whitelist
src/ggrc/models/__init__.py
src/ggrc/models/__init__.py
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: dan@reciprocitylabs.com # Maintained By: dan@reciprocitylabs.com from .all_models import * """All gGRC model objects and associated utilities.""" ...
Python
0
@@ -2734,16 +2734,34 @@ tags = %5B +%0A 'caption', 'strong' @@ -2811,17 +2811,16 @@ 'samp', - %0A ' @@ -2887,17 +2887,16 @@ ddress', - %0A ' @@ -2962,17 +2962,16 @@ ', 'ul', - %0A ' @@ -3029,17 +3029,16 @@ , 'img', - %0A ' @@ -3072,16 +3072,25 @@ 'table', + 'tbody', 'tr', ' @...
475ea65cce34b7af03a7355e16d95104292aa7fb
Create suntimes.py
suntimes.py
suntimes.py
Python
0.000055
@@ -0,0 +1,1345 @@ +#! /bin/python%0A# -*- coding: UTF-8 -*-%0Aimport urllib2, json, datetime, time%0Aimport dateutil.parser%0A%0Aglobal latitude%0Aglobal longitude%0A%0Aapi=json.loads(urllib2.urlopen(%22http://freegeoip.net/json/%22).read().decode(%22UTF-8%22))%0Alatitude=str(api%5B'latitude'%5D)%0Alongitude=str(api%5...
561b1b0bf1950bac54bc9c079daf6c09b3f87158
Create pd.py
src/ml/pd.py
src/ml/pd.py
Python
0.000002
@@ -0,0 +1,932 @@ +#encoding=utf8%0Aimport pandas as pd%0Aimport numpy as np%0Aimport matplotlib.pyplot as plt%0A%0As = pd.Series(%5B1,3,5,np.nan,6,8%5D)%0Aprint(s)%0Adates = pd.date_range('20130101', periods=6)%0Aprint(dates)%0A#%E5%88%9B%E5%BB%BADataFrame%0Adf = pd.DataFrame(np.random.randn(6,4), index=dates, columns...
f9317419417ec348b6520ce6aecf852a391d4b01
Add importers module init
po2strings/importers/__init__.py
po2strings/importers/__init__.py
Python
0
@@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*-
124190aae0f39885011a5f12667d2348ffa32d09
add invoke task to remve trailing ws
tasks/ws.py
tasks/ws.py
Python
0.000002
@@ -0,0 +1,919 @@ +import os%0A%0Afrom invoke import task%0A%0Afrom ._config import ROOT_DIR, NAME%0A%0A%0Adef trim_py_files(directory):%0A for root, dirs, files in os.walk(directory):%0A for fname in files:%0A filename = os.path.join(root, fname)%0A if fname.endswith('.py'):%0A ...
9f6952e0c46795bb704c9169cd71fdf18d952ebf
Add ChEBI client
indra/databases/chebi_client.py
indra/databases/chebi_client.py
Python
0
@@ -0,0 +1,466 @@ +import os%0Aimport csv%0Afrom functools32 import lru_cache%0A%0Achebi_to_pubchem_file = os.path.dirname(os.path.abspath(__file__)) + %5C%0A '/../resources/chebi_to_pubchem.tsv'%0Atry:%0A fh = open(chebi_to_pubchem_file, 'rt')%0A rd = csv.reader(fh, delimiter='%5Ct')%0A ...
3826858481c4f9bbf8d887fa390322f8190c96e2
Add module to list ip addresses
py3status/modules/net_iplist.py
py3status/modules/net_iplist.py
Python
0
@@ -0,0 +1,2768 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0ADisplay the list of current IPs. This excludes loopback IPs and displays%0A%22no connection%22 if there is no connection.%0A%0AConfiguration parameters%0A ignore: list of IPs to ignore. Can use shell style wildcards.%0A (default: %5B'127.*'%5D)%0A n...
66ad00861f7143e35ab80674295fa5bf7998cfa5
Create pytabcomplete.py
HexChat/pytabcomplete.py
HexChat/pytabcomplete.py
Python
0.000002
@@ -0,0 +1,1519 @@ +from __future__ import print_function%0Aimport hexchat%0A%0A__module_name__ = %22PythonTabComplete%22%0A__module_author__ = %22TingPing%22%0A__module_version__ = %220%22%0A__module_description__ = %22Tab completes modules in Interactive Console%22%0A%0Alastmodule = ''%0Alastcomplete = 0%0Alasttext =...
248023106d4e881110a646e9d078ecad4f58e24d
Add a Python program which reads from a pipe and writes the data it gets to syslog.
pipelogger.py
pipelogger.py
Python
0
@@ -0,0 +1,565 @@ +#!/usr/bin/env python%0A#%0A%0Aimport argparse%0Aimport os%0Aimport syslog%0A%0Aparser = argparse.ArgumentParser(%0A%09description='Syslog messages as read from a pipe')%0A%0Aparser.add_argument('-i', '--ident',%0A%09help='Use the given identifier for syslogging',%0A%09required=True)%0Aparser.add_arg...
85d29ef779687a3b9db5333ce9921fc20e66b985
Create test_get.py
test_get.py
test_get.py
Python
0.000003
@@ -0,0 +1,371 @@ +#!/usr/bin/env python%0A# -*- coding=utf-8 -*-%0A#%E4%BB%A5get%E6%98%8E%E6%96%87%E7%9A%84%E6%96%B9%E5%BC%8F%E4%BC%A0%E9%80%92%E6%95%B0%E6%8D%AE%0Aimport urllib%0Aimport urllib2%0A %0Avalues=%7B%7D%0Avalues%5B'username'%5D = %221016903103@qq.com%22%0Avalues%5B'password'%5D=%22XXXX%22%0Adata = urllib.u...
5d54d3f9ead119671affa9bb04ec64efc7c3eea4
Fix check.py a+x perms
check.py
check.py
#!/usr/bin/env python3 # coding: utf-8 """ EXPERIMENTAL Regular expression rule checker for Khan Academy translations. Instructions: - Download https://crowdin.com/download/project/khanacademy.zip - Unzip the 'de' folder. - From the directory where the 'de' folder is located, run this script. """ import polib impo...
Python
0.000002
66201e6d73a909bc0ad932ad4b5de9d2ce30d4fe
add Blob class
PhloxAR/features/blob.py
PhloxAR/features/blob.py
Python
0.000001
@@ -0,0 +1,356 @@ +# -*- coding:utf-8 -*-%0Afrom __future__ import division, print_function%0Afrom __future__ import absolute_import, unicode_literals%0A%0Afrom PhloxAR.base import math%0Afrom PhloxAR.base import sss%0Afrom PhloxAR.base import *%0Afrom PhloxAR.features.feature import Feature%0Afrom PhloxAR.color impor...
0b06fb26fa5393e4ba80e2942ebba34d9f9fa4de
Create 1st Python script
Python/spatial-basics.py
Python/spatial-basics.py
Python
0.000001
@@ -0,0 +1,60 @@ +from shapely.wkt import loads%0Ag = loads('POINT (0.0 0.0)')%0A%0A
a61d37449f8000a83942513f2ad71151ef26822d
Add unit tests for synapse.cells
synapse/tests/test_cells.py
synapse/tests/test_cells.py
Python
0.000001
@@ -0,0 +1,508 @@ +import synapse.axon as s_axon%0Aimport synapse.cells as s_cells%0Aimport synapse.cryotank as s_cryotank%0A%0Afrom synapse.tests.common import *%0A%0Aclass CellTest(SynTest):%0A%0A def test_cell_cryo(self):%0A with self.getTestDir() as dirn:%0A with s_cells.cryo(dirn) as cryo:%0A ...
7454abdfba5d37d81dc3ad4bf7fb2f63bc552f38
Add wsgi file
toolkit.wsgi
toolkit.wsgi
Python
0.000001
@@ -0,0 +1,200 @@ +import os%0Aimport sys%0A%0Aos.environ%5B'DJANGO_SETTINGS_MODULE'%5D = 'settings'%0Asys.path.append(os.path.abspath(%22.%22))%0A%0Aimport django.core.handlers.wsgi%0Aapplication = django.core.handlers.wsgi.WSGIHandler()%0A%0A%0A
324161f37b54aee71de801b4206f925c967d11d4
Add a couple of simple tests and fix typo
tasklib/tests.py
tasklib/tests.py
Python
0.00002
@@ -0,0 +1,712 @@ +import shutil%0Aimport tempfile%0Aimport unittest%0Aimport uuid%0A%0Afrom .task import TaskWarrior%0A%0A%0Aclass TasklibTest(unittest.TestCase):%0A%0A def setUp(self):%0A self.tmp = tempfile.mkdtemp()%0A self.tw = TaskWarrior(data_location=self.tmp)%0A%0A def tearDown(self):%0A ...
86d51e36ca0f5772717d72d4729fb331a0066636
Fix smoke tests to delete resources synchronously.
tempest/smoke.py
tempest/smoke.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack, LLC # 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/...
Python
0
@@ -1758,38 +1758,37 @@ object%0A -if not +while cls.resources:%0A @@ -1787,39 +1787,24 @@ ources:%0A - return%0A thin @@ -1831,28 +1831,8 @@ p()%0A - while True:%0A @@ -1938,16 +1938,17 @@ ame__))%0A +%0A @@ -1957,35 +1957,42 @@ # -Resources in novaclient a...
ce8f335b8b52d682cd233a96529201a4c537e88d
Add Python 3.5
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup from codecs import open from scot import __version__ as ver with open('README.md', encoding='utf-8') as readme: long_description = readme.read() setup( name='scot', version=ver, description='EEG/MEG Source Connectivity Toolbox', long_description...
Python
0.999999
@@ -968,16 +968,64 @@ : 3.4',%0A + 'Programming Language :: Python :: 3.5'%0A %5D,%0A
fc70bf43639f34d92b21c66269ee2e15da9f0e5c
Fix missing dev dependency
setup.py
setup.py
import setuptools import sys # Thwart installation for unsupported versions of Python. `pip` didn't start # enforcing `python_requires` until 9.0. if sys.version_info < (3, 4): raise RuntimeError('Unsupported Python version: ' + sys.version) setuptools.setup( author='Diego Argueta', author_email='darguet...
Python
0.000112
@@ -1117,24 +1117,51 @@ tox%3E=0.10',%0A + 'pylint%3E=2.0',%0A
a17efdceeeec0932ff403ebeb6f787ea8b08a3a4
Add print lists function practice problem
Problems/printLists.py
Problems/printLists.py
Python
0.000003
@@ -0,0 +1,693 @@ +#!/Applications/anaconda/envs/Python3/bin%0A%0A%0Adef main():%0A # Test suite%0A test_list_1 = %5B%22puppy%22, %22kitten%22, %22lion cub%22%5D%0A test_list_2 = %5B%22lettuce%22,%0A %22bacon%22,%0A %22turkey%22,%0A %22mayonnaise%22,%0A ...
9bbea15cd6832f9a0a75a05775fcf2a12297f8c8
Update setup.py
setup.py
setup.py
"""Chassis: Opinionated REST Framework.""" from distutils.core import setup setup( name='chassis', version='0.0.5', packages=['chassis'], description="Tornado framework for self-documenting JSON RESTful APIs.", author="Refinery 29", author_email="chassis-project@refinery29.com", url="https...
Python
0
@@ -839,9 +839,252 @@ : 2. -7 +6',%0A 'Programming Language :: Python :: 2.7',%0A 'Programming Language :: Python :: 3',%0A 'Programming Language :: Python :: 3.2',%0A 'Programming Language :: Python :: 3.3',%0A 'Programming Language :: Python :: 3.4 ',%0A
14ff724cd05f51973af9ede47d9f8cfe2a1ce908
Add optional flag to setuptools extension (#78)
setup.py
setup.py
import sys import platform from pkg_resources import parse_version from setuptools import setup, Extension cpython = platform.python_implementation() == 'CPython' is_glibc = platform.libc_ver()[0] == 'glibc' windows = sys.platform.startswith('win') if is_glibc: glibc_ver = platform.libc_ver()[1] libc_ok = pars...
Python
0
@@ -1106,16 +1106,39 @@ %5D +,%0A optional=True %0A )%0A
34643864e52f3231aa40256bc160569af234e8e7
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,437 @@ +from setuptools import find_packages, setup%0A%0A%0Aversion = __import__('vdlkino').__version__%0A%0A%0Asetup(%0A name='vdlkino',%0A version=version,%0A description='Library in Python for comunicate computer with Arduino running VDLKino',%0A author='Eduardo Klosowski',%0A author_email=...
8ec65137efcf1f8cf37923b916e7496e10027edc
Bump version.
setup.py
setup.py
import os import sys from setuptools import setup INSTALL_REQUIRES = ['python_cjson', 'requests >=1.0.3', 'boto >=2.1.1'] if sys.version_info < (2, 7, 0): INSTALL_REQUIRES.append('argparse>=1.1') def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = "qds_sdk", ...
Python
0
@@ -337,11 +337,9 @@ .0.1 -5b1 +6 %22,%0A
42a287d23a1153df636c193695615d99b7c75e4d
Test stopping all running file backups
test/stop_all.py
test/stop_all.py
Python
0
@@ -0,0 +1,382 @@ +import urbackup_api%0D%0A%0D%0A%0D%0Aserver = urbackup_api.urbackup_server(%22http://127.0.0.1:55414/x%22, %22admin%22, %22foo%22)%0D%0A%0D%0Afor action in server.get_actions():%0D%0A a = action%5B%22action%22%5D%0D%0A if a ==server.action_full_file or a==server.action_resumed_full_file:%0D%0A ...
a9cc03c02b6d8571efd563e04f2cb774f4c3e7bf
add original walk.py
lib/walk.py
lib/walk.py
Python
0.000004
@@ -0,0 +1,688 @@ +# File: os-path-walk-example-2.py%0A#http://effbot.org/librarybook/os-path/os-path-walk-example-2.py%0A%0Aimport os%0A%0Adef index(directory):%0A # like os.listdir, but traverses directory trees%0A stack = %5Bdirectory%5D%0A files = %5B%5D%0A while stack:%0A directory = stack.pop()...
3a9445c6b3053d492c12bbf808d251c6da55632a
Add a test for the builtin __import__ function.
tests/import/builtin_import.py
tests/import/builtin_import.py
Python
0.000003
@@ -0,0 +1,305 @@ +# test calling builtin import function%0A%0A# basic test%0A__import__('builtins')%0A%0A# first arg should be a string%0Atry:%0A __import__(1)%0Aexcept TypeError:%0A print('TypeError')%0A%0A# level argument should be non-negative%0Atry:%0A __import__('xyz', None, None, None, -1)%0Aexcept Valu...
6dcd913e794edbac28d98988d0936262d4663b9f
create input function
core/get_input.py
core/get_input.py
Python
0.999998
@@ -0,0 +1,514 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0Afrom core.compatible import version%0Afrom core.alert import __input_msg%0A%0A%0Adef __input(msg, default):%0A if version() is 2:%0A try:%0A data = raw_input(__input_msg(msg))%0A if data == '':%0A data...
a72a0674a6db3880ed699101be3c9c46671989f0
Add a primitive pythonic wrapper.
xxdata_11.py
xxdata_11.py
Python
0
@@ -0,0 +1,563 @@ +import os%0Aimport _xxdata_11%0A%0Aparameters = %7B%0A 'isdimd' : 200,%0A 'iddimd' : 40,%0A 'itdimd' : 50,%0A 'ndptnl' : 4,%0A 'ndptn' : 128,%0A 'ndptnc' : 256,%0A 'ndcnct' : 100%0A%7D%0A%0Adef read_scd(filename):%0A fd = open(filename, 'r')%0A%0A fortran_filename = 'fort.%...