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
c750cbb65541ea32c2f8904c394469a14fa1e82b
add import script for West Dorset
polling_stations/apps/data_collection/management/commands/import_west_dorset.py
polling_stations/apps/data_collection/management/commands/import_west_dorset.py
Python
0
@@ -0,0 +1,632 @@ +from data_collection.management.commands import BaseXpressDCCsvInconsistentPostcodesImporter%0A%0Aclass Command(BaseXpressDCCsvInconsistentPostcodesImporter):%0A council_id = 'E07000052'%0A addresses_name = 'parl.2017-06-08/Version 1/Democracy_Club__08June2017WDDC.TSV'%0A stations_name = 'pa...
3e4ed4d6624ac0db7838e9aeb7a98710f746b2b8
Create solution.py
hackerrank/algorithms/strings/easy/mars_exploration/py/solution.py
hackerrank/algorithms/strings/easy/mars_exploration/py/solution.py
Python
0.000018
@@ -0,0 +1,310 @@ +#!/bin/python3%0A%0Aimport sys%0A%0Adef solution(signal):%0A import itertools%0A %0A count = 0%0A %0A for expected, received in zip(itertools.cycle('SOS'), signal):%0A if expected != received:%0A count += 1%0A %0A return count%0A%0Asignal = input().strip()%0...
eb9eb8fd295d8dbba66267e7551f4e6a51687797
Set db starting point.
snippets/base/migrations/0062_set_asrsnippet_id_autoincrement_starting_point.py
snippets/base/migrations/0062_set_asrsnippet_id_autoincrement_starting_point.py
Python
0
@@ -0,0 +1,309 @@ +# Generated by Django 2.1.3 on 2018-11-16 12:30%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('base', '0061_auto_20181116_0810'),%0A %5D%0A%0A operations = %5B%0A migrations.RunSQL(%5B'ALTER TABLE base_asrsnipp...
68e10dcb52f17aca1482112816062ea15e40097b
Create viruscheck.py
viruscheck.py
viruscheck.py
Python
0
@@ -0,0 +1,303 @@ +#!/usr/bin/env python%0A%0A#Requires ClamAV to be installed%0A%0Aimport sys%0Aimport subprocess%0A%0A%0A%0Adef clamscan():%0A scan = subprocess.check_output(%5B%0A 'clamscan',%0A '-r',%0A starting_dir%0A %5D)%0A %0A print scan%0A %0A%0Astarting_dir = sys.argv%5B1%5...
70e14187ecd2567894e5e8183341a63835d6839c
Create pldm related specific constants file.
data/pldm_variables.py
data/pldm_variables.py
Python
0
@@ -0,0 +1,1337 @@ +#!/usr/bin/python%0A%0Ar%22%22%22%0AContains PLDM-related constants.%0A%22%22%22%0A%0A%0APLDM_TYPE_BASE = '00'%0APLDM_TYPE_PLATFORM = '02'%0APLDM_TYPE_BIOS = '03'%0APLDM_TYPE_OEM = '3F'%0A%0APLDM_BASE_CMD = %7B%0A 'GET_TID': '2',%0A 'GET_PLDM_VERSION': '3',%0A 'GET_PLDM_TYPES': '4',%0A '...
f6a4b230d3ee98d906920c2e1cd671208a5b3e96
Python 1.5.4
python/jsbeautifier/__version__.py
python/jsbeautifier/__version__.py
__version__ = '1.5.3'
Python
0.998796
@@ -16,7 +16,7 @@ 1.5. -3 +4 '%0A
5669de3e5331add3fe2ee27cfad312115463a5d6
Use str instead of repr for exception message
py/selenium/common/exceptions.py
py/selenium/common/exceptions.py
# Copyright 2008-2009 WebDriver committers # Copyright 2008-2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
Python
0
@@ -981,26 +981,22 @@ : %25s - +%5Cn %22 %25 -repr( self.msg )%0A @@ -991,17 +991,16 @@ self.msg -) %0A @@ -1054,23 +1054,20 @@ ion_msg ++ = %22 -%25s; Screensh @@ -1094,44 +1094,11 @@ reen - %22 %5C%0A %25 exception_msg +%5Cn%22 %0A @@ -1150,30 +1150,37 @@ -exception_msg...
8ff3b74df83055068b1f8abe05e8ce186ab6eb18
implement strStr with KMP. Kana我喜欢你啊!!!
python/string/ImplementstrStr.py
python/string/ImplementstrStr.py
Python
0
@@ -0,0 +1,1212 @@ +#KMP algorithm. can't get it. Just a simple implementation of%0A#0. https://www.youtube.com/watch?v=2ogqPWJSftE%0A#and%0A#1. http://www.cnblogs.com/zuoyuan/p/3698900.html%0Aclass Solution:%0A # @param haystack, a string%0A # @param needle, a string%0A # @return an integer%0A def strStr(s...
a5044eedc9efcd5294b55bc565e7ec1685fd9e17
Add return post (mirrors add_membership)
pupa/scrape/popolo.py
pupa/scrape/popolo.py
import copy from .base import (BaseModel, SourceMixin, LinkMixin, ContactDetailMixin, OtherNameMixin, IdentifierMixin) from .schemas.post import schema as post_schema from .schemas.person import schema as person_schema from .schemas.membership import schema as membership_schema from .schemas.organiza...
Python
0
@@ -4490,8 +4490,28 @@ d(post)%0A + return post%0A
8b42b0825d5cbb6becef9669b43a2c8229ea8642
Add script to remove unpaired fasta entries.
remove_unpaired_fasta_entries.py
remove_unpaired_fasta_entries.py
Python
0
@@ -0,0 +1,1026 @@ +#!/usr/bin/env python%0A%0A%22%22%22%0ARemove unpaired reads from a fasta file.%0A%0AThis script can be used for the case that unpaired reads (e.g. as%0Areads were removed during quality trimming) in a pair of fasta files%0Afrom paired-end sequencing need to be removed.%0A%0A%22%22%22%0A%0Aimport ar...
b84af881f800bfad13b5e90379c5f4ec0445239a
Add setup.py.
setup.py
setup.py
Python
0
@@ -0,0 +1,369 @@ +#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0Asetup(name = 'pymoira',%0A version = '1.0',%0A description = 'Client library for MIT Moira service managment system protocol',%0A author = 'Victor Vasiliev',%0A author_email = 'vasilvv@mit.edu',%0A url = 'https:...
52d3a5a20c7f1bf4c874e4210fd17753a67d5c71
Add ID command
commands/cmd_id.py
commands/cmd_id.py
Python
0.000012
@@ -0,0 +1,439 @@ +from lib.command import Command%0A%0A%0Aclass IdCommand(Command):%0A name = 'id'%0A description = 'Returns your user ID, or the ID of the current chat when -c or %5C'chat%5C' is passed as an argument.'%0A%0A def run(self, message, args):%0A reply = 'Your Telegram ID is %7B0%7D'.format...
9bc26f8a0d2c209fc3e73cd0f267164bfd49fef3
Update setup.py
setup.py
setup.py
#!/usr/bin/env python2 from distutils.core import setup from wok import version setup(name='wok', version=version.encode("utf8"), description='Static site generator', install_requires=['pyyaml', 'jinja2'], author='Mike Cooper', author_email='mythmon@gmail.com', url='https://www.gi...
Python
0.000001
@@ -82,16 +82,21 @@ %0A%0Asetup( +%0A name='wo @@ -95,26 +95,24 @@ name='wok',%0A - version= @@ -143,210 +143,816 @@ - description='Static site generator',%0A install_requires=%5B'pyyaml', 'jinja2'%5D,%0A author='Mike Cooper',%0A author_email='mythmon@gmail.com',%0A +author='Mi...
8238e0476097af0afed1443391370285dd61d8ca
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1460 @@ +#!/usr/bin/env python%0A%0Aimport setuptools%0Aimport os%0A%0Awith open(os.path.join('fs', 'sshfs', '__metadata__.py')) as f:%0A exec(f.read())%0A%0ACLASSIFIERS = %5B%0A 'Development Status :: 5 - Production/Stable',%0A 'Intended Audience :: Developers',%0A 'License :: OSI Approved :: MI...
d348a3f5a1d86dbc5bf38782953fcc8510c010d6
version change
setup.py
setup.py
from distutils.core import setup setup(name='jieba', version='0.15.1', description='Chinese Words Segementation Utilities', author='Sun, Junyi', author_email='ccnusjy@gmail.com', url='http://github.com/fxsjy', packages=['jieba'], package_dir={'jieba':'jieba'}, ...
Python
0.000001
@@ -72,11 +72,9 @@ '0.1 -5.1 +6 ',
72416d5bf4308c10bc9b2ab31464ad2853042402
Use the official package django select2 that finally support py3
setup.py
setup.py
#!/usr/bin/env python """ Installation script: To release a new version to PyPi: - Ensure the version is correctly set in accounting.__init__.py - Run: `python setup.py sdist` `twine upload dist/*` """ from setuptools import setup, find_packages import os import sys from accounting import get_version PROJECT...
Python
0.000001
@@ -1472,126 +1472,57 @@ -%5D,%0A - dependency_links=%5B%0A 'http://github.com/applegrew/django-select2@python3#egg=Django_Select2_Py3-4.2.1 +# Select2%0A 'django-select2%3E=4.3,%3C4.4 ',%0A
e941103913c1f18b60cbc4c3ba9edfe2da9ca9f0
Version bump.
setup.py
setup.py
import os from setuptools import setup f = open(os.path.join(os.path.dirname(__file__), 'README.md')) readme = f.read() f.close() setup( name='django-ajaximage', version='0.1.18', description='Add ajax image upload functionality with a progress bar to file input fields within Django admin. Images are opti...
Python
0
@@ -180,12 +180,11 @@ ='0. -1.18 +2.0 ',%0A @@ -203,104 +203,30 @@ on=' -Add ajax image upload functionality with a progress bar to file input fields within Django admin +Upload images via ajax . Im @@ -502,25 +502,16 @@ quires=%5B -%0A 'Django' @@ -511,24 +511,16 @@ Django', -%0A 'Pillow @@ -5...
a79fcf2786df38f84b065ff579f83f03c1d5a20b
Add setup.py file
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,363 @@ +#!/usr/bin/env python%0A%0Afrom setuptools import setup, find_packages%0A%0Asetup(%0A name='django-cyclebufferfield',%0A description=%22Field to manage Django fields in a fixed-size ring buffer.%22,%0A version='0.1',%0A url='http://code.playfire.com/',%0A%0A author='Playfire.com',%0A ...
5d6f52d2b89eda2aa070faafad2fd89eeaf599ec
add setup py
setup.py
setup.py
Python
0
@@ -0,0 +1,827 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Afrom setuptools import setup, find_packages%0A%0Asetup(%0A name='selectel_cloud_api',%0A version='1.0',%0A packages=find_packages(),%0A install_requires='selectel_cloud_api',%0A url='https://github.com/RustoriaRu/SelectelCloudApi',%0A ...
ab3728405be94c071c353374735b97f207479c00
Add setup.py to make an .exe with py2exe
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,97 @@ +#!/c/Anaconda/python%0A%0Afrom distutils.core import setup%0Aimport py2exe%0A%0Asetup(console=%5B%22tmpr.py%22%5D)%0A
2e91c826a72e3f240f6d010678d68bab0bab5749
Add setup.py for packaging
setup.py
setup.py
Python
0
@@ -0,0 +1,513 @@ +from setuptools import setup%0Afrom sirsi import __version__, __author__%0A%0Asetup(%0A name='sirsi',%0A version=__version__,%0A author=__author__,%0A author_email='winston@ml1.net',%0A description='Manage a sirsi enterprise-based library account',%0A url='https://github.com/-winny/...
76601be760f0aa15637f65164c5e595b218fc2b9
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,317 @@ +from setuptools import find_packages%0Afrom setuptools import setup%0A%0AVERSION = '0.0.1'%0A%0Asetup(%0A name='gae-utils',%0A version=VERSION,%0A packages=find_packages(),%0A install_requires=%5B%5D,%0A include_package_data=True,%0A zip_safe=False,%0A maintainer='Tyler Treat',%0...
609bc6fbd1284c1b769c2e0548f6c65a97d144cd
Add initial attempt at a setup.py file
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,340 @@ +from setuptools import setup%0A%0Aimport pygametemplate%0A%0A%0Asetup(%0A name=%22pygametemplate%22,%0A version=pygametemplate.__version__,%0A description=pygametemplate.__doc__,%0A url=%22https://github.com/AndyDeany/pygame-template%22,%0A author=pygametemplate.__author__,%0A autho...
b5b503229789c61af5bb47d6bb587bafb2ada562
Fix setup.py, bump version.
setup.py
setup.py
#!/usr/bin/env python """ # pykafka pykafka allows you to produce messages to the Kafka distributed publish/subscribe messaging service. ## Requirements You need to have access to your Kafka instance and be able to connect through TCP. You can obtain a copy and instructions on how to setup kafka at https://github.c...
Python
0
@@ -1836,16 +1836,18 @@ n = '0.1 +.1 ',%0A lic @@ -1888,16 +1888,17 @@ __doc__ +, %0A autho
a1e35b73b5e10a885e78e965242c5b1b6e92aa16
Add a setup.py file
setup.py
setup.py
Python
0.000002
@@ -0,0 +1,110 @@ +from setuptools import setup%0A%0Asetup(%0A name='wellknown',%0A version='0.1dev',%0A packages=%5B'wellknown'%5D%0A)%0A
65ecc0145406e7d8e20a281c0e5c04b26208646d
Add a setup.py file.
setup.py
setup.py
Python
0
@@ -0,0 +1,560 @@ +try:%0A from setuptools import setup%0Aexcept ImportError:%0A from distutils.core import setup%0A%0Aconfig = %7B%0A 'name': 'ultracold-ions',%0A 'description': 'A library for the simulation of ultracold neutral plasmas.',%0A 'author': 'Tech-X Corporation',%0A 'url': 'https://github....
d9d3ae4a1d4007a0aa1dafe09102cb7414c338db
Remove extracting HG revision from setup.py.
setup.py
setup.py
from setuptools import setup import subprocess import os.path try: # don't get confused if our sdist is unzipped in a subdir of some # other hg repo if os.path.isdir('.hg'): p = subprocess.Popen(['hg', 'parents', r'--template={rev}\n'], stdout=subprocess.PIPE, stderr=su...
Python
0
@@ -26,568 +26,8 @@ tup%0A -import subprocess%0Aimport os.path%0A%0Atry:%0A # don't get confused if our sdist is unzipped in a subdir of some%0A # other hg repo%0A if os.path.isdir('.hg'):%0A p = subprocess.Popen(%5B'hg', 'parents', r'--template=%7Brev%7D%5Cn'%5D,%0A stdout=...
b82dee62e325d83f8aeaede406de24973ee42b42
Update project url in setup.py
setup.py
setup.py
#!/usr/bin/env python # # Copyright 2010 The Closure Linter Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
Python
0
@@ -946,28 +946,29 @@ http +s :// -code.google.com/p +github.com/google /clo
45a7a979d687b75851d3901171b826faa965389e
Add setup script
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,213 @@ +#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0Asetup(name='ambra',%0A version='0.1dev',%0A description='Temporal prediction by pairwise comparisons',%0A packages=%5B'ambra'%5D,%0A)%0A%0A
20a5ccf55c9292d3c360a34d190e583b84594a37
Add zeeman energy tests.
pyoommf/test_zeeman.py
pyoommf/test_zeeman.py
Python
0
@@ -0,0 +1,665 @@ +from zeeman import Zeeman%0A%0Adef test_zeeman_mif():%0A H = (0.1, -0.5, -8.9e6)%0A zeeman = Zeeman(H)%0A mif_string = zeeman.get_mif()%0A lines = mif_string.split('%5Cn')%0A assert 'Specify Oxs_FixedZeeman %7B' in lines%5B0%5D%0A assert '%7B Oxs_UniformVectorField %7B' in lines%5B1...
692d215f26a2f31bd9ae1d56f7e493299d6481da
fix for virtualenv install
setup.py
setup.py
#!/usr/bin/python # python setup.py sdist --format=zip,gztar from setuptools import setup import os import sys import platform import imp version = imp.load_source('version', 'lib/version.py') util = imp.load_source('util', 'lib/util.py') if sys.version_info[:3] < (2, 6, 0): sys.exit("Error: Electrum requires ...
Python
0
@@ -414,16 +414,69 @@ .W_OK):%0A + try:%0A os.mkdir(usr_share)%0A except:%0A sys. @@ -571,16 +571,19 @@ lectrum +in a virtua
331aecb334f4e4ff4c38b4a2b12d3a80d7327de1
Remove unused URL from setup.py
setup.py
setup.py
#! /usr/bin/python # Copyright (C) 2007-2010 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from mock import __version__ from distutils.core import setup import os NAME = 'mock' MODULES = ['mock'] DESCRIPTION = 'A Python Mocking and Patching ...
Python
0.000001
@@ -387,74 +387,8 @@ ck/%22 -%0A'http://www.voidspace.org.uk/downloads/mock-%25s.zip' %25 __version__ %0A%0Are
98b2114199b04678cd41e25deb9a3478e0f76e45
say hello to python 3.3
setup.py
setup.py
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os from setuptools import setup, find_packages, Command import sys from gunicorn import __version__ CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Environment :: Other En...
Python
0.999756
@@ -696,16 +696,187 @@ : 2.7',%0A + 'Programming Language :: Python',%0A 'Programming Language :: Python :: 3',%0A 'Programming Language :: Python :: 3.2',%0A 'Programming Language :: Python :: 3.3',%0A 'Top
d00f9fd43cfc45747a9479f00db5d67fda658e55
Add initial distutils configuration
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1665 @@ +# Copyright 2009 Google Inc. All Rights Reserved.%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#%0...
8439263d6ff66e659a8051d3efc0475020048629
update v.# make tag and set to release
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # (C) 2013-2014 முத்தையா அண்ணாமலை # open-tamil project from distutils.core import setup from codecs import open setup(name='Open-Tamil', version='0.2.4', description='Tamil language text processing tools', author='Muthiah Annamalai', author_ema...
Python
0
@@ -201,17 +201,17 @@ on='0.2. -4 +8 ',%0A @@ -282,14 +282,9 @@ r='M -uthiah +. Ann @@ -289,16 +289,30 @@ nnamalai +, T. Arulalan, ',%0A @@ -723,8 +723,9 @@ )%0A +%0A
c75ee6a0ee2f542463b5ca8cb81b06a6a6650d4c
Add initial setup file
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,359 @@ +from setuptools import setup%0A%0Asetup(%0A name='python2-consul',%0A packages=%5B'python2-consul'%5D,%0A version='0.0.1',%0A install_requires=%5B%0A 'certifi==2017.4.17',%0A 'chardet==3.0.4',%0A 'idna==2.5',%0A 'PyYAML==3.12',%0A 'requests==2.18.1',%0A ...
af2effaf147b8e473f7b9c655842617a91414278
Upgrade the requirement on taskotron-python-versions to include latest changes in shared functions
setup.py
setup.py
import sys from setuptools import setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): def finalize_options(self): super().finalize_options() self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = pyt...
Python
0
@@ -590,16 +590,28 @@ versions + %3E= 0.1.dev2 ',%0A%5D%0A%0Ate
47b2e9890a0f3022ffbbf83a6e722b2e77e3443b
Fix dajax setup.py
setup.py
setup.py
from distutils.core import setup setup( name='django-dajax', version='0.9', author='Jorge Bastida', author_email='me@jorgebastida.com', description=('Easy to use library to create asynchronous presentation ' 'logic with django and dajaxice'), url='http://dajaxproject.com', ...
Python
0.000003
@@ -388,16 +388,22 @@ 'static/ +dajax/ *'%5D%7D,%0A
330650e7fe7c1a9aa0178812d08af332e927fe98
add minimal setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,342 @@ +from setuptools import setup%0A%0Asetup(name='Cohorte Micronode',%0A version='0.9',%0A description='Cohorte Micronode Repository',%0A url='https://github.com/librallu/cohorte-herald',%0A author='Luc Libralesso',%0A author_email='libralesso.l@gmail.com',%0A license='Apach...
a90162a43e4e1817bd818b66e4ad6e377ab8af92
Update the setup.py version.
setup.py
setup.py
from distutils.core import setup import sys requires = ['feedgenerator', 'jinja2', 'pygments'] if sys.version_info < (2,7): requires.append('argparse') setup( name = "pelican", version = '1.1.1', url = 'http://hg.lolnet.org/pelican/', author = 'Alexis Metaireau', author_email = 'alexis@notmyid...
Python
0
@@ -197,19 +197,17 @@ on = '1. -1.1 +2 ',%0A u
06c67a7df4e2fd5cbc221f2a9c3f64179af91344
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,759 @@ +from setuptools import setup, find_packages%0A%0Asetup(%0A name='django-exadmin',%0A version='0.1.0',%0A description='New style and free plugin django admin module, UI base bootstrap2.',%0A author='TM (sshwsfc)',%0A author_email='sshwsfc@gmail.com',%0A url='http://github.com/sshwsfc...
2c874c09e7bf35a0ea6a7a5029c9b17ec5f057af
Fix mongoengine version.
setup.py
setup.py
from setuptools import setup, find_packages import mongonaut LONG_DESCRIPTION = open('README.rst').read() setup( name='django-mongonaut', version=mongonaut.__version__, description="An introspective interface for Django and MongoDB", long_description=LONG_DESCRIPTION, classifiers=[ "Devel...
Python
0
@@ -1105,17 +1105,17 @@ goengine -= +%3E =0.5.2'%5D
ccbb7e11edc63a128b7006e015539fdabd8f3a7f
Set up frontend for longpolling
bitHopper/LongPoll.py
bitHopper/LongPoll.py
Python
0
@@ -0,0 +1,306 @@ +from gevent.event import AsyncResult%0A%0A_event = AsyncResult()%0A%0Adef wait():%0A %22%22%22%0A Gets the New Block work unit to send to clients%0A %22%22%22%0A return _event.get()%0A%0Adef trigger(work):%0A %22%22%22%0A Call to trigger a LP%0A %22%22%22%0A%0A old = self._eve...
34ad457ab831173efd3758af926deb17daf53feb
Add sitemap
resources/sitemaps.py
resources/sitemaps.py
Python
0.000002
@@ -0,0 +1,380 @@ +from django.contrib.sitemaps import Sitemap%0Afrom resources.models import Resource%0Afrom django.utils import translation%0A%0Aclass ResourceSitemap(Sitemap):%0A%0A def items(self):%0A return Resource.objects.filter(noindex=False, is_published=True,%0A ...
b38cdd6c42114b3e43c04744300c78c213093def
Improve the SSHTCPForwarder __init__ logic.
king_phisher/ssh_forward.py
king_phisher/ssh_forward.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # king_phisher/ssh_forward.py # # 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...
Python
0.000005
@@ -3327,16 +3327,43 @@ client%0A +%09%09self.username = username%0A %09%09self._ @@ -3587,37 +3587,16 @@ connect( -username = username, look_for @@ -4069,37 +4069,16 @@ connect( -username = username, look_for @@ -4178,39 +4178,38 @@ ed:%0A%09%09%09self. -client. +__try_ connect( self.server%5B @@ -4200,61 ...
ed8447534ce028a308669c139cb8b0d5a7f2ef0d
Fix Nordic nRF51822 board to work on Linux
pyOCD/interface/pyusb_backend.py
pyOCD/interface/pyusb_backend.py
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 ARM Limited 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 ...
Python
0
@@ -3611,22 +3611,8 @@ p_in - or not ep_out :%0A
67cca3176d1e2b5def3ebbd64f4bd56a8976529b
add res.company file
l10n_br_sale/res_company.py
l10n_br_sale/res_company.py
Python
0.000001
@@ -0,0 +1,1662 @@ +# -*- encoding: utf-8 -*-%0A###############################################################################%0A# #%0A# Copyright (C) 2014 Renato Lima - Akretion #%0A# ...
f1830a1ada87a21d851290398feac326e015dc3d
Fix bug when prompt is none (#456) (#458)
openhtf/plugs/user_input.py
openhtf/plugs/user_input.py
# Copyright 2015 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 required by applicable law or agre...
Python
0.000002
@@ -3375,24 +3375,71 @@ prompt.%22%22%22%0A + if self._prompt is None:%0A return None%0A return %7B
df84cf964214420987c51813b8960ce068223adf
Add request handler
request_handler/request_handler.py
request_handler/request_handler.py
Python
0.000001
@@ -0,0 +1,2210 @@ +#!flask/bin/python%0Afrom flask import Flask, jsonify, abort%0Afrom flask import make_response%0Afrom flask import request%0Afrom flask import url_for%0Aimport psycopg2 as pg%0A%0A%0Aapp = Flask(__name__)%0A%0Adef make_public_request(request):%0A new_request = %7B%7D%0A new_request%5B'uri'%5D ...
4e54128e5c0b9c762e5f93ae0d8791eeddde2264
Add JSON serializer
dxr/json.py
dxr/json.py
Python
0
@@ -0,0 +1,2045 @@ +#!/usr/bin/env python2%0A%0Aclass JsonOutput:%0A need_separator = False%0A content = ''%0A%0A def open(self):%0A self.content += '%7B'%0A self.need_separator = False%0A%0A def close(self):%0A self.content += '%7D'%0A self.need_separator = True%0A%0A def open_list(self):%0A self.c...
30eec7bb18285b82a7d67a0a3d9098afc5b9e286
Create QRfactorization.py
effective_quadratures/QRfactorization.py
effective_quadratures/QRfactorization.py
Python
0.000001
@@ -0,0 +1,74 @@ +# A set of functions just for QR factorization, pivoting and iterative-QR%0A
324243dfd61afd8ce244a9a02ffc800c5c73ce55
Add modified chart with better values
charts/daniels_designing_great_beers/appendix_two_course_grind_potential_extract_modified.py
charts/daniels_designing_great_beers/appendix_two_course_grind_potential_extract_modified.py
Python
0
@@ -0,0 +1,1221 @@ +%0Afrom brew.utilities import sg_from_dry_basis%0A%0A%0A%22%22%22%0ARay Daniels%0ADesigning Great Beers%0A%0AAppendix 2: Course Grind Potential Extract (modified)%0A%0ANotes:%0A The chart appears to have been developed with the moisture content set%0A to zero (0.0) and the Brew House Efficienc...
7172d06ced60b2c69b9ac2762019ff95f3fd7da5
Create twice.py
twice.py
twice.py
Python
0.000002
@@ -0,0 +1,502 @@ +#!/usr/bin/env python%0Aimport rospy%0Afrom std_msgs.msg import Int32%0A%0An = 0%0A%0Adef cb(message):%0A //rospy.loginfo(message.data*2)%0A global n%0A n = message.data*2%0A%0Aif __name__ == '__main__':%0A rospy.init_node('twice')%0A sub = rospy.Subscriber('count_u...
e075fe93dc8261c780aa6e2a1b4e643719e4d941
Update factory.py
skbio/parse/sequences/factory.py
skbio/parse/sequences/factory.py
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
Python
0.000001
@@ -2121,59 +2121,26 @@ -with opener(f) as opened:%0A return opened +opened = opener(f) %0A @@ -2220,16 +2220,39 @@ name))%0A + %0A return opened%0A %0A%0Adef lo
a882409ede1898a3b4e2fb4619089b33c1427315
Add migration
apps/conditions/migrations/0005_empty_relation.py
apps/conditions/migrations/0005_empty_relation.py
Python
0.000002
@@ -0,0 +1,746 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.9 on 2016-08-10 14:23%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('conditions', '0004_condition_title'),%0A %5D%0A%0A ...
673a6ee654d7e540fe9c473904b6d1e326928c58
Create run_test.py
recipes/django-storages/run_test.py
recipes/django-storages/run_test.py
Python
0.000004
@@ -0,0 +1,191 @@ +import django%0Afrom django.conf import settings%0Asettings.configure(INSTALLED_APPS=%5B'storages', 'django.contrib.contenttypes', 'django.contrib.auth'%5D) %0Adjango.setup() %0A %0Aimport storages%0A
397bc67a5a214a4cad5eef20f3a13c53f90964c5
Modify tms_nw_svr
scripts/tms_nw_svr.py
scripts/tms_nw_svr.py
Python
0
@@ -0,0 +1,808 @@ +#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0Aimport rospy%0Aimport requests%0Afrom BaseHTTPServer import HTTPServer%0Afrom BaseHTTPServer import BaseHTTPRequestHandler%0Aimport urlparse%0A%0Adef svr_start(port, callback):%0A def handler(*args):%0A CallbackServer(callback, *args)%0A serv...
fec45cfaee6c5e5d02b6c3979179cdad153d5076
add ds18b20 rpi implementation to examples
examples/raspberrypi/platform/ds18b20.py
examples/raspberrypi/platform/ds18b20.py
Python
0
@@ -0,0 +1,1421 @@ +import os%0Aimport re%0Aimport subprocess%0A%0AW1_DEVICES = '/sys/bus/w1/devices/'%0AW1_SENSOR_PATTERN = re.compile('(10%7C22%7C28)-.+', re.IGNORECASE)%0A%0A%0Adef modprobe(module):%0A return subprocess.check_call(%5B'modprobe', module%5D)%0A%0A%0Adef init_w1():%0A modprobe('w1-gpio')%0A mo...
4f3e0663ce07669d1a6e975fb720c19f72243d78
Update Mojo gtest script for Android changes.
mojo/tools/mopy/gtest.py
mojo/tools/mopy/gtest.py
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import re import subprocess import sys import time from mopy.config import Config from mopy.paths import Paths def set_color(): ...
Python
0.000039
@@ -4166,14 +4166,38 @@ tart -Shell( +Activity('MojoShellActivity', args
053974bc96ef34075612495a7eb537ff691ff38e
Add test to see if legacy files are renamed
tests/Settings/TestCuraContainerRegistry.py
tests/Settings/TestCuraContainerRegistry.py
# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. import os #To find the directory with test files and find the test files. import pytest #This module contains unit tests. import unittest.mock #To mock and monkeypatch stuff. from cura.Settings.CuraContainerRegistry import...
Python
0
@@ -212,16 +212,71 @@ tests.%0A +import shutil #To copy files to make a temporary file.%0A import u @@ -2836,8 +2836,1177 @@ loaded. +%0A%0A## Tests whether loading a legacy file moves the upgraded file properly.%0Adef test_loadLegacyFileRenamed(container_registry):%0A #Create a temporary file for the registry...
01a659318644ef47cfe0c9ad3c484a974fb31e25
Create __init__.py
__init__.py
__init__.py
Python
0.000429
@@ -0,0 +1 @@ +%0A
cb454d310431700e5ac9883a32f0b36e2e50e0fe
Add a check for keystone expired tokens buildup.
sensu/plugins/check-keystone-expired-tokens.py
sensu/plugins/check-keystone-expired-tokens.py
Python
0
@@ -0,0 +1,2692 @@ +#!/opt/openstack/current/keystone/bin/python%0A#%0A# Copyright 2015, Jesse Keating %3Cjlk@bluebox.net%3E%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...
ac40e54d22717fbf1a2444a67198cdba66506df8
Add test for input setup workflow
cea/tests/test_inputs_setup_workflow.py
cea/tests/test_inputs_setup_workflow.py
Python
0
@@ -0,0 +1,1315 @@ +import os%0Aimport unittest%0A%0Aimport cea.config%0Afrom cea.utilities import create_polygon%0Afrom cea.datamanagement import zone_helper, surroundings_helper, terrain_helper, streets_helper, data_initializer, %5C%0A archetypes_mapper%0A%0A# Zug site coordinates%0APOLYGON_COORDINATES = %5B(8.513...
8465d9a9b2c30b0b493bdf9ba24a29e39a51c1df
add dbutil to compute archive_begin for HADS sites
scripts/dbutil/compute_hads_sts.py
scripts/dbutil/compute_hads_sts.py
Python
0
@@ -0,0 +1,1569 @@ +%22%22%22Compute the archive start time of a HADS/DCP network%22%22%22%0Afrom pyiem.network import Table as NetworkTable%0Aimport sys%0Aimport psycopg2%0Aimport datetime%0A%0ATHISYEAR = datetime.datetime.now().year%0AHADSDB = psycopg2.connect(database='hads', host='iemdb')%0AMESOSITEDB = psycopg2.co...
582b5c598da5b35032447f0eb7888051b84f844c
Add datetime to fast cache
alembic/versions/20860ffde766_add_datetime_to_fastcache.py
alembic/versions/20860ffde766_add_datetime_to_fastcache.py
Python
0.000001
@@ -0,0 +1,855 @@ +%22%22%22Add datetime to fastcache%0A%0ARevision ID: 20860ffde766%0ARevises: 471e6f7722a7%0ACreate Date: 2015-04-14 07:44:36.507406%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '20860ffde766'%0Adown_revision = '471e6f7722a7'%0A%0Afrom alembic import op%0Aimport sqlalchemy...
f54f427c16b394ff1ea0f55875bfb9d02e7264b0
add SiD calculator.
src/get_SiD.py
src/get_SiD.py
Python
0
@@ -0,0 +1,1653 @@ +#!/usr/bin/python%0A# -*- coding: UTF-8 -*-%0A# Introduction: This script is used to calculate similarity index (SiD)%0A# Created by Xiangchen Li on 2017/3/19 21:15%0A%0Afrom collections import defaultdict%0Afrom src.global_items import genetic_code%0A%0A%0Adef get_sid(virus_rscu_file, host_rscu_fil...
cd9f80c1567c945fe40e02af56433c49c6ddad65
Create lintcode_二进制求和.py
lintcode_二进制求和.py
lintcode_二进制求和.py
Python
0.000005
@@ -0,0 +1,1017 @@ +/**%0A * http://www.lintcode.com/zh-cn/problem/add-binary/%0A * %E7%BB%99%E5%AE%9A%E4%B8%A4%E4%B8%AA%E4%BA%8C%E8%BF%9B%E5%88%B6%E5%AD%97%E7%AC%A6%E4%B8%B2%EF%BC%8C%E8%BF%94%E5%9B%9E%E4%BB%96%E4%BB%AC%E7%9A%84%E5%92%8C%EF%BC%88%E7%94%A8%E4%BA%8C%E8%BF%9B%E5%88%B6%E8%A1%A8%E7%A4%BA%E3%80%82%0A * %E6%A...
65b362985d502440b12efc8a6a49ab0603354fd2
Add script to count emotional sentences according to LIWC
liwc_emotional_sentences.py
liwc_emotional_sentences.py
Python
0
@@ -0,0 +1,3294 @@ +%22%22%22Count the numbers of annotated entities and emotional sentences in the%0Acorpus that was manually annotated.%0A%0AUsage: python annotation_statistics.py %3Cdir containing the folia files with%0AEmbodiedEmotions annotations%3E%0A%22%22%22%0Afrom lxml import etree%0Afrom bs4 import BeautifulS...
c910e1898c1e49c60877e092032daebd289c6f31
add scripts to export from env file to profile
scripts/env2profile.py
scripts/env2profile.py
Python
0
@@ -0,0 +1,719 @@ +#!/usr/bin/evn python%0Aimport os%0Aimport re%0Aimport sys%0A%0A%0Aline_re = re.compile('(%5CS+?)%5Cs*?=%5Cs*?(%5CS+?)$')%0A%0A%0Adef env2profile(env_path, out_path):%0A out_lines = list()%0A with open(env_path, 'r') as env_file:%0A for line in env_file.readlines():%0A matched...
8351d98c3036021507a75b65e424d02942f09633
Add alembic upgrade info
alembic/versions/3d3c72ecbc0d_add_rtp_task_resource_record_table.py
alembic/versions/3d3c72ecbc0d_add_rtp_task_resource_record_table.py
Python
0
@@ -0,0 +1,1123 @@ +%22%22%22Add rtp_task_resource_record table%0A%0ARevision ID: 3d3c72ecbc0d%0ARevises: c9a1ff35c6ed%0ACreate Date: 2018-01-20 21:35:16.716477+00:00%0A%0A%22%22%22%0Afrom alembic import op%0Aimport sqlalchemy as sa%0A%0A%0A# revision identifiers, used by Alembic.%0Arevision = '3d3c72ecbc0d'%0Adown_rev...
843e6f0ccb73a387e151d7f40ef7a2b4fc1597e0
test getmap
pathmap/test/test_getmap.py
pathmap/test/test_getmap.py
Python
0.000001
@@ -0,0 +1,148 @@ +import unittest%0Afrom .. getmap import MapDownloader%0A%0Aclass TestGetmap(unittest.TestCase):%0A pass%0A%0A%0Aif __name__ == '__main__':%0A unittest.main()%0A
cc89c5222ec7f6d6f95b5efdce3958b3ca33814e
Add basic functionality and regression tests for ACA dark cal module
mica/archive/tests/test_aca_dark_cal.py
mica/archive/tests/test_aca_dark_cal.py
Python
0
@@ -0,0 +1,1363 @@ +%22%22%22%0ABasic functionality and regression tests for ACA dark cal module.%0A%22%22%22%0A%0Aimport numpy as np%0A%0Afrom ..aca_dark import dark_cal%0A%0A%0Adef test_date_to_dark_id():%0A assert dark_cal.date_to_dark_id('2011-01-15T12:00:00') == '2011015'%0A%0A%0Adef test_dark_id_to_date():%0A ...
dd3ed1c8fdf9024a7978a1443baf8ca101f21642
add demo object for channel
server/Mars/MarsRpc/ChannelObjs.py
server/Mars/MarsRpc/ChannelObjs.py
Python
0.000001
@@ -0,0 +1,2327 @@ +#!/usr/bin/env python%0A# -*- encoding: utf-8 -*-%0A#%0A# Copyright (c) 2016 ASMlover. All rights reserved.%0A#%0A# Redistribution and use in source and binary forms, with or without%0A# modification, are permitted provided that the following conditions%0A# are met:%0A#%0A# * Redistributions of sou...
81b9d141295ee2a8b31974aa86d89b80dfefe3ca
Create question5.py
chengjun/question5.py
chengjun/question5.py
Python
0.99937
@@ -0,0 +1,1117 @@ +#!usr/bin/python%0Aimport re%0Aclass extrac_url():%0A%09def __init__(self,url):%0A%09%09self.url = url%0A%09def pater(self):%0A%09%09url = self.url%0A%09%09%5Bscheme1,url_rest%5D = url.split('//')%0A%09%09scheme = re.search(r'(.+)//',url).group(1)%0A%09%09#print %22scheme is %25s %22 %25 scheme%0A%...
5eefc407b8f51c017a3f4193c88f6dc188a88601
Include OpenCV based Python CLAHE script
src/CLAHE_dir.py
src/CLAHE_dir.py
Python
0
@@ -0,0 +1,1125 @@ +from PIL import Image%0Aimport numpy as np%0Aimport h5py%0Aimport os%0Aimport sys%0Aimport cv2%0A%0A# Maybe consider implemeting more involved auto-balancing%0A# http://wiki.cmci.info/documents/120206pyip_cooking/python_imagej_cookbook#automatic_brightnesscontrast_button%0A%0Adef apply_clahe_to_H5(f...
5fbd3d187c0a1c164c34320ad504030206429c19
Use --first-parent when collecting commits.
asv/plugins/git.py
asv/plugins/git.py
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Supports git repositories for the benchmarked project. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import os import re from ..console import log from ..rep...
Python
0
@@ -2047,32 +2047,50 @@ log', '--quiet', + '--first-parent', '--format=forma @@ -2095,16 +2095,29 @@ mat:%25H', +%0A range_s
d4d9d9ac478bdaf2385ecff0a43bfc8fe4bb11c7
Add decorator for ignoring DeprecationWarnings
oscar/test/decorators.py
oscar/test/decorators.py
import mock def dataProvider(fn_data_provider): """ Data provider decorator, allows another callable to provide the data for the test. This is a nice feature from PHPUnit which is very useful. Am sticking with the JUnit style naming as unittest does this already. Implementation based on: ht...
Python
0
@@ -1,8 +1,53 @@ +import warnings%0Afrom functools import wraps%0A%0A import m @@ -2107,8 +2107,1061 @@ o doubt%0A +%0A%0Adef ignore_deprecation_warnings(target):%0A %22%22%22%0A Ignore deprecation warnings for the wrapped TestCase or test method%0A%0A This is useful as the test runner can be set to raise an...
f0af14b8fcd420b63a47e18938664e14cf9ea968
Add generic asynchronous/synchronous run command
subiquity/utils.py
subiquity/utils.py
Python
0
@@ -0,0 +1,3067 @@ +# Copyright 2015 Canonical, Ltd.%0A#%0A# This program is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU Affero General Public License as%0A# published by the Free Software Foundation, either version 3 of the%0A# License, or (at your option) any later version.%...
2aab90ab9e4a32bef1496149a2780b7385318043
Add tests
symengine/tests/test_cse.py
symengine/tests/test_cse.py
Python
0.000001
@@ -0,0 +1,469 @@ +from symengine import cse, sqrt, symbols%0A%0Adef test_cse_single():%0A x, y, x0 = symbols(%22x, y, x0%22)%0A e = pow(x + y, 2) + sqrt(x + y)%0A substs, reduced = cse(%5Be%5D)%0A assert substs == %5B(x0, x + y)%5D%0A assert reduced == %5Bsqrt(x0) + x0**2%5D%0A%0A%0Adef test_multiple_ex...
5a21b66f7ab77f419245d8c07d7473a6e1600fc4
Add crawler for 'Hark, A Vagrant'
comics/crawler/crawlers/harkavagrant.py
comics/crawler/crawlers/harkavagrant.py
Python
0.000002
@@ -0,0 +1,982 @@ +from comics.crawler.base import BaseComicCrawler%0Afrom comics.crawler.meta import BaseComicMeta%0A%0Aclass ComicMeta(BaseComicMeta):%0A name = 'Hark, A Vagrant!'%0A language = 'en'%0A url = 'http://www.harkavagrant.com/'%0A start_date = '2008-05-01'%0A history_capable_days = 120%0A ...
2f188d3d43741821126e381af9753e0e3d7be231
test hello python file
t/library/hello.py
t/library/hello.py
Python
0.00043
@@ -0,0 +1,43 @@ +import ngx%0A%0Angx.echo(%22Hello, Ngx_python%5Cn%22)
c2a0b66ec1ad7f32e1291fc6a2312d2a4a06a6e3
Add class-file to right location
src/mmhandler.py
src/mmhandler.py
Python
0.000001
@@ -0,0 +1,24 @@ +class MmHandler:%0A pass%0A
4f155252bf9d9508b955d7eecf589da347bff817
Add a setup.cfg.
setup.py
setup.py
Python
0
@@ -0,0 +1,714 @@ +import setuptools%0D%0A%0D%0Awith open(%22README.md%22, %22r%22) as fh:%0D%0A long_description = fh.read()%0D%0A%0D%0Asetuptools.setup(%0D%0A name=%22imperial-painter-adam-thomas%22,%0D%0A version=%221.0.0%22,%0D%0A author=%22Adam Thomas%22,%0D%0A author_email=%22sortoflikechess@gmail....
3d59614f45cb14e7a053d62f274cb42fbedccc12
Add test for parsing the tasks with optional modstrings
tests/test_vwtask_parsing.py
tests/test_vwtask_parsing.py
# -*- coding: utf-8 -*- from datetime import datetime from base import MockVim, MockCache import sys from tasklib import local_zone class TestParsingVimwikiTask(object): def setup(self): self.mockvim = MockVim() self.cache = MockCache() sys.modules['vim'] = self.mockvim from taskwi...
Python
0
@@ -3393,28 +3393,413 @@ ert vwtask%5B'uuid'%5D == None%0A%0A + def test_added_modstring(self):%0A self.mockvim.current.buffer%5B0%5D = %22* %5B %5D Home task -- project:Home%22%0A vwtask = self.VimwikiTask.from_line(self.cache, 0)%0A%0A assert vwtask%5B'description'%5D == u%22Home task%22%0A ...
f874c337e0d0bb8cce8cfe6523c0d06c37b93198
add basic setup.py definition
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,258 @@ +from distutils.core import setup%0A%0Asetup(%0A name='SaasyDjangoRestFramework',%0A version='0.1dev',%0A packages=%5B%5D,%0A license='Creative Commons Attribution-Noncommercial-Share Alike license',%0A description=%22SaaS plugin for the django rest framework%22,%0A)%0A
63143c94cef353d7bae13f7b13650801bb901c94
Test for explicit start/end args to str methods for unicode.
tests/unicode/unicode_pos.py
tests/unicode/unicode_pos.py
Python
0
@@ -0,0 +1,169 @@ +# str methods with explicit start/end pos%0Aprint(%22%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82%22.startswith(%22%D0%9F%22))%0Aprint(%22%D0%9F%D1%80%D0%B8%D0%B2%D0%B5%D1%82%22.startswith(%22%D1%80%22, 1))%0Aprint(%22%D0%B0%D0%B1%D0%B2%D0%B1%D0%B0%22.find(%22%D0%B0%22, 1))%0Aprint(%22%D0%B0%D0%B1%D0%B2%D0%B...
e0b17a1778fb8946adff14614098ba6d34014746
add some more testing
test/test_route.py
test/test_route.py
import unittest import bottle from tools import api class TestRoute(unittest.TestCase): @api('0.12') def test_callback_inspection(self): def x(a, b): pass def d(f): def w(): return f() return w route = bottle.Route(None, None, None, d(x...
Python
0
@@ -45,16 +45,466 @@ ort api%0A +from bottle import _re_flatten%0A%0A%0Aclass TestReFlatten(unittest.TestCase):%0A%0A def test_re_flatten(self):%0A self.assertEqual(_re_flatten(r%22(?:aaa)(_bbb)%22), '(?:aaa)(?:_bbb)')%0A self.assertEqual(_re_flatten(r%22(aaa)(_bbb)%22), '(?:aaa)(?:_bbb)')%0A s...
5a3971a3048adec420796ad5a781f0a84eca7d31
Remove transifex-client dev dependency
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import io import re import sys from setuptools import setup, find_packages # requirements setup_requirements = ['pytest-runner'] if {'pytest', 'test', 'ptr'}.intersection(sys.argv) else [] install_requirements = ['guessit>=2.0.1', 'babelfish>=0.5.2', 'enzyme>=0.4.1', 'b...
Python
0
@@ -718,28 +718,8 @@ nx', - 'transifex-client', 'wh
601fd8a7b4fea5db2f23741735e6e7f1332b4417
Fix issue #949 - Add mock as dependency
setup.py
setup.py
#!/usr/bin/env python from __future__ import unicode_literals from setuptools import setup, find_packages install_requires = [ "Jinja2>=2.8", "boto>=2.36.0", "boto3>=1.2.1", "cookies", "requests>=2.0", "xmltodict", "dicttoxml", "six", "werkzeug", "pyaml", "pytz", "python...
Python
0
@@ -325,16 +325,28 @@ eutil%22,%0A + %22mock%22,%0A %5D%0A%0Aextra
84c1ee14e1717ec63782dd5a159fe5848fce1cc4
Add Python 3.6 and 3.7 to PyPI page
setup.py
setup.py
#!/usr/bin/env python import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.version_info < (2, 7): raise NotImplementedError("Sorry, you need at least Python 2.7 or Python 3.2+ to use bottle.") import bottle setup(name='bottle', version=bottle.__v...
Python
0
@@ -1705,16 +1705,136 @@ : 3.5',%0A + 'Programming Language :: Python :: 3.6',%0A 'Programming Language :: Python :: 3.7',%0A
f539736b563fb6859a6bffb03aed42b57880744f
create module
test_vbn_parser.py
test_vbn_parser.py
Python
0.000001
@@ -0,0 +1,500 @@ +import networkx as nx%0Aimport matplotlib.pyplot as plt%0Aimport vbn_parser as p%0A%0A# initialize%0AG = nx.Graph()%0Alink = 'http://vbn.aau.dk/da/organisations/antennas-propagation-and-radio-networking(c2c38bb3-3d28-4b2c-8bc4-949211d2d486)/publications.rss?altordering=publicationOrderByPublicationYe...
30fc52d77170844c5b3820d997286df744eb56db
Add setup.py for packaging and PyPI submission.
setup.py
setup.py
Python
0
@@ -0,0 +1,1089 @@ +from setuptools import setup%0D%0Aname = 'hsalf'%0D%0Asetup(%0D%0A name=name,%0D%0A version='0.0.1',%0D%0A author='Nam T. Nguyen',%0D%0A author_email='namn@bluemoon.com.vn',%0D%0A url='https://bitbucket.org/namn/hsalf/overview',%0D%0A description='Hsalf is a pure Python library to ...
d433d16a0375669c1664bbe8f20a8db5924fa92e
Add basic benchmark for length
tests/benchmark.py
tests/benchmark.py
Python
0.000026
@@ -0,0 +1,535 @@ +from random import choice%0Afrom string import ascii_lowercase%0Aimport timeit%0A%0Aimport grapheme%0A%0Adef random_ascii_string(n):%0A return %22%22.join(choice(ascii_lowercase) for i in range(n))%0A%0Along_ascii_string = random_ascii_string(1000)%0A%0Astatements = %5B%0A %22len(long_ascii_str...
dd015a7bf9c69e2f96488c9239be694303b30176
Create setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,985 @@ +import setuptools%0A%0Awith open(%22README.md%22, %22r%22) as fh:%0A long_description = fh.read()%0A%0Asetuptools.setup(%0A name=%22deepctr%22,%0A version=%220.1.3%22,%0A author=%22Weichen Shen%22,%0A author_email=%22wcshen1994@163.com%22,%0A description=%22DeepCTR is a Easy-to-use,...
5a2a2aa33a2e206042b3d28a830d00bdae2f5ad8
Add setup.py for distribution
setup.py
setup.py
Python
0
@@ -0,0 +1,450 @@ +from ez_setup import use_setuptools%0Ause_setuptools()%0A%0Afrom setuptools import setup, find_packages%0Asetup(%0A name = %22rw%22,%0A version = %220.0.1%22,%0A packages = find_packages(),%0A scripts = %5B'scripts/rw'%5D,%0A%0A install_requires = %5B'docopt'%5D,%0A %0A author = ...
91affa8b785e0b5261f69448c1c08de429460bb9
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,185 @@ +from setuptools import setup%0A%0Asetup(%0A name='django-yadt',%0A packages=(%0A 'django_yadt',%0A 'django_yadt.management',%0A 'django_yadt.management.commands',%0A ),%0A)%0A
090568a6e31fd8de1975d0e2cecb2fcd559acd3e
Add natsort to setup.py
setup.py
setup.py
#!/usr/bin/env python # ----------------------------------------------------------------------------- # Copyright (c) 2013, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ---------------------------...
Python
0
@@ -2722,16 +2722,26 @@ format', + 'natsort' %0A
631afff160077cc629054613d59cb47747f6c20d
Fix setup to exclude tests
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 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/sup...
Python
0.000001
@@ -1016,16 +1016,33 @@ ackages( +exclude=%5B'tests'%5D ),%0A i
5b251911d112abea610477a3f552a78be6b5b1e1
add utils module
utils.py
utils.py
Python
0
@@ -0,0 +1,567 @@ +from flask import Response, request%0A%0A%0Adef add_basic_auth(blueprint, username, password, realm='RQ Dashboard'):%0A '''Add HTTP Basic Auth to a blueprint.%0A Note this is only for casual use!%0A '''%0A @blueprint.before_request%0A def basic_http_auth(*args, **kwargs):%0A aut...
58b0b12db2139c6eba5efac5caf9b9dd18170de6
Add unit tests for "ironic node-delete" shell cmd
ironicclient/tests/v1/test_node_shell.py
ironicclient/tests/v1/test_node_shell.py
# -*- coding: utf-8 -*- # # Copyright 2013 IBM Corp # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0.000002
@@ -1698,16 +1698,607 @@ (act))%0A%0A + def test_do_node_delete(self):%0A client_mock = mock.MagicMock()%0A args = mock.MagicMock()%0A args.node = %5B'node_uuid'%5D%0A%0A n_shell.do_node_delete(client_mock, args)%0A client_mock.node.delete.assert_called_once_with('node_uuid')%0A%0...