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
ffa85f74995be56942cbc88208187c1d5a4b6bce
docstring was wrong
fragments/apply.py
fragments/apply.py
import os import argparse import pdb from .precisecodevillemerge import Weave from .config import FragmentsConfig from .diff import _diff_group, _split_diff from . import Prompt def apply(*args): """Revert changes to fragments repository""" parser = argparse.ArgumentParser(prog="%s apply" % __package__, desc...
Python
0.999119
@@ -203,14 +203,13 @@ %22%22%22 -Revert +Apply cha @@ -217,31 +217,97 @@ ges -to fragments repository +in one file that were made since last commit to as many other followed files as possible. %22%22%22%0A
acd5c59f4de3b5040e7d3f787bd4f4c96610ae7b
add gpu memory config
movielens_vae_test.py
movielens_vae_test.py
import itertools import os import numpy as np import tensorflow as tf from sklearn.model_selection import KFold from matrix_vae import VAEMF # dataset = "ml-100k" dataset = "ml-1m" if dataset == "ml-100k": # 100k dataset num_user = 943 num_item = 1682 else: # 1M dataset num_user = 6040 num_i...
Python
0.000001
@@ -2757,16 +2757,103 @@ ndex%22):%0A + config = tf.ConfigProto()%0A config.gpu_options.allow_growth=True%0A @@ -2864,32 +2864,45 @@ with tf.Session( +config=config ) as sess:%0A
413057374d55d851fa4717a66a0975f29b131f4f
Fix bytes output
cli.py
cli.py
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Created on Wed Dec 30 13:58:24 2015 @author: mdurant """ import argparse import hdfs import sys import inspect parser = argparse.ArgumentParser(description='HDFS commands') parser.add_argument("command", help="filesystem command to run") parser.add_argument("par1", ...
Python
0
@@ -1516,16 +1516,77 @@ rint(l)%0A + elif hasattr(out, 'decode'):%0A print(out.decode())%0A elif
a55a7162de4e237b4079c0517367ef23b7aa8b01
PodcastList.by_rating() should return a list
mygpo/share/models.py
mygpo/share/models.py
from random import random from couchdbkit.ext.django.schema import * from django.template.defaultfilters import slugify from mygpo.core.proxy import DocumentABCMeta from mygpo.users.models import RatingMixin from mygpo.cache import cache_result class PodcastList(Document, RatingMixin): """ A list of Podcasts ...
Python
0.999999
@@ -1447,19 +1447,14 @@ urn -r.iterator( +list(r )%0A%0A%0A
72fa091716e1e0d40a8219701da94bee6d49c58b
remove debugging
csw.py
csw.py
#!/usr/bin/python -u # -*- coding: iso-8859-15 -*- # ================================================================= # # $Id$ # # Authors: Tom Kralidis <tomkralidis@hotmail.com> # # Copyright (c) 2010 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and ...
Python
0.000065
@@ -1372,37 +1372,8 @@ sw%0A%0A -import cgitb%0Acgitb.enable()%0A%0A impo
76ade2292a6a8e57ebf9e3990d3b50cfceebc4ea
Change instance status line width
jungle/ec2.py
jungle/ec2.py
# -*- coding: utf-8 -*- import subprocess import sys import boto3 import botocore import click def format_output(instances, flag): """return formatted string for instance""" out = [] line_format = '{0}\t{1}\t{2}\t{3}\t{4}' name_len = _get_max_name_len(instances) + 3 if flag: line_format =...
Python
0.000001
@@ -346,17 +346,17 @@ '%7D%7B1:%3C1 -0 +4 %7D%7B2:%3C13%7D
50e40b4f2c0eb264d1f5442122dcca05dcde60db
Disable debug logging for streaming http requests
k8s/client.py
k8s/client.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import logging import requests from requests import RequestException from . import config DEFAULT_TIMEOUT_SECONDS = 10 LOG = logging.getLogger(__name__) LOG.addHandler(logging.NullHandler()) class K8sClientException(RequestExcept...
Python
0
@@ -2035,16 +2035,52 @@ ig.debug + and not kwargs.get('stream', False) :%0A
82bf7fbf5c92c29f058df06ba3828002322f6bf3
Add Qantas 94 Heavy to privileged Tavern users
globalvars.py
globalvars.py
import os from datetime import datetime from ChatExchange.chatexchange.client import Client import HTMLParser import md5 class GlobalVars: false_positives = [] whitelisted_users = [] blacklisted_users = [] ignored_posts = [] auto_ignored_posts = [] startup_utc = datetime.utcnow().strftime("%H:...
Python
0
@@ -1771,16 +1771,26 @@ %22271104%22 +, %22220428%22 %5D%7D%0A s
0b600e96f4778ea7f82f357cdadfd97967ecbe86
Add PeterJ to privileged Tavern users
globalvars.py
globalvars.py
import os from datetime import datetime from ChatExchange.chatexchange.client import Client import HTMLParser import md5 class GlobalVars: false_positives = [] whitelisted_users = [] blacklisted_users = [] ignored_posts = [] auto_ignored_posts = [] startup_utc = datetime.utcnow().strftime("%H:...
Python
0
@@ -1646,16 +1646,26 @@ %22159034%22 +, %22203972%22 %5D%7D%0A s
d71993acd73aa15e079c6e5a9df23bb1eb0dbf7c
Remove bad iter calls
tools/helpers.py
tools/helpers.py
#!/usr/bin/env python # encoding: utf-8 """Little helpers for everyday python workLittle helpers for everyday python work..""" from __future__ import division import os import subprocess import sys import time import progressbar as pb from progressbar import ProgressBar from collections import Sequence, Iterator, Ite...
Python
0.000001
@@ -1647,21 +1647,16 @@ islice( -iter( self._it @@ -1653,33 +1653,32 @@ e(self._iterable -) , self._steps)%0A%0A @@ -2101,37 +2101,32 @@ for val in -iter( self._iterable): @@ -2115,33 +2115,32 @@ n self._iterable -) :%0A ru @@ -3577,13 +3577,8 @@ in -iter( self @@ -3579,33 +3579,32 @@ n s...
0c39a098605454d9cfa863497b0aaee657e0b8d5
Update tf-plan.py
tools/tf-plan.py
tools/tf-plan.py
#!/usr/bin/env python3 # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
0.000001
@@ -2715,24 +2715,26 @@ ' + dir)%0A + # commentpr @@ -4674,70 +4674,35 @@ if -'module/' in x%5D%0A modules = %5Bx for x in working_directories if +x.startswith('module/') and x.c
1c068004b9e1831bde30be527f20b0d2835c467c
fix multigpu bug
train_policy/trainer.py
train_policy/trainer.py
#!/usr/bin/python3 #-*-coding:utf-8-*- #$File: trainer.py #$Date: Sat May 7 11:00:10 2016 #$Author: Like Ma <milkpku[at]gmail[dot]com> from config import Config from dataset import load_data from model import get_model import tensorflow as tf import argparse def train(load_path=None): # load data train_da...
Python
0.000001
@@ -267,16 +267,70 @@ f train( +args):%0A%0A device = args.device%0A load_path = args. load_pat @@ -334,16 +334,8 @@ path -=None):%0A %0A @@ -440,16 +440,60 @@ d model%0A + with tf.device('/gpu:%25d' %25 device):%0A mode @@ -2410,75 +2410,16 @@ -with tf.device('/gpu:%25d' %25 args.device...
b666228405e9b23e65d6d631968a7f6f334b6b46
change string for utf8 translation (#48)
translation/samples/snippets/snippets_test.py
translation/samples/snippets/snippets_test.py
# -*- coding: utf-8 -*- # 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 ...
Python
0
@@ -1240,22 +1240,16 @@ = u' -%EB%82%98%EB%8A%94 %ED%8C%8C%EC%9D%B8%EC%95%A0%ED%94%8C -%EC%9D%84 %EC%A2%8B%EC%95%84%ED%95%9C%EB%8B%A4. + 13%EA%B0%9C '%0A @@ -1336,14 +1336,10 @@ t u' -I like +13 pin @@ -1344,16 +1344,17 @@ ineapple +s ' in out
19acfbad5db83c20f6e6459f35b63600203ba09c
Test to make sure that the cinder-volumes vg exists
packstack/plugins/cinder_250.py
packstack/plugins/cinder_250.py
""" Installs and configures Cinder """ import logging import packstack.installer.engine_validators as validate from packstack.installer import basedefs import packstack.installer.common_utils as utils from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile # Controller object will be ini...
Python
0
@@ -2023,16 +2023,126 @@ fest%5D%7D,%0A + %7B'title': 'Checking if the Cinder server has a cinder-volumes vg', 'functions':%5Bcheckcindervg%5D%7D,%0A @@ -2290,16 +2290,294 @@ steps)%0A%0A +def checkcindervg():%0A server = utils.ScriptRunner(controller.CONF%5B'CONFIG_CINDER_HOST'%5D)%0A ser...
3b4d8d6ecae3ee1f57dd71af990bb480e6c82d6c
clearly indentify git-checkout as dev version
mitmproxy/version.py
mitmproxy/version.py
IVERSION = (3, 0, 0) VERSION = ".".join(str(i) for i in IVERSION) PATHOD = "pathod " + VERSION MITMPROXY = "mitmproxy " + VERSION if __name__ == "__main__": print(VERSION)
Python
0.999986
@@ -12,16 +12,23 @@ (3, 0, 0 +, 'dev' )%0AVERSIO
7db97dd21b7896f624f37ef44f72445965a65123
provide urls for bug reports. refs #20
h1ds_configdb/version.py
h1ds_configdb/version.py
""" Current h1ds_configdb version constant plus version pretty-print method. Code copied from Fabric: https://github.com/bitprophet/fabric/raw/master/fabric/version.py This functionality is contained in its own module to prevent circular import problems with ``__init__.py`` (which is loaded by setup.py during inst...
Python
0.999556
@@ -728,16 +728,177 @@ l', 0)%0A%0A +def get_module_urls():%0A return (%22https://code.h1svr.anu.edu.au/projects/h1ds-configdb%22, %22https://code.h1svr.anu.edu.au/projects/h1ds-configdb/issues/new%22, )%0A%0A def get_
a1977d9654e7feae08b9523ea2370d5cb8974672
Remove redundant get_obj method (#26324)
lib/ansible/modules/cloud/vmware/vmware_guest_facts.py
lib/ansible/modules/cloud/vmware/vmware_guest_facts.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # This module is also sponsored by E.T.A.I. (www.etai.fr) # # This file is part of Ansible # # Ansible 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...
Python
0
@@ -4382,478 +4382,8 @@ )%0A%0A%0A -def get_obj(content, vimtype, name):%0A %22%22%22%0A Return an object by name, if name is None the%0A first found object is returned%0A %22%22%22%0A obj = None%0A container = content.viewManager.CreateContainerView(%0A content.rootFolder, vimtype, True)%0A ...
833cd8342385fc095181afc3306ce04414bfd447
Add work around for destroying models too quickly.
perfscale_mass_model_destruction.py
perfscale_mass_model_destruction.py
#!/usr/bin/env python """Perfscale test measuring adding and destroying a large number of models. Steps taken in this test: - Bootstraps a provider - Creates x amount of models and waits for them to be ready - Delete all the models at once. """ import argparse from datetime import datetime import logging import...
Python
0
@@ -317,16 +317,39 @@ port sys +%0Afrom time import sleep %0A%0Afrom d @@ -1117,16 +1117,173 @@ model)%0A%0A + # Workaround for bug: https://bugs.launchpad.net/juju/+bug/1635052%0A # Noted here: https://bugs.launchpad.net/juju-ci-tools/+bug/1635109%0A sleep(10)%0A dest
f29ff5eaa24b0671066f145d76b53e534a574119
Set "text/javascript" type if given a callback
freegeoip/geoip.py
freegeoip/geoip.py
#!/usr/bin/env python # coding: utf-8 # # Copyright 2010 Alexandre Fiori # freegeoip.net # # 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
@@ -2008,16 +2008,41 @@ , None)%0A + if callback:%0A @@ -2078,47 +2078,25 @@ %22, %22 -application/json%22)%0A if callback: +text/javascript%22) %0A @@ -2174,16 +2174,16 @@ data)))%0A - @@ -2180,32 +2180,96 @@ )%0A else:%0A + self.set_header(%22Content-Typ...
c0624c3f6750714f2bf1e81586c462c077c35f4b
Fix dynamine annotation build script
build/management/commands/build_dynamine_annotation.py
build/management/commands/build_dynamine_annotation.py
from django.core.management.base import BaseCommand from build.management.commands.base_build import Command as BaseBuild from residue.models import ResidueDataType, ResidueDataPoint from protein.models import * import logging from urllib import request, parse import json,time class Command(BaseBuild): help = '...
Python
0.000001
@@ -871,16 +871,137 @@ ll())))%0A + # self.proteins = list(set(list(ProteinSet.objects.get(name='All').proteins.all())))%0A print(self.proteins) %0A%0A @@ -3076,33 +3076,63 @@ protein=protein) +.all()%0A c = r%5B'status'%5D %0A - if r%5B'st @@ -3228,16 +3228,67 @@ y_name%5D%0A +...
582af80eaa558cd6343a293cc54ced7b93f6d218
Add timeout to wait for event
proto/parallel/Communicate.py
proto/parallel/Communicate.py
from Queue import Queue from threading import Event try: from multiprocessing.managers import BaseManager except ImportError: class Python26Required(object): def __call__(self, *args): raise RuntimeError('Requires Python > 2.6') def __getattr__(self, name): raise Runt...
Python
0.000004
@@ -4603,35 +4603,49 @@ t(self, event_id +, timeout=None ):%0A - %22%22%22Waits @@ -4685,16 +4685,114 @@ ignaled. +%0A Fails if optional timeout expires.%0A%0A %60timeout%60 is the time out in seconds to wait. %0A%0A @@ -4962,46 +4962,380 @@ -return self._get_event(event_id).wait(...
0ac0ec672eeaa4bd5431905808405e0f73bf7e00
remove unused import
cmsplugin_cascade/bootstrap4/buttons.py
cmsplugin_cascade/bootstrap4/buttons.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import OrderedDict from django.conf import settings from django.forms import widgets from django.forms.fields import CharField from django.utils.html import format_html, format_html_join from django.utils.translation import ugettext_lazy...
Python
0.000001
@@ -248,26 +248,8 @@ html -, format_html_join %0Afro
827661e790bd407c29f4d109e428c8f36d44f537
Update ReferralFollow test_form's build_form to allow True, False, None for has_appointment.
pttrack/test_forms.py
pttrack/test_forms.py
'''Module for testing the various custom forms used in Osler.''' import datetime from django.test import TestCase from . import forms from . import models from . import followup_models # pylint: disable=invalid-name class TestReferralFollowupForms(TestCase): ''' Test the validation and behavior of the form...
Python
0
@@ -2272,57 +2272,302 @@ -'has_appointment': has_appointment,%0A %7D +%7D%0A%0A # Has appointment could (at least in principle) be True, False, or%0A # unspecified.%0A if has_appointment:%0A form_data%5B'has_appointment'%5D = True%0A elif has_appointment is None:%...
c9917b3dc54290bb3fc7c977e8c1db76ac60cf82
Update project queries
polyaxon/api/projects/queries.py
polyaxon/api/projects/queries.py
from django.db.models import Count, Q from db.models.projects import Project projects = Project.objects.select_related('user') projects_details = projects.select_related('repo').annotate( Count('experiments', distinct=True), Count('jobs', distinct=True), Count('build_jobs', distinct=True), Count('expe...
Python
0
@@ -122,16 +122,17 @@ 'user')%0A +%0A projects @@ -344,27 +344,17 @@ ct=True) -).annotate( +, %0A ind
086b7a7de994e30d2e5defa214eca846862aec59
update default configuration in config
nova/common/config.py
nova/common/config.py
# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P. # # 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 b...
Python
0.000001
@@ -615,36 +615,8 @@ e.%0A%0A -from oslo_config import cfg%0A from @@ -644,16 +644,16 @@ rt cors%0A + %0A%0Adef se @@ -753,151 +753,27 @@ -# CORS Defaults%0A # TODO(krotscheck): Update with https://review.openstack.org/#/c/285368/%0A cfg.set_defaults(cors.CORS_OPTS,%0A +cors.set_defaults(%0...
bc224499e2f4f663a1fe5e41cbfad691e7c04de4
Drop unused import
turbine/code/py/turbine_helpers.py
turbine/code/py/turbine_helpers.py
# Copyright 2013 University of Chicago and Argonne National Laboratory # # 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 b...
Python
0
@@ -681,19 +681,8 @@ json -%0Aimport sys %0A%0A#
63cb9a8b3acb78be155bbc770cdd1d06170eccc1
Fix customer filter field.
src/nodeconductor_assembly_waldur/invoices/filters.py
src/nodeconductor_assembly_waldur/invoices/filters.py
import django_filters from django.conf import settings from django.core import exceptions from django.db.models import Q, BooleanField from django.utils import timezone from nodeconductor.core import filters as core_filters from nodeconductor.structure import filters as structure_filters from . import models class I...
Python
0
@@ -117,22 +117,33 @@ rt Q -, BooleanField +%0Afrom django import forms %0Afro @@ -1307,16 +1307,26 @@ field = +forms.Null BooleanF
0bf7a7321a4ca2cf66763924ad4a21a6d0e8fd05
fix mongodb_parameter
lib/ansible/modules/database/misc/mongodb_parameter.py
lib/ansible/modules/database/misc/mongodb_parameter.py
#!/usr/bin/python # -*- coding: utf-8 -*- """ (c) 2016, Loic Blot <loic.blot@unix-experience.fr> Sponsored by Infopro Digital. http://www.infopro-digital.com/ Sponsored by E.T.A.I. http://www.etai.fr/ This file is part of Ansible Ansible is free software: you can redistribute it and/or modify it under the terms of t...
Python
0
@@ -6711,26 +6711,21 @@ %7Bparam: -int( value -) %7D)%0A e
881a27ab3d4ee0f9f988a7f183bdd0a76b517526
Add additional activation tests.
panda/tests/test_views.py
panda/tests/test_views.py
#!/usr/bin/env python from django.contrib.auth import authenticate from django.test import TransactionTestCase from django.test.client import Client from django.utils import simplejson as json from panda.models import User from panda.tests import utils class TestLogin(TransactionTestCase): fixtures = ['init_pand...
Python
0
@@ -2342,32 +2342,854 @@ ent = Client()%0A%0A + def test_check_activation_key_valid(self):%0A new_user = User.objects.create(%0A email=%22foo@bar.com%22,%0A username=%22foo@bar.com%22,%0A is_active=False%0A )%0A%0A key = new_user.get_profile().activation_key%0A%...
2e4837721a22985894f932536c45989aaec8006b
Stop printing the exception object.
code/daemon/transporters/transporter.py
code/daemon/transporters/transporter.py
"""transporter.py Transporter class for daemon""" __author__ = "Wim Leers (work@wimleers.com)" __version__ = "$Rev$" __date__ = "$Date$" __license__ = "GPL" import sys import os sys.path.append(os.path.abspath('../dependencies')) from django.core.files.storage import Storage from django.core.files import File # ...
Python
0
@@ -1849,32 +1849,8 @@ e:%0A - print e%0A
0ab96a8984d3ac4eb26bf8cd5cf02228101341d7
Update formatting status
polyaxon_cli/utils/formatting.py
polyaxon_cli/utils/formatting.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from collections import OrderedDict import click import six import sys from polyaxon_schemas.experiment import ContainerResourcesConfig from polyaxon_schemas.settings import K8SResourcesConfig from polyaxon_schemas.utils import ...
Python
0
@@ -3080,13 +3080,13 @@ ', ' -Delet +Stopp ed'%5D
1d1071d782619c2e1daebda86cf8bc550d7c4ce5
Improve import grouping in binder.py
tweepy/binder.py
tweepy/binder.py
# Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. import logging import sys import time import requests from urllib.parse import urlencode from tweepy.error import is_rate_limit_error_message, RateLimitError, TweepError from tweepy.models import Model log = logging.getLogger(__name__) def...
Python
0.000001
@@ -110,25 +110,8 @@ time -%0A%0Aimport requests %0Afro @@ -143,16 +143,33 @@ encode%0A%0A +import requests%0A%0A from twe
c7f0402bce524eeca79f7fb0041d251ff2644b57
fix py2 issue
pandasdmx/writer/data2pandas.py
pandasdmx/writer/data2pandas.py
''' pandasdmx.writer.data2pandas - a pandas writer for PandaSDMX @author: Dr. Leo ''' import pandas as PD import numpy as NP from pandasdmx.writer.common import BaseWriter class Writer(BaseWriter): def write(self, data, asframe = False, dtype = NP.float64, attributes = 'o...
Python
0.000001
@@ -4067,16 +4067,21 @@ s_zip = +iter( zip(*ser @@ -4099,32 +4099,33 @@ pe, attributes)) +) %0D%0A ob
fc75f5843af70c09e0d63284277bf88689cbb06d
Add apidoc to doc building
invocations/docs.py
invocations/docs.py
import os from invoke.tasks import task from invoke.runner import run docs_dir = 'docs' build = os.path.join(docs_dir, '_build') @task def clean_docs(): run("rm -rf %s" % build) @task def browse_docs(): run("open %s" % os.path.join(build, 'index.html')) @task def docs(clean=False, browse=False): if...
Python
0
@@ -278,40 +278,1187 @@ def -docs(clean=False, browse=False): +api_docs(target, output=%22api%22, exclude=%22%22):%0A %22%22%22%0A Runs %60%60sphinx-apidoc%60%60 to autogenerate your API docs.%0A%0A Must give target directory/package as %60%60target%60%60. Results are written out%0A to %60%60docs/%3Coutpu...
0a07f6ac82f099d836eb5276063adab245979258
rename `recall` to `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 recalled when training resumed. Args: recall_o...
Python
0.002129
@@ -254,25 +254,29 @@ tion or -re called +again when tra @@ -309,18 +309,16 @@ -re call_on_ @@ -361,28 +361,27 @@ is -re called +again or not - when %0A @@ -389,16 +389,21 @@ +when restored @@ -487,18 +487,16 @@ _(self, -re call_on_ @@ -520,26 +520,24 @@ self._ -re cal...
2d6906bc58275b18102b4523a4faa5078a6e74f1
fix wrong description (all?)
chainercv/transforms/image/random_crop.py
chainercv/transforms/image/random_crop.py
import random import six def random_crop(img, output_shape, return_slices=False, copy=False): """Crop array randomly into `output_shape`. All arrays will be cropped by the same region randomly selected. The output will all be in shape :obj:`output_shape`. Args: img (~numpy.ndarray): An image...
Python
0.000377
@@ -146,108 +146,83 @@ -All arrays will be cropped by the same region randomly selected. The%0A output will all be in shape +The input image is cropped by a randomly selected region whose shape%0A is :ob
57e177e47bcc54683654e5d0de81af6e0cbd803d
update version
pimat_web/version.py
pimat_web/version.py
__version__ = '0.6.17'
Python
0
@@ -17,7 +17,7 @@ .6.1 -7 +8 '%0A
e3b6b9864376f2dabe42b6d80d4a5db65cb85d30
Update docs for 'prep_command()'
src/python/pants/backend/core/targets/prep_command.py
src/python/pants/backend/core/targets/prep_command.py
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.base.payl...
Python
0.000001
@@ -518,13 +518,14 @@ be -built +tested .%0A%0A @@ -537,16 +537,56 @@ example, + you can use %60prep_command()%60 to execute a scrip @@ -623,16 +623,18 @@ base +%0A servers %0A m @@ -633,64 +633,205 @@ vers -%0A might need to be run before running integration tests +. These tunnels could then be leverag...
633768a7e78c0ec9c827206ea88ad83ddf1b709a
fix tests for site links
bluebottle/clients/tests/test_utils.py
bluebottle/clients/tests/test_utils.py
from django.contrib.auth.models import Permission from django.contrib.auth import get_user_model from bluebottle.test.utils import BluebottleTestCase from bluebottle.test.factory_models.accounts import BlueBottleUserFactory from bluebottle.test.factory_models.cms import ( SiteLinksFactory, LinkFactory, LinkGroupFa...
Python
0
@@ -403,16 +403,155 @@ links%0A%0A%0A +def _group_by_name(results, name):%0A groups = results%5B'groups'%5D%0A return (group for group in groups if group%5B'name'%5D == name).next()%0A%0A%0A class Te @@ -1507,24 +1507,106 @@ elf.user1)%0A%0A + main = _group_by_name(results, 'main')%0A main_links ...
a9ac098ec492739f37005c9bd6278105df0261c5
Add fields to save question url and annexure links
parliamentsearch/items.py
parliamentsearch/items.py
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class MemberofParliament(scrapy.Item): """ Data structure to define Member of Parliament information """ mp_id = scrapy.Field() mp_name = scrapy.F...
Python
0
@@ -926,28 +926,78 @@ %09q_subject = scrapy.Field()%0A +%09q_url = scrapy.Field()%0A%09q_annex = scrapy.Field()%0A
f1bf3492d8106a953b0e0666a5042e8cbfefa797
Fix comments
hs_core/management/commands/solr_recover.py
hs_core/management/commands/solr_recover.py
"""This lists all the large resources and their statuses. This helps in checking that they download properly. * By default, prints errors on stdout. * Optional argument --log: logs output to system log. """ from django.core.management.base import BaseCommand from hs_core.models import BaseResource from hs_core.hyd...
Python
0
@@ -5,113 +5,72 @@ his -lists all the large resources and their statuses.%0A This helps in checking that they download properly.%0A +re-indexes resources in SOLR to fix problems during SOLR builds. %0A* B @@ -609,40 +609,37 @@ %22%22%22 -Print size and sharing status of +Repair SOLR index content for a r @@ -2...
20e63fb5b5a02966acbe66f3cda19bc59ff89934
Set a default value for a default_roles
monasca_log_api/conf/role_middleware.py
monasca_log_api/conf/role_middleware.py
# Copyright 2017 FUJITSU LIMITED # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
0.000915
@@ -798,36 +798,48 @@ default= -None +%5B'monasca-user'%5D ,%0A
8a0d31d59ae33f768d8ae8821cec6d0e8897267c
Extend testing
bluebottle/offices/tests/test_admin.py
bluebottle/offices/tests/test_admin.py
from django.contrib.admin.sites import AdminSite from django.urls import reverse from bluebottle.geo.admin import LocationAdmin from bluebottle.geo.models import Location from bluebottle.initiatives.admin import InitiativeAdmin from bluebottle.initiatives.models import Initiative, InitiativePlatformSettings from blueb...
Python
0
@@ -644,32 +644,37 @@ mport Bluebottle +Admin TestCase%0A%0A%0Aclass @@ -738,16 +738,21 @@ uebottle +Admin TestCase @@ -5042,28 +5042,371 @@ region__region' in filters)%0A +%0A def test_office_admin(self):%0A self.client.force_login(self.superuser)%0A url = reverse('admin:geo_location_changelist')...
5cb2c4b91f42a7c961d129a402a11515bc1f8c55
add some missing files
hs_model_program/migrations/0001_initial.py
hs_model_program/migrations/0001_initial.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import hs_core.models import datetime class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ('pages', '__first__'), migrat...
Python
0.000004
@@ -5265,26 +5265,24 @@ 5, -18 +20 , 29, -5 4, -938656 +68151 ), h
dd725349e0613461bdbe75a0c32115b323e9ccc3
change settings import in wsgi for Travis CI
reflow/wsgi.py
reflow/wsgi.py
""" WSGI config for reflow project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` s...
Python
0
@@ -1327,16 +1327,23 @@ settings +_sample %0A%0Aif set
6fb1b24a3cf1a4cdb3bd35c6f575d96cb2da9415
Add binding for DSA_size
cryptography/hazmat/bindings/openssl/dsa.py
cryptography/hazmat/bindings/openssl/dsa.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
Python
0
@@ -1416,16 +1416,43 @@ long);%0A +int DSA_size(const DSA *);%0A %22%22%22%0A%0AMAC
9bff4e9ed59d2c15b2da681476385274f5ef9059
Fix create_sample_event
src/sentry/management/commands/create_sample_event.py
src/sentry/management/commands/create_sample_event.py
""" sentry.management.commands.create_sample_event ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from django.core.management.base import BaseCommand, CommandError, make_option class Command(BaseC...
Python
0.000026
@@ -846,16 +846,19 @@ cts.get( +id= settings @@ -869,16 +869,8 @@ TRY_ -DEFAULT_ PROJ
1abc26a5db9ed323d0f81fe11135627dfab1d22e
Bump pipeline version. Closes #104.
pipeline/pipeline.py
pipeline/pipeline.py
import atexit from distutils.version import StrictVersion from os import environ as env import os import subprocess import sys import seesaw from seesaw.externalprocess import WgetDownload, RsyncUpload from seesaw.item import ItemInterpolation, ItemValue from seesaw.pipeline import Pipeline from seesaw.project import ...
Python
0
@@ -1083,13 +1083,13 @@ 1412 -19.02 +23.01 %22%0APH
893e05540c640c4598477a39688a773556bebad9
Update HDF5 to 1.8.16
var/spack/packages/hdf5/package.py
var/spack/packages/hdf5/package.py
from spack import * class Hdf5(Package): """HDF5 is a data model, library, and file format for storing and managing data. It supports an unlimited variety of datatypes, and is designed for flexible and efficient I/O and for high volume and complex data. """ homepage = "http://www.hdfgroup.or...
Python
0
@@ -499,16 +499,74 @@ 3%0A %0A + version('1.8.16', 'b8ed9a36ae142317f88b0c7ef4b9c618')%0A vers
d703a2047c9ab6f1c4e8154782f5d503d9701550
Allow empty strings in body
oauthlib/signature.py
oauthlib/signature.py
from __future__ import absolute_import """ 3.4. Signature This module represents a direct implementation of section 3.4 of the spec. http://tools.ietf.org/html/rfc5849#section-3.4 Terminology: * Client: software interfacing with an OAuth API * Server: the API provider * Resource Owner: the user who is granting a...
Python
0.999999
@@ -3047,16 +3047,22 @@ qsl(body +, True ))%0A%0A
f28daad980dd95584dabe83a102ecdd0e1cac517
remove reference to unused summaries file
music_spectrogram_diffusion/__init__.py
music_spectrogram_diffusion/__init__.py
# Copyright 2022 The Music Spectrogram Diffusion 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 ...
Python
0
@@ -1122,58 +1122,8 @@ ing%0A -from music_spectrogram_diffusion import summaries%0A from
5eb85dcc98adde698001405c60c44732964ec04a
Fix user messages not being sent
txircd/modules/cmd_privmsg_notice.py
txircd/modules/cmd_privmsg_notice.py
from twisted.words.protocols import irc from txircd.modbase import Command class MessageCommand(object): def __init__(self, ircd): self.ircd = ircd def onUse(self, cmd, user, data): if ("targetchan" not in data or not data["targetchan"]) and ("targetuser" not in data or not data["targetuser"]): return if ...
Python
0.000188
@@ -435,78 +435,8 @@ urn%0A -%09%09targetChans = data%5B%22targetchan%22%5D%0A%09%09targetUsers = data%5B%22targetuser%22%5D%0A %09%09ch @@ -1095,16 +1095,122 @@ efix())%0A +%09%09for udata in data%5B%22targetuser%22%5D:%0A%09%09%09udata.sendMessage(cmd, %22:%7B%7D%22.format(message), prefix=user.prefix())%0A %09%0...
376b8aa5b77066e06c17f41d65fe32a3c2bdef1f
Add a default value to the header limit
geo.py
geo.py
#! /usr/bin/python3 # -*- coding-utf-8 -*- """ This script transform a md into a plain html in the context of a documentation for Kit&Pack. """ import mmap import yaml print("---------------------------- geo --") print("-- by antoine.delhomme@espci.org --") print("-----------------------------------") doc_in = "./0...
Python
0.000001
@@ -435,16 +435,47 @@ r = None +%0A self.header_limit = -1 %0A%0A de
8f3ff0cfd70bfe4eaa9e017323971bad453c93f5
set edit as bot
trunk/toolserver/pui.py
trunk/toolserver/pui.py
#!usr/bin/python # -*- coding: utf-8 -* # # (C) Legoktm 2008-2009, MIT License # import re, sys, os sys.path.append(os.environ['HOME'] + '/pythonwikibot') #sys.path.append('/Users/kman/projects/pywikibot') import wiki wiki.setUser('Legobot') page = wiki.Page('Wikipedia:Possibly unfree images') try: wikitext = st...
Python
0.000002
@@ -680,10 +680,20 @@ ,EditMsg +, bot=True )%0A
050cc7a74e68b0515ceac1f53cbc20aa6e6cd498
Create a Session object.
octohat/connection.py
octohat/connection.py
# Copyright (c) 2013 Alon Swartz <alon@turnkeylinux.org> # # This file is part of OctoHub. # # OctoHub 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 (at your option) any l...
Python
0
@@ -1638,16 +1638,58 @@ ctohub'%7D +%0A self.session = requests.Session() %0A%0A @@ -2558,24 +2558,28 @@ ponse = -requests +self.session .request
d65aaf7984bc8b6247105c6acce78bd2d50e7b93
add exception error messages
pycoal/environment.py
pycoal/environment.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Python
0.000001
@@ -5347,16 +5347,47 @@ imeError +('Could not rasterize vector.') %0A%0A de @@ -5999,9 +5999,46 @@ imeError +('Could not generate proximity map.') %0A
20cf699df5d81eec071254cdaac13ad7ad49909a
fix reducer dereference if replace_reducer is used
pydux/create_store.py
pydux/create_store.py
""" python + redux == pydux Redux: http://redux.js.org A somewhat literal translation of Redux. Closures in Python are over references, as opposed to names in JavaScript, so they are read-only. Single- element arrays are used to create read/write closures. """ class ActionTypes(object): INIT = '@@redux/INIT'...
Python
0
@@ -2844,23 +2844,34 @@ te%5B0%5D = +current_ reducer +%5B0%5D (current
fb51b056ce909028ee4b0cc3e790ae202d8711af
Update P06_factorialLog disable logging
books/AutomateTheBoringStuffWithPython/Chapter10/P06_factorialLog.py
books/AutomateTheBoringStuffWithPython/Chapter10/P06_factorialLog.py
# This program calculates factorial and logs debug messages import logging logging.basicConfig(level=logging.DEBUG, format=" %(asctime)s - %(levelname)s - %(message)s") logging.debug("Start of program") def factorial(n): logging.debug("Start of factorial(%s%%)" % n) total = 1 for i in range(1, n + 1): ...
Python
0
@@ -163,16 +163,88 @@ age)s%22)%0A +logging.disable(logging.CRITICAL) # Stop logging, comment out to debug%0A logging.
acee3e41b45198af4b8a11f5a75bcd62e49864e2
fix path
tumblr/spiders/index.py
tumblr/spiders/index.py
# encoding:utf-8 import json import requests import scrapy from lxml import etree from scrapy.http.request import Request stream_cursor = "eyJGb2xsb3dlZFNlYXJjaFBvc3QiOltdLCJiZWZvcmVfaWQiOiIxNjI2ODY4NDM3NDMifQ%3D%3D" with open("../../config.json", "r") as f: configData = json.loads(f.read(-1)) default_cookie...
Python
0.000017
@@ -27,24 +27,8 @@ on%0A%0A -import requests%0A impo @@ -37,16 +37,16 @@ scrapy%0A + from lxm @@ -208,22 +208,16 @@ h open(%22 -../../ config.j @@ -510,16 +510,16 @@ = set()%0A + start_ur @@ -536,159 +536,8 @@ %5D%0A%0A%0A -def fetch_stream(url, file_name):%0A r = requests.get(url)%0A with open(%22../.....
b202b5faa2f378d3c2b771914c043255e8e66a61
Update venmo meta
modules/sfp_venmo.py
modules/sfp_venmo.py
#------------------------------------------------------------------------------- # Name: sfp_venmo # Purpose: Gather user information from Venmo API. # # Author: <bcoles@gmail.com> # # Created: 2019-07-16 # Copyright: (c) bcoles 2019 # Licence: GPL #--------------------------------------------...
Python
0.000001
@@ -588,18 +588,24 @@ eta = %7B%0A -%09%09 + 'name': @@ -613,18 +613,24 @@ Venmo%22,%0A -%09%09 + 'summary @@ -675,18 +675,24 @@ API.%22,%0A -%09%09 + 'flags': @@ -700,18 +700,24 @@ %5B %22%22 %5D,%0A -%09%09 + 'useCase @@ -767,10 +767,16 @@ %5D,%0A -%09%09 + 'cat @@...
78647441c861eb59d1d25bd6284a2814903a7783
Read real tab_size from settings instead of using constant value
plugin/formatting.py
plugin/formatting.py
import sublime_plugin from .core.protocol import Request, Range from .core.url import filename_to_uri from .core.clients import client_for_view from .core.configurations import is_supported_view class LspFormatDocumentCommand(sublime_plugin.TextCommand): def is_enabled(self): if is_supported_view(self.vi...
Python
0
@@ -834,75 +834,48 @@ e%22: -4, # TODO: Fetch these from the project settings / global settings +self.view.settings().get(%22tab_size%22, 4), %0A @@ -2138,75 +2138,48 @@ e%22: -4, # TODO: Fetch these from the project settings / global settings +self.view.settings().get(%22tab_size%22, 4), %0A
3b9417b3d3d0d1a9d7c16d99c7f8441040d359bc
Add support for NETBLOCKV6_OWNER (#1411)
modules/sfp_whois.py
modules/sfp_whois.py
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------- # Name: sfp_whois # Purpose: SpiderFoot plug-in for searching Whois servers for domain names # and netblocks identified. # # Author: Steve Micallef <steve@binarypool.com> # # Created...
Python
0
@@ -490,21 +490,22 @@ ois%0A -%0Afrom +import netaddr imp @@ -504,24 +504,20 @@ addr - +%0A import -IPAddres +whoi s%0A%0Af @@ -573,30 +573,16 @@ Plugin%0A%0A -import whois%0A%0A %0Aclass s @@ -1326,16 +1326,36 @@ _OWNER%22, + %22NETBLOCKV6_OWNER%22, %0A @@ -2723,18 +2723,37 @@ entName -== +in %5...
aad2232c2dadf309d83ad38978d26f80c2bb5782
Return more informative message when either path or filename is not found
pysteps/io/archive.py
pysteps/io/archive.py
"""Utilities for finding archived files that match the given criteria.""" from datetime import datetime, timedelta import fnmatch import os def find_by_date(date, root_path, path_fmt, fn_pattern, fn_ext, timestep, num_prev_files=0, num_next_files=0): """List input files whose timestamp matches th...
Python
0.000005
@@ -2911,15 +2911,17 @@ -fn = fn + %0A if @@ -2942,19 +2942,198 @@ (fn) - else None%0A +:%0A fn = fn%0A else:%0A print('filename for date %25s not found in %25s' %25 (date,path))%0A fn = None%0A else:%0A print('path', path, 'not found.')%0A %0A...
a42b779bcbf7977d59337064047ca3d366db3ca9
Add clear command for board
python/games/board.py
python/games/board.py
import itertools import threading import datetime import graphics import random import driver import flask from flask import request import game import time import sys from wsgiref import simple_server class Message: def __init__(self, text, priority=5, expiration=None, effects=[]): self.text = text ...
Python
0.000002
@@ -2983,16 +2983,95 @@ 'POST'%5D) +%0A self.api.add_url_rule('/clear', 'clear', self.clear, methods=%5B'POST'%5D) %0A%0A @@ -4226,16 +4226,99 @@ urn ''%0A%0A + def clear(self):%0A with self.frame_lock:%0A self.messages = %7B%7D%0A%0A def
6facb0f33a8cf53041d9fa1562376e43e6d6194f
add init for smiles2graph
ogb/utils/__init__.py
ogb/utils/__init__.py
Python
0.000003
@@ -0,0 +1,67 @@ +try:%0A from .mol import smiles2graph%0Aexcept ImportError:%0A pass
fdae17a50223c2f9b8ba4a665fc24726e2c2ce14
Add auth header to the fixture loader
tests/lib/es_tools.py
tests/lib/es_tools.py
""" Commands for interacting with Elastic Search """ # pylint: disable=broad-except from os.path import join import requests from lib.tools import TEST_FOLDER def es_is_available(): """ Test if Elastic Search is running """ try: return ( requests.get("http://localhost:9200").json()["ta...
Python
0
@@ -305,26 +305,86 @@ 200%22 -).json()%5B%22tagline%22 +, auth=(%22elastic%22, %22changeme%22)).json()%5B%0A %22tagline%22%0A %5D%0A @@ -814,16 +814,29 @@ ts.post( +%0A url, hea @@ -858,10 +858,49 @@ ata=body +, auth=(%22elastic%22, %22changeme%22)%0A )%0A
13f802e959013cf31148399321dd84cc4070bf28
Make input image update on change
qtgui/panels/panel.py
qtgui/panels/panel.py
import numpy as np from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QWidget, QComboBox from PyQt5.QtWidgets import QVBoxLayout, QHBoxLayout, QGroupBox, QSplitter from qtgui.widgets import QActivationView from qtgui.widgets import QInputSelector, QInputInfoBox, QImageView from qtgui.widgets import QNetworkView,...
Python
0.000004
@@ -3077,16 +3077,233 @@ network_layout)%0A +%0A def updateInput(self, data):%0A self._input_view.setImage(data)%0A%0A def modelChanged(self, model):%0A current_input = model.get_input(model._current_index)%0A self.updateInput(current_input.data)%0A
19e347716b5efcbaaf857a2805bd5f7ed5d5ec04
Patch waagent unit to kill process instead of entire control group
VMEncryption/main/oscrypto/encryptstates/PrereqState.py
VMEncryption/main/oscrypto/encryptstates/PrereqState.py
#!/usr/bin/env python # # VM Backup extension # # Copyright 2015 Microsoft Corporation # # 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 # # U...
Python
0
@@ -1882,16 +1882,118 @@ tras()%0A%0A + self._patch_waagent()%0A self.command_executor.Execute('systemctl daemon-reload', True)%0A%0A def @@ -2143,12 +2143,481 @@ ould_exit()%0A +%0A def _patch_waagent(self):%0A self.context.logger.log(%22Patching waagent%22)%0A%0A contents = None...
455874cae74a34e610650e5b5618b64fe808ea1c
fix docstring syntax error
ncharts/ncharts/templatetags/filters.py
ncharts/ncharts/templatetags/filters.py
from django import template from ncharts import models as nc_models register = template.Library() @register.filter def get_long_name(vs, v): """Get 'long_name' value of vs[v] """ try: return vs[v]['long_name'] except: return '' @register.filter def get_item(dictionary, key): return di...
Python
0.000001
@@ -585,16 +585,49 @@ .filter%0A +def make_project_tabs(projects):%0A %22%22%22G @@ -688,41 +688,8 @@ %22%22%22%0A -def make_project_tabs(projects):%0A
c912f7d25906ba00325c36b93ba6fcc1384d7b9a
Version 1.3.2
jupytext/version.py
jupytext/version.py
"""Jupytext's version number""" __version__ = '1.3.1'
Python
0
@@ -45,11 +45,11 @@ = '1.3. -1 +2 '%0A
f7d4be60dd246193fe269dc1caaf8208bd4dba22
improve output of compare_dfa.py.
src/trusted/validator_ragel/unreviewed/compare_dfa.py
src/trusted/validator_ragel/unreviewed/compare_dfa.py
#!/usr/bin/python # Copyright (c) 2013 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import dfa_parser visited_pairs = set() de...
Python
0.403608
@@ -472,26 +472,17 @@ x, path) -%0A print +, state1. @@ -503,16 +503,32 @@ print + map(hex, path), state2. @@ -791,44 +791,239 @@ -print map(hex, new_path)%0A print +t = t1 or t2%0A s = t.to_state%0A path_to_accepting = new_path%0A while not s.is_accepting:%0A b = min(s.forw...
a76915d31937f31e5d5fd7ed090198e311cffaa1
fix csvrecorder
pikos/recorders/csv_recorder.py
pikos/recorders/csv_recorder.py
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # Package: Pikos toolkit # File: recorders/csv_recorder.py # License: LICENSE.TXT # # Copyright (c) 2012, Enthought, Inc. # All rights reserved. #-----------------------------------------------------------------...
Python
0.000013
@@ -780,16 +780,17 @@ s +h ould be @@ -794,16 +794,17 @@ be recor +d ed.%0A%0A @@ -985,18 +985,18 @@ Si -n g +n ify that @@ -1834,16 +1834,24 @@ w(fields +._fields )%0A
1a75b6e516020635d885546da79ab73fe881893e
Change host and port of HostAlias.TEST2
scripts/deployment/fab/config/values/host.py
scripts/deployment/fab/config/values/host.py
# -*- coding: utf-8 -*- # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. class HostAlias(object): CI ...
Python
0
@@ -851,17 +851,16 @@ 'test -2 .akvo.or @@ -864,17 +864,17 @@ .org:227 -3 +0 ',%0A @@ -2112,32 +2112,26 @@ '/ -usr/local/etc/akvo/test2 +var/test2_akvo/etc ',%0A @@ -2187,17 +2187,23 @@ var/ -dev/ test2 +_akvo/repo ',%0A @@ -2259,11 +2259,18 @@ var/ -dev +test2_akvo /vir @@ -2277,22 +2277,16 @@ ...
7331fa69c6cd2f09b1711272278a9684af5cf9c1
fix attachfilename
intelmq/bots/collectors/mail/mail-attach.py
intelmq/bots/collectors/mail/mail-attach.py
import re import imbox import zipfile from intelmq.lib.bot import Bot, sys from intelmq.bots.collectors.mail.lib import Mail class MailAttachCollectorBot(Bot): def process(self): mailbox = imbox.Imbox(self.parameters.mail_host, self.parameters.mail_user, self.parameters.mail_password, self.parameters.mail...
Python
0.000003
@@ -810,32 +810,170 @@ %0A + attach_name = attach%5B'filename'%5D%5B1:len(attach%5B'filename'%5D)-1%5D # remove quote marks from filename%0A %0A @@ -1025,28 +1025,21 @@ , attach -%5B'file +_ name -'%5D ):%0A%0A
b481426e52661b702fa014a86c68b015f46feb1f
remove deprecated test suite declarations
account_invoice_constraint_chronology/tests/__init__.py
account_invoice_constraint_chronology/tests/__init__.py
# -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences result...
Python
0
@@ -1276,116 +1276,4 @@ ogy%0A -%0Afast_suite = %5B%0A test_account_constraint_chronology,%0A%5D%0A%0Achecks = %5B%0A test_account_constraint_chronology,%0A%5D%0A
7fef3fbd8f4a68a2cf584721930c276eb49b16ee
Fix issue in infer_android_package_name with tests in //javatests
build_extensions/infer_android_package_name.bzl
build_extensions/infer_android_package_name.bzl
"""A rule for inferring an android package name.""" def infer_android_package_name(): """Infer an android package name based on current path below 'javatests'""" path = native.package_name() javatests_index = path.rindex("/javatests/") + len("/javatests/") return path[javatests_index:].replace("/", "."...
Python
0.000021
@@ -228,17 +228,16 @@ rindex(%22 -/ javatest @@ -248,17 +248,16 @@ + len(%22 -/ javatest
c2f668b6b403bde09485595c2ac2852220739c93
Fix docstring.
morepath/toposort.py
morepath/toposort.py
from .error import TopologicalSortError def topological_sort(l, get_depends): result = [] marked = set() temporary_marked = set() def visit(n): if n in marked: return if n in temporary_marked: raise TopologicalSortError("Not a DAG") temporary_marked.add...
Python
0.000001
@@ -600,14 +600,17 @@ -method +attribute s th
24bbdd828253e5a1df92dac31f271dde6739ef8d
Refactor and fix some things
vega/polestar.py
vega/polestar.py
import os import json import cgi import codecs from IPython import display JS = ['polestar/scripts/vendor-13742e93f0.js', 'polestar/scripts/app-512c772610.js'] CSS = ['polestar/styles/app-a696a065c6.css', 'polestar/scripts/vendor-e4b58aff85.css'] TEAMPLATE = 'index.html' IFRAME_STYLE = 'border: none; width: 100%; m...
Python
0.000023
@@ -74,24 +74,31 @@ ay%0A%0A%0AJS = %5B' +static/ polestar/scr @@ -113,25 +113,38 @@ dor- -13742e93f0.js', ' +6292494709.js',%0A 'static/ pole @@ -164,18 +164,18 @@ app- -512c772610 +ddc64cf3e9 .js' @@ -184,16 +184,23 @@ CSS = %5B' +static/ polestar @@ -205,70 +205,84 @@ ar/s -tyles/app-a696a065c6.css', '...
03ce4490d3bb7a0bc29ba807dd7de0694b7b244e
Fix (plugin) job description
bulletin/tools/plugins/views/plugin.py
bulletin/tools/plugins/views/plugin.py
import braces.views import django.core.urlresolvers import django.shortcuts import django.views.generic from bulletin.views import SidebarView from bulletin.tools.plugins.forms import plugin as forms from bulletin.tools.plugins.utils import get_active_plugins class PluginSubmitView(braces.views.LoginRequiredMixin, ...
Python
0.000004
@@ -5532,14 +5532,8 @@ es. -That's %0A @@ -5550,50 +5550,10 @@ -what our ads are for. (%3Ca%0A +%3Ca hre @@ -5643,77 +5643,40 @@ -http://www.aashe.org/about/advertising-opportunities#advertising +That's what our ads are for %3C/a%3E -) +. %0A
619d2d7c1f0a02d4a24283acc859d295aeb73205
Improve coverage support documentation.
hunittest/coveragelib.py
hunittest/coveragelib.py
# -*- encoding: utf-8 -*- """Integration of the coverage package. """ import os import re import tempfile import sys import textwrap from glob import glob from warnings import warn import argparse from hunittest.collectlib import get_test_spec_last_pkg from hunittest.utils import silent_stderr try: import covera...
Python
0
@@ -2340,16 +2340,260 @@ arallel. +%0A%0A Although we automatically compute a quiet accurate list of files to omit,%0A we encourage users to set the 'source' option in their configuration files%0A so that the coverage package can warn them when a file is not covered at%0A all. %0A %22%22%22
679549fd5bd51d853658b8d7bcd9c55227b4f9c8
fix typo
jira_integration_example/utilities/alert.py
jira_integration_example/utilities/alert.py
# Copyright 2020 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.999991
@@ -4621,16 +4621,17 @@ ndition' +, %0A
87244598ed08e790835818656ecba0178bb7ca89
Upgrade to a better version
fsplit/__init__.py
fsplit/__init__.py
#!/usr/bin/env python2 ## # fsplit # https://github.com/leosartaj/fsplit.git # # Copyright (c) 2014 Sartaj Singh # Licensed under the MIT license. ## from info import __version__ # define __version__ variable from info import __desc__ # define __desc__ variable for description
Python
0
@@ -146,24 +146,25 @@ e.%0A##%0A%0Afrom +. info import @@ -210,16 +210,17 @@ le%0Afrom +. info imp
1492c853f2efab4b0a3f2097e09fd2d1fc875748
Add Python 3.x compatibility.
pipeline_browserify/compiler.py
pipeline_browserify/compiler.py
from pipeline.compilers import SubProcessCompiler from django.conf import settings from django.core.exceptions import SuspiciousFileOperation from pipeline.exceptions import CompilerError from warnings import warn class BrowserifyCompiler(SubProcessCompiler): output_extension = 'browserified.js' def match...
Python
0
@@ -1277,23 +1277,24 @@ print - +( stdout +) %0A @@ -1303,23 +1303,24 @@ print - +( stderr +) %0A @@ -3095,17 +3095,17 @@ print - +( %22compile @@ -3121,32 +3121,33 @@ mand:%22, cmd, env +) %0A self.si @@ -4528,17 +4528,17 @@ print - +( %22is_outd @@ -4557,24 +4557,25 @@...
d879440cef6bc1985ab4e8bf8f81163b661beb1b
change locale and admin settings
censusreporter/config/base/settings.py
censusreporter/config/base/settings.py
# Django settings for censusreporter project. import os dirname = os.path.dirname PROJECT_ROOT = os.path.abspath(os.path.join(dirname(__file__),"..","..")) DEBUG = True TEMPLATE_DEBUG = DEBUG # should be set by each settings file # ROOT_URLCONF = 'config.dev.urls' DATABASES = { 'default': { 'ENGINE': 'dj...
Python
0
@@ -719,22 +719,26 @@ = 'A -me +f rica/ -Chicago +Johannesburg '%0ALA @@ -756,17 +756,17 @@ = 'en-u -s +k '%0ASITE_I @@ -2911,121 +2911,75 @@ (' -Ian Dees', 'ian.dees@gmail.com'),%0A ('Joe Germuska', 'joegermuska@gmail.com'),%0A ('Ryan Pitts', 'ryan.a. +Greg Kempe', 'greg@kempe.net'),%0A ('Rizmari Ver...
85124382cd3f90b439b27c8dd5a82f47925ddab7
fix settings print
mppsolar/__init__.py
mppsolar/__init__.py
# -*- coding: utf-8 -*- # !/usr/bin/python import logging from argparse import ArgumentParser # import mppcommands import mpputils logger = logging.getLogger() # if __name__ == '__main__': def main(): parser = ArgumentParser(description='MPP Solar Command Utility') parser.add_argument('-c', '--command', hel...
Python
0.000001
@@ -1724,16 +1724,35 @@ print +%22%7B%7D%5Ct%7B%7D %7B%7D%22.format( key, ful @@ -1793,24 +1793,25 @@ key%5D%5B'unit'%5D +) %0A elif(ar @@ -1831,35 +1831,34 @@ s):%0A -for line in +settings = mp.getSetti @@ -1866,61 +1866,237 @@ gs() -:%0A print line, line%5B'value'%5D, line +%0A ...
bafdbd28e35d80d28bfb82c23532533cb2915066
Add docs for MissingInputFiles 'message' arg.
fuel/exceptions.py
fuel/exceptions.py
class AxisLabelsMismatchError(ValueError): """Raised when a pair of axis labels tuples do not match.""" class ConfigurationError(Exception): """Error raised when a configuration value is requested but not set.""" class MissingInputFiles(Exception): """Exception raised by a converter when input files are...
Python
0
@@ -356,16 +356,98 @@ -------%0A + message : str%0A The error message to be associated with this exception.%0A file
d2eda42f9f5769d0d42ab38d6bfd912ccff53327
remove Q1 from status data (as doesnt work on all inverters and is undocumented)
mppsolar/mpputils.py
mppsolar/mpputils.py
""" MPP Solar Inverter Command Library library of utility and helpers for MPP Solar PIP-4048MS inverters mpputils.py """ import logging from .mppinverter import mppInverter from .mppinverter import NoDeviceError log = logging.getLogger('MPP-Solar') def getVal(_dict, key, ind=None): if key not in _dict: ...
Python
0
@@ -1314,17 +1314,20 @@ eDict(%22Q -1 +PIGS %22)%0A @@ -1324,24 +1324,26 @@ GS%22)%0A + # data.update @@ -1366,20 +1366,17 @@ eDict(%22Q -PIGS +1 %22))%0A%0A
0da95bdfc184614edca41b41ac3409295352fff6
Update days_between.py
checkio/python/oreilly/days_between.py
checkio/python/oreilly/days_between.py
Python
0.000003
@@ -0,0 +1,440 @@ +import datetime%0D%0A%0D%0Adef days_diff(date1, date2):%0D%0A d1 = datetime.datetime(*date1)%0D%0A d2 = datetime.datetime(*date2)%0D%0A return abs((d2-d1).days)%0D%0A%0D%0Aif __name__ == '__main__':%0D%0A #These %22asserts%22 using only for self-checking and not necessary for auto-testing...
e35649188f10e99381926318192c856e85245ef9
update apk version to support toast
uiautomator2/version.py
uiautomator2/version.py
# coding: utf-8 # __apk_version__ = '1.0.11' # 1.0.11 add auto install support # 1.0.10 fix service not started bug # 1.0.9 fix apk version code and version name # ERR: 1.0.8 bad version number. show ip on notification # ERR: 1.0.7 bad version number. new input method, some bug fix __atx_agent_version__ = '0.2.1' # 0...
Python
0
@@ -36,18 +36,45 @@ = '1.0.1 -1' +2'%0A# 1.0.12 add toast support %0A# 1.0.1
2dd60e236929c7b1f3e922f4ab3b04fac586fdfa
use --reuse-port
pifpaf/drivers/gnocchi.py
pifpaf/drivers/gnocchi.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
Python
0.000001
@@ -6845,24 +6845,52 @@ cchi-api%22),%0A + %22--reuse-port%22,%0A
f7034b2988d9ebcb3836b3e12b609f6098269f2c
remove unused shebang
potty_oh/waveform.py
potty_oh/waveform.py
#!/usr/bin/env python # Copyright 2016 Curtis Sand # # 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.000002
@@ -1,26 +1,4 @@ -#!/usr/bin/env python%0A # Co
c3ff6aa43fd058153887996c02fcc60d7262e23b
Update comments and whitespace
update_aimpoint_data.py
update_aimpoint_data.py
#!/usr/bin/env python import os import re import shelve import argparse import tables import numpy as np from Chandra.Time import DateTime from astropy.table import Table, Column, vstack from astropy.time import Time from mica.archive import asp_l1 from Ska.DBI import DBI from mica.common import MICA_ARCHIVE import p...
Python
0
@@ -1190,16 +1190,17 @@ _files%5D%0A +%0A # Ch @@ -1220,13 +1220,19 @@ the -y a -ll +sol files hav @@ -1240,24 +1240,40 @@ raw columns + ( %3E= DS 10.8.3) %0A has_raw @@ -1447,17 +1447,24 @@ t%22)%0A +%0A # -Get +Reduce to jus @@ -1473,22 +1473,34 @@ the -useful columns + needed by the to...
927d762daf41a32be37bd056c889e170d6efbb93
Update foreign key references for django 2.0. This change was made in Django core 3 years ago.
watson/models.py
watson/models.py
"""Models used by django-watson.""" from __future__ import unicode_literals import uuid from django.db import models from django.contrib.contenttypes.models import ContentType from django.utils.encoding import python_2_unicode_compatible, force_text from django.utils.functional import cached_property try: from ...
Python
0
@@ -815,12 +815,24 @@ k.re -l.to +mote_field.model )%0A
0c6c9de85161a6c15f84b19d473d992c90a31ea5
add per transaction coverage increase metrics
mythril/laser/ethereum/plugins/implementations/coverage.py
mythril/laser/ethereum/plugins/implementations/coverage.py
from mythril.laser.ethereum.svm import LaserEVM from mythril.laser.ethereum.plugins.plugin import LaserPlugin from mythril.laser.ethereum.state.global_state import GlobalState from typing import Dict, Tuple, List import logging log = logging.getLogger(__name__) class InstructionCoveragePlugin(LaserPlugin): """...
Python
0
@@ -720,16 +720,168 @@ %22%22%22%0A%0A + def __init__(self):%0A self.coverage = %7B%7D # type: Dict%5Bstr, Tuple%5Bint, List%5Bbool%5D%5D%5D%0A self.initial_coverage = 0%0A self.tx_id = 0%0A%0A def @@ -921,16 +921,16 @@ erEVM):%0A - @@ -1080,32 +1080,37 @@ %22%22%22%0A...
3494ed60343760d3ee520b37b793afa49f225f35
Add function to check if loop is dummy or not
pitch/lib/logic/control_flow.py
pitch/lib/logic/control_flow.py
from __future__ import unicode_literals import itertools import yaml from ..common.utils import to_iterable from ..templating.structures import PitchTemplate, JinjaExpressionResolver class ControlFlowStatement(object): def __init__(self, statement_type): self.__statement_type = statement_type @proper...
Python
0.000005
@@ -2000,32 +2000,103 @@ __items = None%0A%0A + def is_effective(self):%0A return self.__command is not None%0A%0A @property%0A
28c6e6747a6d0bd924f838ed4f846b01c247012b
Remove unused tempproject and tempscene
previz/testsutils.py
previz/testsutils.py
import functools from . import PrevizProject class Decorators(object): def __init__(self, api_token, api_root, new_project_prefix = 'cf-'): self.api_root = api_root self.api_token = api_token self.new_project_prefix = new_project_prefix def project(self, project_id): def decor...
Python
0
@@ -1573,567 +1573,4 @@ b')%0A -%0A%0Adef tempproject(func):%0A @functools.wraps(func)%0A def wrapper(*args, **kwargs):%0A api_root = os.environ%5BPREVIZ_API_ROOT_ENVVAR%5D%0A api_token = os.environ%5BPREVIZ_API_TOKEN_ENVVAR%5D%0A project_name = 'cf-' + func.__qualname__%0A%0A p = Pre...
2528f4ad76dad2915be1d51483cea7693ea453ce
fix test
tests/server4_test.py
tests/server4_test.py
# -*- coding: utf-8 -*- u"""Test background processes :copyright: Copyright (c) 2019 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from pykern.pkcollections import PKDict import pytest def test_elega...
Python
0.000002
@@ -395,32 +395,33 @@ Report',%0A )%0A%0A +%0A def test_synergi @@ -538,16 +538,17 @@ %0A )%0A%0A +%0A def test @@ -771,16 +771,21 @@ ed_model +=None ):%0A f
1b16467c9d24c770578d5f94e9715d754885de98
correct output at switch on
printStatusChange.py
printStatusChange.py
import re def readStatus(): status = '' f = open('/proc/asound/card0/pcm0p/sub0/status', 'r') for line in f: matchObj = re.match(r'state.*', line) if matchObj: status = matchObj.group() break matchObj = re.match(r'closed', line) if matchObj: ...
Python
0.000011
@@ -961,16 +961,63 @@ wer = 1%0A + shutdownTimer = SHUTDOWN_TIME%0A%0A @@ -1128,13 +1128,16 @@ nt(%22 -(s +S top +ping cou @@ -1147,24 +1147,27 @@ down -) +( Power +is still ON %22)%0A%0A @@ -1162,16 +1162,17 @@ still ON +) %22)%0A%0A
f54802514b6d3ba66269c4e09640d2de7a7dade2
Fix regression in filesystem watcher
watcher/straight_watch_callback.py
watcher/straight_watch_callback.py
#!/usr/bin/env python3 -u import os import pathlib import sys WATCHEXEC_VAR_COMMON = "WATCHEXEC_COMMON_PATH" WATCHEXEC_VARS = [ "WATCHEXEC_CREATED_PATH", "WATCHEXEC_REMOVED_PATH", "WATCHEXEC_RENAMED_PATH", "WATCHEXEC_WRITTEN_PATH", "WATCHEXEC_META_CHANGED_PATH", ] def die(message): print(me...
Python
0.000019
@@ -8,16 +8,19 @@ bin/env +-S python3
66e9e8a35831e603509d96ac8f1cab7bc8b9a3fc
enforce lot locking when using quick-create in web client
stock_lock_lot/models/stock_production_lot.py
stock_lock_lot/models/stock_production_lot.py
# -*- coding: utf-8 -*- # © 2015 Serv. Tec. Avanzados - Pedro M. Baeza (http://www.serviciosbaeza.com) # © 2015 AvanzOsc (http://www.avanzosc.es) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api, exceptions, _ class StockProductionLot(models.Model): _na...
Python
0
@@ -2590,157 +2590,345 @@ -product = self.pool%5B'product.product'%5D.browse(%0A cr, uid, vals.get('product_id'))%0A vals%5B'locked'%5D = self._get_product_locked(product +# %C2%A0Web quick-create doesn't provide product_id in vals, but in context%0A product_id = vals.get('product_id', co...