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
cfabd36edd10819151caa25e8a30ef2938a55905
add django-compat as requirement
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from os.path import join, dirname from setuptools import setup, find_packages import organizations as app def long_description(): try: return open(join(dirname(__file__), 'README.rst')).read() except IOError: return "LONG_DESCRIPTION Error" setup...
Python
0.000001
@@ -1086,16 +1086,48 @@ %3E=0.9',%0A + 'django-compat%3E=1.0.2',%0A %5D,%0A @@ -1130,16 +1130,17 @@ %5D,%0A # + test_sui
d0002645b0f36ec9fbebaadfb0fa7717f1431ef4
improve generated form view in code
openerp/addons/base/module/wizard/base_module_upgrade.py
openerp/addons/base/module/wizard/base_module_upgrade.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
Python
0
@@ -2006,19 +2006,36 @@ rch'%5D = -''' +%22%22%22%0A %3Cform st @@ -2101,28 +2101,16 @@ - %3Cheader%3E @@ -2130,36 +2130,24 @@ - - %3Cbutton name @@ -2222,26 +2222,12 @@ ight -_on_dirty%22/%3E%0A +%22/%3E%0A @@ -2250,24 +2250,11 @@ -...
103418e32d77161dacb67eabea559403b62e819b
Add test to confirm proper handling of org extensions in site_persistence
tests/test_model_persistence.py
tests/test_model_persistence.py
from tests import TestCase from flask_webtest import SessionScope from shutil import rmtree from tempfile import mkdtemp from portal.config.model_persistence import ModelPersistence from portal.database import db from portal.models.app_text import AppText from portal.models.communication_request import CommunicationRe...
Python
0
@@ -207,16 +207,65 @@ port db%0A +from portal.models.locale import LocaleConstants%0A from por @@ -4329,8 +4329,1079 @@ ep me')%0A +%0A def test_delete_extension(self):%0A org = Organization(name='testy')%0A org.timezone = 'Asia/Tokyo' # stored in an extension%0A with SessionScope(db):%0A ...
333df12d64b7d0724a90c155858e3a8421967aa0
Add test for copy_reads_file()
tests/samples/test_fake.py
tests/samples/test_fake.py
import os import pytest from virtool.samples.fake import create_fake_sample, create_fake_samples from virtool.fake.wrapper import FakerWrapper from virtool.samples.db import LIST_PROJECTION @pytest.fixture def app(dbi, pg, run_in_thread, tmp_path): return { "db": dbi, "fake": FakerWrapper(), ...
Python
0
@@ -18,16 +18,17 @@ pytest%0A +%0A from vir @@ -91,16 +91,50 @@ _samples +, copy_reads_file, READ_FILES_PATH %0Afrom vi @@ -1649,8 +1649,269 @@ fq.gz%22%7D%0A +%0A%0Aasync def test_copy_reads_file(app):%0A file_path = READ_FILES_PATH / %22paired_1.fq.gz%22%0A%0A await copy_reads_file(app, file_path, %22read...
458748b5354f9ef6c5bf077f773d92c83dd73961
Add pytest-mock to dev requirements
setup.py
setup.py
""" Build Cutadapt. """ import sys import os.path from setuptools import setup, Extension, find_packages from distutils.version import LooseVersion from distutils.command.sdist import sdist as _sdist from distutils.command.build_ext import build_ext as _build_ext MIN_CYTHON_VERSION = '0.28' if sys.version_info[:2] <...
Python
0
@@ -3647,16 +3647,31 @@ imeout', + 'pytest-mock', 'sphinx
e6551e977482003da2e0708a3aa0b408e2033ae7
remove the type
redash/query_runner/prometheus.py
redash/query_runner/prometheus.py
import requests from datetime import datetime from urlparse import parse_qs from redash.query_runner import BaseQueryRunner, register, TYPE_DATETIME, TYPE_STRING from redash.utils import json_dumps def get_instant_rows(metrics_data): rows = [] for metric in metrics_data: row_data = metric['metric'] ...
Python
0.999999
@@ -1406,73 +1406,8 @@ se%0A%0A - @classmethod%0A def type(cls):%0A return %22Prometheus%22%0A%0A
e822a1c863d5ff2b37f1123f2a5fae63061f7d44
fix heartbeat origin
alert-sqs/alert-sqs.py
alert-sqs/alert-sqs.py
#!/usr/bin/env python import settings from alert import Alert, Heartbeat, ApiClient from kombu import BrokerConnection from Queue import Empty __version__ = '3.0.0' from kombu.utils.debug import setup_logging # setup_logging(loglevel='DEBUG', loggers=['']) def main(): broker_url = getattr(settings, 'broker_u...
Python
0.000003
@@ -16,16 +16,26 @@ python%0A%0A +import os%0A import s @@ -722,16 +722,50 @@ out=20)%0A + print message.payload%0A @@ -995,17 +995,36 @@ lert-sqs -' +/%25s' %25 os.uname()%5B1%5D , tags=%5B
da006dee5771313c5e67f0ce8150bb3a216a0697
Bump the minor version number to reflect the relatively large scale removal of functionality.
PyFVCOM/__init__.py
PyFVCOM/__init__.py
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '1.3.4' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = 'pica@pml.ac.uk' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy_tools from PyFV...
Python
0
@@ -59,11 +59,11 @@ '1. -3.4 +4.0 '%0A__
7c66a0b34806af9cf1ac6722318534643dea3865
Add classifiers
setup.py
setup.py
from __future__ import with_statement import os.path import setuptools import sqlitebiter REQUIREMENT_DIR = "requirements" with open("README.rst") as fp: long_description = fp.read() with open(os.path.join("docs", "pages", "introduction", "summary.txt")) as f: summary = f.read() with open(os.path.join(REQ...
Python
0.000907
@@ -1394,24 +1394,117 @@ T License%22,%0A + %22Operating System :: Microsoft%22,%0A %22Operating System :: Microsoft :: Windows%22,%0A %22Ope
be10ac8d89f68244c2a3a69208e68ebd92b7a7a6
Capitalize Luminoso
luminoso_api/cli.py
luminoso_api/cli.py
import argparse import csv import json import os import sys from signal import signal, SIGPIPE, SIG_DFL from urllib.parse import urlparse from .client import LuminosoClient from .constants import URL_BASE from .errors import LuminosoError # Python raises IOError when reading process (such as `head`) closes a pipe. # ...
Python
0.999999
@@ -442,17 +442,17 @@ ess the -l +L uminoso
0e5f1609dec977b3a5103add4807dedaab33632a
add tracer into the test
tests/test_weightless_tracer.py
tests/test_weightless_tracer.py
from gusto import * from firedrake import PeriodicIntervalMesh, ExtrudedMesh, Expression, \ SpatialCoordinate, Constant, as_vector from math import pi import json import pytest def setup_tracer(dirname): # declare grid shape, with length L and height H L = 1000. H = 1000. nlayers = int(H / 100.) ...
Python
0.000001
@@ -717,17 +717,16 @@ -# dumplist @@ -848,50 +848,8 @@ rs() -%0A diagnostics = Diagnostics(*fieldlist) %0A%0A @@ -1074,53 +1074,8 @@ rs,%0A - diagnostics = diagnostics,%0A @@ -1122,25 +1122,29 @@ # -Initial condition +declare initial field s%0A @@ -1338,24 +1338,94 @@ o...
5ca5dbd9113fe97223764f647806a81eebcf5d70
fix it pls
alexBot/cogs/sugery.py
alexBot/cogs/sugery.py
import logging import math from typing import TYPE_CHECKING import aiohttp from discord.ext import tasks from alexBot.classes import SugeryZone, Thresholds from ..tools import Cog, get_json if TYPE_CHECKING: from bot import Bot log = logging.getLogger(__name__) # https://github.com/nightscout/cgm-remote-mon...
Python
0.000262
@@ -683,16 +683,121 @@ '%E2%87%95',%0A%7D%0A%0A +BATTERYINDICATORS = %22 %5CU00002840%5CU000028c0%5CU000028c4%5CU000028e4%5CU000028e6%5CU000028f6%5CU000028f7%5CU000028ff%22%0A%0A %0Aclass S @@ -2973,138 +2973,8 @@ ne%0A%0A - if member.nick == f%22%7Bname%7D (%5CN%7BBATTERY%7D%7Br' %E2%A1%80%E2%A3%80%E...
cddf9b83383adfc41e80c441b4f8f3219893cc86
Bump version for release
setup.py
setup.py
# #!/usr/bin/env python # -*- coding: utf-8 -*- import re import os from setuptools import setup, find_packages def parse_requirements(): """ Rudimentary parser for the `requirements.txt` file We just want to separate regular packages from links to pass them to the `install_requires` and `dependency...
Python
0
@@ -1266,17 +1266,17 @@ on='0.6. -0 +1 ',%0A
6cdae4d9f11616c2e2b56917811f31e049bdc688
Support missing aafigure module
aafig/sphinxcontrib/aafig.py
aafig/sphinxcontrib/aafig.py
# -*- coding: utf-8 -*- """ sphinxcontrib.aafig ~~~~~~~~~~~~~~~~~~~ Allow embeded ASCII art to be rendered as nice looking images using the aafigure reStructuredText extension. See the README file for details. :copyright: Copyright 2009 by Leandro Lucarella <llucax@gmail.com> \ (based...
Python
0
@@ -698,16 +698,25 @@ ective%0A%0A +try:%0A import a @@ -723,16 +723,56 @@ afigure%0A +except ImportError:%0A aafigure = None%0A %0A%0Adef me @@ -4103,16 +4103,100 @@ %22%22%22%0A%0A + if aafigure is None:%0A raise AafigError('aafigure module not installed')%0A%0A fnam
55d9ed499d842246c74bc72ff0e141fa22fde9d8
add numpexpr dependency
setup.py
setup.py
from setuptools import setup import codecs import os import re # to release: # python setup.py register sdist bdist_egg upload here = os.path.abspath(os.path.dirname(__file__)) # Read the version number from a source file. # Why read it, and not import? # see https://groups.google.com/d/topic/pypa-dev/0PkjVpcxTzQ/d...
Python
0
@@ -2334,20 +2334,39 @@ lery%3E=3.1',%0A + 'numexpr',%0A %5D,%0A)
f096dee1623936ed06340df1ee081a1f77eb8b77
Simplify plugin info declaration
pyexcel_xlsx/__init__.py
pyexcel_xlsx/__init__.py
""" pyexcel_xlsx ~~~~~~~~~~~~~~~~~~~ The lower level xlsx file format handler using openpyxl :copyright: (c) 2015-2017 by Onni Software Ltd & its contributors :license: New BSD License """ # flake8: noqa # this line has to be place above all else # because of dynamic import __FILE_TYPE__ = 'xlsx' ...
Python
0.000001
@@ -290,16 +290,144 @@ import%0A +from pyexcel_io.plugins import IORegistry%0Afrom pyexcel_io.io import get_data as read_data, isstream, store_data as write_data%0A%0A%0A __FILE_T @@ -470,69 +470,47 @@ _ = -%5B%0A %7B%0A 'plugin_type': 'pyexcel-io +IORegistry(__name__).add_a_ reader -',%0A +(%0A ...
f1ab27dcb52212c3c818c3ef6d9be9410610c2d6
make these tests pass, please :)
tests/test_base_scraper.py
tests/test_base_scraper.py
from unittest import TestCase from statscraper import BaseScraper, Dataset, Dimension, ROOT class Scraper(BaseScraper): def _fetch_itemslist(self, item): yield Dataset("Dataset_1") yield Dataset("Dataset_2") yield Dataset("Dataset_3") def _fetch_dimensions(self, dataset): yi...
Python
0.000001
@@ -1110,162 +1110,732 @@ est_ -fetch_dataset(self):%0A scraper = Scraper()%0A dataset = scraper.items%5B0%5D%0A self.assertTrue(dataset.data%5B0%5D%5B%22municipality%22%5D == %22Robertsfors%22 +select_missing_item(self):%0A # Should throw something like a KeyError?%0A scraper = Scra...
066299ce0aa6174c2b7c1070d801cbf540932697
fix some python 3 issues
tests/test_cachemanager.py
tests/test_cachemanager.py
import time from datetime import datetime from beaker.cache import CacheManager from beaker.util import parse_cache_config_options defaults = {'cache.data_dir':'./cache', 'cache.type':'dbm', 'cache.expire': 2} def teardown(): import shutil shutil.rmtree('./cache', True) def make_cache_obj(**kwargs): opt...
Python
0.000069
@@ -1271,20 +1271,16 @@ gions'%5D. -iter items(): @@ -1311,12 +1311,8 @@ ams. -iter item
408ef23f0227650c77dbaf3efae0dd569fb076dd
update version for release
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup except ImportError: import distribute_setup distribute_setup.use_setuptools() from setuptools import setup setup( name='rst2html5-tools', version='0.2.5', author='Mariano Guerra', description="Transform reStructuredText documents t...
Python
0
@@ -225,17 +225,17 @@ on='0.2. -5 +6 ',%0A a
239a4bad9c9ba249625d7a77da084df38a5b7d4b
Allow the residual plugin to function when nsteps = 1.
pyfr/plugins/residual.py
pyfr/plugins/residual.py
# -*- coding: utf-8 -*- import numpy as np from pyfr.mpiutil import get_comm_rank_root, get_mpi from pyfr.plugins.base import BasePlugin, init_csv class ResidualPlugin(BasePlugin): name = 'residual' systems = ['*'] def __init__(self, intg, cfgsect, suffix): super().__init__(intg, cfgsect, suffi...
Python
0.000001
@@ -704,218 +704,122 @@ -def __call__( + # Call our self -, in -tg):%0A # If an output is due next step%0A if (intg.nacptsteps + 1) %25 self.nsteps == 0:%0A self._prev = %5Bs.copy() for s in intg.soln%5D%0A self._tprev = intg.tcurr + case output is needed after the first ...
77dc6134be66bf16e346d6120c361ca2b11899f3
Add events
setup.py
setup.py
from setuptools import setup, find_packages setup(name='findatapy', version='0.05', description='Market data library', author='Saeed Amen', author_email='saeed@cuemacro.com', license='Apache 2.0', keywords = ['pandas', 'data', 'Bloomberg', 'tick', 'stocks', 'equities'], url = ...
Python
0.00006
@@ -601,16 +601,63 @@ 'numpy' +,%0A 'pandas_datareader' %5D,%0A%09 zi
e385a57804329356a2f4e7c44532cfa052441555
Fix test data broken due to updated behavior of PyFile#getImportBlock()
python/testData/refactoring/move/relativeImportsInsideMovedModule/after/src/subpkg1/mod1.py
python/testData/refactoring/move/relativeImportsInsideMovedModule/after/src/subpkg1/mod1.py
from pkg1 import subpkg2 from pkg1.subpkg2 import mod2 from pkg1.subpkg2.mod2 import VAR from . import mod3 # malformed imports from from import from pkg1.subpkg2 import # absolute imports import pkg1.subpkg2 as foo from pkg1 import subpkg2 as bar print(subpkg2, mod3, mod2, foo, bar, VAR)
Python
0
@@ -1,89 +1,66 @@ -from pkg1 import subpkg2%0Afrom pkg1.subpkg2 import mod2%0Afrom pkg1.subpkg2.mod2 +import%0Afrom%0Afrom%0A%0Aimport pkg1.subpkg2 as foo%0Afrom pkg1 import VAR%0A @@ -59,26 +59,33 @@ ort -VAR +subpkg2 %0Afrom -. +pkg1 import mod3 @@ -84,140 +84,126 @@ ort -mod3%0A%0A# malformed imports%0...
72c669d71b797268870f00e2aa1c00018bcd638b
add local_asn test
tests/versions/base/test_bgp.py
tests/versions/base/test_bgp.py
Python
0.000001
@@ -0,0 +1,1767 @@ +#!/usr/bin/env python%0A%22%22%22%0ACopyright 2015 Brocade Communications Inc.%0A%0ALicensed under the Apache License, Version 2.0 (the %22License%22);%0Ayou may not use this file except in compliance with the License.%0AYou may obtain a copy of the License at%0A%0Ahttp://www.apache.org/licenses/LIC...
5a7f89735345ab0ff2fae68a28ad8d21e35e6751
use selenium to detect invisible element
core/drivers/extract/driver/spiders/form.py
core/drivers/extract/driver/spiders/form.py
# -*- coding: utf-8 -*- import scrapy from scrapy.spiders import CrawlSpider, Rule from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor from driver.items import InputItem, FormItem class FormSpider(CrawlSpider): name = "form" allowed_domains = ["127.0.0.1"] def __init__(self, *args, **kw...
Python
0.000002
@@ -187,16 +187,84 @@ FormItem +%0Afrom selenium import webdriver%0Afrom db_webcrawler.settings import * %0A%0Aclass @@ -752,44 +752,336 @@ )%0A%0A -%0A def parse_form(self, response): + try:%0A service_args = %5B%0A '--proxy=' + HTTP_PROXY,%0A '--proxy-type=http',...
eb80dc47f09dd186c0b438ff6d864c27090c83cc
Force element attributes to be a dict, workaround for 2.4 xml sax bug.
pyglet/layout/content.py
pyglet/layout/content.py
#!/usr/bin/env python '''Describes document content (element) tree. Use a module from pyglet.layout.builders to create the tree. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' from pyglet.layout.css import * __all__ = ['Document', 'DocumentListener', 'ContentElement', ...
Python
0.998915
@@ -4473,45 +4473,8 @@ ame%0A - self.attributes = attributes%0A @@ -4548,16 +4548,214 @@ ibling%0A%0A + # Make attributes more like a dict%0A #self.attributes = attributes%0A self.attributes = %7B%7D%0A for key, value in attributes.items():%0A self.attributes%5Bkey%...
02def5a9881e315c0ab4eb894b207502e0231df2
fix manage error
src/hammr/utils/generics_utils.py
src/hammr/utils/generics_utils.py
# To change this license header, choose License Headers in Project Properties. # To change this template file, choose Tools | Templates # and open the template in the editor. import json import sys import re import traceback from os.path import expanduser import os import urllib from uforge.objects.xsd0 import * impo...
Python
0.000001
@@ -7006,24 +7006,42 @@ %0A if +len(e.args)%3E1 and type(e.args%5B
0200aef612dc236cc211cc089fa05d1a5e669c0f
Refactor HospitalEquipment
ambulances/viewsets.py
ambulances/viewsets.py
from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404 from rest_framework import viewsets from rest_framework import mixins from rest_framework import generics from rest_framework import filters from rest_framework.permissions import IsAuthenticated from rest_framework imp...
Python
0
@@ -5394,32 +5394,34 @@ -viewsets.Generic +HospitalPermission ViewSet) @@ -5622,1410 +5622,8 @@ ')%0A%0A - def get_queryset(self):%0A%0A #print('@get_queryset %7B%7D(%7B%7D)'.format(self.request.user,%0A # self.request.method))%0A %0A # retur...
0b3843e159a09345f68158b7b5fb1967bff9da0a
remove unnecessary_outputs option
fmriprep/run_workflow.py
fmriprep/run_workflow.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: oesteban # @Date: 2015-11-19 16:44:27 # @Last Modified by: oesteban # @Last Modified time: 2016-10-05 15:03:18 """ fMRI preprocessing workflow ===== """ from __future__ import absolute_import, division, print_function, unicode_literals import os import os.pa...
Python
0.000342
@@ -3641,53 +3641,8 @@ dir) -,%0A 'remove_unnecessary_outputs': False %0A
434b57778e7cd75702e72dafc8c2c5efce0b1b86
Update test requirements
setup.py
setup.py
# -*- coding: utf-8 -*- #!/usr/bin/env python import sys import os import re from setuptools import setup from setuptools.command.test import test as TestCommand kwargs = {} requires = [] packages = [ "github3", "github3.gists", "github3.repos", "github3.issues", "github3.search", ] kwargs['test...
Python
0
@@ -345,11 +345,11 @@ %3E=0. -1.6 +2.0 ', ' @@ -432,16 +432,17 @@ nittest2 + ==0.5.1' @@ -516,17 +516,16 @@ 'mock == - 1.0.1')%0A
f8da511cb61072b566ebd0113edd125395b8d422
Fix connection
tests/test_reconnection.py
tests/test_reconnection.py
""" Collection of test cases to test connection module. """ from nose.tools import assert_true, assert_false, assert_equal, raises import datajoint as dj import numpy as np from datajoint import DataJointError from . import CONN_INFO, PREFIX class TestReconnect: """ test reconnection """ @classmeth...
Python
0.000006
@@ -307,44 +307,22 @@ -@classmethod%0A def setup_class(cls +def setup(self ):%0A @@ -332,11 +332,12 @@ -cls +self .con
be56cb9f15e7ea0348937c9c86518786e138e023
update setup.py
setup.py
setup.py
from setuptools import setup def readme(): with open('README.md') as f: return f.read() setup(name='kaspar_gui', version='0.1', description='Internet based Front-End for the KASPAR Robot', long_description=readme(), classifiers=[ 'Development Status :: 1 - Beta',...
Python
0.000001
@@ -634,16 +634,23 @@ ' +python- dateutil @@ -714,16 +714,17 @@ erkzeug' +, %0D%0A
e2e6cdac88ee03f78713ac4a50d0003a471a0027
Add Python 3.9 to the list of supported versions.
setup.py
setup.py
from setuptools import setup long_description = open('README.rst').read() setup( name="celery-redbeat", description="A Celery Beat Scheduler using Redis for persistent storage", long_description=long_description, version="2.0.0", url="https://github.com/sibson/redbeat", license="Apache License...
Python
0
@@ -959,16 +959,65 @@ : 3.8',%0A + 'Programming Language :: Python :: 3.9',%0A
81475691a3fe745a66b69ebe4bda55d8ea4fd399
add unit test for Processor().validate
tests/test_scrapyscript.py
tests/test_scrapyscript.py
import unittest import pytest from scrapy.settings import Settings from scrapy.spiders import Spider import scrapy from scrapyscript import Job, Processor, ScrapyScriptException class MyItem(scrapy.Item): bot = scrapy.Field() data = scrapy.Field() class MySpider(Spider): name = "myspider" def sta...
Python
0.000003
@@ -3662,16 +3662,215 @@ test%22)%0A%0A + def test_job_validate(self):%0A jobs = %5BJob(BigSpider, url=%22http://www.python.org%22), %22not a Job%22%5D%0A p = Processor()%0A self.assertRaises(ScrapyScriptException, p.validate, jobs)%0A%0A %0Aif __na
38a555cb1eb2a5d0170ff1aab70fb0f2f01d6b2b
add x and y title options
pyfluka/utils/Plotter.py
pyfluka/utils/Plotter.py
import numpy as np import os.path from itertools import izip from matplotlib import pyplot as plt from matplotlib.colors import LogNorm, Normalize def get_axes_range(axisdata): start, end, nbins = axisdata step = (end - start) / nbins print start, end, nbins, step return np.arange(start, end + step / ...
Python
0.000067
@@ -1259,16 +1259,54 @@ esdata,%0A + plot_config=None,%0A @@ -1332,24 +1332,24 @@ ename=None,%0A - @@ -2175,16 +2175,175 @@ idth=2)%0A + if %22xtitle%22 in plot_config:%0A plt.xlabel(plot_config.xtitle)%0A if %22ytitle%22 in plot_config:%0A ...
29c40e1e5048c5f8d76486020be6464de0e2adc7
add more dependency
setup.py
setup.py
from setuptools import find_packages from setuptools import setup install_requires = [ 'numpy', 'theano', ] setup( name="TheFramework", version="0.0.1", description="A nn lib", packages=find_packages(), include_package_data=False, zip_safe=False, install_requires=install_requires, ...
Python
0
@@ -108,16 +108,42 @@ heano',%0A + 'pyyaml',%0A 'h5py',%0A %5D%0A%0Asetup
e3c794718d715f3226680beea9ba3ad2f3e344d9
test coverage improvement
tests/test_sheet_update.py
tests/test_sheet_update.py
import pyexcel import os import datetime class TestReader: def setUp(self): """ Make a test csv file as: a,b,c,d e,f,g,h i,j,1.1,1 """ self.testfile = "testcsv.csv" self.rows = 3 w = pyexcel.Writer(self.testfile) data=['a', 'b', 'c',...
Python
0
@@ -2804,16 +2804,230 @@ ert 1==1 +%0A%0A def test_set_column_at(self):%0A r = pyexcel.PlainReader(self.testfile)%0A try:%0A r.set_column_at(1,%5B11,1%5D, 1000)%0A assert 1==2%0A except ValueError:%0A assert 1==1 %0A @@ -3187,32 +3187,152 @@ 1%5D%0A ...
67e6036c564f4e2eb9acf650acf5c33813af3003
make serve_image return an image
views.py
views.py
from flask import Flask, render_template app = Flask(__name__) @app.route('/') def hello_world(): return render_template('index.html') """@app.route('/<username>') def hello_world2(username): return 'Hello %s' % username""" if __name__ == '__main__': app.run(debug=True)
Python
0.999961
@@ -33,16 +33,69 @@ template +, make_response%0Afrom PIL import Image%0Aimport StringIO %0Aapp = F @@ -189,19 +189,16 @@ tml')%0A%0A%0A -%22%22%22 @app.rou @@ -207,83 +207,330 @@ ('/%3C -username%3E')%0Adef hello_world2(username):%0A return 'Hello %25s' %25 username%22%22%22 +width%3Ex%3Cheight%3E')%0A@app.rout...
7ec9f01dac80c4249a33306d05884843239c8707
enforce correct order of pages exported
pages/admin/actions.py
pages/admin/actions.py
from django.utils.translation import ugettext_lazy as _ from django.http import HttpResponse from django.utils import simplejson from django.conf import settings as global_settings from django.db import transaction from django.shortcuts import redirect, render_to_response from django.template import RequestContext fro...
Python
0.000002
@@ -894,16 +894,109 @@ ENAME,)%0A + # selection may be in the wrong order%0A queryset = queryset.order_by('tree_id', 'lft')%0A resp
c9c91af31d60c6e9f0eaa971c52985418a4707d3
update whitelist for osd slow op wrn
teuthology/suite/placeholder.py
teuthology/suite/placeholder.py
import copy class Placeholder(object): """ A placeholder for use with substitute_placeholders. Simply has a 'name' attribute. """ def __init__(self, name): self.name = name def substitute_placeholders(input_dict, values_dict): """ Replace any Placeholder instances with values nam...
Python
0
@@ -2542,16 +2542,32 @@ request' +, '%5C(SLOW_OPS%5C)' %5D,%0A
c3572887921c5afad5115811afa401cee925cb0b
fix input array
chainer/functions/loss/sigmoid_cross_entropy.py
chainer/functions/loss/sigmoid_cross_entropy.py
import numpy from chainer import cuda from chainer import function from chainer.functions.activation import sigmoid from chainer import utils from chainer.utils import type_check class SigmoidCrossEntropy(function.Function): """Sigmoid activation followed by a sigmoid cross entropy loss.""" ignore_label = ...
Python
0.000802
@@ -4071,17 +4071,16 @@ ay(%5B%5B0, -- 1, 0%5D, %5B @@ -4137,17 +4137,17 @@ y(%5B%5B 0, -- + 1, 0%5D,%0A @@ -4254,22 +4254,24 @@ e(0. -30866208672523 +2566471397876739 5)%0A @@ -4352,20 +4352,22 @@ (0.6 -17324 +416 17 +8 345 -04 +68023 7)%0A @@ -4510,24 +4510,24 @@ 8 , 0. - +04858735 , 0.97...
802c2b7c99554f1caf9c9ebf1e17935f3717e402
Fix pnsl module description (#776)
pajbot/modules/pnsl.py
pajbot/modules/pnsl.py
import logging import requests from pajbot.models.command import Command from pajbot.modules import BaseModule from pajbot.modules import ModuleSetting log = logging.getLogger(__name__) class PNSLModule(BaseModule): ID = __name__.split(".")[-1] NAME = "Run P&SL lists" DESCRIPTION = "Run P&SL lists thr...
Python
0
@@ -322,16 +322,20 @@ ugh -! +the !run pnsl -run com
2efd23708a1e5198802056cd7b7c3c27c2fbdb08
Use `super()` in `_print_message()`.
shcol/cli.py
shcol/cli.py
# -*- coding: utf-8 -*- # Copyright (c) 2013-2016, Sebastian Linke # Released under the Simplified BSD license # (see LICENSE file for details). """ The command-line interface for `shcol`. """ import argparse import sys import traceback from . import __version__, config, helpers, highlevel __all__ = ['main'] clas...
Python
0.000001
@@ -2974,39 +2974,39 @@ -argparse.ArgumentParser +super(type(self), self) ._print_ @@ -3005,38 +3005,32 @@ ._print_message( -self, message, file=st
34d85cacb6e32601a8107613a8e4a15d8beffc8b
Drop not implemented node requests
code/marv/marv_node/io.py
code/marv/marv_node/io.py
# Copyright 2016 - 2018 Ternaris. # SPDX-License-Identifier: AGPL-3.0-only from collections import namedtuple from numbers import Integral from .mixins import Keyed, Request, Task from .stream import Handle class Abort(Exception): pass def create_stream(name, **header): """Create a stream for publishing ...
Python
0.000001
@@ -3095,96 +3095,8 @@ s')%0A -PullAny = namedtuple('PullAny', 'handles')%0APullSome = namedtuple('PullSome', 'handles')%0A Push @@ -3242,61 +3242,8 @@ ll)%0A -Request.register(PullAny)%0ARequest.register(PullSome)%0A Requ
b14f520fbb15c9f455339631ed90b0d926befb27
Bump version
setup.py
setup.py
# encoding: utf-8 import io import sys import os.path import setuptools MISC_DIR = "misc" REQUIREMENT_DIR = "requirements" with io.open("README.rst", encoding="utf8") as f: long_description = f.read() with io.open(os.path.join(MISC_DIR, "summary.txt"), encoding="utf8") as f: summary = f.read() with open(o...
Python
0
@@ -853,17 +853,17 @@ n=%220.13. -0 +1 %22,%0A u
ee28b56ea88962857321150d74b2b7c25eb7d26d
fix folder creation issue
code_repo/ansible_repo.py
code_repo/ansible_repo.py
import json import os import re import shutil from git import Repo, RemoteProgress from ansible_objects import * class InvalidGitRepoUrlException(Exception): def __init__(self, git_repo_url): self.git_repo_url = git_repo_url class Progress(RemoteProgress): def update(self, *args): self.callb...
Python
0
@@ -5955,12 +5955,15 @@ os.m -k +ake dir +s (loc @@ -6190,10 +6190,8 @@ po_url)%0A -%0A%0A
9c07d26072c15147e47c15edd5c4d356686b14d7
Upgrade these.
setup.py
setup.py
import os from setuptools import setup, find_packages VERSION = os.path.join(os.path.dirname(__file__), 'VERSION') VERSION = open(VERSION, 'r').read().strip() README = os.path.join(os.path.dirname(__file__), 'README.rst') README = open(README, 'r').read().strip() setup( name='grano-client', version=VERSION, ...
Python
0
@@ -614,20 +614,21 @@ com/ -granoproject +CodeForAfrica /gra @@ -797,11 +797,12 @@ %3E=2. -2.0 +17.3 %22,%0A @@ -819,14 +819,14 @@ YAML -= +%3E =3.1 -0 +2 %22%0A
7689719e0ba8f577acbe5d919828a1abc5437be4
update version
setup.py
setup.py
from setuptools import setup setup(name='lunchboy', version='0.1', description='Lunch without #lunch', url='http://github.com/lisunshiny/lunchboy', author='Liann Sun', author_email='liann@appboy.com', license='MIT', packages=['lunchboy'], install_requires=['Scrapy'], ...
Python
0
@@ -68,9 +68,9 @@ ='0. -1 +2 ',%0A
f3f2408370e76ec8338bfc1f816ca875c75acf5c
remove ez_setup
setup.py
setup.py
#!/usr/bin/env python import ez_setup ez_setup.use_setuptools() from setuptools import setup, find_packages setup( name='yandextank', version='1.7.7', description='a performance measurement tool', longer_description=''' Yandex.Tank is a performance measurement and load testing automatization tool. It...
Python
0.000014
@@ -20,51 +20,8 @@ on%0A%0A -import ez_setup%0Aez_setup.use_setuptools()%0A%0A from @@ -108,17 +108,17 @@ on='1.7. -7 +8 ',%0A d
60b310d8fbd6b6130b4e8f23d20fc374eee65c74
Bump version
setup.py
setup.py
from setuptools import setup, find_packages version = '0.3.1b1' requires = [ 'setuptools >= 2.2', 'eduid-userdb >= 0.0.5', ] # Flavours webapp_requires = [ 'Flask>=0.12,<0.13', 'pysaml2 >= 4.0.3rc1', # version sync with dashboard to avoid pip catastrophes 'redis >= 2.10.5', 'pwgen == 0.4', ...
Python
0
@@ -56,17 +56,17 @@ '0.3.1b -1 +2 '%0A%0Arequi
785ea363f33551b2751f509bc92af59c9f144094
return setup.py to 0.3.dev
setup.py
setup.py
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst import glob import os import sys import ah_bootstrap from setuptools import setup #A dirty hack to get around some early import/configurations ambiguities if sys.version_info[0] >= 3: import builtins else: import __builtin_...
Python
0.000016
@@ -1479,11 +1479,13 @@ '0. -2.3 +3.dev '%0A%0A#
0abe13f8157dc12e70da4c10149c4ab94dfb2a2e
fix failing test
pyramid_mailer/mailer.py
pyramid_mailer/mailer.py
import smtplib from repoze.sendmail.mailer import SMTPMailer from repoze.sendmail.delivery import DirectMailDelivery from repoze.sendmail.delivery import QueuedMailDelivery class DummyMailer(object): """ Dummy mailing instance, used for example in unit tests. Keeps all sent messages internally in list a...
Python
0.000006
@@ -908,32 +908,60 @@ outbox** list.%0A%0A + :versionadded: 0.3%0A%0A :param m @@ -5351,16 +5351,44 @@ lowed.%0A%0A + :versionadded: 0.3%0A%0A
83b51969d55a81c34cae483d11901fe90e1c2fa9
fix importlib for rtfd
pyrealsense/importlib.py
pyrealsense/importlib.py
# -*- coding: utf-8 -*- # Licensed under the Apache-2.0 License, see LICENSE for details. """This module loads rsutilwrapper and librealsense library.""" import ctypes import sys import os os_name = sys.platform lrs_prefix_mapping = {'darwin': 'lib', 'linux': 'lib', 'linux2': 'lib', 'win32': ''} lrs_suffix_mapping =...
Python
0
@@ -183,16 +183,32 @@ mport os +%0Aimport warnings %0A%0Aos_nam @@ -653,28 +653,8 @@ or:%0A - import warnings%0A @@ -763,15 +763,8 @@ %0A - from . imp
238dd56b20418178ac8b4357ac70491b73b52dda
Add new interface.
pykeg/core/Interfaces.py
pykeg/core/Interfaces.py
""" This library defines a set of interfaces used by parts of the kegbot. In general, the interfaces defined here are nothing more than a well-known class name and one or more function prototypes, which define the interface. Modules wishing to advertise implementation of one or more of these interfaces may do so by s...
Python
0
@@ -2473,28 +2473,110 @@ ise AbstractInterfaceError%0A%0A +class IEventListener:%0A def PostEvent(self, ev):%0A raise AbstractInterfaceError%0A
85ed80a230530daae913ec289466a186238b68a9
Version 1.1.45
setup.py
setup.py
""" The setup package to install the SeleniumBase Test Framework plugins """ from setuptools import setup, find_packages # noqa setup( name='seleniumbase', version='1.1.44', url='http://seleniumbase.com', author='Michael Mintz', author_email='@mintzworld', maintainer='Michael Mintz', desc...
Python
0
@@ -174,17 +174,17 @@ n='1.1.4 -4 +5 ',%0A u
2e5c50039bc91c6de267804ab5374e82cbd3af5a
Fix serial.load to use joblib if available
pylearn2/utils/serial.py
pylearn2/utils/serial.py
import cPickle import pickle import numpy as np import os import time import warnings import sys from pylearn2.utils.string_utils import preprocess from cPickle import BadPickleGet io = None hdf_reader = None def load(filepath, recurse_depth=0): if recurse_depth == 0: filepath = preprocess(filepath) ...
Python
0
@@ -241,16 +241,136 @@ pth=0):%0A + try:%0A import joblib%0A joblib_available = True%0A except ImportError:%0A joblib_available = False%0A if r @@ -1693,35 +1693,73 @@ try:%0A +i f -= +not joblib_available:%0A with open(filepath, @@ -1763,25 +1763,34 @@ h, '...
e4cc67edc7570bfe3ca7cecfa147ed88d79a978d
Version bump.
setup.py
setup.py
import os from setuptools import setup, find_packages VERSION = '0.2' if __name__ == '__main__': setup( name = 'django-tastypie-mongoengine', version = VERSION, description = "MongoEngine support for django-tastypie.", long_description = open(os.path.join(os.path.dirname(__file__)...
Python
0
@@ -63,16 +63,18 @@ N = '0.2 +.1 '%0A%0Aif __
71b7faf519a45de7fc349930cf2d4268e27ae36c
Bump version to 0.8.0
setup.py
setup.py
import os import fnmatch from setuptools import setup, find_packages from codecs import open here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() def schema_files(): '''Return all CSV and JSON files paths in datapack...
Python
0
@@ -1036,17 +1036,17 @@ sion='0. -7 +8 .0',%0A
b0878122e5ef212592a678f61698d726a7f8d768
Fix query string order
post.py
post.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import cgi import sqlite3 import time import config def fs2dict(fs): '''Field strage to dict''' params = {} for k in fs.keys(): params[k] = fs[k].value return params def valid(qs): required_keys = ['title', 'comment', 'posted_by', 'latitude',...
Python
0.999999
@@ -915,16 +915,86 @@ age())%0A%0A + keys = %5B'title', 'comment', 'posted_by', 'latitude', 'longitude'%5D%0A if v @@ -1062,66 +1062,12 @@ in -%5B'latitude', 'longitude', 'title', 'comment', 'posted_by'%5D +keys %5D%0A
084893374cf5a1585f8b7c18747ec8b11e0c0ce4
Update 02-02_cleanse.py
scikit/src/nosql/02-02_cleanse.py
scikit/src/nosql/02-02_cleanse.py
import commons, sys, os import logging as log import pandas as pd import xgboost as xgb import numpy as np from sklearn.externals import joblib from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, f1_score, precision_score, recall_score, classification_report, confusion_matr...
Python
0
@@ -571,16 +571,20 @@ llna(0)%0A + return d
d7a8192c5f1bbb8fc076ceef3a6b835cd37050d8
update classifiers
setup.py
setup.py
#!/usr/bin/env python #from setuptools import setup from setuptools.command.bdist_rpm import bdist_rpm from distutils.core import setup import os try: from sphinx.setup_command import BuildDoc as _BuildDoc class BuildDoc(_BuildDoc): def finalize_options(self): super().finalize_options() ...
Python
0.000002
@@ -1087,9 +1087,9 @@ :: -5 +4 - B @@ -1178,34 +1178,19 @@ :: -GNU General Public +MIT License (GP @@ -1189,14 +1189,8 @@ ense - (GPL) %22,%0A @@ -1438,9 +1438,68 @@ :: -C +Python :: 3%22,%0A %22Programming Language :: Python :: 3.3 %22,%0A @@ -1536,17 +1536,23 @@ : Python -3 + :: 3.4 %22,%...
b3066ad8e5af59d12a8b28f0e6b69e0305535094
edit doc
setup.py
setup.py
from distutils.core import setup setup( name = "nicosearch", py_modules=['nicosearch'], version = "0.0.3", license = open('./LICENSE').read(), download_url = "http://backloglib.googlecode.com/files/backloglib-0.1.1.tar.g://github.com/ymizushi/nicosearch/archive/master.zip", platform...
Python
0
@@ -119,9 +119,9 @@ 0.0. -3 +4 %22,%0A @@ -139,32 +139,21 @@ e = -open('./LICENSE').read() +'MIT License' ,%0A
1102293fd73c4091fd21b011d4e790da6df23031
remove README deps
setup.py
setup.py
# Copyright 2014 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 required by applicable law or agreed to in writing,...
Python
0.000004
@@ -852,76 +852,8 @@ %0A%5D%0A%0A -with open('README.md', 'r') as f:%0A long_description = f.read()%0A%0A%0A def @@ -1243,32 +1243,57 @@ ription= -long_description +'Google Embedded Assistant Sample client' ,%0A ur
588769c12207a01903b7947598e3bef1bd993d8b
Version bump.
setup.py
setup.py
#!/usr/bin/env python import os from setuptools import setup, find_packages try: # Workaround for http://bugs.python.org/issue15881 import multiprocessing except ImportError: pass VERSION = '0.4.1' if __name__ == '__main__': setup( name = 'django-tastypie-mongoengine', version = VER...
Python
0
@@ -204,17 +204,17 @@ = '0.4. -1 +2 '%0A%0Aif __
81c5d5eea267cd35517bae1ed50d4bdeb8b3a62c
clean up interface class
pymba/vimba_interface.py
pymba/vimba_interface.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from . import vimba_structure as structs from .vimba_object import VimbaObject from .vimba_exception import VimbaException from .vimba_dll import VimbaDLL from ctypes import * # interface features are automatically readable as object attributes. class Vi...
Python
0.000001
@@ -1,107 +1,29 @@ -# -*- coding: utf-8 -*-%0Afrom __future__ import absolute_import%0Afrom . import vimba_structure as structs +from ctypes import byref%0A %0Afro @@ -111,25 +111,16 @@ om . -vimba_dll import Vimb @@ -119,108 +119,15 @@ ort -V +v imba -DLL%0Afrom ctypes import *%0A%0A# interface features are a...
440c8e679b5939da0f5e32342440f7151c11bb61
Add checking value of "XWALK_OS_ANDROID" during parsing xwalk deps
tools/generate_gclient-xwalk.py
tools/generate_gclient-xwalk.py
#!/usr/bin/env python # Copyright (c) 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This script is responsible for generating .gclient-xwalk in the top-level source directory from DEPS.xwalk. User-configurable va...
Python
0
@@ -1006,16 +1006,31 @@ )%0A%0A if +os.environ.get( 'XWALK_O @@ -1043,22 +1043,16 @@ OID' - in os.environ +) == '1' :%0A
d1c62e413eeefb105538d5f8b53bc58441951535
change class names to hint their C-library agents
pymmrouting/datamodel.py
pymmrouting/datamodel.py
""" Data adapter for reading and parsing multimodal transportation networks and related abstraction of facilities """ from ctypes import * class Edge(Structure): pass Edge._fields_ = [("mode_id", c_int), ("length", c_double), ("length_factor", c_double), ...
Python
0
@@ -135,9 +135,66 @@ ort -* +Structure, c_int, c_double, c_longlong, POINTER, CFUNCTYPE %0A%0A%0Ac @@ -198,16 +198,17 @@ %0A%0Aclass +C Edge(Str @@ -226,16 +226,17 @@ pass%0A%0A +C Edge._fi @@ -263,32 +263,33 @@ c_int),%0A + @@ -328,32 +328,33 @@ + (%22length_fa...
413f628a750c59cf2ced27738513497adfc779c1
Implement agent deletion.
pynessus/models/agent.py
pynessus/models/agent.py
""" Copyright 2014 Quentin Kaiser Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software dis...
Python
0
@@ -1339,16 +1339,534 @@ return%0A%0A + def delete(self):%0A %22%22%22%0A Delete the agent instance.%0A Params:%0A Returns:%0A %22%22%22%0A if self._server.server_version%5B0%5D == %226%22:%0A response = self._server._api_request(%0A %22DELETE%22,%...
f16195aa8b1569e0260c48d4159b7d2ce0ea2fab
add Top._to_proto convenience function
python/caffe/net_spec.py
python/caffe/net_spec.py
"""Python net specification. This module provides a way to write nets directly in Python, using a natural, functional style. See examples/python_nets/caffenet.py for an example. Currently this works as a thin wrapper around the Python protobuf interface, with layers and parameters automatically generated for the "lay...
Python
0
@@ -3193,16 +3193,127 @@ (self)%0A%0A + def _to_proto(self, layers, names, autonames):%0A return self.fn._to_proto(layers, names, autonames)%0A%0A %0Aclass F @@ -4382,19 +4382,16 @@ inp. -fn. _to_prot @@ -6018,35 +6018,32 @@ top. -fn. _to_proto(layers
3c7758ce4f4ee844212e0dc86e3e35a5ea34d13f
Update setup.py
setup.py
setup.py
from cx_Freeze import setup, Executable build_exe_options = { "bin_includes": [ "libssl.so", "libz.so" ], "bin_path_includes": [ "/usr/lib/x86_64-linux-gnu" ], "include_files": [ ("client/dist", "client"), "LICENSE", "templates", "readme.md" ...
Python
0.000001
@@ -2,17 +2,18 @@ rom -cx_Freeze +setuptools imp @@ -25,239 +25,310 @@ etup -, Executable%0A%0Abuild_exe_options = %7B%0A %22bin_includes%22: %5B%0A %22libssl.so%22,%0A %22libz.so%22 +%0A%0Aclassifiers=%5B%0A %22Programming Language :: Python :: 3.7%22,%0A %22Programming Language :: Python :...
5377d3a817c8a03a205e9557b4614f59e8877416
update Peercoin network parameters
pypeerassets/networks.py
pypeerassets/networks.py
from collections import namedtuple from decimal import Decimal from btcpy.structs.transaction import TxOut from btcpy.structs.script import NulldataScript from pypeerassets.exceptions import UnsupportedNetwork class PeercoinTxOut(TxOut): def get_dust_threshold(self, size_to_relay_fee) -> float: if isi...
Python
0.000001
@@ -1509,10 +1509,11 @@ tes= -80 +256 %0A)%0A%0A @@ -2022,17 +2022,16 @@ cimal(0. -0 01),%0A
707c0a38d6cac6f3f481e8e3c401eee61477a4bf
print diagnostics
scripts/bg_ols_multiprocessing.py
scripts/bg_ols_multiprocessing.py
""" author: Marusa Zerjal 2019 - 07 - 29 Determine background overlaps using means and covariances for both background and stars. Covariance matrices for the background are Identity*bandwidth. Parameters ---------- background_means: [nstars,6] float array_like Phase-space positions of some star set that greatly e...
Python
0.000001
@@ -4272,16 +4272,35 @@ me line%0A + print('Start')%0A time
3d02b8368b6fa43bf66600110c22da323590ec0b
Bump flake8-bugbear from 19.3.0 to 19.8.0
setup.py
setup.py
# -*- coding: utf-8 -*- import codecs import re import sys from setuptools import setup INSTALL_REQUIRES = ["click>=4.0", "click-completion>=0.3.1", "click-didyoumean>=0.0.3"] if "win32" in str(sys.platform).lower(): # Terminal colors for Windows INSTALL_REQUIRES.append("colorama>=0.2.4") EXTRAS_REQUIRE = {...
Python
0.000001
@@ -513,17 +513,17 @@ ear==19. -3 +8 .0; pyth
2dbae58c0b520c3e59f587fafd766b8a39de661b
Make A, not A9 files the default.
python/hxActor/subaru.py
python/hxActor/subaru.py
import logging import multiprocessing import socket import astropy.io.fits as pyfits headerAddr = 'rhodey', 6666 def fetchSeqno(prefix='A9', instrument='CRS'): """ Request frame_id from Gen2. """ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) query = "seqno %s\n" % (prefix) logging.info("s...
Python
0
@@ -133,17 +133,16 @@ refix='A -9 ', instr
6cee45e34feed064f81535b314a29c48a49b7089
fix returned value in fibre for RSS API
python/marvin/api/rss.py
python/marvin/api/rss.py
#!/usr/bin/env python # encoding: utf-8 # # rss.py # # Licensed under a 3-clause BSD license. # # Revision history: # 11 Apr 2016 J. Sánchez-Gallego # Initial version from __future__ import division from __future__ import print_function from flask import jsonify from flask_classy import route from marvin....
Python
0
@@ -5787,20 +5787,21 @@ = fiber. -flux +value .tolist(
b31f6cc920a99fe4e4d17f823d4e2b24f7ea7e6a
bump version
setup.py
setup.py
#!/usr/bin/env python from distutils.command.install import INSTALL_SCHEMES from os.path import dirname, join, abspath from setuptools import setup from setuptools.command.install import install for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] setup_args = { 'cmdclass': {'install':...
Python
0
@@ -367,17 +367,17 @@ ': %220.1. -0 +3 %22,%0A '
7d97f7e6d7c467fda4b2aea4d028ee376f9c71d3
Bump version.
setup.py
setup.py
from distutils.core import setup setup(name='pyrc', version='0.6.0', description='Simple, clean Python IRC library', author='David Peter', author_email='david.a.peter@gmail.com', url='http://github.com/sarenji/pyrc', packages=['pyrc', 'pyrc/utils'], classifiers=[ 'Opera...
Python
0
@@ -64,17 +64,17 @@ on='0.6. -0 +1 ',%0A
0e2593f863b56ffeb4df4e8fbec9d5d7866574de
Remove unused code
pysswords/db/database.py
pysswords/db/database.py
import fnmatch import os import re import yaml from pysswords.crypt import create_keyring, getgpg, is_encrypted from .credential import ( Credential, CredentialNotFoundError, CredentialExistsError, content, expandpath, exists, clean, asstring ) from pysswords.python_two import makedirs...
Python
0.000006
@@ -2132,75 +2132,8 @@ in)%0A - if not found:%0A raise CredentialNotFoundError()%0A%0A @@ -3008,75 +3008,8 @@ in)%0A - if not found:%0A raise CredentialNotFoundError()%0A%0A
4ed7c876e825b6fa28d31ed257ecbd0023cff605
handle missing db
pytest_cagoule/select.py
pytest_cagoule/select.py
from itertools import chain import os import re import sqlite3 import six from . import DB_FILE spec_re = re.compile( r'(?P<filename>[^:]+)(:(?P<start_line>\d+))?(-(?P<end_line>\d+))?' ) def parse_spec(spec): match = spec_re.match(spec) if match is None: return [] matches = match.groupdict(...
Python
0.000014
@@ -2063,16 +2063,71 @@ urn %5B%5D%0A%0A + if not os.path.exists(DB_FILE):%0A return %5B%5D%0A%0A conn
91b7b88e8659d80ecc49c0e4c86ce0935a785b3b
Version 0.2
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) setup(name='vscode-launcher-tray', version='0.1.0', description='A system tray tool to launch Visual Studio code quickly.', author='Yan-ren Tsai',...
Python
0.000001
@@ -205,9 +205,9 @@ ='0. -1 +2 .0',
30423ad07fa5613eecfe140364aa6c2c3a0f94cd
Fix import.
cumulusci/utils/yaml/tests/test_model_parser.py
cumulusci/utils/yaml/tests/test_model_parser.py
from io import StringIO from unittest.mock import Mock import pytest from cumulusci.utils.yaml.model_parser import ( CCIDictModel, CCIModel, ValidationError, Field, ) class Foo(CCIModel): bar: str = None fields_ = Field([], alias="fields") class Document(CCIModel): __root__: Foo class...
Python
0
@@ -168,20 +168,36 @@ or,%0A - +)%0Afrom pydantic import Field -,%0A) %0A%0A%0Ac
b3890ace8f1f6d849e8bd6b01465b3388629335b
add aes param
toughradius/manage/webserver.py
toughradius/manage/webserver.py
#!/usr/bin/env python #coding:utf-8 import sys import os import time import importlib import cyclone.web from twisted.python import log from twisted.internet import reactor from mako.lookup import TemplateLookup from sqlalchemy.orm import scoped_session, sessionmaker from toughlib import logger, utils, dispatch from to...
Python
0.000001
@@ -4534,16 +4534,30 @@ f.mcache +, aes=self.aes ))%0A
6c1750336e09e6ed2a48413aedc1142d8d7dd39f
Remove font tag.
machines/stealth.py
machines/stealth.py
# coding: utf-8 from pcounter import pcounter, util COUNT_INDEX_STEALTH_CHANCETIME = pcounter.COUNT_INDEX.USER def init(): return pcounter.ICounter("stealth", switchon_handler, switchoff_handler, output_handler) def switchon_handler(cbit...
Python
0
@@ -174,17 +174,16 @@ handler, - %0A @@ -1717,18 +1717,16 @@ CE%5D, 2), - %0A 'bo @@ -1796,17 +1796,16 @@ LCOUNT%5D, - %0A @@ -2379,136 +2379,21 @@ urn -''.join((%0A '%3Cspan font-desc=%22Sui Generis Regular 12%22%3E',%0A gamecount_fmt, %0A '%3C/span%3E'%0A ...
b8d377f564d3d650048bc4b20a231a280de92cfe
Update setup
setup.py
setup.py
#! /usr/bin/env python # # Copyright (C) 2015-2016 Jacob Graving <jgraving@gmail.com> import os # temporarily redirect config directory to prevent matplotlib importing # testing that for writeable directory which results in sandbox error in # certain easy_install versions os.environ["MPLCONFIGDIR"] = "." DESCRIPTION ...
Python
0.000001
@@ -819,22 +819,35 @@ = ' -BSD (3-clause) +Apache Software License 2.0 '%0ADO @@ -2980,11 +2980,23 @@ :: -BSD +Apache Software Lic
3451498e718c59349f7ba91bf9f8cec19f202484
Fix typo
warpq.py
warpq.py
""" WARP-Q: Quality Prediction For Generative Neural Speech Codecs This code is to run the WARP-Q speech quality metric described in our papers: [1] W. A. Jassim, J. Skoglund, M. Chinen, and A. Hines, “Speech quality assessment with WARP‐Q: From similarity to subsequence dynamic time warp cost,” IET Sig...
Python
0.999999
@@ -6849,32 +6849,33 @@ ompute quality s +c ores...%22)%0D%0A @@ -7257,20 +7257,22 @@ in(args)%0D%0A %0D%0A +%0D%0A
5da10d6e9916af224acfaa5150a0c151d4af42f9
version 0.4.1 bump
setup.py
setup.py
#!/usr/bin/env python import os from setuptools import setup from setuptools.command.install import install LONG_DESCRIPTION = "" with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f: LONG_DESCRIPTION = f.read() setup( name='shadho', version='0.4.1', description='Hyperparameter o...
Python
0
@@ -280,9 +280,9 @@ 0.4. -1 +2 ',%0A
ec4bbc6c6b766ac1c530cf3f1b4ebab40c60fe01
Update instrument.py
fx_collect/instrument.py
fx_collect/instrument.py
class InstrumentAttributes(object): def __init__( self, broker, instrument, time_frames, market_status, last_update, utc_now, wk_str, wk_end ): # Start of Trading Week self.utc_now = utc_now self.wk_str = wk_str self.wk_end = wk_end self.str_hour = wk_str....
Python
0
@@ -986,17 +986,16 @@ def -_ update_d
c2be940ea7c0a11bc0ffb5660d5f902bbaee29d6
Fix closure binding problem
patchboard/resource.py
patchboard/resource.py
# resource.py # # Copyright 2014 BitVault. from __future__ import print_function import json from action import Action from exception import PatchboardError class ResourceType(type): """A metaclass for resource classes.""" # Must override to supply default arguments def __new__(cls, name, patchboard...
Python
0.000002
@@ -1916,24 +1916,58 @@ e, action)%0A%0A + def bind(action):%0A @@ -1986,32 +1986,36 @@ n(self, *args):%0A + @@ -2058,16 +2058,49 @@ , *args) +%0A return action_fn %0A%0A @@ -2124,25 +2124,28 @@ , name, +bind( action -_fn +) )%0A%0A
cd3711cf8e7d34085544f7f622bb77fb89072a4d
make websockets respect listening address and port
pywebdlmon/controller.py
pywebdlmon/controller.py
#!/usr/bin/env python import json import os.path from twisted.python import log from twisted.web import server from twisted.web.static import File as StaticFile from txroutes import Dispatcher from autobahn.websocket import WebSocketServerFactory from mako import exceptions from pywebdlmon.model import UnknownIns...
Python
0
@@ -853,21 +853,45 @@ s:// -0.0.0.0:6999%22 +%25s:%25d%22 %25 (cfg.bind_address, cfg.port) )%0A
5cbc61943b3488719c3e0de2596ce64458935538
add include_package_data to setup.py
setup.py
setup.py
from os.path import join, dirname with open(join(dirname(__file__), 'scrapyd/VERSION')) as f: version = f.read().strip() setup_args = { 'name': 'Scrapyd', 'version': version, 'url': 'https://github.com/scrapy/scrapyd', 'description': 'A service for running Scrapy spiders, with an HTTP API', 'l...
Python
0.000001
@@ -554,24 +554,58 @@ /scrapyd'%5D,%0A + 'include_package_data': True,%0A 'classif
d15f7314f7c899b4c91532a07604a6728bc8d45d
Drop support for Python 3.4
setup.py
setup.py
#!/usr/bin/env python from __future__ import print_function import os import subprocess import sys import contextlib from distutils.command.build_ext import build_ext from distutils.sysconfig import get_python_inc from distutils import ccompiler, msvccompiler try: from setuptools import Extension, setup except Imp...
Python
0.000002
@@ -4460,65 +4460,8 @@ 7',%0A - 'Programming Language :: Python :: 3.4',%0A
ab1ed886552ed737e6da3373e80a1e0c4c319cac
Disable Main File Feature
director/projects/templatetags/source_extras.py
director/projects/templatetags/source_extras.py
import typing from os.path import splitext from django import template from django.urls import reverse from lib.google_docs_facade import build_google_document_url from projects.project_models import Project from projects.source_item_models import DirectoryListEntry, DirectoryEntryType from projects.source_models imp...
Python
0.000037
@@ -2865,32 +2865,97 @@ g.Any) -%3E bool:%0A + return False # TODO: Main File Feature is disabled for now%0A%0A if not isins
fe3f75d20f215230e4c02f40b97b634cb468a096
Fix indexing in format
python/compare_recon1.py
python/compare_recon1.py
#!/usr/bin/env python import glob import hashlib import os import sys import tempfile import tarfile import subprocess import shutil VOL_DIRS = ['mri', 'mri/orig', 'mri/tranforms'] SURFACE_DIRS = ['surf'] VOLUMES = ['rawavg.mgz', 'orig.mgz', 'nu.mgz', 'T1.mgz', 'brainmask.mg...
Python
0.99961
@@ -1692,17 +1692,17 @@ %22and %7B -1 +0 %7D differ
a6effe7080fb66f7bd4e930727ed5d1ecff21523
Fix setup requirements to not contain transitional dependencies and exact versions
setup.py
setup.py
from setuptools import setup from pytui.settings import VERSION setup( name='pytest-ui', description='Text User Interface for running python tests', version=VERSION, license='MIT', platforms=['linux', 'osx', 'win32'], packages=['pytui'], url='https://github.com/martinsmid/pytest-ui', ...
Python
0
@@ -515,141 +515,32 @@ ' -attrs==17.4.0',%0A 'future==0.16.0',%0A 'pluggy==0.6.0',%0A 'py==1.5.2',%0A 'pytest==3.4.1',%0A 'six==1.11.0 +future',%0A 'pytest ',%0A @@ -556,15 +556,8 @@ blib -==1.3.2 ',%0A @@ -573,15 +573,8 @@ rwid -==2.0.1 ',%0A
131cead153dd29cacf03fbf841f26fc85482b57c
Set version redactor 0.2 on setup file
setup.py
setup.py
#!/usr/bin/env python # -*- coding:utf-8 -*- from setuptools import setup, find_packages import opps install_requires = ["Django==1.5", "south>=0.7", "Pillow==1.7.8", "thumbor==3.7.1", "django-tagging==0.3.1", "djan...
Python
0
@@ -360,16 +360,21 @@ redactor +==0.2 %22%5D%0A%0Aclas
f99728387b87787f7f05b9878cd85c8128461d3f
remove previous builds
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import codecs import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command here = os.path.abspath(os.path.dirname(__file__)) with codecs.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = '\n' + f...
Python
0
@@ -1155,32 +1155,200 @@ def run(self):%0A + try:%0A self.status('Removing previous builds%E2%80%A6')%0A rmtree(os.path.join(here, 'deb_dist'))%0A except FileNotFoundError:%0A pass%0A self.sta
0aee4834970714c399f1375830400ff66104bd92
fix setup.py
setup.py
setup.py
#!/usr/bin/env python import os import re import sys from codecs import open from setuptools import setup from setuptools.command.test import test as TestCommand here = os.path.abspath(os.path.dirname(__file__)) class PyTest(TestCommand): user_options = [('pytest-args=', 'a', "Arguments to pass into py.test")]...
Python
0.000001
@@ -781,14 +781,56 @@ ist -upload +bdist_wheel')%0A os.system('twine upload dist/* ')%0A
72e4efe764dfcb85b633e59fbebd3aa82a95f6de
Use setuptools.
setup.py
setup.py
from distutils.core import setup from sentinel import __version__ as VERSION from codecs import open with open('README.rst', encoding='UTF-8') as readme: long_description = readme.read() setup( name='sentinel', version=VERSION, url='https://github.com/eddieantonio/sentinel', license='MIT', aut...
Python
0
@@ -2,22 +2,18 @@ rom -distutils.core +setuptools imp
85cf93e99c78c3091e8a19b34338db90fba01773
set default # of hts to 2
python/khmer/__init__.py
python/khmer/__init__.py
__version__ = "0.2" import _khmer from _khmer import new_ktable from _khmer import new_hashtable from _khmer import _new_hashbits from _khmer import new_readmask from _khmer import new_minmax from _khmer import consume_genome from _khmer import forward_hash, forward_hash_no_rc, reverse_hash from _khmer import set_repo...
Python
0.000003
@@ -521,17 +521,17 @@ _tables= -8 +2 ):%0A p @@ -605,121 +605,8 @@ mes%0A -# primes = %5B 22906493, 22906519, 22906561, 22906567,%0A# 22906619, 22906649, 22906657, 22906661 %5D%0A
1bfb63c704ae9d947310c8f0f8250ef43aae6217
Update setup.py
setup.py
setup.py
from setuptools import setup import rainwaveclient setup( name='python-rainwave-client', version=rainwaveclient.__version__, author=rainwaveclient.__author__, author_email='william@subtlecoolness.com', url='https://gutter.readthedocs.org/', description='Python Rainwave client library', pac...
Python
0.000001
@@ -235,30 +235,54 @@ ://g -utter.readthedocs.org/ +ithub.com/williamjacksn/python-rainwave-client ',%0A @@ -308,17 +308,8 @@ hon -Rainwave clie @@ -318,16 +318,29 @@ library + for Rainwave ',%0A p
32c4ac486ded1ef4d4e37f182072bb1a3350db0c
Update 1.1 -> 1.2
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages import os def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name='junit-xml', author='Brian Beyer', author_email='brian@kyr.us', url='https://github.com/kyrus/python-junit-xml', license='MIT', packages=find...
Python
0.000003
@@ -476,17 +476,17 @@ on = %221. -1 +2 %22,%0A%09clas