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
1bd52a7019eb0ec47fb3594f2d67f2e36a02b823
Fix bug in the test which was causing a test failure under some scenarios when running tests in standalone fashion (so compute test didn't set token value on which test relies on).
libcloud/test/loadbalancer/test_brightbox.py
libcloud/test/loadbalancer/test_brightbox.py
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
Python
0
@@ -1349,16 +1349,71 @@ = None%0A + BrightboxLBDriver.connectionCls.token = 'test'%0A
434f565dc7b2b1c037b36096ad10978cfc0eaa49
add yaml dump encode utf8
lmdo/resolvers/templates_resolver.py
lmdo/resolvers/templates_resolver.py
import os import tempfile import json import yaml from lmdo.resolvers import Resolver from lmdo.convertors.env_var_convertor import EnvVarConvertor from lmdo.convertors.stack_var_convertor import StackVarConvertor from lmdo.convertors.nested_template_url_convertor import NestedTemplateUrlConvertor from lmdo.file_load...
Python
0.000002
@@ -3158,16 +3158,36 @@ le=False +, encoding=('utf-8') )%0A
c2ca2932ba6aa29e002317ce7775611a2ed39d42
fix template resovler for yaml file
lmdo/resolvers/templates_resolver.py
lmdo/resolvers/templates_resolver.py
import os import tempfile import json from lmdo.resolvers import Resolver from lmdo.convertors.env_var_convertor import EnvVarConvertor from lmdo.convertors.stack_var_convertor import StackVarConvertor from lmdo.convertors.nested_template_url_convertor import NestedTemplateUrlConvertor from lmdo.file_loader import Fil...
Python
0
@@ -1171,158 +1171,127 @@ -templates%5B'master'%5D = self._template_path%0A with open(templates%5B'master'%5D, 'r') as outfile:%0A master_tpl = json.loads(outfile.read())%0A +master_tpl = FileLoader(file_path=self._template_path, allowed_ext=FILE_LOADER_TEMPLATE_ALLOWED_EXT).process()%0A ...
4974eda0ffb690368fde95e0b3987bc4dabf9c2b
use nonshuffled dataset
vpdataset.py
vpdataset.py
from torchtext import data import os import pdb import random import math import re import torch class VP(data.Dataset): """modeled after Shawn1993 github user's Pytorch implementation of Kim2014 - cnn for text categorization""" filename = "wilkins_corrected.shuffled.tsv" @staticmethod def sort_key(e...
Python
0.00001
@@ -266,17 +266,8 @@ ted. -shuffled. tsv%22
93168e36773e9c4c52db7336ccea9ecf9614b12f
remove main block
src/robot/libraries/ProcessLibrary.py
src/robot/libraries/ProcessLibrary.py
# Copyright 2008-2013 Nokia Siemens Networks Oyj # # 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.000096
@@ -4550,132 +4550,8 @@ rr%0A%0A -if __name__ == '__main__':%0A r = ProcessLibrary().run_process('python', '-c', %22print %5C'hello%5C'%22)%0A print repr(r.stdout)%0A %0Acla
4ab211d6dd50c043cacd24db93a6bc64cfdb9ed5
update tools/validate_runtests_log.py for pytest
tools/validate_runtests_log.py
tools/validate_runtests_log.py
#!/usr/bin/env python """ Take the test runner log output from the stdin, looking for the magic line nose runner prints when the test run was successful. In an ideal world, this should be done directly in runtests.py using the nose API, some failure modes are fooling nose to terminate the python process with zero exi...
Python
0.000001
@@ -1368,20 +1368,22 @@ for the -nose +pytest printou @@ -1387,126 +1387,116 @@ tout -: %0A -# Ran NNN tests in MMMs%0A # %3Cblank line%3E%0A # OK (SKIP=X, KNOWNFAIL=Y) or FAILED (errors=X, failures=Y +r1 = re.compile(%22(?P%3Cnum_failed%3E%5Cd+) failed, (?P%3Cnum_passed%3E%5Cd+) passed,.* in (?P%3Ctime...
1e819b6a003ac1c5094f08146a4c364d4112a9ef
Fix import
calvinextras/calvinsys/io/dht11temphumidity/raspberry_pi/DHT11.py
calvinextras/calvinsys/io/dht11temphumidity/raspberry_pi/DHT11.py
# -*- coding: utf-8 -*- # Copyright (c) 2017 Ericsson AB # # 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 ...
Python
0.000002
@@ -609,30 +609,22 @@ m calvin -.runtime.south +extras .calvins
ab3088f7413cc605d9cd852d243726e5bcb353da
Disable shtest-timeout on Windows
utils/lit/tests/shtest-timeout.py
utils/lit/tests/shtest-timeout.py
# REQUIRES: python-psutil # FIXME: This test is fragile because it relies on time which can # be affected by system performance. In particular we are currently # assuming that `short.py` can be successfully executed within 2 # seconds of wallclock time. # Test per test timeout using external shell # RUN: not %{lit} \...
Python
0.000429
@@ -20,16 +20,44 @@ psutil%0A%0A +# PR33944%0A# XFAIL: windows%0A%0A # FIXME:
d4cbcfff04738d8fea0070f724540345a04d517a
Fix NameError bug: s/Devirtualizer/SpeculativeDevirtualizer/
utils/pass-pipeline/src/passes.py
utils/pass-pipeline/src/passes.py
from pass_pipeline import Pass # TODO: This should not be hard coded. Create a tool in the compiler that knows # how to dump the passes and the pipelines themselves. AADumper = Pass('AADumper') ABCOpt = Pass('ABCOpt') AllocBoxToStack = Pass('AllocBoxToStack') CFGPrinter = Pass('CFGPrinter') COWArrayOpts = Pass('COWAr...
Python
0.000001
@@ -739,16 +739,27 @@ ation')%0A +Speculative Devirtua
992b9c46dd432ad409025a3cbaeb1c06f880526c
Resolve readline/ncurses dependency when building Lua
var/spack/packages/lua/package.py
var/spack/packages/lua/package.py
from spack import * import os class Lua(Package): """ The Lua programming language interpreter and library """ homepage = "http://www.lua.org" url = "http://www.lua.org/ftp/lua-5.1.5.tar.gz" version('5.3.1', '797adacada8d85761c079390ff1d9961') version('5.3.0', 'a1b0a7e92d0c85bbff7a8d27bf29f8a...
Python
0
@@ -799,16 +799,43 @@ curses') +%0A depends_on('readline') %0A%0A de @@ -933,37 +933,26 @@ AGS= -%22 -L%25s -/lib -Wl,-rpath,%25s%22 + -lncurses ' %25 -( spec @@ -973,32 +973,12 @@ efix -,spec%5B'ncurses'%5D.prefix) +.lib ,%0A @@ -1065,37 +1065,26 @@ AGS= -%22 -L%25s -/lib -Wl,-rpath,%25s%22 + -lncur...
971a1dd12c11c66ea3a42cddd693e7f20c45846c
Adding a blank line
mysite/missions/git/controllers.py
mysite/missions/git/controllers.py
# This file is part of OpenHatch. # Copyright (C) 2010 Jack Grigg # Copyright (C) 2010 John Stumpo # Copyright (C) 2010, 2011 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundat...
Python
0.999999
@@ -2409,16 +2409,17 @@ his %25s.%0A +%0A
81e9bf3a9cca702af11f0d7ed17d25611b9a1380
Fix for creating node instance set
vcloud_plugin_common/workflows.py
vcloud_plugin_common/workflows.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 required ...
Python
0
@@ -1665,24 +1665,68 @@ ctx.nodes:%0A + for instance in node.instances:%0A if v @@ -1724,16 +1724,17 @@ if +( vcloud_p @@ -1778,17 +1778,16 @@ operties -: %0A @@ -1795,39 +1795,20 @@ -for instance in node.instances: + and token %0A @@ -1823,18 +1823,8 @@ - if tok...
f23a0c344a8683e47709d4fe940fe0298202f017
remove unused code in has_token decorator
api/src/api/views/decorators.py
api/src/api/views/decorators.py
# Copyright 2017 the Isard-vdi project authors: # Josep Maria Viñolas Auquer # Alberto Larraz Dalmases # License: AGPLv3 import json import os from functools import wraps from flask import request from rethinkdb import RethinkDB from api import app r = RethinkDB() import logging import traceback from fla...
Python
0
@@ -843,127 +843,8 @@ rgs) -%0A raise Error(%0A %7B%22error%22: %22not_allowed%22, %22description%22: %22Not enough rights%22 %22 token.%22%7D, 401%0A ) %0A%0A
2c71d178ae9d6ead586c7f7f3a2c21a21a998714
Fix Bed Bath & Beyond
locations/spiders/bed_bath_beyond.py
locations/spiders/bed_bath_beyond.py
# -*- coding: utf-8 -*- import json import scrapy import re from scrapy.utils.url import urljoin_rfc from scrapy.utils.response import get_base_url from locations.items import GeojsonPointItem class BedBathBeyondSpider(scrapy.Spider): name = "bed_bath_beyond" allowed_domains = ["stores.bedbathandbeyond.com"] ...
Python
0
@@ -46,106 +46,8 @@ rapy -%0Aimport re%0Afrom scrapy.utils.url import urljoin_rfc%0Afrom scrapy.utils.response import get_base_url %0A%0Afr @@ -90,16 +90,17 @@ ntItem%0A%0A +%0A class Be @@ -3580,50 +3580,8 @@ e):%0A - base_url = get_base_url(response)%0A @@ -3735,17 +3735,18 @@ '-', 1)%5B -0 +-1 %5...
679755a0bae0ce8a34b9907cbc2ff9bd90144822
Remove pwd from binding file
src/spatialite/deps/iconv/binding.gyp
src/spatialite/deps/iconv/binding.gyp
{ 'variables': { 'target_arch%': 'ia32' }, 'target_defaults': { 'default_configuration': 'Debug', 'configurations': { 'Debug': { 'defines': [ 'DEBUG', '_DEBUG' ], 'msvs_settings': { 'VCCLCompilerTool': { 'RuntimeLibrary': 1, # static debug }, },...
Python
0
@@ -2204,15 +2204,9 @@ IR=%22 -%3C!(pwd) +. %22',%0A
9d60b14e35917e7227a03d53bf6a6e83c25b7e81
Correct publication mapping dependencies
luigi/tasks/quickgo/load_mappings.py
luigi/tasks/quickgo/load_mappings.py
# -*- coding: utf-8 -*- """ Copyright [2009-2017] EMBL-European Bioinformatics Institute 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
@@ -777,16 +777,69 @@ ckGoData +%0Afrom .load_annotations import QuickGoLoadAnnotations %0A%0ACONTRO @@ -2102,24 +2102,62 @@ edLoader(),%0A + QuickGoLoadAnnotations(),%0A %5D%0A%0A
360345abd7e9751f376a79ed0f3b1f5228253875
allow metadata in Kernel-side Comm messages.
IPython/kernel/comm/comm.py
IPython/kernel/comm/comm.py
"""Base class for a Comm""" #----------------------------------------------------------------------------- # Copyright (C) 2013 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #-----------------------...
Python
0
@@ -2218,24 +2218,39 @@ , data=None, + metadata=None, **keys):%0A @@ -2344,24 +2344,80 @@ e else data%0A + metadata = %7B%7D if metadata is None else metadata%0A self @@ -2518,16 +2518,47 @@ *keys),%0A + metadata=metadata,%0A @@ -2772,32 +2772,47 @@ (self, data=None +, metad...
1d9a04db9347ff105f79fd0c6ff38a0b47d87ecb
Fix compare user.id
russianroulette/russianroulette.py
russianroulette/russianroulette.py
import discord from discord.ext import commands import os from .utils.dataIO import dataIO import time import asyncio client = discord.Client() class Russianroulette: """Russian Roulette""" def __init__(self, bot): self.bot = bot self.file_path = "data/russianroulette/russianroulette.json...
Python
0.000001
@@ -1883,17 +1883,19 @@ ayers%22%5D%5B -0 +%221%22 %5D:%0A
fd8c3bdcd1fe3dea8186c4870285731e3081b396
modify parse request
src/server.py
src/server.py
# -*- coding: utf-8 -*- """Server module.""" from __future__ import unicode_literals import socket import email.utils def resolve_uri(uri): def parse_request(request): """Parse and validate request to confirm parts are correct.""" lines = request.split('\r\n') try: lines[1][:3] == 'GET' ex...
Python
0.000001
@@ -116,31 +116,465 @@ ls%0A%0A -%0Adef resolve_uri(uri):%0A +RESOURCES = %7B%0A 'images':%0A%0A%7D%0A%0A%0A%0Adef resolve_uri(uri):%0A %22%22%22Return request body and file type.%22%22%22%0A file_path = uri.split('/')%0A print(file_path)%0A if file_path%5B0%5D != 'webroot':%0A response_error(u'4...
c25d97ccc5109064ef80141e62c44134702b8125
Add endpoints for the admin page
src/server.py
src/server.py
#!/usr/bin/env python3 # 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/. # # Copyright 2017 - Edoardo Morassutto <edoardo.morassutto@gmail.com> import sys import tracebac...
Python
0.000001
@@ -2293,16 +2293,501 @@ output%22) +,%0A%0A Rule(%22/admin/extract%22, methods=%5B%22POST%22%5D, endpoint=%22admin#extract%22),%0A Rule(%22/admin/log%22, methods=%5B%22POST%22%5D, endpoint=%22admin#log%22),%0A Rule(%22/admin/start%22, methods=%5B%22POST%22%5D, endpoint=%22admin#start%...
bde14d07446b3a0d36031b7e0cb0403233693370
Version 3.3.1
seleniumbase/__version__.py
seleniumbase/__version__.py
# seleniumbase package __version__ = "3.3.0"
Python
0.000001
@@ -39,7 +39,7 @@ 3.3. -0 +1 %22%0A
a7acff51e61d3cdef0e61f960cf1f38e10b5a2a1
Version 3.1.5
seleniumbase/__version__.py
seleniumbase/__version__.py
# seleniumbase package __version__ = "3.1.4"
Python
0.000001
@@ -39,7 +39,7 @@ 3.1. -4 +5 %22%0A
91f62f7b237a151ca54b20ec1d0f6d2924a47494
Version 2.3.9
seleniumbase/__version__.py
seleniumbase/__version__.py
# seleniumbase package __version__ = "2.3.8"
Python
0
@@ -39,7 +39,7 @@ 2.3. -8 +9 %22%0A
7a3158d60315b6be148cefe6f8257c9377a0dcfd
Version 2.4.3
seleniumbase/__version__.py
seleniumbase/__version__.py
# seleniumbase package __version__ = "2.4.2"
Python
0.000001
@@ -35,11 +35,11 @@ = %222.4. -2 +3 %22%0A
b135dc0acb7a7c1bffce8506e97629ed9eedbf7c
Reset scaling to match SANDRA calculation - NB: this gives different intensity to SasView
sasmodels/models/adsorbed_layer.py
sasmodels/models/adsorbed_layer.py
#adsorbed_layer model #conversion of Core2ndMomentModel.py #converted by Steve King, Mar 2016 r""" This model describes the scattering from a layer of surfactant or polymer adsorbed on spherical particles under the conditions that (i) the particles (cores) are contrast-matched to the dispersion medium, (ii) *S(Q)* ~...
Python
0
@@ -2958,17 +2958,17 @@ frac%22, %22 -n +N one%22, 0. @@ -3830,18 +3830,8 @@ nten - * 9.4e-13 %0AIq.
4f2fa4e43b314c9d05e0b9b9e73641463c16a9cb
Set up the proposal tasks on app startup
server/proposal/__init__.py
server/proposal/__init__.py
from django.apps import AppConfig class ProposalConfig(AppConfig): name = "proposal" def ready(self): # Register tasks with Celery: from . import tasks
Python
0.000064
@@ -28,16 +28,17 @@ Config%0A%0A +%0A class Pr @@ -172,8 +172,37 @@ t tasks%0A + tasks.set_up_hooks()%0A
c8db58d0e8d05a78659205053c4a722734ee39ce
Reorder loops for creation status agg sub tasks
app/celery/reporting_tasks.py
app/celery/reporting_tasks.py
from datetime import datetime, timedelta from flask import current_app from notifications_utils.timezones import convert_utc_to_bst from app import db, notify_celery from app.config import QueueNames from app.cronitor import cronitor from app.dao.fact_billing_dao import ( fetch_billing_data_for_day, update_fa...
Python
0
@@ -3458,67 +3458,8 @@ 1)%0A%0A - for (service_id,) in db.session.query(Service.id):%0A @@ -3528,20 +3528,16 @@ - - days = 1 @@ -3590,20 +3590,16 @@ - for i in @@ -3620,28 +3620,24 @@ - - process_day @@ -3669,16 +3669,80 @@ ays=i)%0A%0A + for (...
69a16e61f0b0d5eb6d1f0819ff379c0d86b67dc3
fix in lcb
robo/acquisition/lcb.py
robo/acquisition/lcb.py
import logging import numpy as np from robo.acquisition.base_acquisition import BaseAcquisitionFunction logger = logging.getLogger(__name__) class LCB(BaseAcquisitionFunction): def __init__(self, model, X_lower, X_upper, par=0.0, **kwargs): r""" The lower confidence bound acquisition functions...
Python
0.000004
@@ -2007,14 +2007,15 @@ = - +( mean -+ +- sel @@ -2034,16 +2034,17 @@ qrt(var) +) %0A @@ -2139,12 +2139,13 @@ = - +( dm -+ +- sel @@ -2167,32 +2167,33 @@ * np.sqrt(var)) +) %0A ret
7dab7ffa870186cab8dd83ed497ec4e40fc9a7ba
Fix minor bug with the licencer script.
SCons/licencer.py
SCons/licencer.py
# -*- coding: UTF8 -*- # ***** BEGIN LICENSE BLOCK ***** # Sconspiracy - Copyright (C) IRCAD, 2004-2009. # Distributed under the terms of the BSD Licence as # published by the Open Source Initiative. # ****** END LICENSE BLOCK ****** import os import textwrap licence = {} comments = {} comments['.cpp'] = { ...
Python
0
@@ -781,16 +781,121 @@ 'UTF8'%5D%0A +licence%5B'begin'%5D = '***** BEGIN LICENSE BLOCK *****'%0Alicence%5B'end'%5D = '****** END LICENSE BLOCK ******' %0Alicence @@ -1135,17 +1135,16 @@ LGPL) as - %0Apublish @@ -3890,19 +3890,20 @@ icence%5B' -BSD +LGPL '%5D)%0A%0Aif
3468b32964560f4092593e03ba552d7e6b56943d
Support renaming of _ to % routines
Scripts/PackRO.py
Scripts/PackRO.py
#!/usr/bin/env python # Pack .m files into M[UMPS] routine transfer format (^%RO) # # python PackRO.py *.m > routines.ro # # or # # ls *.m | python PackRO.py > routines.ro # #--------------------------------------------------------------------------- # Copyright 2011 The Open Source Electronic Health Record Agent #...
Python
0.000003
@@ -1189,16 +1189,47 @@ f)%5B:-2%5D%0A + n = n.replace(%22_%22,%22%25%22)%0A
1b398b07b1ba1fa8a304f24d9e75d6f76fbc56f7
remove caps and spaces walmart
Server/walmart.py
Server/walmart.py
from crawl_lib import * from pymongo import MongoClient import unicodedata import json # Parses starting from the base_url and sends the data to the db def parse(): deps_exclusions = {'91083', '5426', '4096', '4104'} full_json = json.loads(urlopen('http://api.walmartlabs.com/v1/taxonomy?format=json&apiKey=' + ...
Python
0.000002
@@ -676,32 +676,76 @@ category%5B'name'%5D +.replace('.', '-').replace(' ', '-').lower() %0A els
a1d02e3a88e5c46a700385e9cef50c9ebcad68b1
Simplify test_roi_pooling_2d with no_grads option in check_backward
tests/chainer_tests/functions_tests/pooling_tests/test_roi_pooling_2d.py
tests/chainer_tests/functions_tests/pooling_tests/test_roi_pooling_2d.py
import unittest import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import condition class TestROIPooling2D(unittest.TestCase): def setUp(self): N = 4 ...
Python
0.000003
@@ -2331,78 +2331,38 @@ -x = chainer.Variable(x_data)%0A rois = chainer.Variable(roi_data) +gradient_check.check_backward( %0A @@ -2358,35 +2358,35 @@ ckward(%0A -y = + functions.roi_p @@ -2384,32 +2384,21 @@ ons. -roi_p +ROIP ooling -_2d(x, rois, +2D( outh @@ -2400,32 +2400,67 @@ (o...
c34244ae414533491290d2e3502119c4d11cafe9
Fix in 27
scripts/27-pubyear-stats.py
scripts/27-pubyear-stats.py
#!/usr/bin/env python3 import json import re from collections import defaultdict, Counter from xdfile.utils import error, debug, info from xdfile import utils, metasql, metadatabase as metadb from xdfile import year_from_date, dow_from_date import xdfile def diff_authors(a1, a2): if not a1 or not a2: re...
Python
0.999934
@@ -3933,16 +3933,72 @@ s None:%0A + info(%22skipping %25s %25s%22 %25 (xd1, xd2))%0A @@ -4476,39 +4476,8 @@ ous%0A - if aut%0A
d6c1774b75839192b0235e5737cdba0d17759fde
Update mqtt_easydriver_stepper.py
linkit/easydriver/mqtt_easydriver_stepper.py
linkit/easydriver/mqtt_easydriver_stepper.py
import paho.mqtt.client as mqtt import json, time import mraa pin19 = mraa.Pwm(19) pin0 = mraa.Gpio(0) pin0.dir(mraa.DIR_OUT) # ----- CHANGE THESE FOR YOUR SETUP ----- MQTT_HOST = "190.97.168.236" MQTT_PORT = 1883 def on_connect(client, userdata, rc): print("\nConnected with result code " + str(rc) + "\n") ...
Python
0
@@ -211,16 +211,57 @@ T = 1883 +%0A#--------------------------------------- %0A%0Adef on @@ -355,266 +355,8 @@ %5Cn%22) -%0A%0A #Subscribing in on_connect() means that if we lose the connection and%0A # reconnect then subscriptions will be renewed.%0A #client.subscribe(%22/pyxo/xyusers/%7BUSERNAME%7D/%7BAPI...
2577c9de30eef0b872bb5a8d0d34b498589c95b7
fix property called [skip ci]
custom/enikshay/management/commands/data_dumps_person_case.py
custom/enikshay/management/commands/data_dumps_person_case.py
from __future__ import ( absolute_import, print_function, ) from corehq.apps.users.models import CommCareUser from corehq.form_processor.interfaces.dbaccessors import CaseAccessors from corehq.apps.es.case_search import CaseSearchES from corehq.apps.es import queries from custom.enikshay.case_utils import ( ...
Python
0
@@ -2717,20 +2717,18 @@ .closed_ -date +on %0A
6b7bd1c412b21a748b39a07a792f8b2c8461f9e2
Fix issue #17
marmoset/installimage/installimage_config.py
marmoset/installimage/installimage_config.py
import os class InstallimageConfig: CFG_DIR = '/srv/tftp/installimage/' def __init__(self, mac): self.variables = {} self.mac = mac if self.exists(): self.__read_config_file() def add_or_set(self, key, value): self.variables[key] = value def create(self)...
Python
0
@@ -274,32 +274,40 @@ lf.variables%5Bkey +.upper() %5D = value%0A%0A d @@ -1419,24 +1419,16 @@ %22 %25 (key -.upper() , self.v
74cfb1bd8e60e1d348115677e92c5e64858ec785
Add clearer instructions on no component support. (#2685)
packaged_releases/patches/patch_component_custom.py
packaged_releases/patches/patch_component_custom.py
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
Python
0.000552
@@ -527,16 +527,17 @@ use +' apt-get to u @@ -532,16 +532,185 @@ apt-get +update' to update this installation.%0AIf installed with Docker, please use 'docker pull' to update this installation.%0AIf installed with Windows MSI, download the new MSI to updat
c5a31be1bd452224c2b35c4f3e3132b2df1431e7
reorder imports
meinberlin/apps/documents/exports.py
meinberlin/apps/documents/exports.py
from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from adhocracy4.comments.models import Comment from adhocracy4.exports import mixins as export_mixins from adhocracy4.exports import views as export_views from adhocracy4.projects.mixins import ProjectMixin from meinberlin.apps.e...
Python
0.000009
@@ -243,60 +243,8 @@ ews%0A -from adhocracy4.projects.mixins import ProjectMixin%0A from @@ -298,24 +298,24 @@ port_mixins%0A + from meinber @@ -433,49 +433,8 @@ ew(%0A - export_views.BaseItemExportView,%0A @@ -695,20 +695,40 @@ -ProjectMixin +export_views.BaseItemExportView%0A ):%0A%0A
48fa1b07892cf4431b0f24b2c4ad89258ed6b5e3
Change "Additional Parameters" to "Other Parameters".
scikits/image/filter/lpi_filter.py
scikits/image/filter/lpi_filter.py
""" :author: Stefan van der Walt, 2008 :license: modified BSD """ __all__ = ['inverse', 'wiener', 'LPIFilter2D'] __docformat__ = 'restructuredtext en' import numpy as np from scipy.fftpack import fftshift, ifftshift eps = np.finfo(float).eps def _min_limit(x, val=eps): mask = np.abs(x) < eps x[mask] = np.si...
Python
0
@@ -5021,34 +5021,29 @@ ended.%0A%0A -Additional +Other Parameters%0A @@ -5054,37 +5054,32 @@ ---------------- ------ %0A predefined_ @@ -6175,26 +6175,21 @@ n.%0A%0A -Additional +Other Paramet @@ -6204,37 +6204,32 @@ ---------------- ------ %0A predefined_
1c6c31653889c8acb60a54dc1dc9ea0f8795f122
bump to next dev version: 0.6.7-dev
ulmo/version.py
ulmo/version.py
# set version number __version__ = '0.6.6'
Python
0
@@ -33,11 +33,15 @@ = '0.6. -6 +7-dev '%0A
8546e14e152c79f137e0db15e3cd7de71cd0e8b4
bump to next dev version: 0.7.3-dev
ulmo/version.py
ulmo/version.py
# set version number __version__ = '0.7.2'
Python
0
@@ -37,7 +37,11 @@ 0.7. -2 +3-dev '%0A
a8b43950610adb41a3de4c342c51d5b22fd5454b
Fix indents
saleor/product/forms.py
saleor/product/forms.py
import json from django import forms from django.utils.encoding import smart_text from django.utils.translation import pgettext_lazy from django_prices.templatetags.prices_i18n import gross from ..cart.forms import AddToCartForm class VariantChoiceField(forms.ModelChoiceField): discounts = None def __init_...
Python
0.000034
@@ -600,20 +600,16 @@ - 'variant @@ -632,20 +632,16 @@ _label,%0A -
833f8ce0673701eb64fb20ee067ccd8c58e473c6
Correct wrong inheritance on sponsorship_typo3 child_depart wizard.
child_sync_typo3/wizard/child_depart_wizard.py
child_sync_typo3/wizard/child_depart_wizard.py
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __open...
Python
0
@@ -488,31 +488,28 @@ %0D%0Aclass -end_sponsorship +child_depart _wizard( @@ -550,23 +550,20 @@ = ' -end.sponsorship +child.depart .wiz @@ -847,23 +847,20 @@ per( -end_sponsorship +child_depart _wiz
bda38b1e168e227cba2baedb1c5e2e079ccaede8
Drop Py2 and six on salt/beacons/service.py
salt/beacons/service.py
salt/beacons/service.py
# -*- coding: utf-8 -*- """ Send events covering service status """ # Import Python Libs from __future__ import absolute_import, unicode_literals import logging import os import time from salt.ext.six.moves import map log = logging.getLogger(__name__) # pylint: disable=invalid-name LAST_STATUS = {} __virtualname...
Python
0
@@ -1,28 +1,4 @@ -# -*- coding: utf-8 -*-%0A %22%22%22%0A @@ -41,88 +41,8 @@ %22%22%22%0A -%0A# Import Python Libs%0Afrom __future__ import absolute_import, unicode_literals%0A%0A impo @@ -79,44 +79,8 @@ me%0A%0A -from salt.ext.six.moves import map%0A%0A log @@ -112,40 +112,8 @@ e__) - # pylint: disable=invalid...
b80608605827d138eca6daab2633660716660721
Fix plotting test.
src/tests/unit_tests/plotting_test.py
src/tests/unit_tests/plotting_test.py
import nose.tools import unittest import pandas as pd import numpy as np import matplotlib.pyplot as plt import mia from mia.plotting import * from ..test_utils import get_file_path class IOTests(unittest.TestCase): @classmethod def setupClass(cls): blobs_path = get_file_path("blob_detection.csv") ...
Python
0.000002
@@ -3880,32 +3880,42 @@ labels = +pd.Series( np.random.randin @@ -3929,32 +3929,33 @@ lf._df.shape%5B0%5D) +) %0A%0A index_ @@ -3950,32 +3950,42 @@ index_a = +pd.Series( np.arange(5)%0A @@ -3972,32 +3972,33 @@ ies(np.arange(5) +) %0A index_b @@ -3992,32 +3992,42 @@ index_b...
e8ead2bfed01d2b9b71b066b525ce4356615b5b7
Allow for tcp transport in publish
salt/modules/publish.py
salt/modules/publish.py
# -*- coding: utf-8 -*- ''' Publish a command from a minion to a target ''' from __future__ import absolute_import # Import python libs import time import logging # Import salt libs import salt.crypt import salt.payload import salt.transport import salt.utils.args from salt.exceptions import SaltReqTimeoutError log ...
Python
0
@@ -457,19 +457,20 @@ '') -== +in ( 'zeromq' els @@ -465,16 +465,24 @@ 'zeromq' +, 'tcp') else Fa
97c5cb0312d7b093752376a373cc3773fcf44f34
Add SunOS to the basic service module
salt/modules/service.py
salt/modules/service.py
''' The default service module, if not otherwise specified salt will fall back to this basic module ''' import os grainmap = { 'Arch': '/etc/rc.d', 'Debian': '/etc/init.d', 'Fedora': '/etc/init.d', 'RedHat': '/etc/init.d', 'Ubuntu': '/etc/init.d', 'Gen...
Python
0
@@ -362,32 +362,67 @@ '/etc/init.d',%0A + 'SunOS': '/etc/init.d',%0A %7D%0A%0Adef
d90be6a8765e3c22b092221db44c3d40917ef45e
Fix bug 1659: set correct language as source
scripts/harvest_template.py
scripts/harvest_template.py
#!/usr/bin/python # -*- coding: utf-8 -*- """ Usage: python harvest_template.py -lang:nl -template:"Taxobox straalvinnige" orde P70 familie P71 geslacht P74 This will work on all pages that transclude the template in the article namespace You can use any typical pagegenerator to provide with a list of pages: python...
Python
0.001339
@@ -1636,16 +1636,23 @@ for +source_ lang in @@ -1688,24 +1688,31 @@ urce_values%5B +source_ lang%5D = pywi @@ -1751,16 +1751,23 @@ _values%5B +source_ lang%5D)%0A%0A
6ddb38eee5624ea8753e52cfde4b8d17c0ac2b14
Making salt.output.json_out python3 compatible
salt/output/json_out.py
salt/output/json_out.py
# -*- coding: utf-8 -*- ''' Display return data in JSON format ================================== :configuration: The output format can be configured in two ways: Using the ``--out-indent`` CLI flag and specifying a positive integer or a negative integer to group JSON from each minion to a single line. Or...
Python
0.998869
@@ -1358,16 +1358,55 @@ .%7D%7D%7D%0A''' +%0Afrom __future__ import absolute_import %0A%0A# Impo
f422535179d9f55e28d5c1b0e098e0a4931d366b
Making salt.pillar.cmd_json python3 compatible
salt/pillar/cmd_json.py
salt/pillar/cmd_json.py
# -*- coding: utf-8 -*- ''' Execute a command and read the output as JSON. The JSON data is then directly overlaid onto the minion's Pillar data. ''' # Don't "fix" the above docstring to put it on two lines, as the sphinx # autosummary pulls only the first line for its description. # Import python libs import logging...
Python
0.998816
@@ -142,16 +142,55 @@ ata.%0A''' +%0Afrom __future__ import absolute_import %0A%0A# Don'
e40a9b3676101d7d7bd65cff8487f48a285f3139
Fix typo
scripts/obtain_user_auth.py
scripts/obtain_user_auth.py
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
Python
0.999999
@@ -865,16 +865,8 @@ lly -created for
8ab674582e88582f06d729237d9cb1c00562451e
fix pbs dependency stuff
util/pbs/pbs.py
util/pbs/pbs.py
# Copyright (c) 2005 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list ...
Python
0.000009
@@ -5456,16 +5456,18 @@ lf.after +ok )%0A%0A
070605a66393c588ed7cdc9bc061e1bfbf105866
Remove space
app/lib/twitter_api/search.py
app/lib/twitter_api/search.py
# -*- coding: utf-8 -*- """ Search Tweets application file. Search for tweets in the Twitter API based on a query string and return the tweepy tweet objects, which have an author attribute. See the search docs in this project for details on search syntax and links to the Twitter developer docs. """ from __future__ im...
Python
0.032829
@@ -4399,17 +4399,16 @@ unt:,d%7D. - %22%5C%0A
f1e1513cf739b8f25b9364226cc8ce987a47fa56
Fix check for helpers with staff perms
utils/checks.py
utils/checks.py
import discord from discord import app_commands from discord.ext import commands from utils.configuration import StaffRank from typing import Union, TYPE_CHECKING if TYPE_CHECKING: from kurisu import Kurisu class InsufficientStaffRank(commands.CheckFailure): message: str def is_staff(role: str): async...
Python
0
@@ -1086,18 +1086,87 @@ ol:%0A -if +position = bot.configuration.staff.get(user_id)%0A if not position and bot.con @@ -1238,75 +1238,8 @@ per%0A - else:%0A position = bot.configuration.staff.get(user_id)%0A%0A
935ee603885b8af15376ce950eba1c413c9aa310
Set connection for workers.
samples/mnist/worker.py
samples/mnist/worker.py
# -*- coding: utf-8 -*- import inspyred import inspyred.ec.cea_parallel_evaluator import pyvotune import pyvotune.sklearn import random import sys import redis import time from sklearn.cross_validation import train_test_split from sklearn.pipeline import Pipeline import sklearn.datasets import multiprocessing from l...
Python
0
@@ -3754,53 +3754,19 @@ r = -%22redis://ip-10-157-0-244.ec2.internal:6379/3%22 +sys.argv%5B1%5D %0A%0A
8eae3c9e1994a0254b7c05158153d169fc19f974
Add --reforms option to openfisca-run-test
openfisca_core/scripts/run_test.py
openfisca_core/scripts/run_test.py
# -*- coding: utf-8 -*- import argparse import logging import sys import os import importlib from openfisca_core.tools.test_runner import run_tests from openfisca_core.tools import detect_country_packages def build_parser(): parser = argparse.ArgumentParser() parser.add_argument('path', help = "paths (files...
Python
0.000009
@@ -796,16 +796,194 @@ n_2%22)')%0A + parser.add_argument('-r', '--reforms', action = 'store', help = 'reforms to apply to the country package, separated by commas (e.g -r openfisca_france.reforms.some_reform)')%0A pars @@ -3301,16 +3301,615 @@ nsion)%0A%0A + if args.reforms:%0A reforms = %5Bname.st...
2031c415144fe7c616fb1b020c9571ced5726654
Handle yanked Projects, Versions, and Files
warehouse/synchronize/commands.py
warehouse/synchronize/commands.py
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import eventlet from progress.bar import ShadyBar from warehouse import create_app, db, script from warehouse.packages import store from warehouse.synchronize.fetchers import PyPIFetcher eventlet.monkey_p...
Python
0
@@ -239,16 +239,77 @@ t store%0A +from warehouse.packages.models import Project, Version, File%0A from war @@ -355,16 +355,16 @@ Fetcher%0A - %0A%0Aeventl @@ -1418,16 +1418,1392 @@ rl%22%5D))%0A%0A + # Get a list of filesnames%0A filenames = %5Bx%5B%22filename%22%5D for x in distributions%5D%...
6cba22ad2c26185f6b3454116c3e31ea14160db8
Make collect-sprite-metadata.py work from any directory
scripts/collect-sprite-metadata.py
scripts/collect-sprite-metadata.py
from collections import OrderedDict import glob import json import os def main(): c = collect() c.sort(key = lambda x: x[0]) c = OrderedDict(c) print(json.dumps(c, separators=(',',':'))) def collect(): root = '../build/website/static/sprites' hitboxes = [] for (dirpath, dirnames, filename...
Python
0.000007
@@ -225,17 +225,63 @@ root = -' +os.path.dirname(os.path.abspath(__file__)) + '/ ../build @@ -293,14 +293,14 @@ ite/ -static +assets /spr
2192219d92713c6eb76593d0c6c29413d040db6a
Revert "Added script for cron job to load surveys to database."
scripts/cronRefreshEdxQualtrics.py
scripts/cronRefreshEdxQualtrics.py
from surveyextractor import QualtricsExtractor import getopt import sys ### Script for scheduling regular EdxQualtrics updates ### Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r" # Append directory for dependencies to PYTHONPATH sys.path.append("/home/dataman/Code/qualtrics_etl/src/qualtrics_etl/") qe...
Python
0
@@ -57,23 +57,15 @@ topt -%0Aimport +, sys%0A%0A -## # Sc @@ -113,18 +113,16 @@ updates%0A -## # Usage @@ -183,130 +183,8 @@ r%22%0A%0A -# Append directory for dependencies to PYTHONPATH%0Asys.path.append(%22/home/dataman/Code/qualtrics_etl/src/qualtrics_etl/%22)%0A%0A qe =
442bc4edea792e15871b8f00c3dec833615ec101
Add the ability the get the status of a single machine
floki/machines/__init__.py
floki/machines/__init__.py
from vmrun_wrapper.vmrun import machine import yaml import sys import os import time class Machines: def __init__(self, config): self.load_config(config) if os.environ.get('VMRUN'): self.vm = machine.machine(os.environ['VMRUN']) else: self.vm = machine.machine() ...
Python
0.000121
@@ -5525,16 +5525,24 @@ v, group +, single ):%0A @@ -5609,16 +5609,47 @@ group)%0A + if single is None:%0A @@ -5671,24 +5671,28 @@ list) is 0:%0A + @@ -5718,32 +5718,36 @@ unning'%0A + else:%0A @@ -5744,24 +5744,28 @@ + + print ...
3469c8ab2bb296f5a5eddc9f320c8b7e121fb38c
Fix affluent communication
confluent_server/confluent/plugins/hardwaremanagement/affluent.py
confluent_server/confluent/plugins/hardwaremanagement/affluent.py
# Copyright 2019-2020 Lenovo # # 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
@@ -1449,24 +1449,41 @@ , results):%0A + try:%0A rsp, @@ -1536,16 +1536,321 @@ us(url)%0A + except exc.PubkeyInvalid:%0A results.put(msg.ConfluentNodeError(self.node,%0A 'Extended information unavailable, mismatch detected between '%0A 'target certif...
2c4b555b95429156185c7a1ac499f8d69ffeefe2
use renamed xmlid in newly added test
addons/stock/tests/test_robustness.py
addons/stock/tests/test_robustness.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.exceptions import UserError from odoo.tests.common import TransactionCase class TestRobustness(TransactionCase): def setUp(self): super(TestRobustness, self).setUp() self.stock_location = ...
Python
0
@@ -466,39 +466,35 @@ = self.env.ref(' -product +uom .product_uom_uni @@ -528,39 +528,35 @@ = self.env.ref(' -product +uom .product_uom_doz
98311b8b80d28ac6e6d92dbae3bcf987d5027e7a
Fix for housekeeping script error
photonix/photos/management/commands/housekeeping.py
photonix/photos/management/commands/housekeeping.py
import os from pathlib import Path from shutil import rmtree from time import sleep from django.conf import settings from django.core.management.base import BaseCommand from photonix.photos.models import Photo, Task from photonix.photos.utils.thumbnails import THUMBNAILER_VERSION class Command(BaseCommand): hel...
Python
0
@@ -497,16 +497,33 @@ ctories%0A + try:%0A @@ -588,16 +588,20 @@ + if direc @@ -627,16 +627,20 @@ file'%5D:%0A + @@ -704,32 +704,36 @@ + + print(f'Removing @@ -778,16 +778,20 @@ + rmtree(p @@ -794,16 +794,116 @@ ee(path) +%0A ...
1eccbbfc073e37febf495afbbad2ccc255eb4932
Fix configuration file for boolean values
django_migration_linter/management/commands/lintmigrations.py
django_migration_linter/management/commands/lintmigrations.py
import configparser import logging import os import sys from importlib import import_module from django.core.management.base import BaseCommand from ...constants import __version__ from ...migration_linter import MessageType, MigrationLinter from ..utils import register_linting_configuration_options CONFIG_NAME = "d...
Python
0.000032
@@ -4787,32 +4787,39 @@ onfig_parser.get +boolean (%0A CO @@ -4936,32 +4936,39 @@ onfig_parser.get +boolean (%0A CO @@ -5063,16 +5063,29 @@ options%5B +%0A %22unappli @@ -5090,32 +5090,41 @@ lied_migrations%22 +%0A %5D or config_pars @@ -5121,32 +5121,39 @@ onfig_parse...
7a87568db2a2012a25dc0a09ce41b742107bb111
Mark fiware-ut-9 tests
src/wirecloud/oauth2provider/tests.py
src/wirecloud/oauth2provider/tests.py
# -*- coding: utf-8 -*- # Copyright 2013 Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
Python
0
@@ -3211,16 +3211,79 @@ , dict)) +%0A test_authorization_code_grant_flow.tags = ('fiware-ut-9',) %0A%0A @u
74bfb58d2ac736960392bd7358a96317b63e6aef
add delay for test_diag (#4046)
tests/scripts/thread-cert/test_diag.py
tests/scripts/thread-cert/test_diag.py
#!/usr/bin/env python # # Copyright (c) 2018, The OpenThread Authors. # 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
@@ -1612,16 +1612,28 @@ unittest +%0Aimport time %0A%0Aimport @@ -4081,16 +4081,111 @@ r.go(1)%0A + if type(self.simulator).__name__ == 'VirtualTime':%0A time.sleep(0.1)%0A
6bdc92345a58dc40749eedb9630d0d28d6d23e87
Add release notes for moving_mnist
tensorflow_datasets/video/moving_mnist.py
tensorflow_datasets/video/moving_mnist.py
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
Python
0
@@ -1945,16 +1945,42 @@ Version( +%221.0.0%22)%0A RELEASE_NOTES=%7B %0A %22 @@ -1985,17 +1985,17 @@ %221.0.0%22 -, +: %22New sp @@ -2043,17 +2043,21 @@ splits)%22 -) +,%0A %7D %0A%0A def
3214645740866f4d15df826880169297b460bce4
fix file mode
egginst/utils.py
egginst/utils.py
import os import sys import random import shutil import string from os.path import basename, isdir, isfile, join chars = string.letters + string.digits def mk_tmp_dir(): tmp_dir = join(sys.prefix, '.tmp_ironpkg') try: shutil.rmtree(tmp_dir) except (WindowsError, IOError): pass if not...
Python
0.000001
384358522c39c560538bfaade33d6176689dde56
Decrease multiple replies comment acceptance test number
src/adhocracy_frontend/adhocracy_frontend/tests/acceptance/test_comment.py
src/adhocracy_frontend/adhocracy_frontend/tests/acceptance/test_comment.py
from urllib.parse import urlencode from pytest import fixture from adhocracy_core.testing import god_login from adhocracy_frontend.tests.acceptance.shared import wait from adhocracy_frontend.tests.acceptance.shared import get_list_element from adhocracy_frontend.tests.acceptance.shared import get_listing_create_form ...
Python
0.002234
@@ -1259,9 +1259,9 @@ , n= -7 +3 ):%0A @@ -1512,18 +1512,17 @@ wser, n= -10 +3 ):%0A
ac90bdad2f09a5b79cb33b7ffed4782b7af6db61
Removing old hello world ish
webserver.py
webserver.py
import time from flask import Flask, render_template # DEFAULT_EXPIRATION = 10 # 10 sec # DEFAULT_EXPIRATION = 60 * 10 # 10 min DEFAULT_EXPIRATION = 60 * 20 # 20 min app = Flask(__name__) last_ping = {} @app.route('/') def index(): # return 'Hello, World!' return render_template('index.html') @ap...
Python
0.998965
@@ -242,37 +242,8 @@ ():%0A - # return 'Hello, World!'%0A
3fadef637ad17458f629a4baeba7fd38205a1510
Bump Katib Python SDK to 0.12.0rc0 version (#1640)
sdk/python/v1beta1/setup.py
sdk/python/v1beta1/setup.py
# Copyright 2021 The Kubeflow Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
Python
0
@@ -724,19 +724,22 @@ ion='0.1 -0.1 +2.0rc0 ',%0A a
8517803a2cb3f3dd46911ec63acdeae283f23efd
Increase fund graph detail
srv/config.py
srv/config.py
""" Global configuration variables """ import os.path PIE_TOLERANCE = 0.075 PIE_DETAIL = 30 GRAPH_FUND_HISTORY_DETAIL = 100 OVERVIEW_NUM_LAST = 25 OVERVIEW_NUM_FUTURE = 10 START_YEAR = 2014 START_MONTH = 9 LIST_CATEGORIES = ('funds', 'in', 'bills', 'food', 'general', 'holiday', 'social') # common columns are adde...
Python
0
@@ -115,17 +115,17 @@ ETAIL = -1 +2 00%0A%0AOVER
3d18d7a60ccf970f22fecb4981a2a8aa48248006
use a reliable host
Lib/test/test_socket_ssl.py
Lib/test/test_socket_ssl.py
# Test just the SSL support in the socket module, in a moderately bogus way. import sys import unittest from test import test_support import socket import errno import threading import subprocess import time import os import urllib # Optionally test SSL support, if we have it in the tested platform skip_expected = no...
Python
0
@@ -1249,213 +1249,8 @@ g).%0A - # XXX (%22gmail.org%22, 995) has been unreliable so far, from time to%0A # XXX time non-responsive for hours on end (& across all buildbot%0A # XXX slaves, so that's not just a local thing).%0A @@ -1265,17 +1265,21 @@ = %22 +pop. gmail. -org +com %22, 9
899e3c9f81a43dcb94e290ce0a86f128bd94effd
Apply filter channel published on menu list (channel context processors)
opps/channel/context_processors.py
opps/channel/context_processors.py
# -*- coding: utf-8 -*- from .models import Channel def channel_context(request): return {'opps_menu': Channel.objects.all()}
Python
0
@@ -17,16 +17,50 @@ f-8 -*-%0A +from django.utils import timezone%0A from .mo @@ -119,17 +119,51 @@ -return %7B' +%22%22%22 Channel context processors%0A %22%22%22%0A opps @@ -171,10 +171,10 @@ menu -': + = Cha @@ -190,11 +190,139 @@ cts. -all() +filter(date_available__lte=timezone.now(),%0A ...
54451c4030bfeece4ab2157afe1ee3f8f65c4dcb
Fix sentry_useremail "duplicate key" error (#16)
sentry_ldap_auth/backend.py
sentry_ldap_auth/backend.py
from __future__ import absolute_import from django_auth_ldap.backend import LDAPBackend from django.conf import settings from sentry.models import ( Organization, OrganizationMember, UserOption, ) class SentryLdapBackend(LDAPBackend): def get_or_create_user(self, username, ldap_user): model =...
Python
0.000008
@@ -624,24 +624,36 @@ %0A + userEmail = UserEmail.o @@ -663,42 +663,117 @@ cts. -update(%0A user=user, +get(user=user)%0A if not userEmail:%0A userEmail = UserEmail.objects.create(user=user)%0A %0A @@ -781,20 +781,26 @@ - +userEmail. email=ld @@...
c55bf8d153c47500615b8ded3c95957be8ee70a3
Refactor JSONResponse views to include ListView
froide/helper/json_view.py
froide/helper/json_view.py
from django import http from django.views.generic import DetailView class JSONResponseDetailView(DetailView): def render_to_json_response(self, context): "Returns a JSON response containing 'context' as payload" return self.get_json_response(self.convert_context_to_json(context)) def get_json_...
Python
0
@@ -60,16 +60,26 @@ tailView +, ListView %0A%0Aclass @@ -94,29 +94,20 @@ onse -DetailView(DetailView +Mixin(object ):%0A @@ -577,158 +577,983 @@ s)%0A%0A - def convert_context_to_json(self, context):%0A %22Convert the context dictionary into a JSON object%22%0A return context%5B'object'%5D.as_js...
e03103c74a066184178980f1073505724e094394
Fix url order
stadt/urls.py
stadt/urls.py
from django.conf import settings, urls from django.conf.urls import static from django.contrib import admin urlpatterns = [ urls.url(r'^stadt/admin/', admin.site.urls), urls.url(r'^stadt/api/', urls.include('core.api_urls')), urls.url(r'^stadt/', urls.include('account.urls')), urls.url(r'^stadt/', url...
Python
0.999733
@@ -979,32 +979,101 @@ .events.urls')), +%0A%0A # matches /*/, should be included late, groups before gestalten %0A urls.url(r' @@ -1099,23 +1099,22 @@ eatures. -content +groups .urls')) @@ -1150,37 +1150,40 @@ lude('features.g -roups +estalten .urls')),%0A ur @@ -1167,32 +1167,81 @@ stalten.urls')), +%...
a72f72c16aaf1689fc364311afe3b42a6fed7eae
add examples
CourierToDovecot.py
CourierToDovecot.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # ----------------------- # Author : jgo # Execute a perl script into all mailbox newly created, # on the Dovecot server. # ----------------------- import subprocess import os import logging from logging.handlers import RotatingFileHandler ## [Config VARS] -----------...
Python
0
@@ -473,16 +473,46 @@ rget dir + (example : '/var/spool/mail') %0Adest_pa @@ -576,16 +576,40 @@ ipt path + (example: '/script.sh') %0Ascript_
83ed8a4fd258f351da2ea358613ff57dadbf03f6
Remove blank line
junction/proposals/permissions.py
junction/proposals/permissions.py
# -*- coding: utf-8 -*- # Third Party Stuff from django.core.exceptions import PermissionDenied # Junction Stuff from junction.conferences.models import ConferenceProposalReviewer from junction.base.constants import ConferenceStatus from .models import ProposalSectionReviewer def is_proposal_voting_allowed(proposa...
Python
0.999999
@@ -1881,9 +1881,8 @@ n users%0A -%0A
30d6f1e1233d3ff832b6f771f2e381a833c0005d
Test customer/non-customer combo in new_domain_subscription
corehq/apps/accounting/tests/test_new_domain_subscription.py
corehq/apps/accounting/tests/test_new_domain_subscription.py
from __future__ import absolute_import from __future__ import unicode_literals import datetime from corehq.apps.accounting.exceptions import NewSubscriptionError from corehq.apps.accounting.models import ( Subscription, BillingAccount, DefaultProductPlan, SoftwarePlanEdition, SubscriptionAdjustmentMethod, Subs...
Python
0
@@ -6246,20 +6246,604 @@ ced_plan%0A ))%0A +%0A def test_customer_plan_not_added_to_regular_account(self):%0A self.advanced_plan.plan.is_customer_software_plan = True%0A self.assertRaises(NewSubscriptionError, lambda: Subscription.new_domain_subscription(%0A self.account, self.domain...
f8ea5ef37280366b4b3991442e406952bb0575b3
Create calculate_cosine_distance.py
k-NN/calculate_cosine_distance.py
k-NN/calculate_cosine_distance.py
''' Calculates the cosine distance for an input data ''' import math import numpy as np import scipy.io __author__ = """Mari Wahl""" def cosineDistance(x, y): ''' This function computes the cosine distance between feature vectors x and y. This distance is frequently used for text classification. ...
Python
0.00003
@@ -125,13 +125,25 @@ Mari - Wahl +na von Steinkirch %22%22%22%0A
cdefb05cfb315c2885e55831bfc31775b5a5d230
Handle time drift between databases
custom/icds_reports/management/commands/stale_data_in_ucr.py
custom/icds_reports/management/commands/stale_data_in_ucr.py
import inspect from datetime import datetime from django.core.management.base import BaseCommand, CommandError from django.db import connections import attr import dateutil from dimagi.utils.chunked import chunked from corehq.apps.hqadmin.management.commands.stale_data_in_es import ( get_sql_case_data_for_db, )...
Python
0.000003
@@ -37,16 +37,27 @@ datetime +, timedelta %0A%0Afrom d @@ -3570,24 +3570,25 @@ if +( not ucr_inse @@ -3598,13 +3598,123 @@ date - or ( +%0A # Handle small time drift between databases%0A or (sql_modified_on - ucr_ @@ -3728,26 +3728,32 @@ date +) %3C -sq...
b73f9e058b09e86e4f78849b6325b679c05d052f
Updated the hypothesis to be more accurate
solidity/hypothesis/test.py
solidity/hypothesis/test.py
import json from hypothesis import given, assume, example import hypothesis.strategies as st import math import unittest from web3 import Web3, TestRPCProvider, RPCProvider ACCURACY = 0.000001 def calculatePurchaseReturn(S,R,F,E): if F== 100: return S*E/R return int(S * ( math.pow(1.0 + float(E)/fl...
Python
0.999996
@@ -587,25 +587,24 @@ 00.0/F))))%0A%0A -%0A def fixedLog @@ -610,14 +610,33 @@ gn(x + , n):%0A + one = 1 %3C%3C 32%0A @@ -646,16 +646,17 @@ urn int( + math.log @@ -660,27 +660,122 @@ log( -x %3E%3E 32, n)) %3C%3C 32%0A + float(x) / one, n) * one )%0A%0Adef fixedLogE(x):%0A one = 1 %3C%3C 32%0A r...
7128bd231cec6533be893e53c2c874ae46001231
correct swagger annotation problem for SupportLevelPage
pnc_cli/swagger_client/models/support_level_page.py
pnc_cli/swagger_client/models/support_level_page.py
# coding: utf-8 """ Copyright 2015 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
Python
0.000002
@@ -3737,16 +3737,17 @@ alues = +%5B %5B%22UNRELE @@ -3807,16 +3807,17 @@ , %22EOL%22%5D +%5D %0A
2cb57dc3e7f913b9dbaec6ef915f0ea72a6efe6e
Update move_item_tax_to_item_tax_template.py
erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py
erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py
import frappe import json from six import iteritems def execute(): if "tax_type" not in frappe.db.get_table_columns("Item Tax"): return old_item_taxes = {} item_tax_templates = {} rename_template_to_untitled = [] for d in frappe.db.sql("""select parent as item_code, tax_type, tax_rate from `tabItem Tax`""", as...
Python
0.000003
@@ -3791,16 +3791,26 @@ lity%22%7D, +fieldname= %22parent_
93ca5c4832c2037bdf4b504328c304835d2776a4
Fix wrong byte literal in FIPS U2F commands test
test/on_yubikey/test_fips_u2f_commands.py
test/on_yubikey/test_fips_u2f_commands.py
import struct import unittest from fido2.hid import (CTAPHID) from ykman.util import (TRANSPORT) from ykman.driver_fido import (FIPS_U2F_CMD) from .util import (DestructiveYubikeyTestCase, is_fips, open_device) HID_CMD = 0x03 P1 = 0 P2 = 0 @unittest.skipIf(not is_fips(), 'FIPS YubiKey required.') class TestFipsU2f...
Python
0.000627
@@ -1088,17 +1088,17 @@ b'%5Cx90%5Cx -9 +0 0':%0A
f71205edb15cb2fc760912be2adea7c608fd84ee
Use parsed.netloc for the HTTP Host header
thrift/lib/py/transport/THttpClient.py
thrift/lib/py/transport/THttpClient.py
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
Python
0.000021
@@ -1873,16 +1873,55 @@ or_host%0A + self.http_host = self.host%0A @@ -2427,16 +2427,59 @@ ostname%0A + self.http_host = parsed.netloc%0A @@ -4136,24 +4136,29 @@ Host', self. +http_ host)%0A%0A
2cde35bb6f948f861026921daf7fe24b353af273
Add bulleted and numbered list to CKEditor
kerrokantasi/settings/__init__.py
kerrokantasi/settings/__init__.py
from .util import get_settings, load_local_settings, load_secret_key from . import base settings = get_settings(base) load_local_settings(settings, "local_settings") load_secret_key(settings) if not settings["DEBUG"] and settings["JWT_AUTH"]["JWT_SECRET_KEY"] == "kerrokantasi": raise ValueError("Refusing to run o...
Python
0
@@ -978,24 +978,70 @@ 'Anchor'%5D,%0A + %5B'BulletedList', 'NumberedList'%5D,%0A
d09cc197d11efa2181ce68ef4212cb9df5ee285c
add daemon argument to launcher
selfdrive/athena/manage_athenad.py
selfdrive/athena/manage_athenad.py
#!/usr/bin/env python3 import time from multiprocessing import Process from common.params import Params from selfdrive.manager.process import launcher from selfdrive.swaglog import cloudlog from selfdrive.version import get_version, is_dirty ATHENA_MGR_PID_PARAM = "AthenadPid" def main(): params = Params() don...
Python
0.000001
@@ -600,16 +600,26 @@ thenad', + 'athenad' ))%0A
38eb6221ca41446c0c4fb1510354bdc4f00ba5f1
Remove children via uid rather than name
serfnode/build/handler/launcher.py
serfnode/build/handler/launcher.py
#!/usr/bin/env python import functools import os import signal import sys import docker_utils def handler(name, signum, frame): print('Should kill', name) try: docker_utils.client.remove_container(name, force=True) except Exception: pass sys.exit(0) def launch(name, args): try:...
Python
0
@@ -157,32 +157,92 @@ name)%0A try:%0A + cid = open('/child_%7B%7D'.format(name)).read().strip()%0A docker_u @@ -262,36 +262,35 @@ emove_container( -name +cid , force=True)%0A @@ -365,32 +365,140 @@ args):%0A try:%0A + cid = open('/child_%7B%7D'.format(name)).read().strip()%0A exc...
933201b14764b8a108986313b8bece8ae4ad7d51
handle in_progress event
km_hipchat_screamer/statuspage.py
km_hipchat_screamer/statuspage.py
# -*- coding: utf-8 -*- """ km-hipchat-screamer.statuspage ~~~~~~~~~~~~~~~~~~~~~~~ Module providing for status change alert routes the KISSmetrics HipChat Webhook service """ from flask import Blueprint, jsonify, request from utils import env_check import os import json import hipchat import requests hipchat_notif...
Python
0.000012
@@ -577,32 +577,86 @@ duled': 'gray',%0A + 'in_progress': 'gray',%0A
a68cbe3e99b4361a35553e7728cc0087b040e254
remove order from markers
server/flask/flaskserver.py
server/flask/flaskserver.py
# -*- coding: utf-8 -*- """ Created on Tue Oct 25 14:49:32 2016 @author: Dave Ho """ #HOST&&PORT: http://127.0.0.1:5000/ #COMP1: 192.168.1.54 #COMP2: 192.168.1.77 import werkzeug.datastructures import sqlite3 import flask import json as mjson from flask import Flask from flask import request import ast app = Flask(...
Python
0.000009
@@ -4727,37 +4727,16 @@ path_id) -+%22 ORDER BY sequence%22 %0A @@ -4831,37 +4831,16 @@ path_id) -+%22 ORDER BY sequence%22 ):%0A
875d558d69fcadcea5f89b4ef4021484b34e435b
fix #190
django-openstack/django_openstack/syspanel/views/services.py
django-openstack/django_openstack/syspanel/views/services.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 from django import template from django import http from django.conf import settings from django.contrib.auth.decorators import login_required from django.shortcuts import render_to_response from django.shortcuts import redirect from django.utils.translation import ugettext ...
Python
0.000001
@@ -2396,16 +2396,287 @@ d(row)%0A%0A + services = sorted(services, key=lambda svc: (svc.type +%0A svc.host))%0A other_services = sorted(other_services, key=lambda svc: (svc%5B'type'%5D +%0A svc%5B'host'%5...
94937ee5f2a797e864684cf2bd624775e60e0b1a
update Bdd model with visible parameter
source/sql/models/georef.py
source/sql/models/georef.py
# -*- coding: utf-8 -*- ## File autogenerated by SQLAutoCode ## see http://code.google.com/p/sqlautocode/ from sqlalchemy import * from sqlalchemy.dialects.postgresql import * from models import metadata from geoalchemy2 import Geography synonym = Table( 'synonym', metadata, *[ Column('id', BIGINT...
Python
0
@@ -3372,32 +3372,128 @@ ary_key=False),%0A + Column('visible', BOOLEAN(), primary_key=False, nullable=False, default=text(u'true')),%0A %5D,%0A schem
93361bad12c132846b10966559fe89bc1d1a1e0b
Update settings.py
Epitome/settings.py
Epitome/settings.py
""" Django settings for Epitome project. Generated by 'django-admin startproject' using Django 2.0.0. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ ...
Python
0.000001
@@ -3133,12 +3133,11 @@ Z = -Fals +Tru e%0D%0A%0D
bd3d8738fc00b2d36aafe5749e88826845441541
fix handling of pages (closes #685)
weboob/backends/orange/browser.py
weboob/backends/orange/browser.py
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Nicolas Duhamel # # This file is part of weboob. # # weboob 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 yo...
Python
0
@@ -1248,33 +1248,33 @@ smms1.orange.fr/ -M +. /Sms/sms_write.p @@ -1322,33 +1322,33 @@ smms1.orange.fr/ -M +. /Sms/sms_write.p
f631099894a02cb79b5be372894ed1f589849a8d
test for datetime.datetime type from dframe_dateconv
test/pandaservtest.py
test/pandaservtest.py
import unittest, sys, os from datetime import datetime import pandas as pd import src.pandaserv as pandaserv import numpy as np class Testpandaserv(unittest.TestCase): def setUp(self): self.dates = pd.date_range('20130101', periods=6) self.df = pd.DataFrame( np.random.randn(6,4...
Python
0
@@ -889,15 +889,55 @@ f.df +2 , ' -D +B ')%0A + for singledate in df%5B'B'%5D:%0A @@ -967,19 +967,17 @@ ce(s -elf.df%5B'D'%5D +ingledate , da
e8e109de54ebed6336f6ed3bcb2400ec5d4aaafb
add docs for number
schematec/converters.py
schematec/converters.py
''' Convertaion rules ================= Can be converted into: integer ------- #. Any int or long value #. Any suitable string/unicode #. Boolean value string ------ #. Any suitable string/unicode #. Any int or long value boolean ------- #. Boolean value #. 0 or 1 #. '0' or '1' #. u'0' or u'1' array ----- #. A...
Python
0.000001
@@ -149,16 +149,115 @@ value%0A%0A +number%0A-------%0A%0A#. Any float or int or long value%0A#. Any suitable string/unicode%0A#. Boolean value%0A%0A string%0A-
91238b6b0f0b14a6d0f7707aa0b388cedfd5894c
set default false allow_cnpj_multi_ie
l10n_br_base/models/res_config.py
l10n_br_base/models/res_config.py
# -*- coding: utf-8 -*- from openerp import fields, models from openerp.tools.safe_eval import safe_eval class res_config(models.TransientModel): _inherit = 'base.config.settings' allow_cnpj_multi_ie = fields.Boolean( string=u'Permitir o cadastro de Customers com CNPJs iguais', default=True,...
Python
0.000003
@@ -312,11 +312,12 @@ ult= -Tru +Fals e,%0A
bc9c782317eac99716bc961e42e6072f0e5616cf
Add dummy var in order to work around issue 1 https://github.com/LinuxTeam-teilar/cronos.teilar.gr/issues/1
apps/__init__.py
apps/__init__.py
# -*- coding: utf-8 -*- from django.conf import settings from django.core.mail import send_mail def mail_cronos_admin(title, message): ''' Wrapper function of send_mail ''' try: send_mail(title, message, 'notification@cronos.teilar.gr', [settings.ADMIN[0][1]]) except: pass class C...
Python
0.001556
@@ -91,16 +91,241 @@ d_mail%0A%0A +'''%0AFor unkown reason, the logger is NOT able to find a handler%0Aunless a settings.VARIABLE is called!!%0Ahttps://github.com/LinuxTeam-teilar/cronos.teilar.gr/issues/1%0AI leave that here till the bug is fixed%0A'''%0Asettings.DEBUG%0A%0A def mail