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
5ef6aaa6743fc6996ed06dfc4622a456cc817095
Remove redundant space line
lc0063_unique_paths_ii.py
lc0063_unique_paths_ii.py
"""Leetcode 63. Unique Paths II. Medium URL: https://leetcode.com/problems/unique-paths-ii/ A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the...
Python
0.999822
@@ -578,17 +578,16 @@ mple 1:%0A -%0A Input:%0A%5B
e843793d0a611143bbee179469ab3557744e19ef
fix sillyness
packs/windows/actions/winrm_cmd.py
packs/windows/actions/winrm_cmd.py
from winrm.protocol import Protocol from st2actions.runners.pythonrunner import Action __all__ = [ 'WinRMCmdAction' ] class WinRMCmdAction(Action): def run(self, host, password, command, params, username='Administrator', port=5732, secure=True): proto = 'https' if secure else...
Python
0.002061
@@ -601,62 +601,8 @@ l()%0D -%0A std_out_logs = %5B%5D%0D%0A std_err_logs = %5B%5D%0D %0A%0D%0A @@ -840,84 +840,8 @@ d)%0D%0A - std_out_logs.append(std_out)%0D%0A std_err_logs.append(std_err)%0D%0A
f23802c3c7d967c1373c11a34415e89acc7af1a7
improve _oauth_response (at least in the LinkedIn case I hope)
contacts_import/oauth_consumer.py
contacts_import/oauth_consumer.py
import httplib2 import logging import socket from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.utils import simplejson as json import oauth2 as oauth logger = logging.getLogger("oauth_consumer") class ServiceFail(Excep...
Python
0
@@ -4704,248 +4704,276 @@ -http = httplib2.Http()%0A # @@@ hack for now%0A if request.http_method == %22POST%22:%0A ret = http.request(request.http_url, %22POST%22, request.to_postdata())%0A else:%0A ret = http.request(request.to_url(), %22GET%22 +# @@@ not sure if this ...
e8a2c28f7e9deb334027b6fcde31e5d24d11a2a8
remove unnecessary method
pergenie/apps/riskreport/models.py
pergenie/apps/riskreport/models.py
from decimal import Decimal from django.db import models, transaction from django.db.models import Max from django.utils import timezone from celery.decorators import task from apps.genome.models import Genome, Genotype from apps.gwascatalog.models import GwasCatalogPhenotype, GwasCatalogSnp from apps.snp.models imp...
Python
0.001775
@@ -3007,17 +3007,8 @@ cts. -filter(). aggr
e460eec134bc858fc48321a2c8eee489f8f35e41
Use new CoverDeviceClass enum in aladdin_connect (#61262)
homeassistant/components/aladdin_connect/cover.py
homeassistant/components/aladdin_connect/cover.py
"""Platform for the Aladdin Connect cover component.""" from __future__ import annotations import logging from typing import Any, Final from aladdin_connect import AladdinConnectClient import voluptuous as vol from homeassistant.components.cover import ( DEVICE_CLASS_GARAGE, PLATFORM_SCHEMA as BASE_PLATFORM_...
Python
0
@@ -255,33 +255,8 @@ t (%0A - DEVICE_CLASS_GARAGE,%0A @@ -296,16 +296,38 @@ SCHEMA,%0A + CoverDeviceClass,%0A Cove @@ -2046,21 +2046,25 @@ s = -DEVICE_CLASS_ +CoverDeviceClass. GARA
71bafba9ec5656d413746341081db00aa2b24e2d
Move ecoal_boiler imports at top-level (#29049)
homeassistant/components/ecoal_boiler/__init__.py
homeassistant/components/ecoal_boiler/__init__.py
"""Support to control ecoal/esterownik.pl coal/wood boiler controller.""" import logging import voluptuous as vol from homeassistant.const import ( CONF_HOST, CONF_PASSWORD, CONF_USERNAME, CONF_MONITORED_CONDITIONS, CONF_SENSORS, CONF_SWITCHES, ) import homeassistant.helpers.config_validation ...
Python
0
@@ -83,16 +83,62 @@ ogging%0A%0A +from ecoaliface.simple import ECoalController%0A import v @@ -217,46 +217,8 @@ ONF_ -PASSWORD,%0A CONF_USERNAME,%0A CONF_ MONI @@ -233,16 +233,35 @@ NDITIONS +,%0A CONF_PASSWORD ,%0A CO @@ -291,16 +291,35 @@ ITCHES,%0A + CONF_USERNAME,%0A )%0Aimport @@ -2473,58 +...
56f193f1b0646cda9663389b805d7d80831ac6a4
fix a bug preventing the use of --force flag
cooler/cli/balance.py
cooler/cli/balance.py
# -*- coding: utf-8 -*- from __future__ import division, print_function from multiprocessing import Pool import sys import numpy as np import h5py import click from . import cli from .. import ice @cli.command() @click.argument( "cool_path") @click.option( "--nproc", "-p", help="Number of processes to s...
Python
0.000001
@@ -2664,16 +2664,17 @@ path, 'r ++ ') as h5
ff77d37b09c798ed68b27b5e91978a471408b437
Update __init__.py
tendrl/node_agent/objects/global_network/__init__.py
tendrl/node_agent/objects/global_network/__init__.py
from tendrl.commons.etcdobj import EtcdObj from tendrl.commons import objects class GlobalNetwork(objects.BaseObject): def __init__(self, interface=None, interface_id=None, ipv4=None, ipv6=None, netmask=None, subnet=None, status=None, sysfs_id=None, device_link=None, ...
Python
0.000072
@@ -1231,58 +1231,8 @@ cd%0A%0A - def load_definition(self):%0A return %7B%7D%0A%0A %0Acla
59a3e7e367dde6c6764e268550d2c80d84fffebb
Fix #1064, encode string before comparing
tensorflow/contrib/layers/python/layers/summaries.py
tensorflow/contrib/layers/python/layers/summaries.py
# Copyright 2015 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.000127
@@ -1453,24 +1453,28 @@ tag +.encode() == -str( old_tag -) :%0A
e444f9ff1d7b239e1b221a501b830bab5bf5eb2e
Don't try to summarize boolean tensors Change: 122845119
tensorflow/contrib/layers/python/layers/summaries.py
tensorflow/contrib/layers/python/layers/summaries.py
# Copyright 2015 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.999995
@@ -4071,15 +4071,67 @@ sors + and boolean tensors (not handled by the summaries) .%0A if +( tens @@ -4172,16 +4172,65 @@ .string) + or%0A tensor.dtype.base_dtype == dtypes.bool) :%0A re
09418049bd2441597acdf3c8ecbb3e6088044f62
Extend error message to include unexpected value and make debugging easier.
tensorflow_federated/python/core/impl/value_utils.py
tensorflow_federated/python/core/impl/value_utils.py
# Lint as: python3 # Copyright 2018, The TensorFlow Federated 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 ...
Python
0
@@ -3859,16 +3859,17 @@ 'The %7B +l %7D must b @@ -3943,26 +3943,55 @@ atedType -.'.format( + (got a %7Bt%7D).'.format(%0A l= label if @@ -4009,16 +4009,39 @@ 'value' +, t=comp.type_signature ))%0A v
8b00b2b019c52d72d5a0a8cfd923a36c4ab0d414
Test and hide deprecation warnign in unit tests
test/unit/keywords/test_keyword_arguments_element.py
test/unit/keywords/test_keyword_arguments_element.py
import unittest from mockito import mock, unstub, when from SeleniumLibrary.keywords import ElementKeywords class KeywordArgumentsElementTest(unittest.TestCase): def setUp(self): ctx = mock() ctx._browser = mock() self.element = ElementKeywords(ctx) def tearDown(self): unst...
Python
0
@@ -48,16 +48,45 @@ ub, when +%0Afrom robot.api import logger %0A%0Afrom S @@ -1109,17 +1109,16 @@ text')%0A -%0A @@ -1623,28 +1623,153 @@ -locator = '//div@id' +when(logger).warn(%22Using 'Get Element Attribute' without explicit %22%0A %22attribute is deprecated.%22, False)...
1bc661472b2e20fc3f5d1d97db7dd7e3e7dc0661
Fix the test bug with fetching the Encrypted property and fix doc comment
tests/client-dbus/tests/dbus/pool/test_properties.py
tests/client-dbus/tests/dbus/pool/test_properties.py
# Copyright 2020 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
@@ -835,16 +835,17 @@ me_list( +1 )%0A%0A%0Aclas @@ -913,32 +913,26 @@ th a - name and one filesystem +t least one device .%0A
da05f134da2f68f37a547e8979ed776cb73752e1
add temporary comments in test_CommunicationChannel.py
tests/unit/Concurrently/test_CommunicationChannel.py
tests/unit/Concurrently/test_CommunicationChannel.py
from AlphaTwirl.Concurrently import CommunicationChannel import unittest import time import os ##__________________________________________________________________|| class MockResult(object): def __init__(self, data = None): self.data = data ##______________________________________________________________...
Python
0
@@ -3467,24 +3467,136 @@ pass%0A%0A + # test repeating put and receive%0A%0A # test begin again anfter end%0A%0A # test when begin is called twice%0A%0A ##__________
6d30299d8083074ef7d1356e2e0d8084edb36feb
update stand-alone tests to use test stage work directory (#24129)
var/spack/repos/builtin/packages/eigenexa/package.py
var/spack/repos/builtin/packages/eigenexa/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 Eigenexa(AutotoolsPackage): """EigenExa is a high-performance eigenvalue solver.""" h...
Python
0
@@ -1671,32 +1671,94 @@ _sources(self):%0A + %22%22%22Save off benchmark files for stand-alone tests.%22%22%22%0A self.cac @@ -1825,164 +1825,262 @@ -test_dir = self.test_suite.current_test_data_dir%0A exe_name = join_path(test_dir, %22run-test.sh%22)%0A mpi_name = self.spec%5B%22mp...
bfcec696308ee8bfd226a54c17a7e15d49e2aed7
Add standard header, use spack helpers
var/spack/repos/builtin/packages/nextflow/package.py
var/spack/repos/builtin/packages/nextflow/package.py
from spack import * from glob import glob import os class Nextflow(Package): """Data-driven computational pipelines""" homepage = "http://www.nextflow.io" version('0.20.1', '0e4e0e3eca1c2c97f9b4bffd944b923a', url='https://github.com/nextflow-io/nextflow/releases/download/v0.20.1/nextflow', ...
Python
0
@@ -1,55 +1,1246 @@ -from spack import *%0Afrom glob import glob%0Aimport os +##############################################################################%0A# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.%0A# Produced at the Lawrence Livermore National Laboratory.%0A#%0A# This file is part of Sp...
4dee7d2b223ecf40d93645bc03be4c240ecdc7df
Add a conflict for patchelf to catch errors earlier in bootstrapping (#26373)
var/spack/repos/builtin/packages/patchelf/package.py
var/spack/repos/builtin/packages/patchelf/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) import os from spack import * class Patchelf(AutotoolsPackage): """PatchELF is a small utility to modify the dynamic...
Python
0
@@ -1397,24 +1397,97 @@ n='@0.12')%0A%0A + conflicts('%25gcc@:4.6', when='@0.10:', msg=%22Requires C++11 support%22)%0A%0A def url_
1c150a5423d994e90a3ee07f5e3d6fd0346adf44
fix JSON serialization on DIP upload
src/dashboard/src/components/archival_storage/atom.py
src/dashboard/src/components/archival_storage/atom.py
# This file is part of Archivematica. # # Copyright 2010-2016 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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 ...
Python
0
@@ -1779,18 +1779,253 @@ -if not val +# Calling %60getattr%60 to find an attribute deeper in the %60premis_object%60%0A # structure returns a non JSON serializable tuple instead of a None%0A # value. See Issues#743 for more information.%0A if not val or isinstance(val, tuple) :%0A
bcd272b80fdaca9f77a55e4c5ea276a3af94f0aa
update files
101-machine-learning-service-create/prereqs/Driver.py
101-machine-learning-service-create/prereqs/Driver.py
import os import json import numpy import joblib def init(): global model # note here "sklearn_regression_model.pkl" is the name of the model registered under model_path = os.path.join(os.getenv('AZUREML_MODEL_DIR'), 'sklearn_regression_model.pkl') # deserialize the model file back into a sklearn model...
Python
0.000001
@@ -1,14 +1,4 @@ -import os%0A impo @@ -22,140 +22,243 @@ mpy%0A -import joblib%0A%0Adef init():%0A global model%0A # note here %22sklearn_regression_model.pkl%22 is the name of the model registered under +from sklearn.externals import joblib%0Afrom azureml.core.model import Model%0Afrom azureml.contrib.service...
84fe4a0a838a9b5884a45dc035470b1436e37a3c
fix test
tests/chainer_tests/training_tests/extensions_tests/test_parameter_statistics.py
tests/chainer_tests/training_tests/extensions_tests/test_parameter_statistics.py
import re import time import unittest import mock import six import chainer from chainer.backends import cuda from chainer import testing from chainer import training from chainer.training import extensions def _get_mocked_trainer(links, stop_trigger=(10, 'iteration')): updater = mock.Mock() optimizer = moc...
Python
0.000002
@@ -1301,20 +1301,18 @@ cs else -None +%7B%7D ,%0A
03ed25cee706ff0e2e1a6d5e8202a6f0b790059f
modify comments
Importacions_F1_Q1/Fact_impF1_eliminar_Ja_existeix.py
Importacions_F1_Q1/Fact_impF1_eliminar_Ja_existeix.py
<<<<<<< HEAD #!/usr/bin/env python # -*- coding: utf-8 -*- from ooop import OOOP import configdb O = OOOP(**configdb.ooop) imp_obj = O.GiscedataFacturacioImportacioLinia imp_del_ids = imp_obj.search([('state','=','erroni'),('info','=','Aquest fitxer XML ja s\'ha processat en els següents IDs')]) imp_del_id...
Python
0
@@ -1,17 +1,4 @@ -%3C%3C%3C%3C%3C%3C%3C HEAD%0A #!/u @@ -1014,14 +1014,6 @@ %0D -%0A======= %0A%0A
6389552dcbda0161b708b4a9551faa5d2a13d764
Revert "just pull cases being updated without the ones from stock transactions [skip ci]"
corehq/form_processor/management/commands/archive_all_forms_for_user_in_domain.py
corehq/form_processor/management/commands/archive_all_forms_for_user_in_domain.py
from __future__ import absolute_import from __future__ import unicode_literals from __future__ import print_function from io import open from django.core.management.base import BaseCommand from casexml.apps.case.cleanup import rebuild_case_from_forms from corehq.apps.users.models import CouchUser from corehq.form_pr...
Python
0
@@ -247,16 +247,75 @@ m_forms%0A +from casexml.apps.case.xform import get_case_ids_from_form%0A from cor @@ -487,61 +487,8 @@ son%0A -from casexml.apps.case.xform import get_case_updates%0A from @@ -1367,29 +1367,24 @@ -form_ case_ids = set(c @@ -1379,107 +1379,55 @@ _ids - = set(cu.id for cu in get_c...
e677be23700fbb664aaf96976cd7703dc7b34681
remove prints
filer_addons/filer_utils/management/commands/subcommands/import_existing_files.py
filer_addons/filer_utils/management/commands/subcommands/import_existing_files.py
import os import re from filer.models import File, Image, Folder from filer_addons.filer_utils.management.commands.subcommands.base import SubcommandsCommand def is_image(filename): name, ext = os.path.splitext(filename) if ext.lower()[1:] in ['jpg', 'jpeg', 'gif', 'png', 'tif', 'tiff']: return True ...
Python
0.000012
@@ -1166,30 +1166,8 @@ s):%0A - print(%22what%22)%0A @@ -1952,96 +1952,28 @@ -print(filename)%0A if not len(matches):%0A print(filename) +if not len(matches): %0A
46b76c96309cdeb435502a7ee96c672edc2abee7
Update binary-tree-longest-consecutive-sequence-ii.py
Python/binary-tree-longest-consecutive-sequence-ii.py
Python/binary-tree-longest-consecutive-sequence-ii.py
# Time: O(n) # Space: O(h) # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def longestConsecutive(self, root): """ :type root: TreeNode :rtype:...
Python
0.074421
@@ -423,16 +423,19 @@ return 0 +, 0 %0A
e81b1ce7536ce32e022fb3132f8468d2472b2e31
Improve logging of openended extension
atlas/prodtask/management/commands/extendopenended.py
atlas/prodtask/management/commands/extendopenended.py
from django.core.management.base import BaseCommand, CommandError from atlas.prodtask.open_ended import check_open_ended class Command(BaseCommand): args = '<request_id, request_id>' help = 'Extend open ended requests' def handle(self, *args, **options): if not args: try: ...
Python
0.000001
@@ -59,16 +59,28 @@ ndError%0A +import time%0A from atl @@ -275,17 +275,81 @@ tions):%0A + self.stdout.write('Start open ended at %25s'%25time.ctime()) %0A - @@ -593,10 +593,27 @@ xtension -' +: %25s'%25time.ctime() )
9adb349931a1d5030b3c7cbc69a1ec5ae608744b
fix careless process_request logic
bloodhound_multiproduct/multiproduct/ticket/web_ui.py
bloodhound_multiproduct/multiproduct/ticket/web_ui.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
Python
0.000375
@@ -2405,12 +2405,19 @@ -if ( +pathinfo = req. @@ -2425,19 +2425,122 @@ ath_info - == +%0A prod = req.args.get('product')%0A if ((prod is not None and pathinfo == '/' + prod + '/newti @@ -2544,16 +2544,17 @@ wticket' +) or%0A @@ -2568,35 +2568,21 @@ -'/' + req.args%5B'produ...
0325ad9244835fac724126f918b049a145f6cdb7
Add documentation for DNSimple
certbot-dns-dnsimple/certbot_dns_dnsimple/__init__.py
certbot-dns-dnsimple/certbot_dns_dnsimple/__init__.py
"""DNSimple DNS Authenticator"""
Python
0
@@ -1,33 +1,2726 @@ %22%22%22 -DNSimple DNS Authenticator +%0AThe %60~certbot_dns_dnsimple.dns_dnsimple%60 plugin automates the process of%0Acompleting a %60%60dns-01%60%60 challenge (%60~acme.challenges.DNS01%60) by creating, and%0Asubsequently removing, TXT records using the DNSimple API.%0A%0A%0ANamed Arguments%0A-...
5fc0b0408f29d50eab98d4181a91ca072745f552
add supress comment for lgtm
Scripts/ExtractDomainAndFQDNFromUrlAndEmail/ExtractDomainAndFQDNFromUrlAndEmail.py
Scripts/ExtractDomainAndFQDNFromUrlAndEmail/ExtractDomainAndFQDNFromUrlAndEmail.py
import demistomock as demisto from CommonServerPython import * # gtm [py/polluting-import] from tld import get_tld from validate_email import validate_email from urlparse import urlparse, parse_qs from urllib import unquote import re PROOFPOINT_PREFIXES = ['https://urldefense.proofpoint.com/v1/url?u=', 'https://urld...
Python
0
@@ -59,16 +59,17 @@ rt * # +l gtm %5Bpy/
8550cba51ce8eabe25f678b3c41a0780d7edca8a
add missing format_bytes to util
plugins/holland.backup.mysql_lvm/holland/backup/mysql_lvm/plugin/mysqldump/util.py
plugins/holland.backup.mysql_lvm/holland/backup/mysql_lvm/plugin/mysqldump/util.py
"""Utility functions to help out the mysql-lvm plugin""" import os import shutil import tempfile import logging from holland.core.exceptions import BackupError from holland.lib.mysql import PassiveMySQLClient, MySQLError, \ build_mysql_config, connect from holland.lib.compression import op...
Python
0.000025
@@ -153,16 +153,63 @@ upError%0A +from holland.core.util.fmt import format_bytes%0A from hol
710f6cc458948e6e404d625ac3d8372cfd1ed304
update swarm config
sequence_prediction/continuous_sequence/swarm_description/SWARM_CONFIG_nyc_taxi.py
sequence_prediction/continuous_sequence/swarm_description/SWARM_CONFIG_nyc_taxi.py
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013-2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This p...
Python
0.000001
@@ -1014,34 +1014,30 @@ elds%22: %5B%0A - # %7B%0A - # %22fieldNam @@ -1052,26 +1052,24 @@ eofday%22,%0A - # %22fieldTyp @@ -1081,26 +1081,24 @@ string%22,%0A - # %22maxValue @@ -1110,20 +1110,18 @@ 00,%0A -# - %22minValu @@ -1125,26 +1125,24 @@ alue%22: 0%0A - # %7D,%0A ...
071ea9f0df13c6e08438b0592d8dd9a9201411cf
drop email argparse for now
repomator.py
repomator.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """The module aims to handle gentoo arch-specific processes automatically. TODO: rewrite it using appropriate bugzilla rest-api class""" import argparse import os import re import sys from bugzilla import bugtracker def check_existence(path): """The function perf...
Python
0
@@ -1214,75 +1214,8 @@ ue)%0A -parser.add_argument('-e', '--email', help='specify email address')%0A pars
4fe3ad62bd5c4c9c36178f76d9a14867342a7fef
Add support for nested groups
click_help_colors/__init__.py
click_help_colors/__init__.py
import click from click.termui import _ansi_colors, _ansi_reset_all def _colorize(text, color=None): if not color: return text try: return '\033[%dm' % (_ansi_colors.index(color) + 30) + text + _ansi_reset_all except ValueError: raise TypeError('Unknown color %r' % color) class H...
Python
0
@@ -2390,32 +2390,341 @@ args, **kwargs)%0A + %0A def group(self, *args, **kwargs):%0A kwargs.setdefault('cls', HelpColorsGroup)%0A kwargs.setdefault('help_headers_color', self.help_headers_color)%0A kwargs.setdefault('help_options_color', self.help_options_color)%0A return super(...
134be3493966c834a619b86027c2d627e92bf067
Fix up RHL-9 with the new output_disk parameter.
oz/RHL.py
oz/RHL.py
# Copyright (C) 2010,2011 Chris Lalancette <clalance@redhat.com> # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; # version 2.1 of the License. # This library is distributed in the hope...
Python
0.000001
@@ -3329,16 +3329,29 @@ ig, auto +, output_disk )%0A if
8abcb8490453668d45ebac6c6c9a55348dcbb8c2
factor out filenames
p4shim.py
p4shim.py
import datetime import io import os import re import subprocess import sys import time args = sys.argv[1:] log = open(r'c:\dev\tools\studio-vs-perforce\p4shim.txt', 'a') stamp = datetime.datetime.now() def extricate(flag, envname): global args if flag in args: p_at = args.index(flag) value = a...
Python
0.999999
@@ -93,45 +93,142 @@ %0D%0A%0D%0A -args = sys.argv%5B1:%5D%0D%0A%0D%0Alog = open(r'c +lockfile = r'C:%5Cdev%5Ctools%5Cstudio-vs-perforce%5Cp4shim.lock'%0D%0Alogfile = r'C:%5Cdev%5Ctools%5Cstudio-vs-perforce%5Cp4shim.txt'%0D%0Apasswordfile = r'C :%5Cde @@ -261,20 +261,70 @@ %5Cp4shim. -txt' +password'%0D%0A%0D%0Aargs...
0a1eab41aeaa5f075bb9490d4422a64769dec535
Make query property handle unicode querystr
resources.py
resources.py
# encoding: utf-8 import urlparse import wkz_urls import wkz_datastructures class _RI(object): def __init__(self, ri, encoding=None, query_cls=None): self.encoding = encoding #NOTE: might be better to subclass instead of pass a query_cls around if query_cls is None: query_cls...
Python
0.000276
@@ -1635,16 +1635,205 @@ ls.%22%22%22%0A%0A + encoding = self.encoding%0A querystr = self.querystr%0A if isinstance(querystr, unicode):%0A encoding = 'utf-8'%0A querystr = querystr.encode(encoding)%0A%0A @@ -1872,16 +1872,16 @@ uery'):%0A - @@ -1958,25 +1...
4f2945a2e7891bfaa68b7e301e18d34032204127
Stop writing to sys.stdout
rpdb/__init__.py
rpdb/__init__.py
"""Remote Python Debugger (pdb wrapper).""" __author__ = "Bertrand Janin <b@janin.com>" __version__ = "0.1.3" import pdb import socket import sys class Rpdb(pdb.Pdb): def __init__(self, addr="127.0.0.1", port=4444): """Initialize the socket and initialize pdb.""" # Writes to stdout are forbidd...
Python
0
@@ -366,21 +366,32 @@ -print +sys.stderr.write (%22pdb is @@ -407,16 +407,18 @@ on %25s:%25d +%5Cn %22 %25 (add
a4acd7c50d9b1705b130663c23c2f0a2eaace863
Fix a broken Last.fm url
ditto/lastfm/urls.py
ditto/lastfm/urls.py
from django.conf.urls import url from . import views # The pattern for matching an Album/Artist/Track slug: slug_chars = '[\w.,:=@&+%()$!-]+' urlpatterns = [ url( regex=r"^$", view=views.HomeView.as_view(), name='home' ), url( regex=r"^library$", view=views.Scrob...
Python
0.999985
@@ -133,16 +133,17 @@ @&+%25()$! +%C2%B0 -%5D+'%0A%0A%0Au
d5f367910ba963bdbb344144f6572ab160615d60
Add check for cuda availability
lib/models/faster_rcnn.py
lib/models/faster_rcnn.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2016 Shunta Saito from chainer import reporter from chainer import Variable from chainer.cuda import to_gpu from lib.faster_rcnn.bbox_transform import bbox_transform_inv from lib.faster_rcnn.bbox_transform import clip_boxes from lib.faster_rcnn.proposal_ta...
Python
0
@@ -1689,32 +1689,77 @@ k(x)%0A if +chainer.cuda.available %5C%0A and isinstance(im_in @@ -3707,35 +3707,36 @@ bels, volatile=' -off +auto ')%0A b @@ -3786,11 +3786,12 @@ le=' -off +auto ')%0A
3ae76d7338c967bcf60216c5ec46f6406de45116
Support directory as local URI
lib/oelite/fetch/local.py
lib/oelite/fetch/local.py
import oelite.fetch import oelite.path import os import hashlib class LocalFetcher(): SUPPORTED_SCHEMES = ("file") def __init__(self, uri, d): if not uri.scheme in self.SUPPORTED_SCHEMES: raise Exception( "Scheme %s not supported by oelite.fetch.UrlFetcher"%(scheme)) ...
Python
0
@@ -1195,16 +1195,148 @@ pass%0A + if os.path.isdir(self.localpath):%0A raise oelite.fetch.NoSignature(self.uri, %22can't compute directory signature%22)%0A
dab6a99cb3649fd8343d9bb44f7e826975fc1b30
Update proposal_layer.py
lib/rpn/proposal_layer.py
lib/rpn/proposal_layer.py
# -------------------------------------------------------- # Faster R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick and Sean Bell # -------------------------------------------------------- import caffe import numpy as np import yaml from fast_r...
Python
0.000001
@@ -844,17 +844,16 @@ aram_str -_ )%0A%0A
7304b266cb9e0abba86f351148d8366a72e203fa
Update Bot.py
Plugins/Bot.py
Plugins/Bot.py
import discord from discord.ext import commands import random import asyncio from datetime import datetime import Dependencies class Bot(): def __init__(self, bot): self.bot = bot # Commands # Role Command @commands.command(pass_context = True) async def role(self, ctx, a...
Python
0.000002
@@ -4109,17 +4109,17 @@ els, id= -d +D ependenc
7da9053c97a889e34cb334d5c0e8872a937a1585
add missing tearDownClass
corehq/apps/sms/tests/update_location_keyword_test.py
corehq/apps/sms/tests/update_location_keyword_test.py
from django.test.testcases import TestCase from corehq.apps.accounting.tests.utils import DomainSubscriptionMixin from corehq.apps.accounting.models import SoftwarePlanEdition from corehq.apps.domain.models import Domain from corehq.apps.locations.models import Location, LocationType from corehq.apps.sms.api import inc...
Python
0.998633
@@ -3325,8 +3325,71 @@ ption()%0A +%0A super(UpdateLocationKeywordTest, cls).tearDownClass()%0A
d4a211a0f1905c3ef597d63440d04deb78659e96
Fix Python 3.2 test failure.
libcloud/utils/iso8601.py
libcloud/utils/iso8601.py
""" Copyright (c) 2007 Michael Twomey 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, distribute,...
Python
0.999999
@@ -1375,16 +1375,59 @@ ort re%0A%0A +from libcloud.utils.py3 import basestring%0A%0A __all__
e21e971c67954b1d0f5ca2ee41518322f259a96b
handle case in which one swapString is empty
SwapStrings.py
SwapStrings.py
import sublime, sublime_plugin class SwapStringsCommand(sublime_plugin.TextCommand): def run(self, edit, stringA=None, stringB=None): if not stringA and not stringB: inputView = sublime.active_window().show_input_panel( "Specify the strings which shall be swapped. <> functions as a separator.", ...
Python
0.999878
@@ -714,16 +714,102 @@ egion)%0D%0A +%0D%0A%09%09%09%09if stringB == %22%22:%0D%0A%09%09%09%09%09regionStr = regionStr.replace(stringA, %22%22)%0D%0A%09%09%09%09else:%0D%0A%09 %09%09%09%09swap @@ -871,18 +871,17 @@ ngB)%0D%0A%0D%0A -%0D%0A +%09 %09%09%09%09regi @@ -897,24 +897,25 @@ egionStr %5C%0D%0A +%09 %09%09...
29393bef20ab33da2844571dd50bd73308adf5e2
use time.clock
astrolabe/instant.py
astrolabe/instant.py
from time import time CONVERSION_FACTOR = 1 def instant(): return time()
Python
0.002888
@@ -10,20 +10,21 @@ import -time +clock %0A%0ACONVER @@ -67,15 +67,16 @@ return -time +clock ()%0A
6632157febfed7ce99fa1aaecb72393b0301d3aa
Make empty migration authent 3
geotrek/authent/migrations/0003_auto_20181203_1518.py
geotrek/authent/migrations/0003_auto_20181203_1518.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.core.management import call_command from django.conf import settings def add_permissions(apps, schema_editor): if 'geotrek.infrastructure' in settings.INSTALLED_APPS: call_command('update_geotrek_...
Python
0.005043
@@ -95,2108 +95,8 @@ ons%0A -from django.core.management import call_command%0Afrom django.conf import settings%0A%0A%0Adef add_permissions(apps, schema_editor):%0A if 'geotrek.infrastructure' in settings.INSTALLED_APPS:%0A call_command('update_geotrek_permissions', verbosity=0)%0A UserModel = apps.ge...
f85202d64cf2520b4ad9e2cca77d6b49336a044a
Bump version to 3.5.0a17
platformio/__init__.py
platformio/__init__.py
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
Python
0
@@ -637,17 +637,17 @@ 5, %220a1 -6 +7 %22)%0A__ver
b14abeff48ae46c849848bec15052b448a24634a
Bump version to 4.0.0a13
platformio/__init__.py
platformio/__init__.py
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
Python
0
@@ -625,17 +625,17 @@ 0, %220a1 -2 +3 %22)%0A__ver
4efae77c0c290cae919477c438cb1f02d86837c9
convert to new open source trigger
plot_raw_timeseries.py
plot_raw_timeseries.py
import pylab import numpy as np import sys import tables import fview_ext_trig.easy_decode as easy_decode import matplotlib.ticker as mticker if 1: fname = sys.argv[1] h5 = tables.openFile(fname,mode='r') stroke_data=h5.root.stroke_data[:] stroke_times = stroke_data['trigger_timestamp'] time_d...
Python
0.998119
@@ -58,16 +58,23 @@ %0Aimport +motmot. fview_ex
44a588869e427d5f83f6c84d204d1560805e6f89
Increase timeout for update check (#1726)
CTFd/utils/updates/__init__.py
CTFd/utils/updates/__init__.py
import sys import time from distutils.version import StrictVersion from platform import python_version import requests from flask import current_app as app from CTFd.models import Challenges, Teams, Users, db from CTFd.utils import get_app_config, get_config, set_config from CTFd.utils.config import is_setup from CTF...
Python
0
@@ -2002,11 +2002,9 @@ out= -0.1 +3 %0A
284c82863a1bdf8c192ca04ca424dadcca1c7bc7
scale the frequency plot correctly after decimation
FPGA/rxadc_2/python/tst_cic.py
FPGA/rxadc_2/python/tst_cic.py
#!/usr/bin/python3 # # CIC decimator test bench # # 07-23-2015 E. Brombaugh import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import scipy.signal as signal from scipy.fftpack import fft, ifft, fftfreq, fftshift from ddc import cic_dec # generate a signal data_len = 2**16 Fs = 40e6 Fc = 20e3 ...
Python
0.000014
@@ -969,18 +969,20 @@ (2)%0Af = -Fs +rate * fftsh @@ -1332,18 +1332,20 @@ im((0, ( -Fs +rate /1e6)/2)
63c71984af465d6d9db33201a5926f3070291e36
Test suite now separated compounds, reactions, and enzymes
PyFBA/tests/test_model_seed_parsing.py
PyFBA/tests/test_model_seed_parsing.py
import os import sys import unittest import PyFBA MODELSEED_DIR = "" if 'ModelSEEDDatabase' in os.environ: MODELSEED_DIR = os.environ['ModelSEEDDatabase'] else: sys.stderr.write("Please ensure that you install the Model SEED Database somewhere, and set the environment " + "variable Mo...
Python
0
@@ -1297,35 +1297,24 @@ n =%0A%0A - compounds, reactions = @@ -1415,35 +1415,24 @@ '%3C')%0A - compounds, reactions = @@ -3004,27 +3004,16 @@ %0A - compounds, reactio @@ -3522,62 +3522,8 @@ you%0A - self.assertGreaterEqual(len(compounds), 56767) %0A
3be29f82881e19252c1347a62eac44377079b55a
Remove cmd/ prefix
test/startservers.py
test/startservers.py
import atexit import BaseHTTPServer import errno import os import shutil import signal import socket import subprocess import sys import tempfile import threading import time class ToSServerThread(threading.Thread): class ToSHandler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(self): sel...
Python
0.000131
@@ -1914,36 +1914,32 @@ gs = %5B%0A ' -cmd/ boulder-wfe',%0A @@ -1937,36 +1937,32 @@ -wfe',%0A ' -cmd/ boulder-ra',%0A @@ -1959,36 +1959,32 @@ r-ra',%0A ' -cmd/ boulder-sa',%0A @@ -1981,36 +1981,32 @@ r-sa',%0A ' -cmd/ boulder-ca',%0A @@ -2003,36 +2003,32 @@ r-ca',%0A ...
4bcdce00d43caf8e396a7bd186238e35d784bc06
Test `tec.TECBase.calc_interelectrode_spacing` typ
test/test_TECBase.py
test/test_TECBase.py
# -*- coding: utf-8 -*- import numpy as np from tec.electrode import Metal from tec import TECBase from astropy import units import unittest import copy em = Metal(temp=1000., barrier=2., richardson=10.) co = Metal(temp=300., barrier=1., richardson=10., position=10.) class TestBaseWithTEC(unittest.TestCase): """...
Python
0
@@ -4628,16 +4628,246 @@ ntity)%0A%0A + def test_calc_interelectrode_spacing(self):%0A %22%22%22%0A calc_interelectrode_spacing should return astropy.units.Quantity%0A %22%22%22%0A self.assertIsInstance(self.t.calc_interelectrode_spacing(), units.Quantity)%0A%0A %0Aclass C
2fbf927113aaaeae9ec533814609d5c835d4604a
check that files are written
test/test_closing.py
test/test_closing.py
#!/usr/bin/python import unittest import RMF import shutil class GenericTest(unittest.TestCase): def _show(self, g): for i in range(0, g.get_number_of_children()): print i, g.get_child_name(i), g.get_child_is_group(i) """Test the python code""" def test_perturbed(self): """Test ...
Python
0.000001
@@ -63,19 +63,13 @@ ass -Generic Test +s (uni @@ -863,16 +863,792 @@ es), 0)%0A + def test_perturbed_2(self):%0A %22%22%22Test reopening an RMF file%22%22%22%0A for suffix in %5B%22rmf%22, %22rmf2%22%5D:%0A name=RMF._get_temporary_file_path(%22test_file.%22+suffix)%0A print n...
5a72f9dcee994077483a801d4bc03a013cf91186
Add skeleton for RequestProcess integration tests
test/test_request.py
test/test_request.py
import jsonschema import pytest from itertools import product from copy import deepcopy from mock import MagicMock, patch from kitten.server import KittenServer from kitten.request import KittenRequest from test.mocks import MockDatabaseMixin class RequestMixin(object): def setup_method(self, method): ...
Python
0
@@ -3227,24 +3227,219 @@ pc, ack)%0A%0A%0A +class TestRequestProcessIntegration(RequestMixin):%0A def setup_method(self, method):%0A self.socket = MagicMock()%0A super(TestRequestProcessIntegration, self).setup_method(method)%0A%0A%0A class TestRe
a03d406bd61d45ca4ca3f7367146d9a08d81d4c0
test boundary cases
test/unit/version.py
test/unit/version.py
from gitflow import version from gitflow.version import VersionConfig config = VersionConfig() config.qualifiers = ['alpha', 'beta'] def test_major_increment(): assert version.version_bump_major(config, "0.0.0").value == "1.0.0-alpha.1" assert version.version_bump_major(config, "1.0.0-beta.4").value == "2.0....
Python
0.000001
@@ -623,32 +623,112 @@ %220.0.1-alpha.1%22%0A + assert version.version_bump_patch(config, %221.0.5%22).value == %221.0.6-alpha.1%22%0A assert versi @@ -992,24 +992,104 @@ 0.0-beta.1%22%0A + assert version.version_bump_qualifier(config, %221.0.0-beta.4%22).value is None%0A %0A%0Adef test_p @@ -1178,32 +117...
560cefff06f3e8b288c9ceecf6c84438c4d9783b
implement -z mode for statistics
diylsi/statistics.py
diylsi/statistics.py
import argparse, json, multiprocessing, os, re, sys # all functions in this library take a disk info dict as input def poll_smart_status(diskinfo): data = os.popen("/opt/omni/sbin/smartctl -a -d sat,12 /devices/scsi_vhci/disk@g%s:a,raw |grep self-assess" % diskinfo['guid']).readlines()[0] #data = os.popen("/o...
Python
0
@@ -1242,16 +1242,499 @@ n data%0A%0A +def filter_zero_stats(disklist):%0A hard = %5B'transport', 'media', 'not-ready', 'no-device'%5D%0A nzdisks = list()%0A for disk in disklist:%0A if disk%5B'smart-status'%5D != 'PASSED':%0A nzdisks.append(disk)%0A continue%0A for field i...
40172c5dd09435aad8aff1083903810ccddff29b
add searching and paging to the data endpoint
django/data/views.py
django/data/views.py
import json from django.core import serializers from django.http import JsonResponse from .models import Variant def index(request): # Convert django's model representation to the format # expected by the frontend header = map(lambda field: field.name, Variant._meta.get_fields()) rows = list(Varia...
Python
0
@@ -6,16 +6,45 @@ t json%0A%0A +from operator import __or__%0A%0A from dja @@ -107,16 +107,47 @@ Response +%0Afrom django.db.models import Q %0A%0Afrom . @@ -169,17 +169,16 @@ ariant%0A%0A -%0A def inde @@ -193,222 +193,932 @@ t):%0A + %0A -# Convert django's model representation to the format%0A # e...
723b405b1defad5d6284d99bb3af4f3c224844a8
Update ER docstring
inverse_covariance/profiling/erdos_renyi_graph.py
inverse_covariance/profiling/erdos_renyi_graph.py
from __future__ import absolute_import import numpy as np from sklearn.datasets import make_sparse_spd_matrix from .graphs import Graph class ErdosRenyiGraph(Graph): """Returns the adjacency matrix for Erdos-Renyi network via .create(). Parameters ----------- spd_low : float (0, 1) Equiva...
Python
0.000001
@@ -903,94 +903,191 @@ -# TODO: Better comment on this parameter.%0A The complexity / sparsity factor +The complexity / sparsity factor.%0A This is (1 - alpha_0) in sklearn.datasets.make_sparse_spd_matrix %0A where alpha_0 is the probability that a coefficient is zero .%0A
2f86492b02aaf5d1ccc8abc02d5cc711819ed8ef
Change Release.license to TextField (someone seems to be sending their whole LICENSE.txt file!)
djangopypi/models.py
djangopypi/models.py
""" models.py Copyright (c) 2009, Ask Solem All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions an...
Python
0
@@ -2702,34 +2702,18 @@ els. -Char +Text Field( -max_length=255, blan
fee68245ca1980062aae12f5fa967cd6e3b55b59
Resolve conflicts.
Lib/vanilla/vanillaEditText.py
Lib/vanilla/vanillaEditText.py
from AppKit import * from vanillaBase import VanillaBaseControl, VanillaCallbackWrapper class VanillaEditTextDelegate(VanillaCallbackWrapper): _continuous = True def controlTextDidChange_(self, notification): if self._continuous: self.action_(notification.object()) def controlTextDi...
Python
0.000001
@@ -2491,29 +2491,16 @@ xtField%0A -%3C%3C%3C%3C%3C%3C%3C HEAD%0A nsTe @@ -2549,75 +2549,8 @@ gate -%0A=======%0A delegateClass = VanillaEditTextDelegate%0A%3E%3E%3E%3E%3E%3E%3E master %0A%0A @@ -3817,21 +3817,8 @@ ne:%0A -%3C%3C%3C%3C%3C%3C%3C HEAD%0A @@ -3884,87 +3884,8 @@ ck)%0A -=======%0A ...
6b1df5bdc1d89fc3ba008eab2d2955e2234de317
make trailing slash on authenticate URLs optional
authenticate/urls.py
authenticate/urls.py
from django.conf.urls import patterns, url __author__ = 'swhite' urlpatterns = patterns('authenticate.views', url(r'^login/$', 'login_view', name="login"), url(r'^logout/$', 'logout_view', name="logout"), url(r'^login_failed/$', 'login_failed', name="login_failed"), )
Python
0.000001
@@ -122,16 +122,17 @@ '%5Elogin/ +? $', 'log @@ -174,16 +174,17 @@ %5Elogout/ +? $', 'log @@ -234,16 +234,17 @@ _failed/ +? $', 'log
21e238fb49338992f846cfa22ed5638325cbd425
Correct dependent migration
jobs/migrations/0028_promote_pbf_export_format.py
jobs/migrations/0028_promote_pbf_export_format.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from ..models import ExportFormat class Migration(migrations.Migration): def promote_pbf_export_format(apps, schema_editor): ExportFormat = apps.get_model('jobs', 'ExportFormat') ExportFormat...
Python
0.000004
@@ -466,9 +466,9 @@ '000 -3 +1 _aut @@ -479,15 +479,15 @@ 1510 -27_1807 +03_1441 '),%0A
8d9de16b41b52edaddf5ff6f5fb434b83f5fddd5
resolve conflict in optimize
autodiff/optimize.py
autodiff/optimize.py
""" SciPy-based function optimization """ import numpy as np import scipy from autodiff.symbolic import VectorArg import autodiff.utils as utils __all__ = ['fmin_cg', 'fmin_l_bfgs_b'] def fmin_cg(fn, args, **scipy_kwargs): """ Minimize a scalar valued function using SciPy's nonline...
Python
0.000022
@@ -141,17 +141,16 @@ utils%0A%0A -%0A __all__ @@ -162,16 +162,28 @@ min_cg', + 'fmin_ncg', 'fmin_l @@ -213,38 +213,19 @@ (fn, -%0A args,%0A + init_args, **s @@ -366,32 +366,37 @@ meter guess is ' +init_ args'.%0A%0A %22%22%22%0A @@ -392,32 +392,37 @@ .%0A%0A %22%22%22%0A%0A ...
08d60c54fb92c1c0092bb071e3ca964d7569fd5c
Add some error handling that will output a formatted message.
sunlight/cli.py
sunlight/cli.py
import json import itertools from clint import arguments from clint.textui import puts, puts_err, indent, colored import sunlight def main(): args = arguments.Args() services = sunlight.available_services() service = services.get(args.get(0), None) if service is not None: available_methods =...
Python
0
@@ -730,16 +730,37 @@ _args))%0A + try:%0A @@ -820,16 +820,332 @@ params)%0A + except Exception as e:%0A error_name = e.__class__.__name__ if e.__class__.__name__ != 'type' else 'Error'%0A puts_err(colored.red(%22%7B%7D:%22.format(error_name)))%0A ...
092c3205a475d8230a113b798f89e754d0902a59
remove superflous list()
sunpy/io/jp2.py
sunpy/io/jp2.py
"""JPEG 2000 File Reader""" from __future__ import absolute_import, division, print_function __author__ = "Keith Hughitt" __email__ = "keith.hughitt@nasa.gov" from xml.etree import cElementTree as ET from glymur import Jp2k from sunpy.util.xml import xml_to_dict from sunpy.io.header import FileHeader __all__ = ['r...
Python
0.000001
@@ -1148,13 +1148,8 @@ in -list( pydi @@ -1158,17 +1158,16 @@ .items() -) :%0A
735debaba58c9b09d393279391eda4955df1312a
move repo cloning into setUp
run/shas_test.py
run/shas_test.py
#!/usr/bin/env python # Copyright 2017 The WPT Dashboard Project. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import mock import os import shas import shutil import subprocess import unittest from datetime import date here...
Python
0.000001
@@ -309,16 +309,61 @@ t date%0A%0A +%0Aclass TestSHAFinder(unittest.TestCase):%0A here = o @@ -387,16 +387,20 @@ file__)%0A + wptd_dir @@ -428,16 +428,20 @@ '../')%0A + target_d @@ -461,16 +461,25 @@ abspath( +%0A os.path. @@ -541,117 +541,208 @@ mp') -)%0A%0A%0Aif os.path.exists(target_di...
e1d76e8ac5270f6abc18137cce0f103ca567709f
Fix bug in image2 widget
libqtile/widget/image2.py
libqtile/widget/image2.py
from __future__ import division import os import cairocffi from . import base from .. import bar from .. import images class Image2(base._Widget, base.MarginMixin): """Display an image on the bar""" orientations = base.ORIENTATION_BOTH defaults = [ ('loaded_image', None, 'image created by libqt...
Python
0
@@ -938,12 +938,25 @@ mat( -limg +self.loaded_image ))%0A%0A
959a568075efb7706d3e80e34470dbb807cdf29d
Update arm.py
avatar2/archs/arm.py
avatar2/archs/arm.py
# from capstone import CS_ARCH_ARM, CS_MODE_LITTLE_ENDIAN, CS_MODE_BIG_ENDIAN from capstone import * from keystone import * from unicorn import * from unicorn.arm_const import * from .architecture import Architecture import avatar2 from avatar2.installer.config import QEMU, PANDA, OPENOCD, GDB_ARM class ARM(Architec...
Python
0.000001
@@ -104,24 +104,39 @@ rom keystone +.keystone_const import *%0Afr
9c471891fcb1c0c7e2555c618a53186e53abad25
Update nic.py
azurecloudify/nic.py
azurecloudify/nic.py
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
Python
0.000001
@@ -3828,24 +3828,32 @@ iption_id'%5D%0A + %22%22%22%0A credenti @@ -3979,24 +3979,32 @@ redentials%7D%0A + %22%22%22%0A resource @@ -5646,16 +5646,19 @@ ead%0A%22%22%22%0A +%22%22%22 %0Adef get @@ -6230,16 +6230,19 @@ n token%0A +%22%22%22 %0A%0Adef _v
0abf5ea9e0b093cba2107e482186a37c63dd243f
use call instead of check_call
baanprint/bwprint.py
baanprint/bwprint.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import shutil import logging #import tempfile from time import time, sleep from baanprint import config from subprocess import check_call as call from pyPdf import PdfFileWriter, PdfFileReader from argh import ArghParser, command from yapsy.PluginManager import...
Python
0
@@ -183,22 +183,8 @@ ort -check_call as call
e9ee6aae523905e9efa30033663a3be695a6b863
bump to next dev version
planet/__version__.py
planet/__version__.py
__version__ = '2.0a5'
Python
0
@@ -16,7 +16,10 @@ 2.0a -5 +6dev '%0A
35415401101966edd4df5cdfe5239a19bbf884be
Enable basic shortcuts for the show commit panel
core/commands/show_commit_info.py
core/commands/show_commit_info.py
from contextlib import contextmanager from functools import lru_cache import sublime from sublime_plugin import WindowCommand from . import intra_line_colorizer from ..git_command import GitCommand from ..runtime import enqueue_on_worker, enqueue_on_ui, throttled MYPY = False if MYPY: from typing import Dict, T...
Python
0
@@ -810,16 +810,83 @@ syntax)%0A + output_view.settings().set(%22git_savvy.show_commit_view%22, True)%0A retu @@ -3778,36 +3778,36 @@ vvy.show_commit_ -info +view .commit%22)%0A if @@ -3935,20 +3935,20 @@ _commit_ -info +view .commit%22
09a2323bcfc47b00d71846ac69022a3dbae2b031
Bump to version 0.0.7
backache/__init__.py
backache/__init__.py
from . core import * from . antioxidant import ( # flake8: noqa AsyncOperationContext, celerize, ProcessingInQuarantineException, ) from . errors import * __version__ = (0, 0, 6)
Python
0
@@ -187,7 +187,7 @@ 0, -6 +7 )%0A
a9433c6e126cf0a6e88cda35772d6b429cd48fe9
replace repetitive visitor with generic table visit
ibis/backends/base/sql/compiler/extract_subqueries.py
ibis/backends/base/sql/compiler/extract_subqueries.py
from collections import Counter import ibis.expr.operations as ops import ibis.expr.types as ir class ExtractSubqueries: __slots__ = "query", "counts" def __init__(self, query): self.query = query self.counts = Counter() @classmethod def extract(cls, select_stmt): helper = c...
Python
0.01257
@@ -1068,24 +1068,224 @@ table(expr)%0A + elif isinstance(node, ops.TableNode):%0A for arg in node.flat_args():%0A if isinstance(arg, ir.Table):%0A self.visit(arg)%0A self.observe(expr)%0A elif @@ -1954,1036 +1954,200 @@ sit_ -Aggregation(self, e...
3c94e7c138ae592c27f270717037dfa2b935c5c8
Use the routing key to specify broadcast namespace.
sutro/source.py
sutro/source.py
import logging import socket import gevent import haigha.connection EXCHANGE = "sutro" LOG = logging.getLogger(__name__) class MessageSource(object): """An AMQP based message source. This will monitor a fanout exchange on AMQP and signal on receipt of any messages. """ def __init__(self, hos...
Python
0
@@ -1619,52 +1619,34 @@ age. -properties%5B%22application_headers%22%5D%5B%22namespace +delivery_info%5B%22routing_key %22%5D%0A
0324d220872ef063cb39ce62264bd4835f260920
Replace str into call in url
test_project/urls.py
test_project/urls.py
from django.conf.urls import include, url from django.contrib import admin from django.views.generic import RedirectView from test_app.models import DummyModel, MushroomSpot from test_app.views import DummyDocumentOdt, DummyDocumentWeasyprint from mapentity.registry import registry handler403 = 'mapentity.views.hand...
Python
0.000225
@@ -277,16 +277,68 @@ egistry%0A +from django.contrib.auth import views as auth_views%0A %0A%0Ahandle @@ -758,37 +758,21 @@ gin/$', -'django.contrib. auth -. +_ views.lo @@ -774,17 +774,16 @@ ws.login -' , name=' @@ -817,29 +817,13 @@ $', -'django.contrib. auth -. +_ view @@ -830,17 +830,16 @@ s.logout -' ...
598098f73ecedfccbe6d511a7943186c7b098734
set TASK_META_USE_DB to True in the test project settings.
testproj/settings.py
testproj/settings.py
# Django settings for testproj project. import os import sys # import source code dir sys.path.insert(0, os.path.join(os.getcwd(), os.pardir)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) TEST_RUNNER = "yadayada.test.run_tests" TEST_APPS = ( "celery", ) AMQP_SE...
Python
0
@@ -418,16 +418,23 @@ elery%22%0A%0A +CELERY_ AMQP_EXC @@ -450,24 +450,31 @@ testcelery%22%0A +CELERY_ AMQP_ROUTING @@ -489,24 +489,31 @@ testcelery%22%0A +CELERY_ AMQP_CONSUME @@ -536,16 +536,48 @@ elery%22%0A%0A +CELERY_TASK_META_USE_DB = True%0A%0A MANAGERS
253d19a933549415ba50fd5d4ebb5d5936eeb01a
IOP returning malformed BibTeX record. Parse the RIS at our end instead.
plugins/python/iop.py
plugins/python/iop.py
#!/usr/bin/env python # # Copyright (c) 2007 Kristinn B. Gylfason <citeulike@askur.org> # All rights reserved. # # This code is derived from software contributed to CiteULike.org # by # Diwaker Gupta # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that t...
Python
0.999952
@@ -1934,22 +1934,19 @@ rllib2%0A%0A -BIBTEX +RIS _SERVER_ @@ -1983,22 +1983,19 @@ sview/'%0A -BIBTEX +RIS _SERVER_ @@ -2022,22 +2022,22 @@ &format= -bibtex +refmgr '%0A%0A# reg @@ -2673,27 +2673,21 @@ _NO_ -BIBTEX +RIS = 'No -BibTeX +RIS ent @@ -3702,14 +3702,11 @@ the -BibTeX +RIS ent @@ -3781,22 +378...
45013ca30fb717e33ebd8908802f6c34263f4f4c
fix html entities in titles
plugins/urls/plugin.py
plugins/urls/plugin.py
# coding: iso-8859-15 # Copyright (c) 2013 John Maguire <john@leftforliving.com> # # 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 #...
Python
0.0213
@@ -1185,16 +1185,34 @@ t socket +%0Aimport HTMLParser %0A%0AURL_RE @@ -3268,16 +3268,157 @@ strip()%0A + %0A h = HTMLParser.HTMLParser()%0A title = str(h.unescape(title))%0A %0A
6ca032060528d42ceb58c2f2f0c99a5e200599ec
Add route for meeting pdfs
pokr/views/meeting.py
pokr/views/meeting.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- from datetime import date import os.path import re from flask import abort, current_app, render_template, request, url_for from flask.ext.babel import gettext, format_date from sqlalchemy.orm import undefer, undefer_group from sqlalchemy.orm.exc import NoResultFound fr...
Python
0
@@ -148,16 +148,26 @@ emplate, + redirect, request @@ -2783,16 +2783,297 @@ ry_js)%0A%0A + @app.route('/meeting/%3Cid%3E/pdf', methods=%5B'GET'%5D)%0A def meeting_pdf(id):%0A try:%0A return redirect(Meeting.query.filter_by(id=id)%5C%0A .options(undefer('issues'))....
07ae5e6e79d4030fb699bd0b5cd5676e73309047
Update untar files
polyaxon/libs/http.py
polyaxon/libs/http.py
import os import shutil import tarfile from urllib.parse import parse_qs, urlencode, urljoin, urlparse, urlunparse import requests from django.conf import settings from rest_framework.authentication import TokenAuthentication from libs.api import get_http_api_url from libs.authentication.internal import InternalAuthe...
Python
0
@@ -4410,16 +4410,74 @@ f tarf:%0A + src = os.path.join(extract_path, tarf%5B0%5D)%0A @@ -4501,23 +4501,19 @@ rsively( -tarf%5B0%5D +src , build_
b09c747be773d41ad5037e3f51819805ffee1ac5
remove unused Link parameters
src/poetry/core/packages/utils/link.py
src/poetry/core/packages/utils/link.py
from __future__ import annotations import posixpath import re import urllib.parse as urlparse from typing import Any from poetry.core.packages.utils.utils import path_to_url from poetry.core.packages.utils.utils import splitext class Link: def __init__( self, url: str, comes_from: Any |...
Python
0.000001
@@ -93,32 +93,8 @@ se%0A%0A -from typing import Any%0A%0A from @@ -146,16 +146,16 @@ _to_url%0A + from poe @@ -268,47 +268,8 @@ tr,%0A - comes_from: Any %7C None = None,%0A @@ -539,98 +539,8 @@ nk)%0A - comes_from:%0A instance of HTMLPage where the link was found, or string.%0A ...
e2ec3241a3becf19954e287a6f9caba3ba445829
Add flags for protocol
polytanks/protocol.py
polytanks/protocol.py
#Copyright (C) 2017 Oscar Triano 'dotoscat' <dotoscat (at) gmail (dot) com> #This program is free software: you can redistribute it and/or modify #it under the terms of the GNU Affero General Public License as #published by the Free Software Foundation, either version 3 of the #License, or (at your option) any later ...
Python
0.000001
@@ -730,16 +730,26 @@ struct%0A%0A +#COMMANDS%0A CONNECT @@ -751,16 +751,21 @@ NECT = 0 +x0001 %0ADISCONN @@ -774,36 +774,246 @@ T = -1%0ARECREATE_TANK = 2%0AMOVE = 3 +0x0002%0AINPUT = 0x0003%0ASNAPSHOT = 0x0004%0A%0A#INPUT%0AMOVE_LEFT = 0x0100 %3C%3C 1%0AMOVE_RIGHT = 0x0100 %3C%3C 2%0APRESS_SHOT = 0x0100 %3C%3C...
29831133126312784a798e8bad5d62c83b71662c
Add watermark public version
cme/cli.py
cme/cli.py
import argparse import sys from argparse import RawTextHelpFormatter from cme.loaders.protocol_loader import protocol_loader from cme.helpers.logger import highlight from termcolor import colored def gen_cli_args(): VERSION = '5.1.6dev' CODENAME = 'U fancy huh?' p_loader = protocol_loader() protoco...
Python
0
@@ -1410,46 +1410,38 @@ ed(%22 -Exclusive release for Kali Linux users +Public version of CrackMapExec %22, %22
edb12da154f30b208571f43aac018bd56e587b19
Fix the flake8 error caused by new flake8 version
sanic/cookies.py
sanic/cookies.py
from datetime import datetime import re import string # ------------------------------------------------------------ # # SimpleCookie # ------------------------------------------------------------ # # Straight up copied this section of dark magic from SimpleCookie _LegalChars = string.ascii_letters + string.digits ...
Python
0.000005
@@ -939,16 +939,17 @@ + '%22'%0A%0A +%0A _is_lega
dffd13c27864ace160527ab5772b84abb81e04fc
use numpy funcs
src/pygaps/utilities/math_utilities.py
src/pygaps/utilities/math_utilities.py
"""Function-independent mathematical calculations.""" from itertools import groupby import numpy from pygaps.utilities.exceptions import CalculationError from pygaps.utilities.exceptions import ParameterError def split_ads_data(data, pressure_key): # Generate array split = numpy.array([0 for p in range(0, ...
Python
0.000281
@@ -255,86 +255,145 @@ -# Generate array%0A split = numpy.array(%5B0 for p in range(0, len(data.index)) +%22%22%22Find the inflection in an adsorption dataset with adsorption/desorption.%22%22%22%0A%0A # Generate array%0A split = numpy.zeros(data.shape%5B0 %5D)%0A%0A
511ab53e4f77fb71191000dda5cc815811f91e50
remove dangling use of `Map.get_all`
amino/regex.py
amino/regex.py
import re import typing from typing import Any, Union, Pattern from amino import L, _, Maybe, Map, List, Either, Boolean class Regex: @staticmethod def cons(pattern: Union[str, Pattern]) -> 'Regex': spec = pattern.pattern if isinstance(pattern, Pattern) else pattern rex = pattern if isinstan...
Python
0
@@ -2459,18 +2459,19 @@ oup_map. -ge +lif t_all(*i
527d67a16df7f90d10e147469a3fc8077b13031b
remove commented timing line and adjust formating for function to run
saspy/sasstat.py
saspy/sasstat.py
from IPython.core.display import HTML from SAS import pysas34 as sas import time import logging # create logger logger = logging.getLogger('') logger.setLevel(logging.WARN) class sasstat: def __init__(self, *args, **kwargs): '''Submit an initial set of macros to prepare the SAS system''' code="op...
Python
0
@@ -1980,31 +1980,8 @@ t%22)%0A - #time.sleep(5)%0A @@ -1981,32 +1981,32 @@ %22)%0A try:%0A + obj1 @@ -3072,32 +3072,8 @@ t%22)%0A - #time.sleep(.2)%0A @@ -4029,32 +4029,8 @@ t%22)%0A - #time.sleep(.2)%0A @@ -5059,36 +5059,32 @@ (code))%0A -sas. _...
27c10b93aeb6c6c69b401686787db245e4f0f01d
bump version for pypi
saspy/version.py
saspy/version.py
__version__ = '2.3.0'
Python
0
@@ -16,7 +16,7 @@ 2.3. -0 +1 '%0A
b7805df4b2d103b1cea63ddcb58dc86d0a90465a
Update Flask extension import
portfolio/__init__.py
portfolio/__init__.py
from flask import Flask from flask.ext.assets import Environment from portfolio.views import site # init the app, its compressor and its manager app = Flask('portfolio') # config app.config.from_pyfile('config.py') app.jinja_env.trim_blocks = True app.jinja_env.lstrip_blocks = True # assets assets = Environment(app)...
Python
0.000001
@@ -31,13 +31,9 @@ lask -.ext. +_ asse
cb4a113ccb628971018e4d275c1e2f6c43144d38
CHange import settings
bayesfit/plot_CDF.py
bayesfit/plot_CDF.py
""" ******************************************************* * * plot_cdf - PLOT MODEL FIT TO DATA * * Version: Version 2.0 * License: Apache 2.0 * Written by: Michael Slugocki * Created on: April 18, 2017 * Last updated: April 18, 2018 * ******************************************************* """ ...
Python
0
@@ -524,19 +524,9 @@ rom -psyFunction +. imp
10fff23f48e14dbaa01ff4b2e15f9f59c10dd47e
Add a note. May become useful later.
coconut.py
coconut.py
""" Transporting a coconut. Design issue: There are 2 types of movement: Normal movement. No jet stream. Normal movement can be interrupted at any time. Jet stream movement. Jet stream movement can be entered and exited only at certain points. Journey goes from 0 to last jet stream Okay, not going to bother with ...
Python
0
@@ -5227,16 +5227,87 @@ treams.%0A + # The order of paths in these data structures does not matter.%0A
893e5d9272d8e9a8f105424cdf9b2ded7a3fd2d9
Validate correct count
tests/cli/qa_test.py
tests/cli/qa_test.py
# -*- coding: utf-8 -*- """ Copyright [2009-2018] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by...
Python
0.999998
@@ -1106,10 +1106,10 @@ a) == 12 -9 +6 %0A
f657e000af2b965ebacf0e3b9a81cd660d47051c
Remove python2 compatibility decorator
tests/core/models.py
tests/core/models.py
import random import string from django.core.exceptions import ValidationError from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=100) birthday = models.DateTimeField(auto_now_a...
Python
0.000005
@@ -106,100 +106,9 @@ els%0A -from django.utils.encoding import python_2_unicode_compatible%0A%0A%0A@python_2_unicode_compatible +%0A %0Acla @@ -636,37 +636,8 @@ )%0A%0A%0A -@python_2_unicode_compatible%0A clas @@ -797,37 +797,8 @@ e%0A%0A%0A -@python_2_unicode_compatible%0A clas @@ -1479,37 +1479,8 @@ e%0A%0A%0...
53293d50ec168cdc512676a870b73de7cf402091
Change python3.6 ppa to deadsnakes. (#2888)
docker/Dockerfile.py
docker/Dockerfile.py
# Copyright (C) 2015-2016 Regents of the University of California # # 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 app...
Python
0.000007
@@ -3221,28 +3221,22 @@ ppa: -jonathonf/python-3.6 +deadsnakes/ppa %0A
e8de5506847d015172acb43248581763ed8ea40c
make listen on right place
powerstripflocker.tac
powerstripflocker.tac
# Copyright ClusterHQ Limited. See LICENSE file for details. from twisted.web import server, resource from twisted.application import service, internet from powerstripflocker.adapter import AdapterResource, HandshakeResource def getAdapter(): root = resource.Resource() v1 = resource.Resource() root.putC...
Python
0
@@ -638,57 +638,69 @@ net. -TCP +UNIX Server( -9042, getAdapter(), interface='0.0.0.0' +%22/var/run/docker-plugin/plugin.sock%22, getAdapter() )%0Aad
264ea787c88b4bef9f73ec26a2750a8189b6dded
Update docker.
docker/Dockerfile.py
docker/Dockerfile.py
# Copyright (C) 2015-2016 Regents of the University of California # # 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 app...
Python
0
@@ -3437,19 +3437,24 @@ https:// -get +download .docker. @@ -3461,20 +3461,27 @@ com/ -builds/Linux +linux/static/stable /x86 @@ -3496,13 +3496,17 @@ er-1 -.13.1 +8.06.1-ce .tgz
3e1e79d7ce7f6e0341c0253f5c97f808b1152c2a
Handle missing container names and failed deletions
dockerrotate/main.py
dockerrotate/main.py
""" Free up space by rotating out old Docker images. """ from argparse import ArgumentParser from datetime import timedelta from dateutil import parser from docker import Client from docker.errors import APIError from docker.utils import kwargs_from_env TEN_SECONDS = timedelta(seconds=10) def parse_args(): par...
Python
0.000002
@@ -3909,32 +3909,33 @@ %22%5D,%0A +( container.get(%22N @@ -3939,17 +3939,20 @@ (%22Names%22 -, +) or %5B%22unnam @@ -4032,32 +4032,49 @@ continue%0A + try:%0A client.r @@ -4106,16 +4106,200 @@ %5B%22Id%22%5D)%0A + except APIError as error:%0A print %22Un...