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
fb9b1c93fa92e14d9a3e581b7884354ad59ce996
update setup to fix an issue when pyquickhelper is not here
setup.py
setup.py
# -*- coding: utf-8 -*- import sys import os from distutils.core import setup from setuptools import find_packages ######### # settings ######### project_var_name = "pymyinstall" sversion = "0.9" versionPython = "%s.%s" % (sys.version_info.major, sys.version_info.minor) path = "Lib/site-packages/" + project_var_name...
Python
0
@@ -1829,24 +1829,125 @@ n sys.argv:%0A + try:%0A import_pyquickhelper()%0A except ImportError:%0A return False%0A retu @@ -4172,24 +4172,67 @@ n sys.argv:%0A + pyquickhelper = import_pyquickhelper()%0A pyquickh
d54794e71969b711a6aea3cbbf13ff43d202cffa
bump version number to 1.5.0
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from codecs import open from os import path from paystack.version import VERSION here = path.abspath(path.dirname(__file__)) print(here) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: ...
Python
0.000048
@@ -17,17 +17,16 @@ f-8 -*-%0A -%0A from set @@ -1545,17 +1545,17 @@ r_email= -%22 +' bernardo @@ -1570,12 +1570,28 @@ mail.com -%22 +'.encode('utf-8') %0A)%0A
07e1deb781659c080813e54ca8fd07325f89312f
fix vertica error message handling
setup.py
setup.py
from setuptools import setup setup( name='sqlalchemy-vertica-python', version='0.1.0', description='Vertica dialect for sqlalchemy using vertica_python', long_description=open("README.rst").read(), license="MIT", url='https://github.com/LocusEnergy/https://github.com/LocusEnergy/sqlalchemy-vert...
Python
0
@@ -81,25 +81,25 @@ ersion='0.1. -0 +1 ',%0A descr @@ -271,39 +271,8 @@ rgy/ -https://github.com/LocusEnergy/ sqla @@ -384,17 +384,17 @@ all/0.1. -0 +1 ',%0A a
9797444682ad456d1fba2516e6ed9db0a0fef62f
Modify setup script to exclude NLTK for Python 3
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup script for RYMTracks. """ from distutils.command.install_data import install_data from sys import version_info as python_version from setuptools import setup, find_packages, Command from setuptools.command.install import install ################################...
Python
0
@@ -75,16 +75,18 @@ ks.%0A%22%22%22%0A +%0A%0A from dis @@ -133,17 +133,16 @@ ll_data%0A -%0A from sys @@ -227,17 +227,8 @@ ages -, Command %0Afro @@ -358,446 +358,8 @@ #%0A%0A%0A -REQUIREMENTS = %5B%0A %22tornado==3.2%22,%0A %22beautifulsoup4==4.3.2%22,%0A %22lxml==3.3.0%22,%0A %22isodate==0.4.9%22,...
6afe13e3a259505e55c5a34a790c8f77efb1bedc
Add python-3.7 to setup.py; remove python 3.4
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup # Dynamically calculate the version based on modeltranslation.VERSION. version = __import__('modeltranslation').get_version() setup( name='django-modeltranslation', version=version, description='Translates Django models using a registration approach....
Python
0.000155
@@ -1538,57 +1538,8 @@ 3',%0A - 'Programming Language :: Python :: 3.4',%0A @@ -1632,16 +1632,65 @@ : 3.6',%0A + 'Programming Language :: Python :: 3.7',%0A
f36a977d59087c5f34278168ce285258cc4865f1
Version bump to 1.0.0
setup.py
setup.py
#!/usr/bin/env python2 #Copyright (C) 2014, Cameron Brandon White # -*- coding: utf-8 -*- import setuptools import textwrap if __name__ == "__main__": setuptools.setup( name="Flask-CAS", version="0.5.1", description="Flask extension for CAS", author="Cameron Brandon White", ...
Python
0
@@ -215,13 +215,13 @@ on=%22 -0.5.1 +1.0.0 %22,%0A
7fe3001030075f825a2274fdd336a4dd0834e078
Prepare openprocurement.auctions.dgf 1.0.5.
setup.py
setup.py
from setuptools import setup, find_packages import os version = '1.0.4' entry_points = { 'openprocurement.auctions.core.plugins': [ 'auctions.dgf = openprocurement.auctions.dgf:includeme' ] } requires = [ 'setuptools', 'openprocurement.api', 'openprocurement.auctions.core', 'openprocu...
Python
0
@@ -67,9 +67,9 @@ 1.0. -4 +5 '%0A%0Ae
158c8e5625659ddb0f98b7fa847143544925720e
Bump version to 0.1.16
setup.py
setup.py
from setuptools import find_packages, setup version = '0.1.15' setup( name='django-colorfield', packages=find_packages(), include_package_data=True, license='MIT License', version=version, description='A small app providing a colorpicker field for django', long_description='A small app pro...
Python
0.000007
@@ -58,9 +58,9 @@ .1.1 -5 +6 '%0A%0As
3dd48e878c7c79210d23f4880f9a07a712297f9d
Add requirement
setup.py
setup.py
from distutils.core import setup setup( name = 'afkmc2', packages = ['afkmc2'], version = '0.1', description = 'Assumption Free and Efficient K-Means Seeding', author = 'Adrian Goedeckemeyer', author_email = 'adrian@minerva.kgi.edu', url = 'https://github.com/adriangoe/afkmc2', download_url = 'https://g...
Python
0.000001
@@ -437,9 +437,50 @@ s = %5B%5D,%0A + install_requires=%5B%0A %22numpy%22,%0A %5D,%0A )
ffca159de5f822440f52ff45ca6d037f578b5764
Remove strict deps.
setup.py
setup.py
from io import open from setuptools import setup classifiers = '''\ Framework :: Django Environment :: Web Environment Intended Audience :: Developers Topic :: Internet :: WWW/HTTP License :: OSI Approved :: Apache Software License Development Status :: 5 - Production/Stable Natural Language :: English Programming La...
Python
0.000001
@@ -1508,15 +1508,8 @@ ango - %3E= 1.3 ',%0A @@ -1524,17 +1524,8 @@ lxml - %3E= 2.3.5 ',%0A @@ -1554,15 +1554,8 @@ tags - %3E= 0.4 ',%0A @@ -1580,16 +1580,10 @@ conf - %3E= 0.6 ' +, %0A
e32247f678ab11f9b694343912cf3e95fcb576d5
Version in setup.py set to 2.0.0.
setup.py
setup.py
""" ******************************************************************************** * Name: setup.py * Author: Nathan Swain * Created On: 2014 * Copyright: (c) Brigham Young University 2014 * License: BSD 2-Clause ******************************************************************************** """ import os from setup...
Python
0
@@ -608,14 +608,8 @@ .0.0 -.alpha '%0A%0As
7e8cafbe9df3827cecad90bb23bf326855884dd9
version updated, v0.1.0
setup.py
setup.py
import os try: from setuptools import setup except ImportError: from distutils.core import setup description = 'MVC Web Application Framework with Tornado.' if os.path.exists('README.txt'): long_description = open('README.md').read() else: long_description = description setup( name='dp-tornado',...
Python
0.000001
@@ -329,19 +329,19 @@ sion=%220. -0.9 +1.0 %22,%0A u
7eb26159f633c0b8138e1c3f9031c168aecf4e94
Bump version for release
setup.py
setup.py
# coding=utf-8 import multiprocessing # avoid crash on teardown from setuptools import setup, find_packages with open('README.md') as f: readme = f.read() setup( name='devpi-plumber', version='0.1.0dev', packages=find_packages(exclude=['tests']), author='Stephan Erb', author_email='stephan.e...
Python
0
@@ -207,19 +207,16 @@ n='0.1.0 -dev ',%0A p
efe28fd251a399229156d1a0a1d2abf96dc288fe
Bump requests from 2.5.1 to 2.20.0
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup( name='Scrapper', version='0.9.5', url='https://github.com/Alkemic/scrapper', license='MIT', author='Daniel Alkemic Czuba', author_email='alkemic7@gmail.com', description='Scrapper is small, Python web scraping library', py_modul...
Python
0.00003
@@ -451,11 +451,12 @@ = 2. -5.1 +20.0 ',%0A
12b06b1caf655e3fc06e1f001b06aab554526dc2
Remove quantum CLI console script.
setup.py
setup.py
try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages import sys import os import subprocess from quantum import version def run_git_command(cmd): output = subprocess.Popen(["/bin/sh", ...
Python
0
@@ -2905,57 +2905,8 @@ n',%0A - 'quantum = quantum.client.cli:main',%0A
9863ea0c6e637551f538d076df6ee34a205115bb
bump version
setup.py
setup.py
# coding: utf-8 from setuptools import setup import os setup(name='django-test-without-migrations', version='0.1', description='Disable migrations when running your Django tests.', long_description=open(os.path.join(os.path.dirname(__file__), "README.rst")).read(), author="Henrique Bastos", au...
Python
0
@@ -116,9 +116,9 @@ ='0. -1 +2 ',%0A
7eb555f166790bd89f9a58e0b8c54e9a3f87943f
Add cupy.cuda.memory_hooks in setup.py
setup.py
setup.py
#!/usr/bin/env python import os from setuptools import setup import sys import cupy_setup_build if sys.version_info[:3] == (3, 5, 0): if not int(os.getenv('CUPY_PYTHON_350_FORCE', '0')): msg = """ CuPy does not work with Python 3.5.0. We strongly recommend to use another version of Python. If you want ...
Python
0.000001
@@ -1116,16 +1116,56 @@ .cuda',%0A + 'cupy.cuda.memory_hooks',%0A
aca3cadb0da202e9b2ccb499a1662a6291b50985
fix packages
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name='Evergreen', version='1.0', description='Lightweight Django CMS', author='Craig Sander', author_email='csander@centriole-solutions.com', url='', packages=['evergreen'], )
Python
0.000001
@@ -257,17 +257,24 @@ s=%5B' -evergreen +website', 'utils '%5D,%0A
428b333dbb937808c42cc01050b280b6f17cafce
Tidy setup.py (#376)
setup.py
setup.py
from __future__ import absolute_import import codecs import os import re from setuptools import setup def get_version(filename): with codecs.open(filename, 'r', 'utf-8') as fp: contents = fp.read() return re.search(r"__version__ = ['\"]([^'\"]+)['\"]", contents).group(1) version = get_version(os.p...
Python
0.000003
@@ -1015,62 +1015,53 @@ rds= +%5B 'django - cors middleware rest api',%0A platforms=%5B'any +', 'cors', 'middleware', 'rest', 'api '%5D,%0A
6f4ba0b77913bc246e576d2c5b97662f8f38c00a
Add classifiers for python versions to setup.py
setup.py
setup.py
from __future__ import with_statement import sys, os, glob, subprocess, shutil from distutils import ccompiler, sysconfig from setuptools import setup, Extension USE_CYTHON = False # is this a repository if not os.path.isfile("_proj.c"): # no _proj.c, repository USE_CYTHON = True ext = '.pyx' if USE_CYTHON e...
Python
0.000001
@@ -5493,16 +5493,460 @@ roved%22,%0A + %22Programming Language :: Python :: 2%22,%0A %22Programming Language :: Python :: 2.6%22,%0A %22Programming Language :: Python :: 2.7%22,%0A %22Programming Language :: Python :: 3%22,%0A ...
0b3b5252e1b3487af732a8666b3bdc2e7035fef5
Version bump
setup.py
setup.py
#!/usr/bin/python # # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
Python
0.000001
@@ -720,16 +720,18 @@ ion='0.2 +.1 ',%0A d
c3bc84c53eec528cb6aa97bc1f3b6cab40f9bd89
version bump
setup.py
setup.py
from distutils.core import setup from setuptools import find_packages setup( name='wolverine', version='0.1.3', packages=find_packages(), url='http://github.com/drankinn/wolverine', license='MIT 2.0', author='Lance Andersen', author_email='techlance@gmail.com', description='micro servic...
Python
0.000001
@@ -110,17 +110,17 @@ on='0.1. -3 +4 ',%0A p
9a943f370f23b854f4ad653f8511800e64066ca5
Bump version.
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name='django-composite-field', version='0.1', description='CompositeField implementation for Django', keywords='django composite field', author='Michael P. Jung', author_email='mpjung@terreon.de', url='http://bitbucket.or...
Python
0
@@ -108,9 +108,9 @@ ='0. -1 +2 ',%0A
6ec571316e7694699189bdd2e7bd0bb9cbe99f6e
Bump sphinx from 5.1.1 to 5.2.2
setup.py
setup.py
import re from setuptools import find_packages, setup INSTALL_REQUIRES = ("marshmallow>=3.0.0", "SQLAlchemy>=1.3.0", "packaging>=21.3") EXTRAS_REQUIRE = { "tests": ["pytest", "pytest-lazy-fixture>=0.6.2"], "lint": ["flake8==5.0.4", "flake8-bugbear==22.9.23", "pre-commit~=2.0"], "docs": ["sphinx==5.1.1", "...
Python
0.000002
@@ -310,11 +310,11 @@ ==5. -1.1 +2.2 %22, %22
3c90de9e2d2df953c63f22fd03e2d401c596ab7d
version bump
setup.py
setup.py
from setuptools import setup, find_packages setup( name='imhotep', version='0.3.1', packages=find_packages(), url='https://github.com/justinabrahms/imhotep', license='MIT', author='Justin Abrahms', author_email='justin@abrah.ms', description='A tool to pipe linters into code review', ...
Python
0.000001
@@ -84,11 +84,11 @@ ='0. -3.1 +4.0 ',%0A
446d19e6e63e110b10cccbe3407cbd86205f2101
bump version number
setup.py
setup.py
try : from setuptools import setup except ImportError : from distutils.core import setup setup ( name = 'sak' , version = '0.4.2' , description = 'Swiss Army Knife', long_description = 'sak is a module, submodule and function based tool' , author = 'aureooms' , author_email = 'aurelien.ooms@gmail.com' , url ...
Python
0.000004
@@ -126,11 +126,11 @@ '0. -4.2 +5.0 ' ,%0A
047108836154ad9153ae009c8a0576329547a8bf
Update version from 0.4.1 to 0.4.2.
setup.py
setup.py
from setuptools import setup, find_packages dependencies = [] long_description = """A Python library that parses different mesh format files into a Python dict ready for consumption by other libraries. """ setup(name=u'meshparser', version='0.4.1', description='A Small Python library for parsing files t...
Python
0
@@ -252,9 +252,9 @@ 0.4. -1 +2 ',%0A
99356f01c38fe09dc084ad3f54cfdf3beaca63b5
change packages to py_modules
setup.py
setup.py
from setuptools import setup setup(name='parmap', version='0.1', description='Simple parallel map implementation for Python.', author='Giuliano Mega', author_email='mega@spaziodati.eu', packages=['parmap'], license="LICENSE", install_requires=[ "multiprocessing >= 2....
Python
0.000001
@@ -215,13 +215,15 @@ p -ackag +y_modul es=%5B
09c5d6fd0def4fbd909565a5dffb61a04dc0ec86
Update version to 0.1.25
setup.py
setup.py
#!/usr/bin/env python import os import sys from setuptools import setup PACKAGES = [ 'edxval', 'edxval.migrations', 'edxval.tests', ] def is_requirement(line): """ Return True if the requirement line is a package requirement; that is, it is not blank, a comment, or editable. """ # Re...
Python
0
@@ -1046,9 +1046,9 @@ .1.2 -4 +5 '%0A%0Ai
0f0c42b0d61fb0a3693fc20cd0152128c097a905
add missing demands requirements
setup.py
setup.py
from setuptools import setup, find_packages setup( name="uopbmoh-hub", version="0.1", url='http://github.com/westerncapelabs/uopbmoh-hub', license='BSD', author='Western Cape Labs', author_email='devops@westerncapelabs.com', packages=find_packages(), include_package_data=True, insta...
Python
0.010471
@@ -780,24 +780,49 @@ rm==3.2.1',%0A + 'demands==3.0.0'%0A %5D,%0A c
0a6fb1fe9dfefbb3a1c9581f80a2147c9817db3e
Update release docs
setup.py
setup.py
""" To upload a new version: 1. make clean 2. git tag a new version: git tag v1.x.x 3. python setup.py sdist 4. python setup.py sdist register upload Note in binary files (`data_files`) from `setup()` below: - When you do `python setup.py install` it will place the binary files (`word2vec`, `word2phrase`, ...) in: `$...
Python
0
@@ -26,23 +26,10 @@ on:%0A +%0A 1 -. make clean%0A2 . gi @@ -68,73 +68,202 @@ x.x%0A -3. python setup.py sdist%0A4. python setup.py sdist register upload +2. git push%0A3. TravisCI and Appveyor build Wheels for Linux OS X and Windows%0A4. Download the wheels and put into %60$(pwd)/dist%60%0A5. Build tar file: %60py...
f3838ac01face8bece084f551481ad4c3a23ac6a
Fix Configurable to look for kwargs in entire MRO
edgedb/lang/common/config/configurable.py
edgedb/lang/common/config/configurable.py
## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## from .cvalue import cvalue, _no_default __all__ = 'ConfigurableMeta', 'Configurable' class ConfigurableMeta(type): def __new__(mcls, name, bases, dct): dct['__sx_configurable__'] = True return super()._...
Python
0
@@ -87,16 +87,32 @@ s.%0A##%0A%0A%0A +import inspect%0A%0A from .cv @@ -1360,39 +1360,8 @@ s__%0A - dct = cls.__dict__%0A @@ -1380,16 +1380,16 @@ op = %5B%5D%0A + %0A @@ -1518,141 +1518,55 @@ -try:%0A dct_val = dct%5Bname%5D%0A except KeyError:%0A ...
f3655b52aabfd139ea3e0f5dff79f01fcdd0a62b
Use NavigationToolbar2QT on plot dialog
CDJSVis/plotting/plotDialog.py
CDJSVis/plotting/plotDialog.py
""" Plot dialog. @author: Chris Scott """ import sys import traceback import logging from PySide import QtGui, QtCore import matplotlib matplotlib.use("Qt4Agg") matplotlib.rcParams["backend.qt4"] = "PySide" from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.bac...
Python
0
@@ -352,19 +352,16 @@ olbar2QT -Agg as Navi
3f850922436869a8fcff4d3acc9201831b55d49f
Improve readability.
new_project_dialog.py
new_project_dialog.py
import os import wx from file_picker import DirPicker class NewProjectDialog(wx.Dialog): def __init__(self, parent, path=""): style = wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER wx.Dialog.__init__(self, parent, title="New Project", style=style) self.text_name = wx.TextCtrl(self, size=(380, -...
Python
0.000021
@@ -258,16 +258,17 @@ =style)%0A +%0A @@ -369,16 +369,17 @@ e=path)%0A +%0A @@ -770,32 +770,33 @@ ENTRE_VERTICAL)%0A +%0A btnsizer @@ -1011,24 +1011,25 @@ r.Realize()%0A +%0A size @@ -1265,16 +1265,17 @@ Focus()%0A +%0A @@ -1307,18 +1307,16 @@ I, self. -__ OnUpdate...
4bb59771d70d4fcd916820554eaaeb70a32b2331
Set DE Name and CustomerKey to avoid extra traffic
news/backends/sfmc.py
news/backends/sfmc.py
from functools import wraps from time import time from django.conf import settings from django_statsd.clients import statsd from FuelSDK import ET_Client, ET_DataExtension_Row, ET_TriggeredSend from news.backends.common import NewsletterException, NewsletterNoResultsException def assert_response(resp): if not ...
Python
0
@@ -1702,16 +1702,27 @@ merKey = + row.Name = de_name
e022553060b02008791165078516c529859b762f
Fix testGuestModeEnabled by adding missing import
chrome/test/functional/chromeos_device_policy.py
chrome/test/functional/chromeos_device_policy.py
# Copyright (c) 2012 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 pyauto_functional # Must come before pyauto (and thus, policy_base). import policy_base class ChromeosDevicePolicy(policy_base.PolicyTestBase):...
Python
0.00001
@@ -160,16 +160,32 @@ file.%0A%0A +import logging%0A%0A import p @@ -2843,33 +2843,34 @@ _CheckGuestMode -V +Av ailableInAccount @@ -4095,33 +4095,34 @@ ._CheckGuestMode -V +Av ailableInAccount @@ -4354,9 +4354,10 @@ Mode -V +Av aila
28b62491218c20303268187f3d65602ab20868a5
Add detailed comments for methods
automated-actions/AWS_RISK_CREDENTIALS_EXPOSED/lambda_functions/lookup_cloudtrail_events.py
automated-actions/AWS_RISK_CREDENTIALS_EXPOSED/lambda_functions/lookup_cloudtrail_events.py
import datetime import collections import boto3 cloudtrail = boto3.client('cloudtrail') def lambda_handler(event, context): account_id = event['account_id'] time_discovered = event['time_discovered'] username = event['username'] deleted_key = event['deleted_key'] endtime = datetime.datetime.now()...
Python
0
@@ -313,17 +313,68 @@ me.now() + # Create start and end time for CloudTrail lookup %0A - inte @@ -976,16 +976,539 @@ dtime):%0A + %22%22%22 Retrieves detailed list of CloudTrail events that occured between the specified time interval.%0A%0A Args:%0A username (string): Username to lookup CloudTrail...
0c5c31490e699061dce1f796516c17620830c620
fix job private jobs (#11142)
batch/batch/cloud/azure/driver/resource_manager.py
batch/batch/cloud/azure/driver/resource_manager.py
from typing import Optional, Dict, List, Tuple import aiohttp import logging import dateutil.parser from hailtop.aiocloud import aioazure from ....file_store import FileStore from ....driver.resource_manager import (CloudResourceManager, VMDoesNotExist, VMState, UnknownVMStat...
Python
0
@@ -5907,15 +5907,8 @@ ame%7D --dplmnt ', j
2f834733240ee902e09317499fa661d82a33942a
Update app_label on partitioned model
corehq/messaging/scheduling/scheduling_partitioned/models.py
corehq/messaging/scheduling/scheduling_partitioned/models.py
import pytz import uuid from corehq.apps.casegroups.models import CommCareCaseGroup from corehq.apps.groups.models import Group from corehq.apps.locations.dbaccessors import get_all_users_by_location from corehq.apps.locations.models import SQLLocation from corehq.apps.users.models import CommCareUser, WebUser from cor...
Python
0
@@ -1301,16 +1301,127 @@ ield()%0A%0A + class Meta:%0A app_label = 'scheduling_partitioned'%0A db_table = 'scheduling_scheduleinstance'%0A%0A clas
f007366f792610d55554de202ac6d8151f214208
Add +x to Python script.
src/Python/MetadataWebApi/metadatawebapi.py
src/Python/MetadataWebApi/metadatawebapi.py
#!/usr/bin/env python # metadatawebapi.py - Copyright (c) Experian. All rights reserved. # Python script to download data from the QAS Electronic Updates Web API. import requests # Used to call the Metadata Web API (See: http://docs.python-requests.org/en/latest/index.html) import json # Used to parse JSON import ...
Python
0
0cc7bc679edd0d82bcb7a841c577d49662a9349f
Change path of ee_test.py script
examples/EthernetEcho/mn_ethernet_echo.py
examples/EthernetEcho/mn_ethernet_echo.py
#!/usr/bin/env python # coding: latin-1 # Mininet testing script for EthernetEcho # Nik Sultana, February 2017 # # Use of this source code is governed by the Apache 2.0 license; see LICENSE. from mininet.net import Mininet, CLI from scapy.all import * import os host_mac = "02:00:00:00:00:02" echoer_mac = "02:00:00:0...
Python
0.000001
@@ -1169,17 +1169,53 @@ AX + %22/e -e +xamples/EthernetEcho/mn_ethernet_echo _test.py
ad761908537b63c2d262f69a75e7b221f84e8647
Add stub for multiple posts in school boards
ca_on_school_boards_english_public/__init__.py
ca_on_school_boards_english_public/__init__.py
from utils import CanadianJurisdiction from opencivicdata.divisions import Division from pupa.scrape import Organization class OntarioEnglishPublicSchoolBoards(CanadianJurisdiction): classification = 'legislature' # just to avoid clash division_id = 'ocd-division/country:ca/province:on' division_name = '...
Python
0
@@ -675,16 +675,78 @@ rict'):%0A + for i in range (0, 15): # XXX made-up number%0A @@ -791,17 +791,37 @@ entative -' + (seat %7B%7D)'.format(i) , label=
3470698301cb7a2a80626fc71113e2b2bc7bc285
Exclude reserved fields in Catalog to_dataframe
cartoframes/data/observatory/catalog/entity.py
cartoframes/data/observatory/catalog/entity.py
import pandas as pd from google.api_core.exceptions import NotFound from carto.exceptions import CartoException from ...clients.bigquery_client import BigQueryClient from ....auth import Credentials, defaults from ....core.logger import log try: from abc import ABC except ImportError: from abc import ABCMet...
Python
0
@@ -6916,32 +6916,33 @@ %22%22%22%0A +%0A return pd.Da @@ -6925,30 +6925,28 @@ %22%22%0A%0A -return +df = pd.DataFram @@ -6977,8 +6977,165 @@ self%5D)%0A +%0A if 'available_in' in df:%0A del df%5B'available_in'%5D%0A%0A if 'summary_json' in df:%0A del...
c868826218862dfc66c14fad78d5b46c565f0467
add exception detail
content_extraction.py
content_extraction.py
# -*- coding: utf-8 -*- from boilerpipe.extract import Extractor import logging as log import numpy as np import re import requests from urlextract import URLExtract def _get_entry_content(entry): contents = [ entry.get("description", ""), entry.get("content", [{}])[0].get("value", ""), en...
Python
0.000001
@@ -2289,26 +2289,67 @@ aped -%5Cn%22.format( + because of exception %7Be%7D%22.format(%0A url=url +, e=e ))%0A
689697daa9cb814b49bbfd465f86d044c4e4ecf5
Allow 2017 in boilerplate
verify/boilerplate/boilerplate.py
verify/boilerplate/boilerplate.py
#!/usr/bin/env python # Copyright 2015 The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
Python
0.000361
@@ -4195,16 +4195,21 @@ 015%7C2016 +%7C2017 )' )%0A
bf7acf2750ccf64dc1f85b752333d93c489367fb
Clean up eval a bit.
ngboost/evaluation.py
ngboost/evaluation.py
import numpy as np from tqdm import tqdm from lifelines import KaplanMeierFitter, NelsonAalenFitter from matplotlib import pyplot as plt from sklearn.metrics import roc_auc_score, r2_score, mean_squared_error def calibration_regression(Forecast, Y, bins=11, eps=1e-3): """ Calculate calibration in the regressi...
Python
0
@@ -784,118 +784,38 @@ ng, -using the probability%0A integral transform and a Kaplan-Meier fit.%0A%0A Evaluate at percentiles of censoring +with integral transform and KM .%0A @@ -2415,25 +2415,8 @@ t%22)%0A - # plt.show()%0A %0A%0Ade @@ -2448,38 +2448,36 @@ ead_only(preds, -ys, cs +Y, E ):%0A %22...
e995b1b18cf274f7c90e6d72f345a4c0f0e78ac8
Fix project name. (#267)
google/cloud/security/common/gcp_type/project.py
google/cloud/security/common/gcp_type/project.py
# Copyright 2017 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, s...
Python
0.000001
@@ -1077,20 +1077,15 @@ = ' -organization +project s/%25s
4b5a96f7154c33010e3519025a4fefe7024e5d0f
Increase priority if new sites to location of "before"
sites.py
sites.py
"""This package is responsible for setting up :data:`python:sys.path` for Western X. This adds all the directories listed within :envvar:`KS_PYTHON_SITES`, and the directory from which this was imported from, in a similar manner as site-packages via :func:`python:site.addsitedir`. We have reimplemented that functiona...
Python
0
@@ -1,1186 +1,40 @@ -%22%22%22This package is responsible for setting up :data:%60python:sys.path%60 for Western X.%0A%0AThis adds all the directories listed within :envvar:%60KS_PYTHON_SITES%60, and the directory%0Afrom which this was imported from, in a similar manner as site-packages via%0A:func:%60python:site.addsi...
aaed4427c82fa0af18a79fe51112fb4e5504dcf6
Add argparse module usage
src/make-xpi.py
src/make-xpi.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Usage: ./make-xpi.py ./make-xpi.py theme ./make-xpi.py extension ./m...
Python
0.000001
@@ -381,16 +381,32 @@ ort json +%0Aimport argparse %0A%0Asys.pa @@ -577,131 +577,135 @@ +p ar -gs = sys.argv%5B1:%5D%0A if len(args) == 1:%0A action = args%5B0%5D%0A else:%0A action = %22all%22%0A%0A if not action in +ser = argparse.ArgumentParser()%0A parser.add_argument(%22action%2...
a9840188e3d632973aa5515fa640c6148326dfe5
version number in help messages
convoread/__init__.py
convoread/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- '''convoread - a tool for using convore.com via CLI''' from __future__ import unicode_literals, print_function import sys import os import base64 import json import traceback from contextlib import closing from datetime import datetime from netrc import netrc from httpli...
Python
0
@@ -4843,22 +4843,22 @@ ():%0A -print( +msg = '''usage @@ -4872,11 +4872,8 @@ read -.py %5BOP @@ -4880,16 +4880,47 @@ TIONS%5D%0A%0A +convoread (version %7Bversion%7D)%0A%0A options: @@ -5030,16 +5030,58 @@ ons%0A'''. +format(version=__version__)%0A print(msg. encode(E
66f36fbf90e11e71ebf4c3eb869c1977f6ed271a
Fix for dbs with legacy format for channels.
slack.py
slack.py
import websocket import requests import json class Slack(object): def __init__(self, api_token): self.api_token = api_token self.username_cache = {} self.channel_cache = {} def start(self, handlers): self.handlers = handlers websocket.enableTrace(True) response...
Python
0
@@ -2212,24 +2212,142 @@ hannel_id):%0A + if channel_id in self.channel_cache.values(): # old-style channels in database%0A return channel_id%0A%0A if c
79d8861d59be505b00efd6dd05c271083262286a
change the default number of ignored diagonals to 2
cooler/cli/balance.py
cooler/cli/balance.py
# -*- coding: utf-8 -*- from __future__ import division, print_function from multiprocessing import Pool import sys import numpy as np import h5py import click from . import cli from .. import ice @cli.command() @click.argument( "cool_path") @click.option( "--nproc", "-p", help="Number of processes to s...
Python
0.000114
@@ -1588,33 +1588,33 @@ nt,%0A default= -3 +2 ,%0A show_defau
713e9bda1881b5b20fd2f5628c2b8a95383fe01e
fix tests
tests/merge_colnames_multiple_values_test.py
tests/merge_colnames_multiple_values_test.py
#!/usr/bin/env python3 # encoding: utf-8 import ursgal TESTS = [ { 'input' : [ {'X\!Tandem:hyperscore': '34', 'Spectrum ID': '5', 'PEP':'3.5' }, {'X\!Tandem:hyperscore': '1', 'Spectrum ID': '5', 'PEP':'2' } ], 'output' : { 'X\!Tandem:hyperscore': 34, 'S...
Python
0.000001
@@ -94,34 +94,32 @@ %0A %7B'X -%5C! Tandem:hyperscor @@ -170,34 +170,32 @@ %0A %7B'X -%5C! Tandem:hyperscor @@ -273,34 +273,32 @@ %7B%0A 'X -%5C! Tandem:hyperscor @@ -427,34 +427,32 @@ %0A %7B'X -%5C! Tandem:hyperscor @@ -503,34 +503,32 @@ %0A %7B'X -%5C! ...
63dabe19f30807ee3ed0c747360a63c634a29ae7
Throw exception on failure
src/dcm/agent/plugins/builtin/remove_user.py
src/dcm/agent/plugins/builtin/remove_user.py
# # Copyright (C) 2014 Dell, 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 wri...
Python
0.000001
@@ -580,22 +580,9 @@ .%0A#%0A -import psutil %0A + impo @@ -593,16 +593,58 @@ ogging%0A%0A +import dcm.agent.exceptions as exceptions%0A import d @@ -683,16 +683,67 @@ gin_base +%0Aimport dcm.agent.plugins.api.utils as plugin_utils %0A%0A_g_log @@ -1204,263 +1204,301 @@ -rc = super(RemoveUser, self).run()%...
16ba95e246c8ebd75d8904705a429461ce0c561b
fix spaces
test/jubatus_test/common.py
test/jubatus_test/common.py
import os import time import signal from threading import Timer import msgpackrpc from msgpackrpc.error import * class CommonUtils: @staticmethod def start_server(name, port): try: pid = os.fork() if pid < 0: print 'fork error' sys.exit(1) elif pid == 0: os.execvp(nam...
Python
0.000656
@@ -901,17 +901,20 @@ ge(10):%0A -%09 + # Fo @@ -1132,17 +1132,20 @@ -%09 + cli.call @@ -1166,9 +1166,12 @@ -%09 + rais
a91f931adb8aaaf237e32e88b3d440020e53ee51
change the documentation
code/utils/organize_behavior_data.py
code/utils/organize_behavior_data.py
""" Purpose: ----------------------------------------------------------------------------------- We make the extraction of txt file to be easier by building these functions. ----------------------------------------------------------------------------------- """ import numpy as np import pandas as pd project_locati...
Python
0
@@ -94,55 +94,76 @@ ---%0A -We make the extraction of txt file to be easier +To explore the behavior data for each subject, we make it convenient by @@ -176,17 +176,17 @@ ng these - +%0A function @@ -188,16 +188,123 @@ ctions. +Especially, logistic regression on behavior data needs the data in pandas.%0Adata_f...
596f80586b3fc1ea641e224197997e0e4b0b0fc2
add name to return values
lib/ansible/modules/cloud/hcloud/hcloud_floating_ip_info.py
lib/ansible/modules/cloud/hcloud/hcloud_floating_ip_info.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "met...
Python
0.00003
@@ -1694,16 +1694,165 @@ 1937415%0A + name:%0A description: Name of the Floating IP%0A returned: Always%0A type: str%0A sample: my-floating-ip%0A @@ -3556,16 +3556,73 @@ ip.id),%0A + %22name%22: to_native(floating_ip.name),%0A
6f0cead30aad0e21af8b9b46ee23a56280933e73
Define `__all__` for `view_manipulation.py`
common/commands/view_manipulation.py
common/commands/view_manipulation.py
from sublime_plugin import TextCommand from ...core.git_command import GitCommand class gs_handle_vintageous(TextCommand, GitCommand): """ Set the vintageous_friendly view setting if needed. Enter insert mode if vintageous_enter_insert_mode option is enabled. """ def run(self, edit): if ...
Python
0.00004
@@ -77,16 +77,87 @@ mmand%0A%0A%0A +__all__ = (%0A %22gs_handle_vintageous%22,%0A %22gs_handle_arrow_keys%22%0A)%0A%0A%0A class gs
f5ccc326fa9715422bf0029a3f334643e247a9e8
Support CPython with patch from lunar https://trac.torproject.org/projects/tor/ticket/8507
ooni/utils/geodata.py
ooni/utils/geodata.py
import re import os from twisted.web.client import Agent from twisted.internet import reactor, defer, protocol from ooni.utils import log, net from ooni import config try: import pygeoip except ImportError: log.err("Unable to import pygeoip. We will not be able to run geo IP related measurements") class Geo...
Python
0
@@ -176,23 +176,195 @@ -import pygeoip%0A +from pygeoip import GeoIP%0Aexcept ImportError:%0A try:%0A import GeoIP as CGeoIP%0A def GeoIP(database_path, *args, **kwargs):%0A return CGeoIP.open(database_path)%0A exce @@ -379,24 +379,28 @@ tError:%0A + + log.err(%22Una @@ ...
fc24e4f29d25a2cef91525e4d47c39da3c6b4d8d
Fix bug that lead processPacket being called even if no packet has been received
ooni/utils/txscapy.py
ooni/utils/txscapy.py
# -*- coding:utf8 -*- # txscapy # ******* # Here shall go functions related to using scapy with twisted. # # This software has been written to be part of OONI, the Open Observatory of # Network Interference. More information on that here: http://ooni.nu/ import struct import socket import os import sys import time fr...
Python
0
@@ -2991,16 +2991,39 @@ cv(MTU)%0A + if packet:%0A @@ -3046,32 +3046,36 @@ self.protocols:%0A + prot
891f30385b23dbb59d794603a909535dede7beae
Fix generator test
tests/distribution_tests.py
tests/distribution_tests.py
# -*- encoding: utf-8 -*- """Additional tests for the distribution module. The beastling.distribution module contains doctests for core functionality, but testing all bad paths would overload the docstring with un-helpful examples, so they are delegated to here. """ import unittest from nose.tools import raises i...
Python
0.000001
@@ -349,44 +349,8 @@ s%0A%0A%0A -class Tests(unittest.TestCase):%0A @rai @@ -365,20 +365,16 @@ eError)%0A - def run_ @@ -389,14 +389,8 @@ ing( -self, stri @@ -398,34 +398,8 @@ g):%0A - print(string)%0A @@ -442,20 +442,16 @@ string(%0A - @@ -482,20 +482,17 @@ =True)%0A%0A...
4d74f388033f0e18e5c0d5524e23a9163cb9c885
Use self.name wherever possible.
django_lightweight_queue/management/commands/queue_runner.py
django_lightweight_queue/management/commands/queue_runner.py
import os import sys import time import signal import logging import multiprocessing from Queue import Empty from optparse import make_option from django.utils.daemonize import become_daemon from django.core.management.base import NoArgsCommand from ... import app_settings from ...utils import get_backend, get_middl...
Python
0
@@ -5141,55 +5141,10 @@ )d %25 -(queue)s/%25(worker_num)d '%0A ' +s %25%25(l @@ -5161,25 +5161,9 @@ 1s: -%25%25(message)s' %25 %7B +' %0A @@ -5180,88 +5180,33 @@ ' -queue': self.queue,%0A 'worker_num': self.worker_num,%0A %7D +%25%25(message)s' %25 self.name ,%...
459f7d227607382eab003d635c77af3748369118
implement error reporting
tests/integration/server.py
tests/integration/server.py
#!/usr/bin/python # Copyright 2016 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 applica...
Python
0.000001
@@ -700,24 +700,60 @@ .monitoring%0A +import google.cloud.error_reporting%0A import googl @@ -3817,30 +3817,712 @@ :%0A re -turn (' +quest_data = request.get_json()%0A if request_data is None:%0A raise ErrorResponse('Unable to parse request JSON: '%0A 'did you set the Content-...
4bf218a843c61886c910504a47cbc86c8a4982ae
Fix migrate to ia script
bulbs/content/management/commands/migrate_to_ia.py
bulbs/content/management/commands/migrate_to_ia.py
from django.core.management.base import BaseCommand from bulbs.content.models import Content, FeatureType from bulbs.content.tasks import post_to_instant_articles_api import timezone class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('feature', nargs="+", type=str) de...
Python
0
@@ -395,16 +395,36 @@ cts.all( +instant_article=True )%0A%0A @@ -481,32 +481,48 @@ ure:%0A + feature_types = feature_types.o @@ -587,44 +587,8 @@ es:%0A - if ft.instant_article:%0A%0A
229be108620149be8e48000fc3494a458d783910
Enable --no-progress to disable the progress bar
warehouse/synchronize/commands.py
warehouse/synchronize/commands.py
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import eventlet from progress.bar import ShadyBar from warehouse import create_app, db, script from warehouse.packages import store from warehouse.synchronize.fetchers import PyPIFetcher eventlet.monkey_p...
Python
0.000001
@@ -318,24 +318,127 @@ y_patch()%0A%0A%0A +class DummyBar(object):%0A def iter(self, iterable):%0A for x in iterable:%0A yield x%0A%0A%0A def synchron @@ -1425,16 +1425,31 @@ ool=None +, progress=True ):%0A i @@ -1757,54 +1757,34 @@ -with app.app_context():%0A for project in +if...
1d53f4cc5766f68b919032bfc0980a017b66c443
return direct url to gif
plugins/gif.py
plugins/gif.py
import random from util import hook, http @hook.api_key('giphy') @hook.command('gif') @hook.command def giphy(inp, api_key="dc6zaTOxFJmzC"): '''.gif/.giphy <query> -- returns first giphy search result''' url = 'http://api.giphy.com/v1/gifs/search' try: response = http.get_json(url, q=inp, limit=1...
Python
0.999915
@@ -485,18 +485,38 @@ et(' -bitly_gif_ +images').get('original').get(' url'
2f87fcfde3bdb47a194b5dffaaddfe3fb4337869
Change some minor logic bits
stats.py
stats.py
from collections import Counter import datetime import logging import os import psutil import discord from discord.ext import commands from utils import checks class Stats: """Bot usage statistics.""" def __init__(self, bot): self.bot = bot async def on_command(self, ctx): self.bot.com...
Python
0.000001
@@ -1652,23 +1652,14 @@ - owner = self. -_ owne @@ -1850,29 +1850,8 @@ l)%0A%0A - # statistics%0A @@ -2065,283 +2065,150 @@ que_ -ids = set()%0A unique_members = %5B%5D%0A for member in self.bot.get_all_members():%0A if member.id not in unique_ids:%0A uniq...
3dff8c499b834b65527667888e6a5ffed3ef8125
Update SRV tests to account for data field.
tests/models/test_record.py
tests/models/test_record.py
from mock import patch from six import string_types from pycloudflare.models import Record, User from tests.models import FakedServiceTestCase class TestCreateRecord(FakedServiceTestCase): def setUp(self): self.user = User.get(email='foo@example.net') self.zone = self.user.get_zone_by_name('examp...
Python
0
@@ -2872,32 +2872,38 @@ test_record. +data%5B' priority , 10)%0A%0A d @@ -2886,24 +2886,26 @@ ta%5B'priority +'%5D , 10)%0A%0A d @@ -2973,22 +2973,30 @@ _record. +data%5B' weight +'%5D , 5)%0A%0A @@ -3068,23 +3068,31 @@ _record. +data%5B' service +'%5D , '_sip' @@ -3170,21 +3170,29 @@ _record. +data...
6bb21fbf98106520b739b089a8b1a49f01a9cc9e
Fix UI bug.
core/dialog/delete.py
core/dialog/delete.py
# -*- coding: utf-8 -*- from ..QtModules import * from .Ui_delete import Ui_Dialog as delete_Dialog class deleteDlg(QDialog, delete_Dialog): def __init__(self, deleteIcon, icon, table, pos, parent=None): super(deleteDlg, self).__init__(parent) self.setupUi(self) self.setWindowIcon(deleteIco...
Python
0
@@ -456,8 +456,216 @@ ex(pos)%0A + self.on_Entity_currentIndexChanged(0)%0A %0A @pyqtSlot(int)%0A def on_Entity_currentIndexChanged(self, index): self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(self.Entity.currentIndex()!=-1)%0A
9343dbfa0d822cdf2f00deab8b18cf4d2e809063
Add id & category to routes list
services/display_routes.py
services/display_routes.py
# -*- coding: utf-8 -*- from database.database_access import get_dao from gtfslib.model import Route from gtfsplugins import decret_2015_1610 from database.database_access import get_dao def get_routes(agency_id): dao = get_dao(agency_id) parsedRoutes = list() for route in dao.routes(fltr=Route.route_type == Rout...
Python
0
@@ -104,88 +104,56 @@ rom -gtfsplugins import decret_2015_1610%0Afrom database.database_access import get_dao +services.check_urban import check_urban_category %0A%0Ade @@ -294,16 +294,31 @@ E_BUS):%0A +%09%09print(route)%0A %09%09parsed @@ -332,16 +332,53 @@ dict()%0A +%09%09parsedRoute%5B%22id%22%5D = route.ro...
31f85a64dbd986a7cee88879048c6374f8fb6c60
Change OpenSlide.read_region() to take coordinate tuples
openslide/__init__.py
openslide/__init__.py
# # openslide-python - Python bindings for the OpenSlide library # # Copyright (c) 2010-2011 Carnegie Mellon University # # This library is free software; you can redistribute it and/or modify it # under the terms of version 2.1 of the GNU Lesser General Public License # as published by the Free Software Foundation. # ...
Python
0.000001
@@ -2552,20 +2552,24 @@ n(self, -x, y +location , layer, @@ -2569,20 +2569,20 @@ layer, -w, h +size ):%0A @@ -2627,25 +2627,73 @@ sr, -x, y, layer, w, h +location%5B0%5D, location%5B1%5D,%0A layer, size%5B0%5D, size%5B1%5D )%0A%0A%0A
070d4039afc2a147fc01e0329753775998ee20b8
Add ErrorReturnCode import
openvz/beancounter.py
openvz/beancounter.py
""" The MIT License (MIT) Copyright (c) 2015 Kirk Leon Guerrero Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, ...
Python
0
@@ -3019,16 +3019,33 @@ rt vzctl +, ErrorReturnCode %0A
4a0fe826143a890365cd1215244346301ebba8df
Remove unused `command` from pluginmanager.register
core/pluginmanager.py
core/pluginmanager.py
from core.interface import * from twisted.python import log def filter_interface(plugins, interface): return filter(lambda p: interface.providedBy(p), plugins) def filter_command(plugins, cmd): return filter(lambda p: p.accepts_command(cmd), plugins) class PluginManager(object): def __init__(self): ...
Python
0.000001
@@ -511,20 +511,8 @@ ugin -, command='' ):%0A
b6f480c84a34ffbef75cafe729ffa21a019b8cdb
Version bump.
orchestra/__init__.py
orchestra/__init__.py
# The current Orchestra version. __version__ = '0.2.41' default_app_config = 'orchestra.apps.OrchestraAppConfig'
Python
0
@@ -50,9 +50,9 @@ .2.4 -1 +2 '%0A%0Ad
bafe5c6a098e5bfff6fa0160c57e7245eccd5188
Remove stray `django.conf.urls.defaults` import
organizations/urls.py
organizations/urls.py
from django.conf.urls.defaults import patterns, url from django.contrib.auth.decorators import login_required from organizations.views import (OrganizationList, OrganizationDetail, OrganizationUpdate, OrganizationDelete, OrganizationCreate, OrganizationUserList, OrganizationUserDetail, OrganizationUser...
Python
0
@@ -18,17 +18,8 @@ urls -.defaults imp
f2cc6641c7579da294d793c75d185fe9a35d5470
Add missing import
store.py
store.py
""" This file contains code for accessing the Google Play Store. """ import pickle import time import urlparse import sys # Do not remove GOOGLE_LOGIN = GOOGLE_PASSWORD = AUTH_TOKEN = None try: from googleplay import GooglePlayAPI except: print("error: could not find GooglePlayAPI, make sure you have downloaded it...
Python
0.000466
@@ -117,16 +117,38 @@ rt sys%0A%0A +from output import *%0A%0A # Do not
bc79df6181d7aeac803b61e3408d3b99212802d9
Added another format of input data: integers in the [0, 100] range
cpu-load-generator.py
cpu-load-generator.py
# Copyright 2012 Anton Beloglazov # # 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 writ...
Python
0.999995
@@ -1,10 +1,11 @@ # +%5C Copyrigh @@ -903,20 +903,16 @@ r = str( -int( utilizat @@ -918,15 +918,8 @@ tion - * 100) )%0A @@ -3785,18 +3785,20 @@ or n %3E 1 +00 :%0A - @@ -3826,16 +3826,71 @@ ueError%0A + if n %3C 1:%0A n *= 100%0A @@ -3916,17 +3916,22 @@ ...
641f831ba97a247bc58596f8697e253c2ca98f9d
use java helper for templates (#53)
synth.py
synth.py
# Copyright 2019 Google LLC # # 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, s...
Python
0
@@ -662,100 +662,45 @@ tool - as s%0Aimport synthtool.gcp as gcp%0A%0A%0Atemplates = gcp.CommonTemplates().java_library()%0As.copy( +.languages.java as java%0A%0Ajava.common_ temp @@ -704,18 +704,17 @@ emplates -, +( excludes @@ -735,8 +735,9 @@ .md',%0A%5D) +%0A
0b16b8e40fe19d7a9719df1454e5db9eb76a5e8e
set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#996)
synth.py
synth.py
import synthtool as s import synthtool.gcp as gcp import logging import subprocess import os logging.basicConfig(level=logging.DEBUG) gapic_micro = gcp.GAPICMicrogenerator() v1_admin_library = gapic_micro.typescript_library( "firestore-admin", "v1", proto_path="/google/firestore/admin/v1", generator_args={'g...
Python
0
@@ -129,16 +129,52 @@ DEBUG)%0A%0A +AUTOSYNTH_MULTIPLE_COMMITS = True%0A%0A%0A gapic_mi
6aadf43d268d9d52e8b606c0c3678c7790ea323a
Fix task_group_task date validation
src/ggrc_workflows/models/task_group_task.py
src/ggrc_workflows/models/task_group_task.py
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: dan@reciprocitylabs.com # Maintained By: dan@reciprocitylabs.com from sqlalchemy import orm from sqlalchemy.orm import validates from ggrc import ...
Python
0.000941
@@ -240,26 +240,24 @@ rom -sqlalchemy +datetime import orm%0A @@ -252,19 +252,20 @@ import -orm +date %0Afrom sq @@ -276,20 +276,16 @@ hemy -.orm import vali @@ -280,25 +280,19 @@ import -validates +orm %0A%0Afrom g @@ -656,22 +656,16 @@ meboxed, - Base, %0A @@ -672,24 +672,30 @@ ...
c84d2eb8abcf9fba1e8dc00e75df4a82a6a48822
Add back Mailchimp
tasks.py
tasks.py
#App engine platform import logging, webapp2, appengine_config import GlobalUtilities as tools import DataModels as models from google.appengine.api import mail from google.appengine.ext.webapp import template class Confirmation(webapp2.RequestHandler): def post(self): donation_key = self.request...
Python
0
@@ -759,32 +759,76 @@ ngs_key).get()%0A%0A + s.mailchimp.add(email, name, True)%0A%0A logging.
588a5ca768816a7052588c6a393288ef7b754434
add tests task
tasks.py
tasks.py
from invoke import run, task @task def clean(): run("python setup.py clean") @task def compile_cython(): run("python setup.py compile_cython") @task def update_submodule(): run("git submodule init") run("git submodule sync") run("git submodule update") @task def update(): update_submodul...
Python
0.00524
@@ -414,24 +414,85 @@ grade .%22)%0A%0A%0A +@task%0Adef tests():%0A run(%22python tests/hoedown_test.py%22)%0A%0A%0A @task%0Adef al
82b96a8acb9a43d90bfcfe9fd4d8b0dcf1fd06f5
Make modules uninstallable
sale_require_ref/__manifest__.py
sale_require_ref/__manifest__.py
############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
Python
0
@@ -1438,11 +1438,12 @@ e': -Tru +Fals e,%0A
d8794be78567ffc1265e487de8bcfa9933e5ba5d
Include output
tests/test_cmdline.py
tests/test_cmdline.py
# Test the local one, not the installed one: import sys sys.path.insert(0, "..") from betools import CmdLine # CmdLine appears to be global for all tests, # so you can't use the same letter flag throughout # the test suite (is this a py.test bug?) @CmdLine("1", "option1") def test_1(): """ Description of optio...
Python
0.99997
@@ -78,36 +78,8 @@ .%22)%0A -from betools import CmdLine%0A # Cm @@ -212,16 +212,44 @@ st bug?) +%0Afrom betools import CmdLine %0A%0A@CmdLi @@ -587,35 +587,45 @@ ():%0A %22%22%22%0A -U +Option 4 u se +s the function na @@ -707,35 +707,45 @@ ():%0A %22%22%22%0A -U +Option 5 u se +s the functio...
e9927beb5c8e7f41c1654431bf076476a38ae493
test create a list of string for possible index
tests.py
tests.py
import unittest import random def get_list_index(seq): """ Return a list of index corresponding to the number of index in seq Parameters ---------- seq : list A list of words Returns ------- List A list of integer that represent index of seq """ list_index = []...
Python
0.999267
@@ -1330,16 +1330,320 @@ r_list%0A%0A +def create_possible_index_string(list_index, all):%0A result = %5B%5D%0A for possible_index in all:%0A tmp_result = %5B%5D%0A for i in list_index:%0A tmp_result.append(str(i) in possible_index)%0A if False not in tmp_result:%0A res...
4bb31623ce06730808addf14838ac89beaafd2ef
Set the logger class to StackLogger.
tests.py
tests.py
import inspect import logging import logging.handlers import os import unittest from stacklogger import callingframe, framefunc, srcfile currentframe = inspect.currentframe try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): def emit(self, record): ...
Python
0
@@ -97,16 +97,29 @@ r import + StackLogger, calling @@ -145,16 +145,52 @@ rcfile%0A%0A +logging.setLoggerClass(StackLogger)%0A currentf
91eda8dff08b21244a2f4a64340efa9b4b00f26b
Update settings.py
src/settings.py
src/settings.py
# -*- coding: utf-8 -*- """ .. moduleauthor:: John Brännström <john.brannstrom@gmail.com> Settings ******** This module contains settings. """ import yaml import os import re from flask import render_template class Settings: """Settings container.""" __CONFIG_FILE = 'zipatoserver.conf' """(*str*) Con...
Python
0.000001
@@ -1237,113 +1237,27 @@ -if settings_path is not None:%0A config_file = Settings._format_path(settings_path)%0A +config_file = _get_ conf @@ -1267,121 +1267,37 @@ file - += S +(s ettings -.__CONFIG_FILE%0A else:%0A config_file = Settings.PROGRAM_PATH + Settings.__CONFI...
c734831b1dce6ae860ab291130d72a45615dc6ca
remove django database conf
src/settings.py
src/settings.py
# Django settings for orchestrator project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'd...
Python
0.000025
@@ -172,16 +172,18 @@ = %7B%0A + # 'defaul @@ -187,24 +187,26 @@ ault': %7B%0A + # 'ENGINE @@ -298,24 +298,26 @@ oracle'.%0A + # 'NAME': @@ -400,24 +400,26 @@ sqlite3.%0A + # 'USER': @@ -468,24 +468,26 @@ sqlite3.%0A + # 'PASSWO @@ -536,24 +536,26 @@ sqlite3.%0A + # ...
24a82d87645c59e5fd5c294fa8f105ac0f3b7a3a
Fix initialize style.
chainer/training/extensions/computational_graph.py
chainer/training/extensions/computational_graph.py
import os from chainer import computational_graph from chainer import configuration from chainer.training import extension from chainer import variable _var_style = {'shape': 'octagon', 'fillcolor': '#E0E0E0', 'style': 'filled'} _func_style = {'shape': 'record', 'fillcolor': '#6495ED', 'style': 'filled'} class dum...
Python
0
@@ -2717,22 +2717,19 @@ -self._ +if variable @@ -2735,17 +2735,36 @@ e_style -= +is None:%0A variabl @@ -2771,18 +2771,17 @@ e_style -or += _var_st @@ -2802,24 +2802,86 @@ lf._ -function_style = +variable_style = variable_style%0A if function_style is None:%0A fun @@ ...
d46197d033958ffda7d434aaf9b95148c96138d7
Kill SETTABLE_ENV_VARS allow list. (#11743)
src/python/pants/core/util_rules/subprocess_environment.py
src/python/pants/core/util_rules/subprocess_environment.py
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from dataclasses import dataclass from typing import Tuple from pants.engine.environment import Environment, EnvironmentRequest from pants.engine.rules import Get, collect_rules, rule fro...
Python
0
@@ -405,615 +405,8 @@ ct%0A%0A -# Names of env vars that can be set on all subprocesses via config.%0ASETTABLE_ENV_VARS = (%0A # Customarily used to control i18n settings.%0A %22LANG%22,%0A %22LC_CTYPE%22,%0A %22LC_ALL%22,%0A # Customarily used to control proxy settings in various processes.%0A %22ht...
ca71bbcc6b788037290792caf79f1ec6f3d0fcd7
Add GeoDjango to INSTALLED_APPS
cruzebase/settings.py
cruzebase/settings.py
""" Django settings for cruzebase project. Generated by 'django-admin startproject' using Django 1.11.4. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import ...
Python
0
@@ -1434,16 +1434,42 @@ files',%0A + 'django.contrib.gis',%0A %5D%0A%0AMIDDL
7fe1d9b1c512747edc2b9a6a41542d5b74c66fcb
fix bug
production/serializers.py
production/serializers.py
from rest_framework import serializers from rest_polymorphic.serializers import PolymorphicSerializer from taggit_serializer.serializers import (TagListSerializerField, TaggitSerializer) from taggit.models import Tag from .models import ( Film, FilmGenre, Installation, ...
Python
0.000001
@@ -3844,72 +3844,8 @@ True -,%0A many=True )%0A%0A%0A
36f2b9f52524a65d5327b2dd414e7ad874537ff1
Add tests
tests/test_OwlObjectEnum.py
tests/test_OwlObjectEnum.py
# coding: utf-8 from __future__ import division, absolute_import, unicode_literals from owlmixin.owlenum import OwlObjectEnum class Color(OwlObjectEnum): RED = ( "red", {"japanese": "赤", "coloring": lambda m: "Red: " + m} ) GREEN = ( "green", {"japanese": "緑", "coloring"...
Python
0
@@ -95,37 +95,170 @@ ixin -.owlenum import OwlObjectEnum + import OwlMixin%0Afrom owlmixin.owlenum import OwlObjectEnum%0A%0A%0Aclass Sample(OwlMixin):%0A def __init__(self, color):%0A self.color = Color.from_symbol(color) %0A%0A%0Ac @@ -1040,8 +1040,279 @@ e: sky%22%0A +%0A%0Aclass TestOwlMixin:%0A def...
3b83b8715e03b9096f9ae5611019fec4e52ca937
Add an initial test each for resolve and mk
tests.py
tests.py
from os.path import isdir import pytest from filesystem_tree import FilesystemTree @pytest.yield_fixture def fs(): fs = FilesystemTree() yield fs fs.remove() def test_it_can_be_instantiated(): assert FilesystemTree().__class__.__name__ == 'FilesystemTree' def test_args_go_to_mk_not_root(): fs ...
Python
0
@@ -1,12 +1,22 @@ +import os%0A from os.path @@ -445,16 +445,250 @@ .root)%0A%0A +def test_resolve_resolves(fs):%0A path = fs.resolve('some/dir')%0A assert path == os.path.realpath(os.sep.join(%5Bfs.root, 'some', 'dir'%5D))%0A%0Adef test_mk_makes_a_dir(fs):%0A fs.mk('some/dir')%0A assert isdir(fs.resolve(...
84f5a2ce6195b40c32fe9a14f6f337b555fdafb8
Update test_ipynb_to_myst.py
tests/test_ipynb_to_myst.py
tests/test_ipynb_to_myst.py
try: import unittest.mock as mock except ImportError: import mock from textwrap import dedent import pytest from jupytext.formats import get_format_implementation, JupytextFormatError from jupytext.myst import ( myst_to_notebook, CODE_DIRECTIVE, MystMetadataParsingError, matches_mystnb, myst...
Python
0.000001
@@ -2478,13 +2478,8 @@ =%5B%5D) - as x :%0A
b4424c14a8f03c37859e9f20aeac4724edb214d2
Modify ensure_licenses test now that two more licenses have been added.
tests/test_node_licenses.py
tests/test_node_licenses.py
# -*- coding: utf-8 -*- # Python 3.x incompatible, use import builtins instead import __builtin__ as builtins import json import unittest import mock from django.core.exceptions import ValidationError from nose.tools import * # flake8: noqa (PEP8 asserts) from framework.auth import Auth from osf_tests.factories impo...
Python
0
@@ -3260,9 +3260,9 @@ 0, 1 -6 +8 ))%0A%0A
49910738ea07cc83972ed0f980ca6326ea3e522c
Fix for syntax error.
tests/test_register_flow.py
tests/test_register_flow.py
import uuid import datetime import sys import re import time import imaplib import email as email_lib import email.header import pytest from requests import session from config import Config from tests.utils import (retrieve_sms_with_wait, delete_sms_messge, find_csrf_t...
Python
0
@@ -1983,16 +1983,17 @@ at(Confi +g .EMAIL_T
261b906fc7d3673eb0177a67b0c31cac9a682588
Add note for later
tests/test_request_utils.py
tests/test_request_utils.py
""" Tests for `vws._request_utils`. """ import base64 import datetime import hashlib import hmac import re from typing import Pattern from urllib.parse import urljoin import wrapt import requests_mock from freezegun import freeze_time from hypothesis import given from hypothesis.strategies import binary, text from ...
Python
0
@@ -5050,32 +5050,74 @@ ODO%0A %22%22%22%0A + # Assert against requests.headers%0A return %22
f8034181c9dd9b880ee0805fe2c6566260e060e1
test flask_admin connection
tests/test_web_interface.py
tests/test_web_interface.py
from unittest.mock import patch, sentinel from diary.web import application_factory @patch('diary.web.Flask', return_value=sentinel.app) def test_webapp_initialization(Flask): app = application_factory() Flask.assert_called_once_with('diary.web') assert app == sentinel.app
Python
0.000001
@@ -282,8 +282,141 @@ nel.app%0A +%0A%0A@patch('diary.web.Admin')%0Adef test_admin_initialzed(Admin):%0A app = application_factory()%0A Admin.assert_called_once_with(app)%0A
adadcca9bd8b186ebbac083301461f54f1a5e648
Fix tests on Windows: wait for the subprocess exit
tests/test_windows_utils.py
tests/test_windows_utils.py
"""Tests for window_utils""" import socket import sys import test.support import unittest from test.support import IPV6_ENABLED from unittest import mock if sys.platform != 'win32': raise unittest.SkipTest('Windows only') import _winapi from asyncio import windows_utils from asyncio import _overlapped class W...
Python
0
@@ -5728,16 +5728,34 @@ (err))%0A%0A + p.wait()%0A%0A %0Aif __na