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
3c9d45ad67b1a1c274cc5ee7a78d174595445733
Update websocket
websocket_data_collector.py
websocket_data_collector.py
#!venv/bin/python ''' websocket_data_collector.py This script uses websockets to transmit data collected by the NeuroPy module to a remote server. ''' import NeuroPy.NeuroPy as NP import socketIO_client import json import click from threading import Lock CLIENT_ID = "CLIENT1" # declare this globally socketIO = None...
Python
0.000001
@@ -724,118 +724,8 @@ doc%0A - return_dict = %7B%7D%0A return_dict%5B%22client_id%22%5D = CLIENT_ID%0A%0A # for now, do nothing when setting rawData%0A @@ -752,12 +752,13 @@ %22raw -Data +Value %22:%0A @@ -775,49 +775,86 @@ urn%0A +%0A -%0A return_dict%5B%22data%22%5D = %5B%7B%22type%22: +...
531c81d5654783da9443a2392fe878344ff07b3c
Update feed2db.py
newsman/bin/text_based_feeds/feed2db.py
newsman/bin/text_based_feeds/feed2db.py
#!/usr/bin/env python #-*- coding: utf-8 -*- """ feed2db works to turn text-based feed list into database """ # @author chengdujin # @contact chengdujin@gmail.com # @created Jul. 30, 2013 import sys reload(sys) sys.setdefaultencoding('UTF-8') sys.path.append('../..') from config.settings import Collection from conf...
Python
0
@@ -391,16 +391,17 @@ GISTRAR%0A +# FILE_PRE @@ -539,33 +539,32 @@ ds/feed_lists/'%0A -# FILE_PREFIX = '/ @@ -1553,16 +1553,57 @@ GISTRAR) +%0A db_id_list = open('db_id_list', 'w') %0A%0A fo @@ -2008,29 +2008,20 @@ nt feed_ -title, labels +link %0A%0A @@ -2066,16 +2066,21 @@ d_one(%7B' +feed_ link...
0cc7fbea3952485e8274c8df1b223fc791181035
Complete migrate from django to toilets script
ona_migration_script/migrate_toilets.py
ona_migration_script/migrate_toilets.py
Python
0.000001
@@ -0,0 +1,2418 @@ +import argparse%0A%0Afrom ona import OnaApiClient%0A%0A%0Adef generate_location(lat, lon):%0A return ' '.join(%5Bstr(lat), str(lon)%5D)%0A%0ACONVERSIONS = %7B%0A 'code': 'toilet_code', 'section': 'toilet_section',%0A 'cluster': 'toilet_cluster'%7D%0AADDITIONS = %7B%0A 'toilet_location': ...
2fc39a00cc1e720499b33637ff91220b0107d064
Fix test
lib/freetypy/tests/test_face.py
lib/freetypy/tests/test_face.py
# -*- coding: utf-8 -*- # Copyright (c) 2015, Michael Droettboom All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, t...
Python
0.000004
@@ -3371,22 +3371,9 @@ 65, -ft.LOAD.RENDER +0 )%0A%0A
b2e6d1ad8c20f72a75796639b9b5036cadb45e7b
Change back to serializing an explicit sweep order for the scripter.
JSONHelpers.py
JSONHelpers.py
import json, sys from traits.api import HasTraits import instruments from Sweeps import Sweep, SweepLibrary from MeasFilters import MeasFilterLibrary from QGL.Channels import PhysicalChannel, LogicalChannel, PhysicalQuadratureChannel from types import FunctionType class LibraryEncoder(json.JSONEncoder): """ Helpe...
Python
0
@@ -4179,41 +4179,117 @@ %09%09%09%09 -return %5Bobj.sweepDict%5Bk%5D for k in +jsonDict = %7Bname:sweep for name,sweep in obj.sweepDict.items() if sweep.enabled%7D%0A%09%09%09%09jsonDict%5B'sweepOrder'%5D = obj @@ -4299,17 +4299,16 @@ eepOrder -%5D %0A%09%09%09#For
183154c9a20d876eeeaf6703a9b3d618ad92cb60
remove assert in favor an if/else
openstackclient/common/parseractions.py
openstackclient/common/parseractions.py
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Python
0.000001
@@ -6169,32 +6169,11 @@ -try:%0A assert( +if int( @@ -6184,17 +6184,17 @@ es) %3E= 0 -) +: %0A @@ -6249,23 +6249,11 @@ e -xcept Exception +lse :%0A
d03a947723a182cbda604a1ceaa0a45595726cb7
add type of work in trello
Worklog-trello.py
Worklog-trello.py
import requests import json, csv from datetime import datetime import time, calendar from pytz import timezone import ConfigParser, os, sys import logging #logging.basicConfig(level=logging.INFO) #logger = logging.getLogger( __name__ ) logger = logging.getLogger() console = logging.StreamHandler() formatter = logging...
Python
0.000001
@@ -823,16 +823,69 @@ period') +%0Atypeofworkfield = config.get('CUSTOM', 'typeofwork') %0A%0Adef ge
99783e21eb63c7d44d1bb1d993b940825a0cdc66
Improve Visual proximity of comment.
account_hmrc_esl_declaration/wizard/account_vat_esl.py
account_hmrc_esl_declaration/wizard/account_vat_esl.py
# -*- coding: utf-8 -*- ############################################################################## # # ECSL Export for HMRC # Copyright (C) 2015 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
Python
0
@@ -3905,27 +3905,16 @@ '0', - # %22t
8ef9e3254fa3ad7b63a48db0b5b3b57c1bcc6c57
Initialize the amount variable
addons/account/wizard/wizard_statement_from_invoice.py
addons/account/wizard/wizard_statement_from_invoice.py
############################################################################## # # Copyright (c) 2008 Camptocamp SA All Rights Reserved. (JGG) # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential # consequences resulting from...
Python
0.000027
@@ -4182,24 +4182,45 @@ = line_date%0A + amount = 0.0%0A if l
c09e02f83369bf0290df2260f4409787ed8519cf
Use a plain TestCase for the two suites that alter INSTALLED_APPS
analytical/tests/test_tag_chartbeat.py
analytical/tests/test_tag_chartbeat.py
""" Tests for the Chartbeat template tags and filters. """ import re from django.conf import settings from django.contrib.sites.models import Site from django.http import HttpRequest from django.template import Context from analytical.templatetags.chartbeat import ChartbeatTopNode, \ ChartbeatBottomNode from...
Python
0
@@ -213,16 +213,49 @@ Context +%0Afrom django.test import TestCase %0A%0Afrom a @@ -637,27 +637,24 @@ CaseNoSites( -Tag TestCase):%0A @@ -991,19 +991,16 @@ thSites( -Tag TestCase @@ -1014,33 +1014,13 @@ def -test_rendering_setup_site +setUp (sel @@ -1206,16 +1206,57 @@ ity=0)%0A%0A + def test_rendering_s...
a7827ecf5e480c228c881180e63633712e3dbc3c
Modify ARDUINO_SEARCH_PATHS to include default ubuntu package location
site_scons/find_avrdude.py
site_scons/find_avrdude.py
import sys import os from itertools import chain from path import path home_dir = path('~').expand() ARDUINO_SEARCH_PATHS = [home_dir, ] if os.name == 'nt': from win32com.shell import shell, shellcon mydocs = shell.SHGetFolderPath(0, shellcon.CSIDL_PERSONAL, 0, 0) AVRDUDE_NAME = 'avrdude.exe' ARDUINO_...
Python
0
@@ -537,38 +537,27 @@ += %5B -home_dir / path('local/opt'), +path(%22/usr/share/%22) %5D%0A%0A%0A
03c237551aa08cb70fd397cc348e75531cdabd0e
fix schemas for password views
src/eduid_webapp/security/schemas.py
src/eduid_webapp/security/schemas.py
# -*- coding: utf-8 -*- # # Copyright (c) 2016 NORDUnet A/S # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # ...
Python
0.000002
@@ -1681,16 +1681,36 @@ e import + FluxStandardAction, EduidSc @@ -2067,35 +2067,42 @@ ponseSchema( -EduidSchema +FluxStandardAction ):%0A paylo @@ -2172,16 +2172,71 @@ oken'))%0A + csrf_token = fields.String(attribute='csrf_token')%0A %0A%0Aclass
daa92b15852b3572d7ef03392b061184dbbc76c1
fix to use the right cert in AuthServer provisioning
Code/scripts/provisionAuthServer.py
Code/scripts/provisionAuthServer.py
#!/usr/bin/env python from __future__ import print_function from subprocess import check_call import os import argparse parser = argparse.ArgumentParser(description="Generates the keys for authServer.exe") parser.add_argument("--scriptPath", required="true", help="The path to the directory that contains the scripts u...
Python
0
@@ -513,25 +513,25 @@ eMessage%22, %22 -A +a uthServerPub @@ -523,37 +523,29 @@ %22authServer -PublicKey.xml +/cert %22, %22authServ
93c34ad24f4dc675f1f8d212a6b1a7e53daf381b
change pinout values
RP/static_funcs.py
RP/static_funcs.py
#------------------------------------------------------------------------------- # Name: Static funcs # Purpose: # # Author: I070890 # # Created: 18/01/2015 # Copyright: (c) I070890 2015 # Licence: <your licence> #------------------------------------------------------------------------------- imp...
Python
0.000002
@@ -3118,17 +3118,17 @@ BEEP = 2 -2 +6 %0A @@ -3440,17 +3440,24 @@ +debug_ print - +( cmd +) %0A
fe4c62acd52a4060eebf4284c15c465970ea8932
remove duplicate enum key (#7173)
sdk/cognitiveservices/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/_luis_authoring_client_enums.py
sdk/cognitiveservices/azure-cognitiveservices-language-luis/azure/cognitiveservices/language/luis/authoring/models/_luis_authoring_client_enums.py
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
Python
0.000003
@@ -684,30 +684,8 @@ ed%22%0A - failed = %22FAILED%22%0A
b56882c5d3a145b571deb10f901f35c071c5c34d
Update release.py to blacklist thumbs.db and .ds_store as opposed to whitelisting known file types.
Release/release.py
Release/release.py
VERSION = '0.2.0' import shutil import os import io import sys def copyDirectory(source, target): source = source.replace('/', os.sep) target = target.replace('/', os.sep) os.makedirs(target) for file in os.listdir(source): fullpath = os.path.join(source, file) fulltargetpath = os.path.join(targe...
Python
0
@@ -414,112 +414,34 @@ ile. -endswith('.txt') or file.endswith('.cry'):%0D%0A%09%09%09# The intent of this is to avoid os generated files like +lower() in ('.ds_store', ' thum @@ -449,49 +449,29 @@ s.db +'): %0D%0A%09%09%09 -# Tweak if new file types are added. +pass%0D%0A%09%09else: %0D%0A%09%09
ba7fbebe4285de482028a5b88cc939b910bbcc6c
Remove some duplicated code
pombola/core/management/commands/core_find_stale_elasticsearch_documents.py
pombola/core/management/commands/core_find_stale_elasticsearch_documents.py
import sys from django.core.management.base import BaseCommand from haystack import connections as haystack_connections from haystack.exceptions import NotHandled from haystack.query import SearchQuerySet from haystack.utils.app_loading import ( haystack_get_models, haystack_load_apps ) def get_all_indexed_mode...
Python
0.003916
@@ -441,16 +441,114 @@ ckends:%0A + connection = haystack_connections%5Bbackend_key%5D%0A backend = connection.get_backend()%0A @@ -617,16 +617,16 @@ index()%0A - @@ -741,32 +741,40 @@ + index = unified_index.g @@ -1019,16 +1019,56 @@ nd_key,%0A + ...
7a72aa3ae46cf945ee47ecb3a84c482f2deddb7a
Add possibility of not remembering past - useful for when not using BPTT.
pybrain/structure/networks/recurrent.py
pybrain/structure/networks/recurrent.py
# -*- coding: utf-8 -*- """Module that contains the RecurrentNetwork class.""" __author__ = 'Justin Bayer, bayer.justin@googlemail.com' from pybrain.structure.networks.network import Network from pybrain.structure.connections.shared import SharedConnection class RecurrentNetworkComponent(object): sequentia...
Python
0
@@ -345,16 +345,24 @@ __(self, + forget, name=No @@ -442,16 +442,109 @@ fset = 0 +%0A if forget:%0A self.increment = 0%0A else:%0A self.increment = 1 %0A%0A de @@ -1672,17 +1672,30 @@ ffset - -1 +self.increment %5D.copy() @@ -1885,17 +1885,30 @@ ffset - -1 +self.increment ...
a64cb6ecb6a0d563a10db2a32614553a08ca7fed
add first hover info for bokeh plotter
xyzpy/plot/plotter_bokeh.py
xyzpy/plot/plotter_bokeh.py
import functools from ..manage import auto_xyz_ds from .core import _prepare_data_and_styles, _process_plot_range @functools.lru_cache(1) def _init_bokeh_nb(): """Cache this so it doesn't happen over and over again. """ from bokeh.plotting import output_notebook output_notebook() def bshow(figs, nb=...
Python
0
@@ -2919,32 +2919,134 @@ bokeh.%0A %22%22%22%0A + # TODO: toggle legend%0A # TODO: automatic plot range, and padding%0A # TODO: hover z_coo info%0A%0A from bokeh.p @@ -3100,16 +3100,27 @@ ort Span +, HoverTool %0A%0A # @@ -4882,16 +4882,182 @@ olor=col +, name=zlabel)%0A%0A p.add_tools(Hove...
93c489f9024386602c6674f4d31b1c7cdd1b3339
Fix runtime error.
src/cid/utils/fileUtils.py
src/cid/utils/fileUtils.py
# -*- encoding: utf-8 -*- """ @authors: Sebastiรกn Ortiz V. neoecos@gmail.com @license: GNU AFFERO GENERAL PUBLIC LICENSE Caliope Server is the web server of Caliope's Framework Copyright (C) 2013 Infometrika This program is free software: you can redistribute it and/or modify it under the terms of the GNU A...
Python
0.000011
@@ -1258,20 +1258,18 @@ ot_path= -None +'' ):%0A i @@ -1307,34 +1307,21 @@ if -not os.path.isabs(filename +len(root_path ):%0A
0bdc25cab0deeca81cedace37f135bef40f6eb09
use shutdownMicroprocess() instead; fix hilighted by tests.
Sketches/PT/dns.py
Sketches/PT/dns.py
#!/usr/bin/env python # (C) 2006 British Broadcasting Corporation and Kamaelia Contributors(1) # All Rights Reserved. # # You may only modify and redistribute this under the terms of any of the # following licenses(2): Mozilla Public License, V1.1, GNU General # Public License, V2.0, GNU Lesser General Public Lice...
Python
0
@@ -15,16 +15,17 @@ python%0A +# %0A# (C) 2 @@ -30,9 +30,9 @@ 200 -6 +7 Bri @@ -1396,16 +1396,17 @@ out -. +:: %0A%0A -p +P ipel @@ -1508,16 +1508,17 @@ .run()%0A%0A +%0A How does @@ -1912,12 +1912,165 @@ s.%0A%0A +If this component recieves producerFinished or shutdown on the %22signal%22 inbox, %0Ai...
5f1f1145d4f01f4b30e8782d284feb44781c21ad
Use sorted on the set to parametrize tests so that pytest-xdist works
tests/cupyx_tests/scipy_tests/special_tests/test_ufunc_dispatch.py
tests/cupyx_tests/scipy_tests/special_tests/test_ufunc_dispatch.py
import numpy import cupy import scipy.special import cupyx.scipy.special from cupy import testing import pytest scipy_ufuncs = { f for f in scipy.special.__all__ if isinstance(getattr(scipy.special, f), numpy.ufunc) } cupyx_scipy_ufuncs = { f for f in dir(cupyx.scipy.special) if isinstance(get...
Python
0
@@ -358,17 +358,16 @@ unc)%0A%7D%0A%0A -%0A @testing @@ -437,16 +437,23 @@ ufunc%22, +sorted( cupyx_sc @@ -478,16 +478,17 @@ _ufuncs) +) %0Aclass T
b8bc5256eb4deae2047f703849d5ad04d24f3b3a
Add another logging change
spacelaunchnow/settings.py
spacelaunchnow/settings.py
""" Django settings for spacelaunchnow project. Generated by 'django-admin startproject' using Django 1.11.1. 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/ """ im...
Python
0
@@ -1320,24 +1320,170 @@ tandard': %7B%0A + 'format': '%25(asctime)s %5B%25(levelname)s%5D - %5B%25(name)s: %25(module)s %25(lineno)s%5D - %25(message)s',%0A 'datefmt': '%25m-%25d-%25Y %25H:%25M:%25S'%0A %7D,%0A
72c0c74936b7a7c1c9df572adb41f33283c74d57
don't need to autoescape the output of urlize
localtv/templatetags/filters.py
localtv/templatetags/filters.py
# Copyright 2009 - Participatory Culture Foundation # # This file is part of Miro Community. # # Miro Community is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or (at ...
Python
0.99954
@@ -1745,48 +1745,8 @@ True -,%0A autoescape=True ) #
146e794ca65311ade1a9d81045b5709c8634fd62
add input visibility processstore
magpie/adapter/magpieprocess.py
magpie/adapter/magpieprocess.py
""" Store adapters to read data from magpie. """ from six.moves.urllib.parse import urlparse import logging import requests import json LOGGER = logging.getLogger("TWITCHER") from magpie.definitions.twitcher_definitions import * from magpie.definitions.pyramid_definitions import ConfigurationError, HTTPOk, HTTPCreate...
Python
0.000001
@@ -5052,32 +5052,44 @@ lity(process_id, + visibility, request)%0A%0A
fabd8e5a1fbb8dd083b05b053320b090fedad119
Fix cryptostate to no longer assign multiple states at once (issue #620)
mailpile/plugins/cryptostate.py
mailpile/plugins/cryptostate.py
from gettext import gettext as _ from mailpile.plugins import PluginManager _plugins = PluginManager(builtin=__file__) ##[ Keywords ]################################################################ def text_kw_extractor(index, msg, ctype, text): kw = set() if ('-----BEGIN PGP' in text and '\n-----END PGP'...
Python
0
@@ -70,16 +70,80 @@ Manager%0A +from mailpile.crypto.state import EncryptionInfo, SignatureInfo%0A %0A%0A_plugi @@ -568,68 +568,67 @@ -for part in msg.walk():%0A enc.add('mp_%25s-%25s' %25 ('enc', +def crypto_eval(part):%0A # This is generic%0A if par @@ -640,33 +640,37 @@ ryption_info -...
dfda6dad01050d1198779d1a33838f79adfc2198
Fix KeyError for FilePath
bro-otx.py
bro-otx.py
#!/usr/bin/env python import requests import sys from ConfigParser import ConfigParser from datetime import datetime, timedelta # The URL is hard coded. I'm comfortable doing this since it's unlikely that # the URL will change without resulting in an API change that will require # changes to this script. _URL = 'htt...
Python
0.000001
@@ -627,15 +627,21 @@ = %7B +%0A %22IPv4%22: + %22Int @@ -647,31 +647,24 @@ tel::ADDR%22,%0A - %22IPv6%22:%22 @@ -662,16 +662,17 @@ %22IPv6%22: + %22Intel:: @@ -678,23 +678,16 @@ :ADDR%22,%0A - %22dom @@ -691,16 +691,17 @@ domain%22: + %22Intel:: @@ -705,31 +705,24 @@ l::DOMAI...
518a0c3f5b4c3162f42691c395aa03616b5d8925
Add longer timeouts
browser.py
browser.py
# Copyright (C) Adam Piper, 2012 # See COPYING for licence details (GNU AGPLv3) import pycurl import StringIO from lxml.html import fromstring from urllib import urlencode from datetime import datetime class Browser(object): @classmethod def check_curl(cls, item): return item in pycurl.version_info()[...
Python
0.000074
@@ -1020,16 +1020,114 @@ cookies%0A + self._curl.setopt(pycurl.CONNECTTIMEOUT, 2)%0A self._curl.setopt(pycurl.TIMEOUT, 4);%0A
080bd6bc18baff7fa89307e486c72cfe906a9f25
save analysis output to `analysis_$METHOD_$N.xls` instead of `analysis.xls`
cea/analysis/sensitivity/sensitivity_demand_analyze.py
cea/analysis/sensitivity/sensitivity_demand_analyze.py
""" Analyze the results in the samples folder and write them out to an Excel file. This script assumes: - all the results have been added to `--samples-folder` in the format `result.%i.csv`, with `%i` replaced by the index into the samples array. - each result file has the same list of columns (the `--output-paramet...
Python
0.000004
@@ -881,24 +881,57 @@ les.npy'))%0A%0A + samples_count = len(samples)%0A simulati @@ -963,28 +963,29 @@ s_path, -len( samples -) +_count )%0A bu @@ -1090,13 +1090,45 @@ ysis -.xls' +_%25s_%25i.xls' %25 (method, samples_count) ))%0A%0A
a80336a2d305d4c7bfafb1448a9a6d090cc1751b
add Cell.get_volume()
c4/cell.py
c4/cell.py
from math import radians, sin, cos, acos, sqrt, pi class Cell(object): def __init__(self, parameters): if parameters is None: self.cell = None return assert len(parameters) == 6 self.a, self.b, self.c = parameters[:3] self.alpha, self.beta, self.gamma = para...
Python
0.000001
@@ -356,16 +356,295 @@ meters%0A%0A + def get_volume(self):%0A ca = cos(radians(self.alpha))%0A cb = cos(radians(self.beta))%0A cg = cos(radians(self.gamma))%0A return self.a * self.b * self.c * sqrt((1 - ca*ca - cb*cb - cg*cg) +%0A 2 * ca*c...
d5c30bdae34450b4052f83f773ef993e89fc8bef
Prepare 1.1 release
c4ddev.pyp
c4ddev.pyp
# Copyright (C) 2014-2016 Niklas Rosenstein # # 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, merge, publ...
Python
0
@@ -1175,17 +1175,17 @@ __ = '1. -0 +1 '%0A%0Aimpor
8c0e1a976e6341d565140725d51562cc9021f90e
add hostname to all messages
cc/reqs.py
cc/reqs.py
import time from cc.json import Struct, Field from cc.message import CCMessage __all__ = ['LogMessage', 'InfofileMessage', 'JobRequestMessage', 'JobConfigReplyMessage', 'TaskRegisterMessage', 'TaskSendMessage'] class BaseMessage(Struct): req = Field(str) def send_to(self, sock): cmsg = CCMessage(jmsg...
Python
0.000001
@@ -71,16 +71,47 @@ CMessage +%0Afrom socket import gethostname %0A%0A__all_ @@ -284,16 +284,67 @@ eld(str) +%0A hostname = Field(str, default = gethostname()) %0A%0A de
89d9328696a01e70428fccfa890d847e91f5f5c4
Fix copy-paste bug
certifi.py
certifi.py
import platform if platform.system() == "Windows": import wincertstore import atexit import ssl certfile = wincertstore.CertFile() certfile.addstore("CA") certfile.addstore("ROOT") atexit.register(certfile.close) # cleanup and remove files on shutdown def where(): return certfil...
Python
0.000002
@@ -368,20 +368,16 @@ return -ssl. ssl.get_ @@ -409,12 +409,13 @@ enssl_cafile +%0A
07b6f19e48ad09b99368a5ddd968615f9111c797
Update Condition to str type
src/pipelines/alphafold_inference_pipeline.py
src/pipelines/alphafold_inference_pipeline.py
# Copyright 2021 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, ...
Python
0
@@ -1668,27 +1668,29 @@ _relax: -bool = True +str = 'relax' %0A):%0A %22%22 @@ -4200,20 +4200,23 @@ elax == -True +'relax' ):%0A
dffaf115f569624b5a484e391cbb8e205dbb1a93
Make date conversion more resilient (#245)
src/pipelines/epidemiology/us_dc_authority.py
src/pipelines/epidemiology/us_dc_authority.py
# Copyright 2020 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, ...
Python
0.00013
@@ -861,16 +861,56 @@ aSource%0A +from lib.time import datetime_isoformat%0A from lib @@ -4126,25 +4126,31 @@ data -. +%5B%22 date +%22%5D = data -. +%5B%22 date +%22%5D .app @@ -4166,17 +4166,17 @@ x: -x. date -(). +time_ isof @@ -4181,16 +4181,38 @@ oformat( +x, %22%25Y-%25m-%25d %25H:%25M:%25S%22 ))%0...
97e6153551708ae888b3bb2999e33a62df92061d
Set LogFile.parsed to False at end of LogFile.clean().
src/cclib/parser/logfileparser.py
src/cclib/parser/logfileparser.py
""" cclib (http://cclib.sf.net) is (c) 2006, the cclib development team and licensed under the LGPL (http://www.gnu.org/copyleft/lgpl.html). """ __revision__ = "$Revision$" import logging, sys import Numeric import utils class Logfile(object): """Abstract class for logfile objects. Subclasses:...
Python
0.999772
@@ -5327,16 +5327,45 @@ , attr)%0D +%0A self.parsed = False%0D %0A%0D%0A d
57d9d4fe1b46d9dd45629dc5fc461c0b8c51c5ec
Fix music helper
src/helpers/musicHelper.py
src/helpers/musicHelper.py
#import pygame import os import sys import pyglet sys.path.append(os.path.dirname(__file__) + "/../audios/letters") pyglet.options['audio'] = ('openal', 'pulse', 'silent') player = pyglet.media.Player() #pygame.mixer.init() def play_file(file_path): pass #pygame.mixer.music.load(file_path) # playAudioLoa...
Python
0.000003
@@ -1,9 +1,8 @@ -# import p @@ -31,22 +31,8 @@ sys -%0Aimport pyglet %0A%0Asy @@ -103,1133 +103,98 @@ %0Apyg -let.options%5B'audio'%5D = ('openal', 'pulse', 'silent')%0Aplayer = pyglet.media.Player()%0A%0A#pygame.mixer.init()%0A%0Adef play_file(file_path):%0A pass%0A #pygame.mixer.music.load(file_path)%0A # ...
38d96e4ddbe44af8f028dfb29eca17dc8ecd478d
test case for clean module
src/html2latex/__init__.py
src/html2latex/__init__.py
from .html2latex import html2latex html2latex try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: import pkgutil __path__ = pkgutil.extend_path(__path__, __name__)
Python
0
@@ -40,17 +40,16 @@ l2latex%0A -%0A try:%0A
46f15a00d2324da4b9f12c9168ddda8dddb1b607
use notebook-style for plot_logistic_path.py (#22536)
examples/linear_model/plot_logistic_path.py
examples/linear_model/plot_logistic_path.py
""" ============================================== Regularization path of L1- Logistic Regression ============================================== Train l1-penalized logistic regression models on a binary classification problem derived from the Iris dataset. The models are ordered from strongest regularized to least r...
Python
0
@@ -1159,537 +1159,418 @@ se%0A%0A -from time import time%0Aimport numpy as np%0Aimport matplotlib.pyplot as plt%0A%0Afrom sklearn import linear_model%0Afrom sklearn import datasets%0Afrom sklearn.svm import l1_min_c%0A%0Airis = datasets.load_iris()%0AX = iris.data%0Ay = iris.target%0A%0AX = X%5By != 2%5D%0Ay = y%5By ...
d1a69904ba1d8072988aeb330157dbff20d0c5de
Remove unneeded self.client.
cred/test/util.py
cred/test/util.py
import os import tempfile import json from functools import wraps import flask.ext.testing import flask.ext.sqlalchemy import cred.database from cred.app import app, api from cred.routes import create_api_resources # Constants used throughout the test suites DEVICE = 'Thermostat' LOCATION = 'Living Room' EVENTS = ['T...
Python
0
@@ -1279,48 +1279,8 @@ f):%0A - self.client = app.test_client()%0A
587628f506ae58f1434d84a83fce51dc6f4d795e
Add functionality for fetching all Poloniex tickers
cryex/poloniex.py
cryex/poloniex.py
import time import hmac import hashlib from decimal import Decimal from datetime import datetime try: from urllib.parse import urlencode except ImportError: from urllib import urlencode import requests from cryex import core from cryex.model import Ask, Bid, Trade from cryex.coins.poloniex import POLONIEX_RE...
Python
0
@@ -826,16 +826,17 @@ def +_ ticker(s @@ -848,250 +848,16 @@ pair -):%0A %22%22%22 Return ticker %22%22%22%0A%0A new_pair = Poloniex.repair(pair)%0A args = urlencode(%7B'command': 'returnTicker'%7D)%0A url = Poloniex.PUBLIC + '?' + args%0A data = requests.g...
97ef6b35aad6f6d459673aff0a760f8159e39a70
Remove 'setcachsize' from zoneinfo __all__ list
dateutil/zoneinfo/__init__.py
dateutil/zoneinfo/__init__.py
# -*- coding: utf-8 -*- import logging import os import warnings import tempfile import shutil from subprocess import check_call from tarfile import TarFile from pkgutil import get_data from io import BytesIO from contextlib import closing from dateutil.tz import tzfile __all__ = ["setcachesize", "gettz", "rebuild"] ...
Python
0
@@ -281,24 +281,8 @@ = %5B -%22setcachesize%22, %22get
633ec6de1e7eb665e99decacb57e4c6056e25b41
add the company_name in defualt address format
openerp/addons/base/res/res_country.py
openerp/addons/base/res/res_country.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
Python
0.000031
@@ -2221,16 +2221,34 @@ at': %22%25( +company_name)s%5Cn%25( street)s
1c6e593cf8971e7814ffa126b85d092bff8eb89e
Update runTests.py
iterators/runTests.py
iterators/runTests.py
from subprocess import Popen, PIPE import itertools ITERATORS_NUM = [1, 2] # Compare against 0 UPDATERS_NUM = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31] #[1, 2, 3, 4, 5, 6, 7] DURATION = [2, 4] PERCENTAGES = [(25, 25, 50), (20, 10, 70), (50, 50, 0)] KEY_RANGE = [4096] INIT_SIZE = [1024] runs = 1 # Maybe sanitize in...
Python
0.000001
@@ -2045,16 +2045,30 @@ bst = 0%0A +%09# accum_list%0A %09for r i @@ -2083,16 +2083,16 @@ (runs):%0A - %09%09# Comp @@ -2643,24 +2643,56 @@ %5B0%5D.strip()) +%0A%09%09%0A%09%09#Add linked list code here %0A%0A%09%09# calcul @@ -2894,16 +2894,57 @@ ) + '%5Cn' + # change this to a tab%0A%09%09# add line here %0A%...
064802e0354cd9d27a7ea0d1c69a45baf0587c63
add pool example
redisext/pool.py
redisext/pool.py
''' Pool ^^^^ .. autoclass:: Pool :members: SortedSet ^^^^^^^^^ .. autoclass:: SortedSet :members: ''' from __future__ import absolute_import import redisext.models.abc class Pool(redisext.models.abc.Model): def pop(self): item = self.connect_to_master().spop(self.key) return self.decod...
Python
0
@@ -2,20 +2,20 @@ ''%0APool%0A -%5E%5E%5E%5E +---- %0A%0A.. aut @@ -46,313 +46,1034 @@ s:%0A%0A -SortedSet%0A%5E%5E%5E%5E%5E%5E%5E%5E%5E%0A%0A.. autoclass:: SortedSet%0A :members:%0A%0A'''%0Afrom __future__ import absolute_import%0A%0Aimport redisext.models.abc%0A%0A%0Aclass Pool(redisext.models.abc.Model):%0A ...
60e4cef4be2b13c79ed664b911efb30c705ac664
replace sys.version_info with PY2 from robot.utils remove varkw, only use kwargs
src/robot/running/arguments/argumentparser.py
src/robot/running/arguments/argumentparser.py
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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
@@ -871,17 +871,16 @@ lar_var%0A -%0A from .ar @@ -910,16 +910,44 @@ entSpec%0A +from robot.utils import PY2%0A %0A%0Aclass @@ -1327,31 +1327,10 @@ if -sys.version_info%5B0%5D == +PY 2:%0A @@ -1406,35 +1406,8 @@ er)%0A - varkw = kwargs%0A @@ -1443,21 +1443,22 @@ arargs, -varkw +kwargs , ...
8c4ed26ef577e43e5828c14b960acc3fbb71b583
Edit test_schemas.py
src/encoded/tests/test_schemas.py
src/encoded/tests/test_schemas.py
import pytest from pkg_resources import resource_listdir from snovault.schema_utils import load_schema import re pytestmark = [pytest.mark.working, pytest.mark.schema] SCHEMA_FILES = [ f for f in resource_listdir('encoded', 'schemas') if f.endswith('.json') ] @pytest.fixture(scope='module') def master_mixin...
Python
0.000003
@@ -3667,16 +3667,39 @@ e.json', + 'static_section.json', 'badge.
9cdf08450d5c6d8fb979d3e076b11bdaf7d794ed
fix for issue 84
activedata_etl/update_push_to_es.py
activedata_etl/update_push_to_es.py
# encoding: 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import division from __future__ i...
Python
0
@@ -2223,26 +2223,16 @@ if -line.find( %22/usr/ja @@ -2260,30 +2260,21 @@ Xms%22 -) != -1 and + in line -.find( + and %22org @@ -2316,15 +2316,16 @@ rch%22 -) != -1 + in line %0A @@ -2586,16 +2586,24 @@ ates%5B0%5D. +strip(). split(%22
e5ed6ef0c201d9a29c5934e3687abec7e13ae551
update models to use a hashids for naming files
api/models.py
api/models.py
""" This file represents the models for the api app. """ from django.db import models class DateMixin(models.Model): """A model mixin for date creation.""" created = models.DateField(auto_now_add=True) class File(DateMixin): """This class represents the file model.""" name = models.CharField(max_l...
Python
0
@@ -79,16 +79,70 @@ models%0A +from .utils import get_file_upload_path, generate_uid%0A %0A%0Aclass @@ -338,20 +338,23 @@ %22%22%0A%0A -name +file_id = model @@ -369,41 +369,50 @@ eld( -max_length=100, unique=True +default=generate_uid, max_length=50 )%0A +_ file @@ -435,24 +435,38 @@ eld( -allow_fil...
c82d704944d210b2db39ba1dd44bcb2c82708edc
allow filtering by domain
corehq/blobs/management/commands/run_blob_migration.py
corehq/blobs/management/commands/run_blob_migration.py
import logging import os import sys from datetime import datetime, timedelta from django.core.management import BaseCommand, CommandError from corehq.blobs.migrate import MIGRATIONS from corehq.blobs.util import set_max_connections from corehq.util.decorators import change_log_level from corehq.util.teeout import tee_...
Python
0
@@ -2287,32 +2287,108 @@ ),%0A )%0A + add_argument('--domain', help=%22Limit migration to a single domain%22)%0A add_argu
9e82515ca1eeb6376947ae653ee375146c95016c
Fix EE API interface
dcos_test_utils/enterprise.py
dcos_test_utils/enterprise.py
import logging import os from dcos_test_utils import dcos_api_session, helpers, iam log = logging.getLogger(__name__) class MesosNodeClientMixin: """ This Mixin allows any request to be made against a master or agent mesos HTTP port by providing the keyword 'mesos_node'. Thus, the user does not have to ...
Python
0.000143
@@ -2392,22 +2392,16 @@ args = -super( dcos_api @@ -2423,17 +2423,16 @@ iSession -) .get_arg @@ -2861,11 +2861,11 @@ _res -r ou +r ce_i
6e2515f4db3b6b9913e252cd52237574002637f2
Add missing user_id in revoke_certs_by_user_and_project()
nova/cert/manager.py
nova/cert/manager.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack, 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 #...
Python
0.999994
@@ -1740,32 +1740,41 @@ ser_and_project( +user_id, project_id)%0A%0A
b71f45c0f4a53b11b03ce78a7ee8f67951b2d406
Remove default argument from mutable array
paasta_tools/monkrelaycluster_tools.py
paasta_tools/monkrelaycluster_tools.py
# Copyright 2015-2019 Yelp Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
Python
0.000002
@@ -2064,178 +2064,32 @@ ate( -%0A self,%0A params: List%5Bstr%5D = %5B%0A %22cpus%22,%0A %22security%22,%0A %22dependencies_reference%22,%0A %22deploy_group%22,%0A %5D,%0A +self, params: List%5Bstr%5D, ) -%3E @@ -2311,16 +2311,206 @@ on etc.%0A + ...
b45ce22e0d688e5c2a9a56f5eb87744cea87a263
Fix scimath.power for negative integer input.
numpy/lib/scimath.py
numpy/lib/scimath.py
""" Wrapper functions to more user-friendly calling of certain math functions whose output data-type is different than the input data-type in certain domains of the input. """ __all__ = ['sqrt', 'log', 'log2', 'logn','log10', 'power', 'arccos', 'arcsin', 'arctanh'] import numpy.core.numeric as nx import nu...
Python
0.999999
@@ -886,24 +886,135 @@ return x%0A%0A +def _fix_int_lt_zero(x):%0A x = asarray(x)%0A if any(isreal(x) & (x %3C 0)):%0A x = x * 1.0%0A return x%0A%0A def _fix_rea @@ -1607,32 +1607,60 @@ real_lt_zero(x)%0A + p = _fix_int_lt_zero(p)%0A return nx.po
3c299bf2682a9b8d5be2c9c8f308720182935d12
Add missing username to log statement
accounts/tasks.py
accounts/tasks.py
import logging from celery import task from django.db import IntegrityError from django.utils.text import slugify import games.models from accounts.models import User from emails.messages import send_daily_mod_mail from games.util.steam import create_game LOGGER = logging.getLogger() @task def sync_steam_library(u...
Python
0.000006
@@ -584,16 +584,31 @@ m games%22 +, user.username )%0A
3b6d5fd80eb4d95679b969e8809b154d6254de8d
Replace get_user_profile_by_email with get_user.
zerver/management/commands/bankrupt_users.py
zerver/management/commands/bankrupt_users.py
from __future__ import absolute_import from __future__ import print_function from typing import Any from argparse import ArgumentParser from django.core.management.base import BaseCommand from zerver.lib.actions import do_update_message_flags from zerver.models import UserProfile, Message, get_user_profile_by_email ...
Python
0.000007
@@ -171,27 +171,28 @@ import -Base Command +Error %0A%0Afrom z @@ -256,69 +256,80 @@ ver. -models import UserProfile, Message, get_user_profile_by_email +lib.management import ZulipBaseCommand%0Afrom zerver.models import Message %0A%0Acl @@ -340,16 +340,21 @@ Command( +Zulip BaseComm @@ -622,16 +622,58 @@ nkr...
3135bda8970a2fdefa92b932c15cf5c559392c9c
allow to specify db session callable directly
ziggurat_foundations/ext/pyramid/get_user.py
ziggurat_foundations/ext/pyramid/get_user.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import importlib import logging from ziggurat_foundations.models.base import get_db_session from ziggurat_foundations.models.services.user import UserService CONFIG_KEY = "ziggurat_foundations" log = logging.getLogger(__name__) def includeme(config): ...
Python
0
@@ -636,32 +636,178 @@ None%0A else:%0A + if callable(session_provider_callable_config):%0A session_provider_callable = session_provider_callable_config%0A else:%0A parts = @@ -858,16 +858,20 @@ + + _tmp = i @@ -903,16 +903,20 @@ rts%5B0%5D)%0A + ...
fe01408283b0a0a8667214fcb1f5a58162ad7507
Update leave_allocation.py
erpnext/hr/doctype/leave_allocation/leave_allocation.py
erpnext/hr/doctype/leave_allocation/leave_allocation.py
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, date_diff, formatdate from frappe import _ from frappe.model.document import Document from erpnext.hr.utils ...
Python
0.000001
@@ -3945,16 +3945,17 @@ gative%22) +: %0A%09%09%09%09fra
07def114287bc3488e76e2516ca7682954ba4a09
Use default alphabet
APITaxi/extensions.py
APITaxi/extensions.py
#coding: utf-8 from flask_sqlalchemy import SQLAlchemy as BaseSQLAlchemy from sqlalchemy.pool import QueuePool as BaseQueuePool class SQLAlchemy(BaseSQLAlchemy): def apply_driver_hacks(self, app, info, options): BaseSQLAlchemy.apply_driver_hacks(self, app, info, options) class QueuePool(BaseQueueP...
Python
0.000652
@@ -1820,86 +1820,8 @@ UID( -alphabet=%0A '0123456789abcdefghijklmnopqrstuvwxyzABDEFGHIJKLOMNOPQRSTUVWXYZ' )%0A%0Ad
9f500668555292add5d87c942e0cd804aefa6df2
Replace cat usage for fgrep
fuel_health/tests/cloudvalidation/test_disk_space_db.py
fuel_health/tests/cloudvalidation/test_disk_space_db.py
# Copyright 2015 Mirantis, 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.000003
@@ -1274,13 +1274,25 @@ d = -(%22cat +%22fgrep '%7Bmsg%7D' -q /va @@ -1321,53 +1321,9 @@ log%7D - %22%0A %22%7C grep '%7Bmsg%7D' %7C tail -1%22) +%22 .for @@ -1323,31 +1323,24 @@ g%7D%22.format(%0A -
2284f9f944ef72c7e2f6c9a4e93e395b09196719
modify initial config
golive/management/commands/create_config.py
golive/management/commands/create_config.py
from django.core.management import BaseCommand from fabric.state import output import sys from golive.stacks.stack import StackFactory, Stack import yaml class Command(BaseCommand): help = 'Creates a basic exampe configuration file' output['stdout'] = False example = """CONFIG: PLATFORM: DEDICATED ...
Python
0.000002
@@ -382,14 +382,12 @@ ER: -fatrix +root %0A @@ -415,16 +415,15 @@ ango -_example +project %0A @@ -445,12 +445,19 @@ OME/ -user +.ssh/id_dsa .pub @@ -494,23 +494,18 @@ ME: -golive-sandbox1 +testserver %0A @@ -552,36 +552,38 @@ - test -box1 +server %0A DB_ @@ -610,20 +610,22 @@ ...
bc85dffa594c292094d2aa1f5a456e0a0690ea79
Remove debug code
grumpy-tools-src/tests/test_grumpy_tools.py
grumpy-tools-src/tests/test_grumpy_tools.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `grumpy_tools` package.""" import tempfile import unittest import pytest from click.testing import CliRunner from grumpy_tools import cli @pytest.fixture def response(): """Sample pytest fixture. See more at: http://doc.pytest.org/en/latest/fixt...
Python
0.000299
@@ -1147,42 +1147,8 @@ ,%5D)%0A - # import wdb; wdb.set_trace()%0A
6c0047b49c65f3b3c06582ad83db6819ad60aa34
load corpus reference, too
dictionaria/lib/submission.py
dictionaria/lib/submission.py
# coding: utf8 from __future__ import unicode_literals import re from clldutils.path import Path, md5 from clldutils.jsonlib import load from clldutils.misc import nfilter from clld.db.meta import DBSession from clld.db.models import common from clld.lib import bibtex from clld.scripts.util import bibtex2source from ...
Python
0
@@ -3738,20 +3738,46 @@ source= -None +ex.get('Corpus_Reference', %5B%5D) ,%0A
dc9c5021c022108fd9ca2c87e9064b385abd26cf
Fix style
didyoumean/readme_examples.py
didyoumean/readme_examples.py
# -*- coding: utf-8 """Code to generate examples in README.md.""" from didyoumean import add_suggestions_to_exception import sys def get_exception(code): """Helper function to run code and get what it throws.""" try: exec(code) except: return sys.exc_info() assert False def main(): ...
Python
0.000001
@@ -658,16 +658,20 @@ + %22(local,
f42fdde5404c3025236ad7dcade4b08529e7ce36
repair Noneuser_bug
app/delete.py
app/delete.py
from .models import User from . import db def deletenone(): noneuser=User.query.filter_by(username=None).all() for user in noneuser: db.session.delete(user) db.session.commit()
Python
0.000003
@@ -37,18 +37,16 @@ ort db%0A%0A -%0A%0A def dele
7012d3f63044ee0b61ea012809293c56830c10db
modify models defining
app/models.py
app/models.py
#!/usr/bin/env python3.5 from tools.column import Column from tools.field import String,Int,Float,Text,Boolean from tools.model import Model from tools.database import * from tools.log import * import time class User(Model): __table__='users' id=Column(Int(4,unsigned=True),primary_key=True...
Python
0
@@ -551,25 +551,25 @@ lumn(String( -2 +3 0))%0A%09create_ @@ -570,38 +570,41 @@ reate_at=Column( -Float( +String(30 ),default=time.t @@ -953,38 +953,41 @@ %09post_at=Column( -Float( +String(30 ),default=time.t @@ -1018,17 +1018,17 @@ (String( -2 +3 0))%0A%09aut @@ -1074,16 +1074,12 @@ %22)%0A%09 -abstract +des...
738210dfd6cb74b04b731e85f2e235024d64ff93
format improvement
digitalocean_plugin/security.py
digitalocean_plugin/security.py
# ####### # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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 requi...
Python
0.000001
@@ -4332,24 +4332,26 @@ rmat(r)%0A%0A + # def cache_p @@ -4392,24 +4392,26 @@ nt(self,%0A + # @@ -4466,20 +4466,27 @@ , **_):%0A + # %0A + # rai @@ -4532,16 +4532,21 @@ yet.%22)%0A + # %0A def @@ -5135,16 +5135,33 @@ leError( +%0A 'Missing @@ -5191,46 +51...
c12df9f8f0c73577c122fc65bd11314b7231179c
Add type
test_runner/environments.py
test_runner/environments.py
import logging import re import sys from glanceclient.v1.client import Client as glance_client from keystoneclient.v2_0.client import Client as keystone_client from neutronclient.v2_0.client import Client as neutron_client from novaclient.v1_1 import client as nova_client from .utils import rand_name LOG = logging.g...
Python
0.000003
@@ -3338,16 +3338,24 @@ is dict + or list :%0A
7404233b4e286335c9959539ef9ea15ae20c8f27
Correct table name
assessment.py
assessment.py
# -*- coding: utf-8 -*- """ Article assessment-related worklists for WikiProjects. Copyright (C) 2015 James Hare Licensed under MIT License: http://mitlicense.org """ import requests import pywikibot import json from project_index import WikiProjectTools class WikiProjectAssess: def __init__(self): self...
Python
0.009686
@@ -5464,25 +5464,24 @@ from project -_ index where
c68287e17619ab93d14f8289773ec15e8ff92634
Enable volume backup tests
tempest/api/volume/test_volumes_backup.py
tempest/api/volume/test_volumes_backup.py
# Copyright 2016 Red Hat, 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...
Python
0.000041
@@ -1932,52 +1932,8 @@ me%0A%0A - @decorators.skip_because(bug=%221483434%22)%0A
06d71ede1c1feaa597b442f4ead63d2b2e31e715
fix `trigger` -> `__call__`
chainer/training/triggers/once_trigger.py
chainer/training/triggers/once_trigger.py
class OnceTrigger(object): """Trigger based on the starting point of the iteration. This trigger accepts only once at starting point of the iteration. There are two ways to specify the starting point: only starting point in whole iteration or called again when training resumed. Args: call...
Python
0.000003
@@ -596,23 +596,24 @@ def -trigger +__call__ (self, t
ddec6067054cc4408ac174e3ea4ffeca2a962201
Remove unnecessary assert from view for Notice home.
regulations/views/notice_home.py
regulations/views/notice_home.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from operator import itemgetter import logging from django.http import Http404 from django.template.response import TemplateResponse from django.views.generic.base import View from regulations.generator.api_reader import ApiReader from regulations.vie...
Python
0
@@ -1401,42 +1401,8 @@ e%7D%0A%0A - assert self.template_name%0A
7881c90200069d4774f41e46212bb06771eafae7
Fix ignore list
botbot/checker.py
botbot/checker.py
"""Base class for checking file trees""" import stat import os import time from fnmatch import fnmatch from . import fileinfo as fi from . import report as rep from . import ignore as ig from . import sqlcache as sql class Checker: """ Holds a set of checks that can be run on a file to make sure that it'...
Python
0.000009
@@ -4659,32 +4659,37 @@ d files%0A +self. checklist = %5Bfi @@ -4698,16 +4698,21 @@ r fi in +self. checklis
79ae93beb2502143f78a182b1c28c5aa008b6f9a
Fix scoping
botbot/checker.py
botbot/checker.py
"""Base class for checking file trees""" import stat import os import time from fnmatch import fnmatch from . import fileinfo as fi from . import report as rep from . import sqlcache as sql from . import ignore as ig class CheckerBase: """ Defines a foundation for other checker objects. Allows for checki...
Python
0.000001
@@ -3238,33 +3238,26 @@ missionError - as err :%0A + @@ -3354,37 +3354,8 @@ ong%0A - global apath%0A @@ -3487,15 +3487,8 @@ rror - as err :%0A @@ -3532,37 +3532,8 @@ ink%0A - global apath%0A
91946410f14b21e510a104b105a6f5036cc8944f
build updated
python/common/core/globalVariables.py
python/common/core/globalVariables.py
''' Author: Jason Parks Created: Apr 22, 2012 Module: common.core.globalVariables Purpose: to import globalVariables ''' # Location of Toolset toolsLocation = 'C:/Users/jason/git/PipelineConstructionSet' # NOTE!: It is necessary to manually add the above location's # python directory, i.e- # # PYTHONPATH = 'C:/Us...
Python
0
@@ -1222,19 +1222,19 @@ = '0 -422 +506 12-2 -0.27 +1.01 '%0D#
a4043cad930ba94c2a3152a2900537a7ede4a86d
fix bug with sockjs handling of UnsynchronizedViewer
python/neuroglancer/sockjs_handler.py
python/neuroglancer/sockjs_handler.py
# @license # 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...
Python
0.000001
@@ -4426,32 +4426,34 @@ None:%0A + self.close()%0A @@ -4441,32 +4441,34 @@ self.close()%0A + return @@ -4828,103 +4828,8 @@ = %5B%0A - dict(key='s', state=viewer.shared_state, send_updates=True, receive_updates=True),%0A @@ -5019,16 +5019,194 @@ %5D +%0A ...
451e020a80b0c4f21bc613a9f281ac3660069278
Add complete URL to comments notifications.
astrobin/signals.py
astrobin/signals.py
# Django from django.contrib.auth.models import User from django.core.urlresolvers import reverse as reverse_url from django.db.models.signals import m2m_changed from django.db.models.signals import post_save # Third party apps from actstream import action as act from rest_framework.authtoken.models import Token # Ot...
Python
0
@@ -871,16 +871,41 @@ url = + %22http://astrobin.com/%22 + instanc
08960bea9735921ce15160067533d19e850217bd
Save and load the autohost prio list
autohost_manager.py
autohost_manager.py
""" TODO Mon?: Autohost manager for AliCatFiberarts (and others). * Have a list of high priority streams, in order (or with priorities) * Listen for, or poll for, streams going live * If (a) a high priority stream has just gone live, and (b) you are currently hosting, and (c) the hosted stream has lower priority * Then...
Python
0
@@ -3858,27 +3858,75 @@ ostlist. -pack( +insert(tk.END, %22%5Cn%22.join(config.get(%22hosttargets%22, %22%22)) )%0A%09%09 -# self.hos @@ -3935,38 +3935,121 @@ ist. -get(1.0, tk.END).split(%22%5Cn +pack()%0A%0A%09%09self.save = tk.Button(self, text=%22Save host list%22, command=self.cmd_save)%0A%09%09self.save.pack...
b0e91b820913c7b46d04f946267903d9785fc2ca
Fix test
experiments/tests/test_counter.py
experiments/tests/test_counter.py
from __future__ import absolute_import from unittest import TestCase from experiments import counters from mock import patch TEST_KEY = 'CounterTestCase' class CounterTestCase(TestCase): def setUp(self): self.counters = counters.Counters() self.counters.reset(TEST_KEY) self.assertEqual(...
Python
0.000004
@@ -2253,16 +2253,17 @@ .Counter +s ._redis'
92279518979c3fc4c62609624dd245ac4f4ad6c4
Rename logger to log
figgypy/config.py
figgypy/config.py
import logging import os import seria import yaml logger = logging.getLogger('figgypy') if len(logger.handlers) == 0: logger.addHandler(logging.NullHandler()) gpg_loaded = False try: import gnupg gpg_loaded = True except ImportError: logging.info('could not load gnupg, will be unable to unpack secrets...
Python
0.999296
@@ -48,122 +48,8 @@ ml%0A%0A -logger = logging.getLogger('figgypy')%0Aif len(logger.handlers) == 0:%0A logger.addHandler(logging.NullHandler())%0A%0A gpg_ @@ -213,16 +213,120 @@ pass%0A%0A%0A +log = logging.getLogger('figgypy')%0Aif len(log.handlers) == 0:%0A log.addHandler(logging.NullHandler())%0A %0A%0Acl...
b745b6f26bb55e36984e6600293073a39367a523
version 2 Added icon the the Files menu
plugins/Python_editor.py
plugins/Python_editor.py
# Created by: Storm Shadow http://www.techbliss.org # WARNING! All changes made in this file will be lost! import re import idaapi import idc from idc import * from idaapi import * import idautils class ripeye(idaapi.plugin_t): flags = idaapi.PLUGIN_FIX comment = "This is a comment" help = "Python Edito...
Python
0
@@ -192,17 +192,122 @@ dautils%0A +import sys%0Asys.path.insert(0 , idaapi.idadir(%22plugins%5C%5CCode editor%5C%5Cicons%22))%0Aimport ico%0Afrom ico import * %0A - class ri @@ -597,16 +597,17 @@ GIN_OK%0A%0A +%0A def @@ -715,24 +715,26 @@ pi.msg(%22%22)%0A%0A +%0A%0A def AddM @@ -834,16 +834,115 @@ ye...
c573263511bcbf0ffe37f538142aedd9064f8ae0
Remove copying devdata.env as it's only used for the Google API key we've removed
bin/devdata.py
bin/devdata.py
"""Download .devdata.env from github.com:hypothesis/devdata.git.""" import os from pathlib import Path from shutil import copyfile from subprocess import check_call from tempfile import TemporaryDirectory def _get_devdata(): # The directory that we'll clone the devdata git repo into. with TemporaryDirectory(...
Python
0
@@ -13,20 +13,16 @@ .devdata -.env from gi @@ -553,57 +553,8 @@ n (%0A - (%22via/devdata.env%22, %22.devdata.env%22),%0A
3ed05d1a5d08d60bcc79db49d4f82e97be09c9c6
Fix conf_name handling
fabdeploy/fabd.py
fabdeploy/fabd.py
import os import shutil import logging from fabric.api import env, run, sudo, puts, abort from . import users, ssh from .containers import conf as conf_dec from .task import Task __all__ = [ 'mkdirs', 'remove_src', 'debug', 'conf', 'default_conf', 'create_user', 'create_configs', ] log...
Python
0.000152
@@ -2041,25 +2041,24 @@ .conf')%0A -%0A if self. @@ -2053,74 +2053,27 @@ -if self.conf.conf_name == 'default':%0A conf.set_globally +conf.set_conf_value ('co @@ -2096,16 +2096,38 @@ onf.name +, keep_user_value=True )%0A%0A
81b5961cdf4b9ca7e20920eda3c7f76f96a35a9b
Bump version
filer/__init__.py
filer/__init__.py
#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.105.dev1' # pragma: nocover default_app_config = 'filer.apps.FilerConfig'
Python
0
@@ -94,13 +94,8 @@ .105 -.dev1 ' #
ae6892be0bac3ef40cbf8e666a61562faec8f1f0
one command is enough
fabfile/travis.py
fabfile/travis.py
import glob import os from fabric.api import task, local from fabric.context_managers import lcd class Test(object): def __init__(self, func, deps=[], needs_pypy=True, needs_rubyspec=False): self.func = func self.deps = deps self.needs_pypy = needs_pypy self.needs_rubyspec = needs...
Python
0.999908
@@ -559,55 +559,8 @@ 2%22)%0A - local(%22bunzip2 %60pwd%60/../pypy.tar.bz2%22)%0A @@ -595,16 +595,20 @@ pypy.tar +.bz2 -C %60pwd
444f51c72d4ac92ad99c6e0466dfcf8073b03b19
Update tesseract.py
apps/tesseract.py
apps/tesseract.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' Python-tesseract is an optical character recognition (OCR) tool for python. That is, it will recognize and "read" the text embedded in images. Python-tesseract is a wrapper for google's Tesseract-OCR ( http://code.google.com/p/tesseract-ocr/ ). It is also useful as a...
Python
0
@@ -1849,24 +1849,28 @@ ct'%0A%0Aimport +PIL. Image%0Aimport
2aba25d394f722761af6e4d114d91d2824c17ee9
Fix social media plugin error on save
shoop/xtheme/plugins/social_media_links.py
shoop/xtheme/plugins/social_media_links.py
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import re from collections import defaultdict from django import forms from...
Python
0
@@ -2782,23 +2782,33 @@ s() if v -%5B%22url%22%5D +.get(%22url%22, None) %7D%0A
eef9d75a7d019a397d2026612ece76d217747e5b
mark oddity
src/zeit/edit/browser/tests/test_form.py
src/zeit/edit/browser/tests/test_form.py
# Copyright (c) 2012 gocept gmbh & co. kg # See also LICENSE.txt from mock import Mock import zeit.cms.testing import zeit.edit.browser.form import zope.formlib.form import zope.interface import zope.publisher.browser import zope.schema class IExample(zope.interface.Interface): foo = zope.schema.TextLine(title=...
Python
0.00151
@@ -375,24 +375,262 @@ TestCase):%0A%0A + # XXX This test should be moved to zeit.cms.browser, but it seems nearly%0A # impossible to instantiate an EditForm, so we punt on this for now;%0A # InlineForms are friendlier (since they don't pull in the%0A # main_template.pt)%0A%0A def rend
1b94e5564b7940139e56310f18c58999f0c598b2
validate by casting
filestore/core.py
filestore/core.py
from __future__ import (absolute_import, division, print_function, unicode_literals) import six from document import Document from jsonschema import validate as js_validate class DatumNotFound(Exception): pass def get_datum(col, eid, _DATUM_CACHE, get_spec_handler, logger): try: ...
Python
0.000001
@@ -191,16 +191,42 @@ alidate%0A +from bson import ObjectId%0A %0A%0Aclass @@ -1305,16 +1305,25 @@ ce_id = +ObjectId( resource @@ -1328,16 +1328,17 @@ ce%5B'id'%5D +) %0A%0A de @@ -1501,20 +1501,25 @@ atum_id= +str( d_id +) ,%0A @@ -1550,16 +1550,21 @@ _kwargs= +dict( d_kwargs @@ -1564,16 +1564,17...
401f55929eff1e48e68694ca8b49aa64005fd411
remove data directories in nIR_run
bin/nIR_run.py
bin/nIR_run.py
#!/usr/bin/python # Script to perform a convolution on a spectrum. # Can take a number of parameters if needed from __future__ import division, print_function import argparse import sys from datetime import datetime as dt from eniric.nIRanalysis import convolve_spectra from eniric.resample import resampler from eniri...
Python
0.000016
@@ -510,17 +510,19 @@ on=' -H +Unh elpful d iscr @@ -517,17 +517,17 @@ elpful d -i +e scriptio @@ -1096,99 +1096,8 @@ +%22)%0A - parser.add_argument('-d', '--data_dir', help='Data directory', type=str, default=None)%0A @@ -1251,293 +1251,8 @@ 0%22)%0A - parser.add_argument('--results', default=None, ...
0f41838d07c15bb22861e884949306a8498ead58
Support move
archive_images.py
archive_images.py
#!/usr/bin/env python """ Sorts image files by time - copies them into folders by year and month. Written by Friedrich C. Kischkel. """ import os import re import shutil import time import argparse IMAGE_FILE = re.compile(r"""\.(jpe?g)|(png)|(tiff?)$""", re.IGNORECASE) EXIF_TIME_FORMAT = "%Y:%m:%d %H:%M:%S" def tim...
Python
0
@@ -1096,16 +1096,44 @@ te=False +, file_function=shutil.copy2 ):%0A %22 @@ -1730,28 +1730,29 @@ -shutil.copy2 +file_function (srcpath @@ -1824,16 +1824,44 @@ pth=None +, file_function=shutil.copy2 ):%0A %22 @@ -2090,16 +2090,31 @@ verwrite +, file_function )%0A @@ -2737,16 +2737,148 @@ p...
28b77053d633c0762854b8feeee393300668bff1
Update df_status.py
apps/tinyosGW/df_status/df_status.py
apps/tinyosGW/df_status/df_status.py
#!/usr/bin/env python #-*- coding: utf-8 -*- # Author : jeonghoonkang, https://github.com/jeonghoonkang ## ํ•„๋… ''' ./out ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค ./out ๊ถŒํ•œ์€ sudo chgrp www-data out ์œผ๋กœ ๊ทธ๋ฃน ํ—ˆ๊ฐ€ ์ถ”๊ฐ€ sudo chmod 775 out ''' from __future__ import print_function import cgi import cgitb from subprocess import * from types imp...
Python
0.000005
@@ -629,24 +629,282 @@ return ret%0A%0A +def get_file_count():%0A cmd = %22ls /var/www/html/cam/motion %7C wc -l%22%0A ret = run_cmd(cmd)%0A%0A cmd = %22ls /var/www/html/cam/motion %7C grep avi %7C wc -l%22%0A val = run_cmd(cmd)%0A ret = %22 Total -%3E %22 + ret%0A ret = ret + %22 AVI -%3E %22 + val%...
22c727e0e38953f3647a8a825b01fcf142c06c64
Bump version.
armet/_version.py
armet/_version.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division __version_info__ = (0, 4, 16) __version__ = '.'.join(map(str, __version_info__))
Python
0
@@ -116,9 +116,9 @@ 4, 1 -6 +7 )%0A__
7a1ddf38db725f0696482a271c32fa297d629316
Set the version to the next patch release number (in dev mode)
backlog/__init__.py
backlog/__init__.py
__version__ = (0, 2, 1, '', 0) def get_version(): version = '%d.%d.%d' % __version__[0:3] if __version__[3]: version = '%s-%s%s' % (version, __version__[3], (__version__[4] and str(__version__[4])) or '') return version
Python
0
@@ -18,12 +18,15 @@ 2, -1 +2 , ' +dev ', 0
b808784711242099d8fbf9f0f1c7d13ca5a5a1d7
Bump the version to 0.3.2
backlog/__init__.py
backlog/__init__.py
"""A Simple Note Manager""" from __future__ import absolute_import from backlog.backlog import Backlog __version__ = '0.3.1'
Python
0.999999
@@ -121,7 +121,7 @@ 0.3. -1 +2 '%0A
d0c6ae0dbb68fad31c5f3e51d934b8c7f5e8534f
Add ability to override issue JQL in runner
jzb/runner.py
jzb/runner.py
from argparse import ArgumentParser import logging import sys import jira from redis import StrictRedis import yaml import zendesk from jzb import LOG from jzb.bridge import Bridge from jzb.util import objectize def configure_logger(level): handler = logging.StreamHandler(sys.stdout) handler.setLevel(level) ...
Python
0
@@ -626,16 +626,57 @@ e_true') +%0A parser.add_argument('-Q', '--query') %0A%0A ar @@ -1431,16 +1431,79 @@ onfig)%0A%0A + if args.query:%0A bridge.jira_issue_jql = args.query%0A%0A brid
c08870b838a842e66dd46ebd790571c3ec336fc8
Fix call to collect bears from section
coalib/coala_main.py
coalib/coala_main.py
from pyprint.ConsolePrinter import ConsolePrinter import os from coalib import coala_delete_orig from coalib.output.printers.LogPrinter import LogPrinter from coalib.processes.Processing import execute_section, simplify_section_result from coalib.settings.ConfigurationGathering import gather_configuration from coalib....
Python
0.000001
@@ -4252,16 +4252,94 @@ sections +,%0A log_printer )%0A
122b0982d1e10aada383bbd373518d049e54b906
Prepare for release 0.9pbs.107
filer/__init__.py
filer/__init__.py
#-*- coding: utf-8 -*- # version string following pep-0396 and pep-0386 __version__ = '0.9pbs.107.dev1' # pragma: nocover default_app_config = 'filer.apps.FilerConfig'
Python
0
@@ -94,13 +94,8 @@ .107 -.dev1 ' #
fc6694686b5b928580c3e8d682b3b6496b12d006
Refactor pop method
binary_heap.py
binary_heap.py
from __future__ import unicode_literals class BinaryHeap(object): """A class for a binary heap.""" def __init__(self, iterable=()): self.tree = [] for val in iterable: self.push(val) def __repr__(self): return repr(self.tree) def __len__(self): return len(...
Python
0.000001
@@ -479,17 +479,17 @@ f.tree) -= +%3C = 1:%0A @@ -684,39 +684,8 @@ op() - # Should raise error on empty %0A
6c9da65a2083ff81dfe446896026fc4f449428e8
Fix typo
folder_cleanup.py
folder_cleanup.py
#!/usr/bin/env python3 """Clean up the files in a folder. This is based on an old Mac program called Folder Clean-Up, and tries to use the same API. All files are put into a subdirectory called _cleanup, sorted by extension. For example, a file called "myfile.txt" would be put in "_cleanup/txts/". Files without an e...
Python
0.999999
@@ -4401,17 +4401,16 @@ ewpath)s -/ , file a