commit
stringlengths
40
40
subject
stringlengths
1
1.49k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
new_contents
stringlengths
1
29.8k
old_contents
stringlengths
0
9.9k
lang
stringclasses
3 values
proba
float64
0
1
f363864f7f6ad9da45cb3053816d500838821a27
add new package (#27093)
var/spack/repos/builtin/packages/r-posterior/package.py
var/spack/repos/builtin/packages/r-posterior/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 RPosterior(RPackage): """Tools for Working with Posterior Distributions. Provides use...
Python
0
64f6aee62637336f8c4f9fbf4170e4415300ffc4
Create differential_expression_genes.py
Differential_expression/differential_expression_genes.py
Differential_expression/differential_expression_genes.py
#!/usr/bin/env python # dealing with command line input import argparse parser = argparse.ArgumentParser() parser.add_argument("-t",type=int, default=0) parser.add_argument("-above_threshold", nargs="+", type=str) parser.add_argument("-absent", nargs="+", type=str) parser.add_argument("-other", nargs="+", type=str) pa...
Python
0.998909
1596d091183d89c703e67555e81f24722dc0d8a2
add import script for Chelmsford
polling_stations/apps/data_collection/management/commands/import_chelmsford.py
polling_stations/apps/data_collection/management/commands/import_chelmsford.py
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = 'E07000070' addresses_name = 'Democracy_Club__04May2017 (1).tsv' stations_name = 'Democracy_Club__04May2017 (1).tsv' elections = ['local.essex.2017-05-04'] ...
Python
0
94e83a48d3700cdc7c9bb6bd9a14860d2665c655
Add custom roster module
_modules/roster.py
_modules/roster.py
# import python libraries import logging # import salt libraries import salt.utils.files import salt.utils.yaml log = logging.getLogger(__name__) def remove(roster, name): ''' remove an entry from the salt-ssh roster ''' with salt.utils.files.fopen(roster, 'r') as conf: roster_txt = conf.read...
Python
0
8a043a2d3a9517c5eb84aea3e9916419f6136e23
Add tests for IndexAbstractor.
test/lib/indexabstractor.py
test/lib/indexabstractor.py
""" The PyUnit test framework for the indexabstractor. """ import unittest from lib import parser from lib.indexabstractor import * class indexTestCase(unittest.TestCase): def setUp(self): self.sumo = parser.Ontology('data/Merge.kif', name='SUMO') self.kif = parser.kifparse(self.sumo) sel...
Python
0
58de77d09564a43ae1934e2cee4543bc028c25c6
Make android bot configuration more consistent.
build/android/pylib/device_settings.py
build/android/pylib/device_settings.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 from pylib import content_settings def ConfigureContentSettingsDict(device, desired_settings): """Configures device content setings from ...
# 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 from pylib import content_settings def ConfigureContentSettingsDict(device, desired_settings): """Configures device content setings from ...
Python
0.000423
859d1031bc61cd4466953cbc7a5e282abff35e50
Create database.py
database.py
database.py
Python
0.000001
c8d57138240e87c802b84cf0b2b01efd01c80e41
Create solution.py
hackerrank/algorithms/implementation/easy/angry_professor/py/solution.py
hackerrank/algorithms/implementation/easy/angry_professor/py/solution.py
#!/bin/python3 import sys def isClassCancelled(arrivalTimes, cancellationThreshold): count = 0 for arrivalTime in arrivalTimes: if arrivalTime <= 0: count += 1 return count < cancellationThreshold t = int(input()) for a0 in range(t): n, k = map(int, inpu...
Python
0.000018
02183bdcd1b3e4109568f5077a6074573bbd8bf9
Add send_unsent.py.
send_unsent.py
send_unsent.py
#!/usr/bin/env python2 # -*- coding: utf8 -*- import smtplib import enseigner.model as model import enseigner.emails as emails mails = model.Mail.all_unsent() yesno = raw_input(u'Envoyer %d mails ? ' % len(mails)) if yesno != 'yes': exit(0) sender = emails.Sender() errors = [] for mail in mails: try: ...
Python
0
eee8b3e96f7b0c9f24e7c43483bb6d74bd8a490a
add proto
servy/proto.py
servy/proto.py
import json class Response(object): @classmethod def encode(cls, content): return json.dumps(content) @classmethod def decode(cls, content): return json.loads(content) class Request(object): @classmethod def encode(cls, proc, args, kw): return json.dumps({ ...
Python
0.000006
6f8d2e724f4aafb6b8295b8b0a1f915d5f21fa38
fix script
tests/scripts/makereport.py
tests/scripts/makereport.py
# accepts 0,1, or 2 arguments. If a string starting with a number is handed in, it is assumed to be a subdirectory of the current directory to run on. If not specified, the newest build is used. Any other string is taken as the branch name for this test (or treated as mainline). Order of the arguments does not matter. ...
# accepts 0,1, or 2 arguments. If a string starting with a number is handed in, it is assumed to be a subdirectory of the current directory to run on. If not specified, the newest build is used. Any other string is taken as the branch name for this test (or treated as mainline). Order of the arguments does not matter. ...
Python
0.000003
339bb5cd325c7b9c08b8a43994f55bbe1756fbde
validate redirect
signup/auth.py
signup/auth.py
# Copyright (c) 2014, Fortylines LLC # 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 of conditions an...
Python
0.000001
c6e85e35a090c33bc1d6813dce959c8d47588ae8
send an email with current IP address
send_Email.py
send_Email.py
# -*- coding: utf-8 -*- """ Created on Fri Jun 16 12:14:51 2017 @author: smrak """ import requests import urllib3 from datetime import datetime def getIP(): """ Sebastijan Mrak: get & reteurn a public IP address """ http = urllib3.PoolManager() r = http.request('GET', 'http://ip.42.pl/raw'...
Python
0
c13968125383581e67804e11bc430391d355145a
Create DataStreamasDisjointIntervals.py
leetcode/352-Data-Stream-as-Disjoint-Intervals/DataStreamasDisjointIntervals.py
leetcode/352-Data-Stream-as-Disjoint-Intervals/DataStreamasDisjointIntervals.py
# Definition for an interval. # class Interval(object): # def __init__(self, s=0, e=0): # self.start = s # self.end = e class SummaryRanges(object): def __init__(self): """ Initialize your data structure here. """ self.intervals = [] def addNum(sel...
Python
0
435220dda7eb928d9d959594d7986136f17da973
Add actual url patter for #239
popit/urls/rooturls.py
popit/urls/rooturls.py
from django.conf.urls import url from popit.views import * urlpatterns = [ url(r'^(?P<language>\w{2})', api_root, name="api-root"), url(r'^$', api_root_all), ]
Python
0.000002
f955620fb2cb12f14c38ad196d99ae12d5b9c1ff
add default openflow test settings
src/python/expedient/clearinghouse/defaultsettings/openflowtests.py
src/python/expedient/clearinghouse/defaultsettings/openflowtests.py
'''Contains default settings for the testing environment. Created on Aug 22, 2010 @author: jnaous ''' from os.path import join, dirname PYTHON_DIR = join(dirname(__file__), "../../..") OM_PROJECT_DIR = join(PYTHON_DIR, "openflow/optin_manager") CH_PROJECT_DIR = join(PYTHON_DIR, "expedient/clearinghouse") GCF_DIR = jo...
Python
0
f04f7555b06f5087100b336f3127b19e252b3794
Fix issue 137
pages/http.py
pages/http.py
"""Page CMS functions related to the request object.""" from django.core.handlers.base import BaseHandler from django.core.handlers.wsgi import WSGIRequest from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.template import loader, Context, RequestConte...
"""Page CMS functions related to the request object.""" from django.core.handlers.base import BaseHandler from django.core.handlers.wsgi import WSGIRequest from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.template import loader, Context, RequestConte...
Python
0
99f454b3fa62cffac922a7b3431e0024e6dfde3d
add data migration script
dataactcore/scripts/migrateDataBroker.py
dataactcore/scripts/migrateDataBroker.py
# migrate data using pg_dump and pg_restore # data copied from tables: # error_data: # error_metadata # file # job_tracker: # job # submission # job_dependency # user_manager; # users # email_token # validator: # appropriation # award_financial # award_financial_assistance # object_class_program_a...
Python
0.000001
17bbd6d44ec7edd1a079b12a44c283a358b11b92
add import script for Teignbridge (closes #865)
polling_stations/apps/data_collection/management/commands/import_teignbridge.py
polling_stations/apps/data_collection/management/commands/import_teignbridge.py
from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = 'E07000045' addresses_name = 'parl.2017-06-08/Version 1/Democracy_Club__08June2017.tsv' stations_name = 'parl.2017-06-08/Version 1/Democracy_Club__08June2017.ts...
Python
0
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
from data_collection.management.commands import BaseXpressDCCsvInconsistentPostcodesImporter class Command(BaseXpressDCCsvInconsistentPostcodesImporter): council_id = 'E07000052' addresses_name = 'parl.2017-06-08/Version 1/Democracy_Club__08June2017WDDC.TSV' stations_name = 'parl.2017-06-08/Version 1/Democ...
Python
0
3e4ed4d6624ac0db7838e9aeb7a98710f746b2b8
Create solution.py
hackerrank/algorithms/strings/easy/mars_exploration/py/solution.py
hackerrank/algorithms/strings/easy/mars_exploration/py/solution.py
#!/bin/python3 import sys def solution(signal): import itertools count = 0 for expected, received in zip(itertools.cycle('SOS'), signal): if expected != received: count += 1 return count signal = input().strip() count = solution(signal) print(count)
Python
0.000018
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
# Generated by Django 2.1.3 on 2018-11-16 12:30 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('base', '0061_auto_20181116_0810'), ] operations = [ migrations.RunSQL(['ALTER TABLE base_asrsnippet AUTO_INCREMENT=10500;'], ['']) ]
Python
0
68e10dcb52f17aca1482112816062ea15e40097b
Create viruscheck.py
viruscheck.py
viruscheck.py
#!/usr/bin/env python #Requires ClamAV to be installed import sys import subprocess def clamscan(): scan = subprocess.check_output([ 'clamscan', '-r', starting_dir ]) print scan starting_dir = sys.argv[1] print "Running scan.........." clamscan()
Python
0
70e14187ecd2567894e5e8183341a63835d6839c
Create pldm related specific constants file.
data/pldm_variables.py
data/pldm_variables.py
#!/usr/bin/python r""" Contains PLDM-related constants. """ PLDM_TYPE_BASE = '00' PLDM_TYPE_PLATFORM = '02' PLDM_TYPE_BIOS = '03' PLDM_TYPE_OEM = '3F' PLDM_BASE_CMD = { 'GET_TID': '2', 'GET_PLDM_VERSION': '3', 'GET_PLDM_TYPES': '4', 'GET_PLDM_COMMANDS': '5'} PLDM_SUCCESS = '00' PLDM_ERROR = '01' PL...
Python
0
f6a4b230d3ee98d906920c2e1cd671208a5b3e96
Python 1.5.4
python/jsbeautifier/__version__.py
python/jsbeautifier/__version__.py
__version__ = '1.5.4'
__version__ = '1.5.3'
Python
0.998796
8ff3b74df83055068b1f8abe05e8ce186ab6eb18
implement strStr with KMP. Kana我喜欢你啊!!!
python/string/ImplementstrStr.py
python/string/ImplementstrStr.py
#KMP algorithm. can't get it. Just a simple implementation of #0. https://www.youtube.com/watch?v=2ogqPWJSftE #and #1. http://www.cnblogs.com/zuoyuan/p/3698900.html class Solution: # @param haystack, a string # @param needle, a string # @return an integer def strStr(self, haystack, needle): n = ...
Python
0
8b42b0825d5cbb6becef9669b43a2c8229ea8642
Add script to remove unpaired fasta entries.
remove_unpaired_fasta_entries.py
remove_unpaired_fasta_entries.py
#!/usr/bin/env python """ Remove unpaired reads from a fasta file. This script can be used for the case that unpaired reads (e.g. as reads were removed during quality trimming) in a pair of fasta files from paired-end sequencing need to be removed. """ import argparse from Bio import SeqIO from Bio.SeqIO.FastaIO im...
Python
0
dcea9761c47931bef23c60c26fc9de4c5370dfdd
Add collate_readmes
collate_readmes.py
collate_readmes.py
"""Collate the README.md files of all repos generated from a template, into a single Markdown file that contains a section for each repo. Each individual README is prepended with a header that includes the GitHub login, as inferred from the name of the generated repo. If the README already begins with a header, the lo...
Python
0.000003
b84af881f800bfad13b5e90379c5f4ec0445239a
Add setup.py.
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name = 'pymoira', version = '1.0', description = 'Client library for MIT Moira service managment system protocol', author = 'Victor Vasiliev', author_email = 'vasilvv@mit.edu', url = 'https://github.com/vasilvv/pymoira', ...
Python
0
52d3a5a20c7f1bf4c874e4210fd17753a67d5c71
Add ID command
commands/cmd_id.py
commands/cmd_id.py
from lib.command import Command class IdCommand(Command): name = 'id' description = 'Returns your user ID, or the ID of the current chat when -c or \'chat\' is passed as an argument.' def run(self, message, args): reply = 'Your Telegram ID is {0}'.format(message.from_user.id) if '-c' or '...
Python
0.000012
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"), author='Mike Cooper', author_email='mythmon@gmail.com', url='http://wok.mythmon.com', description='Static site generator', long_description= "Wok is a...
#!/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
8238e0476097af0afed1443391370285dd61d8ca
Add setup.py
setup.py
setup.py
#!/usr/bin/env python import setuptools import os with open(os.path.join('fs', 'sshfs', '__metadata__.py')) as f: exec(f.read()) CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Inde...
Python
0.000001
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...
#!/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
a79fcf2786df38f84b065ff579f83f03c1d5a20b
Add setup.py file
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='django-cyclebufferfield', description="Field to manage Django fields in a fixed-size ring buffer.", version='0.1', url='http://code.playfire.com/', author='Playfire.com', author_email='tech@playfire.com', licen...
Python
0.000001
5d6f52d2b89eda2aa070faafad2fd89eeaf599ec
add setup py
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='selectel_cloud_api', version='1.0', packages=find_packages(), install_requires='selectel_cloud_api', url='https://github.com/RustoriaRu/SelectelCloudApi', license='MIT', author='vir-mir', ...
Python
0
ab3728405be94c071c353374735b97f207479c00
Add setup.py to make an .exe with py2exe
setup.py
setup.py
#!/c/Anaconda/python from distutils.core import setup import py2exe setup(console=["tmpr.py"])
Python
0.000001
2e91c826a72e3f240f6d010678d68bab0bab5749
Add setup.py for packaging
setup.py
setup.py
from setuptools import setup from sirsi import __version__, __author__ setup( name='sirsi', version=__version__, author=__author__, author_email='winston@ml1.net', description='Manage a sirsi enterprise-based library account', url='https://github.com/-winny/sirsi', license='MIT', packag...
Python
0
76601be760f0aa15637f65164c5e595b218fc2b9
Add setup.py
setup.py
setup.py
from setuptools import find_packages from setuptools import setup VERSION = '0.0.1' setup( name='gae-utils', version=VERSION, packages=find_packages(), install_requires=[], include_package_data=True, zip_safe=False, maintainer='Tyler Treat', maintainer_email='ttreat31@gmail.com' )
Python
0.000001
609bc6fbd1284c1b769c2e0548f6c65a97d144cd
Add initial attempt at a setup.py file
setup.py
setup.py
from setuptools import setup import pygametemplate setup( name="pygametemplate", version=pygametemplate.__version__, description=pygametemplate.__doc__, url="https://github.com/AndyDeany/pygame-template", author=pygametemplate.__author__, author_email="oneandydean@hotmail.com", packages=[...
Python
0.000001
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...
#!/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
a1e35b73b5e10a885e78e965242c5b1b6e92aa16
Add a setup.py file
setup.py
setup.py
from setuptools import setup setup( name='wellknown', version='0.1dev', packages=['wellknown'] )
Python
0.000002
65ecc0145406e7d8e20a281c0e5c04b26208646d
Add a setup.py file.
setup.py
setup.py
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'name': 'ultracold-ions', 'description': 'A library for the simulation of ultracold neutral plasmas.', 'author': 'Tech-X Corporation', 'url': 'https://github.com/Tech-XCorp/ultracold-ions', 'do...
Python
0
d9d3ae4a1d4007a0aa1dafe09102cb7414c338db
Remove extracting HG revision from setup.py.
setup.py
setup.py
from setuptools import setup long_description = (open('README.rst').read() + open('CHANGES.rst').read() + open('TODO.rst').read()) def _static_files(prefix): return [prefix+'/'+pattern for pattern in [ 'markitup/*.*', 'markitup/sets/*/*.*', 'markitu...
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
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 #...
#!/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
45a7a979d687b75851d3901171b826faa965389e
Add setup script
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name='ambra', version='0.1dev', description='Temporal prediction by pairwise comparisons', packages=['ambra'], )
Python
0.000001
20a5ccf55c9292d3c360a34d190e583b84594a37
Add zeeman energy tests.
pyoommf/test_zeeman.py
pyoommf/test_zeeman.py
from zeeman import Zeeman def test_zeeman_mif(): H = (0.1, -0.5, -8.9e6) zeeman = Zeeman(H) mif_string = zeeman.get_mif() lines = mif_string.split('\n') assert 'Specify Oxs_FixedZeeman {' in lines[0] assert '{ Oxs_UniformVectorField {' in lines[1] assert 'vector' in lines[2] line2 = lin...
Python
0
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 ...
#! /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
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...
# -*- 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
d00f9fd43cfc45747a9479f00db5d67fda658e55
Add initial distutils configuration
setup.py
setup.py
# Copyright 2009 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 ...
Python
0.000001
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.8', description='Tamil language text processing tools', author='M. Annamalai, T. Arulalan,', a...
#!/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
c75ee6a0ee2f542463b5ca8cb81b06a6a6650d4c
Add initial setup file
setup.py
setup.py
from setuptools import setup setup( name='python2-consul', packages=['python2-consul'], version='0.0.1', install_requires=[ 'certifi==2017.4.17', 'chardet==3.0.4', 'idna==2.5', 'PyYAML==3.12', 'requests==2.18.1', 'urllib3==1.21.1', 'validators==0....
Python
0.000001
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...
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
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', ...
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
330650e7fe7c1a9aa0178812d08af332e927fe98
add minimal setup.py
setup.py
setup.py
from setuptools import setup setup(name='Cohorte Micronode', version='0.9', description='Cohorte Micronode Repository', url='https://github.com/librallu/cohorte-herald', author='Luc Libralesso', author_email='libralesso.l@gmail.com', license='Apache License 2.0', packages=[], ...
Python
0.000001
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.2', url = 'http://hg.lolnet.org/pelican/', author = 'Alexis Metaireau', author_email = 'alexis@notmyidea...
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
06c67a7df4e2fd5cbc221f2a9c3f64179af91344
Add setup.py
setup.py
setup.py
from setuptools import setup, find_packages setup( name='django-exadmin', version='0.1.0', description='New style and free plugin django admin module, UI base bootstrap2.', author='TM (sshwsfc)', author_email='sshwsfc@gmail.com', url='http://github.com/sshwsfc/django-exadmin', download_url=...
Python
0.000001
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...
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
ccbb7e11edc63a128b7006e015539fdabd8f3a7f
Set up frontend for longpolling
bitHopper/LongPoll.py
bitHopper/LongPoll.py
from gevent.event import AsyncResult _event = AsyncResult() def wait(): """ Gets the New Block work unit to send to clients """ return _event.get() def trigger(work): """ Call to trigger a LP """ old = self._event self._event = event.AsyncResult() old.set(work)
Python
0
34ad457ab831173efd3758af926deb17daf53feb
Add sitemap
resources/sitemaps.py
resources/sitemaps.py
from django.contrib.sitemaps import Sitemap from resources.models import Resource from django.utils import translation class ResourceSitemap(Sitemap): def items(self): return Resource.objects.filter(noindex=False, is_published=True, language=translation.get_language(...
Python
0.000002
67cca3176d1e2b5def3ebbd64f4bd56a8976529b
add res.company file
l10n_br_sale/res_company.py
l10n_br_sale/res_company.py
# -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2014 Renato Lima - Akretion # # ...
Python
0.000001
a562aa0ac58b2ee4fec3f9ff0b70a595db4c48ad
add test case for csv validation, with first test already implemented
doajtest/unit/test_reapp_csv_validate.py
doajtest/unit/test_reapp_csv_validate.py
from doajtest.helpers import DoajTestCase from portality.clcsv import ClCsv from portality import reapplication from copy import deepcopy import os APPLICATION_COL = [ "The Title", "http://journal.url", "Alternative Title", "1234-5678", "9876-5432", "The Publisher", "Society Institution", ...
Python
0
df84cf964214420987c51813b8960ce068223adf
Add request handler
request_handler/request_handler.py
request_handler/request_handler.py
#!flask/bin/python from flask import Flask, jsonify, abort from flask import make_response from flask import request from flask import url_for import psycopg2 as pg app = Flask(__name__) def make_public_request(request): new_request = {} new_request['uri'] = url_for('get_requests', request_id=request[0], _ex...
Python
0.000001
4e54128e5c0b9c762e5f93ae0d8791eeddde2264
Add JSON serializer
dxr/json.py
dxr/json.py
#!/usr/bin/env python2 class JsonOutput: need_separator = False content = '' def open(self): self.content += '{' self.need_separator = False def close(self): self.content += '}' self.need_separator = True def open_list(self): self.content += '[' self.need_separator = False def c...
Python
0
30eec7bb18285b82a7d67a0a3d9098afc5b9e286
Create QRfactorization.py
effective_quadratures/QRfactorization.py
effective_quadratures/QRfactorization.py
# A set of functions just for QR factorization, pivoting and iterative-QR
Python
0.000001
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
from brew.utilities import sg_from_dry_basis """ Ray Daniels Designing Great Beers Appendix 2: Course Grind Potential Extract (modified) Notes: The chart appears to have been developed with the moisture content set to zero (0.0) and the Brew House Efficiency set to 100% (1.0). This is not typical and ...
Python
0
7172d06ced60b2c69b9ac2762019ff95f3fd7da5
Create twice.py
twice.py
twice.py
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 n = 0 def cb(message): //rospy.loginfo(message.data*2) global n n = message.data*2 if __name__ == '__main__': rospy.init_node('twice') sub = rospy.Subscriber('count_up', Int32, cb) //rospy.spin() ...
Python
0.000002
a882409ede1898a3b4e2fb4619089b33c1427315
Add migration
apps/conditions/migrations/0005_empty_relation.py
apps/conditions/migrations/0005_empty_relation.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-08-10 14:23 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('conditions', '0004_condition_title'), ] operations = [ migrations.AlterField( ...
Python
0.000002
673a6ee654d7e540fe9c473904b6d1e326928c58
Create run_test.py
recipes/django-storages/run_test.py
recipes/django-storages/run_test.py
import django from django.conf import settings settings.configure(INSTALLED_APPS=['storages', 'django.contrib.contenttypes', 'django.contrib.auth']) django.setup() import storages
Python
0.000004
87de57c86b5d607b1fa795b46cefb3a722919f72
add script for testing speed
scripts/time_quimb.py
scripts/time_quimb.py
import timeit # ----------------------------- dense dot ----------------------------------- # setup = """ import quimb a = quimb.rand_herm(2**4) b = quimb.rand_herm(2**4) """ stmt = """ a @ b """ t = timeit.timeit(stmt, setup=setup, number=100000) print("Small dot".ljust(20) + ": {:.3} sec".format(t)) setup = """ i...
Python
0
397bc67a5a214a4cad5eef20f3a13c53f90964c5
Modify tms_nw_svr
scripts/tms_nw_svr.py
scripts/tms_nw_svr.py
#!/usr/bin/python # -*- coding: utf-8 -*- import rospy import requests from BaseHTTPServer import HTTPServer from BaseHTTPServer import BaseHTTPRequestHandler import urlparse def svr_start(port, callback): def handler(*args): CallbackServer(callback, *args) server = HTTPServer(('', int(port)), handler)...
Python
0
fec45cfaee6c5e5d02b6c3979179cdad153d5076
add ds18b20 rpi implementation to examples
examples/raspberrypi/platform/ds18b20.py
examples/raspberrypi/platform/ds18b20.py
import os import re import subprocess W1_DEVICES = '/sys/bus/w1/devices/' W1_SENSOR_PATTERN = re.compile('(10|22|28)-.+', re.IGNORECASE) def modprobe(module): return subprocess.check_call(['modprobe', module]) def init_w1(): modprobe('w1-gpio') modprobe('w1-therm') def is_w1_sensor(path): return ...
Python
0
ba3643f6e2adc0c5c32134b5ec23403e97663237
Create vFMCT.py
vFMCT.py
vFMCT.py
# -*- coding: utf-8 -*- """ @author: Jean-Gabriel JOLLY """ from tkinter import * import PIL from PIL import Image import os global rectangleList rectangleList=[] global numberImage, numberRectangle,totalRectangle numberImage, numberRectangle,totalRectangle = 0,0,0 #Square position global x1,x2,y1,y2 x1,x2,y1,y2=...
Python
0
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 shutil #To copy files to make a temporary file. import unittest.mock #To mock and monkeypatch ...
# 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
32ea42bcbc557e82e61797daf3643dc4a37d0f4c
add new stager .aspx
lib/stagers/windows/aspx.py
lib/stagers/windows/aspx.py
from lib.common import helpers class Stager: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Aspx', 'Author': ['Luis Vacas @CyberVaca'], 'Description': ('Generates an aspx file'), 'Comments': [ 'Simply launch launcher.aspx...
Python
0
01a659318644ef47cfe0c9ad3c484a974fb31e25
Create __init__.py
__init__.py
__init__.py
Python
0.000429
dead58329e0e04ae8535b097e688609b50ebfb76
Add a script for interacting with hosts.conf files.
script/testMachines.py
script/testMachines.py
#!/usr/bin/python # -*- coding: utf-8 -*- import subprocess import re import requests import json import pyquery import sys def genHostsConf(fname, ips, numHostsPerMachine): """ Take an old hosts file and a list of new machine ips and generate a new hosts file with the new cluster """ fh = open(fname...
Python
0
cb454d310431700e5ac9883a32f0b36e2e50e0fe
Add a check for keystone expired tokens buildup.
sensu/plugins/check-keystone-expired-tokens.py
sensu/plugins/check-keystone-expired-tokens.py
#!/opt/openstack/current/keystone/bin/python # # Copyright 2015, Jesse Keating <jlk@bluebox.net> # # 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...
Python
0
ac40e54d22717fbf1a2444a67198cdba66506df8
Add test for input setup workflow
cea/tests/test_inputs_setup_workflow.py
cea/tests/test_inputs_setup_workflow.py
import os import unittest import cea.config from cea.utilities import create_polygon from cea.datamanagement import zone_helper, surroundings_helper, terrain_helper, streets_helper, data_initializer, \ archetypes_mapper # Zug site coordinates POLYGON_COORDINATES = [(8.513465734818856, 47.178027239429234), (8.5154...
Python
0
8465d9a9b2c30b0b493bdf9ba24a29e39a51c1df
add dbutil to compute archive_begin for HADS sites
scripts/dbutil/compute_hads_sts.py
scripts/dbutil/compute_hads_sts.py
"""Compute the archive start time of a HADS/DCP network""" from pyiem.network import Table as NetworkTable import sys import psycopg2 import datetime THISYEAR = datetime.datetime.now().year HADSDB = psycopg2.connect(database='hads', host='iemdb') MESOSITEDB = psycopg2.connect(database='mesosite', host='iemdb') def d...
Python
0
582b5c598da5b35032447f0eb7888051b84f844c
Add datetime to fast cache
alembic/versions/20860ffde766_add_datetime_to_fastcache.py
alembic/versions/20860ffde766_add_datetime_to_fastcache.py
"""Add datetime to fastcache Revision ID: 20860ffde766 Revises: 471e6f7722a7 Create Date: 2015-04-14 07:44:36.507406 """ # revision identifiers, used by Alembic. revision = '20860ffde766' down_revision = '471e6f7722a7' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated b...
Python
0.000001
f54f427c16b394ff1ea0f55875bfb9d02e7264b0
add SiD calculator.
src/get_SiD.py
src/get_SiD.py
#!/usr/bin/python # -*- coding: UTF-8 -*- # Introduction: This script is used to calculate similarity index (SiD) # Created by Xiangchen Li on 2017/3/19 21:15 from collections import defaultdict from src.global_items import genetic_code def get_sid(virus_rscu_file, host_rscu_file): for pass_codon in ["TAG", "TAA...
Python
0
cd9f80c1567c945fe40e02af56433c49c6ddad65
Create lintcode_二进制求和.py
lintcode_二进制求和.py
lintcode_二进制求和.py
/** * http://www.lintcode.com/zh-cn/problem/add-binary/ * 给定两个二进制字符串,返回他们的和(用二进制表示。 * 样例 a = 11 b = 1 返回 100 */ class Solution: # @param {string} a a number # @param {string} b a number # @return {string} the result def addBinary(self, a, b): # Write your code here a = a[::-1] ...
Python
0.000005
65b362985d502440b12efc8a6a49ab0603354fd2
Add script to count emotional sentences according to LIWC
liwc_emotional_sentences.py
liwc_emotional_sentences.py
"""Count the numbers of annotated entities and emotional sentences in the corpus that was manually annotated. Usage: python annotation_statistics.py <dir containing the folia files with EmbodiedEmotions annotations> """ from lxml import etree from bs4 import BeautifulSoup from emotools.bs4_helpers import sentence, not...
Python
0
c910e1898c1e49c60877e092032daebd289c6f31
add scripts to export from env file to profile
scripts/env2profile.py
scripts/env2profile.py
#!/usr/bin/evn python import os import re import sys line_re = re.compile('(\S+?)\s*?=\s*?(\S+?)$') def env2profile(env_path, out_path): out_lines = list() with open(env_path, 'r') as env_file: for line in env_file.readlines(): matched = line_re.findall(line) if matched and l...
Python
0
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
"""Add rtp_task_resource_record table Revision ID: 3d3c72ecbc0d Revises: c9a1ff35c6ed Create Date: 2018-01-20 21:35:16.716477+00:00 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '3d3c72ecbc0d' down_revision = 'c9a1ff35c6ed' branch_labels = None depends_on = N...
Python
0
843e6f0ccb73a387e151d7f40ef7a2b4fc1597e0
test getmap
pathmap/test/test_getmap.py
pathmap/test/test_getmap.py
import unittest from .. getmap import MapDownloader class TestGetmap(unittest.TestCase): pass if __name__ == '__main__': unittest.main()
Python
0.000001
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
""" Basic functionality and regression tests for ACA dark cal module. """ import numpy as np from ..aca_dark import dark_cal def test_date_to_dark_id(): assert dark_cal.date_to_dark_id('2011-01-15T12:00:00') == '2011015' def test_dark_id_to_date(): assert dark_cal.dark_id_to_date('2011015') == '2011:015' ...
Python
0
dd3ed1c8fdf9024a7978a1443baf8ca101f21642
add demo object for channel
server/Mars/MarsRpc/ChannelObjs.py
server/Mars/MarsRpc/ChannelObjs.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright (c) 2016 ASMlover. 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 copyrig...
Python
0.000001
160a3012db5513b4d3a45098a9b0b72e1f117b20
add a constant coefficient test for sanity
lowmach/mg_constant_test.py
lowmach/mg_constant_test.py
#!/usr/bin/env python """ Test the variable coefficient MG solver with a CONSTANT coefficient problem -- the same on from the multigrid class test. This ensures we didn't screw up the base functionality here. We solve: u_xx + u_yy = -2[(1-6x**2)y**2(1-y**2) + (1-6y**2)x**2(1-x**2)] u = 0 on the boundary this is t...
Python
0.000049
81b9d141295ee2a8b31974aa86d89b80dfefe3ca
Create question5.py
chengjun/question5.py
chengjun/question5.py
#!usr/bin/python import re class extrac_url(): def __init__(self,url): self.url = url def pater(self): url = self.url [scheme1,url_rest] = url.split('//') scheme = re.search(r'(.+)//',url).group(1) #print "scheme is %s " % scheme netloc = re.search(r'//(.+)/',url).group(1) #print "netloc is %s " % netl...
Python
0.99937
5eefc407b8f51c017a3f4193c88f6dc188a88601
Include OpenCV based Python CLAHE script
src/CLAHE_dir.py
src/CLAHE_dir.py
from PIL import Image import numpy as np import h5py import os import sys import cv2 # Maybe consider implemeting more involved auto-balancing # http://wiki.cmci.info/documents/120206pyip_cooking/python_imagej_cookbook#automatic_brightnesscontrast_button def apply_clahe_to_H5(fn, clahe): f = h5py.File(fn, "r+") img...
Python
0
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...
# -*- 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
d4d9d9ac478bdaf2385ecff0a43bfc8fe4bb11c7
Add decorator for ignoring DeprecationWarnings
oscar/test/decorators.py
oscar/test/decorators.py
import warnings from functools import wraps 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 ...
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
f0af14b8fcd420b63a47e18938664e14cf9ea968
Add generic asynchronous/synchronous run command
subiquity/utils.py
subiquity/utils.py
# Copyright 2015 Canonical, Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
Python
0
2aab90ab9e4a32bef1496149a2780b7385318043
Add tests
symengine/tests/test_cse.py
symengine/tests/test_cse.py
from symengine import cse, sqrt, symbols def test_cse_single(): x, y, x0 = symbols("x, y, x0") e = pow(x + y, 2) + sqrt(x + y) substs, reduced = cse([e]) assert substs == [(x0, x + y)] assert reduced == [sqrt(x0) + x0**2] def test_multiple_expressions(): w, x, y, z, x0 = symbols("w, x, y, z, ...
Python
0.000001
5a21b66f7ab77f419245d8c07d7473a6e1600fc4
Add crawler for 'Hark, A Vagrant'
comics/crawler/crawlers/harkavagrant.py
comics/crawler/crawlers/harkavagrant.py
from comics.crawler.base import BaseComicCrawler from comics.crawler.meta import BaseComicMeta class ComicMeta(BaseComicMeta): name = 'Hark, A Vagrant!' language = 'en' url = 'http://www.harkavagrant.com/' start_date = '2008-05-01' history_capable_days = 120 schedule = 'Mo,Tu,We,Th,Fr,Sa,Su' ...
Python
0.000002
2f188d3d43741821126e381af9753e0e3d7be231
test hello python file
t/library/hello.py
t/library/hello.py
import ngx ngx.echo("Hello, Ngx_python\n")
Python
0.00043
c2a0b66ec1ad7f32e1291fc6a2312d2a4a06a6e3
Add class-file to right location
src/mmhandler.py
src/mmhandler.py
class MmHandler: pass
Python
0.000001
aa096865f425a57ccbde51d0586be8a07403a6bd
Add migration for BoundarySet start/end see #25
boundaries/south_migrations/0005_add_set_start_end_date.py
boundaries/south_migrations/0005_add_set_start_end_date.py
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'BoundarySet.start_date' db.add_column(u'boundaries_bounda...
Python
0
4f155252bf9d9508b955d7eecf589da347bff817
Add a setup.cfg.
setup.py
setup.py
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="imperial-painter-adam-thomas", version="1.0.0", author="Adam Thomas", author_email="sortoflikechess@gmail.com", description="A tool for generating prototype cards from Excel file...
Python
0