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
88ad4b948eee2d6c7fb2fac292913d65b1f08e83
Update sshkey.py
keepercommander/plugins/sshkey/sshkey.py
keepercommander/plugins/sshkey/sshkey.py
# -*- coding: utf-8 -*- # _ __ # | |/ /___ ___ _ __ ___ _ _ ® # | ' </ -_) -_) '_ \/ -_) '_| # |_|\_\___\___| .__/\___|_| # |_| # # Keeper Commander # Copyright 2015 Keeper Security Inc. # Contact: ops@keepersecurity.com # import subprocess import re import struct import base64 def rotate(record, new...
Python
0.000004
@@ -177,9 +177,9 @@ 201 -5 +6 Kee
ddbefe2684cfc375e47c2ef1763bb1214a822f02
Add import of RetentionContestOption
opencivicdata/elections/models/__init__.py
opencivicdata/elections/models/__init__.py
# flake8: NOQA from .election import Election, ElectionIdentifier, ElectionSource from .candidacy import Candidacy, CandidacySource from .contests.base import ContestBase from .contests.ballot_measure import (BallotMeasureContest, BallotMeasureContestOption, BallotMeasureContestIde...
Python
0
@@ -313,33 +313,32 @@ ntestIdentifier, - %0A @@ -443,16 +443,78 @@ Contest, + RetentionContestOption,%0A Retenti @@ -533,17 +533,16 @@ ntifier, - %0A @@ -816,17 +816,16 @@ tOption, - %0A
0c1edddeed0b21a664f7a95bdad3497662e6d37b
remove size attribute
l10n_br_zip/wizard/l10n_br_zip_search.py
l10n_br_zip/wizard/l10n_br_zip_search.py
# Copyright (C) 2011 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, fields, models class L10nBrZipSearch(models.TransientModel): _name = "l10n_br.zip.search" _description = "Zipcode Search" zip = fields.Char(string="CEP", size=8) stree...
Python
0.000001
@@ -297,16 +297,8 @@ CEP%22 -, size=8 )%0A%0A @@ -345,25 +345,16 @@ radouro%22 -, size=72 )%0A%0A d @@ -396,17 +396,8 @@ ict%22 -, size=72 )%0A%0A @@ -1265,18 +1265,8 @@ to%22, - size=100, inv
417d0b2fd23e4c613f36d6ce1f53e02286b96f38
Version 0.1.6
atomicwrites/__init__.py
atomicwrites/__init__.py
import contextlib import errno import os import sys import tempfile __version__ = '0.1.5' PY2 = sys.version_info[0] == 2 text_type = unicode if PY2 else str def _path_to_unicode(x): if not isinstance(x, text_type): return x.decode(sys.getfilesystemencoding()) return x if sys.platform != 'win32':...
Python
0.000001
@@ -85,9 +85,9 @@ 0.1. -5 +6 '%0A%0A%0A
83beabb90ff8fa17f0315df708f6ce221296e503
Fix a remaining now() call to use timezone-aware utility fn
oscar/apps/customer/notifications/views.py
oscar/apps/customer/notifications/views.py
import datetime from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _, ungettext from django.contrib import messages from django import http from django.views import generic from django.db.models import get_model from oscar.views.generic import BulkEditMixin Notificatio...
Python
0
@@ -1,21 +1,4 @@ -import datetime%0A%0A from @@ -105,16 +105,54 @@ gettext%0A +from django.utils.timezone import now%0A from dja @@ -1231,46 +1231,8 @@ t):%0A - now = datetime.datetime.now()%0A @@ -1311,16 +1311,18 @@ read=now +() )%0A%0A%0Aclas
9c7231be8440b575ff0758ea4f1cb0d7c1fe7f96
disable fixture tests on CI due to wonky GDAL version on travis. 'pyb -v django_test' will still execute these.
src/main/python/hub/tests/tests_fixtures.py
src/main/python/hub/tests/tests_fixtures.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from rest_framework.test import APITestCase ''' This test tries to format all fixtures with all available formats. ''' class FixtureTest(APITestCase): pass EXCLUDED_DOCUMENTS = [ 'Dummy', # those are for paging tests and just repeat 'emp...
Python
0
@@ -17,16 +17,93 @@ f-8 -*-%0A +%0A'''%0AThis test tries to format all fixtures with all available formats.%0A'''%0A%0A from __f @@ -183,83 +183,17 @@ ase%0A -%0A'''%0AThis test tries to format all fixtures with all available formats.%0A''' +import os %0A%0A%0Ac @@ -1317,16 +1317,62 @@ _test%0A%0A%0A +IS_CI = 'CI'...
b3a0ef94e4d892ff1cd11e2caa138f4388732aed
Add architecture to RuntimeSerializer
runners/serializers.py
runners/serializers.py
# pylint: disable=R0903 from rest_framework import serializers from .models import Runner, RunnerVersion, Runtime class RunnerVersionSerializer(serializers.ModelSerializer): class Meta(object): model = RunnerVersion fields = ('version', 'architecture', 'url', 'default') class RunnerSerializer(se...
Python
0.000005
@@ -647,16 +647,32 @@ ted_at', + 'architecture', 'url')%0A
ea556624b6435824ddea22960b8c8e421c97d371
Kill Python 2 compat shim
microcosm_flask/conventions/upload.py
microcosm_flask/conventions/upload.py
""" Conventions for file upload. """ from contextlib import contextmanager from functools import wraps from os.path import join from shutil import rmtree from tempfile import mkdtemp from flask import request from marshmallow import Schema from microcosm_flask.conventions.base import Convention from microcosm_flask.c...
Python
0.000001
@@ -615,86 +615,8 @@ e%0A%0A%0A -try:%0A # Python 2%0A from contextlib import nested%0Aexcept ImportError:%0A # Py @@ -621,20 +621,16 @@ Python3%0A - from con @@ -655,20 +655,16 @@ tStack%0A%0A - @context @@ -671,20 +671,16 @@ manager%0A - def nest @@ -694,20 +694,16 @@ texts):%0A - ...
c5fcd5e333491ffd5a1c802cc6332c8214b02021
Fix datetime/timezone issue
authentication/models.py
authentication/models.py
import uuid from datetime import datetime, timedelta from django.contrib.auth.admin import User from django.db import models # Time the activation is valid in hours VALID_TIME = 2 class UserAuthentication(models.Model): user = models.ForeignKey(User) key = models.UUIDField(default=uuid.uuid4, editable=False...
Python
0.000055
@@ -30,18 +30,8 @@ ort -datetime, time @@ -36,16 +36,49 @@ medelta%0A +from django.utils import timezone %0Afrom dj @@ -862,23 +862,23 @@ urn not -datetim +timezon e.now()
4df139d98be706af3c5879945a24554dadc00201
Add matching to USB product and manufacturer name
tools/mpi2udev.py
tools/mpi2udev.py
#!/usr/bin/python # Generate udev rules from music player identification (.mpi) files # # (C) 2009 Canonical Ltd. # Author: Martin Pitt <martin.pitt@ubuntu.com> # # 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 Soft...
Python
0
@@ -1105,16 +1105,110 @@ =%22%25s%22',%0A + 'usbproduct': 'ATTRS%7Bproduct%7D==%22%25s%22',%0A 'usbmanufacturer': 'ATTRS%7Bmanufacturer%7D==%22%25s%22',%0A %7D%0A%0Adef p @@ -1521,16 +1521,35 @@ sbmodel' +, 'usbmanufacturer' %5D:%0A
ed7267a315cf8bb57c6312c356564591719df409
Support both 2 and 4 digit year formats in cookies
zappa/middleware.py
zappa/middleware.py
import base58 import json import time from werkzeug.http import parse_cookie, dump_cookie from werkzeug.wsgi import ClosingIterator REDIRECT_HTML = """<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="refresh" content="1;url=REDIRECT_ME"> <script type="tex...
Python
0.000001
@@ -6247,24 +6247,53 @@ vp.lower():%0A + try:%0A @@ -6368,16 +6368,199 @@ S GMT%22)%0A + except ValueError: # https://tools.ietf.org/html/rfc6265#section-5.1.1%0A exp = time.strptime(kvp.split('=')%5B1%5D, %22%25a, %25d-%25b-%25y %25H:%25M...
295ecf0ab9dedabdb03c483d971312032a645102
Use tobytes instead of tostring in netutil.py
test/functional/test_framework/netutil.py
test/functional/test_framework/netutil.py
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Linux network utilities. Roughly based on http://voorloopnul.com/blog/a-python-netstat-in-less-than-10...
Python
0.000026
@@ -3350,22 +3350,21 @@ names.to -string +bytes ()%0A r
48ad5ae13c9a679390de39e29c56931edad18991
debug print lines
yumoter.py
yumoter.py
#!/usr/bin/env python2 import sys, os, json, errno, subprocess, yum class yumoter: def __init__(self, configFile, repobasepath): self.repobasepath = repobasepath self.reloadConfig(configFile) self.yb = yum.YumBase() self.yb.setCacheDir() def reloadConfig(self, jsonFile): ...
Python
0.000003
@@ -2814,31 +2814,8 @@ ig:%0A - print repo%0A @@ -2872,16 +2872,16 @@ synced.%0A + @@ -2916,32 +2916,76 @@ poConfig%5Brepo%5D:%0A + print self.repoConfig%5Brepo%5D%0A @@ -3144,123 +3144,8 @@ s()%0A - else:%0A print %22foo%...
173cbfa306d949bd4ac61e0218bd92426e948ba1
Trailing spaces.
tools/win32/build_scripts/pavement.py
tools/win32/build_scripts/pavement.py
import os from os.path import join as pjoin, normpath, exists as pexists import subprocess from shutil import rmtree import re SRC_ROOT = normpath(pjoin(os.getcwd(), os.pardir, os.pardir, os.pardir)) BUILD_ROOT = os.getcwd() PYVER = 2.5 options( clean=Bunch( src_dir = SRC_ROOT, pyver = PYVER ...
Python
0.999902
@@ -1927,28 +1927,16 @@ set ?%22)%0A - %0A ver @@ -2150,17 +2150,16 @@ 'info'%5D, - %0A
c24adb58c9a64fdaf2c0ad598b9431636dba31de
fix ConfigParser import
lib/config_parser.py
lib/config_parser.py
import ConfigParser defaults = {'parse': 'defaultparse', 'clean': True, 'consolidate': True, 'datadir': '/data/patentdata/patents/2013', 'dataregex': 'ipg\d{6}.xml', 'years': None, 'downloaddir' : None} def extract_process_options(handler): "...
Python
0.000001
@@ -1,8 +1,26 @@ +from ConfigParser import C
4c6d2edabbe8ad7574d916386082fcc87abde18f
improve recipe.barrier test coverage
kazoo/tests/test_barrier.py
kazoo/tests/test_barrier.py
import threading from nose.tools import eq_ from kazoo.testing import KazooTestCase class KazooBarrierTests(KazooTestCase): def test_barrier_not_exist(self): b = self.client.Barrier("/some/path") eq_(b.wait(), True) def test_barrier_exists(self): b = self.client.Barrier("/some/path"...
Python
0.000015
@@ -576,32 +576,33 @@ KazooTestCase):%0A +%0A def test_bas @@ -3363,28 +3363,717 @@ q_(b3.participating, False)%0A +%0A def test_barrier_existing_parent_node(self):%0A b = self.client.DoubleBarrier('/some/path', 1)%0A self.assertFalse(b.participating)%0A self.client.create('/some', epheme...
3c0c9778252510ac9c4088f20d4bc0dd5ea1f63c
Update point.py
implib/point.py
implib/point.py
from math import sqrt class point(): #declaration point xyz 3D def __init__(self, *args): self.X=0 self.Y=0 self.Z=0 self.L=[] self.dim=0 for i, j in enumerate(args): self.L.append(j) self.dim=i+1 while self.dim<3: ...
Python
0.000001
@@ -112,16 +112,17 @@ self.X= + 0%0D%0A @@ -131,16 +131,17 @@ self.Y= + 0%0D%0A @@ -150,16 +150,17 @@ self.Z= + 0%0D%0A @@ -169,16 +169,17 @@ self.L= + %5B%5D%0D%0A @@ -191,16 +191,17 @@ elf.dim= + 0%0D%0A @@ -284,16 +284,17 @@ elf.dim= + i+1%0D%0A @@ -369,16 +369,17 @@ ...
5a09ff2f593f8774f57c3edd4e05cd69f71d92b7
Update bbox_test.py (#116)
keras_cv/utils/bbox_test.py
keras_cv/utils/bbox_test.py
# Copyright 2022 The KerasCV Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
Python
0
@@ -3527,17 +3527,16 @@ sesRegex -p (ValueEr @@ -3768,17 +3768,16 @@ sesRegex -p (%0A
166589cad268c5f400e356a9c032758235dfdaff
Check if None is instance of NoneType is pointless
modernrpc/tests/test_jsonrpc_types.py
modernrpc/tests/test_jsonrpc_types.py
# coding: utf-8 import sys import datetime import pytest from _pytest.compat import NoneType from dummy_jsonrpc_client import ServerProxy, JsonRpcFault from modernrpc.exceptions import RPC_INTERNAL_ERROR def test_jsrpc_bool(live_server): client = ServerProxy(live_server.url + '/all-rpc/') result = client.g...
Python
0.000092
@@ -54,44 +54,8 @@ test -%0Afrom _pytest.compat import NoneType %0A%0Afr @@ -568,44 +568,8 @@ l()%0A - assert type(result) == NoneType%0A
37ab91ad50bb8f473012d8bf678445707c2da7b1
Delete print
saleor/core/filters.py
saleor/core/filters.py
from __future__ import unicode_literals from django_filters import FilterSet class SortedFilterSet(FilterSet): ''' Base class for filtersets used in dashboard views. Adds flag is_bound_unsorted to indicate if FilterSet has data from filters other than sort_by. ''' def __init__(self, data, *arg...
Python
0.000171
@@ -381,27 +381,8 @@ one%0A - print data%0A
cd41fdbdb53008c9701213d4f223bb8df0514ecb
Remove unused custom functions `local_tz_to_utc`, `utc_to_local_tz`
byceps/util/datetime/timezone.py
byceps/util/datetime/timezone.py
""" byceps.util.datetime.timezone ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Timezone helpers :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from datetime import datetime from flask import current_app import pendulum def local_tz_to_utc(dt: datetime): """Convert date...
Python
0
@@ -188,617 +188,32 @@ rom -datetime import datetime%0A%0Afrom flask import current_app%0Aimport pendulum%0A%0A%0A%0Adef local_tz_to_utc(dt: datetime):%0A %22%22%22Convert date/time object from configured default local time to UTC.%22%22%22%0A tz_str = get_timezone_string()%0A%0A return (pendulum.instance(dt...
90015e2477131c7169ac0742b266b67f3f2ac78c
fix title canonicalization
papertalk/utils/utils.py
papertalk/utils/utils.py
import urllib, urllib2 try: import simplejson as json except ImportError: try: import json except ImportError: raise ImportError import datetime from bson.objectid import ObjectId from werkzeug import Response UA = 'Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.9) Gecko/20100913 Firefo...
Python
0.002572
@@ -1098,20 +1098,25 @@ + '-' + +str( year +) .lower()
121fc7192ec6595e5d6c0f15f822bbfd31596975
remove whitespaces at EOL
build/win32-config.py
build/win32-config.py
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2013 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
Python
0.999806
@@ -3565,12 +3565,8 @@ r' %5D - %0A%09%09e
22528c4a28729d82ce35d821c30959e48f209591
fix settings.py
ses_maker/settings.py
ses_maker/settings.py
""" Django settings for ses_maker project. Generated by 'django-admin startproject' using Django 1.9.4. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os ...
Python
0.000001
@@ -827,16 +827,19 @@ OSTS = %5B +'*' %5D%0A%0A%0A# Ap @@ -1388,61 +1388,8 @@ e',%0A - 'django.middleware.security.SecurityMiddleware',%0A %5D%0A%0AR
5415f0b66b08ef964c1c3e3f94ea37c4a6542dec
update Sevenoaks import script
polling_stations/apps/data_collection/management/commands/import_sevenoaks.py
polling_stations/apps/data_collection/management/commands/import_sevenoaks.py
from data_collection.management.commands import BaseShpStationsShpDistrictsImporter class Command(BaseShpStationsShpDistrictsImporter): srid = 27700 council_id = 'E07000111' districts_name = 'May 2017/SDC_PollingDistricts_2017' stations_name = 'May 2017/SDC_CouncilElecPollingStn2017.shp' elections ...
Python
0
@@ -190,32 +190,36 @@ stricts_name = ' +New May 2017/SDC_Pol @@ -259,16 +259,20 @@ name = ' +New May 2017 @@ -291,18 +291,13 @@ Elec -PollingStn +tions 2017 @@ -692,17 +692,17 @@ (record%5B -1 +2 %5D).strip @@ -771,9 +771,10 @@ ord%5B -9 +10 %5D).s
aaf3aa977fafe1f4b6d4a01f82b3ce532a39f95a
modify mistake in comment
keystoneclient/v3/client.py
keystoneclient/v3/client.py
# Copyright 2011 Nebula, 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 ...
Python
0.000075
@@ -2595,17 +2595,17 @@ ystone v -2 +3 .0 API.
2c58056383642b70f14d4bafcd31aeeb088bd0ad
Add options to useradd in apache.py
salt/modules/apache.py
salt/modules/apache.py
''' Support for Apache ''' # Import python libs import os import re # Import salt libs import salt.utils def __virtual__(): ''' Only load the module if apache is installed ''' cmd = _detect_os() if salt.utils.which(cmd): return 'apache' return False def _detect_os(): ''' Ap...
Python
0.000001
@@ -5481,16 +5481,323 @@ created. + Valid options that can be passed are:%0A%0A n Don't update file; display results on stdout.%0A m Force MD5 encryption of the password (default).%0A d Force CRYPT encryption of the password.%0A p Do not encrypt the password (plaintext).%0A s Fo...
5f5471fd4c8a4b5563c846cfcf271e00c4246160
add loader processor
datapackage_pipelines_knesset/members/processors/load_members.py
datapackage_pipelines_knesset/members/processors/load_members.py
from datapackage_pipelines_knesset.common.base_processors.add_resource import AddResourceBaseProcessor from sqlalchemy import or_ import os import logging # only loads members with the following positionId: SUPPORTED_POSITION_IDS = [43, 61] class Processor(AddResourceBaseProcessor): def _get_schema(self, resourc...
Python
0.000001
@@ -99,60 +99,8 @@ ssor -%0Afrom sqlalchemy import or_%0Aimport os%0Aimport logging %0A%0A#
8b13f71f3aa51912c9399f8694116f0a3ab335ed
fix a bug that 'replace' merge strategy (value: 0) was evaluated as False and cause an 'invalid strategy' error, and change default merging strategy
anyconfig/api.py
anyconfig/api.py
# # Copyright (C) 2012, 2013 Satoru SATOH <ssato @ redhat.com> # License: MIT # import anyconfig.mergeabledict as M import anyconfig.backend.backends as Backends import anyconfig.backend.json_ as BJ import anyconfig.parser as P import anyconfig.utils as U import logging import os.path MS_REPLACE = "replace" MS_NO_RE...
Python
0.000151
@@ -1848,34 +1848,24 @@ rge=MS_DICTS -_AND_LISTS , marker='*' @@ -2674,20 +2674,19 @@ (merge, -Fals +Non e)%0A%0A @@ -2692,20 +2692,16 @@ if -not merge_st :%0A @@ -2696,16 +2696,24 @@ merge_st + is None :%0A @@ -3215,26 +3215,16 @@ MS_DICTS -_AND_LISTS , marker
5374b6601e6440bda20ad3a6dc1ec3b0d280fa13
Use mcdir for writing file to repo. Cleanup the name of the file.
backend/mcapi/user/ud.py
backend/mcapi/user/ud.py
from ..mcapp import app from ..decorators import crossdomain, apikey, jsonp from flask import jsonify, g, request, send_from_directory from ..utils import mkdirp import rethinkdb as r import os.path import os from ..args import json_as_format_arg import tempfile from loader.tasks.db import load_data_dir, import_data_di...
Python
0
@@ -437,16 +437,37 @@ alidate%0A +from .. import mcdir%0A from loa @@ -492,16 +492,16 @@ atafile%0A - %0A%0A@app.r @@ -1822,35 +1822,8 @@ r'%5D%0A - mkdirp('/tmp/uploads')%0A @@ -2548,30 +2548,35 @@ th.join( -'/tmp/uploads' +mcdir.for_uid(dfid) , dfid)%0A @@ -3301,24 +3301,41 @@ ataFile( +os.path.basen...
c8f16ab25729a851478ad08d3cd397fda33b55b0
Add list_upgrades to pacman
salt/modules/pacman.py
salt/modules/pacman.py
''' A module to wrap pacman calls, since Arch is the best (https://wiki.archlinux.org/index.php/Arch_is_the_best) ''' def __virtual__(): ''' Set the virtual pkg module if the os is Arch ''' return 'pkg' if __grains__['os'] == 'Arch' else False def _list_removed(old, new): ''' List the packag...
Python
0.000001
@@ -1043,24 +1043,482 @@ ).split()%0A%0A%0A +def list_upgrades():%0A '''%0A List all available package upgrades on this system%0A%0A CLI Example::%0A%0A salt '*' pkg.list_upgrades%0A '''%0A upgrades = %7B%7D%0A lines = __salt__%5B'cmd.run'%5D(%0A 'pacman -Sypu --print-format %22%25n...
8b562e43d003f5ced034cb7e27e630dcd33168ad
Update at 2017-07-14 21-45-02
train_timeconv.py
train_timeconv.py
import json from pathlib import Path import numpy as np import pandas as pd import tensorflow as tf from keras.backend.tensorflow_backend import set_session config = tf.ConfigProto() config.gpu_options.allow_growth = True set_session(tf.Session(config=config)) from keras.models import Sequential, Model from keras.pr...
Python
0
@@ -986,24 +986,94 @@ l_size=3)))%0A + model.add(Conv3D(4, kernel_size=3, strides=1, activation='relu'))%0A model.ad @@ -1981,24 +1981,26 @@ )%0A %7D%0A%0A + # model.fit_g
24ec876344163f6f2e59571dc46f577acd45a1b1
Set manage.py to be executable
backend/uclapi/manage.py
backend/uclapi/manage.py
#!/usr/bin/env python import os import sys import dotenv if __name__ == "__main__": dotenv.read_dotenv() os.environ.setdefault("DJANGO_SETTINGS_MODULE", "uclapi.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail ...
Python
0.000011
9636eb23e229b340946aad6d3f8277c886678f1e
add TODO comment
cc/license/formatters/classes.py
cc/license/formatters/classes.py
""" Formatters take a License instance and a dictionary of work metadata about the licensed work. The keys of this work_dict are as follows: - format The format of the work, values can be one of: - Audio (Sound) - Video (MovingImage) - Image (StillImage) - Text (Text) - Interactive (Intera...
Python
0
@@ -1876,16 +1876,56 @@ efaults%0A + # TODO: get rid of this one day%0A
5b10ca02082f6bbd1959277306c7a44a3815131b
Update schedule_reader.py
cea/utilities/schedule_reader.py
cea/utilities/schedule_reader.py
from __future__ import division from __future__ import print_function import csv import pandas as pd import cea.config import cea.inputlocator import cea __author__ = "Jimeno Fonseca" __copyright__ = "Copyright 2018, Architecture and Building Systems - ETH Zurich" __credits__ = ["Jimeno Fonseca"] __license__ = "MIT"...
Python
0.000003
@@ -95,16 +95,28 @@ as as pd +%0A%0Aimport cea %0Aimport @@ -149,27 +149,16 @@ tlocator -%0Aimport cea %0A%0A__auth @@ -1634,17 +1634,294 @@ dule):%0A%0A -%0A + METADATA = %5B'METADATA'%5D+list(schedule_complementray_data%5B'METADATA'%5D)%0A MULTIPLIER = %5B'MONTHLY_MULTIPLIER'%5D+list(schedule_complementra...
d5ea69a6b065be5fbba3f4b990373d537318d00c
bump version
backslash/__version__.py
backslash/__version__.py
__version__ = "2.19.1"
Python
0
@@ -13,11 +13,11 @@ = %222.19. -1 +2 %22%0A
a9d155fd53f19be497c3becda62a3fbb84d9c8aa
Use isinstance() for result type checking
shade/task_manager.py
shade/task_manager.py
# Copyright (C) 2011-2013 OpenStack Foundation # # 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 agree...
Python
0.000016
@@ -2622,211 +2622,607 @@ -if isinstance(self._result, list):%0A return meta.obj_list_to_dict(self._result)%0A elif type(self._result) not in (bool, int, float, str, set,%0A tuple +# NOTE(Shrews): Since the client API might decide to subclass one%0A ...
c4be8e599f3b17bdcc4769c7e2b17490b94d3181
fix merge conflict bug
htmresearch/frameworks/clustering/distances.py
htmresearch/frameworks/clustering/distances.py
import numpy as np def percentOverlap(x1, x2): """ Computes the percentage of overlap between SDRs x1 and x2. :param x1: (array) binary vector or a set of active indices :param x2: (array) binary vector or a set of active indices :param size: (int) length of binary vectors :return percentOverlap: ...
Python
0.000001
@@ -1597,9 +1597,12 @@ c2:%0A -%09 + sd
b39beeb8c79770f1981451084ee736ba5b45ec92
fix literal issue
twistedchecker/checkers/pep8format.py
twistedchecker/checkers/pep8format.py
import sys import StringIO import re from logilab import astng from logilab.common.ureports import Table from logilab.astng import are_exclusive from pylint.interfaces import IASTNGChecker from pylint.reporters import diff_string from pylint.checkers import BaseChecker, EmptyReport import pep8 from pep8 import Check...
Python
0.012439
@@ -1963,16 +1963,17 @@ itespace +s .')%0A
0fb3f5840532200ce21042f47d770e0d2ceb068b
fix up comments in staging settings file
txlege84/txlege84/settings/staging.py
txlege84/txlege84/settings/staging.py
####################### # PRODUCTION SETTINGS # ####################### import dj_database_url from .base import * LOGGING = { 'version': 1, 'handlers': { 'console':{ 'level':'DEBUG', 'class':'logging.StreamHandler', }, }, 'loggers': { 'django.request':...
Python
0
@@ -17,24 +17,18 @@ #### -###%0A# PRODUCTION +%0A# STAGING SET @@ -55,19 +55,16 @@ ######## -### %0A%0Aimport @@ -694,16 +694,8 @@ rg'%5D - #FIXME %0A%0A%0A#
7959c10d2e2741a1e0de7a6f0e2d67b5657087f5
Add citations to base API urls
api/base/urls.py
api/base/urls.py
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.views.generic.base import RedirectView from settings import API_BASE from . import views base_pattern = '^{}'.format(API_BASE) # Please keep URLs alphabetized for auto-generated documenta...
Python
0
@@ -615,32 +615,123 @@ pplications')),%0A + url(r'%5Ecitations/', include('api.citations.urls', namespace='citations')),%0A
89dc67d6fceabad13cfdcf791402dc86df60dd55
Document the options not allowed in the
salt/states/archive.py
salt/states/archive.py
# -*- coding: utf-8 -*- ''' Archive states. .. versionadded:: 2014.1.0 (Hydrogen) ''' import logging import os import tarfile from contextlib import closing log = logging.getLogger(__name__) def extracted(name, source, archive_format, tar_options=None, source...
Python
0
@@ -2444,16 +2444,123 @@ endent.%0A + Main operators like -x, --extract, --get, -c, etc. and -f/--file are%0A **not allowed** here.%0A @@ -5310,59 +5310,8 @@ se:%0A - # this is needed until merging PR 2651%0A @@ -5375,317 +5375,8 @@ e))%0A - for opt in %5B'x'%5D:%0...
d5ab2226cab8d695854961774835cea25576e39c
remove redirect
bulbs/videos/views.py
bulbs/videos/views.py
from django.conf import settings from django.http import Http404 from django.views.generic import DetailView from django.views.decorators.cache import cache_control import requests class SeriesDetailView(DetailView): redirect_correct_path = False def get_template_names(self): template_names = ["vide...
Python
0.000001
@@ -216,42 +216,8 @@ ew): -%0A redirect_correct_path = False %0A%0A
0fbeb784a33fc09d92d0e31363ccb71a8370d933
Add list_files to the utils module
salt/utils/__init__.py
salt/utils/__init__.py
''' Some of the utils used by salt ''' import logging import os import sys log = logging.getLogger(__name__) # Do not use these color declarations, use get_colors() # These color declarations will be removed in the future BLACK = '\033[0;30m' DARK_GRAY = '\033[1;30m' LIGHT_GRAY = '\033[0;37m' BLUE = '\033[0;34m' LIG...
Python
0.000001
@@ -2504,16 +2504,17 @@ eno())%0A%0A +%0A def prof @@ -3265,12 +3265,365 @@ rn proffunc%0A +%0A%0Adef list_files(directory):%0A '''%0A Return a list of all files found under directory%0A '''%0A ret = set()%0A ret.add(directory)%0A for root, dirs, files in os.walk(directory):%0A for name in f...
1af389a1e92b531d1a78db51b45169536c48ef25
bump to 0.8.16.
tsuru/__init__.py
tsuru/__init__.py
# Copyright 2015 tsuru-circus authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. __version__ = "0.8.15"
Python
0
@@ -176,11 +176,11 @@ = %220.8.1 -5 +6 %22%0A
61fdbe0dba79dc19cda5320a0ad1352facf12d3d
Rework imports and ignore known mypy issues
twine/__init__.py
twine/__init__.py
# Copyright 2018 Donald Stufft and individual contributors # # 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 la...
Python
0
@@ -807,16 +807,17 @@ utors%22%0A%0A +%0A try:%0A @@ -813,30 +813,77 @@ %0A%0A%0Atry:%0A -import +# https://github.com/python/mypy/issues/1393%0A from importlib.m @@ -894,29 +894,23 @@ ata -as import -lib_ + metadata %0Aexc @@ -905,16 +905,32 @@ metadata + # type: ignore %0Aexcept @@ -946,22 +...
8b622a20e27bd4119e2ba11762726051b0337c7e
Add admin operator permission lookup to services
txircd/service.py
txircd/service.py
from txircd.module_interface import Command, ICommand, ModuleData from txircd.user import LocalUser from txircd.utils import splitMessage from zope.interface import implements class Service(ModuleData): """A service is a specific kind of module, with some pre-made stuff to assist in creating a pseudo-user tha...
Python
0
@@ -6109,22 +6109,103 @@ urn -False # TODO how? +self.ircd.runActionUntilValue(%22userhasoperpermission%22, user, %22service-admin-%7B%7D%22.format(self.name)) %0A
7fbbaf258d6c77b72b76d3a324ed7ea06d8f923e
Rename post data variable to be more inline with requests default
txtlocal/utils.py
txtlocal/utils.py
import requests from django.conf import settings from django.contrib.sites.models import Site from django.template.loader import render_to_string from django.utils.http import urlencode def send_sms(text, recipient_list, sender=None, username=None, password=None, **kwargs): """ Render and send a...
Python
0
@@ -1206,24 +1206,22 @@ %22%22%0A p -ost_data +ayload = %7B%0A @@ -1691,16 +1691,14 @@ ta=p -ost_data +ayload ).js
780b40ca4ef172597ed0a17f6b5da32d3845a2c2
use distro version
cerbero/bootstrap/build_tools.py
cerbero/bootstrap/build_tools.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.000001
@@ -932,16 +932,23 @@ , Distro +Version %0Afrom ce @@ -1779,16 +1779,24 @@ g.distro +_version in %5BDis @@ -1798,16 +1798,23 @@ %5BDistro +Version .OS_X_SN
ddac7d566e22342e0334f100e595afacbc657f68
Correct format of invalid git repo test data
tests/cli/test_cmds_start_stop_restart.py
tests/cli/test_cmds_start_stop_restart.py
# Copyright 2015 Yelp 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, so...
Python
0.000024
@@ -5984,9 +5984,18 @@ e = -%5B +%7B%0A %22ref @@ -6036,9 +6036,53 @@ ref%22 -%5D +: %2270f7245ccf039d778c7e527af04eac00d261d783%22%7D %0A
df54afbacb840eac921dcc1ac9757c4604266381
Fix DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
infrared/api.py
infrared/api.py
# provides API to run plugins import abc import argparse import logging import yaml from infrared.core import execute from infrared.core.inspector.inspector import SpecParser from infrared.core.services import CoreServices from infrared.core.settings import VarsDictManager from infrared.core.utils import logger from ...
Python
0.000027
@@ -2995,16 +2995,19 @@ LOG.warn +ing (%22There @@ -3051,16 +3051,19 @@ d: %25s%22,%0A +
7e0c995255f836e8bac0496dce3cd75ee795e130
Add simple window title back to Webview
webview.py
webview.py
#!/usr/bin/env python3 import sys import threading import gi gi.require_version('WebKit2', '4.0') from gi.repository import WebKit2 from gi.repository import Gtk from gi.repository import Gio try: from urllib import parse as urlparse except ImportError: import urlparse from server import start_server, bye, ap...
Python
0
@@ -1994,16 +1994,46 @@ Jappy%22)%0A + window.set_title(%22Jappy%22)%0A wind
019ef0149ad1613dbe0b22647d5f62d5e7e03c07
Update predict_main.py
lasertagger/predict_main.py
lasertagger/predict_main.py
# coding=utf-8 # Copyright 2019 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
Python
0.000005
@@ -2434,16 +2434,189 @@ h token. + '%0A 'If set to POS_concise, segment is is the Part of Speech tags, '%0A 'but the number of tags is smaller than the one for POS embeddings. ')%0Aflags
9ef521ff88a3e603f41a4edf7a1aa499b96c0454
Update dataproc synth script to rename WorkflowTemplate factory (#2745)
google-cloud-dataproc/synth.py
google-cloud-dataproc/synth.py
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
Python
0
@@ -3184,12 +3184,633 @@ 0.59.2%22'%0A)%0A +%0A# https://github.com/googleapis/gapic-generator/issues/2492%0As.replace(%0A %5B%0A 'lib/google/cloud/dataproc.rb',%0A 'lib/google/cloud/dataproc/v1.rb'%0A %5D,%0A 'module WorkflowTemplate%5Cn',%0A 'module WorkflowTemplateService%5Cn'%0A)%0As.rep...
1257490c100b13244810b740288e95acc339a3b9
Replace FileNotFoundError with IOError for Python 2 compatibility
samsungctl/__main__.py
samsungctl/__main__.py
import argparse import collections import json import logging import os import socket from . import __doc__ as doc from . import __title__ as title from . import __version__ as version from . import interactive from . import exceptions from . import Remote def _read_config(): config = collections.defaultdict(lamb...
Python
0.000001
@@ -78,16 +78,29 @@ t socket +%0Aimport errno %0A%0Afrom . @@ -769,44 +769,15 @@ -try:%0A config_file = open( +path = os.p @@ -818,63 +818,191 @@ nf%22) -)%0A except FileNotFoundError:%0A continu +%0A try:%0A config_file = open(path)%0A except IOError as ...
b8d3002eb7bdad0ba0fef2820bb887b126c2d15f
Create socket if not created by the Node
iris/web/interfaces.py
iris/web/interfaces.py
from gevent.pywsgi import WSGIServer from werkzeug.wrappers import Request from werkzeug.exceptions import HTTPException from iris.core.interfaces import Interface from iris.core import trace from iris.utils.sockets import create_socket class WebServiceInterface(Interface): http_port = 80 def __init__(self,...
Python
0.000001
@@ -516,26 +516,186 @@ -self.http_ +try:%0A socket_fd = self.container.get_shared_socket_fd(self.http_port)%0A except KeyError:%0A print self.container.ip, self.http_port%0A socket = @@ -714,70 +714,326 @@ et(' -fd:// +%25s: %25s' %25 -self.container.get_shared_soc...
b02e1b878ab34be80576f5d03efdf4abbd129170
Add base js to widget repository page
widgets.py
widgets.py
# Copyright 2012 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 ...
Python
0
@@ -2037,16 +2037,24 @@ tJsFiles +WithBase (%5B'widge
ec9588025890d86747667c00aaae6b58a548997c
Bump version
siloscript/version.py
siloscript/version.py
# Copyright (c) The SimpleFIN Team # See LICENSE for details. __version__ = "0.1.0-dev"
Python
0
@@ -77,13 +77,9 @@ %220. -1.0-dev +2.1 %22%0A
a49f479a5ff1be4808dff0923c9724aad4b28d3e
move wait to where its needed on assembler
lbrynet/stream/assembler.py
lbrynet/stream/assembler.py
import os import binascii import logging import typing import asyncio from lbrynet.blob import MAX_BLOB_SIZE from lbrynet.stream.descriptor import StreamDescriptor if typing.TYPE_CHECKING: from lbrynet.blob.blob_manager import BlobFileManager from lbrynet.blob.blob_info import BlobInfo from lbrynet.blob.blo...
Python
0.000001
@@ -5571,82 +5571,8 @@ ly:%0A - if save_tasks:%0A await asyncio.wait(save_tasks)%0A @@ -5702,16 +5702,98 @@ tream%22)%0A + if save_tasks:%0A await asyncio.wait(save_tasks)%0A @@ -6099,38 +6099,39 @@ elf. -stream_handle is not None and +outp...
465a3818e602800748a4fa2c67ebdc29b3ef598f
Add public methods handle_num and is_static.
STAF/_staf.py
STAF/_staf.py
import ctypes from . import _api from ._errors import errors, STAFResultError from ._marshal import unmarshal_recursive ######################### # The main STAF interface ######################### class Handle(object): # Submit modes (from STAF.h, STAFSyncOption_e) req_sync = 0 req_fire_and_f...
Python
0
@@ -2992,16 +2992,125 @@ le = 0%0A%0A + def handle_num(self):%0A return self._handle%0A%0A def is_static(self):%0A return self._static%0A%0A def
b1ade8f0705a692cf09aaefe05fcb5469f08170b
Add parenthesis for python3 support
src/py/generatelib/add_heatkernel_vtk.py
src/py/generatelib/add_heatkernel_vtk.py
import argparse import inputData import glob import os import vtk import scipy.io as sio import numpy as np from vtk.util import numpy_support parser = argparse.ArgumentParser(description='Shape Variation Analyzer') parser.add_argument('--dataPath', action='store', dest='dirwithSub', help='folder with subclasses', re...
Python
0.000001
@@ -1795,16 +1795,17 @@ LOAT)%0A%0A%0A +%0A %09%09%09%09%09%09he
9ee61d14e5f9a35efcc7aa45172b8382fa25fa7a
Correct parameter rename oversight.
portal/config/site_persistence.py
portal/config/site_persistence.py
"""SitePersistence Module""" from collections import namedtuple from flask import current_app from .config_persistence import export_config, import_config from ..database import db from ..models.app_text import AppText from ..models.auth import AuthProviderPersistable, Token from ..models.client import Client from ..m...
Python
0
@@ -5610,16 +5610,25 @@ s=model. +limit_to_ attribut
98e90b8920e66faadd8886835a8f1b9e630643cd
Fix logging
wxpy/utils/console.py
wxpy/utils/console.py
import inspect def _ipython(local, banner): from IPython.terminal.embed import InteractiveShellEmbed from IPython.terminal.ipapp import load_default_config InteractiveShellEmbed.clear_instance() shell = InteractiveShellEmbed.instance( banner1=banner, user_ns=local, config=load...
Python
0.000007
@@ -3292,26 +3292,35 @@ ing. -basicConfig(l +getLogger('wxpy').setL evel -= +( leve
6a99d3972ef1c8265910376a1684e1e1be4ee887
make volvox selenium test even slower, but more robust
tests/selenium_tests/volvox_biodb_test.py
tests/selenium_tests/volvox_biodb_test.py
import time import subprocess from subprocess import check_call as call, PIPE; import unittest from jbrowse_selenium import JBrowseTest; class AbstractVolvoxBiodbTest( JBrowseTest ): data_dir = 'sample_data/json/volvox' def setUp( self ): call( "rm -rf sample_data/json/volvox/", shell=True ) ...
Python
0.000001
@@ -3741,19 +3741,19 @@ e.sleep( -0.5 +1.0 )%0A%0A
72dc8c496cf59274047cf810b8dc85bd19da533d
Add convenience property 'named_generators'
tohu/v6/tohu_namespace.py
tohu/v6/tohu_namespace.py
from .base import TohuBaseGenerator from .logging import logger class TohuNamespaceError: """ Custom exception for TohuNamespace """ class TohuNamespace: def __init__(self): self._ns = {} @classmethod def from_dict(cls, d): ns = TohuNamespace() ns.update_from_dict(d...
Python
0.000001
@@ -670,24 +670,148 @@ n self._ns%0A%0A + @property%0A def named_generators(self):%0A return %7Bname: g for g, name in self._ns.items() if name is not None%7D%0A%0A @propert
8ad6bc885c579c11e98ea3a4fe0f156b7dc9ffea
Divided data in between http and https protocol
tests/test_location_by_point_query_url.py
tests/test_location_by_point_query_url.py
from bingmaps.location import LocationByPoint from bingmaps import BING_MAPS_KEY from .fixtures import parametrize https_protocol = 'https' DATA = [ {'queryParameters': { 'point': '1,2', 'includeEntityTypes': 'address', 'key': BING_MAPS_KEY}}, {'queryParameters': { 'point': '3,...
Python
0.998466
@@ -2835,405 +2835,4 @@ ted%0A -%0A%0A@parametrize('data,expected', %5B%0A (DATA%5B0%5D, EXPECTED%5B0%5D),%0A (DATA%5B1%5D, EXPECTED%5B1%5D),%0A (DATA%5B2%5D, EXPECTED%5B2%5D),%0A (DATA%5B3%5D, EXPECTED%5B3%5D),%0A (DATA%5B4%5D, EXPECTED%5B4%5D),%0A (DATA%5B5%5D, EXPECTED%5B5%5D),%0A (DATA%5B6%5D,...
013ffb7a9b133fd3f34e61af821b9024948bc733
Allow ~ in paths.
update-hash-db.py
update-hash-db.py
#!/usr/bin/env python import collections import gdbm import hashlib import os import os.path def sha1sum(path): h = hashlib.sha1() with open(path, 'rb') as f: h.update(f.read(1024 * 1024)) return h.hexdigest() class HashDb(collections.MutableMapping): class Entry(object): __slots__ =...
Python
0
@@ -3803,16 +3803,35 @@ HashDb( +os.path.expanduser( args.dat @@ -3839,16 +3839,17 @@ base%5B0%5D) +) as db:%0A
7c430d4679ce1cc51f7566bc6479fee8aa7427d6
Use platform_group in Android device metric (#2515)
src/python/bot/startup/android_heartbeat.py
src/python/bot/startup/android_heartbeat.py
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
0.000001
@@ -2217,16 +2217,22 @@ e_serial + or '' ,%0A @@ -2261,24 +2261,28 @@ ronment. +get_ platform (),%0A @@ -2273,18 +2273,30 @@ platform -() +_group() or '' ,%0A
dc20ec37ff2cd19b96d0023d8ada1e11350a7b2f
Remove user_id requirement (#8527)
src/sentry/analytics/events/project_issue_searched.py
src/sentry/analytics/events/project_issue_searched.py
from __future__ import absolute_import, print_function from sentry import analytics class ProjectIssueSearchEvent(analytics.Event): type = 'project_issue.searched' attributes = ( analytics.Attribute('user_id'), analytics.Attribute('organization_id'), analytics.Attribute('project_id')...
Python
0.000001
@@ -217,24 +217,40 @@ te('user_id' +, required=False ),%0A a
bdde13dc334b7b6be83550579a472e817d0570a1
Platform.stop should not have take the coords from the Platform
src/choo/apis/efa/parsers/coordinfo.py
src/choo/apis/efa/parsers/coordinfo.py
from ....models import City, GeoPoint, Platform, POI, Stop, StopArea from ....types import Coordinates, StopIFOPT, PlatformIFOPT from ...base import XMLParser, ParserError, cached_property, parser_property from .utils import GenAttrMapping class CoordInfoGeoPointList(XMLParser): def __iter__(self): return...
Python
0.999479
@@ -968,15 +968,70 @@ ta, -*args): +no_coords=None):%0A if no_coords:%0A return None %0A @@ -1268,32 +1268,48 @@ attrs(self, data +, no_coords=None ):%0A retur @@ -1439,32 +1439,48 @@ name(self, data +, no_coords=None ):%0A retur @@ -2145,19 +2145,27 @@ data, c -ity +ountry=...
d33ee23da8e681b6c1cd024e217d46eb67a5f6a3
version bump to 5.3.0
augur/__version__.py
augur/__version__.py
__version__ = '5.2.1'
Python
0.000001
@@ -14,9 +14,9 @@ '5. -2.1 +3.0 '%0A
170282137fc3a6b11d81cd357084c0c8ec23fcea
fix recursive use of LetNodeMixin
Cython/Compiler/UtilNodes.py
Cython/Compiler/UtilNodes.py
# # Nodes used as utilities and support for transforms etc. # These often make up sets including both Nodes and ExprNodes # so it is convenient to have them in a seperate module. # import Nodes import ExprNodes from Nodes import Node from ExprNodes import AtomicExprNode class TempHandle(object): # THIS IS DEPRECA...
Python
0.000105
@@ -5017,24 +5017,25 @@ self. +_ result_in_te @@ -5140,24 +5140,25 @@ if self. +_ result_in_te @@ -5575,24 +5575,25 @@ if not self. +_ result_in_te
0b957faff6c7e4d14f79f522768c662c795b1d0c
Remove unnecessary file kwarg from inchi_to_svg
cameo/api/products.py
cameo/api/products.py
# Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
Python
0.000001
@@ -774,19 +774,8 @@ nchi -, file=None ):%0A
0e7d35b5d7ed62e1500741134156dffacf6fee84
Fix doc error.
skosprovider/utils.py
skosprovider/utils.py
# -*- coding: utf-8 -*- ''' This module contains utility functions for dealing with skos providers. ''' from skosprovider.skos import ( Concept, Collection ) def dict_dumper(provider): ''' Dump a provider to a format that can be passed to a :class:`skosprovider.providers.FlatDictionaryProvider` o...
Python
0
@@ -292,76 +292,8 @@ ers. -FlatDictionaryProvider%60 or a%0A :class:%60skosprovider.providers.Tree Dict
45444c93a3186b4db6c6a05785756d05d496a351
Copy the helpers before everything else
lib/hawaiibuildbot/archlinux/__init__.py
lib/hawaiibuildbot/archlinux/__init__.py
# # This file is part of Hawaii. # # Copyright (C) 2015 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> # # 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 License, or # (...
Python
0
@@ -1185,314 +1185,8 @@ s)%0A%0A - # Create a directory to hold the packages that have been built%0A self.addStep(steps.MakeDirectory(name=%22CreateRepositoryDir%22, dir=%22repository%22))%0A # Create or update the chroot%0A #self.addStep(PrepareChrootAction(arch=arch))%0A self.addSt...
ce28a5a48b5f6a23cf7d819ee4668790a88172a5
add PID to logger
slm_lab/lib/logger.py
slm_lab/lib/logger.py
from slm_lab.lib import util import colorlog import logging import os import pandas as pd import sys import warnings class FixedList(list): '''fixed-list to restrict addition to root logger handler''' def append(self, e): pass # extra debugging level deeper than the default debug NEW_LVLS = {'DEBUG...
Python
0.000002
@@ -455,32 +455,48 @@ = '%5B%25(asctime)s +PID:%25(process)d %25(levelname)s %25( @@ -604,16 +604,32 @@ ctime)s +PID:%25(process)d %25(leveln
f4ef16888befbee0c4d4000ed7f40d65bc4aad13
更新编译脚本,规整代码
tools/building_script/cpputils/cppfile.py
tools/building_script/cpputils/cppfile.py
# -*- coding: utf-8 -*- """ CPP文件简单封装,用于生成cpp文件. """ from os import path as op from time import time, localtime, strftime class CppFile(object): def __init__(self, fpath, author='Unknown author', ver='1.0', doc='', include_macro_prefix=None): self.__fpath = fpath self.__author = author se...
Python
0
@@ -3584,23 +3584,16 @@ if -self.__ incls:%0A
af484d5a2fee32af8800369a0a3e53372cf4f938
Make v8 tarball export script pull gyp (and possibly other v8 dependencies).
tools/export_tarball/export_v8_tarball.py
tools/export_tarball/export_v8_tarball.py
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This tool creates a tarball with V8 sources, but without .svn directories. This allows easy packaging of V8, synchronized with bro...
Python
0.000008
@@ -2710,16 +2710,85 @@ turn 0%0A%0A + subprocess.check_call(%5B%22make%22, %22dependencies%22%5D, cwd=v8_directory)%0A%0A archiv
3f2cf9bffaff0186863338a5f7c8d8c31cc6bafc
add tests for the API controller action, both pass and fail
st2api/tests/unit/controllers/v1/test_action_alias.py
st2api/tests/unit/controllers/v1/test_action_alias.py
# Licensed to the StackStorm, Inc ('StackStorm') 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 may not use th...
Python
0
@@ -4000,21 +4000,62 @@ app. -match(%22 +post(%22/v1/actionalias/match%22, params=%22command= hello - +%2520 donn @@ -4098,25 +4098,388 @@ atus_int, 20 -1 +2)%0A self.assertEqual(resp.text, '%5B%5D')%0A%0A resp = self.app.post(%22/v1/actionalias/match%22, params=%22command=Lorem%2520ipsum%2520banana%...
275d64b678eaaf193866eced0720838f4817b1f1
modify orm.py
www/orm.py
www/orm.py
#!/usr/bin/env python3 # -*- coding:utf-8 -*- __author__ = "" ''' ''' import asyncio,logging import aiomysql def log(sql,args=()): logging.info('SQL: %s' % sql) async def create_pool(loop,**kw): logging.info('create database connection pool...') global _pool _pool = await aiomysql.create_pool( ...
Python
0.000001
@@ -89,16 +89,56 @@ logging%0A +logging.basicConfig(level=logging.INFO)%0A import a @@ -691,8 +691,441 @@ p%0A )%0A +%0Aasync def select(sql,args,size=None):%0A log(sql,args)%0A global _pool%0A async with _pool.get() as conn:%0A async with conn.cursor(aiomysql.DictCursor) as cur:%0A awa...
2835ec88db32664ce8fc7b6876a36546063da526
Allow dynamic translation in AngularJS
awesomeshop/views.py
awesomeshop/views.py
# -*- coding: utf8 -*- # Copyright 2015 Sébastien Maccagnoni-Munch # # This file is part of AwesomeShop. # # AwesomeShop 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,...
Python
0.000003
@@ -1012,16 +1012,26 @@ required +, messages %0A%0Adef re @@ -1354,32 +1354,119 @@ ('login.html')%0A%0A +@app.route('/messages')%0Adef messages_route():%0A return jsonify(messages.messages())%0A%0A @app.route('/con
d3a841265e061fd677f64b2f11a32be4beba05eb
Add support for Safari Push Notifications
apns2/payload.py
apns2/payload.py
MAX_PAYLOAD_SIZE = 4096 class PayloadAlert(object): def __init__(self, title=None, title_localized_key=None, title_localized_args=None, body=None, body_localized_key=None, body_localized_args=None, action_localized_key=None, launch_image=None): self.title...
Python
0
@@ -253,25 +253,38 @@ ed_key=None, + action=None, %0A - @@ -629,32 +629,61 @@ n_localized_key%0A + self.action = action%0A self.lau @@ -1368,16 +1368,83 @@ ized_key +%0A if self.action:%0A result%5B'action'%5D = self.action %0A%0A @@ -1725,16 +1725,31 @@ ry=No...
dc3a1c9dc0219701da626e486902ba6dfee4d237
use geonode templates by default
cartoview/settings.py
cartoview/settings.py
# -*- coding: utf-8 -*- import os from distutils.util import strtobool from geonode.settings import * import ast import re import dj_database_url import cartoview import sys INSTALLED_APPS += ("cartoview", "cartoview.cartoview_api.apps.CartoviewAPIConfig", "cartoview.app_manager",...
Python
0
@@ -674,16 +674,18 @@ %22DIRS%22%5D%0A +# TEMPLATE @@ -2976,16 +2976,67 @@ _ALONE:%0A + TEMPLATES%5B0%5D%5B%22DIRS%22%5D = CARTOVIEW_TEMPLATE_DIRS%0A from
5ec9c50e18f450a7ebdd5ce23df0bf236aebb7cb
Make version 1.1.2.post
cassandra/__init__.py
cassandra/__init__.py
# Copyright 2013-2014 DataStax, 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 writi...
Python
0
@@ -755,16 +755,24 @@ (1, 1, 2 +, 'post' )%0A__vers
6e8bdb866f4a742e748a72bb7eba8b90b78890df
add new point
test/test_vpi_coverage.py
test/test_vpi_coverage.py
# Copyright (c) 2013 Rich Porter - see LICENSE for further details import coverage import message import test import verilog # we reuse vpi test import test_vpi message.message.verbosity(message.INT_DEBUG) ################################################################################ class test_cvg : class cov...
Python
0.002223
@@ -1015,45 +1015,30 @@ mt0 - = coverage.axis('fmt0', parent=self += self.add_axis('fmt0' , vp @@ -1107,45 +1107,30 @@ mt1 - = coverage.axis('fmt1', parent=self += self.add_axis('fmt1' , vp @@ -1363,16 +1363,369 @@ al=10)%0A%0A + class coverpoint_iterations(coverage.coverpoint) :%0A ''%0A def __init__(s...
0d1a862cb2745fa15d74a970159f99b6a04ad7d9
Add MXs.
fabfile/testbeds/testbed_a6s30.py
fabfile/testbeds/testbed_a6s30.py
from fabric.api import env os_username = 'admin' os_password = 'contrail123' os_tenant_name = 'demo' host1 = 'root@10.84.13.30' ext_routers = [] router_asn = 64512 public_vn_rtgt = 10000 host_build = 'nsheth@10.84.5.31' env.roledefs = { 'all': [host1], 'cfgm': [host1], 'openstack': [host1], ...
Python
0
@@ -139,16 +139,64 @@ ters = %5B +('mx1', '10.84.11.253'), ('mx2', '10.84.11.252') %5D%0Arouter
ae81f50c8750ab502f9208f054239fb00ece263b
remove debug lines; check correct string
yumoter.py
yumoter.py
#!/usr/bin/env python2 import sys, os, json, errno, subprocess, yum class yumoter: def __init__(self, configFile, repobasepath): self.repobasepath = repobasepath self.reloadConfig(configFile) self.yb = yum.YumBase() self.yb.setCacheDir() def reloadConfig(self, jsonFile): ...
Python
0.000005
@@ -2924,52 +2924,8 @@ o%5D:%0A - print self.repoConfig%5Brepo%5D%0A @@ -3060,79 +3060,8 @@ %5D):%0A - print %22foo%22, self.repoConfig%5Brepo%5D%5B'fullpaths'%5D%5B0%5D%0A
c596cc9a10a8bacf01ba76aa56a1b591e3d4b4c6
debug prints
yumoter.py
yumoter.py
#!/usr/bin/env python2 import sys, os, json, errno, subprocess, yum class yumoter: def __init__(self, configFile, repobasepath): self.repobasepath = repobasepath self.reloadConfig(configFile) self.yb = yum.YumBase() self.yb.setCacheDir() def reloadConfig(self, jsonFile): ...
Python
0.000001
@@ -2208,13 +2208,12 @@ int -'foo' +repo %0A
385bdbafc1604ac0a3f07f3e469b19bf80e51145
update default_log_levels set by ceilometer
ceilometer/service.py
ceilometer/service.py
#!/usr/bin/env python # # Copyright 2012-2014 eNovance <licensing@enovance.com> # # Author: Julien Danjou <julien@danjou.info> # # 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://...
Python
0
@@ -3679,16 +3679,113 @@ ials%22)%0A%0A +cfg.CONF.import_opt('default_log_levels',%0A 'ceilometer.openstack.common.log')%0A %0ALOG = l @@ -4419,60 +4419,31 @@ -cfg.set_defaults(log.log_opts,%0A +log_levels = (cfg.CONF. defa @@ -4460,25 +4460,10 @@ vels -=%5B'amqplib=WAR...
25a7644c1321de34d40cc1f4d956ac4bdd6b55b9
Fix code so it works under Python 3.
st2auth_flat_file_backend/flat_file.py
st2auth_flat_file_backend/flat_file.py
# Licensed to the StackStorm, Inc ('StackStorm') 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 may not use th...
Python
0.000112
@@ -1454,16 +1454,17 @@ rtswith( +b '#'):%0A
5ee773886659874e2c1b7521ee3220167e016627
Print traceback on FatalError in a build step
cerbero/build/oven.py
cerbero/build/oven.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
@@ -5916,16 +5916,40 @@ e, step, + traceback.format_exc(), e.arch) @@ -6346,17 +6346,23 @@ pe, step - +, trace , arch): @@ -6708,16 +6708,29 @@ e, step, + trace=trace, arch=ar
9013ff39a60ae100fb0a94cc87adc83453825653
Fix searching of Program Files on 32-bit Windows
cerbero/ide/vs/env.py
cerbero/ide/vs/env.py
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2016 Nirbheek Chauhan <nirbheek@centricular.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; eith...
Python
0
@@ -1388,16 +1388,25 @@ at'%5D,%0A%7D%0A +%0Adef get_ program_ @@ -1414,47 +1414,324 @@ iles - = Path(os.environ%5B'PROGRAMFILES(X86)'%5D +_dir():%0A if 'PROGRAMFILES(X86)' in os.environ:%0A # Windows 64-bit%0A return Path(os.environ%5B'PROGRAMFILES(X86)'%5D)%0A elif 'PROGRAMFILES' in os.environ:...
92bb7d0e4596b69d21fe5ba53efeb18ea2ebf7c2
Add rename first level directory if necessary
updatorr/utils.py
updatorr/utils.py
import time from collections import defaultdict from cookielib import CookieJar from copy import deepcopy from deluge._libtorrent import lt # Torrent tracker handler classes registry. TRACKER_HANDLERS = {} def register_tracker_handler(domain_name, handler_callable): """Registers a tracker handler class with so...
Python
0.000001
@@ -4,16 +4,26 @@ ort time +%0Aimport os %0A%0Afrom c @@ -3407,16 +3407,468 @@ ority)%0A%0A + # Check for root folder rename%0A old_splited = os.path.split(full_prefs%5B'files'%5D%5B0%5D%5B'path'%5D)%0A if len (old_splited) %3E 1:%0A old_folder = old_splited%5B0%5D%0A new_folder = os.path.spli...
994fdc443b288472a04c01a37b5bd421f5c3689d
make script launching obs itself, fix bug
livestream/2020-himym/update_playlist.py
livestream/2020-himym/update_playlist.py
#!/usr/bin/python3 #结合OBS的VLC源和tuna插件,每次开播从上次断开的一集前继续播放 import argparse as ap import re from pathlib import Path def fetch_curr_sp(): with open(url_tuna_txt, encoding='utf-8-sig') as fd: str_tuna = fd.readline() str_tuna = re.sub("^S([0-9]*)E([0-9\-]*).*",r'\1%\2', str_tuna) s ...
Python
0
@@ -14,16 +14,34 @@ thon3%0D%0A# + OBS%E8%87%AA%E5%90%AF%E6%8E%A8%E6%B5%81%E5%90%AF%E5%8A%A8%E5%99%A8%0D%0A# %E7%89%B9%E6%80%A7%EF%BC%9A %E7%BB%93%E5%90%88OBS%E7%9A%84VL @@ -66,13 +66,14 @@ %E5%BC%80%E7%9A%84%E4%B8%80%E9%9B%86 -%E5%89%8D %E7%BB%A7%E7%BB%AD%E6%92%AD%E6%94%BE +%E6%8E%A8%E6%B5%81 %0D%0A%0D%0A @@ -131...
0a5908495afcd9dba729a07d7166f71530d62dee
remove erroneous assert statement
progressive/multiCactusProject.py
progressive/multiCactusProject.py
#!/usr/bin/env python #Copyright (C) 2011 by Glenn Hickey # #Released under the MIT license, see LICENSE.txt """ Basic interface to the multi cactus project xml file. """ import unittest import os import xml.etree.ElementTree as ET from xml.dom import minidom import sys import random import math import copy import...
Python
0.999999
@@ -2041,48 +2041,8 @@ e):%0A - assert eventName in self.expMap%0A
5a8fbcd270e0c980cf05076e6b2c8f1b71edfb4c
Fix small error.
examples/googlenet.py
examples/googlenet.py
""" $lic$ Copyright (C) 2016-2017 by The Board of Trustees of Stanford University This program is free software: you can redistribute it and/or modify it under the terms of the Modified BSD-3 License as published by the Open Source Initiative. If you use this program in your research, we request that you reference th...
Python
0
@@ -3554,24 +3554,16 @@ 24, 1, 7 -, strd=2 ), prevs
f92eac982dee9d4ea97e36cfda0f1fa19213b9f4
Improve Project Euler problem 092 solution 1 (#5703)
project_euler/problem_092/sol1.py
project_euler/problem_092/sol1.py
""" Project Euler Problem 092: https://projecteuler.net/problem=92 Square digit chains A number chain is created by continuously adding the square of the digits in a number to form a new number until it has been seen before. For example, 44 → 32 → 13 → 10 → 1 → 1 85 → 89 → 145 → 42 → 20 → 4 → 16 → 37 → 58 → 89 Therefor...
Python
0.000001
@@ -542,16 +542,71 @@ ?%0A%22%22%22%0A%0A%0A +DIGITS_SQUARED = %5Bdigit ** 2 for digit in range(10)%5D%0A%0A%0A def next @@ -735,17 +735,16 @@ rm a new -w number. @@ -759,16 +759,17 @@ example +, if numb @@ -1049,17 +1049,31 @@ ared += -( +DIGITS_SQUARED%5B number %25 @@ -1079,14 +1079,9 @@ %25 10 -) ** 2 ...
01941fd4df07d1a4d9c0fb958defdb7bc3e334c0
Add crankshaft, fix wrong default index in rigid
examples/hp/hp_opt.py
examples/hp/hp_opt.py
import math from typing import List, Tuple, MutableSequence, Sequence, Collection, Any from csaopt.utils import clamp # -- Globals hp_str = 'PHHPPHPHPPHPHPHPPHPPHHHHH' eps = -1 h_idxs = [idx for idx, mm in enumerate(hp_str) if mm == 'H'] # -- Globals Chain2d = List[Tuple[int, int, int, int]] def empty_state() -...
Python
0.000001
@@ -1526,112 +1526,8 @@ act%0A - # print('Contact found', h1, h2, d)%0A # contacts.append((h1, h2))%0A @@ -1639,18 +1639,17 @@ : int = --1 +0 , clckwi @@ -1882,32 +1882,174 @@ ft(chain -, idx):%0A pass +: Chain2d, idx: int):%0A tmp1 = chain%5Bidx%5D%5B3%5D%0A tm...
1bc4507234d87b1ed246501165fa1d8138bf5ca6
Fix for pypy compatibility: must super's __init__
cheddar/exceptions.py
cheddar/exceptions.py
""" Shared exception. """ class BadRequestError(Exception): pass class ConflictError(Exception): pass class NotFoundError(Exception): def __init__(self, status_code=None): self.status_code = status_code
Python
0.000002
@@ -184,16 +184,62 @@ =None):%0A + super(NotFoundError, self).__init__()%0A
73ccd7bdfdc800034a301d1700b0d0a1b95d161a
Throw error when key is not present in dict data
torchtext/data/example.py
torchtext/data/example.py
import csv import json import six class Example(object): """Defines a single training or test example. Stores each column of the example as an attribute. """ @classmethod def fromJSON(cls, data, fields): return cls.fromdict(json.loads(data), fields) @classmethod def fromdict(cl...
Python
0
@@ -414,19 +414,168 @@ key +not in data - and +:%0A raise ValueError(%22Specified key %7B%7D was not found in %22%0A %22the input data%22.format(key))%0A if val