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
58a9f7ad0da5b405d5925ed45bf425e37f978fdd
increase version to 1.4.1
src/pyscipopt/__init__.py
src/pyscipopt/__init__.py
__version__ = '1.4.0' # export user-relevant objects: from pyscipopt.Multidict import multidict from pyscipopt.scip import Model from pyscipopt.scip import Branchrule from pyscipopt.scip import Conshdlr from pyscipopt.scip import Eventhdlr from pyscipopt.scip import Heur from pyscipopt.scip ...
Python
0.998012
@@ -16,9 +16,9 @@ 1.4. -0 +1 '%0A%0A#
d2e8afc2abf2ded55b0c05b0eb01f9bd1fb1992b
Fix importing style
fcn/models/__init__.py
fcn/models/__init__.py
from apc2015or.models.fcn8s import * from apc2015or.models.vgg16 import *
Python
0.000001
@@ -1,30 +1,24 @@ from -apc2015or +fcn .models.fcn8s im @@ -26,24 +26,22 @@ ort -* +FCN8s %0Afrom -apc2015or +fcn .mod @@ -61,6 +61,10 @@ ort -* +VGG16 %0A
d267f9a8a9383a97884bbe8109aa6a1a6e478b8f
Remove f-string
beetsplug/mbsubmit.py
beetsplug/mbsubmit.py
# This file is part of beets. # Copyright 2016, Adrian Sampson and Diego Moreda. # # 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 righ...
Python
0.999813
@@ -2263,17 +2263,16 @@ ', help= -f 'Submit
73f3b8ed04b7412e97aa28a8f6c8901f0604aa4e
update comments
plugins/metacritic.py
plugins/metacritic.py
#Metacritic.com scraper from util import hook, http import re from urllib2 import HTTPError @hook.command('mc') def metacritic(inp): '.mc [all|movie|tv|album|x360|ps3|pc|ds|wii] <title> -- gets rating for'\ ' <title> from metacritic on the specified medium' args = inp.strip() game_platforms = ('x3...
Python
0
@@ -1,10 +1,11 @@ # -M + m etacriti @@ -261,24 +261,76 @@ ed medium'%0A%0A + # if the results suck, it's metacritic's fault%0A%0A args = i @@ -528,16 +528,16 @@ ' ', 1)%0A - @@ -558,32 +558,237 @@ all_platforms:%0A + # raise the ValueError so that the except block catches it%0A ...
fa1b8059b03f7a4210dff7dccb44f24c41772c55
fix smarttags message
redbot/message/headers/x_meta_mssmarttagspreventparsing.py
redbot/message/headers/x_meta_mssmarttagspreventparsing.py
#!/usr/bin/env python from redbot.message import headers from redbot.speak import Note, categories, levels from redbot.type import AddNoteMethodType class x_meta_mssmarttagspreventparsing(headers.HttpHeader): canonical_name = "X-Meta-MSSmartTagsPreventParsing" list_header = False deprecated = False v...
Python
0.000015
@@ -823,12 +823,17 @@ ntent it +self. %22%22%22%0A
ea0bd811df281d487fca2449c8ac4efecc20b8a3
Add some extra logging to handle_send
federation/outbound.py
federation/outbound.py
from federation.entities.diaspora.mappers import get_outbound_entity from federation.protocols.diaspora.protocol import Protocol from federation.utils.diaspora import get_public_endpoint, get_private_endpoint from federation.utils.network import send_document def handle_create_payload(entity, author_user, to_user_key...
Python
0
@@ -1,24 +1,40 @@ +import logging%0A%0A from federation.entities @@ -270,16 +270,58 @@ cument%0A%0A +logger = logging.getLogger(%22federation%22)%0A%0A %0Adef han @@ -4549,16 +4549,64 @@ %7D)%0A%0A + logger.debug(%22handle_send - %25s%22, payloads)%0A%0A # Do
c9b6ad65d6a3e7a1d0ab62a51058e57bd0de2e87
Fix previous commit bug in project export
po_projects/models.py
po_projects/models.py
# -*- coding: utf-8 -*- """ Models for po_projects > Project | |____> TemplateMsg | |____> Catalog | |___> TranslationMsg """ import json from babel.core import Locale from babel.messages.catalog import Catalog as BabelCatalog from django.db import models from django.utils.t...
Python
0
@@ -1156,32 +1156,8 @@ '):%0A - print %22foo%22%0A @@ -1857,125 +1857,44 @@ -print self.locations, type(self.locations)%0A print json.loads(self.locations)%0A print%0A return set( +return set(%5Btuple(item) for item in json @@ -1915,16 +1915,17 @@ cations) +%5D )%0A%0A ...
6da69eb8f13dc56cc19d06a09d74005395de8989
Add missing attributes in TPSProcessor.
fedmsg_meta_umb/tps.py
fedmsg_meta_umb/tps.py
# Copyright (C) 2017 Red Hat, Inc. # # fedmsg_meta_umb is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # fedmsg_meta_umb is ...
Python
0
@@ -966,16 +966,232 @@ = 'tps' +%0A __description__ = 'package sanity testing of brew builds'%0A __obj__ = 'Test Package Sanity'%0A __docs__ = 'https://mojo.redhat.com/docs/DOC-0000000'%0A __link__ = 'https://sometpslink.engineering.redhat.com' %0A%0A de
52701e1dfb557cce8fd442ac541e105b210aed13
version bump to v0.1
polyphemus/version.py
polyphemus/version.py
"""Version information about polyphemus and its dependencies. """ import re from collections import namedtuple class version_info(namedtuple('version_info', ['major', 'minor', 'micro', 'extra'])): """A representation of version information. """ def __new__(cls, major=-1, minor=-1, micro=-1, extra=''): ...
Python
0.000001
@@ -1006,12 +1006,8 @@ '0.1 --dev '%0Apo @@ -1053,15 +1053,12 @@ 1, 0, ' -dev ')%0A%0A
733720bf1b4ce6b559e0ef62074762e29df11ba7
bump version to 3.0
src/reportlab/__init__.py
src/reportlab/__init__.py
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/__init__.py __version__=''' $Id$ ''' __doc__="""The Reportlab PDF generation library.""" Version = "3.0b2" import sys if sys.version_info[0:2]!=(2, 7...
Python
0
@@ -269,10 +269,8 @@ %223.0 -b2 %22%0A%0Ai
8f549c5b3a212bdfb72b16ae8e66a5c722ad8f9f
Add configuration for opbeat support.
feedthefox/settings.py
feedthefox/settings.py
""" Django settings for feedthefox project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ import os import dj_database_url from decouple import Csv, config # ...
Python
0
@@ -4985,28 +4985,377 @@ 'https://*.mozilla.net',%0A)%0A +%0A# Opbeat support%0AINSTALLED_APPS.append('opbeat.contrib.django')%0A%0AOPBEAT = %7B%0A 'ORGANIZATION_ID': config('OPBEAT_ORGANIZATION_ID', default=''),%0A 'APP_ID': config('OPBEAT_APP_ID', default=''),%0A 'SECRET_TOKEN': config('OPBEAT_SECRET_TOKEN...
35e95fc3fe2d11b5db9ea676fdac272069e18c18
bump version number
src/reportlab/__init__.py
src/reportlab/__init__.py
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/__init__.py __version__=''' $Id$ ''' __doc__="""The Reportlab PDF generation library.""" Version = "2.7" import sys if sys.version_info[0:2]!=(2, 7) ...
Python
0.000004
@@ -262,19 +262,21 @@ sion = %22 -2.7 +3.0a1 %22%0A%0Aimpor
9bd97ca264c2d04847497c15810168860a6d2f5a
Add reduced chi2 function
utilities/chisqr.py
utilities/chisqr.py
"""Chisquared calculation.""" import numpy as np from joblib import Parallel, delayed from numba import jit @jit def chi_squared(observed, expected, error=None, axis=0): """Calculate chi squared. Same result as as scipy.stats.chisquare """ if np.any(error): chisqr = np.sum((observed - expec...
Python
0.00005
@@ -564,16 +564,280 @@ hisqr%0A%0A%0A +def reduced_chi_squared(chi_squared, N, P):%0A %22%22%22%0A :param chi_squared: Chi squared value%0A :param N: (int) number of observations%0A :param P: (int) number of important parameters%0A :return: Reduced Chi squared%0A %22%22%22%0A return chi_squared / ...
d4ba40dc7e03172bafcdf25401a4eaa8c1885bad
use defaultdict + improved query readability
portal/models/i18n.py
portal/models/i18n.py
"""Module for i18n methods and functionality""" import sys import os from flask import current_app from ..extensions import babel from .user import current_user from .app_text import AppText from .intervention import Intervention def add_to_dict(d,k,o): if k: key = "\"" + k + "\"" if key not in d:...
Python
0
@@ -62,16 +62,52 @@ port os%0A +from collections import defaultdict%0A from fla @@ -265,148 +265,8 @@ n%0A%0A%0A -def add_to_dict(d,k,o):%0A if k:%0A key = %22%5C%22%22 + k + %22%5C%22%22%0A if key not in d:%0A d%5Bkey%5D = set()%0A d%5Bkey%5D.add(o)%0A%0A%0A def @@ -302,22 +302,...
2ab74ea127c1e1c82a6f3df81c35aa0aec73c494
Update cachequery.py
utils/cachequery.py
utils/cachequery.py
Python
0.000001
@@ -1 +1,901 @@ +import shelve%0Aimport sqlite3%0A# a part of the code is taken from: http://www.cs.berkeley.edu/~bjoern/projects/stackoverflow/%0Ashelvefile = '../../db/querycache.shelve'%0A%0Adef query(cursor,query,parameters=()):%0A shlv = shelve.open(shelvefile)%0A key = makekey(query,parameters)%0A if(shl...
00d91e5b8911a8f1519281cf152b5f79cb8a15fe
correct default settings
woodstock/default_settings.py
woodstock/default_settings.py
from django.conf import settings LANGUAGES = getattr(settings, 'LANGUAGES') LANGUAGE_CODE = getattr(settings, 'LANGUAGE_CODE') INVITEE_GENERATES_PASSWORD = getattr(settings, 'WOODSTOCK_INVITEE_GENERATES_PASSWORD', False) SUBSCRIPTION_NEEDS_INVITATION = getattr(settings, 'WOODSTOCK_SUBSCRIPTION_NEEDS_INVITATION', Fal...
Python
0.000004
@@ -1000,26 +1000,21 @@ DSTOCK_P -ARTICIPANT +ERSON _EMAIL_U
c136f97c1b04ae690df835eb3cf4055df6b7385b
Version 0.3.13
uvicorn/__init__.py
uvicorn/__init__.py
from uvicorn.main import main, run __version__ = "0.3.12" __all__ = ["main", "run"]
Python
0
@@ -53,9 +53,9 @@ .3.1 -2 +3 %22%0A__
153ed6a519d6836adb02b934cff44974a7132b6d
Fix doc test failure parsing
flake8/parseDocTest.py
flake8/parseDocTest.py
def parseFailDetails(failDetails): """ Parse the line number of the doctest failure""" import re failDetails = failDetails.split(',') lineNo = -1 if len(failDetails) == 3: match = re.search("line.*?(\d+)", failDetails[1]) if match is None: return lineNo lineNo = i...
Python
0.000008
@@ -72,32 +72,77 @@ doctest failure +%0A %3E%3E%3E parseFailDetails(%22blah%22)%0A -1%0A %22%22%22%0A import r @@ -752,8 +752,82 @@ etails)%0A +%0Aif __name__ == %22__main__%22:%0A from doctest import testmod%0A testmod()%0A
e048948d5758c6bcc7ca3d5e45f20a654022de7f
Update app version
flask_user/__init__.py
flask_user/__init__.py
__title__ = 'Flask-User' __description__ = 'Customizable User Authentication, User Management, and more.' __version__ = '1.0.2.0' __url__ = 'https://github.com/lingthio/Flask-User' __author__ = 'Ling Thio' __author_email__= 'ling.thio@gmail.com' __maintainer__ = 'Ling Thio' __license__ = 'MI...
Python
0.000001
@@ -130,17 +130,17 @@ '1.0.2. -0 +2 '%0A__url_
0c87ace4f8fed068b961269e74bd1b64fae59c5f
Fix little typo
flask_user/__init__.py
flask_user/__init__.py
__title__ = 'Flask-User' __description__ = 'Customizable User Authentication, User Management, and more.' __version__ = '1.0.2.0' __url__ = 'https://github.com/lingthio/Flask-User' __author__ = 'Ling Thio' __author_email__= 'ling.thio@gmail.com' __maintainer__ = 'Ling Thio' __license__ = 'MI...
Python
0.999968
@@ -684,16 +684,17 @@ mpatibil +i ty error
e480204e6a44de918740056aafd0a6a68f5efe39
Add problem 4 description
problems/problem_4.py
problems/problem_4.py
def is_palindrome(product): product = str(product) reverse = product[::-1] return product == reverse def largest_palindrome_product(): left_value = 999 max_product = 0 while left_value > 0: right_value = 999 while right_value > 0: product = left_value * right_value ...
Python
0.017536
@@ -1,12 +1,65 @@ +# Largest palindrome product of two 3-digit numbers%0A%0A def is_palin
808d089b2b93671ef3d4331007fc1c3da2dea0b5
Use django 1.10 patterns style
example/urls.py
example/urls.py
from django.conf.urls import patterns # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^example/', include('example.foo.urls')), # Uncomment the admin/doc line below and add 'django.contrib.admindocs' ...
Python
0
@@ -30,16 +30,63 @@ patterns +%0Afrom rpc4django.views import serve_rpc_request %0A%0A# Unco @@ -640,34 +640,16 @@ RPC2$', -'rpc4django.views. serve_rp @@ -657,14 +657,13 @@ _request -' ),%0A)%0A
821d6c1dfe4569add7d5af74ae64ae04eb05db42
Enable test.dart on Mac after fixing flakiness caused by signal handlers.
tools/test_wrapper.py
tools/test_wrapper.py
#!/usr/bin/env python # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import platform import string import subprocess import sys from utils imp...
Python
0.000004
@@ -827,113 +827,8 @@ '):%0A - if GuessOS() == %22macos%22:%0A dart_script_name = 'test.py'%0A dart_binary = 'python'%0A else:%0A
2d0285447c2474b7d3b1c60cfdcce51e42306315
Update distancia3d.py
topgeo/distancia3d.py
topgeo/distancia3d.py
def caldist3d(X1, Y1, Z1, X2, Y2, Z2): """ Esta funcion sirve para realizar el calculo de distancias entre dos puntos arbitrarios. """ # Importamos los modulos numpy y pandas import numpy as np n = (((X1-X2)**2)+((Y1-Y2)**2)+(Z1-Z2)) Dist = np.sqrt(n) return Dist
Python
0
@@ -161,34 +161,23 @@ mos +e l -os modulo -s numpy - y pandas %0A @@ -275,12 +275,13 @@ return Dist +%0A
ccf1c438a7a941bb4febd6457e400121d1b39265
fix off by one error in the project health thresholds
corehq/apps/reports/standard/project_health.py
corehq/apps/reports/standard/project_health.py
from collections import namedtuple import datetime from django.db.models import F from django.utils.translation import ugettext_noop from corehq.apps.data_analytics.models import MALTRow from corehq.apps.reports.standard import ProjectReport from corehq.apps.style.decorators import use_nvd3 from corehq.apps.users.util ...
Python
0.000003
@@ -3251,16 +3251,17 @@ _forms %3E += row.use
eb43d2ed017259b9aa993c3057db5e7cf9bc054f
change mensage except
totvserprm/baseapi.py
totvserprm/baseapi.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from auth import create_service from dicttoxml import dicttoxml from lxml import objectify from totvserprm.utils import ClassFactory, normalize_xml from totvserprm.exceptions import ApiError class BaseApi(object): dataservername = '' def __init__...
Python
0.000001
@@ -249,16 +249,17 @@ iError%0A%0A +%0A class Ba @@ -544,16 +544,29 @@ eRecord( +%0A DataServ @@ -799,16 +799,33 @@ Factory( +%0A self.__c @@ -1017,16 +1017,33 @@ .format( +%0A self.__c @@ -1067,16 +1067,42 @@ response +.encode('ascii', 'ignore') ))%0A%0A @@ -16...
884c5f17f1f739ffea1aa16205f147cb04d5dc99
add cast to float
tourbillon/log/log.py
tourbillon/log/log.py
import logging import re import time logger = logging.getLogger(__name__) def get_logfile_metrics(agent): def follow(thefile, run_event): thefile.seek(0, 2) while run_event.is_set(): line = thefile.readline() if not line: time.sleep(config['frequency']) ...
Python
0.000001
@@ -1235,16 +1235,111 @@ (value)%0A + elif elem%5B'cast'%5D == 'float':%0A value = float(value)%0A
a1812fbe272ca5df325c50acd509467c8bd576f1
Rename serializers and use schema_id for registry
osf/utils/metadata/serializers.py
osf/utils/metadata/serializers.py
from website.settings import DOMAIN, DOI_FORMAT, DATACITE_PREFIX from datacite import schema40 import jsonschema serializer_registry = {} def register(schema_name): """Register classes into serializer_registry""" def decorator(cls): serializer_registry[schema_name] = cls return cls return ...
Python
0
@@ -153,20 +153,18 @@ (schema_ -name +id ):%0A %22 @@ -269,20 +269,18 @@ %5Bschema_ -name +id %5D = cls%0A @@ -327,22 +327,30 @@ %0A%0Aclass -Schema +MetadataRecord Serializ @@ -1053,20 +1053,18 @@ (schema_ -name +id ='dataci @@ -1090,16 +1090,22 @@ Metadata +Record Serializ @@ -1111,14 +1111,22 @@ zer( ...
2e8c31b84425f8b8e0bd3387e3b1744f9dbf577a
make status resource compatible to models one
proso_models/views.py
proso_models/views.py
from django.shortcuts import render from django.http import HttpResponseBadRequest from proso.django.request import is_time_overriden, get_time, get_user_id from proso.django.response import render_json from models import get_environment, Answer, Item import numpy import json_enrich import proso_common.json_enrich as c...
Python
0
@@ -626,21 +626,25 @@ ' +number_of_ answers -_total ': A @@ -702,23 +702,33 @@ ' -answers_correct +number_of_correct_answers ': A
4821cb6ee23c4547d7323aa626af197212f0f946
Fix flake8 warnings.
training/plot-loss.py
training/plot-loss.py
#!/usr/bin/env python3 # # Copyright 2015 Carnegie Mellon University # # 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 ...
Python
0
@@ -753,19 +753,8 @@ t os -%0Aimport sys %0A%0Asc @@ -2120,23 +2120,8 @@ s'%5D) -%0A #
345dafda1765fae7f1803b448251af2718962082
Make Timer.start() return the timer instance to ease chaining
statsd/timer.py
statsd/timer.py
import contextlib import time import statsd class Timer(statsd.Client): ''' Statsd Timer Object Additional documentation is available at the parent class :class:`~statsd.client.Client` :keyword name: The name for this timer :type name: str :keyword connection: The connection to use, will...
Python
0.000009
@@ -608,30 +608,16 @@ n_name') -%0A %3E%3E%3E timer .start() @@ -1090,16 +1090,187 @@ instance +%0A%0A It returns the timer instance so it can be chained when instantiating%0A the timer instance like this:%0A %60%60timer = Timer('application_name').start()%60%60 '''%0A @@ -1410,16 +1410,...
11e014fed4c34c927e259a1465343905ff73a944
Add "h" for help and "i" for song info in the stdinconsole
stdinconsole.py
stdinconsole.py
# MusicPlayer, https://github.com/albertz/music-player # Copyright (c) 2012, Albert Zeyer, www.az2000.de # All rights reserved. # This code is under the 2-clause BSD license, see License.txt in the root directory of this project. from utils import * import sys, os stdinQueue = OnRequestQueue() def readNextInput(): ...
Python
0.000001
@@ -1567,16 +1567,271 @@ song%22%0A%0A +def printHelp():%0A%09print %22 h - print this help info%22%0A%09print %22Enter - next song%22%0A%09print %22space - play/pause%22%0A%09print %22 left - seek back 10 seconds%22%0A%09print %22right - seek forward 10 seconds%22%0A%09print %22 r - reload modules%22%0A%09prin...
9aebe02e2342b628cacddb68d2f894fca0bf7463
Fix socket overflow
ts3observer/models.py
ts3observer/models.py
''' Created on Dec 1, 2014 @author: fechnert ''' class Client(object): ''' Represents the client ''' def __init__(self, clid, socket, **kwargs): ''' Fill the object dynamically with client attributes got from telnet ''' self.clid = clid self.socket = socket for key, value in k...
Python
0.000002
@@ -854,16 +854,60 @@ f.clid)) +%0A self.socket.read_until('msg=ok', 2) %0A%0A de
71ad3fcedcc91586d93ef1fdd20a3a05bdb33ac8
Use our DAVFile
twistedcaldav/root.py
twistedcaldav/root.py
## # Copyright (c) 2005-2006 Apple Computer, 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 ap...
Python
0
@@ -911,16 +911,17 @@ davxml%0A +%0A from twi @@ -928,24 +928,25 @@ sted -.web2.dav.static +caldav.extensions imp @@ -957,17 +957,16 @@ DAVFile%0A -%0A from twi
9a68ee8ee8d94b46dd8481e6d222c82338975602
Update documentation of txt2for_prediction script
txt2for_prediction.py
txt2for_prediction.py
"""Script to convert text file to input for embem classifier. The script tokenizes the text and writes it to a new file containing: <sentence id>\t<sentence (tokens separated by space)>\tNone\n Usage: python txt2ml.py <dir in> <dir out> """ import argparse import nltk.data from nltk.tokenize import word_tokenize imp...
Python
0
@@ -445,28 +445,17 @@ lp=' -the name of the list +directory con @@ -466,16 +466,27 @@ ing the +input text '%0A @@ -508,38 +508,13 @@ ' -selected ceneton titles (xlsx) +files ')%0A
212261782cbee393c87e760688bd819de689cc51
add post support for trace search
ui/app/index/views.py
ui/app/index/views.py
from flask import request, redirect, render_template from . import index from .. import db @index.route('/', methods=['GET']) def index(): # get database engine connection connection = db.engine.connect() # populate spans spans = [] result = connection.execute("SELECT DISTINCT span_name FROM zipk...
Python
0
@@ -118,16 +118,24 @@ s=%5B'GET' +, 'POST' %5D)%0Adef i
46ab31112853fd1819a392d2b58ba60754a14b38
fix language reference in language command
ext/joselang.py
ext/joselang.py
#!/usr/bin/env python3 import discord import asyncio import sys sys.path.append("..") import jauxiliar as jaux import joseerror as je import josecommon as jcommon class JoseLanguage(jaux.Auxiliar): def __init__(self, cl): jaux.Auxiliar.__init__(self, cl) self.LANGLIST = [ 'pt', 'en' ...
Python
0.000222
@@ -1132,53 +1132,8 @@ Ms%22) -%0A #await cxt.sayt(%22jlang_no_lang%22) %0A%0A @@ -1351,65 +1351,11 @@ und%22 -)%0A #await cxt.sayt(%22jlang_lang_404%22, language= + %25 lang @@ -1515,69 +1515,8 @@ ge)%0A - #await cxt.sayt(%22jlang_set_lang%22, language=language)%0A
2ed53a0d92834e1efd486d9bcfc307c37bacb0d7
fix traceparent header propagation for older versions of requests (#309)
elasticapm/instrumentation/packages/urllib3.py
elasticapm/instrumentation/packages/urllib3.py
from elasticapm.conf import constants from elasticapm.instrumentation.packages.base import AbstractInstrumentedModule from elasticapm.traces import DroppedSpan, capture_span, get_transaction from elasticapm.utils import default_ports from elasticapm.utils.disttracing import TracingOptions class Urllib3Instrumentation...
Python
0
@@ -388,16 +388,25 @@ list = %5B +%0A (%22urllib @@ -453,16 +453,106 @@ rlopen%22) +,%0A (%22requests.packages.urllib3.connectionpool%22, %22HTTPConnectionPool.urlopen%22),%0A %5D%0A%0A d
94cc01965a82c7f512bba140a30588a6c7eb5d30
fix DictionaryTestCase: alter test_nonexistent_english_word
english_diary/diaries/tests/test_dictionary.py
english_diary/diaries/tests/test_dictionary.py
from django.core.urlresolvers import reverse from rest_framework import status from rest_framework.test import APITestCase class DictionaryTestCase(APITestCase): def test_dictionary_api_should_return_english_word_form_korean_word(self): test_korean_word = "사과" test_dictionary_url = reverse( ...
Python
0.000035
@@ -1967,38 +1967,39 @@ est_nonexistent_ -korean +english _word = %22asdf%22%0A @@ -1991,16 +1991,23 @@ word = %22 +asfasdf asdf%22%0A @@ -2132,38 +2132,39 @@ est_nonexistent_ -korean +english _word,%0A
85b7ce0fd6326cb2f4a965a854b94a9534b8cfd7
Fix off-by-one errors in page handling
survey/views.py
survey/views.py
from django.shortcuts import get_object_or_404, redirect, render from django.utils import simplejson from django.utils.translation import ugettext as _ from survey.forms import QuestionForm from survey.models import Survey, Question, SurveyAnswer def home(request, code): survey = get_object_or_404(Survey.objects...
Python
0.000086
@@ -1510,16 +1510,17 @@ offset %3C += len(pag @@ -1893,16 +1893,72 @@ form,%0A%0A + 'page': page,%0A 'page_count': len(pages),%0A @@ -2027,20 +2027,16 @@ n(pages) - - 1 ,%0A
5d5ec48527bc00646610e6533880c34f24749bf4
Fix bug about checking type of datasource
table/tables.py
table/tables.py
#!/usr/bin/env python # coding: utf-8 import copy import traceback from django.db.models.query import QuerySet from django.utils.safestring import mark_safe from django.utils.datastructures import SortedDict from columns import Column, BoundColumn, SequenceColumn from addon import (TableSearchBox, TableInfoLabel, Tabl...
Python
0
@@ -453,192 +453,195 @@ -if isinstance(data, QuerySet) or isinstance(data, list):%0A self.data = data%0A else:%0A model = getattr(self.opts, 'model', None)%0A if not model:%0A +model = getattr(self.opts, 'model', None)%0A if model:%0A self.data = model...
adb0576ced11713fd75aa132107456f453bca669
Revert accidental removal of __future__.unicode_literals from taggit/admin.py
taggit/admin.py
taggit/admin.py
from django.contrib import admin from taggit.models import Tag, TaggedItem class TaggedItemInline(admin.StackedInline): model = TaggedItem class TagAdmin(admin.ModelAdmin): inlines = [TaggedItemInline] list_display = ["name", "slug"] ordering = ["name", "slug"] search_fields = ["name"] prep...
Python
0.000001
@@ -1,12 +1,53 @@ +from __future__ import unicode_literals%0A%0A from django.
e02d16b58e26924a657dc140a7d6f06fab6c1dca
Revert "Removes redundant definition"
tasklib/lazy.py
tasklib/lazy.py
""" Provides lazy implementations for Task and TaskQuerySet. """ class LazyUUIDTask(object): """ A lazy wrapper around Task object, referenced by UUID. - Supports comparison with LazyUUIDTask or Task objects (equality by UUIDs) - If any attribute other than 'uuid' requested, a lookup in the bac...
Python
0
@@ -1101,16 +1101,84 @@ uuid'%5D%0A%0A + def __ne__(self, other):%0A return not self.__eq__(other)%0A%0A def
545af528f6e6735714949822f96355053a9a530d
Make message fetching more resilient
provokator/manager.py
provokator/manager.py
#!/usr/bin/python3 -tt # -*- coding: utf-8 -*- __all__ = ['Manager'] from twisted.internet import task, reactor from twisted.python import log from urllib.parse import urljoin from datetime import datetime import requests class Manager(object): KINDS = ['incoming', 'outgoing', 'checked', 'failed', 'sent'] ...
Python
0.000001
@@ -513,16 +513,37 @@ .KINDS:%0A + try:%0A @@ -599,32 +599,164 @@ %25 kind)).json() +%0A except:%0A log.msg('Failed to fetch %25s messages', kind)%0A log.err()%0A continue %0A%0A fo @@ -981,32 +981,57 @@ continue%0A%0...
446ff54b0818df5b770c1295e230fb0e4be2aeff
Add logging
tenant/utils.py
tenant/utils.py
from django.utils.functional import curry from tenant.signals import tenant_provider import threading import os import sys import urlparse def get_current_tenant(sender=None, **hints): if sender is None: sender = threading.current_thread() tenant = None responses = tenant_provider.send(sender=s...
Python
0.000002
@@ -135,16 +135,69 @@ lparse%0A%0A +import logging%0Alogger = logging.getLogger(__name__)%0A%0A %0Adef get @@ -302,16 +302,20 @@ hread()%0A + %0A ten @@ -325,16 +325,21 @@ = None%0A + %0A resp @@ -391,21 +391,16 @@ *hints)%0A - %0A for @@ -517,121 +517,237 @@ def -connect_tenant_provide...
1737fa10f60a736f9a3a5bc6189b9940a635924d
fix real_n
pseudopy/visualize.py
pseudopy/visualize.py
from matplotlib import pyplot import numpy from matplotlib.tri import Triangulation from . import compute def visualize(A, real_min=-1, real_max=1, real_n=50, imag_min=-1, imag_max=1, imag_n=50, levels=None ): real = numpy.linspace(real_min, real_max, real_...
Python
0.99918
@@ -358,28 +358,28 @@ , imag_max, -real +imag _n)%0A%0A x, @@ -580,16 +580,38 @@ =levels) +%0A pyplot.colorbar() %0A%0A py
a2403144238da46615135e3b52d0a428fea21c62
remove print iter_
pySINGLE/fitSINGLE.py
pySINGLE/fitSINGLE.py
## For given values of lambda1 and lambda2 we minimise the SINGLE objective function and calculate AIC ## #import pandas import math import numpy import os #import spams from scipy.linalg import solveh_banded import multiprocessing from operator import add, sub import itertools from FastFused_01 import * def fit...
Python
0.000002
@@ -3271,16 +3271,17 @@ = Z%5B:%5D%0A%09 +# print it
5081d7739d14ebbfbc9058afdd61933511e6f812
Fix import structure
pycanvas/requester.py
pycanvas/requester.py
from pycanvas.exceptions import ( BadRequest, CanvasException, InvalidAccessToken, ResourceDoesNotExist, Unauthorized ) import requests class Requester(object): """ Responsible for handling HTTP requests. """ def __init__(self, base_url, access_token, mock_adapter): """ :param...
Python
0.000003
@@ -1,12 +1,29 @@ +import requests%0A%0A from pycanva @@ -138,32 +138,16 @@ rized%0A)%0A -import requests%0A %0A%0Aclass
d50d5240821cc9dbdfbf29867444df99936559bb
fix base name
pycket/entry_point.py
pycket/entry_point.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # from pycket.expand import load_json_ast_rpython, expand_to_ast, PermException from pycket.interpreter import interpret_one, ToplevelEnv, interpret_module, GlobalConfig from pycket.error import SchemeException from pycket.option_helper import parse_args, ensure_json_ast f...
Python
0.000006
@@ -1411,17 +1411,16 @@ 'pycket -- '%0A if
4a42b40379766750b31e5fe09d1feb4838d2dedf
Fix bug in commit:7517cdfe
pycroft/model/user.py
pycroft/model/user.py
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. """ pycroft.model.user ~~~~~~~~~~~~~~ This module contains the class User. ...
Python
0
@@ -3865,18 +3865,27 @@ gin= -self. +kwargs.get(%22 login +%22) ),%0A
ff62b9542704f2d30da0b536b392d570181bd599
Add a missing import to the ZayPay script
pyfsw/views/zaypay.py
pyfsw/views/zaypay.py
from flask import render_template, request from pyfsw import app, db from pyfsw import login_required from pyfsw import Account, ZayPayHistory from pyfsw import ZAYPAY_OPTIONS import requests from bs4 import BeautifulSoup from time import time def zaypay_show_payment(payment_id, option): request = requests.get('htt...
Python
0.000001
@@ -95,16 +95,30 @@ required +, current_user %0Afrom py
1ec8c1e0505c2b550edec6631b03e02caf41f8cf
Format docstrings in utils/exc.py
pylearn2/utils/exc.py
pylearn2/utils/exc.py
__author__ = "Ian Goodfellow" """ Exceptions used by basic support utilities. """ class EnvironmentVariableError(Exception): """ An exception raised when a required environment variable is not defined """ def __init__(self, *args): super(EnvironmentVariableError,self).__init__(*args)
Python
0
@@ -126,16 +126,20 @@ %0A %22%22%22 +%0A An exce @@ -202,16 +202,20 @@ defined +%0A %22%22%22%0A%0A
23ad83a7c4ef1d2f14b4d939e0eb5b33616d5580
Change get_user to use __get internal method
pynexus/api_client.py
pynexus/api_client.py
import requests import json class ApiClient: def __init__(self, host, username, password): self.uri = host + '/nexus/service/local' self.username = username self.password = password def __get(self, resource): r = requests.get(self.uri + '/' + resource, auth=(self.username, self...
Python
0.000013
@@ -2202,132 +2202,42 @@ r = -requests.get(self.uri + 'users' + '/' + user_id, auth=(self.username, self.password), headers=%7B'Accept': 'application/json'%7D +self.__get('users' + '/' + user_id )%0A%0A
f585746da7e4a01eed023b15a756df5422bf42b9
Bump version
pysnooper/__init__.py
pysnooper/__init__.py
# Copyright 2019 Ram Rachum and collaborators. # This program is distributed under the MIT license. ''' PySnooper - Never use print for debugging again Usage: import pysnooper @pysnooper.snoop() def your_function(x): ... A log will be written to stderr showing the lines executed and variables ch...
Python
0
@@ -668,17 +668,17 @@ = '0.2. -0 +1 '%0A__vers
be0a60325944c7f5364a51a8cf72826f21de9e1a
add __enter__ and __exit__ for python LockWrapper, and support recursion
python/context/api.py
python/context/api.py
from __future__ import print_function from decorator import decorator from urlparse import urlparse import time import platform import threading import os import sys ####################################################################### # Library API ##################################################################...
Python
0.000001
@@ -30,16 +30,33 @@ function +, absolute_import %0Afrom de @@ -5369,16 +5369,165 @@ e = name +%0A self.counter = 0%0A%0A def __enter__(self):%0A self.acquire()%0A%0A def __exit__(self, exc_type, exc_val, exc_tb):%0A self.release() %0A%0A de @@ -5574,16 +5574,38 @@ blocking + and self....
a32cb241eaf8971bd27713e32f3804d77a9d39ee
Revert "Revert "util: T2226: rewrite remote function helpers to use cmd""
python/vyos/remote.py
python/vyos/remote.py
# Copyright 2019 VyOS maintainers and contributors <maintainers@vyos.io> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any lat...
Python
0
@@ -778,25 +778,43 @@ put%0A -import subprocess +%0Afrom vyos.util import cmd, DEVNULL %0A%0A%0Ad @@ -1220,165 +1220,40 @@ y = -subprocess.check_output(keyscan_cmd, shell=True,%0A stderr=subprocess.DEVNULL,%0A +cmd(keyscan_cmd, stderr=D...
b0836027703d8407c3e701f6550970c381d557f4
Use "local" as default domain
python/wfut-server.py
python/wfut-server.py
#!/usr/bin/python import string import gobject import avahi import dbus from dbus.mainloop.glib import DBusGMainLoop ## setup some globals serviceName = "WFUT Server" serviceType = "_wfut._tcp" servicePort = 0; serviceTXT = "" domain = "" host = "" group = None rename_count = 12 ## Root of http server serverRoot...
Python
0.000011
@@ -235,16 +235,21 @@ main = %22 +local %22%0Ahost =
92b46fefd49dc8878fbb60f4a8bf18d27dc06be4
Add connect and read timeout for http requests.
qds_sdk/connection.py
qds_sdk/connection.py
import sys import requests import logging import ssl import json import pkg_resources from requests.adapters import HTTPAdapter try: from requests.packages.urllib3.poolmanager import PoolManager except ImportError: from urllib3.poolmanager import PoolManager from qds_sdk.retry import retry from qds_sdk.exceptio...
Python
0
@@ -2555,24 +2555,43 @@ = x.get(url, + timeout=(30, 300), **kwargs)%0A @@ -2645,24 +2645,43 @@ x.post(url, + timeout=(30, 300), **kwargs)%0A @@ -2733,24 +2733,43 @@ = x.put(url, + timeout=(30, 300), **kwargs)%0A @@ -2831,16 +2831,35 @@ ete(url, + timeout=(30, 300), **kwarg
dfc00e8fff7c49b6b732bfb6cca3fee45768bc70
Replace ROIError with StagingError.
qipipe/staging/roi.py
qipipe/staging/roi.py
""" OHSU - ROI utility functions. TODO - move this to ohsu-qipipe. """ import os import re import glob import qiutil class ROIError(Exception): pass class LesionROI(object): """ Aggregate with attributes :attr:`lesion` :attr:`volume`, :attr:`slice` and :attr:`location`. """ def __init__(se...
Python
0.000001
@@ -116,45 +116,156 @@ til%0A -%0A%0Aclass ROIError(Exception):%0A pass +from .staging_error import StagingError%0A%0APARAM_REGEX = re.compile('(?P%3Ckey%3E%5Cw+)%5Cs*%5C:%5Cs*(?P%3Cvalue%3E%5Cw+)')%0A%22%22%22%0AThe regex to parse a parameter file.%0A%22%22%22 %0A%0A%0Ac @@ -1275,118 +1275,8 @@ )%0A%0A%0A -PARAM...
1d99bcd27a6d5eaf47dab6e9fef61576a1bbd5dd
you need user agent for this to return 200
reddit_py/comments.py
reddit_py/comments.py
__author__ = 'idclark' import requests as r #TODO this returns 404 def comments_from_article(subreddit, article, sort): """ return the comments for a given subreddit and article user can sort by: confidence, top, new, hot, controversial, old, random > comments = comments_from_article('python', 'th...
Python
0.999996
@@ -636,16 +636,68 @@ : sort%7D%0A + headers = %7B'User-Agent' : 'reddit_py comments'%7D%0A resp @@ -723,16 +723,33 @@ ata=data +, headers=headers )%0A re
3aa4f192f4ef4807586458234708a9424bb0b8e6
make separate tests for raised 'Error'
tests/cupy_tests/binary_tests/test_packing.py
tests/cupy_tests/binary_tests/test_packing.py
import numpy import unittest import pytest import cupy from cupy import testing @testing.gpu class TestPacking(unittest.TestCase): @testing.for_int_dtypes() @testing.numpy_cupy_array_equal() def check_packbits(self, data, xp, dtype): # Note numpy <= 1.9 raises an Exception when an input array is ...
Python
0.000005
@@ -1371,16 +1371,58 @@ 3, 213%5D) +%0A%0A def test_unpack_invalid_array(self): %0A @@ -1916,32 +1916,74 @@ 3%5D, bitorder=bo) +%0A%0A def test_unpack_invalid_order(self): %0A a = cup
be39343f8db68b33a4fc246b5a7451344353aa94
Allow arbitrary output types in job graph (#462)
tools/turbinia_job_graph.py
tools/turbinia_job_graph.py
# -*- coding: utf-8 -*- # Copyright 2018 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 ...
Python
0.000001
@@ -1,8 +1,33 @@ +#!/usr/bin/env python -v%0A # -*- co @@ -672,16 +672,54 @@ ps.%22%22%22%0A%0A +from __future__ import print_function%0A from __f @@ -782,16 +782,27 @@ graphviz +%0Aimport sys %0A%0Afrom t @@ -1650,92 +1650,428 @@ ent( -'filename', type=unicode, help='where to save the file')%0A args = parser.pa...
f5b5d3f65ab3377bab3c0273367d8ab2fa5dfdaa
Use str.split maxsplit in the time component
homeassistant/components/scheduler/time.py
homeassistant/components/scheduler/time.py
""" homeassistant.components.scheduler.time ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ An event in the scheduler component that will call the service every specified day at the time specified. A time event need to have the type 'time', which service to call and at which time. { "type": "time", "service": "switch....
Python
0.000001
@@ -884,16 +884,19 @@ plit(':' +, 3 )%5D%0A%0A
b6e0f538c5e8d1121cdcec8ad580980122b23cb3
Update tts.py (#24892)
homeassistant/components/watson_tts/tts.py
homeassistant/components/watson_tts/tts.py
"""Support for IBM Watson TTS integration.""" import logging import voluptuous as vol from homeassistant.components.tts import PLATFORM_SCHEMA, Provider import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name__) CONF_URL = 'watson_url' CONF_APIKEY = 'watson_apikey' ATTR_CREDENTIALS =...
Python
0
@@ -595,32 +595,59 @@ BirgitV2Voice%22,%0A + %22de-DE_BirgitV3Voice%22,%0A %22de-DE_Diete @@ -691,18 +691,70 @@ %22 -en-GB_Kate +de-DE_DieterV3Voice%22,%0A %22en-GB_KateVoice%22,%0A %22en-GB_KateV3 Voic @@ -803,32 +803,60 @@ llisonV2Voice%22,%0A + %22en-US_AllisonV3Voice%22,%0A %22en-US_Lis...
c0095e52fe5643c30b7bc2201a499988981c6bee
update parameter order after default index update
hs_core/hydro_realtime_signal_processor.py
hs_core/hydro_realtime_signal_processor.py
from django.db import models from haystack.signals import RealtimeSignalProcessor from haystack.exceptions import NotHandled import logging import types from haystack.query import SearchQuerySet from haystack.utils import get_identifier from hs_core.models import SOLRQueue logger = logging.getLogger(__name__) def so...
Python
0
@@ -1832,30 +1832,30 @@ _update( -index, newbase +, index )%0A @@ -1929,22 +1929,22 @@ ete( -index, newbase +, index )%0A
347e30b047f3e972e70bd47fdaf0e96a1f48fd5b
Fix getting the base name of a directory
euxfel_h5tools/lsxfel.py
euxfel_h5tools/lsxfel.py
"""Summarise XFEL data in files or folders """ import argparse from enum import Enum import os import re import sys from .reader import H5File, RunHandler, FilenameInfo def find_image(h5file): """Find the image data in a detector file Returns (img_data, index). img_data is a HDF5 dataset, index is a group ...
Python
0.000015
@@ -3021,16 +3021,28 @@ ath(path +.rstrip('/') ))%0A%0A
8e225f890fd90112a125648cbd49507340cd3224
Fix type of EventIndex fields
events/search_indexes.py
events/search_indexes.py
from haystack import indexes from .models import Event, Place, PublicationStatus from django.utils.html import strip_tags class EventIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) autosuggest = indexes.EdgeNgramField(model_attr='name') start_time ...
Python
0.000001
@@ -319,32 +319,36 @@ e = indexes.Date +Time Field(model_attr @@ -389,16 +389,20 @@ xes.Date +Time Field(mo
bcda8fcb2c15ac70a3afccd384fd48fe349c5d07
Implement ComputerPlayer.takeTurn()
Player.py
Player.py
class Player: def __init__(self, symbol, board): self.symbol = symbol board.players[symbol] = self self.board = board def __str__(self): return self.symbol class ComputerPlayer(Player): def __init__(self, symbol, board): Player.__init__(self, symbol, board) ...
Python
0.00002
@@ -335,16 +335,946 @@ s = %7B%7D%0A%0A + def takeTurn(self):%0A bestMove = None%0A bestOutcome = %22lose%22%0A%0A # Try moving to all possible spaces%0A for i in xrange(3):%0A for j in xrange(3):%0A if self.board%5Bi%5D%5Bj%5D == ' ':%0A self...
13a06f5a66c1aef5b7930bc8d76c68cc45e55203
Drop --download-only error message
test/make_dist.py
test/make_dist.py
#!/usr/bin/python3 # This file is part of Cockpit. # # Copyright (C) 2021 Red Hat, Inc. # # Cockpit is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your optio...
Python
0.000002
@@ -5788,95 +5788,8 @@ se:%0A - print(%22make_dist: Download failed: pre-built dist tarball does not exist%22)%0A
cb22e2d4985f7a513ec5686bea67573ab7cd507d
fix documentation
src/mlstatpy/graph/graphviz_helper.py
src/mlstatpy/graph/graphviz_helper.py
""" @file @brief graphviz helper """ import os import sys from pyquickhelper.loghelper import run_cmd from pyquickhelper.helpgen.conf_path_tools import find_graphviz_dot def run_graphviz(filename, image, engine="dot"): """ run graphviz @param filename filename which contains the graph definit...
Python
0
@@ -1496,33 +1496,22 @@ rom -ensae_teaching_cs.helpers +mlstatpy.graph .gra
cede3eca619d52b72eabe583a1c48f6d6c57d218
Update URLs to data files
sanskrit_parser/util/lexical_scorer.py
sanskrit_parser/util/lexical_scorer.py
''' Scorer for lexical splits Uses word2vec based scoring the splits. The splits are passed through sentencepiece first to handle possibly unseen words Requires sentencepiece to be installed @author: avinashvarna ''' from __future__ import print_function, unicode_literals import os import sys import six import gens...
Python
0.000001
@@ -525,37 +525,30 @@ parser/blob/ -sanskrit_util +master /data/senten @@ -650,21 +650,14 @@ lob/ -sanskrit_util +master /dat
469e763f1e5fc119d32baa75e7d38058e275d079
Fix pylint
sasmodels/models/triaxial_ellipsoid.py
sasmodels/models/triaxial_ellipsoid.py
# triaxial ellipsoid model # Note: model title and parameter table are inserted automatically r""" All three axes are of different lengths with $R_a \leq R_b \leq R_c$ **Users should maintain this inequality for all calculations**. .. math:: P(q) = \text{scale} V \left< F^2(q) \right> + \text{background} where t...
Python
0.000099
@@ -2596,17 +2596,16 @@ le X-Ray - %0Aand Neu
42691d86c3eb5abe12ec651c7b0b400675594cdb
Make the NEWAUTHOR argument to 'svn-tweak-author.py replace' optional, indicating that you'd like to delete instances of particular author.
contrib/server-side/svn-tweak-author.py
contrib/server-side/svn-tweak-author.py
#!/usr/bin/env python # ==================================================================== # # svn-tweak-author.py # # This script allows for server-side tweaks of the svn:author property # in two modes: single-revision and search-and-replace. Both modes # bypass the repository hook subsystem. # # ================...
Python
0.000806
@@ -1561,16 +1561,17 @@ DAUTHOR +%5B NEWAUTHO @@ -1571,16 +1571,17 @@ EWAUTHOR +%5D %0A @@ -1610,16 +1610,17 @@ ion REV +%5B NEWAUTHO @@ -1620,16 +1620,17 @@ EWAUTHOR +%5D %0A%0AChange @@ -1900,16 +1900,99 @@ WAUTHOR. +%0AIn either mode, if NEWAUTHOR is not provided, the existing author will%0Abe dele...
25ae3020afbb55efc90a2c7cb88434a7e1b45b5a
Fix an issue that may lead to an excessive memory usage in Tracer. (#1208)
angr/procedures/tracer/random.py
angr/procedures/tracer/random.py
import angr import claripy class random(angr.SimProcedure): #pylint:disable=arguments-differ IS_SYSCALL = True def run(self, buf, count, rnd_bytes): # return code r = self.state.solver.ite_cases(((self.state.cgc.addr_invalid(buf), self.state.cgc.EFAULT), ...
Python
0.000001
@@ -618,16 +618,91 @@ t!=0%5D):%0A + max_size = min(1024768 * 10, self.state.solver.max_int(count))%0A @@ -793,40 +793,16 @@ ' * -self.state.solver.max_int(count) +max_size ),%0A @@ -846,16 +846,53 @@ ze=count +%0A )%0A%0A
40905893c296e2c812539079925adfd25e39d44f
Change location of default settings in WSGI
wger/wsgi.py
wger/wsgi.py
""" WSGI config for workout_manager project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLIC...
Python
0
@@ -726,24 +726,8 @@ %22, %22 -workout_manager. sett
21267356d6652b3d752855c12e50c7b48d1df22a
replace dingo's hard-coded config dir by value from file
dingo/tools/logger.py
dingo/tools/logger.py
"""This file is part of DINGO, the DIstribution Network GeneratOr. DINGO is a tool to generate synthetic medium and low voltage power distribution grids based on open data. It is developed in the project open_eGo: https://openegoproject.wordpress.com DINGO lives at github: https://github.com/openego/dingo/ The docume...
Python
0.000001
@@ -605,16 +605,103 @@ lssm%22%0A%0A%0A +from dingo.tools import config as cfg_dingo%0Acfg_dingo.load_config('config_files.cfg')%0A%0A import o @@ -1109,22 +1109,27 @@ ck in ~/ -.dingo +%3CDINGO_DIR%3E exists, @@ -1543,24 +1543,117 @@ ath%0A %22%22%22%0A + dingo_dir = str(cfg_dingo.get('config',%0A ...
0b74c42863c804696f94a493e21711b5a8beebfc
change availability to maximum lease
farmsList/farmsList/public/forms.py
farmsList/farmsList/public/forms.py
from flask_wtf import Form from wtforms import TextField, PasswordField, BooleanField, DecimalField from wtforms.validators import DataRequired from farmsList.user.models import User class LoginForm(Form): username = TextField('Username', validators=[DataRequired()]) password = PasswordField('Password', valid...
Python
0
@@ -2262,27 +2262,20 @@ d('M -in +ax imum -Availability +Lease ', v
977f114abae2779fa64b8086b083c6563dc20d83
Add gsutil to PATH in android_compile.py
slave/skia_slave_scripts/android_compile.py
slave/skia_slave_scripts/android_compile.py
#!/usr/bin/env python # 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. """ Compile step for Android """ from build_step import BuildStep from utils import shell_utils import os import sys ENV_VAR = '...
Python
0.000011
@@ -384,16 +384,163 @@ (self):%0A + os.environ%5B'PATH'%5D += os.pathsep + os.path.abspath(os.path.join(%0A os.pardir, os.pardir, os.pardir, os.pardir, 'third_party', 'gsutil'))%0A os.e
f6d2295980898b9d20dfdb7a2c539e311c75fa8e
Remove whitespace.
flask_admin/contrib/sqla/typefmt.py
flask_admin/contrib/sqla/typefmt.py
from sqlalchemy.ext.associationproxy import _AssociationList from flask_admin.model.typefmt import BASE_FORMATTERS, EXPORT_FORMATTERS, \ list_formatter from sqlalchemy.orm.collections import InstrumentedList def choice_formatter(view, choice): """ Return label of selected choice see https://s...
Python
0.999153
@@ -1334,20 +1334,16 @@ pass%0A - %0Atry:%0A
9a0c9042f88ed58bcf90ab63f7401f4f4ee6acfb
Enable INFO logging when debug is disabled.
wwwhisper_service/settings.py
wwwhisper_service/settings.py
# Django settings for wwwhisper_service project. DEBUG = False TEMPLATE_DEBUG = DEBUG # If WWWHISPER_STATIC is set, wwwhisper serves static html resources # needed for login and for the admin application (this is not needed # if these resources are served directly by a frontend server). # # In addition, auth request...
Python
0
@@ -3511,24 +3511,28 @@ name,%0A%7D%0A%0Aif +not TESTING:%0A @@ -3536,42 +3536,53 @@ -WWWHISPER_STATIC = None%0A%0Aif DEBUG: +LEVEL = %7BTrue: 'DEBUG', False: 'INFO'%7D%5BDEBUG%5D %0A @@ -3985,39 +3985,37 @@ 'level': -'DEBUG' +LEVEL ,%0A @@ -4267,39 +4267,37 @@ 'level':...
d5c65218ea57944b202a5dcd7170eff445ffe743
Fix median calculation.
examples/low_data/sider_graph_conv_one_fold.py
examples/low_data/sider_graph_conv_one_fold.py
""" Train low-data Sider models with graph-convolution. Test last fold only. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import tempfile import numpy as np import tensorflow as tf import deepchem as dc from deepchem.models.tensorgraph.models.graph_m...
Python
0.000021
@@ -963,16 +963,17 @@ uracies%0A +%0A task_sco @@ -1149,16 +1149,18 @@ al_num)%0A + %0A # Num @@ -1321,24 +1321,9 @@ del( -len(sider_tasks) +1 , gr @@ -2212,57 +2212,349 @@ s%22)%0A -print(np.median(np.array(mean_task_scores.values( +%22%22%22%0ATo support both python 3.x and 2.7%0Adict.values() returns an ob...
4c3526987c1ee2b96f53ff94d537e643cd94bec3
Enable in memory session cache backed by a DB.
wwwhisper_service/settings.py
wwwhisper_service/settings.py
# Django settings for wwwhisper_service project. DEBUG = False TEMPLATE_DEBUG = DEBUG # If WWWHISPER_STATIC is set, auth request returns html documents to # be displayed to the user along with 401 and 403 responses. This is # not always needed, for example nginx_auth_request module can not # pass returned response b...
Python
0
@@ -1535,16 +1535,224 @@ False%0A%0A +CACHES = %7B%0A 'default': %7B%0A 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',%0A# 'LOCATION': 'unique-snowflake'%0A %7D%0A%7D%0A%0ASESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'%0A%0A MIDDLEWA
0e96b4b5ce79a5f5c990247f6260da40f7d71a7c
clean podcast URLs
youtube_dl/extractor/acast.py
youtube_dl/extractor/acast.py
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( clean_html, int_or_none, parse_iso8601, ) class ACastBaseIE(InfoExtractor): def _extract_episode(self, episode, show_info): title = episode['title'] info = { ...
Python
0.000001
@@ -133,16 +133,39 @@ n_html,%0A + clean_podcast_url,%0A int_ @@ -433,24 +433,42 @@ 'url': +clean_podcast_url( episode%5B'url @@ -469,16 +469,17 @@ e%5B'url'%5D +) ,%0A
b0e691ab4cea564c591a1f9cffdc89e3d306ebec
Fix for Issue 5, submitted by agoratim.
stubout.py
stubout.py
#!/usr/bin/python2.4 # # Copyright 2008 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 o...
Python
0
@@ -4133,36 +4133,42 @@ bute is not None - and +:%0A if isinstance(old_ @@ -4195,24 +4195,26 @@ hod):%0A + old_child = @@ -4232,24 +4232,126 @@ d(old_child) +%0A elif isinstance(old_attribute, classmethod):%0A old_child = classmethod(old_child.im_func) %0A%0A self.c
699255a2b1d2dfa366d9b6561d0634d0c5d80d3b
Fix typo in tests.
databroker/tests/test_document.py
databroker/tests/test_document.py
import copy import pickle import pytest import json from ..core import Document, NotMutable, Descriptor def test_immutable(): d = Document({'a': 1}) with pytest.raises(NotMutable): # Update existing key d['a'] = 2 with pytest.raises(NotMutable): # Add new key d['b'] = 2 ...
Python
0.000003
@@ -88,26 +88,21 @@ utable, -Descriptor +Event %0A%0A%0Adef t @@ -1823,18 +1823,13 @@ E = -Descriptor +Event (%7B%0A
ee29659c5ecb918ccab7fdb4abfffabccfd0b708
Fix missing parameter when reporting error
zstacklib/zstacklib/utils/ssh.py
zstacklib/zstacklib/utils/ssh.py
''' @author: Frank ''' import paramiko import os.path import log logger = log.get_logger(__name__) logcmd = False class SshError(Exception): '''ssh error''' # credit to http://ginstrom.com/scribbles/2009/09/14/easy-sftp-uploading-with-paramiko/ class Sftp(object): """ Wraps paramiko...
Python
0.000011
@@ -3644,16 +3644,22 @@ ostname, + port, output,
935d6c20c00536cf39cf2844295266e64492bb10
Make duration non fatal and fix typo
youtube_dl/extractor/vidio.py
youtube_dl/extractor/vidio.py
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import int_or_none class VidioIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?vidio\.com/watch/(?P<id>\d+)-(?P<display_id>[^/?#&]+)' _TESTS = [{ 'url': 'http://www.vidio.com/watch/16...
Python
0.956008
@@ -2105,18 +2105,18 @@ %5D)(?P%3Cdu -a r +a tion%3E%5Cd+ @@ -2129,17 +2129,60 @@ webpage, - +%0A 'duration', fatal=False, group= 'duratio
6d96bf30782433b6551a924a9df1b2314b5f00cd
Update Deployments for Breaking API Change
github3/repos/deployment.py
github3/repos/deployment.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from json import loads from github3.models import GitHubCore from github3.users import User class Deployment(GitHubCore): CUSTOM_HEADERS = { 'Accept': 'application/vnd.github.cannonball-preview+json' } def __init__(self, deploym...
Python
0
@@ -60,31 +60,8 @@ rals -%0Afrom json import loads %0A%0Afr @@ -574,24 +574,157 @@ get('sha')%0A%0A + #: The reference used to create the Deployment, e.g.,%0A #: %60deploy-20140526%60%0A self.ref = deployment.get('ref')%0A%0A #: U @@ -1266,32 +1266,32 @@ the deployment%0A - s...
5637a5cc8ec0151972574e87c80bb9231a40501a
Fix stop/end bug
functions/eitu/main.py
functions/eitu/main.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import pytz import requests from icalendar import Calendar from datetime import datetime, timedelta from jinja2 import Environment, FileSystemLoader URL = 'https://dk.timeedit.net/web/itu/db1/public/ri6Q7ZYQQZ0Z5gQ9Q1gfQvXx5fY70Zc0nY5yZo.ics' BOXES = ['2A03', '2...
Python
0.000001
@@ -769,20 +769,19 @@ ' -stop +end ': c%5B'DT @@ -1516,12 +1516,11 @@ nt%5B' -stop +end '%5D:%0A @@ -2230,20 +2230,16 @@ utf-8')%0A - %0A git
9a56bed1c673a3e0350bc8196785792566a3baa4
Fix rendering of error messages in Qt GUI
glue/utils/qt/decorators.py
glue/utils/qt/decorators.py
from __future__ import absolute_import, division, print_function import sys import traceback from contextlib import contextmanager from functools import wraps __all__ = ['set_cursor', 'set_cursor_cm', 'messagebox_on_error', 'die_on_error'] def set_cursor(shape): """Set the Qt cursor for the duration ...
Python
0.000001
@@ -1535,17 +1535,14 @@ ep, -e.args%5B0%5D +str(e) )%0A
d254e85bbca12ac03e17dd3654ce0f4107b765c8
Update fx_xrates.py
fx_15_min/fx_xrates.py
fx_15_min/fx_xrates.py
from requests import get from bs4 import BeautifulSoup from datetime import datetime from pytz import timezone from csv import writer PAGES = [ 'http://www.x-rates.com/table/?from=USD&amount=1', 'http://www.x-rates.com/table/?from=gbp&amount=1', 'http://www.x-rates.com/table/?from=eur&amount=1', 'http...
Python
0.000001
@@ -143,448 +143,8 @@ = %5B%0A - 'http://www.x-rates.com/table/?from=USD&amount=1',%0A 'http://www.x-rates.com/table/?from=gbp&amount=1',%0A 'http://www.x-rates.com/table/?from=eur&amount=1',%0A 'http://www.x-rates.com/table/?from=cad&amount=1',%0A 'http://www.x-rates.com/table/?from=aud&amount=1',%0A ...
28446c32462f08a4c9637c0448ce5559277d5630
Fix key for adjustParameters once again
repour/adjust/util.py
repour/adjust/util.py
# flake8: noqa import argparse import asyncio import logging import os import re from xml.dom import minidom from .. import asutil, exception logger = logging.getLogger(__name__) REPOUR_JAVA_KEY = "-DRepour_Java=" stdout_options = asutil.process_stdout_options stderr_options = asutil.process_stderr_options def ge...
Python
0
@@ -3827,15 +3827,14 @@ if %22 -generic +adjust Para
d44b6c2a08607910d5c729e87c1bc3dff5c36160
Give this an appropriate name.
fedmsg/utils.py
fedmsg/utils.py
# This file is part of fedmsg. # Copyright (C) 2012 - 2014 Red Hat, Inc. # # fedmsg is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ver...
Python
0.999986
@@ -3863,33 +3863,33 @@ %22%22%22%0A%0A -keepalive +reconnect _options = %7B @@ -4073,33 +4073,33 @@ y, const in -keepalive +reconnect _options.ite
91b9a00c1f866704503fc2c46689df8125ec91fd
Update filter output
user_travel_filter.py
user_travel_filter.py
from user_tracker import * sys.path.insert(0, './Province') from province_point import * from geopy.distance import vincenty import operator def filterUser(userList, pvcmDict, speedT=0, distT=0, timeT=0, isAbove = True): 'Threshold: Speed in km/hr, distance in km, time in hour' opt = operator.ge if isAbove els...
Python
0.000001
@@ -339,17 +339,21 @@ filtUser -s +Tuple = %7B%7D%0A @@ -440,17 +440,16 @@ ontinue%0A -%0A @@ -652,17 +652,21 @@ filtUser -s +Tuple %5Buser.ui @@ -670,20 +670,55 @@ .uid%5D = +( user +, crossTravelData.travelFrom.time) %0A @@ -751,17 +751,21 @@ filtUser -s +Tuple %0A%0Adef wr @@ -783,24 +...
509cb0bbf4e613055a7e2c39b491b2156c3250cf
Fix user main group
userprofile/models.py
userprofile/models.py
from typing import Iterable, List from ckeditor.fields import RichTextField from django.contrib.auth.admin import User from django.core.files.base import ContentFile from django.db import models from django.shortcuts import reverse from django.utils import timezone from sorl.thumbnail import get_thumbnail from applic...
Python
0.000157
@@ -360,16 +360,56 @@ _number%0A +from committees.models import Committee%0A %0A%0Aclass @@ -4601,38 +4601,256 @@ (self):%0A -return +# Assumes first committee (usually just one) is the main group, with fallback to first group if no committees%0A return (%0A Committee.objects.filter(group_...
b8f55abbbf8ec14bed4342ec8081527533fd30d9
Add models based on existing libraries
api/savant/models.py
api/savant/models.py
from django.db import models class Comparison(models.Model): pass class Set(models.Model): pass class Playbook(models.Model): pass
Python
0
@@ -64,48 +64,766 @@ -pass%0A%0A%0Aclass Set(models.Model):%0A pass +%22%22%22A Comparison is a collection of diffs, for example as generated and%0A exported by the bassist.%22%22%22%0A diffs = models.ManyToManyField(%22Diff%22)%0A%0A%0Aclass Diff(models.Model):%0A # Hashed so it can't get added t...
d372ee4d8318d5be039002743657465fdb3e8c26
fix name of migration file.
migrations/versions/10_create_users.py
migrations/versions/10_create_users.py
"""empty message Revision ID: create_users Revises: None Create Date: 2015-11-24 10:39:19.827534 """ # revision identifiers, used by Alembic. revision = 'create_users' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): op.create_table('roles', sa.Column('id',...
Python
0
@@ -150,16 +150,19 @@ sion = ' +10_ create_u
4e314231b7d73d8bc07d6f1a1b9b1ffd7047246a
make sure shapes match in array equality
treelike/testing_helpers.py
treelike/testing_helpers.py
import sys import time import numpy as np from nose.tools import nottest def run_local_functions(prefix, locals_dict = None): if locals_dict is None: last_frame = sys._getframe() locals_dict = last_frame.f_back.f_locals good = set([]) # bad = set([]) for k, test in locals_dict.items(): if k.star...
Python
0.000008
@@ -1291,85 +1291,81 @@ lif -isinstance(x, np.ndarray) and not isinstance(y, np.ndarray):%0A return False +np.isscalar(x) and np.isnan(x):%0A return np.isscalar(x) and np.isnan(y) %0A e @@ -1477,16 +1477,17 @@ all( -xi == +eq(xi, yi +) for @@ -1529,484 +1529,51 @@ nce( -y, np.ndarray):%0A if isinstan...
85687cd8993ab1ae14ccb79c28c5abedad4b118e
allow get event fetches
trivago2015/events/views.py
trivago2015/events/views.py
import json import logging from django.shortcuts import render from django.http import HttpResponse from django.http import HttpResponseRedirect from django.views.decorators.csrf import csrf_exempt from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.views.decorators....
Python
0.000001
@@ -1481,32 +1481,170 @@ format.%0A %22%22%22%0A + def event_to_dict(event):%0A return %7B%0A 'title': event.title,%0A 'description': event.description,%0A %7D%0A%0A logger.info( @@ -1680,24 +1680,53 @@ uest.body))%0A + result = %5B%5D%0A try:%0A body = j ...
28a654aadb3f50f55a21959d8d22843a0779b19e
Add pagination
api_cats/settings.py
api_cats/settings.py
""" Django settings for api_cats project. Generated by 'django-admin startproject' using Django 1.9.1. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os ...
Python
0.000022
@@ -3576,11 +3576,114 @@ ',%0A ) +,%0A 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',%0A 'PAGE_SIZE': 25 %0A%7D%0A