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
7dbf9d6e6fc52247ae88a1c674ee8c78edd98d65
remove timeout from completion_service_test - causes 'daemonic proccesses cannot have children' error
studio/completion_service/completion_service_test.py
studio/completion_service/completion_service_test.py
import uuid import unittest import os import logging from timeout_decorator import timeout from .completion_service import CompletionService from studio.util import has_aws_credentials from studio.local_queue import get_local_queue_lock logging.basicConfig() class CompletionServiceTest(unittest.TestCase): _m...
Python
0
@@ -49,46 +49,8 @@ ging -%0Afrom timeout_decorator import timeout %0A%0Afr @@ -2104,45 +2104,8 @@ ')%0A%0A - @timeout(500, use_signals=False)%0A
fed1475564f7ca8a496d50446e4e5924befe8628
Update function output type annotation
tensorflow/core/function/capture/free_vars_detect.py
tensorflow/core/function/capture/free_vars_detect.py
# Copyright 2022 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0.000007
@@ -762,16 +762,40 @@ rt types +%0Afrom typing import List %0A%0Afrom t @@ -1674,21 +1674,16 @@ ee_vars( -%0A func: ty @@ -1707,45 +1707,16 @@ -%3E -tuple%5Blist%5Bstr%5D, list%5Bstr%5D, list%5Bint%5D +List%5Bstr %5D:%0A
cbfbc2dbeeb8a03cd96ef2756185099a9be9b714
Update data_provider_test.py
tensorflow_gan/examples/esrgan/data_provider_test.py
tensorflow_gan/examples/esrgan/data_provider_test.py
# coding=utf-8 # Copyright 2021 The TensorFlow GAN 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 applicabl...
Python
0
@@ -656,118 +656,26 @@ %22%22%22%0A -%0Afrom __future__ import absolute_import%0Afrom __future__ import division%0Afrom __future__ import print_fun +import colle ction -%0A +s %0Afro @@ -709,27 +709,8 @@ est%0A -import numpy as np%0A impo @@ -754,29 +754,12 @@ der%0A -import collections%0A%0AP +%0A%0Ahp aram @@ ...
91603858133183e056fbcd9cfee92ccc79e7e610
Interpolate with differentiable barycentrics.
tensorflow_graphics/rendering/triangle_rasterizer.py
tensorflow_graphics/rendering/triangle_rasterizer.py
# Copyright 2020 The TensorFlow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
Python
0.000002
@@ -5296,28 +5296,26 @@ es)%0A -barycentrics +rasterized = baryc @@ -5409,16 +5409,46 @@ iangles) +%0A barycentrics = rasterized .barycen
ef0d0fa26bfd22c281c54bc348877afd0a7ee9d7
Use regex to match user metrics
tests/integration/blueprints/metrics/test_metrics.py
tests/integration/blueprints/metrics/test_metrics.py
""" :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import pytest # To be overridden by test parametrization @pytest.fixture def config_overrides(): return {} @pytest.fixture def client(admin_app, config_overrides, make_admin_app): app = make_admin_app(**conf...
Python
0.000006
@@ -94,16 +94,27 @@ s.%0A%22%22%22%0A%0A +import re%0A%0A import p @@ -706,54 +706,90 @@ in'%0A +%0A -assert response.get_data(as_text=True) == +# Not a full match as there can be other metrics, too.%0A regex = re.compile (%0A @@ -810,25 +810,28 @@ ctive_count -0 +%5C%5Cd+ %5Cn'%0A @@ -849,33...
8f70cdec4534651d7479645b4675a23f8d0c7005
add home.html ;
src/greenpointtreesstore/greenpointtreesstore/urls.py
src/greenpointtreesstore/greenpointtreesstore/urls.py
from __future__ import unicode_literals from django.conf.urls import patterns, include, url from django.conf.urls.i18n import i18n_patterns from django.contrib import admin from mezzanine.core.views import direct_to_template from mezzanine.conf import settings admin.autodiscover() # Add the urlpatterns for any cus...
Python
0
@@ -1307,32 +1307,122 @@ %7D, name=%22home%22), +%0A url(%22%5Ehome.html$%22, direct_to_template, %7B%22template%22: %22index.html%22%7D, name=%22home.html%22), %0A%0A # HOMEPAGE
e71bbe6dff52d7977332ee37ffa9df5505173a0c
Use sets like they should be, and finish up changes for the night
test_utils/management/commands/relational_dumpdata.py
test_utils/management/commands/relational_dumpdata.py
from django.core.management.base import BaseCommand, CommandError from django.core import serializers from optparse import make_option from django.db.models.fields.related import ForeignKey, ManyToManyField from django.db.models import get_app, get_apps, get_models def _relational_dumpdata(app, collected): object...
Python
0
@@ -547,23 +547,8 @@ add( -s for s in set( %5B(x. @@ -582,17 +582,16 @@ bjects%5D) -) #Just @@ -2679,155 +2679,8 @@ ng.%0A - if format not in serializers.get_public_serializer_formats():%0A raise CommandError(%22Unknown serialization format: %25s%22 %25 format)%0A%0A @@ -2912,16 +2912,41...
cc1b63e76a88fd589bfe3fce2f6cbe5becf995bc
use no_backprop_mode
tests/links_tests/model_tests/vgg_tests/test_vgg16.py
tests/links_tests/model_tests/vgg_tests/test_vgg16.py
import unittest import numpy as np from chainer.initializers import Zero from chainer import testing from chainer.testing import attr from chainer import Variable from chainercv.links import VGG16 @testing.parameterize( {'pick': 'prob', 'shapes': (1, 200), 'n_class': 200}, {'pick': 'pool5', 'shapes': (1, 5...
Python
0.000005
@@ -30,16 +30,31 @@ as np%0A%0A +import chainer%0A from cha @@ -841,16 +841,61 @@ at32)))%0A + with chainer.no_backprop_mode():%0A
6fdb703edc929c72d871b7830959fb1e32c86c48
Remove compositing check from rasterize_and_record_micro test.
tools/perf/measurements/rasterize_and_record_micro.py
tools/perf/measurements/rasterize_and_record_micro.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import time from telemetry.core.util import TimeoutException from telemetry.page import page_measurement from telemetry.page import page_test cl...
Python
0.000004
@@ -462,55 +462,8 @@ ue)%0A - self._compositing_features_enabled = False%0A @@ -2456,581 +2456,50 @@ %0A%0A - # Check if the we actually have threaded forced compositing enabled.%0A system_info = browser.GetSystemInfo()%0A if (system_info.gpu.feature_status%0A and system_info.gpu.feature_stat...
b635d3bb0a0de01539d66dda4555b306c59082ee
fix version number
constant2/__init__.py
constant2/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from ._constant2 import Constant except: # pragma: no cover pass __version__ = "0.0.9" __short_description__ = "provide extensive way of managing your constant variable." __license__ = "MIT" __author__ = "Sanhe Hu" __author_email__ = "husanhe@gmail.com" __ma...
Python
0.000014
@@ -143,9 +143,10 @@ 0.0. -9 +10 %22%0A__
28b7b5f43d5206609f789a94c614d6811ae87cef
Fix call to resolve nick protection
txircd/modules/extra/services/account_nick_protect.py
txircd/modules/extra/services/account_nick_protect.py
from twisted.internet import reactor from twisted.plugin import IPlugin from txircd.config import ConfigValidationError from txircd.module_interface import IModuleData, ModuleData from txircd.utils import now from zope.interface import implements from weakref import WeakKeyDictionary from datetime import timedelta cla...
Python
0
@@ -2370,16 +2370,22 @@ tection, + user, user.ni
770c4fd0b282ee355d2ea3e662786113dd6b4e74
add 1.4.2 (#26472)
var/spack/repos/builtin/packages/py-nipype/package.py
var/spack/repos/builtin/packages/py-nipype/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyNipype(PythonPackage): """Neuroimaging in Python: Pipelines and Interfaces.""" home...
Python
0.000001
@@ -587,35 +587,198 @@ f')%0A -%0A depends_on('python@3.6 + version('1.4.2', sha256='069dcbb0217f13af6ee5a7f1e58424b9061290a3e10d7027d73bf44e26f820db')%0A%0A depends_on('python@3.6:', when='@1.5:', type=('build', 'run'))%0A depends_on('python@3.5 :', @@ -875,18 +875,16 @@ lick@6.6 -.0 :', type @@ -931,...
63d4d37c9194aacd783e911452a34ca78a477041
add latest version 1.2.0 (#23528)
var/spack/repos/builtin/packages/py-vermin/package.py
var/spack/repos/builtin/packages/py-vermin/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class PyVermin(PythonPackage): """Concurrently detect the minimum Python versions needed to run code.""" homepag...
Python
0
@@ -416,19 +416,19 @@ hive/v1. -1.1 +2.0 .tar.gz%22 @@ -461,16 +461,112 @@ omdk'%5D%0A%0A + version('1.2.0', sha256='a3ab6dc6608b859f301b9a77d5cc0d03335aae10c49d47a91b82be5be48c4f1f')%0A vers
c73d237d087792a00b6c0aceaf56674e398ea8e0
version bump (#8884)
var/spack/repos/builtin/packages/simplemoc/package.py
var/spack/repos/builtin/packages/simplemoc/package.py
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0
@@ -1658,14 +1658,10 @@ ive/ -master +v4 .tar @@ -1683,47 +1683,84 @@ on(' -1.0', 'd8827221a4ae76e9766a32e16d143e60 +4', sha256='a39906014fdb234c43bf26e1919bdc8a13097788812e0b353a492b8e568816a6 ')%0A%0A
28c9c0349e0f86fbdee8a02b46386e42dbe702a2
fix conflict
oct_turrets/turret.py
oct_turrets/turret.py
import time import json from oct_turrets.base import BaseTurret from oct_turrets.canon import Canon class Turret(BaseTurret): """This class represent the classic turret for oct """ def init_commands(self): """Initialize the basics commandes for the turret """ self.commands['start...
Python
0.031708
@@ -16,16 +16,33 @@ ort json +%0Aimport traceback %0A%0Afrom o @@ -1489,30 +1489,8 @@ = 0 -%0A print(rampup) %0A%0A @@ -2001,52 +2001,8 @@ me() -%0A print(len(self.canons)) %0A%0A @@ -2945,16 +2945,16 @@ rint(e)%0A - @@ -2976,16 +2976,50 @@ tatus()%0A + traceb...
b962bf374ac57c6084fb6724b9abad21719cb612
Change dump filename extensions --> txt
iotendpoints/endpoints/views.py
iotendpoints/endpoints/views.py
import os import pytz import base64 # from django.shortcuts import render from django.conf import settings from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.utils import timezone from endpoints.models import Request from django.contrib.auth import authenticate META_...
Python
0
@@ -441,16 +441,31 @@ ER_PORT' +, 'REQUEST_URI' %5D%0A%0A%0Adef @@ -954,12 +954,17 @@ uest -.raw +_body.txt ')%0A @@ -1118,16 +1118,88 @@ method)) +%0A res.append('Request full path: %7B%7D'.format(request.get_full_path())) %0A%0A re @@ -2266,16 +2266,24 @@ 'request +_headers .txt')%0A
c0627c6d8d11a9b9597b8fecd10b562d46a71521
Send fio results to fio.sc.couchbase.com
perfrunner/tests/fio.py
perfrunner/tests/fio.py
from collections import defaultdict from logger import logger from perfrunner.helpers.misc import pretty_dict from perfrunner.helpers.remote import RemoteHelper from perfrunner.tests import PerfTest class FIOTest(PerfTest): def __init__(self, cluster_spec, test_config, verbose): self.cluster_spec = clu...
Python
0
@@ -30,16 +30,32 @@ ltdict%0A%0A +import requests%0A from log @@ -238,16 +238,185 @@ Test):%0A%0A + TRACKER = 'fio.sc.couchbase.com'%0A%0A TEMPLATE = %7B%0A 'group': '%7B%7D, random mixed reads and writes, IOPS',%0A 'metric': None,%0A 'value': None,%0A %7D%0A%0A def @@ -1066,16 +1...
fee1b1f55567f5ef7ac4e8d78f531cf9780c9400
Fix typo. (#1509)
storage/cloud-client/notification_polling.py
storage/cloud-client/notification_polling.py
#!/usr/bin/env python # Copyright 2017 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
Python
0.997978
@@ -2954,16 +2954,17 @@ tes%5B'ove +r writtenB
69038348a0e029d2b06c2753a0dec9b2552ed820
Add license header to __init__.py
openquake/__init__.py
openquake/__init__.py
""" OpenGEM is an open-source platform for the calculation of hazard, risk, and socio-economic impact. It is a project of the Global Earthquake Model, nd may be extended by other organizations to address additional classes of peril. For more information, please see the website at http://www.globalquakemodel.org Thi...
Python
0.000018
@@ -673,12 +673,685 @@ ation.%0A%0A + This program is free software: you can redistribute it and/or modify%0A it under the terms of the GNU Lesser General Public License as published by%0A the Free Software Foundation, either version 3 of the License, or%0A (at your option) any later version.%0A%0A This...
9815f575f882ac54f4633a2899513dc492bd47e3
Update optimizeHyper.py
oppa/optimizeHyper.py
oppa/optimizeHyper.py
import numpy as np import math #from macs.learnMACSparam import run as learnMACparam from BayesianOptimization.bayes_opt.bayesian_optimization import BayesianOptimization #function for testing Bayesian optimization. def test_function(y): return (y-50)**2 def optimized_function(function, error, *param): """ ...
Python
0.000001
@@ -1904,16 +1904,137 @@ n,max)%0A%0A + :param init_point:%0A this parameter decide number of sample which randomly generated for first state.%0A %0A :ret @@ -2038,16 +2038,21 @@ return:%0A + %0A %22%22%22%0A @@ -3359,28 +3359,29 @@ on, Param_bound, init_point) +%0A
bab1ad914ab9273aa8ab905edef2578b5c760f31
add django installed apps init opps core
opps/core/__init__.py
opps/core/__init__.py
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ trans_app_label = _('Opps')
Python
0
@@ -77,35 +77,304 @@ s _%0A -%0A%0A%0Atrans_app_label = _('Opps') +from django.conf import settings%0A%0A%0A%0Atrans_app_label = _('Opps')%0A%0Asettings.INSTALLED_APPS += ('opps.article',%0A 'opps.image',%0A 'opps.channel',%0A 'opps.source',%0A 'redactor',%0A 'tagging',)%0A%0Asetting...
347bb827151e8efe1e59683da128215027253245
Version bump.
orchestra/__init__.py
orchestra/__init__.py
# The current Orchestra version. __version__ = '0.1.41' default_app_config = 'orchestra.apps.OrchestraAppConfig'
Python
0
@@ -46,17 +46,17 @@ = '0.1.4 -1 +2 '%0A%0Adefau
fdea91164a145474d0ce093420aeace592cc57a6
Update RESOURCE_TYPE_MAP and datacite format subjects
osf/metadata/utils.py
osf/metadata/utils.py
from website import settings SUBJECT_SCHEME = 'bepress Digital Commons Three-Tiered Taxonomy' RESOURCE_TYPE_MAP = { 'Audio/Video': 'Audiovisual', 'Dataset': 'Dataset', 'Image': 'Image', 'Model': 'Model', 'Software': 'Software', 'Book': 'Text', 'Funding Submission': 'Text', 'Journal Ar...
Python
0
@@ -503,16 +503,17 @@ ,%0A '( +: unas)': @@ -1784,16 +1784,82 @@ subject +.bepress_subject.text if subject.bepress_subject else subject.text ,%0A
ff60b8e2cb89e1c4d6c75af79d0199d142c6e2b4
fix TypeError: memoryview: a bytes-like object is required, not 'str'
ouimeaux/subscribe.py
ouimeaux/subscribe.py
from collections import defaultdict import logging from xml.etree import cElementTree from functools import partial import gevent from gevent.pywsgi import WSGIServer from ouimeaux.utils import get_ip_address, requests_request from ouimeaux.device.insight import Insight from ouimeaux.device.maker import Maker from ou...
Python
0.000294
@@ -508,16 +508,50 @@ /html%3E'%0A +SUCCESS_BINARY = SUCCESS.encode()%0A %0A%0Aclass @@ -3136,16 +3136,23 @@ SUCCESS +_BINARY %0A%0A de
f5275dba7285a97b05ac3abb756897ba75f119c5
remove execute permission
p038_conut_and_say.py
p038_conut_and_say.py
#!/usr/bin/python # -*- utf-8 -*- class Solution: def __init__(self, init='1'): self._list = [init] # @return a string def countAndSay(self, n): while len(self._list) < n: self._list.append(self.say(self._list[-1])) return self._list[n-1] @staticmethod def say(...
Python
0.000004
f06c19d0fc686a915d002124893e35209836eba4
Make TestCase.func_code() private.
subversion/tests/cmdline/svntest/testcase.py
subversion/tests/cmdline/svntest/testcase.py
#!/usr/bin/env python # # testcase.py: Control of test case execution. # # Subversion is a tool for revision control. # See http://subversion.tigris.org for more information. # # ==================================================================== # Copyright (c) 2000-2004 CollabNet. All rights reserved. # # This ...
Python
0.000001
@@ -2458,24 +2458,25 @@ return self. +_ func_code(). @@ -2539,24 +2539,25 @@ name = self. +_ func_code(). @@ -2634,16 +2634,17 @@ %0A%0A def +_ func_cod
c94552bfa70fdb57eb12f724cd6faa6ae9c0d89c
Allow passing None for username in v2.Password
keystoneclient/auth/identity/v2.py
keystoneclient/auth/identity/v2.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.000006
@@ -3372,16 +3372,41 @@ %22%22%22%0A%0A%0A +_NOT_PASSED = object()%0A%0A%0A class Pa @@ -3487,20 +3487,27 @@ sername= -None +_NOT_PASSED , passwo @@ -3518,22 +3518,8 @@ one, - user_id=None, %0A @@ -3531,16 +3531,37 @@ + user_id=_NOT_PASSED, **kwarg @@ -4098,33 +4098,58 @@ if -not (user_id or u...
de29012d0bf48cf970ad37c62d7db960161f14c0
Remove unused stat import
core/dovecot/start.py
core/dovecot/start.py
#!/usr/bin/python3 import os import stat import glob import multiprocessing import logging as log import sys from podop import run_server from socrate import system, conf log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", "WARNING")) def start_podop(): os.setuid(8) url = "http://" + os.e...
Python
0
@@ -27,20 +27,8 @@ os%0A -import stat%0A impo
b61c907a49e20da6148828aa512c86b58c0312c1
use the real index info in the sql pillow
corehq/pillows/sms.py
corehq/pillows/sms.py
from corehq.apps.change_feed import topics from corehq.apps.change_feed.consumer.feed import KafkaChangeFeed from corehq.elastic import get_es_new from corehq.apps.sms.models import SMSLog from corehq.pillows.mappings.sms_mapping import SMS_MAPPING, SMS_INDEX, SMS_META, SMS_TYPE from dimagi.utils.decorators.memoized im...
Python
0
@@ -2135,68 +2135,22 @@ nfo= -ElasticsearchIndexInfo(index=ES_SMS_INDEX, type=ES_SMS_TYPE) +SMS_INDEX_INFO ,%0A
2487a33c2abc62de579ac615cfd8b58216522b65
add cfgfiles as a generic application attribute
coshsh/application.py
coshsh/application.py
#!/usr/bin/env python #-*- encoding: utf-8 -*- # # Copyright 2010-2012 Gerhard Lausser. # This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). import os import imp import inspect import logging from util import compare_attr, is_attr from item import Item from templa...
Python
0
@@ -1489,17 +1489,17 @@ r.debug( -%22 +' this wil @@ -1514,13 +1514,12 @@ eric -: %25s -%22 +' %25 p @@ -4590,16 +4590,108 @@ tr(self, + %22cfgfiles%22) and self.cfgfiles) or (hasattr(self, %22files%22) and self.files) or (hasattr(self, %22ports%22
e8663deb33bcf2ea4d6a43436016d3459103f337
Clarify usage of the 'port' parameter
couchbase/__init__.py
couchbase/__init__.py
# # Copyright 2013, Couchbase, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
Python
0.000081
@@ -4233,16 +4233,572 @@ ment API +.%0A%0A .. note::%0A%0A The value specified here is the same port used to access%0A The couchbase REST UI (typically %608091%60). If you have selcted%0A an alternate port for your bucket, do *not* put it here. The%0A configuration ...
328f1b5a8997432e8216657f45c7b34d94cfb2f4
Create Mark the Human by default ;)
create_default_dbs.py
create_default_dbs.py
#!/usr/bin/python import games_mgr as gm_m import openings_book as ol_m import human_player as h_m import players_mgr as pm_m import ai_genome as aig_m from defines import * import sys import os def dot(): sys.stdout.write('.') sys.stdout.flush() if __name__ == "__main__": print "Creating Human Players"...
Python
0
@@ -373,16 +373,24 @@ %22Bruce%22, + %22Mark%22, %22Jespah
0fb6b22137cc183e2438d8155665724a577f51b2
Remove unused imports in soc.views.sitemap modules.
app/soc/views/sitemap/sidebar.py
app/soc/views/sitemap/sidebar.py
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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
@@ -724,25 +724,8 @@ %5D%0A%0A%0A -import operator%0A%0A from @@ -757,44 +757,8 @@ band -%0Afrom soc.views.helper import access %0A%0Aim @@ -1020,17 +1020,16 @@ .%0A %22%22%22%0A -%0A global @@ -3816,16 +3816,18 @@ = %5B%5D%0A%0A + # args =
c37ad5d87f5b9d30168495547c744d778f75c7ec
set status to completed if file already present
custom/icds/models.py
custom/icds/models.py
from __future__ import absolute_import from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.db import models from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy as _ from django.db.models.signals import pre...
Python
0
@@ -5788,16 +5788,130 @@ se None%0A + file_exists = self.utility.file_exists()%0A if file_exists:%0A self.status = self.COMPLETED%0A @@ -5970,29 +5970,16 @@ if not -self.utility. file_exi @@ -5981,18 +5981,16 @@ e_exists -() :%0A
87858c9a53244758d92ce1e97ee47465cdd8b9f1
Mark TestSwiftDifferentClangFlags as XFAIL
packages/Python/lldbsuite/test/lang/swift/different_clang_flags/TestSwiftDifferentClangFlags.py
packages/Python/lldbsuite/test/lang/swift/different_clang_flags/TestSwiftDifferentClangFlags.py
# TestSwiftDifferentClangFlags.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.txt for license information # See http://swift.o...
Python
0
@@ -1227,16 +1227,87 @@ dSYM%22)%0A + @decorators.skipIf(oslist=%5B%22macosx%22%5D, bugnumber=%22rdar://26051347%22)%0A def
d48a0cb42aabf0c42debfddfcf09a8c2f954b9ff
Put project when create account.analytic.account for test.
purchase_line_with_delivery_service_info/tests/test_purchase_line_with_delivery_service_info.py
purchase_line_with_delivery_service_info/tests/test_purchase_line_with_delivery_service_info.py
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## import openerp.tests.common as common class TestPurchaseL...
Python
0
@@ -827,24 +827,231 @@ count_vals)%0A + project_vals = %7B'name': 'project procurement service project',%0A 'analytic_account_id': self.account.id%7D%0A self.project = self.env%5B'project.project'%5D.create(project_vals)%0A sale
6593fe983b40a5d4c467cb2ea0847e10e5faae1c
Update Beck_Pang_First_Python_practice_2.7.py
Coding_practice/Beck_Pang_First_Python_practice_2.7.py
Coding_practice/Beck_Pang_First_Python_practice_2.7.py
""" Beck Pang 25/07/2014 First practice project for our summer robotics team """ import random def name_to_number (name): # This helper function converts the string name into a number between 0 an 4 # pre: take a name in String as a parameter # post: return an represented number in integer if (name ==...
Python
0.000001
@@ -493,19 +493,16 @@ (name == -hel %22scisso
dec1ec2504cdd2d642d7efcf97ebab2bf263a29d
Add ignore list to detect changes of k8s auth config
ansible/modules/hashivault/hashivault_k8s_auth_config.py
ansible/modules/hashivault/hashivault_k8s_auth_config.py
#!/usr/bin/env python from ansible.module_utils.hashivault import hashivault_argspec from ansible.module_utils.hashivault import hashivault_auth_client from ansible.module_utils.hashivault import hashivault_init from ansible.module_utils.hashivault import hashiwrapper from ansible.module_utils.hashivault import get_key...
Python
0
@@ -3433,16 +3433,114 @@ _point%0A%0A + ignore_list = %5B%0A 'mount_point',%0A 'token_reviewer_jwt',%0A 'pem_keys'%0A %5D%0A keys @@ -3728,24 +3728,37 @@ urrent_state +, ignore_list )%0A if
7ad0a248ab019c1c99080da5860ecba56f5a7654
switch to beautiful soup for extraction
ifind/common/position_content_extractor.py
ifind/common/position_content_extractor.py
#!/usr/bin/env python # -*- coding: latin-1 -*- __author__ = 'rose' from BeautifulSoup import BeautifulSoup from copy import deepcopy class PositionContentExtractor(object): def __init__(self, div_ids=None): self.div_ids = div_ids self.html = '' self.html_soup = None self.text = ...
Python
0
@@ -1370,121 +1370,8 @@ s%5D)%0A - # for term in :%0A # print term%0A # subtext += ' '.join(term)%0A @@ -1672,83 +1672,319 @@ urn: - a string with the divs content removed%0A %22%22%22%0A result = '' +None%0A %22%22%22%0A r...
157a5b7350928eab13170da7e0c06636ae1e9975
Add option to load instrumentation key from env
applicationinsights/flask/ext.py
applicationinsights/flask/ext.py
from applicationinsights import TelemetryClient from applicationinsights.channel import AsynchronousSender from applicationinsights.channel import AsynchronousQueue from applicationinsights.channel import TelemetryChannel from applicationinsights.logging import LoggingHandler from applicationinsights.requests import WS...
Python
0
@@ -1,28 +1,51 @@ +from os import getenv%0A%0A from applicationinsights imp @@ -1094,16 +1094,36 @@ ONF_KEY) + or getenv(CONF_KEY) %0A%0A
c93128f7491495c48951194831bebb46e9db54d5
fix urljoin import (#247)
aqua/datadog_checks/aqua/aqua.py
aqua/datadog_checks/aqua/aqua.py
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import requests import simplejson as json from six.moves.urllib.parse import urlparse from datadog_checks.checks import AgentCheck SEVERITIES = { 'total': 'all', 'high': 'high', 'medium': 'medium', ...
Python
0
@@ -180,21 +180,20 @@ port url -parse +join %0A%0Afrom d @@ -3265,17 +3265,8 @@ get( -urlparse. urlj @@ -3662,32 +3662,172 @@ -except Exception +# io-related exceptions (all those coming from requests are included in that) are handled.%0A # All other exceptions are raised.%0A except IOError ...
8483de37aad2256266deb404ce4d9eaae31a8142
Remove backend
kaggle-classification/keras_trainer/rnn.py
kaggle-classification/keras_trainer/rnn.py
"""RNN""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from keras.layers import Input, GRU, Dense, Embedding, Dropout, Bidirectional, TimeDistributed, Multiply, Flatten, Reshape, Dot from keras.models import Model from keras_trainer import base_model fro...
Python
0.000001
@@ -363,34 +363,8 @@ roc%0A -import keras.backend as K%0A %0A%0Acl
fa022cf128f16e97aad4670cbb87b9178744e0d8
Add unittest for page size=1 & page chunck size=1
kboard/core/tests/test_utils_pagination.py
kboard/core/tests/test_utils_pagination.py
from django.core.paginator import Paginator from django.test import TestCase from core.utils import get_pages_nav_info class TestUtilsPagiation(TestCase): def get_pages_nav_info(PAGE_SIZE, NAV_PAGE_CHUNK_SIZE, TEST_LOAD_PAGE, OBJS_SIZE): object_list = range(OBJS_SIZE) paginator = Paginator(objec...
Python
0
@@ -2115,28 +2115,992 @@ _nav_info%5B'next_nav_page'%5D)%0A +%0A def test_page_size_1_case(self):%0A page_nav_info = TestUtilsPagiation.get_pages_nav_info(PAGE_SIZE=1, NAV_PAGE_CHUNK_SIZE=5, TEST_LOAD_PAGE=8,%0A OBJS_SIZE=50)%0A%0A self.asse...
b1f0ade0c8f6ef2282b42ff43f67bc933308f319
Fix example script to only create one L2 if --l2cache and -nX are given as parameters.
configs/example/se.py
configs/example/se.py
# Copyright (c) 2006-2007 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 ...
Python
0
@@ -3803,16 +3803,189 @@ s.port%0A%0A +if options.l2cache:%0A system.l2 = L2Cache(size='2MB')%0A system.tol2bus = Bus()%0A system.l2.cpu_side = system.tol2bus.port%0A system.l2.mem_side = system.membus.port%0A%0A for i in @@ -4188,176 +4188,8 @@ he:%0A - system.l2 = L2Cache(size='2MB')%0A s...
1075b77abfbd04238a95c4b3e070c80fb141ab8b
Rename get_view() to get_view_method() for clarity.
incuna_test_utils/testcases/integration.py
incuna_test_utils/testcases/integration.py
from django.core.exceptions import ImproperlyConfigured from django.shortcuts import render from .request import BaseRequestTestCase class BaseIntegrationTestCase(BaseRequestTestCase): """ A TestCase that operates similarly to a Selenium test. Contains methods that access pages and render them to string...
Python
0
@@ -586,24 +586,31 @@ def get_view +_method (self):%0A @@ -1601,32 +1601,39 @@ ()%0A%0A view +_method = self.get_view @@ -1628,24 +1628,31 @@ elf.get_view +_method ()%0A r @@ -1661,24 +1661,31 @@ ponse = view +_method (request, *a
4bda6769c5e6a01e8a62b06ad310dc846fbc7cbf
fix an error handling bug I introduced
core/dbt/task/base.py
core/dbt/task/base.py
from abc import ABCMeta, abstractmethod import os import six from dbt.config import RuntimeConfig, Project from dbt.config.profile import read_profile, PROFILES_DIR from dbt import flags from dbt import tracking from dbt.logger import GLOBAL_LOGGER as logger import dbt.exceptions class NoneConfig(object): @clas...
Python
0.000002
@@ -1197,24 +1197,39 @@ except +dbt.exceptions. DbtProjectEr @@ -1561,16 +1561,31 @@ except +dbt.exceptions. DbtProfi
5a49379b349dc33f403cfdcfd6148dfa362512de
Raise NotImplementedError instead of NotImplemented
keystone/tests/unit/test_hacking_checks.py
keystone/tests/unit/test_hacking_checks.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.000005
@@ -1069,16 +1069,21 @@ lemented +Error ('subcla @@ -1100,16 +1100,53 @@ provide +'%0A ' a real i
b77fc9813908401c29fe9e8dc121a88a5299a4b7
fix parameters indication
corefunc/atlasbase.py
corefunc/atlasbase.py
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 et: import numpy as np import os import nibabel as nib from ATT.algorithm import roimethod from ATT.algorithm import tools from ATT.iofunc import iofiles class ImageCalculator(object): def __init__(self): ...
Python
0.000001
@@ -2215,16 +2215,25 @@ or 'std' + or 'max' %0A
7fd0ed0897ffedf117698502cdefac0436ac4f2c
remove MotechTab import
corehq/tabs/config.py
corehq/tabs/config.py
from corehq.apps.styleguide.tabs import SGExampleTab, SimpleCrispyFormSGExample, \ ControlsDemoSGExample from corehq.tabs.tabclasses import DashboardTab, ProjectReportsTab, ProjectInfoTab, SetupTab, \ ProjectDataTab, ApplicationsTab, CloudcareTab, MessagingTab, ProjectUsersTab, \ AdminTab, IndicatorAdminTab...
Python
0
@@ -386,19 +386,8 @@ sTab -, MotechTab %0A%0AME @@ -598,23 +598,8 @@ ab,%0A - MotechTab,%0A
0185a30a340fae956c0e5b9d9f354e56e2e2178a
update the wsgi file
crate_project/wsgi.py
crate_project/wsgi.py
import newrelic.agent newrelic.agent.initialize() import pinax.env from django.core.wsgi import get_wsgi_application # setup the environment for Django and Pinax pinax.env.setup_environ(__file__) # set application for WSGI processing application = get_wsgi_application()
Python
0
@@ -1,12 +1,117 @@ +import os%0Aimport sys%0A%0Asys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), %22apps%22)))%0A%0A import newre @@ -120,17 +120,16 @@ c.agent%0A -%0A newrelic @@ -153,26 +153,8 @@ ()%0A%0A -import pinax.env%0A%0A from @@ -202,127 +202,8 @@ tion -%0A%0A# setup the environme...
61a70e74becdc30009e8a2776594ee9f861bd824
fix os x job when workspace is empty
create_jenkins_job.py
create_jenkins_job.py
#!/usr/bin/env python3 # Copyright 2015 Open Source Robotics Foundation, 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 req...
Python
0.000013
@@ -2727,32 +2727,231 @@ type': 'Shell',%0A + # the current OS X slave can't handle git@github urls%0A 'ci_scripts_repository': args.ci_scripts_repository.replace(%0A 'git@github.com:', 'https://github.com/'),%0A %7D,%0A
a0fab69d12d64d4e5371fcb26a4ec70365a76fa6
Move task results database to data dir
cref/app/web/tasks.py
cref/app/web/tasks.py
from celery import Celery from cref.app.terminal import run_cref app = Celery( 'tasks', backend='db+sqlite:///results.sqlite', broker='amqp://guest@localhost//' ) @app.task def predict_structure(sequence, params={}): return run_cref(sequence)
Python
0.000004
@@ -113,16 +113,21 @@ lite:/// +data/ results.
6e287393ad87ad09f94f845d372b5835ad4ebaba
Increase plot range
examples/alpha250-4/adc-bram/test.py
examples/alpha250-4/adc-bram/test.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import os import time from adc_bram import AdcBram from koheron import connect import matplotlib matplotlib.use('TKAgg') from matplotlib import pyplot as plt from matplotlib.lines import Line2D host = os.getenv('HOST', '192.168.1.50') client = connect(...
Python
0.000001
@@ -1206,15 +1206,19 @@ ((-3 -00, 300 +2768, 32768 ))%0Aa
63b828983b38eb00e68683c19c51f444102a030d
support p3k on python file
plugin/vim_bootstrap_updater.py
plugin/vim_bootstrap_updater.py
import os import urllib import urllib2 def vimrc_path(editor): return os.path.expanduser('~/.%src' % editor) def _generate_vimrc(editor, langs): params = [('langs', l.strip()) for l in langs] params.append(('editor', editor)) data = urllib.urlencode(params) resp = urllib2.urlopen("https://vim-bo...
Python
0
@@ -7,36 +7,140 @@ os%0A -import urllib%0Aimport urllib2 +try:%0A import urllib2%0A import urllib%0Aexcept ImportError:%0A import urllib.request as urllib2%0A import urllib.parse as urllib %0A%0A%0Ad @@ -625,24 +625,40 @@ resp.read() +.decode('utf-8') %0A%0A%0Adef updat
cf67d625b60465e553b7aa88e78190ec38b213a8
Add back deleted test for external search
marvin/tests/test_tasks.py
marvin/tests/test_tasks.py
from marvin.models import Movie from marvin.tests import TestCaseWithTempDB from mock import Mock, patch class OMDBFetchTest(TestCaseWithTempDB): def setUp(self): # We can't import the tasks module until create_app has been called, # which is why we do it down here from marvin import task...
Python
0
@@ -441,16 +441,1718 @@ r_movie%0A + self.external_search = tasks.external_search%0A%0A%0A def test_query_omdb(self):%0A # Supply a mock of requests%0A attrs = %7B%0A 'json.return_value': %7B%0A u'Search': %5B%0A %7B%0A u'imdbI...
5851c7524e66cfe3ee7e59542224d097d6e01f9e
Remove 's' in path.
mojo/public/tools/download_archiecture_independent_frameworks.py
mojo/public/tools/download_archiecture_independent_frameworks.py
#!/usr/bin/env python # Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import os import sys CURRENT_PATH = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.join(CURREN...
Python
0.000005
@@ -1491,17 +1491,16 @@ ojo/file -s /%22 + ver
cd92705f02242b7f17bea75398cdb0eda8479254
add example to feature extraction documentation
laserchicken/feature_extractor/__init__.py
laserchicken/feature_extractor/__init__.py
"""Feature extractor module.""" import importlib import re import numpy as np from laserchicken import keys, utils from .eigenvals_feature_extractor import EigenValueFeatureExtractor from .entropy_feature_extractor import EntropyFeatureExtractor from .sigma_z_feature_extractor import SigmaZFeatureExtractor from .heig...
Python
0
@@ -1010,16 +1010,22 @@ sult as +point attribut @@ -1050,16 +1050,483 @@ cloud%0A%0A + Example:%0A %3E%3E%3E point_cloud = read_ply.read('data1.ply')%0A %3E%3E%3E target_point_cloud = read_ply.read('data2.ply')%0A %3E%3E%3E volume = volume_specification.InfiniteCylinder(4)%0A %3E%3E%3E neighborhood...
ff16e993beca5ff0aa490bb140a46e64d026a6c9
Fix task banner with 'actionable' callback when using templates in name (#38165)
lib/ansible/plugins/callback/actionable.py
lib/ansible/plugins/callback/actionable.py
# (c) 2015, Andrew Gaffney <andrew@agaffney.org> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' callba...
Python
0
@@ -713,16 +713,51 @@ on%0A'''%0A%0A +from ansible import constants as C%0A from ans @@ -834,16 +834,16 @@ default%0A - %0A%0Aclass @@ -1114,16 +1114,53 @@ = None%0A + self.last_task_banner = None%0A @@ -1429,16 +1429,76 @@ = task%0A + self.last_task_banner = self._get_task_banner(task)...
ce70c151a8cbc70526e125f829a1fafdf390e9a7
Make scalars is_active short circuit if apt (#621)
tensorboard/plugins/scalar/scalars_plugin.py
tensorboard/plugins/scalar/scalars_plugin.py
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0.000001
@@ -1879,20 +1879,15 @@ -return bool( +if not self @@ -1903,43 +1903,108 @@ exer -) and any(self.index_impl().values( +:%0A return False%0A%0A return bool(self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME ))%0A%0A
0fa9575141c522e9e30ee7b5cfc250e1a72f01c8
Fix off-by-one-bug in MAX_ATTEMPTS implementation
background_task/models.py
background_task/models.py
from django.db import models from django.db.models import Q from django.conf import settings from django.utils.encoding import python_2_unicode_compatible import django import inspect from django.utils import timezone from datetime import datetime, timedelta from hashlib import sha1 import traceback import logging f...
Python
0.000008
@@ -5409,16 +5409,43 @@ ceback)%0A + self.attempts += 1%0A @@ -5497,17 +5497,16 @@ S', 25)%0A -%0A @@ -5661,39 +5661,8 @@ se:%0A - self.attempts += 1%0A
900d872d4d1f8a593f25ac982e48ac86660955fd
Store name unique
bazaar/listings/models.py
bazaar/listings/models.py
from __future__ import unicode_literals from django.db import models from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible from ..fields import MoneyField from ..goods.models import Product @python_2_unicode_compatible class Listing(models.Model): title = models.CharFie...
Python
0.999952
@@ -761,24 +761,37 @@ x_length=100 +, unique=True )%0A url =
19df232461679b3156f9d5889d59f095e0b97d60
Add CAN_DETECT
bears/yml/RAMLLintBear.py
bears/yml/RAMLLintBear.py
from coalib.bearlib.abstractions.Linter import linter from coalib.bears.requirements.NpmRequirement import NpmRequirement @linter(executable='ramllint', output_format='regex', output_regex=r'(?P<severity>error|warning|info).*\n (?P<message>.+) ' r'\[(?P<origin>.+)\]') class RAMLL...
Python
0.998251
@@ -798,16 +798,58 @@ GPL-3.0' +%0A CAN_DETECT = %7B'Syntax', 'Formatting'%7D %0A%0A @s
d399f1910df7a14b9f2f36ef1d08cb7bdb839781
Revise to t_char_count_d and comments
lc0076_minimum_window_substring.py
lc0076_minimum_window_substring.py
"""Leetcode 76. Minimum Window Substring Hard URL: https://leetcode.com/problems/minimum-window-substring/ Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). Example: Input: S = "ADOBECODEBANC", T = "ABC" Output: "BANC" Note: - If there is no...
Python
0.000001
@@ -854,47 +854,8 @@ ct%0A%0A - s_len, t_len = len(s), len(t)%0A%0A @@ -884,23 +884,22 @@ ect +t's char - +-%3E coun -ts of t.%0A @@ -917,17 +917,18 @@ ar_count -s +_d = defau @@ -983,17 +983,18 @@ ar_count -s +_d %5Bc%5D += 1 @@ -1031,16 +1031,18 @@ en, and +t_ counter. @@ -1094,24 +1094...
4ccd5fff46c98c3927dc7e85f961dc7e75dba434
Fix temperature sampler loop termination condition:
examples/lm1b/temperature_sampler.py
examples/lm1b/temperature_sampler.py
# Copyright 2021 The Flax 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 wri...
Python
0.996778
@@ -2848,17 +2848,16 @@ d = (i %3C -= max_dec
9513011caa73cbfa4aec2b96070f482466dde490
Fix urlshorten output
plugins/internet/url.py
plugins/internet/url.py
# -*- coding: utf-8 -*- import bot from html.parser import HTMLParser class LinksParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.recording = 0 self.data = [] def handle_starttag(self, tag, attributes): if tag != 'title': return if se...
Python
0.999998
@@ -1987,18 +1987,21 @@ r - = +eturn http.re @@ -2109,16 +2109,23 @@ =params) +.read() %0A @@ -2169,30 +2169,8 @@ - r = error%0A @@ -2184,16 +2184,20 @@ return +erro r.read()
824a2a547218febf61aed8d99eff5ddeeaf6f5ca
Remove unused imports
polyaxon/libs/models.py
polyaxon/libs/models.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from django.core.validators import validate_slug from django.db import models from django.core.cache import cache from libs.blacklist import validate_blacklist_name class DescribableModel(models.Model): description = models...
Python
0.000001
@@ -87,57 +87,8 @@ on%0A%0A -from django.core.validators import validate_slug%0A from @@ -153,60 +153,8 @@ he%0A%0A -from libs.blacklist import validate_blacklist_name%0A%0A %0Acla
814cc6cef757c3eef775240c749a098b1288eef3
Enable searching for an image in the admin
pombola/images/admin.py
pombola/images/admin.py
from django.contrib import admin from django.contrib.contenttypes.generic import GenericTabularInline from sorl.thumbnail import get_thumbnail from sorl.thumbnail.admin import AdminImageMixin from pombola.images import models class ImageAdmin(AdminImageMixin, admin.ModelAdmin): list_display = [ 'thumbnail',...
Python
0
@@ -358,16 +358,75 @@ rce', %5D +%0A search_fields = %5B'person__legal_name', 'id', 'source'%5D %0A%0A de
c99d5d30a698aafe3e554c48c9a47dd8be1a5575
Use imap instead of map
library.py
library.py
import json import logging import os import subprocess import urllib import grequests import numpy logging.basicConfig() logger = logging.getLogger("recheck") logger.setLevel(logging.DEBUG) def get_change_ids(repo_path, subtree=None, since="6.months"): """Return array of change-Ids of merged patches. retur...
Python
0
@@ -1459,16 +1459,17 @@ equests. +i map(unse
b0f5913d5f775062b8d5e253e1403b995b67c81a
Bump to version 3.2.0
post_office/__init__.py
post_office/__init__.py
VERSION = (3, 2, 0, 'dev') from .backends import EmailBackend default_app_config = 'post_office.apps.PostOfficeConfig'
Python
0
@@ -15,15 +15,8 @@ 2, 0 -, 'dev' )%0A%0Af
f776c3f05a30375d1082c8b2ff1c346822777c0c
debug output slipped through
pprof/utils/compiler.py
pprof/utils/compiler.py
from pprof.settings import config def lt_clang(cflags, ldflags, func=None): """Return a clang that hides :cflags: and :ldflags: from reordering of libtool. This will generate a wrapper script in :p:'s builddir and return a path to it. :cflags: the cflags libtool is not allowed to see. :ldfla...
Python
0.000055
@@ -3377,44 +3377,8 @@ )):%0A - print %22Fun: %7B%7B%7D%7D%22.format(f)%0A
f28732596487a2a0fc664c5444e618ce5c23eccd
fix usage
bin/extract_darkmatter.py
bin/extract_darkmatter.py
#!/usr/bin/env python import argparse import leveldb import os import shutil import sys from Bio import SeqIO def main(args): parser = argparse.ArgumentParser(description="Script to extract darkmatter - predicted proteins with no similarities") parser.add_argument("-i", "--input", help="Name of input genecall...
Python
0.000002
@@ -280,24 +280,38 @@ , %22--input%22, + dest=%22input%22, help=%22Name @@ -379,24 +379,39 @@ %22--output%22, + dest=%22output%22, help=%22Name @@ -495,13 +495,12 @@ st=%22 -cfile +sims %22, h
f93e23db1d5cedbdc75ef6b412f52f8b3800a270
use more versatile valueByTag mechanism
applications/plugins/RigidScale/python/RigidScale/sml.py
applications/plugins/RigidScale/python/RigidScale/sml.py
import Sofa import RigidScale.API import SofaPython.sml import Compliant.StructuralAPI import Compliant.sml printLog = True def insertRigidScale(parentNode, solidModel, param): """ create a RigidScale.API.ShearlessAffineBody from the solidModel """ if printLog: Sofa.msg_info("RigidScale.sml", "ins...
Python
0
@@ -2221,95 +2221,8 @@ ion%0A - self.param.jointIsCompliance = False%0A self.param.jointCompliance = 1e-6%0A @@ -2273,16 +2273,16 @@ SI unit%0A + @@ -2370,16 +2370,17 @@ the tag%0A +%0A @@ -2444,38 +2444,153 @@ am.joint -ComplianceByTag=dict() +IsComplianceByTag%5B%22default%...
a5857bc5b019dda8baca03bd68f08b4a26a85911
add import module in init file.
biokit/rtools/__init__.py
biokit/rtools/__init__.py
Python
0
@@ -0,0 +1,22 @@ +from .rtools import *%0A
5ac8d6824a53c05ac233c9dcaf7d39171bafed31
add params to the grid
fedoracommunity/mokshaapps/demos/controllers/root.py
fedoracommunity/mokshaapps/demos/controllers/root.py
# This file is part of Fedora Community. # Copyright (C) 2008-2009 Red Hat, 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 Foundation, either version 3 of the # License, or (at your option) ...
Python
0.000001
@@ -2688,16 +2688,46 @@ params=%5B +'orbited_port', 'orbited_host' %5D%0A re @@ -2757,24 +2757,75 @@ e_path=None%0A + orbited_port=9000%0A orbited_host='localhost'%0A %0Atimepin
ca856016d54e4ca19c9b6701f2a4f1061bfb2fda
Wrong column name
printer_tray/printer.py
printer_tray/printer.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
Python
0.890483
@@ -3229,24 +3229,32 @@ and action. +printer_ tray_id:%0A
1a2f3f74a398422fe70d6b482cdd779f728e9a21
add 'continue' lines, change print to logging
scripts/migrations/034-update_subscriptions_ticket_and_mr_titles.py
scripts/migrations/034-update_subscriptions_ticket_and_mr_titles.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 (t...
Python
0.000001
@@ -1341,38 +1341,41 @@ tle)).all()%0A -print +log.info( 'Found total %25d @@ -1401,26 +1401,25 @@ (tickets).' - %25 +, len(subs_ti @@ -1416,32 +1416,33 @@ en(subs_tickets) +) %0A for sub in @@ -1455,16 +1455,131 @@ ickets:%0A + if not sub.artifact_index_id:%0A log.info('No artifact...
94a07652c23f55a20f856550a1ceed549b6b8cd7
Updated the expected matching strings.
test/global_variables/TestGlobalVariables.py
test/global_variables/TestGlobalVariables.py
"""Show global variables and check that they do indeed have global scopes.""" import os, time import unittest2 import lldb from lldbtest import * class GlobalVariablesTestCase(TestBase): mydir = "global_variables" @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin") def test_with_...
Python
0.999999
@@ -1581,16 +1581,19 @@ able -s +-g -a%22, VAR @@ -1643,32 +1643,47 @@ strs = %5B'GLOBAL: + (char const *) g_file_static_c @@ -1758,32 +1758,38 @@ 'GLOBAL: + (int) g_file_global_i @@ -1794,40 +1794,10 @@ _int -',%0A '(int) + = 42' @@ -1829,16 +1829,31 @@ 'GLOBAL: + (char cons...
8a9a5abe6bd8ab97b3f8f7d879c229ae34dd27a1
add some doc string in tools/math.py
abel/tools/math.py
abel/tools/math.py
# -*- coding: utf-8 -*- # Copyright CNRS 2012 # Roman Yurchak (LULI) # This software is governed by the CeCILL-B license under French law and # abiding by the rules of distribution of free software. import numpy as np from scipy.linalg import circulant from scipy.optimize import curve_fit, brentq from scipy.interpolat...
Python
0.000005
@@ -2064,184 +2064,804 @@ -%22%22%22%0A return a * np.exp(-((x - mu) ** 2) / 2 / sigma ** 2) + c%0A%0A%0Adef guss_gaussian(x):%0A %22%22%22%0A Find a set of better starting parameters for Gaussian function fitting%0A +ref: https://en.wikipedia.org/wiki/Gaussian_function%0A%0A Parameters%0A ----...
8599480ed93a0117f326689280c7a896d6bf697a
add version 3.1-4 to r-bayesm (#20807)
var/spack/repos/builtin/packages/r-bayesm/package.py
var/spack/repos/builtin/packages/r-bayesm/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RBayesm(RPackage): """Bayesian Inference for Marketing/Micro-Econometrics""" homepage...
Python
0
@@ -296,16 +296,1438 @@ ometrics +%0A%0A Covers many important models used in marketing and micro-econometrics%0A applications. The package includes: Bayes Regression (univariate or%0A multivariate dep var), Bayes Seemingly Unrelated Regression (SUR), Binary%0A and Ordinal Probit, Multinomial Logit (MNL) ...
52e0f47a3ff67bd0c8a31c6755b384dedd70ee02
update scalasca to latest version, simplify recipe (#11999)
var/spack/repos/builtin/packages/scalasca/package.py
var/spack/repos/builtin/packages/scalasca/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Scalasca(AutotoolsPackage): """Scalasca is a software tool that supports the performance ...
Python
0
@@ -745,16 +745,186 @@ tar.gz%22%0A + list_url = %22https://scalasca.org/scalasca/front_content.php?idart=1072%22%0A%0A version('2.5', sha256='7dfa01e383bfb8a4fd3771c9ea98ff43772e415009d9f3c5f63b9e05f2dde0f6') %0A ver @@ -1217,16 +1217,17 @@ sion 2.4 ++ %0A dep @@ -1259,24 +1259,84 @@ n='@2.4:')%0A%0A ...
8ffe530025e38d06ffc567fb69e9b96874db3faa
Increase version
conveyor/__init__.py
conveyor/__init__.py
__version__ = "0.1.dev2"
Python
0
@@ -19,7 +19,7 @@ .dev -2 +3 %22%0A
922c3c7b708948fd5ded332ff2999e732c0bf5d8
test that alias is used
test/unit/keywords/test_browsermanagement.py
test/unit/keywords/test_browsermanagement.py
import unittest from Selenium2Library.keywords._browsermanagement import _BrowserManagementKeywords from selenium import webdriver from mockito import * class BrowserManagementTests(unittest.TestCase): def test_create_firefox_browser(self): test_browsers = ((webdriver.Firefox, "ff"), (webdriver.Fire...
Python
0
@@ -3851,16 +3851,24 @@ Driver', + 'fake', some_ar @@ -4092,16 +4092,104 @@ index))%0A + self.assertEquals(capt_data%5B'webdriver'%5D, bm._cache.get_connection('fake'))%0A
ce537832eb3d1c0a7ceec213abe1d52c189037c2
fix a bug in the controller of new courses
course_controller.py
course_controller.py
import os import urllib from google.appengine.api import users from google.appengine.ext import ndb import jinja2 import webapp2 import main_controller import app.models.course_model as coursemodel JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), extensions=...
Python
0
@@ -1252,16 +1252,36 @@ .render( +self.template_values ))%0A%0A
82bfb1da1d9b03699bee0dbf556dbf51d779022f
fix error
pywt/tests/test_matlab_compatibility_cwt.py
pywt/tests/test_matlab_compatibility_cwt.py
""" Test used to verify PyWavelets Continous Wavelet Transform computation accuracy against MathWorks Wavelet Toolbox. """ from __future__ import division, print_function, absolute_import import os import numpy as np from numpy.testing import assert_, dec, run_module_suite import pywt if 'PYWT_XSLOW' in os.environ:...
Python
0.000002
@@ -2833,38 +2833,46 @@ for scales in -S +_get_s cales +(w) :%0A @@ -3837,22 +3837,30 @@ ales in -S +_get_s cales +(w) :%0A
20d5f5d5e10dcf118639b4ca538ef7537863145a
add cache 2 hours
dv_apps/dvobject_api/views_dataverses.py
dv_apps/dvobject_api/views_dataverses.py
import json from collections import OrderedDict from django.shortcuts import render from django.http import Http404 from django.conf import settings from django.http import JsonResponse, HttpResponse from django.template.loader import render_to_string from django.forms.models import model_to_dict from django.views.de...
Python
0
@@ -659,16 +659,41 @@ False%0A%0A +@cache_page(60 * 60 * 2)%0A def view @@ -926,16 +926,41 @@ t, dv)%0A%0A +@cache_page(60 * 60 * 2)%0A def view
4e515f070f844569b84eeb77f7e7eda883bc861e
fix class name
easy_my_coop/wizard/update_share_line.py
easy_my_coop/wizard/update_share_line.py
# -*- coding: utf-8 -*- from openerp import api, fields, models, _ from openerp.exceptions import UserError class PartnerUpdateInfo(models.TransientModel): _name = "share.line.update.info" @api.model def _get_share_line(self): active_id = self.env.context.get('active_id') return self.env...
Python
0.000051
@@ -114,15 +114,17 @@ ass -Part +ShareLi ne -r Upda
81cea197e6c8b50a9b2083708962ce167cb529fd
Change database api to deny the deletion of a database in quarantine
dbaas/api/database.py
dbaas/api/database.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from rest_framework import viewsets, serializers, status from rest_framework.response import Response from logical import models from physical.models import Plan, Environment, DatabaseInfra from account.models import Team from .credential ...
Python
0
@@ -659,32 +659,55 @@ set=Plan.objects +.filter(is_active=True) )%0A environmen @@ -4607,8 +4607,324 @@ EQUEST)%0A +%0A def destroy(self, request, *args, **kwargs):%0A instance = self.get_object()%0A%0A if not instance.is_in_quarantine:%0A self.perform_destroy(instance)%0A r...
38db4b0a23e2c2aaf858d0b2bd9d5ae4df819e66
Move imports in mythicbeastsdns component (#28033)
homeassistant/components/mythicbeastsdns/__init__.py
homeassistant/components/mythicbeastsdns/__init__.py
"""Support for Mythic Beasts Dynamic DNS service.""" import logging from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.const import ( CONF_DOMAIN, CONF_HOST, CONF_PASSWORD, CONF_SCAN_INTERVAL, ) from homeassistant.helpers.aio...
Python
0
@@ -50,23 +50,8 @@ %22%22%22%0A -import logging%0A from @@ -81,87 +81,63 @@ lta%0A -%0A import -voluptuous as vol%0A%0Aimport homeassistant.helpers.config_validation as cv +logging%0A%0Aimport mbddns%0Aimport voluptuous as vol%0A %0Afro @@ -317,16 +317,69 @@ session%0A +import homeassistant.helpers.config_valida...
5616573372638f2b195714cf02db8a7a02a4678f
Correct column name
luigi/tasks/rfam/pgload_go_term_mapping.py
luigi/tasks/rfam/pgload_go_term_mapping.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 requir...
Python
0
@@ -982,20 +982,29 @@ id,%0A -name +rfam_model_id %0A)%0ASET%0A
1f3325519a72cb98669185149b03b11c1ec25f70
Fix line number convention
bears/c_languages/CPPLintBear.py
bears/c_languages/CPPLintBear.py
import sys from coalib.bearlib.abstractions.Linter import linter from dependency_management.requirements.PipRequirement import PipRequirement from coalib.settings.Setting import typed_list @linter(executable='cpplint', use_stdout=False, use_stderr=True, output_format='regex', output_r...
Python
0
@@ -215,16 +215,53 @@ plint',%0A + normalize_line_numbers=True,%0A
6ded4b8d29788c420197fca0ae9552bb4b964ad7
Update acute_vertex.py
plantcv/plantcv/acute_vertex.py
plantcv/plantcv/acute_vertex.py
# Script to identify corners/acute angles of an object import os import cv2 import numpy as np import math from plantcv.plantcv import print_image from plantcv.plantcv import plot_image from plantcv.plantcv import params from plantcv.plantcv import outputs def acute_vertex(img, obj, win, thresh, sep): """acute_v...
Python
0.000001
@@ -296,16 +296,28 @@ esh, sep +, label=None ):%0A %22 @@ -1037,16 +1037,108 @@ e value%0A + label = optional label parameter, modifies the variable name of observations recorded%0A%0A %0A Ret @@ -1326,24 +1326,46 @@ am sep: int%0A + :param label: str%0A :return @@ -3572,16 +3572,98 @@ ), -1)%0...
58c6868cc95a44100f18f20dfe91764727263005
Write bytes to fobj if we open it in 'wb' mode
django_babel/management/commands/babel.py
django_babel/management/commands/babel.py
# -*- coding: utf-8 -*- import os from distutils.dist import Distribution from optparse import make_option from subprocess import call from django.core.management.base import LabelCommand, CommandError from django.conf import settings class Command(LabelCommand): args = '[makemessages] [compilemessages]' o...
Python
0.000001
@@ -2401,32 +2401,33 @@ fobj.write( +b '')%0A%0A @@ -3128,16 +3128,17 @@ j.write( +b '')%0A%0A
57574cc20092f661ad5b7f4a47de63e16b72db50
Upgrade to 1.9
accounts/models.py
accounts/models.py
from __future__ import unicode_literals import logging from django.utils import timezone from django.utils.translation import ugettext_lazy as _ import django.core.mail import django.contrib.auth.models import django.db.models import django.db.models.signals import django.utils.timezone import django.core.validators ...
Python
0.00004
@@ -3633,16 +3633,53 @@ ll=True, + on_delete=django.db.models.SET_NULL, related
99e0b2e29ec5baa525dce54a3bfcf69710f5a59b
Fix UserProfile creation
accounts/models.py
accounts/models.py
from django.conf import settings from django.db import transaction from django.db.models.signals import post_save from django.contrib.sites.models import RequestSite from django.contrib.auth.models import User from django.db import models from registration import models as regmodels from registration.signals i...
Python
0.000006
@@ -2449,16 +2449,30 @@ nstance, + user_created, **kwarg @@ -2560,24 +2560,50 @@ .%0D%0A %22%22%22%0D%0A + if user_created:%0D%0A UserProf @@ -2618,15 +2618,8 @@ cts. -get_or_ crea
df7e5f56fdb2a9bc34a0fdf62b5847ee4183d32e
Update import_gist.py
lib/import_gist/bin/import_gist.py
lib/import_gist/bin/import_gist.py
#!/usr/bin/env python # -*- coding: utf-8 -*- def import_gist(url_gist): ''' import custom functions from gist.github.com usage: mod_name = import_gist(url_gist) params: url_gist: url of gist. be sure to append '/raw/' to the gist url to load script, not html e.g. https://gist.githubuser...
Python
0.000001
@@ -415,16 +415,42 @@ empfile%0A + import urllib.request%0A fnam
7ef1afc579c62fa0c713d8db0bf17eb09b498a0b
Add unittest for random_integers
tests/cupy_tests/random_tests/test_sample.py
tests/cupy_tests/random_tests/test_sample.py
import mock import unittest from cupy import cuda from cupy import testing from cupy import random @testing.gpu class TestRandint(unittest.TestCase): _multiprocess_can_split_ = True def setUp(self): device_id = cuda.Device().id self.m = mock.Mock() self.m.interval.return_value = 0 ...
Python
0.000013
@@ -986,8 +986,586 @@ , 3))%0A%0A%0A +@testing.gpu%0Aclass TestRandomIntegers(unittest.TestCase):%0A%0A _multiprocess_can_split_ = True%0A%0A def setUp(self):%0A random.sample_.randint = mock.Mock()%0A%0A def test_normal(self):%0A random.random_integers(3, 5)%0A random.sample_.randint.ass...
5aa2a3e4b724784bbedaa5a436893e5ce28f7c45
Bump version to 0.2.3
fluentcms_emailtemplates/__init__.py
fluentcms_emailtemplates/__init__.py
# following PEP 440 __version__ = "0.2.2"
Python
0.000001
@@ -32,11 +32,11 @@ = %220.2. -2 +3 %22%0A
eda0e5d60ca30a284c0b6b4fc209e595b5484941
Fix _import_from() on Python 2
dev/_import.py
dev/_import.py
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import imp import sys import os from . import build_root, package_name, package_root if sys.version_info < (3,): getcwd = os.getcwdu else: getcwd = os.getcwd def _import_from(mod, path, mod_dir=None, allow_er...
Python
0.997305
@@ -1106,24 +1106,145 @@ eturn None%0A%0A + if os.sep in mod_dir:%0A append, mod_dir = mod_dir.rsplit(os.sep, 1)%0A path = os.path.join(path, append)%0A%0A try:%0A
eb4714f64a906c7261ab937d709506650c31023e
remove print debug
intervention_report_analysis/report/status_webkit.py
intervention_report_analysis/report/status_webkit.py
# -*- coding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
Python
0.000009
@@ -3975,29 +3975,8 @@ '''%0A - print header%0A
64ae848095215715ea7448c517011d64403dee85
Remove useless import
geotrek/api/mobile/views/trekking.py
geotrek/api/mobile/views/trekking.py
from __future__ import unicode_literals from django.conf import settings from django.db.models import F from rest_framework_extensions.mixins import DetailSerializerMixin from geotrek.api.mobile.serializers import trekking as api_serializers from geotrek.api.mobile import viewsets as api_viewsets from geotrek.api.v2...
Python
0.000004
@@ -103,76 +103,8 @@ F%0A%0A -from rest_framework_extensions.mixins import DetailSerializerMixin%0A%0A from