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
47fc9784b76f2389ae4392450d67bb4affa96536
Fix header comment
tests/whitebox/_misc.py
tests/whitebox/_misc.py
# Copyright 2016 Red Hat, 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
@@ -1427,20 +1427,23 @@ the -Rust service +stratisd daemon .%0A
1540fb09fbb26430dccd405d685b6ce0feb0e62c
Fix deletion of marketplaces by superusers
src/wirecloud/platform/markets/views.py
src/wirecloud/platform/markets/views.py
# -*- coding: utf-8 -*- # Copyright 2012 Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or #...
Python
0.000295
@@ -3544,147 +3544,8 @@ ()%0A%0A - if user != request.user.username:%0A get_object_or_404(Market, user=request.user, name=market).delete()%0A else:%0A
2a40ff77cc16be1c3327a4b12c6dd3a592375346
Add bootstrapped theme
project/settings/base.py
project/settings/base.py
import os import dj_database_url from django.core.exceptions import ImproperlyConfigured from django.contrib.messages import constants as message_constants def get_env_variable(var_name): """Get the environment variable or return exception""" try: var = os.environ[var_name] # Replace unix str...
Python
0
@@ -4578,24 +4578,57 @@ aticfiles',%0A + 'django_admin_bootstrapped',%0A 'django.
b4eb149099b64bcfccc8a8f2fd0c5008c74a4fe0
move write() out of the scope of an IOError catch clause not meant for it
oonib/deck/handlers.py
oonib/deck/handlers.py
import glob import json import os import re import yaml from oonib import errors as e from oonib.handlers import OONIBHandler from oonib import log from oonib.config import config class DeckDescHandler(OONIBHandler): def get(self, deckID): # note: # we don't have to sanitize deckID, because it's a...
Python
0
@@ -722,42 +722,8 @@ %5Bk%5D%0A - self.write(response)%0A%0A @@ -738,24 +738,24 @@ pt IOError:%0A + @@ -822,17 +822,16 @@ ingDeck%0A -%0A @@ -902,32 +902,32 @@ eys!%22 %25 deckID)%0A - rais @@ -947,16 +947,46 @@ ckKeys%0A%0A + self.write(response)%0A%0A ...
6264f58bdbe7c25132a0153713b97749a5809828
Version display should work even if git not installed
storage_service/administration/views.py
storage_service/administration/views.py
import subprocess from django.contrib import messages from django.contrib.auth import get_user_model from django.contrib.auth.forms import SetPasswordForm from django.shortcuts import render, redirect, get_object_or_404 from tastypie.models import ApiKey from common import utils from storage_service import __version_...
Python
0.000001
@@ -1258,16 +1258,26 @@ except + (OSError, subproc @@ -1298,16 +1298,17 @@ essError +) :%0A
fd456d55ceb4cd084c9ca754771c7b12235dcb5e
reset key
s.py
s.py
#encoding: utf-8 import os from apscheduler.schedulers.blocking import BlockingScheduler import requests MAILGUN_KEY = os.environ.get('MAILGUN_KEY') sched = BlockingScheduler() @sched.scheduled_job('cron', day_of_week='mon-fri', hour=12) def add_egg(): print(send_mail(get_text(get_price()))) @sched.schedul...
Python
0.000003
@@ -472,25 +472,25 @@ = _calc_los -e +t _money(float @@ -738,25 +738,25 @@ ef _calc_los -e +t _money(x):%0A
c81ecba98638666c19659832aa197a4d1f0c79f1
Change filter-thread-sanitizer-output.py python script printing settings to print full trace on skip
tools/filter-thread-sanitizer-output.py
tools/filter-thread-sanitizer-output.py
""" You can pipe clang-thread-sanitizer output to this program, and it'll filter it, removig false positives indicated in the blacklist file below You run neblio-qt with, as an example: neblio-qt --noquicksync 2<&1 | python tools/filter-thread-sanitizer-output.py | tee output.txt """ import sys import os import fnmatc...
Python
0
@@ -2085,13 +2085,10 @@ ing -after +on mat @@ -2130,16 +2130,21 @@ %22 + str( +orig_ data_que
d83e0a34161d3783c12a271608c81780dd6f14dd
fix path to 'kmip_server' module
kmip/tests/integration/utils/server.py
kmip/tests/integration/utils/server.py
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory # 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/LICEN...
Python
0.000007
@@ -761,16 +761,23 @@ ervices. +server. kmip_ser
0b4bd61d4e89618bd4950aca8fa1f5e154104297
Remove unused import
cli/main.py
cli/main.py
#! /usr/bin/python import sys import readline import argparse from cli.built_in_commands import BuildInCommand from cli.commands import CommandList from cli.crypto import KeyPair from cli.exception import CliException from cli.network import generateTransaction, sendTx import cli.file_io as file_io import cli.comple...
Python
0.000001
@@ -28,25 +28,8 @@ sys%0A -import readline%0A%0A impo @@ -40,16 +40,16 @@ rgparse%0A + %0Afrom cl @@ -162,47 +162,8 @@ air%0A -from cli.exception import CliException%0A from @@ -243,150 +243,8 @@ e_io -%0Aimport cli.completer as completer%0Afrom cliff.app import App%0Afrom cliff.commandmanager import CommandMana...
5687a00e4ec24b78e41b0377bfe524d7f0b13a43
Allow three_pid_creds as well as threePidCreds in /account/3pid
synapse/rest/client/v2_alpha/account.py
synapse/rest/client/v2_alpha/account.py
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # 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.000012
@@ -3975,38 +3975,149 @@ -if 'threePidCreds' not in body +threePidCreds = body.get('threePidCreds')%0A threePidCreds = body.get('three_pid_creds', threePidCreds)%0A if threePidCreds is None :%0A @@ -4191,54 +4191,8 @@ RAM) -%0A threePidCreds = body%5B'threePidCreds'%5D %0A%0A
c3fb87846d1f1a38fe2e37521464dea59832ff6c
remove unused import from distutils
pywt/__init__.py
pywt/__init__.py
# flake8: noqa # Copyright (c) 2006-2012 Filip Wasilewski <http://en.ig.ma/> # Copyright (c) 2012-2016 The PyWavelets Developers # <https://github.com/PyWavelets/pywt> # See COPYING for license details. """ Discrete forward and inverse wavelet transform, stationary wavelet transform, wavelet p...
Python
0
@@ -441,51 +441,8 @@ port -%0Afrom distutils.version import LooseVersion %0A%0Afr
009c982fe796a9b31fda226cd9304afb1cdb8c38
consolidate update* functions
clusters.py
clusters.py
import numpy as np import pandas as pd from astropy.cosmology import Planck13 as cosmo from astropy import units import sys sys.path.insert(1,'/Users/jesford/astrophysics/cofm') #temporary path adjust from cofm import c_DuttonMaccio try: from IPython.display import display notebook_display = True except: ...
Python
0
@@ -1485,32 +1485,22 @@ lf._ -update_depends_on_richne +richness_to_ma ss() @@ -1634,109 +1634,359 @@ .%22)%0A +%0A - %0A def _update_depends_on_richness(self):%0A self._richness_to_mass()%0A +def _richness_to_mass(self):%0A %22%22%22Calculate M_200 for simple power-law scal...
e0f6f8af00e17a29fe43906fd4861e6a4f2d7cec
Fix byte code for ifs without elses
visitor.py
visitor.py
from .ast import * from .invoke import S from itertools import count tagger = lambda x=count(): next(x) def fixtags(t): return list(fixtags_(t)) def fixtags_(t): reg = {} i = 0 for x in t: if x[0] == 'label': reg[x[1]] = i else: i += 1 for x in t: fx...
Python
0.005679
@@ -1990,46 +1990,8 @@ dy)%0A - if self.elsebody is not None:%0A @@ -2005,20 +2005,16 @@ agger()%0A - yiel @@ -2074,31 +2074,62 @@ elsebody is -not Non +None:%0A yield from Nil()%0A els e:%0A y @@ -2165,20 +2165,16 @@ sebody)%0A - yiel @@ -2193,43 +2193,8 @@ end) -...
dafd492d7a91d8001b7ae2a1bddc2f0e18466c2c
Allow for chosing quotes
quotes/quotes.py
quotes/quotes.py
import discord from random import choice as randchoice from redbot.core import commands, checks, Config, bot from redbot.core.utils.chat_formatting import box, humanize_list from redbot.core.utils.menus import menu, DEFAULT_CONTROLS # https://red-discordbot.readthedocs.io/en/latest/framework_utils.html # https://githu...
Python
0
@@ -997,29 +997,320 @@ -if quote_list != %5B%5D:%0A +arguments = ctx.message.split(%22 %22)%0A%0A if quote_list != %5B%5D:%0A if len(arguments) %3E 1:%0A try:%0A quote_pos = int(arguments%5B1%5D)%0A await ctx.send(box(f%22%7Bquote_list%5Bquote...
730dc123e20a774ea0355400ac9ec0b5d286b7c6
Change minimal value for ai time
cmd_line.py
cmd_line.py
#! /usr/bin/env python # title :non_gui.py # description :Runs a cmd-line version of Reversi # author :andresthor # date :05-02-2017 # usage :python non_gui.py # python_version :3.5.2 # ============================================================================= from rever...
Python
0
@@ -35,23 +35,24 @@ : -non_gui +cmd_line .py%0A# de @@ -3388,11 +3388,11 @@ ) %3C -0.5 +1.0 ):%0A
e65295f1c9b7ac3ac1fa6583fdbd69fd651c5662
Fix ReplaceInstance constructor
touchdown/aws/ec2/auto_scaling_group.py
touchdown/aws/ec2/auto_scaling_group.py
# Copyright 2014-2015 Isotoma 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 wr...
Python
0.000001
@@ -3281,16 +3281,8 @@ elf, - runner, tar @@ -3350,16 +3350,8 @@ t__( -runner, targ
a25c0cce29c7e2c05f0d0036cf1b7b1a67d2ccf0
Fix : Store one keyword as an array when Image (IPTC metadata) parser is used [SDESK-6566] (#2372)
superdesk/io/feed_parsers/image_iptc.py
superdesk/io/feed_parsers/image_iptc.py
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013 - 2018 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import arro...
Python
0
@@ -4214,16 +4214,139 @@ ontinue%0A +%0A # SDESK-6566%0A if isinstance(item.get(%22keywords%22), str):%0A item%5B%22keywords%22%5D = %5Bitem%5B%22keywords%22%5D%5D%0A%0A
b82f21ea92aad44ca101744a3f5300280f081524
Fix site when logged in
sweettooth/review/context_processors.py
sweettooth/review/context_processors.py
from extensions.models import ExtensionVersion def n_unreviewed_extensions(request): if not request.user.has_perm("review.can-review-extensions"): return dict() return dict(n_unreviewed_extensions=ExtensionVersion.unreviewed().count())
Python
0
@@ -226,16 +226,24 @@ Version. +objects. unreview
7d5cc169387ec97d79fa2f2a0c59fed40c888638
change the internal name of tests to descriptively show maximum number of retries
conftest.py
conftest.py
from collections import namedtuple, OrderedDict import glob import logging import os import re import yaml import pytest Scenario = namedtuple("Scenario", ["path", "qmin", "config"]) def ordered_load(stream, Loader=yaml.Loader, object_pairs_hook=OrderedDict): """Make YaML load to OrderedDict. This is done ...
Python
0
@@ -5039,19 +5039,49 @@ s%5D, ids= -str +lambda id: %22max-retries-%22+str(id) )%0A%0A%0Adef
cb93088cb6a3f7522838fb74f133f5598c76897f
Fix multiline magic
tensorflow/tools/compatibility/ipynb.py
tensorflow/tools/compatibility/ipynb.py
# Copyright 2019 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.000002
@@ -5010,35 +5010,27 @@ if -cell%5B%22cell_type%22%5D != %22code%22 +not is_python(cell) :%0A
898016cbde52392d6e85156f8e7f7084698475f1
Fix API change in make_test_data.py
tools/make_test_data.py
tools/make_test_data.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright © 2012 New Dream Network, LLC (DreamHost) # # Author: Doug Hellmann <doug.hellmann@dreamhost.com> # # 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 o...
Python
0.000008
@@ -3785,16 +3785,42 @@ ounter(c +, cfg.CONF.metering_secret )%0A
885c4e4ae1a0cebc6cc08affeabf7232870307c0
Add station and line as optional variables
web/app.py
web/app.py
import os from flask import Flask from flask import render_template from helpers.tube import line_status, station_open from helpers.metoffice import get_forcast app = Flask(__name__) app.debug = True def get_value(): result = 100 forcast = get_forcast() print "Feels Like Temperature: %s" % forcast['...
Python
0
@@ -61,16 +61,42 @@ emplate%0A +from flask import request%0A from hel @@ -234,16 +234,29 @@ t_value( +station, line ):%0A r @@ -297,20 +297,16 @@ rcast()%0A - %0A pri @@ -427,20 +427,16 @@ r Type'%5D - %0A pri @@ -525,24 +525,14 @@ tus( -'Victoria')%0A +line)%0A %0A @@ -923,24 +923,16 ...
c8b051020d2bbab75b0e15bfdca2ad7a20d1af71
rename attr TableColumns.cols to .names.
db.py
db.py
import sqlite3 from consts import DB_NAME from common import AttrDict from schema import TABLE_SCHEMAS from verbosity import verbose, set_verbosity g_conn = None g_table_info = AttrDict() # {tname: TableColumns()} class TableColumns(object): def __init__(self, *args, sep='|'): self._sep = sep ...
Python
0
@@ -392,19 +392,20 @@ in(self. -col +name s)%0A%0A @@ -550,19 +550,20 @@ def -col +name s(self): @@ -2589,19 +2589,20 @@ o.tasks. -col +name s, value
13ab494e0caaca6a460a49528c3aae4c7707042a
add a bit more docstring
pyecharts/custom/page.py
pyecharts/custom/page.py
#!/usr/bin/env python # coding=utf-8 from pyecharts import template class Page(object): def __init__(self): self.__charts = [] def add(self, achart_or_charts): """ :param achart_or_charts: :return: """ if isinstance(achart_or_charts, list): self....
Python
0
@@ -177,32 +177,78 @@ ts):%0A %22%22%22 +%0A Append chart(s) to the rendering page %0A%0A :param @@ -504,32 +504,79 @@ l%22):%0A %22%22%22 +%0A Produce rendered charts in a html file %0A%0A :param @@ -932,32 +932,32 @@ er_embed(self):%0A - %22%22%22%0A%0A @@ -9...
353c09e221483929075d5673b6ac3f705754caaf
Add --version option
pyinstrument/__main__.py
pyinstrument/__main__.py
import sys, os, codecs, runpy, tempfile from optparse import OptionParser from pyinstrument import Profiler from .six import exec_ def main(): usage = ("usage: pyinstrument [options] scriptfile [arg] ...") parser = OptionParser(usage=usage) parser.allow_interspersed_args = False parser.add_option('-m...
Python
0.000002
@@ -67,16 +67,36 @@ nParser%0A +import pyinstrument%0A from pyi @@ -225,16 +225,174 @@ %5D ...%22)%0A + version_string = 'pyinstrument %7Bv%7D, on Python %7Bpyv%5B0%5D%7D.%7Bpyv%5B1%5D%7D.%7Bpyv%5B2%5D%7D'.format(%0A v=pyinstrument.__version__,%0A pyv=sys.version_info,%0A )%0A pars @@ -420,1...
b86d5dbca2e8f772720bcd21297d292edbe04606
Update bot.py
intelmq/lib/bot.py
intelmq/lib/bot.py
import re import sys import json import time import ConfigParser from intelmq.lib.event import Event from intelmq.lib.pipeline import Pipeline from intelmq.lib.utils import decode, log SYSTEM_CONF_FILE = "/etc/intelmq/system.conf" PIPELINE_CONF_FILE = "/etc/intelmq/pipeline.conf" BOTS_CONF_FILE = "/etc/...
Python
0.000001
@@ -4982,46 +4982,11 @@ r %25 -int(self.parameters.logging_threshold) +500 ==
423aa887375c071f0a269466e050020f331c84e1
Remove print statement
copytext.py
copytext.py
#!/usr/bin/env python from markupsafe import Markup from openpyxl.reader.excel import load_workbook class CopyException(Exception): pass class Error(object): """ An error object that can mimic the structure of the COPY data, whether the error happens at the Copy, Sheet or Row level. Will print the error ...
Python
0.007015
@@ -4306,47 +4306,8 @@ j)%0A%0A - print json.dumps(obj)%0A%0A
92dc3cd54c0e6ecd934f2e09955cd9b3f315bc33
Improve comment in QrOpTest
tensorflow/compiler/tests/qr_op_test.py
tensorflow/compiler/tests/qr_op_test.py
# Copyright 2018 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
@@ -1253,184 +1253,223 @@ -%22It's unknown why this test requires TF32 to be disabled%22)%0A# TODO(reedwm): Determine why this test requires TF32 disabled. Debugging is%0A# difficult due to this test's flakiness +'XLA QR op calls matmul. Also, matmul used for verification. Also with '%0A 'TF32, mysterious %22U...
1142a0c3eda4b09ead668fb4fac553d1cb59fe62
Remove global/local variable optimization hacks
whip/db.py
whip/db.py
""" Whip database storage module. All IP ranges with associated information are stored in a LevelDB database. The key/value layout is as follows: * The end IP is used as the key. This allows for quick fast range lookups. * The begin IP and the actual information is stored in the value. The most recent infoset fo...
Python
0
@@ -1403,25 +1403,16 @@ _record( -%0A begin_ip @@ -1441,104 +1441,8 @@ sets -,%0A _extract_datetime=operator.itemgetter('datetime'),%0A _encode=json_encoder.encode ):%0A @@ -1616,25 +1616,37 @@ key= -_extract_ +operator.itemgetter(' datetime , re @@ -1641,16 +1641,18 @@ datetime +') , re...
96e3d2720a805a08190936a78c91a8c9746daab9
Update Keras.py
Depthwise-Separable-Convolution/Keras.py
Depthwise-Separable-Convolution/Keras.py
from keras.datasets import mnist from keras.initializers import RandomUniform from keras.layers import Conv2D, Dense, DepthwiseConv2D, Flatten, MaxPooling2D from keras.models import Sequential from keras.optimizers import SGD from keras.utils import to_categorical # input image dimensions img_rows, img_cols =...
Python
0
@@ -398,26 +398,8 @@ .9%0D%0A -num_classes = 10%0D%0A %0D%0A( @@ -593,24 +593,27 @@ num_classes +=10 )%0D%0A %0D%0Ax_test @@ -740,16 +740,19 @@ _classes +=10 )%0D%0A %0D%0Amo @@ -1510,27 +1510,18 @@ d(Dense( -num_classes +10 ,%0D%0A
efbb841bb0968abeb2d3bba5a535cb8619131b2b
Remove dupe licence header
touchdown/config/ini.py
touchdown/config/ini.py
# Copyright 2015 Isotoma 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 writing...
Python
0
@@ -1,581 +1,4 @@ -# Copyright 2015 Isotoma Limited%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A# http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by...
23359b52f468d3eed62533e7aed3ea9afce998e4
fix webdav on windows
pyspider/webui/webdav.py
pyspider/webui/webdav.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<roy@binux.me> # http://binux.me # Created on 2015-6-3 11:29 import os import re import time import base64 from six import BytesIO from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp from wsg...
Python
0.000001
@@ -5524,16 +5524,35 @@ th(path) +.replace('%5C%5C', '/') %0A @@ -5575,24 +5575,47 @@ , '.', ''):%0A + path = '/'%0A
701792e4d4ecc1597b2f66fc3e63b38b3482c1bf
Fix tf.complex_abs gradient test to not be flaky Change: 117872871
tensorflow/python/ops/math_grad_test.py
tensorflow/python/ops/math_grad_test.py
# Copyright 2016 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 by applicable law or a...
Python
0.000095
@@ -2580,24 +2580,46 @@ igma=None):%0A + np.random.seed(7)%0A if dtype
4a1eeebc753dde28e2d9c29b532730e531a04d77
write results after each test to save memory
pytest_cagoule/plugin.py
pytest_cagoule/plugin.py
from coverage import coverage import six from .db import get_connection from .git_parser import get_changes from .select import get_node_ids def pytest_addoption(parser): parser.addoption( '--cagoule-capture', action='store_true', dest='cagoule_capture', help='capture coverage info for cagoule', ...
Python
0.000001
@@ -876,17 +876,439 @@ elf. -data = %7B%7D +setup_db()%0A%0A%0A def setup_db(self):%0A connection = get_connection()%0A with connection:%0A connection.execute(%22DROP TABLE IF EXISTS coverage;%22)%0A connection.execute(%22%22%22%0A CREATE TABLE coverage (%0A ...
1e21ba5101fe1e47fec5acacd8ac9329a71fc9bb
Change __init__
__init__.py
__init__.py
from .mygmm.mygmm import *
Python
0.000028
@@ -4,22 +4,16 @@ m .mygmm -.mygmm import @@ -13,8 +13,9 @@ import * +%0A
c26c44f044a2e48cc53a0f52adce366807c87e2d
Add version number.
__init__.py
__init__.py
from .Averager import Averager from .Config import Config from .RateTicker import RateTicker from .Ring import Ring from .SocketTalk import SocketTalk from .SortedList import SortedList from .String import string2time, time2string, time2levels, time2dir, time2fname from .Timer import Timer from .UserInput import user_i...
Python
0
@@ -1,12 +1,32 @@ +__version__ = '1.0'%0A from .Averag
629a965cbba1b66d3f5c520b1a90cf26f131a434
fix a test for large requests
test/alternator/test_manual_requests.py
test/alternator/test_manual_requests.py
# Copyright 2020 ScyllaDB # # This file is part of Scylla. # # Scylla 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) any later version. # # Scylla...
Python
0
@@ -4449,16 +4449,33 @@ Error):%0A + try:%0A @@ -4528,16 +4528,78 @@ ': big%7D) +%0A except ClientError:%0A raise BotoCoreError() %0A%0Adef te
bf6b49af7540acc56892ee1ed05479b141e18a14
Update commands.py
commands.py
commands.py
# Not entirely sure these are sane... def conditional(statement): compiledScript = '' # Compare an array if isinstance(statement[0], classes.List): compiledScript += '\tmov ecx,' + utils.getVar(statement[0].value[0]) + '\n\tadd ecx,' + utils.getVar(statement[0].value[1]) + '\n' ...
Python
0.000001
@@ -1,8 +1,1580 @@ +# Copyright (c) 2016, Connor E. Haight %3Cconnor.haight@gmail.com%3E%0A# All rights reserved.%0A#%0A# Redistribution and use in source and binary forms, with or without%0A# modification, are permitted provided that the following conditions are met:%0A# * Redistributions of source code must retai...
62b1db51b2742ff57e48d692e034cdeb6e648d7c
Fix issue when adding multiple subscriptions that the previous record is overwritten in the GUI.
invoicing/views.py
invoicing/views.py
""" SynLogistics: Invoicing and subscription views. """ # # Copyright (C) by Wilco Baan Hofman <wilco@baanhofman.nl> 2011 # # 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 versi...
Python
0
@@ -3404,16 +3404,84 @@ unt'%5D)%0A%0A +%09%09%09# Give the id to the frontend%0A%09%09%09response%5B'id'%5D = subscription.id %0A%09%09excep
08da61299b9ae970194c57748741a27fa77bf6f9
Fix bug: modify devices type. from dict_items to list
uitester/test_manager/device_manager.py
uitester/test_manager/device_manager.py
from uitester.test_manager import adb from uitester.test_manager import rpc_server from threading import Thread from queue import Queue class Device: BLANK = 0x0, 'Default status' OFFLINE = 0x1, 'Device is offline' ONLINE = 0x2, 'Device is online' RUNNING = 0x3, 'Device is running tests' def __in...
Python
0.000001
@@ -950,24 +950,29 @@ return +list( self._device @@ -977,15 +977,17 @@ ces. -item +value s() +) %0A%0A
47e483315b7586795bd52ae0a010aa23aa1a9d56
Fix bug for not commenting on non-python PRs
pep8speaks/handlers.py
pep8speaks/handlers.py
# -*- coding: utf-8 -*- import json import os from flask import Response import requests from pep8speaks import helpers def handle_pull_request(request): # A variable which is set to False whenever a criteria is not met # Ultimately if this is True, only then the comment is made PERMITTED_TO_COMMENT = Tr...
Python
0
@@ -2403,38 +2403,22 @@ -PERMITTED_TO_COMMENT = +if not helpers @@ -2457,16 +2457,58 @@ comment) +:%0A PERMITTED_TO_COMMENT = False %0A%0A
bde3b3d1d90338e23e2550bc6fdd317e5e696f0f
Add command-line arguments: root, hosts and name with regexp
zk-find.py
zk-find.py
# # This is a FIND utility for Zookeeper # # Author: Aleksandr Vinokurov <aleksandr.vin@gmail.com> # Url: https://github.com/aleksandr-vin/zk-find # import logging import logging.config try: logging.config.fileConfig('logging.conf') except: logging.basicConfig() logger = logging.getLogger('zk-find') from...
Python
0.000002
@@ -182,16 +182,32 @@ g.config +%0Aimport argparse %0A%0Atry:%0A @@ -446,16 +446,26 @@ odeError +%0Aimport re %0A%0Adef li @@ -478,24 +478,29 @@ ldren(parent +,prog ):%0A try:%0A @@ -583,16 +583,83 @@ + node%0A + if prog:%0A if prog.search(node):%0A @@ -703,16 +70...
bf471cdcef8ce8cce973139fa4c4ad3dd4f306a3
Disable 'hey Siri' with AirPods
conf/mac.py
conf/mac.py
# type: ignore # silence linter errors defaults = defaults run = run ### trackpad settings ### for key in ( 'com.apple.AppleMultitouchTrackpad', 'com.apple.driver.AppleBluetoothMultitouch.trackpad' ): trackpad = defaults[key] trackpad['Clicking'] = True # touch to click # enable *both* methods o...
Python
0.999967
@@ -5362,8 +5362,145 @@ hot_dir%0A +%0A# turn off %22hey Siri%22 (on Mac, triggers more by accident than on purpose)%0Adefaults%5B'com.apple.Siri'%5D%5B'VoiceTriggerUserEnabled'%5D = False%0A
04dd322f8e3f040cf9b25d2c0ce77e3aa9fea02c
Update .cluster.py
.cluster.py
.cluster.py
from socket import gethostname import os defaults = { 'netmask': '255.255.255.0', 'public_key': '~/.ssh/id_rsa.pub', 'private_key': '~/.ssh/id_rsa', 'domain_name': 'local', 'extra_disks': {}, 'openstack': { 'flavor': 'm1.small', 'image': 'CC-Ubuntu14.04', 'key_name': g...
Python
0.000001
@@ -279,22 +279,23 @@ ': ' -CC- Ubuntu +- 14.04 +-64 ',%0A @@ -424,19 +424,20 @@ ng_ip': -Tru +Fals e, %0A
04ee8994563ee5bdbb9ae48604b2911197c54afd
Add environment variable to opt out of log collection (#2176)
conftest.py
conftest.py
""" This file configures python logging for the pytest framework integration tests Note: pytest must be invoked with this file in the working directory E.G. py.test frameworks/<your-frameworks>/tests """ import logging import os import os.path import sys import pytest import sdk_diag import sdk_utils import teamcity ...
Python
0
@@ -1213,16 +1213,267 @@ ame__)%0A%0A +# The following environment variable allows for log collection to be turned off.%0A# This is useful, for exampl in testing.%0AINTEGRATION_TEST_LOG_COLLECTION = str(%0A os.environ.get('INTEGRATION_TEST_LOG_COLLECTION', %22True%22)%0A).lower() in %5B%22true%22, %221%22%5D%0A%0A ...
15314a94f9c590cfda24f3ae4191c7fcf9997668
Revert "Hack code to pass tests"
pytmatrix/orientation.py
pytmatrix/orientation.py
""" Copyright (C) 2009-2013 Jussi Leinonen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
Python
0.000001
@@ -4417,128 +4417,8 @@ ha%0A%0A - import pytmatrix.orientation as orientation%0A tm.orient = orientation.orient_averaged_fixed%0A tm._init_orient()%0A
3a9057996797aade8214a88f34fe2d0bec7bd460
Add return value for /init endpoint.
perimeter/perimeter.py
perimeter/perimeter.py
import sys from cassandra.cluster import Cluster from flask import Flask, render_template, jsonify # from kafka import SimpleProducer, KafkaClient import srvlookup # This uses mesos-dns to locate our cassandra cluster. Cassandra # always runs on the same port. cassandra_cli = Cluster(['cassandra-dcos-node.cassandra....
Python
0
@@ -907,16 +907,50 @@ figured%22 +%0A return %22cassandra configured%22 %0A%0A# Kafk
b6da8865c9a12b9ce88d809d2fa4dfb601be01d0
make sure same timezone is used when calculating delta
reboot_required/check.py
reboot_required/check.py
# vim: ts=4:sw=4:et # (C) Datadog, Inc. 2010-2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # project from checks import AgentCheck from os import stat, utime, remove from os.path import isfile from stat import ST_MTIME from datetime import datetime, timedelta class RebootRequiredCh...
Python
0.000003
@@ -1311,16 +1311,19 @@ atetime. +utc fromtime
7e398bce17bfc95471e49d95b00d396049eae7df
Add default postgres connection
phrasebook/settings.py
phrasebook/settings.py
""" Django settings for phrasebook project. Generated by 'django-admin startproject' using Django 1.9.2. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os...
Python
0
@@ -2511,16 +2511,221 @@ %7D%0A%7D%0A%0A +DATABASES = %7B%0A 'default': %7B%0A 'ENGINE': 'django.db.backends.postgresql',%0A 'NAME': 'phrasebook',%0A 'USER': '',%0A 'PASSWORD': '',%0A 'HOST': '',%0A 'PORT': '',%0A %7D%0A%7D%0A%0A # Update
6c9ab323883160744f9048112079f1b7964c42b7
Version bump
bespin/__init__.py
bespin/__init__.py
VERSION="0.5.7.8"
Python
0.000001
@@ -12,7 +12,7 @@ 5.7. -8 +9 %22%0A
6f7fc9067df57c4c15204a3208768acf4b76ed85
Update version to 0.2.0.dev0
bfg9000/version.py
bfg9000/version.py
version = '0.1.0'
Python
0.000001
@@ -10,9 +10,14 @@ '0. -1. +2.0.dev 0'%0A
ef156eca331203696f38b2f829314c48eeb5f207
Update version to 0.1.0
bfg9000/version.py
bfg9000/version.py
version = '0.1.0-dev'
Python
0.000001
@@ -13,10 +13,6 @@ .1.0 --dev '%0A
02a5d982178d7916d17d2310476d35657780a1e6
fix a bug of css
bgmi/front/http.py
bgmi/front/http.py
# encoding: utf-8 from __future__ import print_function, unicode_literals import os import json import datetime import hashlib import tornado.ioloop import tornado.options import tornado.httpserver import tornado.web import tornado.template from tornado.options import options, define from collections import OrderedDict...
Python
0.000032
@@ -2726,32 +2726,31 @@ data = -Followed +Bangumi .get_all_fol @@ -2746,24 +2746,23 @@ get_all_ -followed +bangumi ()%0A
8099c35b31e67643e14dcd3cd30fa104fcca6fb5
Revert accidental change out of version.py
scikits/image/version.py
scikits/image/version.py
# THIS FILE IS GENERATED FROM THE SCIKITS.IMAGE SETUP.PY version='0.2dev'
Python
0.000001
@@ -1,61 +1,4 @@ -# THIS FILE IS GENERATED FROM THE SCIKITS.IMAGE SETUP.PY%0A vers @@ -6,12 +6,18 @@ on=' -0.2 +unbuilt- dev'%0A +%0A
fc51c36b636d4a396faac02285605dafe0779104
Bump version to 18.0.0a5
resolwe_bio/__about__.py
resolwe_bio/__about__.py
"""Central place for package metadata.""" # NOTE: We use __title__ instead of simply __name__ since the latter would # interfere with a global variable __name__ denoting object's name. __title__ = 'resolwe-bio' __summary__ = 'Bioinformatics pipelines for the Resolwe platform' __url__ = 'https://github.com/genial...
Python
0
@@ -498,9 +498,9 @@ 0.0a -4 +5 %22%0A%0A_
06b410666b0720a7fbf78d57be0907ce7fd19990
version bump
picraftzero/version.py
picraftzero/version.py
version = "0.2.9" build_string = "beta"
Python
0.000001
@@ -12,9 +12,10 @@ 0.2. -9 +10 %22%0Abu
c307dc1ef794f9a3262be67621892adec4aff25f
friendly task name
dbaas/notification/admin/task_history.py
dbaas/notification/admin/task_history.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.contrib import admin from django.utils.translation import ugettext_lazy as _ import logging from ..models import TaskHistory from dbaas import constants LOG = logging.getLogger(__name__) class TaskHistoryAdmin(admin.ModelAdm...
Python
0.998809
@@ -431,32 +431,41 @@ = %5B%22task_id%22, %22 +friendly_ task_name%22, %22tas @@ -576,115 +576,8 @@ r%22%5D%0A - #list_display = %5B%22task_id%22, %22task_name%22, %22task_status%22, %22user%22, %22arguments%22, %22created_at%22, %22ended_at%22%5D%0A @@ -636,45 +636,8 @@ s%22)%0A - # list_filter = (%22...
485c0baaf3a712d6ff2954016ae95bec451eab2f
Update postprocess.py
postprocessor/postprocess.py
postprocessor/postprocess.py
import json import csv def save_dict_as_csv(data, filename): node_keys = sorted(data.keys()) time_keys = sorted(data[node_keys[0]].keys()) # add key=int for integer timesteps header = ['date'] + node_keys writer = csv.writer(open(filename, 'w')) writer.writerow(header) for t in time_keys: row = [t] ...
Python
0.000001
@@ -15,16 +15,36 @@ port csv +%0Aimport pandas as pd %0A%0Adef sa @@ -1450,18 +1450,25 @@ n('links -.c +updated.t sv', 'rU @@ -1491,32 +1491,47 @@ r = csv.reader(f +,delimiter='%5Ct' )%0A network = li @@ -1575,26 +1575,33 @@ open('nodes -.c +updated.t sv', 'rU') a @@ -1624,24 +1624,39 @@ csv.reader(f +,delim...
5bdd659768ad5e5a50f85113a2d354ac51653b42
Update ds_list_contains_duplicate.py
leetcode/ds_list_contains_duplicate.py
leetcode/ds_list_contains_duplicate.py
# @file Contains Duplicate # @brief Given an array of numbers find if there are any duplicates # https://leetcode.com/problems/contains-duplicate/ ''' Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it shoul...
Python
0.000003
@@ -1084,48 +1084,177 @@ oach - (complexity: time = O(n), space = O(n)) +%0A#Use a dictionary to store all numbers. If a number is seen 2nd time return immediately%0A#Time Complexity = O(n) since we have a single for-loop to look at all numbers %0Adef @@ -1308,19 +1308,18 @@ for -ele +nu m in num @@ -1333,40...
e10195f93cb39afcc432ec25466073cec093b2bb
remove debug output
app/form/validators.py
app/form/validators.py
from wtforms.validators import ValidationError from app.pacman import get_pkg from app.util import multiline_to_list from pyalpm import vercmp class ValidPackageName(object): def __init__(self): self.message = u'Unknown package.' def __call__(self, form, field): versions = get_pkg(field.data)...
Python
0
@@ -591,83 +591,32 @@ -print(pkgnames)%0A for pkgname in pkgnames:%0A print(pkgname) +for pkgname in pkgnames: %0A
43b5fdf54442bf1e80afd722e86d51ea029f6996
Fix repository-sync crashing on overlapping external projects (RCE-1968)
mint/scripts/repository_sync.py
mint/scripts/repository_sync.py
# # Copyright (c) 2011 rPath, Inc. # import hashlib import logging import sys from conary.dbstore import sqlerrors from mint.lib.scriptlibrary import GenericScript from mint.db import database from mint.db import repository from rpath_proddef import api1 as proddef log = logging.getLogger(__name__) # Bump this to fo...
Python
0
@@ -1247,32 +1247,53 @@ syncAll(self):%0A + seen = set()%0A for hand @@ -1336,16 +1336,111 @@ ries():%0A + if handle.fqdn in seen:%0A continue%0A seen.add(handle.fqdn)%0A
b2143f62c79c30b7fd2a365894dddf86a24d39fe
fix save_fig
prediction/anf_py/remodel.py
prediction/anf_py/remodel.py
from datetime import datetime import matplotlib.pyplot as plt import numpy as np import tensorflow as tf # Save figure for 1-dimension data def save_figures(data, label, x_label, y_label, path): array = np.asarray(data) x = np.arange(1, array.shape[0] + 1) plt.plot(x, ar...
Python
0.000001
@@ -100,16 +100,43 @@ as tf%0A%0A +plt.switch_backend('agg')%0A%0A %0A# Save
85ece96a2dd566b19f88686b54ea903d9850abd6
Introduce MapOptions and MapPlot abstract base classes
bokeh/models/map_plots.py
bokeh/models/map_plots.py
""" Models for displaying maps in Bokeh plots. """ from __future__ import absolute_import from ..properties import HasProps from ..properties import Enum, Float, Instance, Int, JSON from ..enums import MapType from ..validation.warnings import MISSING_RENDERERS, NO_GLYPH_RENDERERS from ..validation.errors import REQU...
Python
0
@@ -118,16 +118,26 @@ HasProps +, abstract %0Afrom .. @@ -386,23 +386,32 @@ t Plot%0A%0A +@abstract%0A class -G MapOptio @@ -436,35 +436,50 @@ %22%22%22 -Options for GMapPlot object +Abstract base class for map options' model s.%0A%0A @@ -746,25 +746,285 @@ the -GMapPlot. +map.%0A %22%22%22)%0A%0A@abstrac...
a76aed1fd8410e4dee300b7c7c5665885c8e61e0
Add a sanity check if all websocket connections were closed
bokeh/server/wsmanager.py
bokeh/server/wsmanager.py
import uuid import logging from .. import protocol from flask import request log = logging.getLogger(__name__) class MultiDictionary(object): def __init__(self): self.dict = {} def add(self, k, v): self.dict.setdefault(k, set()).add(v) def remove_val(self, k, v): self.dict.setde...
Python
0.000003
@@ -5,16 +5,30 @@ rt uuid%0A +import atexit%0A import l @@ -757,16 +757,183 @@ +atexit.register(self._atexit)%0A%0A def _atexit(self):%0A if len(self.sockets) != 0:%0A log.warning(%22Not all websocket connections were closed properly%22)%0A %0A def
f8a8e936b2f6f3edcbc68b69056271975626631c
Terminate the build log recorder if the parent builder disappears
rmake/worker/recorder.py
rmake/worker/recorder.py
# # Copyright (c) SAS Institute 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 w...
Python
0.000002
@@ -771,16 +771,17 @@ erver):%0A +%0A def @@ -986,16 +986,41 @@ ey = key +%0A self.ppid = None %0A%0A de @@ -1296,16 +1296,49 @@ pass +%0A self.ppid = os.getppid() %0A%0A de @@ -1554,11 +1554,9 @@ ime= -0.1 +2 ):%0A @@ -1610,16 +1610,103 @@ lf._map) +%0A if os.getppid() != ...
b20853aa4c41535ff5277d347105e9ec55bc473d
Fix work on MySQL backend
mistral/db/sqlalchemy/models.py
mistral/db/sqlalchemy/models.py
# -*- coding: utf-8 -*- # # Copyright 2013 - Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
Python
0.000001
@@ -2072,22 +2072,20 @@ lumn(sa. -String +Text (), null @@ -2125,32 +2125,35 @@ olumn(sa.String( +200 ))%0A tags = sa @@ -2207,24 +2207,26 @@ n(sa.String( +80 ))%0A proje @@ -2245,32 +2245,34 @@ olumn(sa.String( +80 ))%0A trust_id @@ -2293,16 +2293,18 @@ .String( +80 ))%0A%0A%0Acla @@ -2634,16 +2634...
54d9c6a9c21e5e4856c8bd890add8dfa4c992ced
Add from _peak_finding import * to signal.__init__
scipy/signal/__init__.py
scipy/signal/__init__.py
""" ======================================= Signal processing (:mod:`scipy.signal`) ======================================= .. module:: scipy.signal Convolution =========== .. autosummary:: :toctree: generated/ convolve -- N-dimensional convolution. correlate -- N-dimensional correlation. fftconvol...
Python
0
@@ -6665,16 +6665,105 @@ low-pass +%0A ricker -- return ricker wavelet%0A cwt -- perform continuous wavelet transform %0A%0A%22%22%22%0A%0Ai @@ -7178,16 +7178,44 @@ import * +%0Afrom _peak_finding import * %0A%0A__all_
b2ca3cf7e6610bf0f3c6ac5aa79c3322c276c439
set the exit code to non-zero when contracts fails
scrapy/commands/check.py
scrapy/commands/check.py
from __future__ import print_function from collections import defaultdict from functools import wraps from unittest import TextTestRunner from scrapy.command import ScrapyCommand from scrapy.contracts import ContractsManager from scrapy.utils.misc import load_object from scrapy.utils.spider import iterate_spider_outpu...
Python
0.000113
@@ -2502,16 +2502,85 @@ Errors() +%0A self.exitcode = 0 if self.results.wasSuccessful() else 1 %0A%0A de
f131fc524d557312da010b22379d75d52637ebd1
missing comma
semantics.py
semantics.py
# -*- coding: utf-8 -*- ############################################################################## # # Semantics, module for Odoo, Open Source Management Solution # Copyright (C) 2014 InsPyration EURL (<http://www.inspyration.fr>). # # This program is free software: you can redistribute it and/or modify # ...
Python
0.999998
@@ -3313,24 +3313,25 @@ ring=%22Field%22 +, %0A
0e60e7b04d71149c39e8fe3a047de777cd381638
enable shell in subprocess`
breakseq2/breakseq_top.py
breakseq2/breakseq_top.py
#!/usr/bin/env python import logging import os import subprocess import pysam import preprocess_and_align import breakseq_core import breakseq_post import compute_zygosity import gen_vcf import breakseq_index from _version import __version__ def add_options(main_parser): preprocess_and_align.add_options(main_par...
Python
0
@@ -3073,16 +3073,28 @@ dex_cmd, + shell=True, stderr=
e8b4f7d6917647d4158ed39991cd00cfe45a0264
Add some support for bigg.ucsd.edu/api/v2
cameo/webmodels.py
cameo/webmodels.py
# Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
Python
0
@@ -2423,16 +2423,669 @@ index)%0A%0A +def index_models_bigg():%0A response = requests.get('http://bigg.ucsd.edu/api/v2/models')%0A if response.ok:%0A return DataFrame.from_dict(response.json()%5B'results'%5D)%0A else:%0A raise Exception(%22Could not index available models. bigg.ucsd.edu returne...
b60664cebec29dff0917fb13af270d3b47404256
set setttings default
royalerant/royalerant.py
royalerant/royalerant.py
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2017 SML Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy...
Python
0.000001
@@ -1792,16 +1792,340 @@ JSON))%0A%0A + if self.settings.get(%22twitter_api%22) is None:%0A self.settings%5B%22twitter_api%22%5D = %7B%0A %22consumer_key%22: None,%0A %22consumer_secret%22: None,%0A %22access_token%22: None,%0A %22access_tok...
2d51b0ee6c6b4b34863d745b86963d5af9e55dee
Use self.fail() in MiGdbSetShowTestCase.test_lldbmi_gdb_set_target_async_off (MI)
test/tools/lldb-mi/TestMiGdbSetShow.py
test/tools/lldb-mi/TestMiGdbSetShow.py
""" Test lldb-mi -gdb-set and -gdb-show commands. """ import lldbmi_testcase from lldbtest import * import unittest2 class MiGdbSetShowTestCase(lldbmi_testcase.MiTestCaseBase): mydir = TestBase.compute_mydir(__file__) @lldbmi_test @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for...
Python
0.00001
@@ -3049,108 +3049,39 @@ -# generate error if it's not %22@%5C%22argc=1%5C%5C%5C%5Cr%5C%5C%5C%5Cn%22%0A self.expect(%22$UNEXPECTED FOUND +self.fail(%22unexpected found : %25s -%5C.%5E %22 %25 @@ -3098,21 +3098,8 @@ %5Bit%5D -, timeout = 0 )%0A%0A
57eb5eb910eeedca757526fe104b3ed2ee104413
Add note that -F option (file storage) is experimental
sacredboard/bootstrap.py
sacredboard/bootstrap.py
# coding=utf-8 """ Bootstrap module parses command line arguments and initializes the app. Configures the database connection and starts the web application. """ import locale import sys import click from flask import Flask from gevent.pywsgi import WSGIServer from sacredboard.app.config import jinja_filters from sa...
Python
0.000003
@@ -1560,16 +1560,31 @@ bserver. + (experimental) %22)%0A@clic
81328ba4de673786029f9a52bdde716e5395272e
add delete test
sacrud/tests/__init__.py
sacrud/tests/__init__.py
# -*- coding: utf-8 -*- from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine import unittest from sacrud.tests.test_models import User, Profile, PHOTO_PATH from sacrud.action import get_relations, delete_fileobj, read, update from sacrud.action import get_pk, index, create from pyramid.testing ...
Python
0.000001
@@ -243,16 +243,24 @@ , update +, delete %0Afrom sa @@ -3821,24 +3821,16 @@ ommit()%0A - %0A @@ -4834,8 +4834,430 @@ t(23))%0A%0A + def test_delete(self):%0A%0A user = User(u'Vasya', u'Pupkin', u%22123%22)%0A self.session.add(user)%0A self.session.commit()%0A%0A profil...
49bff5b61336b9fbec79078ff0a8f6a1344b86fa
Remove unnecessary bar comments
skylines/model/search.py
skylines/model/search.py
import shlex from sqlalchemy import literal_column, cast, desc, Unicode from sqlalchemy.dialects.postgresql import array from skylines.model import db PATTERNS = [ ('{}', 5), # Matches token exactly ('{}%', 3), # Begins with token ('% {}%', 2), # Has token at word start ('%{}%', 1), # Has ...
Python
0
@@ -326,40 +326,8 @@ %0A%5D%0A%0A -##############################%0A%0A %0Adef @@ -2634,40 +2634,8 @@ ry%0A%0A -##############################%0A%0A %0Adef @@ -4603,40 +4603,8 @@ ns%0A%0A -##############################%0A%0A %0Adef @@ -5001,40 +5001,8 @@ ns%0A%0A -##############################%0A%0A %0Adef @@...
6fd689f64d6de0e719935f607be49abf223117aa
correct key in validation
slimta/app/validation.py
slimta/app/validation.py
# Copyright (c) 2013 Ian C. Good # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distrib...
Python
0.000031
@@ -5035,12 +5035,19 @@ ' -scan +reject_spam ': (
0fe6e79f9bc201b3c63ad6f1ce400c9d79bd484a
Fix path issues in example script
bin/idiotscript.py
bin/idiotscript.py
#!/usr/bin/python3 import os, sys if len(sys.argv) < 2 or len(sys.argv) > 3: print("Invalid number of arguments.") sys.exit() if os.path.isfile(sys.argv[1]) == False: print("IdiotScript program does not exist.") sys.exit() import io import idiotscript from idiotscript import InstructionSet, Collect...
Python
0.000001
@@ -29,16 +29,235 @@ s, sys%0A%0A +def alter_path():%0A script_path = os.path.dirname(os.path.realpath(__file__))%0A try:%0A path_index = sys.path.index(script_path)%0A except ValueError:%0A return%0A sys.path.pop(path_index)%0Aalter_path()%0A%0A if len(s
d926f321a26fe7c6b72513f88fe60bc4f3c899e4
Update model cnes bed
app/models/cnes_bed.py
app/models/cnes_bed.py
from sqlalchemy import Column, Integer, String, func from app import db class CnesBed(db.Model): __tablename__ = 'cnes_bed' year = Column(Integer, primary_key=True) region = Column(String(1), primary_key=True) mesoregion = Column(String(4), primary_key=True) microregion = Colum...
Python
0
@@ -108,16 +108,46 @@ lename__ + = 'cnes @@ -162,32 +162,62 @@ year + = Column(Integer @@ -246,32 +246,62 @@ region + = Column(String( @@ -336,24 +336,54 @@ soregion + ...
3974bcaf151c491f4608b17860741d2388d15002
convert bed to bigBed
data_formats/converters.py
data_formats/converters.py
# # Author    : Manuel Bernal Llinares # Project   : trackhub-creator # Timestamp : 28-09-2017 14:20 # --- # © 2017 Manuel Bernal Llinares <mbdebian@gmail.com> # All rights reserved. # """ This module offers converters between different formats """ import abc # App imports import config_manager import ensembl.servi...
Python
0.999999
@@ -1957,22 +1957,16 @@ command( -self, input_fi @@ -3872,23 +3872,16 @@ # - TODO - Use bed @@ -3933,28 +3933,718 @@ ile%0A -pass +runner_conversion = self._get_command_line_runner()%0A runner_conversion.command = self.get_bed_to_bigbed_conversion_command(self.file_path_source,%0A ...
824d78322e36d97daaf3a61a6ef503ee45d94e99
Print table name in the preview
databaker/jupybakeutils.py
databaker/jupybakeutils.py
# HTML preview of the dimensions and table (will be moved to a function in databakersolo) from IPython.display import display from IPython.core.display import HTML import databaker.constants OBS = databaker.constants.OBS # copied out again def create_colourlist(): # Function to dynamically assign colours to dimen...
Python
0
@@ -2225,24 +2225,123 @@ key = %5B %5D%0A + key.append('Table: ')%0A key.append('%3Cb%3E')%0A key.append(tab.name); %0A key.append('%3C/b%3E ')%0A key.appe
5e225294c133a4b90c81461d38ed582819638004
Replace Unicode decoding processing
dataproperty/_converter.py
dataproperty/_converter.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import from __future__ import division import abc import re from ._error import TypeConversionError class ValueConverterInterface(object): @abc.abstractmethod def convert(self): # pragma: no ...
Python
0.015828
@@ -210,16 +210,50 @@ onError%0A +from ._function import to_unicode%0A %0A%0Aclass @@ -1090,103 +1090,26 @@ -try:%0A return str(self._value)%0A except UnicodeEncodeError:%0A return +return to_unicode( self @@ -1107,32 +1107,33 @@ code(self._value +) %0A%0A%0Aclass Integer
93d53e4dc47d31e1bca817ce4718032154814c80
Clean up debug code.
datawire/views/entities.py
datawire/views/entities.py
from flask import Blueprint, request, url_for from sqlalchemy.sql.functions import count from sqlalchemy.sql.expression import or_, and_, func from sqlalchemy.orm import aliased from datawire.core import db, elastic, elastic_index from datawire.auth import require from datawire.model import Entity, Category, Match, Fr...
Python
0.000005
@@ -1078,25 +1078,24 @@ category'))%0A -%0A all_enti @@ -1146,69 +1146,8 @@ n q%5D -%0A # esq%5B'query'%5D%5B'filtered'%5D%5B'filter'%5D%5B'or'%5D.append(fq) %0A%0A @@ -1948,98 +1948,8 @@ es%0A%0A - #esq%5B'facets'%5D%5B'global'%5D%5B'facet_filter'%5D = esq%5B'query'%5D%5B'filtered'%5D%5B'filter'%5D...
74e9ab11dcaef919cba198aef6b8124dcfc3007c
handle leaving a room and entering again right after (fixes #17)
socketio/base_manager.py
socketio/base_manager.py
import itertools import six class BaseManager(object): """Manage client connections. This class keeps track of all the clients and the rooms they are in, to support the broadcasting of messages. The data used by this class is stored in a memory structure, making it appropriate only for single proces...
Python
0
@@ -1977,32 +1977,101 @@ t to a room.%22%22%22%0A + self._clean_rooms() # ensure our rooms are up to date first%0A if names
ec7b52b457e749b4b4a1e9110ede221f2f0d5fe9
Fix fatal error in data processing.
data/propaganda2mongo.py
data/propaganda2mongo.py
import bson.json_util from bson.objectid import ObjectId import json import sys def main(): node_table = {} while True: line = sys.stdin.readline() if not line: break record = json.loads(line) ident = str(record["twitter_id"]) aoid = node_table.get(ident)...
Python
0.000005
@@ -1081,29 +1081,25 @@ node_table%5B -ident +p %5D = oid = Ob
8fb80540499d0f303d68150304fd896367313f94
remove incorrect is instance check in children_changed
IPython/html/widgets/widget_container.py
IPython/html/widgets/widget_container.py
"""ContainerWidget class. Represents a container that can be used to group other widgets. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the ...
Python
0.000062
@@ -1954,34 +1954,8 @@ None - and isinstance(new, list) :%0A
d24f3a1f008e4d2bef262a0f1253da04071a180d
move dataset crop into generic as it is used in several datasets
data_provider/dataset.py
data_provider/dataset.py
class AbstractDataset(object): def __init__(self, games): self.games = games def get_data(self, indices=list()): if len(indices) > 0: return [self.games[i] for i in indices] else: return self.games def n_examples(self): return len(self.games) class...
Python
0.000001
@@ -1,12 +1,26 @@ +import copy%0A%0A%0A class Abstra @@ -328,29 +328,27 @@ %0A%0Aclass +Crop Dataset -Merger (Abstrac @@ -366,46 +366,181 @@ -def __init__(self, datasets):%0A +%22%22%22%0A Each game contains no question/answers but a new object%0A %22%22%22%0A%0A def __init__(self, dataset, ...
7907aeb6a006655ad96d5d3995b5fdbd4bf00d16
fix usage of get_all_enabled_projects
scripts/pipeline_main.py
scripts/pipeline_main.py
#!/usr/bin/env python3 # Copyright 2020 Google LLC # # Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://llvm.org/LICENSE.txt # # Unless required by applicable law ...
Python
0.000002
@@ -1741,35 +1741,32 @@ linux_projects -, _ = cp.get_all_en @@ -1915,11 +1915,8 @@ ects -, _ = c
c38ad4f02d6f036f23ef6d3c1e033e9843fb068a
comment unused tests
functional_tests/test_admins.py
functional_tests/test_admins.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from unittest import skip from django.contrib.admin.templatetags.admin_urls import admin_urlname from .base import FunctionalTest from nowait.tests.factories import AdminF from nowait.models import BookingType @skip class AdminTest(Fun...
Python
0
@@ -17,16 +17,18 @@ f-8 -*-%0A +# from __f @@ -80,35 +80,12 @@ ort%0A -%0Afrom unittest import skip%0A +#%0A# from @@ -151,17 +151,20 @@ urlname%0A -%0A +#%0A# from .ba @@ -188,16 +188,18 @@ nalTest%0A +# from now @@ -232,16 +232,18 @@ AdminF%0A +# from now @@ -276,16 +276,14 @@ ype%0A -%0A%0A@skip%0A ...
18bc54f964a2925005543df8b4989271ad4464be
Fix inheritance in soc.models.base module. FieldsProxy inherited from DbModelForm which was deleted in previous commits (replace that with BaseForm).
app/soc/models/base.py
app/soc/models/base.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 applicab...
Python
0.000001
@@ -2608,15 +2608,12 @@ per. -DbModel +Base Form
b4acc5d4c5f6b3e94225ca5926d06a50c511173c
add json exporter
furnito_crawler/json_manager.py
furnito_crawler/json_manager.py
class Json_Manager: def __init__(self): pass
Python
0
@@ -1,8 +1,21 @@ +import json%0A%0A class Js @@ -63,8 +63,419 @@ pass%0A +%0A def export_json(self, path, json_content):%0A '''%0A @usage: export dict to json and store on local storage%0A @arg: path, path to store json, string eg, 'downlaods/1.json'%0A @arg: json_content, the conten...
7c230d442f758e9fd27c581e43f9e0f1a03d0ee9
fix print
scripts/relay_control.py
scripts/relay_control.py
#!/usr/bin/python import RPi.GPIO as GPIO import argparse import sys GPIO.setwarnings(False) GPIO.setmode(GPIO.BOARD) # GPIO/BOARD | Relay IN | Rotors | Zone # 22/15 | R2 IN2 | 1 | B # 18/12 | R1 IN2 | 2 | A # 24/18 | R1 IN3 | 3 | D # 17/11 | R1 IN4 | 4 | C # 27/13 ...
Python
0.000575
@@ -1673,23 +1673,33 @@ ate'%0A%09%09%09 -state = +print 'states=' + getAll( @@ -1802,15 +1802,24 @@ %0A%09%09%09 +print ' state - = +' + GPI @@ -1874,31 +1874,16 @@ leanup() -%0A%09%09return state %0A%0A%09def s
d7e197c8837f8482c29484dbc36a5d7b751cc076
Add create method to ModelForm
app/soc/views/forms.py
app/soc/views/forms.py
#!/usr/bin/env python2.5 # # Copyright 2011 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 applic...
Python
0.000001
@@ -1271,16 +1271,17 @@ oices)%0A%0A +%0A def choi @@ -1451,16 +1451,17 @@ ields)%0A%0A +%0A class Mo @@ -1638,16 +1638,16 @@ tems():%0A - yi @@ -1681,16 +1681,1462 @@ name)%0A%0A + def create(self, commit=True, key_name=None, parent=None):%0A %22%22%22Save this form's cleaned data into a new model in...
5bde6ca1fd62277463156875e874c4c6843923fd
Use the correct variable for the test
pytest-{{cookiecutter.plugin_name}}/tests/test_{{cookiecutter.plugin_name}}.py
pytest-{{cookiecutter.plugin_name}}/tests/test_{{cookiecutter.plugin_name}}.py
# -*- coding: utf-8 -*- def test_bar_fixture(testdir): """Make sure that pytest accepts our fixture.""" # create a temporary pytest test module testdir.makepyfile(""" def test_sth(bar): assert bar == "europython2015" """) # run pytest with the following cmd args result = t...
Python
0.009051
@@ -591,20 +591,16 @@ et == 0%0A - %0A%0Adef te @@ -777,11 +777,36 @@ ' -cat +%7B%7Bcookiecutter.plugin_name%7D%7D :',%0A
13db02c23cac6ba0eb9116f1429b8d4a8001db6e
Update sequences.py
appdaemon/sequences.py
appdaemon/sequences.py
import uuid import asyncio from appdaemon.appdaemon import AppDaemon class Sequences: def __init__(self, ad: AppDaemon): self.AD = ad self.logger = ad.logging.get_child("_sequences") async def run_sequence_service(self, namespace, domain, service, kwargs): if "entity_id" not in kwar...
Python
0.000001
@@ -735,80 +735,16 @@ -await self.AD.state.add_entity(%0A %22rules%22,%0A +entity = %22se @@ -774,38 +774,9 @@ nce) -, %0A - %22idle%22,%0A @@ -797,13 +797,13 @@ utes -=%7B%0A + = %7B%0A @@ -814,18 +814,16 @@ - %22friendl @@ -890,20 ...
7f6430a7af1cee7f786849b9955179a813925c53
Update Skylib version to 0.8.0
apple/repositories.bzl
apple/repositories.bzl
# Copyright 2018 The Bazel 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 applicable la...
Python
0.000003
@@ -794,16 +794,32 @@ tp.bzl%22, + %22http_archive%22, %22http_f @@ -4044,38 +4044,36 @@ be(%0A -git_repository +http_archive ,%0A na @@ -4097,32 +4097,44 @@ b%22,%0A -remote = +urls = %5B%0A %22https://gi @@ -4169,35 +4169,154 @@ ylib -.git%22,%0A tag = %220.7.0 +/rele...
44754da4076cdc5c39b24496da7566af61aa719b
Update apple_support and rules_swift dependencies.
apple/repositories.bzl
apple/repositories.bzl
# Copyright 2018 The Bazel 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 applicable la...
Python
0.000152
@@ -4344,9 +4344,9 @@ %220. -4 +5 .0%22, @@ -4583,9 +4583,9 @@ %220. -6 +7 .0%22,
2ca7b67983e518bf684e4c5561c91d9f8946204d
Update xctestrunner dependency.
apple/repositories.bzl
apple/repositories.bzl
# Copyright 2018 The Bazel 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 applicable la...
Python
0.000089
@@ -5152,72 +5152,72 @@ = %22 -7c088842ebd4f47297a167e3f3df77eab54a8651f6b6d87e2c275a9e6c8adfe5 +9e46d5782a9dc7d40bc93c99377c091886c180b8c4ffb9f79a19a58e234cdb09 %22,%0A @@ -5293,17 +5293,18 @@ oad/0.2. -9 +10 /ios_tes
6ea62e02a8d966fa78889bca184d61e718c80f9c
add a request buffer in order to avoid duplicate queries at the same time; (3)
lib/rome/utils/MemoizationDecorator.py
lib/rome/utils/MemoizationDecorator.py
__author__ = 'jonathan' import threading import Queue class MemoizationDecorator(object): def __init__(self, decorated): self.decorated = decorated self.conditions_objects_dict = {} self.memory = {} self.insertion_lock = threading.Lock() def __getattr__(self, attribute_name):...
Python
0.000002
@@ -387,24 +387,26 @@ ame)%0A + # if hasattr( @@ -438,32 +438,34 @@ all__%22):%0A + # callable_ob @@ -596,32 +596,34 @@ on_lock)%0A + # return call
fcdac4f394afed0225ae6411f9e4c4c32d0fae0f
add all possible ids. Make factory classes
geetools/collection/sentinel.py
geetools/collection/sentinel.py
# coding=utf-8 """ Google Earth Engine Sentinel Collections """ from . import Collection, TODAY, Band from .. import bitreader, cloud_mask, tools from .. import algorithms as module_alg import ee NUNBERS = [1, 2] PROCESSES = ['TOA', 'SR'] class Sentinel2(Collection): """ Sentinel 2 Collection """ def __init_...
Python
0.00013
@@ -114,129 +114,120 @@ ort -bitreader, cloud_mask, tools%0Afrom .. import algorithms as module_alg%0Aimport ee%0A%0ANUNBERS = %5B1, 2%5D%0APROCESSES = %5B'TOA', 'SR' +tools%0Aimport ee%0A%0ANUNBERS = %5B1, 2%5D%0APROCESSES = %5B'TOA', 'SR'%5D%0AIDS = %5B%0A 'COPERNICUS/S2',%0A 'COPERNICUS/S2_SR'%0A %5D%0A%0A%...