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
0a9fc9e4d8e43954b10db5668dacb96e68a4ef4f
fix add media with unknown fields
backend/geonature/core/gn_commons/schemas.py
backend/geonature/core/gn_commons/schemas.py
from marshmallow import pre_load, fields from pypnnomenclature.schemas import NomenclatureSchema from pypnusershub.schemas import UserSchema from geonature.utils.env import MA from geonature.core.gn_commons.models import TModules, TMedias, TValidations class ModuleSchema(MA.SQLAlchemyAutoSchema): class Meta: ...
Python
0
@@ -33,16 +33,25 @@ , fields +, EXCLUDE %0A%0Afrom p @@ -866,16 +866,42 @@ k = True +%0A unknown = EXCLUDE %0A%0A me
c61bf9540f3c17647611c3671df12e84603b056f
Drop `None` sort `kind` as it doesn't work yet
benchmarks/benchmarks/bench_function_base.py
benchmarks/benchmarks/bench_function_base.py
from __future__ import absolute_import, division, print_function from .common import Benchmark import numpy as np class Histogram1D(Benchmark): def setup(self): self.d = np.linspace(0, 100, 100000) def time_full_coverage(self): np.histogram(self.d, 200, (0, 100)) def time_small_coverag...
Python
0.000001
@@ -2505,14 +2505,8 @@ eap' -, None %5D,%0A
9dba29ba4be2bbfd87a2a98392518a75dfc1077f
add ping pong
kademlia/protocol.py
kademlia/protocol.py
#!/usr/bin/env python # encoding: utf-8 from rpcudp.rpcserver import RPCServer, rpccall, rpccall_n from utils import period_task import hashlib KBUCKET_SIZE = 20 TREE_HEIGHT = 160 ALPHA = 3 """ implement rpc call in kademlia """ class KademliaRpc(RPCServer): @rpccall def ping(self, dest): pass ...
Python
0.00021
@@ -1148,16 +1148,223 @@ i + 1%0A%0A + @period_task(period=100)%0A def check_tree(self):%0A res = self.ping(%5Bn%5B'address'%5D for b in self.kbucket for n in b%5D)%0A for r,d in res:%0A if not r:%0A self.delnode(d)%0A%0A def @@ -2334,24 +2334,256 @@ pend(node)%0A%...
2835e9bf17d435c3d60e3a9c05ab65e3801c0e77
Add py-setuptools-scm 3.3.3 (#13183)
var/spack/repos/builtin/packages/py-setuptools-scm/package.py
var/spack/repos/builtin/packages/py-setuptools-scm/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PySetuptoolsScm(PythonPackage): """The blessed package to manage your versions by scm tags...
Python
0
@@ -457,19 +457,19 @@ s_scm-3. -1.0 +3.3 .tar.gz%22 @@ -511,16 +511,113 @@ _scm'%5D%0A%0A + version('3.3.3', sha256='bd25e1fb5e4d603dcf490f1fde40fb4c595b357795674c3e5cb7f6217ab39ea5')%0A vers
6662cd429e0ee6361eeb6c3de6a513f50666ecfc
update message data so that reporter or content_object is not a strict requirement.
yak/rest_notifications/models.py
yak/rest_notifications/models.py
from caching.base import CachingMixin, CachingManager from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.template.loader import render_to_string from celery.task import task...
Python
0
@@ -2919,16 +2919,105 @@ %22%22%22%0A%0A + data = %7B%0A 'identifier': None,%0A 'reporter': None%0A %7D%0A%0A @@ -3088,32 +3088,47 @@ ned%0A -data = %7B +if self.content_object: %0A @@ -3120,32 +3120,37 @@ ct:%0A +data%5B 'identifier':...
2453efb54419dc2588d89a1e61a12ea40025ec2f
fix imports;
yandextank/plugins/Bfg/plugin.py
yandextank/plugins/Bfg/plugin.py
import logging import time from threading import Event import pip from .guns import LogGun, SqlGun, CustomGun, HttpGun, ScenarioGun, UltimateGun from .reader import BfgReader, BfgStatsReader from .widgets import BfgInfoWidget from ..Phantom import PhantomReader, string_to_df from .worker import BFGMultiprocessing, BF...
Python
0
@@ -47,16 +47,24 @@ rt Event +, Thread %0A%0Aimport
5f6ca3bb95e371afd2bbf97c690cde393e7c4b24
fix cooccur process script
bin/process/co-occuring-mentions-from-mtx.py
bin/process/co-occuring-mentions-from-mtx.py
import sys import getopt import itertools def file_to_ep_dict(fname): entity_pairs = {} with open(fname) as f: for line in f: fields = line.strip().split("\t") ep = (fields[0], fields[1]) if ep not in entity_pairs: entity_pairs[ep] = [] e...
Python
0.000002
@@ -35,16 +35,30 @@ ertools%0A +import random%0A %0A%0Adef fi @@ -346,12 +346,16 @@ %5Bep%5D - += +.append( fiel @@ -359,17 +359,17 @@ ields%5B2%5D -%0A +) %0A ret @@ -387,16 +387,658 @@ pairs%0A%0A%0A +# for entity pairs with many mentions, randomly subsample the combinations%0Adef iter_sample_fast(iterable...
e01175427f8615067730024b93aad834880456cd
update version
LipidFinder/__init__.py
LipidFinder/__init__.py
# Copyright (c) 2019 J. Alvarez-Jarreta and C.J. Brasher # # This file is part of the LipidFinder software tool and governed by the # 'MIT License'. Please see the LICENSE file that should have been # included as part of this software. """LipidFinder's software information.""" name = "LipidFinder" __version__ = "2.0"...
Python
0
@@ -312,16 +312,18 @@ _ = %222.0 +.1 %22%0A%0A__aut
9c846640aa0c87511a155f38843c2571f73086fd
Use the text/plain mimetype for the public_keys api.
argus/scenarios/service_mock.py
argus/scenarios/service_mock.py
# Copyright 2015 Cloudbase Solutions Srl # 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 r...
Python
0
@@ -3481,32 +3481,96 @@ lic_keys(self):%0A + cherrypy.response.headers%5B'Content-Type'%5D= 'text/plain'%0A return s
17ddd95d19b1a737bb2b7aa89a4eb0aa17c35137
Add contacted column.
alembic/versions/66594a9866c_add_updated_and_state_to_app.py
alembic/versions/66594a9866c_add_updated_and_state_to_app.py
"""add updated and state to app Revision ID: 66594a9866c Revises: 29353a1877ba Create Date: 2014-10-23 10:53:15.357562 """ # revision identifiers, used by Alembic. revision = '66594a9866c' down_revision = '29353a1877ba' from alembic import op import sqlalchemy as sa import datetime def make_timestamp(): now = ...
Python
0
@@ -463,16 +463,92 @@ stamp))%0A + op.add_column('app', sa.Column('contacted', sa.Boolean, default=False))%0A op.a @@ -1368,16 +1368,55 @@ dated')%0A + op.drop_column('app', 'contacted')%0A op.d
591ed4b39167daea0eaceca7cf7d79802fd47bd1
Delete call_aiohttp() (#8)
gidgethub/test/test_aiohttp.py
gidgethub/test/test_aiohttp.py
import datetime import aiohttp import pytest from .. import aiohttp as gh_aiohttp from .. import sansio async def call_aiohttp(what, *args, **kwargs): async with aiohttp.ClientSession() as session: gh = gh_aiohttp.GitHubAPI(session, "gidgethub") return await getattr(gh, what)(*args, **kwargs) ...
Python
0
@@ -105,220 +105,8 @@ o%0A%0A%0A -async def call_aiohttp(what, *args, **kwargs):%0A async with aiohttp.ClientSession() as session:%0A gh = gh_aiohttp.GitHubAPI(session, %22gidgethub%22)%0A return await getattr(gh, what)(*args, **kwargs)%0A%0A%0A @pyt
48fab607b1152b8b93cdb0cc0dc5c300dafecf4c
Update default settings to match Slurm 17.X / CentOS installation
common/hil_slurm_settings.py
common/hil_slurm_settings.py
""" MassOpenCloud / Hardware Isolation Layer (HIL) Slurm / HIL Control Settings May 2017, Tim Donahue tpd001@gmail.com """ DEBUG = True SLURM_INSTALL_DIR = '/usr/local/bin/' HIL_SLURMCTLD_PROLOG_LOGFILE = '/var/log/moc_hil_ulsr/hil_prolog.log' HIL_MONITOR_LOGFILE = '/var/log/moc_hil_ulsr/hil_monitor.log' HIL_ENDP...
Python
0
@@ -163,14 +163,8 @@ usr/ -local/ bin/ @@ -455,39 +455,8 @@ ion' -%0AHIL_PARTITION_PREFIX = 'debug' %0A%0AHI
0ba9fa847a8b605363b298ecad40cb2fc5870cbb
Update build script to work correctly on macOS and linux.
build_modules.py
build_modules.py
import os, sys, subprocess, shutil def check_for_module_builder(): if os.path.exists("voxel_native/scripts/"): return print("Downloading P3DModuleBuilder...") cmd = [sys.executable, "-B", "voxel_native/download_P3DModuleBuilder.py"] try: output = subprocess.check_output(cmd, stderr=sy...
Python
0
@@ -887,79 +887,290 @@ -shutil.move(%22voxel_native/voxel_native.pyd%22, %22voxel/voxel_native.pyd%22)%0A +from voxel_native.scripts.common import is_macos, is_windows, is_linux%0A if is_windows():%0A shutil.move(%22voxel_native/voxel_native.pyd%22, %22voxel/voxel_native.pyd%22)%0A elif is_macos() or...
f2aa0d8c3edca30862827d8f00120f36b229ea07
remove duplicate source field
twinkle/adapters/tweet_adapter_base.py
twinkle/adapters/tweet_adapter_base.py
#!/usr/bin/env python # -*- coding: utf-8 -*- class TweetAdapterBase(object): def __init__(self): pass @property def id(self): """ Tweet Id """ return None @property def text(self): """ Tweet Text """ return None @property def source(self): """ Tweet source """ return None ...
Python
0.000001
@@ -628,80 +628,8 @@ %09%09%0A%0A -%0A%09@property%0A%09def source(self):%0A%09%09%22%22%22%0A%09%09Tweet source%0A%09%09%22%22%22%0A%09%09return None%0A %09%0A%0A%09
aeee0ec7a12d842980354d5c2693dd55a0fd7046
Revert commit for MappingProxyType
chainer/training/extensions/parameter_statistics.py
chainer/training/extensions/parameter_statistics.py
from types import MappingProxyType import numpy import six import chainer from chainer.backends import cuda from chainer import reporter from chainer.training import extension from chainer.training import trigger as trigger_module class ParameterStatistics(extension.Extension): """Trainer extension to report pa...
Python
0
@@ -1,40 +1,4 @@ -from types import MappingProxyType%0A%0A impo @@ -2552,25 +2552,8 @@ s = -MappingProxyType( %7B%0A @@ -2994,17 +2994,16 @@ ))%0A %7D -) %0A%0A de
58eb90541830d55d9a9a8497956e36561a07dfd0
fix multithreading with setting the configs main db connections
workers/facade_worker/facade_worker/facade02utilitymethods.py
workers/facade_worker/facade_worker/facade02utilitymethods.py
#!/usr/bin/env python3 # Copyright 2016-2018 Brian Warner # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
Python
0
@@ -1804,24 +1804,31 @@ _hash=%25s%22)%0A%0A +%09try:%0A%09 %09cfg.cursor. @@ -1869,16 +1869,951 @@ ommit))%0A +%09%09cfg.db.commit()%0A%09except:%0A%09%09cfg.log_activity('Debug','Cursor was closed, making another connection to db')%0A%09%09db_user = read_config('Database', 'user', 'AUGUR_DB_USER', 'augur')%0A%09%0...
182215c61de046b626f754aeec22b2845a52f103
Call the bootstrap job.
greatbigcrane/project/views.py
greatbigcrane/project/views.py
""" Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm 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 agre...
Python
0.000001
@@ -878,16 +878,51 @@ ttings%0A%0A +from job_queue.jobs import run_job%0A from pro @@ -1997,16 +1997,69 @@ p.py%22))%0A + run_job(%22BOOTSTRAP%22, project_id=instance.id)%0A
9867093187fcd5c4b0f8e055b8ff975ddda2e70f
Remove stale TODO (#5643)
cirq-core/cirq/contrib/paulistring/optimize_test.py
cirq-core/cirq/contrib/paulistring/optimize_test.py
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
Python
0
@@ -1622,54 +1622,8 @@ 7)%0A%0A - # TODO(#5546) Fix '%5BZ%5D%5E1' (should be 'Z')%0A
f556ede348be0e13559e7db361367876ba57196a
Mark endpoints as static
src/ims/application/_main.py
src/ims/application/_main.py
## # See the file COPYRIGHT for copyright information. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
Python
0.999704
@@ -1044,16 +1044,41 @@ n import + ContentType, HeaderName, KleinRe @@ -1085,16 +1085,24 @@ nderable +, static %0A%0Afrom . @@ -3089,24 +3089,36 @@ -def rootResource +@static%0A def rootEndpoint (sel @@ -3344,32 +3344,44 @@ c, branch=True)%0A + @static%0A def static(s @@ -3378,16 +3378,24 @@ f ...
cdf426a995eaf4e7d01877370b4ebbd52b814276
Fix for celery_cmd
celery_worker.py
celery_worker.py
import pipes from starcluster import threadpool from starcluster.clustersetup import ClusterSetup from starcluster.logger import log class WorkerSetup(ClusterSetup): @property def pool(self): if not getattr(self, '_pool', None): self._pool = threadpool.get_thread_pool(size=20, disable_th...
Python
0.000003
@@ -1943,19 +1943,16 @@ -qs( celery_c @@ -1953,17 +1953,16 @@ lery_cmd -) , 'worke
36dbf41f51817915e2c8811a7d6f8c39f29102c9
use rm -rf instead of rmtree in Windows
cerbero/hacks.py
cerbero/hacks.py
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
Python
0.000002
@@ -3246,16 +3246,177 @@ , '/')%0A%0A +%0A# rmtree fails too often with access denied%0Aimport shutil%0Afrom cerbero.utils.shell import call%0A%0A%0Adef rmtree(path, onerror=None):%0A call('rm -rf %25s' %25 path)%0A%0A%0A if sys.p @@ -3602,16 +3602,43 @@ ealpath%0A + shutil.rmtree = rmtree%0A %0A%0A### OS
115a71995f2ceae667c05114da8e8ba21c25c402
Move to 1.6.6 dev for further development
syncplay/__init__.py
syncplay/__init__.py
version = '1.6.5' revision = ' release' milestone = 'Yoitsu' release_number = '86' projectURL = 'https://syncplay.pl/'
Python
0
@@ -12,9 +12,9 @@ 1.6. -5 +6 '%0Are @@ -24,23 +24,27 @@ ion = ' -release +development '%0Amilest @@ -77,17 +77,17 @@ ber = '8 -6 +7 '%0Aprojec
9ceddfc1a371c02d983a5b62b7d154f35a4b9006
Bump version to 0.4.0.dev (#707)
cirq/_version.py
cirq/_version.py
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
Python
0
@@ -717,20 +717,23 @@ __ = %220. -3 +4 .0. +dev 27%22 # c @@ -779,12 +779,15 @@ %220. -3 +4 .0. +dev 35%22%0A
2c162b131a936c0607ec2aacbf79108aa9a78555
Bump to version 0.8.0
tabutils/__init__.py
tabutils/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ tabutils ~~~~~~~~ Provides methods for reading and processing data from tabular formatted files Examples: literal blocks:: python example_google.py Attributes: ENCODING (str): Default file encoding. """ __title__ = 'tabut...
Python
0
@@ -481,9 +481,9 @@ '0. -7 +8 .0'%0A
a805379908e8e94f44339a877c094e239ab97a09
Add command to list all user commands.
modules/usercmds.py
modules/usercmds.py
import contextlib import lib.cmd import lib.event import lib.irc USERCMD_CHAR = '!' _user_cmds = {} # storage for all user commands during runtime @lib.event.subscribe('new_db') def create_usercmds_schema(db=None): """Creates the usercmds SQLite schema.""" db.execute('CREATE TABLE usercmds (cmd TEXT PRIM...
Python
0
@@ -1524,8 +1524,135 @@ R, cmd)%0A +%0A%0A@lib.cmd.command()%0Adef listcmds(msg):%0A %22%22%22Lists all user commands.%22%22%22%0A return ', '.join('!%25s' %25 k for k in _user_cmds)%0A
47c0186253b2a1f07816b394fb870436b89e45b5
Update eh-api-to_csv-pandas.py
APIs/Python-EngagementHistoryAPI-ToCSV/eh-api-to_csv-pandas.py
APIs/Python-EngagementHistoryAPI-ToCSV/eh-api-to_csv-pandas.py
import requests import json from requests_oauthlib import OAuth1 from requests_oauthlib import OAuth1Session import time import pandas # Grab the time when the script starts. start_time_epoch = time.time() accountNum = 'xxxxxxxxx' domain = 'xxxxxxxx.liveperson.net' engHistoryURI = 'https://' + domain + '/interaction_...
Python
0.000001
@@ -802,16 +802,422 @@ n/json'%7D +%0A# Customize the body for what you want %0Abody=%7B%0A%09'interactive':'true',%0A%09'ended':'true',%0A%09'start':%7B%0A%09%09# http://www.epochconverter.com/ - grab the millisecond version%0A%09%09'from':'1451606399000', #Dec 31 2015%0A%09%09'to':'1453334399000' #jan 15 2016%0A%09%...
1b37700683501d6924bc2163a45fec095249d39b
Make Configure.open use derived class for init
PyOpenWorm/configure.py
PyOpenWorm/configure.py
# a class for modules that need outside objects to parameterize their behavior (because what are generics?) # Modules inherit from this class and use their self['expected_configured_property'] class ConfigValue(object): def get(self): raise NotImplementedError class _C(ConfigValue): def __init__(self, ...
Python
0.000001
@@ -1633,25 +1633,19 @@ c = -Configure +cls ()%0A
9fa2b8921fe1948e8fe4ce46d773eed6a3666154
change import order to "solve" an exception translation problem
Python/Chem/__init__.py
Python/Chem/__init__.py
# $Id$ # # Copyright (C) 2000-2006 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # """ A module for molecules and stuff see Chem/index.html in the doc tree for documentation """ import rdBase import RDConfig import Numeric import DataStructs from Geometry import rdGeometry import Period...
Python
0.000002
@@ -436,18 +436,20 @@ om rdmol -op +file s import @@ -453,36 +453,34 @@ ort *%0Afrom rdmol -file +op s import *%0A%0Adef
0bb8641efa2e0e54c782b55eb62601735b60a1ce
change error message to indicate Polygons are allowed, too
conversion_service/clipping_geometry/to_polyfile.py
conversion_service/clipping_geometry/to_polyfile.py
from django.contrib.gis.geos import MultiPolygon, Polygon from django.template.loader import render_to_string def create_poly_file_string(geometry): """ Converts a Polygon or Multipolygon to a polyfile compatible string Args: geometry: django.contrib.gis.geos.MultiPolygon or django.contrib.gis.ge...
Python
0
@@ -582,15 +582,25 @@ t a -m +Polygon or M ulti - p +P olyg
41263cfc401f7eb6f13da4ea1e288e2b6b674f52
Fix preselection of paid orders filter
byceps/blueprints/admin/shop/order/models.py
byceps/blueprints/admin/shop/order/models.py
""" byceps.blueprints.admin.shop.order.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations from enum import Enum from typing import Optional from .....services.shop.order.transfer.mod...
Python
0
@@ -1340,16 +1340,17 @@ if +( only_pay @@ -1384,17 +1384,15 @@ paid +) and -not +( only @@ -1399,16 +1399,29 @@ _shipped + is not None) :%0A @@ -1457,16 +1457,50 @@ shipping + if not only_shipped else cls.none %0A
b0232a95cdb620ce9b21704ca138768fef7e67a4
add path to display name
calvin/runtime/south/plugins/opcua/client.py
calvin/runtime/south/plugins/opcua/client.py
# -*- coding: utf-8 -*- # Copyright (c) 2016 Ericsson AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
Python
0
@@ -1822,32 +1822,139 @@ try:%0A + path = node.get_path_as_string()%0A node_name = %22/%22.join(%5B p.split(%22:%22)%5B1%5D for p in path %5D)%0A # node_name = nod
2633be5b9da5101ea9b5dd4449c6a5eb7405e932
Set and clear colour for whole filelist output
morenines/output.py
morenines/output.py
import click import sys def info(message): click.echo(message) def good(message): click.secho("Warning: " + message, fg='green') def warning(message): click.secho("WARNING: " + message, fg='yellow') def error(message): click.secho("ERROR: " + message, fg='red') sys.exit(1) def print_filelist(h...
Python
0
@@ -301,54 +301,221 @@ def -print_filelist(header, filelist, colour=None): +set_output_colour(colour):%0A # Print nothing except the ANSI escape sequence%0A click.secho('', nl=False, fg=colour, reset=False)%0A%0Adef clear_output_colour():%0A # Print nothing except the reset escape sequence %0A @@ -525,12...
2be7e176101154e95679620808138a9de731407e
fix bug: double quote string
uliweb/template_files/project/setup.py
uliweb/template_files/project/setup.py
#coding=utf8 __doc__ = """{{=project_name}}""" import re import os from setuptools import setup, find_packages from setuptools.command import build_py as b def copy_dir(self, package, src, dst): self.mkpath(dst) for r in os.listdir(src): if r in ['.svn', '_svn']: continue fpath = ...
Python
0.000004
@@ -2536,17 +2536,17 @@ ages = %5B -' +%22 %7B%7B=proje @@ -2572,17 +2572,17 @@ , '_')%7D%7D -' +%22 %5D,%0A i @@ -3058,8 +3058,9 @@ %5D,%0A) +%0A
f5d0ba17d369414e19238f3abf4323bca26aed0e
Fix test for ReportDialog.py
src/sas/qtgui/Utilities/Reports/ReportDialog.py
src/sas/qtgui/Utilities/Reports/ReportDialog.py
import os import sys import re import logging import traceback from xhtml2pdf import pisa from typing import Optional from PyQt5 import QtWidgets, QtCore from PyQt5 import QtPrintSupport import sas.qtgui.Utilities.GuiUtils as GuiUtils import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary from sas.qtgui.Utilities...
Python
0.000001
@@ -2691,24 +2691,28 @@ th.join( +str( location , 'repor @@ -2703,16 +2703,17 @@ location +) , 'repor
4abb2aacf977856f7b9f84b8553f82c787c140d5
add doc
Contents/Libraries/Shared/subliminal_patch/providers/mixins.py
Contents/Libraries/Shared/subliminal_patch/providers/mixins.py
# coding=utf-8 import re import time import logging import traceback import types from guessit import guessit from subliminal import ProviderError from subliminal.providers.opensubtitles import Unauthorized from subliminal.subtitle import fix_line_ending logger = logging.getLogger(__name__) clean_whitespace_re = r...
Python
0
@@ -1417,32 +1417,83 @@ eMixin(object):%0A + %22%22%22%0A needs subtitle.matches to work%0A %22%22%22%0A def get_subt
8b45e3fc1a755cd61ccec7ef620cf5d846da1145
Remove trailing whitespace
skrf/media/tests/test_rectangularWaveguide.py
skrf/media/tests/test_rectangularWaveguide.py
import unittest import os import skrf as rf class MediaTestCase(unittest.TestCase): ''' ''' def setUp(self): ''' ''' self.files_dir = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'qucs_prj' ) self.pwd = os.path.j...
Python
0.999999
@@ -86,20 +86,16 @@ '''%0A - %0A ''' @@ -128,24 +128,16 @@ '''%0A - %0A @@ -362,24 +362,16 @@ le__)))%0A - %0A @un @@ -532,24 +532,16 @@ l.s2p')%0A - %0A @@ -645,33 +645,32 @@ _ntwk.frequency, - %0A a = @@ -818,22 +818,10 @@ wk)%0A - %0A%...
0bdced519ce5274423dd49e3b922b6fdab11c0fd
Use go_offline() method instead of setting up the class variable directly.
Rtp_proxy_client_udp.py
Rtp_proxy_client_udp.py
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2009 Sippy Software, Inc. All rights reserved. # # This file is part of SIPPY, a free RFC3261 SIP stack and B2BUA. # # SIPPY is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
Python
0
@@ -2307,22 +2307,20 @@ elf. -online = False +go_offline() %0A
da9ac9839aa4d97da2fb89ce3a27e12053ae305a
Fix '__len__' method to account for dead/dying objects
edgedb/lang/common/datastructures/registry.py
edgedb/lang/common/datastructures/registry.py
## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## import collections import functools import weakref class WeakObjectRegistry(collections.MutableMapping): """Weak object mapping class. Dictionary entries will be discarded once there are no strong references to ...
Python
0.000002
@@ -1734,16 +1734,46 @@ lf.data) + - len(self._pending_removals) %0A%0A de
f13a5f78a3375333d7cfa18b70323f99396843b2
Compute the last update date, fix #76
udata/core/dataset/models.py
udata/core/dataset/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from collections import OrderedDict from blinker import Signal from flask import url_for from mongoengine.signals import pre_save, post_save from udata.models import ( db, WithMetrics, Issue, Discussion, Follow, SpatialCoverage ) fr...
Python
0.999999
@@ -6016,16 +6016,128 @@ own'%5D)%0A%0A + @property%0A def last_update(self):%0A return max(resource.published for resource in self.resources)%0A%0A @cla
3de0bb8ebd84e358fec7fec78a0898fd5ab23740
remove class variables, will lead to unexpected results
host/basil/HL/HardwareLayer.py
host/basil/HL/HardwareLayer.py
# # ------------------------------------------------------------ # Copyright (c) All rights reserved # SiLab, Institute of Physics, University of Bonn # ------------------------------------------------------------ # # SVN revision information: # $Rev:: $: # $Author:: $: # $Da...
Python
0
@@ -558,48 +558,8 @@ '''%0A - _intf = None%0A _base_addr = None%0A%0A
0172a2fb5bfc6131d45f68f6acdc380d18b4e7cc
Update storageaccount.py
azurecloudify/storageaccount.py
azurecloudify/storageaccount.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
@@ -5431,24 +5431,81 @@ iption_id'%5D%0A + credentials=auth.get_token_from_client_credentials()%0A url = co
65b8484810305ea19a363e14860f2f516733c244
use django.utils.safestring.mark_safe with html templatetag html output
babeljs/templatetags/babeljs.py
babeljs/templatetags/babeljs.py
# -*- coding: utf-8 -*- # Copyright (C) 2007-2015, Raffaele Salmaso <raffaele@salmaso.org> # # 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...
Python
0.000004
@@ -1335,16 +1335,62 @@ _to_uri%0A +from django.utils.safestring import mark_safe%0A import b @@ -2040,16 +2040,26 @@ return +mark_safe( %22%22%22%3Cscri @@ -2348,16 +2348,17 @@ ),%0A ) +) %0A%0A%0A@regi @@ -2813,16 +2813,26 @@ return +mark_safe( %22%22.join( @@ -2854,9 +2854,10 @@ ript%3E%22%5D) +) %0...
492fe7a765ef1b7d19e4bebbdf4d3a2e0b570528
Enhance citeproc translation list
backend/pubtype_translations.py
backend/pubtype_translations.py
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # This program 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 2 # of the Licen...
Python
0
@@ -2365,32 +2365,61 @@ ion' : 'other',%0A + 'preprint' : 'preprint',%0A 'post' : 'ot @@ -2919,24 +2919,49 @@ : 'other',%0A + 'unknown' : 'other',%0A 'webpage
c20202a23d689e75d640c684f8c3f4f9dc599316
Refactor passlib password hasing example
examples/miniapps/password_hashing/example.py
examples/miniapps/password_hashing/example.py
"""Example of dependency injection and password hashing in Python.""" import passlib.hash import dependency_injector.containers as containers import dependency_injector.providers as providers class UsersService: """Users service.""" def __init__(self, password_hasher): """Initialize instance.""" ...
Python
0
@@ -741,15 +741,12 @@ ypt. -encrypt +hash ,%0A
8fff2f030502e011c051c26e8376ed735478d2ef
Fix example for evt readout
examples/offline_analysis/plot_evt_readout.py
examples/offline_analysis/plot_evt_readout.py
# -*- coding: utf-8 -*- """ ============================= Reading and Parsing EVT files ============================= This example shows how to read and parse EVT files, which are used in our Monte Carlo productions. """ # Author: Tamas Gal <tgal@km3net.de>, Moritz Lotze >mlotze@km3net.de> # License: BSD-3 import mat...
Python
0.000042
@@ -1280,10 +1280,10 @@ ts.p -df +ng %22)%0A%0A
9fa26a81ec6149b4a88a8b6175bd7fc1fbcb6339
add missing line
examples/pogo-optimizer/pogo-optimizer-cli.py
examples/pogo-optimizer/pogo-optimizer-cli.py
#!/usr/bin/env python """ pgoapi - Pokemon Go API Copyright (c) 2016 tjado <https://github.com/tejado> 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 limita...
Python
0.999999
@@ -5415,24 +5415,83 @@ api.call()%0A%0A + approot = os.path.dirname(os.path.realpath(__file__))%0A%0A with ope
4ddbbcbe25b7e24fcf4f342642d204a7b3442828
Update module description to fix outdated info
base_phone_popup/__openerp__.py
base_phone_popup/__openerp__.py
# -*- encoding: utf-8 -*- ############################################################################## # # Base Phone Pop-up module for Odoo/OpenERP # Copyright (C) 2014 Alexis de Lattre <alexis@via.ecp.fr> # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
Python
0
@@ -1266,22 +1266,19 @@ call, O -penERP +doo can aut @@ -1512,269 +1512,8 @@ st%0A%0A -It depends on 2 other modules, *web_longpolling* and *web_socketio*, that can%0Abe downloaded with this command:%0A%0Ahg clone http://bitbucket.org/anybox/web_socketio%0A%0AYou will find some hints in this documentation :%0Ahttp...
df7b9879a194c2909467340b72ac7c0c87f6fd77
Remove camera configuration.
VisionToolkit/Camera.py
VisionToolkit/Camera.py
# -*- coding:utf-8 -*- # # Module to capture images from USB cameras # # # External dependencies # import threading import cv2 # # Thread to read the images from a USB camera # class UsbCamera( threading.Thread ) : # # Initialisation # def __init__( self, image_callback ) : # Initialize the thread super...
Python
0
@@ -492,33 +492,33 @@ pture( 0 )%0A%0A%09%09# -S +G et camera resolu @@ -511,29 +511,42 @@ camera -resolution%0A%09%09 +parameters%0A%09%09self.width = self.cam @@ -541,33 +541,33 @@ h = self.camera. -s +g et( cv2.cv.CV_CA @@ -580,34 +580,43 @@ _FRAME_WIDTH -, 640 )%0A%09%09 +self.height = self.camera. @...
be6e776d712ffd829211f9b6810873e06a1f5621
Remove overlap for test_move filenames
tests/functional/test_move.py
tests/functional/test_move.py
from tests.utils.launcher import Launcher from tests.utils.setup import Setup, Rule from tests.utils.driver import LocalStorageDriver, TargetDriver from tests.utils.loop import BooleanLoop, CounterLoop launcher, setup = None, None rep1, rep2 = LocalStorageDriver('rep1'), TargetDriver('rep2') json_file = 'test_deletion...
Python
0.000001
@@ -1259,32 +1259,33 @@ py_file('to_move +1 ', 100)%0A loop @@ -1369,32 +1369,33 @@ 1', src='to_move +1 ', dest='moved'%0A @@ -1384,32 +1384,33 @@ e1', dest='moved +1 '%0A )%0A laun @@ -1472,32 +1472,33 @@ 2', src='to_move +1 ', dest='moved'%0A @@ -1487,32 +1487,33 @@ e1', dest='moved +1 '%0A )%0A...
e054e3dbc56932187ac321f8ba75096e422aa9cd
Correct small bug in managing points coordinates
TwitterEngine/twitterapi.py
TwitterEngine/twitterapi.py
__author__ = "Andrea Biancini" __date__ = "October 2, 2013" import pprint import sys import json import os root_path = os.path.abspath(os.path.join(__file__, '..', '..')) lib_path = os.path.join(root_path, 'lib') sys.path.insert(0, lib_path) from datetime import datetime from TwitterAPI import TwitterAPI from geopy ...
Python
0.000008
@@ -3535,16 +3535,47 @@ llection + and len(list(geom.geoms)) == 2 :%0A
cadfdadc14f0bf41456ef32a3e339e76b887eea4
Fix missing self.shape
chainerrl/explorers/additive_ou.py
chainerrl/explorers/additive_ou.py
from __future__ import division from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from logging import getLogger from chainer import cuda import numpy as np from chainerrl import e...
Python
0.999996
@@ -994,16 +994,25 @@ ze=self. +ou_state. shape, l @@ -1016,16 +1016,46 @@ , loc=0, +%0A scale=n
053d568665ecdc2db2735342d25b1cd17ee4b56c
Add pid number to kernel startup message.
IPython/zmq/entry_point.py
IPython/zmq/entry_point.py
""" Defines helper functions for creating kernel entry points and process launchers. """ # Standard library imports. import os import socket from subprocess import Popen import sys # System library imports. import zmq # Local imports. from IPython.core.ultratb import FormattedTB from IPython.external.argparse import...
Python
0
@@ -2612,12 +2612,30 @@ rnel -...%22 + at pid:%22, os.getpid() )%0A
e5f6e760aa9e914bf000846836efff8779845767
clarify comment
treeano/sandbox/nodes/dNDF.py
treeano/sandbox/nodes/dNDF.py
""" from "Deep Neural Decision Forests" http://research.microsoft.com/apps/pubs/default.aspx?id=255952 """ import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn from treeano.theano_extensions import tree_probability @treeano.register_node("probability_linear_combination...
Python
0.000001
@@ -3289,16 +3289,32 @@ efficent + for large trees %0ASplitPr
7b581c76eab5ae50ec830b2b306d61a4775fa393
improve comment
util/regexp-assemble/regexp-cmdline.py
util/regexp-assemble/regexp-cmdline.py
#!/usr/bin/env python # # Convert a word list to a list of regexps usable by Regexp::Assemble. # # Examples: # cat regexp-932100.txt | ./regexp-cmdline.py unix | ./regexp-assemble.pl # cat regexp-932110.txt | ./regexp-cmdline.py windows | ./regexp-assemble.pl # cat regexp-932150.txt | ./regexp-cmdline.py unix | ./reg...
Python
0.000001
@@ -474,27 +474,56 @@ and -pad it with evasion +insert anti-cmdline%0A# evasions between character s.%0Ad @@ -601,29 +601,43 @@ th ' -%5C', keep it untouched + char, copy the rest%0A # verbatim .%0A
e51b318b991047d539fbff22e816f6a75469179e
Fix typo.
test/frameworks/bulk_add/bulk_add.py
test/frameworks/bulk_add/bulk_add.py
#!/usr/bin/env python # $Id: bulk_add.py,v 1.1 2011-10-03 21:46:33 barry409 Exp $ # Copyright (c) 2011 Board of Trustees of Leland Stanford Jr. University, # all rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the...
Python
0.999999
@@ -39,17 +39,17 @@ .py,v 1. -1 +2 2011-10 @@ -53,19 +53,19 @@ -10- -03 21:46:33 +19 16:57:51 bar @@ -4384,17 +4384,16 @@ t %22alrea -e dy has%22%0A
5cb3497b59d72ca859f7a72d9e51be6aa753a103
Version bump.
orchestra/__init__.py
orchestra/__init__.py
# The current Orchestra version. __version__ = '1.0.7' default_app_config = 'orchestra.apps.OrchestraAppConfig'
Python
0
@@ -49,9 +49,9 @@ 1.0. -7 +8 '%0A%0Ad
cf399d6daa7df64516e7fe34dceda70c8d634d57
add formatter to error log file handler.
idigbio_media_appliance/app.py
idigbio_media_appliance/app.py
from __future__ import absolute_import, print_function, division, unicode_literals import os from flask.ext.sqlalchemy import SQLAlchemy from flask import Flask from . import config import logging # from gevent import monkey # monkey.patch_all() logging.root.setLevel(logging.DEBUG) FORMAT = '%(asctime)s - %(name)s -...
Python
0
@@ -484,16 +484,50 @@ WARNING) +%0Afile_handler.setFormatter(FORMAT) %0A%0Aapp =
0e3006bee1e23deb2b4b1ea9410d6b61991534dc
fix import
benchmarks/tree/io/tree_read.py
benchmarks/tree/io/tree_read.py
#!/usr/bin/env python from rootpy.io import open from time import time from ROOT import TTreeCache import sys for cached in (False, True): try: f = open("test.root") except IOError: sys.exit("test.root does not exist. Please run tree_write.py first.") tree = f.test if cached: ...
Python
0.000001
@@ -16,16 +16,88 @@ python%0A%0A +# this import is required to register the Tree class%0Aimport rootpy.tree%0A from roo
aaaaaf7657ec2371c0f7950bc76925c2802c9d19
Rename method from "getp"
falcom/api/common/read_only_data_structure.py
falcom/api/common/read_only_data_structure.py
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. class ReadOnlyDataStructure: auto_properties = ( ) __subclasses = set() def __init__ (self, **kwargs): self.__set_read_...
Python
0
@@ -2436,17 +2436,30 @@ def get -p +_this_property (self): @@ -2553,36 +2553,81 @@ s__, - property_name, property(getp +%0A property_name,%0A property(get_this_property ))%0A
7aea605907e7890b1e3cf9f2d8bfff29a1b40d10
Replace eval with direct python code
astropy/convolution/tests/test_convolve_models.py
astropy/convolution/tests/test_convolve_models.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst import math import numpy as np import pytest from numpy.testing import assert_allclose, assert_almost_equal from astropy.convolution.convolve import convolve, convolve_fft, convolve_models # noqa: F401 from astropy.modeling import fitting, models from ...
Python
0.999891
@@ -248,30 +248,16 @@ e_models - # noqa: F401 %0Afrom as @@ -472,33 +472,32 @@ etrize('mode', %5B -' convolve_fft', ' @@ -488,36 +488,34 @@ convolve_fft -' , -' convolve '%5D)%0A @pyt @@ -494,33 +494,32 @@ ve_fft, convolve -' %5D)%0A @pytest.m @@ -752,32 +752,41 @@ ernel, mode=mode +.__name__ )%0A ...
49f6e54dced9d699ad0f8b3c377aa1fc12652577
Update admin.py
orderedmodel/admin.py
orderedmodel/admin.py
# -*- coding: utf-8 -*- from django.contrib import admin from django.conf import settings try: from django.conf.urls import patterns except: from django.conf.urls.defaults import patterns from django.shortcuts import get_object_or_404 from django.http import HttpResponseRedirect class BaseOrderedModelAdmin(a...
Python
0
@@ -88,17 +88,8 @@ ngs%0A -try:%0A from @@ -117,75 +117,11 @@ ort -patterns%0Aexcept:%0A from django.conf.urls.defaults import patterns +url %0Afro @@ -537,20 +537,9 @@ s = -patterns('', +%5B %0A @@ -543,32 +543,35 @@ +url (r'%5E(?P%3Cpk%3E%5Cd+)/ @@ -641,16 +641,19 @@ +ur...
b7a082752c4012ff66ed6baf76cb467960c456be
add herokuapp domain to allowed hosts in production
impulse/settings/production.py
impulse/settings/production.py
from .base import * import dj_database_url DEBUG = False db_from_envronment = dj_database_url.config() DATABASES = { 'default': db_from_envronment }
Python
0
@@ -53,16 +53,52 @@ False%0A%0A +ALLOWED_HOSTS = %5B'.herokuapp.com'%5D%0A%0A db_from_
2f9e92c884984bb816c7996db12d84023810b073
Disable syntax for large log files
drivnal/handlers/log.py
drivnal/handlers/log.py
from drivnal.constants import * from drivnal.client import Client import drivnal.utils as utils from drivnal import server @server.app.route('/log/<type>/<volume_id>/<type_id>', methods=['GET']) def log_get(type, volume_id, type_id): client = Client() volume = client.get_volume(volume_id) data = None ...
Python
0.000001
@@ -752,24 +752,194 @@ %7D, 404)%0A%0A + # Log files %3E 1mb load slow with syntax highlighter%0A if snapshot.log_size() %3E 1048576:%0A syntax = ''%0A else:%0A syntax = 'shell'%0A%0A data @@ -996,23 +996,22 @@ yntax': -'shell' +syntax ,%0A @@ -1037,16 +1...
9340842422ce66bed0d70b911fe9414aa2295bed
py3.5 compat: stringify path
test/test_parse_file_guess_format.py
test/test_parse_file_guess_format.py
import unittest from pathlib import Path from shutil import copyfile from tempfile import TemporaryDirectory from xml.sax import SAXParseException from rdflib import Graph, logger as graph_logger class FileParserGuessFormatTest(unittest.TestCase): def test_ttl(self): g = Graph() self.assertIsIns...
Python
0.998642
@@ -714,24 +714,28 @@ t.ttl%22, +str( newpath) %0A @@ -726,16 +726,17 @@ newpath) +) %0A
f30c36fbc644b42af8280885d04bb71c0829bc66
Bump version.
coils/version.py
coils/version.py
__version__ = '2.0.0'
Python
0
@@ -12,11 +12,11 @@ = '2.0. -0 +1 '%0A
f49cc86901f4670f28abfbd6c6c0a7ac88f218f1
support list in runlist
cloudify_plugin_chef/operations.py
cloudify_plugin_chef/operations.py
from cloudify.decorators import operation as _operation from cloudify_plugin_chef.chef_client import run_chef EXPECTED_OP_PREFIX = 'cloudify.interfaces.lifecycle' def _extract_op(ctx): prefix, _, op = ctx.operation.rpartition('.') if prefix != EXPECTED_OP_PREFIX: ctx.warn("Node operation is expected ...
Python
0
@@ -782,24 +782,90 @@ f_config'%5D:%0A + ctx.logger.info(%22Using explicitly provided Chef runlist%22)%0A runl @@ -1091,16 +1091,87 @@ '%5D%5Bop%5D%0A%0A + if isinstance(runlist, list):%0A runlist = ','.join(runlist)%0A%0A ctx.
1d37ba9f2b0b7027385f309f61b59d14866f909c
Use .result instead of .convert
indico/web/http_api/fossils.py
indico/web/http_api/fossils.py
# -*- coding: utf-8 -*- ## ## ## This file is part of CDS Indico. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Indico 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 2 o...
Python
0
@@ -3507,44 +3507,16 @@ ist. -convert = lambda scl: fossilize(scl, +result = ISu @@ -3534,33 +3534,32 @@ onMetadataFossil -) %0A getSubContr @@ -3747,42 +3747,16 @@ ist. -convert = lambda cl: fossilize(cl, +result = ICo @@ -3771,33 +3771,32 @@ onMetadataFossil -) %0A getContribu @@ -3981,42 +3981,16 @@ ...
b8ca9de33bbb9aab87f4f620143e858154264460
Define a default file for the input data file
mutual_debt/main.py
mutual_debt/main.py
"""Mutual Debt Simplification Usage: simplify-debts <data_file> simplify-debts (-h | --help) Options: -h --help Show this screen. """ import json import sys from mutual_debt.simplification import debt_list_to_graph, \ simplify_debt_graph, draw_graph def print_error(*args, sep=' ', end='\n'): """ ...
Python
0.000065
@@ -47,16 +47,18 @@ fy-debts + %5B %3Cdata_f @@ -61,16 +61,18 @@ ta_file%3E + %5D %0A simpl @@ -412,16 +412,51 @@ derr)%0A%0A%0A +DEFAULT_DATA_FILE = 'debts.json'%0A%0A%0A def main @@ -485,10 +485,9 @@ gv) -!= +%3E 2:%0A @@ -526,24 +526,175 @@ ys.exit(1)%0A%0A + if len(sys.argv) == 1:%0A print(%2...
15190b258c46ec566e83f50cbcd2109471c5fc52
make creation of bucket with cage switchable via --create-bucket CLI arg and corresponding template arg
commands/cage.py
commands/cage.py
# Copyright 2015 47Lining LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
Python
0
@@ -2119,22 +2119,30 @@ -parser +cage_provision .set_def
c84d4445c2d1c07c8a3e55a8881abac2de0b2707
add exit code to supervise log
drydock/construction.py
drydock/construction.py
from __future__ import print_function __doc__ = """DryDock specification construction functions.""" from os.path import join import os import time import docker from .templates import base_commands, SUPERVISOR_BASE, SUPERVISOR_GROUP from .report import Report def master(http="80", https="443", ssh="2222", name="drydo...
Python
0.000001
@@ -3186,19 +3186,53 @@ .format( -tag +%0A tag, ps%5Btag%5D%5B5:%5D ))%0A
54e15f12ffde9fe6aa8edb78a309f725a21dc303
add Schedule class.
myuw_api/quarter.py
myuw_api/quarter.py
from django.conf import settings from datetime import datetime from restclients.sws_client import SWSClient import logging import json class Quarter: """ The Quarter class encapsulate the access to the Term data """ __logger = logging.getLogger('myuw_api.quarter') __sws_client = SWSClient() def get_c...
Python
0
@@ -129,16 +129,42 @@ t json%0A%0A +sws_client = SWSClient()%0A%0A class Qu @@ -240,17 +240,16 @@ ata %22%22%22%0A -%0A __lo @@ -296,39 +296,8 @@ er') -%0A __sws_client = SWSClient() %0A%0A @@ -317,32 +317,63 @@ _quarter(self):%0A + assert False, __mock()%0A return _ @@ -399,34 +399,32 @...
30b8c1d694150ea2f204f88eabafcdaffb00468b
Align some comments correctly
tests/environment.py
tests/environment.py
# -*- coding: UTF-8 -*- from time import sleep, localtime, strftime from dogtail.utils import isA11yEnabled, enableA11y if not isA11yEnabled(): enableA11y(True) from dogtail.rawinput import pressKey from subprocess import call from common_steps import App, dummy, non_block_read, ensure_app_running from dogtail.con...
Python
0.004938
@@ -4399,16 +4399,20 @@ try:%0A%0A + # De @@ -4953,32 +4953,36 @@ ot new.showing:%0A + # Ha
860ce9e6c8801c974f49020a59ee33f1e99df06b
use iter_commits()
inlineplz/interfaces/github.py
inlineplz/interfaces/github.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import os.path import github3 import unidiff from inlineplz.interfaces.base import InterfaceBase from inlineplz.util import git class GitHubInterface(InterfaceBase): def __init__(self, owner, repo, pr, token, url=None): if not url: ...
Python
0
@@ -553,16 +553,21 @@ request. +iter_ commits(
0cf2b7dcc5f012d97a509119fe6c8b82a47ab06d
Use new ProsodyRoster proxy model
passwordless/views.py
passwordless/views.py
import json from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth import authenticate,login,logout from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib import messages from django.http import HttpResponse,HttpResponseForbidden from dja...
Python
0
@@ -562,16 +562,22 @@ Prosody +Roster %0A%0A# Crea @@ -1821,16 +1821,22 @@ Prosody +Roster (user=us @@ -1851,24 +1851,8 @@ ame, - store='roster', key
499e4cd6ef85269881622e27417e7ff5caa62464
change test data
code/utils/tests/test_smoothing.py
code/utils/tests/test_smoothing.py
""" Tests for smoothvoxels in smooth module Run at the tests directory with: nosetests test_smoothing.py """ import os import sys import numpy as np import itertools import scipy.ndimage from scipy.ndimage.filters import gaussian_filter import matplotlib.pyplot as plt import nibabel as nib from numpy.testing impor...
Python
0.000002
@@ -678,18 +678,18 @@ a/ds -005 +114 /sub0 -11 +09 /BOL @@ -700,21 +700,34 @@ sk00 -1 +2 _run00 -3/bold +1/ds114_sub009_t2r1 .nii
e9de8360d3d9ef2b842ed0c7c811ad494adfeea5
Update __init__.py
tendrl/commons/objects/node_context/__init__.py
tendrl/commons/objects/node_context/__init__.py
import os import socket import sys import uuid import errno import etcd from tendrl.commons.etcdobj import EtcdObj from tendrl.commons.event import Event from tendrl.commons.message import Message from tendrl.commons.utils import cmd_utils from tendrl.commons import objects import traceback class NodeContext(object...
Python
0.000072
@@ -1514,24 +1514,41 @@ y, node_id)%0A + try:%0A Even @@ -1554,32 +1554,36 @@ nt(%0A + Message(%0A @@ -1567,32 +1567,36 @@ Message(%0A + @@ -1620,32 +1620,36 @@ + publisher=NS.pub @@ -1651,32 +1651,36 @@ S.publisher_id,%...
0257ad518cbe3bdd764438ff865ebadc57ba7f41
Remove deprecated setting auth_tk_secret
eduid_signup/testing.py
eduid_signup/testing.py
""" Funny quirk of running these tests in PyCharm: If you, like me, have a project in PyCharm with eduid-signup and all it's dependencies 'open', and a virtualenv without any of the eduid packages installed, be aware: The AM setup will use pkg_resources to find entry points to plugins. Entry points don't exis...
Python
0.000033
@@ -1224,40 +1224,8 @@ e',%0A - 'auth_tk_secret': '123456',%0A
e99945a3d28b4013e424c6a66e320f73c2499148
clean up
instancebuilder/elementbase.py
instancebuilder/elementbase.py
#!/usr/bin/env python3 """Functions useful to all element classes.""" import sys import argparse from subprocess import Popen, PIPE, STDOUT, CalledProcessError # ============================================================================== __version__ = "0.1" __copyright__ = "Copyright 2017, devops.center" __credits...
Python
0.000001
@@ -3318,48 +3318,31 @@ # -subprocess.call(shellScript, shell=True) +NOTE: this is a python3 %0A
c5c429d5131ec486e7622cdbeeef2d01f9696369
add new field on res.lang object iso_code which is for file name on i18n (LP synchronization with bzr branch for transaltion)
bin/addons/base/res/res_lang.py
bin/addons/base/res/res_lang.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
Python
0
@@ -97,21 +97,17 @@ ######%0A# - %0A + # Ope @@ -889,21 +889,16 @@ enses/%3E. - %0A#%0A##### @@ -1394,16 +1394,23 @@ s.char(' +Locale Code', s @@ -1421,32 +1421,226 @@ 5, required=True +, help='This field is used to set/get locales for user'),%0A 'iso_code': fields.char('ISO code', size=5, r...
d6b1f7c03ec2b32823fe2c4214e6521e8074cd9f
Make sure the 'channel' argument is not Unicode when we send it, because Twisted doesn't like that
commands/join.py
commands/join.py
from CommandTemplate import CommandTemplate from IrcMessage import IrcMessage class Command(CommandTemplate): triggers = ['join'] helptext = "Makes me join another channel, if I'm allowed to at least" def execute(self, message): """ :type message: IrcMessage """ replytext = u"" if message.messageParts...
Python
0.000001
@@ -529,16 +529,102 @@ Parts%5B0%5D +.encode('utf8') #Make sure it's a str and not unicode, otherwise Twisted chokes on it %0A%09%09%09if c
6b04b44a2d54aa557ae60caff443f1cb0e248cdf
Update __init__.py
netmiko/__init__.py
netmiko/__init__.py
from ssh_dispatcher import ssh_dispatcher from cisco import CiscoIosSSH from cisco import CiscoAsaSSH from arista import AristaSSH __version__ = '0.1.2'
Python
0.000072
@@ -123,16 +123,40 @@ ristaSSH +%0Afrom f5 import F5LtmSSH %0A%0A__vers
263180cdc550d0114bd2b981d0950f807d314f17
add import
peeweemgr/__init__.py
peeweemgr/__init__.py
__author__ = 'mqingyn' __version__ = '1.0.2' version = tuple(map(int, __version__.split('.')))
Python
0
@@ -39,9 +39,9 @@ 1.0. -2 +3 '%0A%0Av
6f0c64ce1e12842a9fbd49c076906ecd03dcfd5d
add reverse to the key
ella_comments/models.py
ella_comments/models.py
from django.db import models from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.core.cache import cache from ella.core.cache import CachedGenericForeignKey, get_cached_object, ContentTypeForeignKey from thread...
Python
0.021405
@@ -504,10 +504,13 @@ s:%25s +:%25d '%0A - %0Adef @@ -560,24 +560,113 @@ erse=None):%0A + if reverse is None:%0A reverse = getattr(settings, 'COMMENTS_REVERSED', False)%0A%0A cache_ke @@ -708,16 +708,37 @@ bject_pk +, 1 if reverse else 0 )%0A it @@ -1056,90 +1056,15 @@ if -( reverse - is not...
113fcad4a45a6ae676fbb87fc67417d2938d49f6
Fix test
tests/test_number.py
tests/test_number.py
import unittest import phonenumbers from id_phonenumbers.number import Number class TestNumber(unittest.TestCase): def test_international_number(self): with self.assertRaises(phonenumbers.NumberParseException): parser = Number('+6565166666') parser.parse() with self.asse...
Python
0.000004
@@ -1498,32 +1498,66 @@ parser.parse()%0A%0A + # This number is gone now%0A self.ass @@ -1585,17 +1585,12 @@ er, -%22Indosat%22 +None )%0A @@ -1622,35 +1622,36 @@ rser.is_mobile, -Tru +Fals e)%0A%0A # GS
8060fec64a8e73c6745a904f4f43f953f94e4f0d
Update Ch. 17 PracticeQuestions: imported specific function
books/CrackingCodesWithPython/Chapter17/PracticeQuestions.py
books/CrackingCodesWithPython/Chapter17/PracticeQuestions.py
# Chapter 17 Practice Questions # 1. What is the word pattern for the word hello? import books.CrackingCodesWithPython.Chapter17.makeWordPatterns wordPat = books.CrackingCodesWithPython.Chapter17.makeWordPatterns.getWordPattern('hello') print(wordPat) # 2. Do mammoth and goggles have the same word pattern? wordPat1 ...
Python
0
@@ -80,14 +80,12 @@ lo?%0A -import +from boo @@ -141,77 +141,42 @@ erns -%0A%0AwordPat = books.CrackingCodesWithPython.Chapter17.makeWordPatterns. + import getWordPattern%0A%0AwordPat = getW @@ -282,159 +282,45 @@ 1 = -books.CrackingCodesWithPython.Chapter17.makeWordPatterns.getWordPattern('mammoth')%0AwordPat2...
eaea688fb9e291c83d45b08c1a34591cdca21312
Update Ch. 18 PracticeQuestions: changed Question 2 solution
books/CrackingCodesWithPython/Chapter18/PracticeQuestions.py
books/CrackingCodesWithPython/Chapter18/PracticeQuestions.py
# Chapter 18 Practice Questions # 1. Which cipher is the Vigenere cipher similar to, except that the Vigenere # cipher uses multiple keys instead of just one key? # Hint: Check page 248 from books.CrackingCodesWithPython.Chapter18.vigenereCipher import decryptMessage message = "Tuw Rmxeawni Ticzav zs faimcae lk xy...
Python
0.000031
@@ -682,24 +682,367 @@ ile%0A -print(pow(26, 10 +solution = pow(26, 10)%0Aanswer = %22Undefined%22%0Aif solution %3C 999:%0A answer = %22a. Hundreds%22%0Aelif 999 %3C solution %3C 9999:%0A answer = %22b. Thousands%22%0Aelif 999999 %3C solution %3C 999999999:%0A answer = %22c. Millions%22%0Aelif solution %3E 1...
fb44db3b03274efff025cb19c312d2230085033d
Update representation of exception
ixprofile_client/exceptions.py
ixprofile_client/exceptions.py
""" Exceptions raised when interacting with the profile server """ class ProfileServerException(Exception): """ Base exception for all profile server errors """ def __init__(self, response=None): super(ProfileServerFailure, self).__init__() self.response = response try: ...
Python
0
@@ -635,32 +635,49 @@ ion%0A %22%22%22%0A + try:%0A return %22 @@ -716,32 +716,36 @@ %25 (%0A + self.response.st @@ -777,16 +777,124 @@ reason)%0A + except (AttributeError, KeyError):%0A return %22Profile server failure: %25s.%22 %25 self.response%0A %0A...
7c45a80d51e301a95195efa774a950fd693995a7
Parse all IFD's, not just the first one
photoshell/raw/cr2.py
photoshell/raw/cr2.py
import os import struct tags = { 'image_width': 0x0100, 'image_length': 0x0101, 'bits_per_sample': 0x0102, 'compression': 0x0103, 'make': 0x010f, 'model': 0x0110, 'strip_offset': 0x0111, 'orientation': 0x0112, 'strip_byte_counts': 0x0117, 'x_resolution': 0x011a, 'y_resolutio...
Python
0.999855
@@ -4668,16 +4668,38 @@ fd_entry +%0A return -1 %0A%0A de @@ -4867,31 +4867,100 @@ -# TODO: Make IDF array%0A +self.ifd = %5B%5D%0A self.ifd.append(self.Ifd(16, self))%0A for i in range(1, 3):%0A @@ -4975,12 +4975,16 @@ .ifd -0 = +.append( self @@ -4988,25 +4988,55 @@ e...
b91cfc3adfd583f1c27d24880bb345bd6650ed9b
use @unittest.skip with the reason instead of just commenting out
tests/command_download_hackerrank.py
tests/command_download_hackerrank.py
import unittest import tests.command_download class DownloadHackerRankTest(unittest.TestCase): def snippet_call_download(self, *args, **kwargs): tests.command_download.snippet_call_download(self, *args, **kwargs) # def test_call_download_hackerrank_beautiful_array(self): # self.snippet_call_...
Python
0
@@ -227,16 +227,179 @@ )%0A%0A # + TODO: support parsing HTML or retrieving from %22Run Code%22 feature%0A @unittest.skip('the %22Download all test cases%22 feature is not supported for this problem')%0A def tes @@ -447,26 +447,24 @@ y(self):%0A - # self.sn @@ -561,26 +561,24 @@ rray', %7B%0A ...
3d3ef76a6cbeadb835a1d789504a157db28cb61c
Fix test for 'melflux' method in OnsetDetection
test/src/unittest/rhythm/test_onsetdetection.py
test/src/unittest/rhythm/test_onsetdetection.py
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
Python
0
@@ -2049,34 +2049,57 @@ g(type='hamming' +, zeroPadding=framesize )%0A - fft = FF @@ -2541,28 +2541,16 @@ rame)))%0A - %0A @@ -2647,17 +2647,16 @@ 4 and 5, - %0A @@ -2825,28 +2825,16 @@ rectify%0A - %0A @@ -2864,16 +2864,17 @@ (pos)-1: + # 4th f @@ -328...
94313420799f4d0e5c23457c94e3c89a57cfefdb
email required set to true
voting_app/voting_app/settings/base.py
voting_app/voting_app/settings/base.py
""" Django settings for voting_app project. Generated by 'django-admin startproject' using Django 1.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import j...
Python
0.999996
@@ -1087,20 +1087,19 @@ UIRED = -Fals +Tru e%0AACCOUN
9494652d54b369cd57df24dbdd4ee4fab649a82e
Add test on updating the review repr on the revisions
wafer/talks/tests/test_review_views.py
wafer/talks/tests/test_review_views.py
"""Tests for wafer.talk review form behaviour.""" from django.test import Client, TestCase from django.urls import reverse from reversion import revisions from reversion.models import Version from wafer.talks.models import (SUBMITTED, UNDER_CONSIDERATION, ReviewAspect, Review) from wa...
Python
0
@@ -1912,8 +1912,1474 @@ rent())%0A +%0A def test_review_revision_str(self):%0A %22%22%22Check that we update the revision repr correctly.%22%22%22%0A self.client.login(username='reviewer_a', password='reviewer_a_password')%0A response = self.client.post(reverse('wafer_talk_review', kwargs=%7B...
635559be4c2f1c25aadf512cd1d8a7b0e3fddabc
Make linear test loose
tests/functions_tests/test_linear.py
tests/functions_tests/test_linear.py
from unittest import TestCase import numpy from pycuda.gpuarray import to_gpu from chainer import Variable from chainer.gradient_check import assert_allclose, numerical_grad from chainer.functions import Linear class TestLinear(TestCase): def setUp(self): self.func = Linear(3, 2) self.func.W = nu...
Python
0.000189
@@ -1253,30 +1253,8 @@ data -, atol=1e-7, rtol=1e-7 )%0A%0A
0144b24a2482c3c23691a474e647d8be79641e12
Update test case to new return format.
tests/integration/client/standard.py
tests/integration/client/standard.py
# -*- coding: utf-8 -*- # Import Salt Testing libs from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') # Import salt libs import integration class StdTest(integration.ModuleCase): ''' Test standard client calls ''' def test_cli(self): ''' Test cli function ...
Python
0.000008
@@ -1368,23 +1368,8 @@ ual( -ret%5B'minion'%5D, %7B're @@ -1394,16 +1394,31 @@ ': True%7D +, ret%5B'minion'%5D )%0A%0A @@ -1607,36 +1607,26 @@ -ret%5B'minion'%5D,%0A %7B +%7B'out': 'nested', 'ret @@ -1680,16 +1680,43 @@ : False%7D +,%0A ret%5B'minion'%5D %0A
fb7117f2acdb54560048d319235b5f3d35ae989b
Use salt.utils.versions.LooseVersion instead of distutils
tests/integration/states/test_npm.py
tests/integration/states/test_npm.py
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Erik Johnson (erik@saltstack.com)` tests.integration.states.npm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' # Import Python libs from __future__ import absolute_import from distutils.version import LooseVersion # Import Salt Testing libs from tests.support.case import ...
Python
0.000002
@@ -214,51 +214,8 @@ port -%0Afrom distutils.version import LooseVersion %0A%0A# @@ -514,16 +514,61 @@ d as cmd +%0Afrom salt.utils.versions import LooseVersion %0A%0AMAX_NP
275a8a7143131867186c4d1e2fc6e580a3fdfe84
Print 'False'.
novm/prettyprint.py
novm/prettyprint.py
""" Pretty-printing. """ import time import types def prettyprint(value, output): if isinstance(value, types.NoneType): # Print nothing. pass elif (isinstance(value, types.ListType) or isinstance(value, types.DictType)): if len(value) == 0: # Empty list? ...
Python
0.999999
@@ -1648,16 +1648,28 @@ elif v + is not None :%0A
fe846ae19c2420c6fc95f525f90143d3083d24a9
Fix a minor bug.
src/python/twitter/pants/tasks/jvm_compile/analysis_tools.py
src/python/twitter/pants/tasks/jvm_compile/analysis_tools.py
import os import shutil from twitter.common.contextutil import temporary_dir from twitter.pants import get_buildroot class AnalysisTools(object): """Analysis manipulation methods required by JvmCompile.""" _IVY_HOME_PLACEHOLDER = '/_IVY_HOME_PLACEHOLDER' _PANTS_HOME_PLACEHOLDER = '/_PANTS_HOME_PLACEHOLDER' d...
Python
0.000614
@@ -1259,15 +1259,26 @@ aths -.append + = output_paths + (cat @@ -1283,24 +1283,26 @@ atchall_path +, )%0A for an
d69aaff42cd707c9930cac37a329c898523b9cbf
fix a bug where the first line is ignored
src/ofxstatement/plugins/germany_1822direkt.py
src/ofxstatement/plugins/germany_1822direkt.py
from ofxstatement.plugin import Plugin from ofxstatement.parser import CsvStatementParser from ofxstatement.statement import StatementLine class FrankfurterSparkasse1822Plugin(Plugin): def get_parser(self, filename): encoding = self.settings.get('charset', 'iso-8859-1') f = open(filename, 'r', enco...
Python
0.000002
@@ -1059,16 +1059,54 @@ idation%0A + #print(self.cur_record, line)%0A @@ -1125,17 +1125,16 @@ record %3C -= 2:%0A
703cc73fca458898151632739128d65edd85da2e
Change Regular expression to match Game Bots
turnboxed/basebot.py
turnboxed/basebot.py
import os import json import re import traceback class BaseBot(object): def __init__(self): self._turn_cookie = None def log_exception(self, excpt): os.write(123456789, json.dumps({"TURN_COOKIE": self._turn_cookie, "EXCEPTION": excpt.__class__.__name__...
Python
0.000417
@@ -1263,16 +1263,17 @@ mport *%0A +%0A with @@ -1375,19 +1375,19 @@ (.*?)%5C( -Bas +Gam eBot', s
d06d43529b0fcedfb877ee38b5387ae28b9cc375
Fix XFormInstanceResource usage
corehq/apps/repeaters/repeater_generators.py
corehq/apps/repeaters/repeater_generators.py
import json from datetime import datetime from uuid import uuid4 from django.core.serializers.json import DjangoJSONEncoder from casexml.apps.case.xform import cases_referenced_by_xform from corehq.apps.repeaters.models import FormRepeater, CaseRepeater, ShortFormRepeater, \ AppStructureRepeater, RegisterGenerat...
Python
0.000004
@@ -4384,16 +4384,73 @@ esource%0A + from corehq.apps.api.util import form_to_es_form%0A @@ -4517,24 +4517,41 @@ dle(obj=form +_to_es_form(form) )%0A re