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
097a057d289fc6a00c6841f26c5d4776b4a6ea48
Fix import.
tests/chainer_tests/functions_tests/pooling_tests/pooling_nd_helper.py
tests/chainer_tests/functions_tests/pooling_tests/pooling_nd_helper.py
import itertools import nose.tools import six import testing @nose.tools.nottest def pooling_patches(dims, ksize, stride, pad, cover_all): """Return tuples of slices that indicate pooling patches.""" # Left-top indexes of each pooling patch. if cover_all: xss = itertools.product( *[six...
Python
0
@@ -39,16 +39,29 @@ ort six%0A +from chainer import t
72f763d9759438abd731585a1b5ef67e62e27181
Use version gathering logic from hydrachain
pyethapp/__init__.py
pyethapp/__init__.py
# -*- coding: utf-8 -*- # ############# version ################## from pkg_resources import get_distribution, DistributionNotFound import os.path import subprocess try: _dist = get_distribution('pyethapp') # Normalize case for Windows systems dist_loc = os.path.normcase(_dist.location) here = os.path.n...
Python
0.000001
@@ -158,16 +158,149 @@ process%0A +import re%0A%0A%0AGIT_DESCRIBE_RE = re.compile('%5E(?P%3Cversion%3Ev%5Cd+%5C.%5Cd+%5C.%5Cd+)-(?P%3Cgit%3E%5Cd+-g%5Ba-fA-F0-9%5D+(?:-dirty)?)$')%0A%0A%0A__version__ = None%0A try:%0A @@ -627,16 +627,48 @@ otFound%0A + __version__ = _dist.version%0A except D @@ -696,625 +696,3...
7f8b2532d1771882a7f32585746965e6e74b0234
Add test for HashServer's redirects and cookies
mediacloud/mediawords/test/http/test_hash_server.py
mediacloud/mediawords/test/http/test_hash_server.py
import json from nose.tools import assert_raises import requests from mediawords.util.network import random_unused_port from mediawords.test.http.hash_server import * def test_http_hash_server(): port = random_unused_port() base_url = 'http://localhost:%d' % port def __sample_callback(params: dict, cook...
Python
0
@@ -276,25 +276,25 @@ %0A def __s -a +i mple_callbac @@ -616,16 +616,451 @@ turn r%0A%0A + # noinspection PyUnusedLocal%0A def __callback_cookie_redirect(params: dict, cookies: dict) -%3E str:%0A r = %22%22%0A r += %22HTTP/1.0 302 Moved Temporarily%5Cr%5Cn%22%0A r += %22Content-Type: te...
b3666db0806f140faaaaef6fb4f112ab0192fc60
Add SVG in decsription.
pygments/__init__.py
pygments/__init__.py
# -*- coding: utf-8 -*- """ Pygments ~~~~~~~~ Pygments is a syntax highlighting package written in Python. It is a generic syntax highlighter for general use in all kinds of software such as forum systems, wikis or other applications that need to prettify source code. Highlights are: * a ...
Python
0.000002
@@ -577,16 +577,21 @@ TeX, RTF +, SVG and ANS
3478a23acd579f666f3cf11240f939f4ce52e24d
Fix VirtualDio
pyhard2/ctrlr/daq.py
pyhard2/ctrlr/daq.py
# -*- coding: utf-8 -*- """ NI-DAQ and comedi controllers ============================= Graphical user interface to NI-DAQ and comedi-compatible data acquisition hardware. """ import sip for cls in "QDate QDateTime QString QTextStream QTime QUrl QVariant".split(): sip.setapi(cls, 2) from PyQt4 import QtCore, Qt...
Python
0
@@ -519,31 +519,15 @@ lDio -Subsystem(drv.Subsystem +(object ):%0A%0A @@ -551,279 +551,37 @@ self -, instrument):%0A super(VirtualDioSubsystem, self).__init__(instrument)%0A self._state = False%0A%0A def __get_state(self):%0A return self._state%0A%0A def __set_state(self, state):%0A ...
bc823de2236c02b0a5179b34134d712e176e39ae
Update test
tests/routine/test_tool.py
tests/routine/test_tool.py
import unittest from performance.routine import Tool, Config class ToolTestCase(unittest.TestCase): def setUp(self): self.host = 'http://www.google.com' self.config = Config(host=self.host) def test_init(self): tool = Tool(config=self.config) self.assertEqual(self.config, tool...
Python
0.000001
@@ -508,13 +508,15 @@ ion. -message +__str__() )%0A
faaa3898a0baf6b15696e651e2589cb60c032bd4
Improve docs.
pymatgen/__init__.py
pymatgen/__init__.py
__author__ = ", ".join(["Shyue Ping Ong", "Anubhav Jain", "Geoffroy Hautier", "William Davidson Richard", "Stephen Dacek", "Michael Kocher", "Dan Gunter", "Shreyas Cholia", "Vincent L Chevrier", "Rickard Armiento"]) __date__ = "May 12 2013" __versi...
Python
0
@@ -1029,16 +1029,171 @@ object. + Note that these objects can be lists,%0A dicts or otherwise nested pymatgen objects that support the to_dict%0A and from_dict MSONAble protocol. %0A %22%22%22 @@ -1361,24 +1361,171 @@ JSONEncoder. + Note that these%0A objects can be lists, dicts or otherwise ne...
8bd49d665a458453dbdb833d3b368ba95e8aba8b
Add shell=True to subprocess.check_call()
data_managers/data_manager_build_kma_index/data_manager/kma_build_index.py
data_managers/data_manager_build_kma_index/data_manager/kma_build_index.py
#!/usr/bin/env python from __future__ import print_function import argparse import errno import json import os import subprocess import uuid DATA_TABLE_NAME = "kma_index" def kma_build_index(kma_index_args, index_name, target_directory, data_table_name=DATA_TABLE_NAME): UUID = str(uuid.uuid4()) os.mkdir(...
Python
0.000002
@@ -792,16 +792,28 @@ irectory +, shell=True )%0A%0A d
739aaf65d1ee45392c682a06958e7036fbcfda08
Fix RecTimer migration.
calvin/actorstore/systemactors/std/RecTimer.py
calvin/actorstore/systemactors/std/RecTimer.py
# -*- coding: utf-8 -*- # Copyright (c) 2015 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
@@ -1135,32 +1135,94 @@ _migrate(self):%0A + self.use('calvinsys.events.timer', shorthand='timer')%0A self.set
da9fdf3b20171fd1e06397ad928e2ee5349b9909
Use neutron-lib constants
neutron/tests/unit/tests/common/test_net_helpers.py
neutron/tests/unit/tests/common/test_net_helpers.py
# Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
Python
0.000003
@@ -624,23 +624,20 @@ neutron -.common +_lib import @@ -657,16 +657,17 @@ n_const%0A +%0A from neu
acde8d6665f298627d0fee5e2e275fa786eb6bdb
fix manifest writing under py2
fbchat_archive_parser/writers/__init__.py
fbchat_archive_parser/writers/__init__.py
from datetime import datetime import io import os import shutil import six if six.PY2: FileNotFoundError = OSError from .json import JsonWriter from .pretty_json import PrettyJsonWriter from .csv import CsvWriter from .text import TextWriter from .yaml import YamlWriter _BUILTIN_WRITERS = { "json": JsonWrit...
Python
0.000003
@@ -1,12 +1,53 @@ +from __future__ import unicode_literals%0A%0A from datetim
4541605e27c9fef6cc23b245de50867ff22ea6aa
Test Case for accounting dimension
erpnext/accounts/doctype/accounting_dimension/test_accounting_dimension.py
erpnext/accounts/doctype/accounting_dimension/test_accounting_dimension.py
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestAccountingDimension(unittest.TestCase): pass
Python
0
@@ -145,18 +145,16 @@ terals%0A%0A -# import f @@ -179,61 +179,1663 @@ est%0A -%0Aclass TestAccountingDimension(unittest.TestCase):%0A%09pass +from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice%0Afrom erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journ...
e825532970f930fe693d46da56df477163ee277c
Remove not needed commit.
src/zeit/content/image/tests/test_imagereference.py
src/zeit/content/image/tests/test_imagereference.py
from zeit.cms.checkout.helper import checked_out from zeit.cms.checkout.interfaces import ICheckoutManager from zeit.cms.content.reference import ReferenceProperty from zeit.cms.interfaces import ICMSContent from zeit.cms.testcontenttype.testcontenttype import ExampleContentType from zeit.content.image.interfaces impor...
Python
0
@@ -364,27 +364,8 @@ ock%0A -import transaction%0A impo @@ -5629,37 +5629,8 @@ ed') -%0A transaction.commit() %0A%0A
1097d307ed92bf9bd0bbdde562179c4dcab9d852
Remove unused method.
st2actions/st2actions/bootstrap/actionsregistrar.py
st2actions/st2actions/bootstrap/actionsregistrar.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
@@ -3468,544 +3468,8 @@ ue%0A%0A - # XXX: Requirements for actions is tricky because actions can execute remotely.%0A # Currently, this method is unused.%0A def _is_requirements_ok(self, actions_dir):%0A rqmnts_file = os.path.join(actions_dir, 'requirements.txt')%0A%0A if not os.path.exists(rqmn...
70aa7c42d7fe6f2690556dd2e2971a1799aa655d
tweak in malloc
cominternals.py
cominternals.py
import markovify import os import re import textwrap from functools import reduce types = ["short", "int", "long", "float", "double", "char", "void", "bool", "FILE"] containers = ["enum", "struct", "union", "typedef"] preprocessor = ["define", "ifdef", "ifndef", "include", "endif", "defined"] libs = ["_WIN32"...
Python
0
@@ -1153,17 +1153,16 @@ s = %7B%7D%0A%0A -%0A def make @@ -4876,64 +4876,85 @@ lif -ident_re.match(token) and not (token.strip() in keywords +token.strip() in keywords:%0A return token%0A elif ident_re.match(token ):%0A
68f0b0ac8e5debea67cd84c4a9e7b66f587e433b
Delete existing mappings before creating new ones
openprescribing/frontend/management/commands/generate_presentation_replacements.py
openprescribing/frontend/management/commands/generate_presentation_replacements.py
import csv import glob import re import tempfile from django.core.management.base import BaseCommand from django.core.management.base import CommandError from django.db import transaction from google.cloud.bigquery import SchemaField from frontend.models import Presentation from ebmdatalab.bigquery import load_data...
Python
0.000001
@@ -474,24 +474,92 @@ filenames):%0A + Presentation.objects.filter(replaced_by__isnull=False).delete()%0A for f in @@ -2329,16 +2329,80 @@ arser):%0A + # XXX document that this argument only exists for tests%0A
5f1e59f2a0582b7ecebf1c27e5e7d9ccebedb88d
Move FileType.UNKNOWN to 0, add classmethod from_name (python)
python/pysearch/filetypes.py
python/pysearch/filetypes.py
# -*- coding: utf-8 -*- ################################################################################ # # fileutil.py # # class FileUtil: provides utility functions for getting file extension and # determining file type # ###############################################################################...
Python
0
@@ -496,24 +496,40 @@ ype enum%22%22%22%0A + Unknown = 0%0A Archive @@ -568,23 +568,337 @@ = 3%0A +%0A -Unknown = 4 +@classmethod%0A def from_name(self, name):%0A if name.upper() == 'TEXT':%0A return FileType.Text%0A if name.upper() == 'BINARY':%0A return FileType...
71056487463018a63fd55f461bab06302d1bfcc3
Fix some logging calls in the scheduler
flexget/components/scheduler/scheduler.py
flexget/components/scheduler/scheduler.py
import hashlib import os import struct import pytz import tzlocal from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.triggers.cron import CronTrigger from loguru import logger from flexget.config_schema import format_check...
Python
0.000014
@@ -8,16 +8,31 @@ hashlib%0A +import logging%0A import o @@ -3669,59 +3669,72 @@ logg -ing.getLogger().getEffectiveLevel() %3E logging.DEBUG +er.level(manager.options.loglevel).no %3E logger.level('DEBUG').no :%0A
27112881583e53d790e66d31a2bb4d2a996ee405
Move import to top level to avoid import fail after fist time on sys.modules hack
python/sparknlp/functions.py
python/sparknlp/functions.py
from pyspark.sql.functions import udf from pyspark.sql.types import * from pyspark.sql import DataFrame import sys import sparknlp def map_annotations(f, output_type: DataType): sys.modules['sparknlp.annotation'] = sparknlp # Makes Annotation() pickle serializable in top-level return udf( lambda con...
Python
0
@@ -97,16 +97,59 @@ taFrame%0A +from sparknlp.annotation import Annotation%0A import s @@ -437,55 +437,8 @@ f):%0A - from sparknlp.annotation import Annotation%0A
a9ecbb4a9255864ca6b3da880397f74901e38532
version bump ro 0.7.71
mppsolar/version.py
mppsolar/version.py
__version__ = "0.7.70" __version_comment__ = "extend wait for bytes to 0.25 in daly protocol"
Python
0
@@ -13,17 +13,17 @@ = %220.7.7 -0 +1 %22%0A__vers @@ -43,52 +43,39 @@ = %22 -extend wait for bytes to 0.25 in daly protocol +fix sequential past known results %22%0A
b4ed7280179e814b9837a0fbfa05ff8065dd8b50
Return the output of the external process from __run_command.
python/vyos/configsession.py
python/vyos/configsession.py
# configsession -- the write API for the VyOS running config # Copyright (C) 2019 VyOS maintainers and contributors # # This library is free software; you can redistribute it and/or modify it under the terms of # the GNU Lesser General Public License as published by the Free Software Foundation; # either version 2.1 of...
Python
0
@@ -4861,16 +4861,38 @@ (output) +%0A return output %0A%0A de
d70200222133f050fe9dce3c03636c0c8b163435
edit ndf classifier
pythoncode/ndf_classifier.py
pythoncode/ndf_classifier.py
from __future__ import print_function import h5py import pickle import os import numpy as np from sklearn.metrics import roc_curve, auc,classification_report from classifier import NetworkClassifer class NDFClassifier(): def __init__(self): pass def load_annotated_h5(self, fpath, test_size = 0.25)...
Python
0.000001
@@ -2823,24 +2823,17 @@ led_ -annotations.h5py +93.14_all ')%0A @@ -2995,18 +2995,8 @@ ions -_93_8.h5py '%0A%0A
1d1854040751a67aa04399f13243299d3dd065b4
fix tabs->spaces
pythonforandroid/patching.py
pythonforandroid/patching.py
from os import uname def check_all(*callables): def check(**kwargs): return all(c(**kwargs) for c in callables) return check def check_any(*callables): def check(**kwargs): return any(c(**kwargs) for c in callables) return check def is_platform(platform): def is_x(**kwargs): return uname()[0] == platfo...
Python
0.000001
@@ -35,33 +35,36 @@ ll(*callables):%0A -%09 + def check(**kwar @@ -60,34 +60,40 @@ heck(**kwargs):%0A -%09%09 + return all(c(**k @@ -111,33 +111,36 @@ c in callables)%0A -%09 + return check%0A%0A%0Ad @@ -165,17 +165,20 @@ ables):%0A -%09 + def chec @@ -182,34 +182,40 @@ heck(**kwargs):%0A -...
cf96d1b28e2e8d14f50ee0c7e6b6987ab010fdcd
Remove special casing in soft-round for non-tensor alpha and prevent tf.where NaNs.
tensorflow_compression/python/ops/soft_round_ops.py
tensorflow_compression/python/ops/soft_round_ops.py
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Python
0.000012
@@ -1451,103 +1451,183 @@ %22%0A -if isinstance(alpha, (float, int)) and alpha %3C eps:%0A return tf.identity(x, name=%22soft_round%22 +# This guards the gradient of tf.where below against NaNs, while maintaining%0A # correctness, as for alpha %3C eps the result is ignored.%0A alpha_bounded = tf.maximum(alpha, ...
7c4aac37bad2bb1751f8075a623a1d712f32d03e
Allow fixed fees for corporations
pacmanager/core/models.py
pacmanager/core/models.py
from decimal import Decimal from datetime import datetime, timedelta from uuid import uuid4 import logging from eveapi import EVEAPIConnection, Error from django.db import models from django.utils.timezone import utc from django.contrib.auth.models import User from .managers import CorporationManager class Setting(...
Python
0
@@ -1028,16 +1028,221 @@ fault=0) +%0A fixed_value = models.DecimalField('Fixed Value Fee', max_digits=25, decimal_places=2, default=None, null=True, blank=True, help_text='Define a fixed fee to charge instead of a pro-rata of tax income') %0A%0A la @@ -2234,16 +2234,117 @@ gerconf%0A + if self.corporat...
45a1681fd82078c0f55f51438cd400ac4487df2e
change default param in builder to avoid reusing instance
multinet/builder.py
multinet/builder.py
"""Build Multinet instance from csv file. """ import networkx as nx import multinet as mn import csv import multinet.util as util def multinet_from_csv( file_name, filter_func=util.default_filter, weight_func=util.default_weight, layer_func=util.default_layer, ow='ORIGIN', dw=...
Python
0
@@ -346,23 +346,12 @@ ing= -mn.DiMultinet() +None ,%0A @@ -1164,16 +1164,84 @@ ct = %7B%7D%0A + if create_using is None:%0A create_using = mn.DiMultinet()%0A mg =
62e0ebb0eddf97437c41c9cfe4d8487236f141b4
Stop using 'with', which is illegal in Python < 2.5.
mustache/loading.py
mustache/loading.py
# coding: utf-8 from os.path import split, splitext, extsep, join, abspath, exists from utils import make_unicode DEFAULT_EXTENSION = 'html' DEFAULT_DIRECTORY = 'static/templates' DEFAULT_ENCODING = 'utf-8' DEFAULT_ERRORS = 'xmlcharrefreplace' def read(path): """ Return the contents of a file as a byte string. ""...
Python
0.000002
@@ -311,36 +311,46 @@ string. %22%22%22%0A -with +try:%0A f = open(path, 'rb' @@ -346,33 +346,25 @@ (path, 'rb') - as f:%0A +%0A return @@ -372,16 +372,45 @@ f.read() +%0A finally:%0A f.close() %0A%0Adef re @@ -521,20 +521,30 @@ %22%22%22%0A -with +try:%0A f = open(pa @@ -556...
14fc925b09723caebd76a4fae6e5fdaba56e1d65
Add checkAnswer to Task
common/tasks.py
common/tasks.py
class Task: def __init__(self,courseId,taskId): if not IdChecker(courseId) and not courseId == "": raise Exception("Course with invalid id: "+courseId) elif not IdChecker(taskId): raise Exception("Task with invalid id: "+courseId+"/"+taskId) try: ...
Python
0
@@ -4968,16 +4968,1011 @@ n)%0A %0A + def checkAnswer(self,taskInput):%0A %22%22%22%0A Verify the answers in taskInput. Returns four values%0A 1st: True the input is **currently** valid. (may become invalid after running the code), False else%0A 2nd: True if the input need...
4ccdb3d5c4158db90445b2b767ce00ba6755635c
Add check for FORCE_LOCAL flag, similarly to FORCE_NOT_LOCAL. (#81)
common/utils.py
common/utils.py
# Copyright 2020 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
@@ -984,16 +984,67 @@ False%0A%0A +if os.getenv('FORCE_LOCAL'):%0A _is_local = True%0A%0A %0Adef is_ @@ -1280,16 +1280,88 @@ try:%0A + # TODO(github.com/google/fuzzbench/issues/82): Get rid of this.%0A
d4188ffb4b98d78ae9d2512b611e9ff88a8c14be
Update to python3
gcalendar_gen_class/genclass/views.py
gcalendar_gen_class/genclass/views.py
from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render from .reg2cal_func import UploadText, convert2calendar, get_time, create_ical_download import csv import base64 def index(request): if request.method == 'POST': form = UploadText(request.POST) if form.is...
Python
0.000001
@@ -753,16 +753,70 @@ ster'%5D%0A%0A + data = %5Bi.decode('utf-8') for i in data%5D%0A%0A @@ -918,12 +918,8 @@ ode( -str( cont @@ -929,24 +929,34 @@ .encode( +)).decode( 'utf-8') ))%0A @@ -947,18 +947,16 @@ 'utf-8') -)) %0A
4d01112f6652edaca2913047dd9d0c0e4d2161e2
Add redundant `else` clause
parsl/dataflow/futures.py
parsl/dataflow/futures.py
"""This module implements the AppFutures. We have two basic types of futures: 1. DataFutures which represent data objects 2. AppFutures which represent the futures on App/Leaf tasks. """ from concurrent.futures import Future import logging import threading from parsl.app.errors import RemoteException l...
Python
0
@@ -3885,32 +3885,58 @@ e.reraise()%0A + else:%0A
88233ce6bd030574e4053592ef190536570beff4
make dipstick fields non required
radar/api/serializers/ins.py
radar/api/serializers/ins.py
from cornflake import fields from cornflake.exceptions import ValidationError from cornflake.sqlalchemy_orm import ModelSerializer from cornflake.validators import max_length, none_if_blank, optional from radar.api.serializers.common import MetaMixin, PatientMixin, StringLookupField from radar.api.serializers.validato...
Python
0
@@ -2934,24 +2934,40 @@ PSTICK_TYPES +, required=False )%0A remiss @@ -3017,24 +3017,40 @@ PSTICK_TYPES +, required=False )%0A high_d
c821a31ce210fcd146470c114c9b034a93a5df11
Factored some code into a function
pdftables/scripts/dump.py
pdftables/scripts/dump.py
#!/usr/bin/env python """pdftables-dump: obtain pdftables debugging information from pdfs Usage: pdftables-render [options] [--] (<pdfpath>[:page])... pdftables-render (-h | --help) pdftables-render --version pdftables-render --check <pdfpath> Options: -h --help Show this screen. --versio...
Python
0.999996
@@ -29,20 +29,22 @@ ftables- -dump +render : obtain @@ -821,12 +821,14 @@ les- -dump +render exp @@ -1021,24 +1021,85 @@ ath%3E%22%5D:%0A + render_pdf(pdf_filename)%0A%0A%0Adef render_pdf(pdf_filename):%0A with ope @@ -1136,20 +1136,16 @@ - doc = PD @@ -1175,28 +1175,24 @@ fd)%0A ...
4c8d04fc39f8e15f88d69a1063313783e0a131b4
Change return to string
server.py
server.py
from flask import Flask from flask import request from tictactoe import * app = Flask(__name__) game = TicTacToe() @app.route("/") def hello(): return game.someone_won @app.route("/key", methods=['POST']) def key(): print(request.get_json(silent=True)) return incYo() if __name__ == "__main__": app....
Python
0.999999
@@ -151,16 +151,20 @@ return +str( game.som @@ -171,16 +171,17 @@ eone_won +) %0A%0A@app.r
cc9ddd38361e47ee698be841f5db04ce3e45bb56
Remove comment
server.py
server.py
#!/usr/bin/env python3 # This file provided by Facebook is for non-commercial testing and evaluation purposes only. # Facebook reserves all rights not expressly granted. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILI...
Python
0
@@ -740,52 +740,8 @@ 700%0A -#MAIN_ID = '9303396' # '9127232' #'8980047'%0A DB_H
7503367828da4f3fa1d6e5035261cf05773b6949
update version
newfies/__init__.py
newfies/__init__.py
# -*- coding: utf-8 -*- """Voice Broadcast Application""" # :copyright: (c) 2010 - 2011 by Arezqui Belaid. # :license: AGPL, see COPYING for more details. VERSION = (1, 1, 0, "a") __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Arezqui Belaid" __contact__ = "info@star2billing.com"...
Python
0
@@ -172,17 +172,18 @@ 1, 0, %22 -a +b1 %22)%0A__ver
bd3ca1eaa7995f22e2335d76a9ef7c68581dbc05
Generalize args for output.
solver.py
solver.py
import copy import json import time import numpy as np import pandas as pd import linear_program as lp SOLVERS = { 'gurobi': (lp.setup_gurobi, lp.run_gurobi), } def solve(data, solver='gurobi'): setup = SOLVERS[solver][0] run = SOLVERS[solver][1] return [run(*setup(**data))] def get_data_from_pa...
Python
0.000172
@@ -2640,20 +2640,20 @@ s(test, -data +args , solver @@ -2762,22 +2762,30 @@ in test( -data, +*args, solver= solver):
e726a91c2b8686a96f5d7155234a0eca3bbb72eb
Rename attachment file based on date.
tovp/attachments/models.py
tovp/attachments/models.py
import os from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.utils.translation import ugettext_lazy as _ from model_utils.models import TimeStampedModel from audit_log.models import AuthStampedModel class AttachmentManag...
Python
0
@@ -3,16 +3,47 @@ port os%0A +from datetime import datetime%0A%0A from dja @@ -63,16 +63,16 @@ models%0A - from dja @@ -757,16 +757,17 @@ lder%22%22%22%0A +%0A @@ -991,16 +991,76 @@ +datetime.now().strftime(%22%25Y%25m%25d%25H%25M-%25f%22) + os.path.splitext( filename @@ -1060,16 +1060,20 @@ ...
c266f5171e875d8dc3abe924e4b6c9ed2a486422
Add test for non-member access
tests/sentry/web/frontend/test_organization_home.py
tests/sentry/web/frontend/test_organization_home.py
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.testutils import TestCase, PermissionTestCase class OrganizationHomePermissionTest(PermissionTestCase): def setUp(self): super(OrganizationHomePermissionTest, self).setUp() self.path = reverse('sentry...
Python
0
@@ -564,16 +564,116 @@ .path)%0A%0A + def test_non_member_cannot_load(self):%0A self.assert_non_member_cannot_access(self.path)%0A%0A %0Aclass O
bd2581b81f8f76f127c219f11d42a9d03a20e6d5
Remove bases core topology migration
geotrek/zoning/migrations/0001_initial.py
geotrek/zoning/migrations/0001_initial.py
from django.conf import settings from django.db import migrations, models import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='City', fields=[ ('code', models.Char...
Python
0
@@ -1271,48 +1271,9 @@ %7D -,%0A bases=('core.topology',), %0A + @@ -2389,47 +2389,8 @@ %7D -,%0A bases=('core.topology',), %0A @@ -3563,32 +3563,32 @@ ed area edges',%0A + %7D,%0A @@ -3588,47 +3588,8 @@ %7D -,%0A bases=('core.topology',), %0A
86fa5519164b2e70a7072ffaec0a394b07177631
make stopword removal optional
utils/textnormalization.py
utils/textnormalization.py
import re import nltk from nltk.corpus import stopwords from nltk.tokenize import regexp_tokenize def split_on_sentence(text): """Tokenize the text on sentences. Returns a list of strings (sentences). """ sent_tokenizer = nltk.data.load('tokenizers/punkt/english.pickle') return sent_tokenizer.tok...
Python
0.000001
@@ -1244,19 +1244,44 @@ ed_words +, remove_stopwords = True ):%0A - %22%22%22R @@ -1457,24 +1457,53 @@ .%5D.%0A %22%22%22%0A + if remove_stopwords:%0A stop_wor @@ -1534,24 +1534,28 @@ glish')%0A + + return %5B%5Bw.l @@ -1588,16 +1588,20 @@ + + if (w.lo @@ -1643,16 +1643,2...
13ab322e35824272baa052abdba2a2a4826b0ae3
fix KeyError (#1292)
workflows/cloudify_system_workflows/snapshots/fix_snapshot_ssh_db.py
workflows/cloudify_system_workflows/snapshots/fix_snapshot_ssh_db.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
@@ -2670,26 +2670,28 @@ '%5D.pop(' -fabric_env +key_filename ')%0A
c16defe397bf8b244d55a82c76cbd2f0cd9e00ad
Use Mapping for root config.
sqlacfg/__init__.py
sqlacfg/__init__.py
from collections import MutableMapping import json from sqlalchemy import Column, String, distinct __version__ = '0.3.dev1' class ConfigSettingMixin(object): _cfg_serializer = staticmethod(json.dumps) _cfg_deserializer = staticmethod(json.loads) @property def value(self): return self._cfg_...
Python
0
@@ -31,16 +31,25 @@ eMapping +, Mapping %0Aimport @@ -590,22 +590,23 @@ Config( -object +Mapping ):%0A d @@ -711,16 +711,16 @@ def -sections +__iter__ (sel @@ -735,100 +735,257 @@ -return set(s for (s,) in%0A self.session.query(distinct(self.model.section)) +for (section,) in self.se...
d15a900abf1cfec5903e8283cf3e6589c91bd583
Support sending receipt for multiple messages
yowsup/layers/protocol_receipts/protocolentities/receipt_outgoing.py
yowsup/layers/protocol_receipts/protocolentities/receipt_outgoing.py
import time from yowsup.structs import ProtocolEntity, ProtocolTreeNode from .receipt import ReceiptProtocolEntity class OutgoingReceiptProtocolEntity(ReceiptProtocolEntity): ''' delivered: If we send the following without "to" specified, whatsapp will consider the message delivered, but will not noti...
Python
0
@@ -509,111 +509,230 @@ -INCOMING%0A %3Creceipt offline=%220%22 from=%224915225256022@s.whatsapp.net%22 id=%221415577964-1%22 t=%221415578027%22%3E +multiple items:%0A %3Creceipt type=%22read%22 to=%22xxxxxxxxxxxx@s.whatsapp.net%22 id=%221431364583-191%22%3E%0A %3Clist%3E%0A %3Citem id=%22...
c12691a20370b0d30b0c84926694a26fc266ea11
Allow proper throw in compiler (#39)
vta/python/vta/__init__.py
vta/python/vta/__init__.py
"""VTA Package is a TVM backend extension to support VTA hardwares Besides the compiler toolchain. It also include utility functions to configure the hardware Environment and access remote through RPC """ from __future__ import absolute_import as _abs __version__ = "0.1.0" from .bitstream import get_bitstream_path,...
Python
0
@@ -252,29 +252,18 @@ bs%0A%0A -__version__ = %220.1.0%22 +import sys %0A%0Afr @@ -428,11 +428,170 @@ ga%0A%0A -try +__version__ = %220.1.0%22%0A%0A# do not import nnvm/topi when running vta.exec.rpc_server%0A# to maintain minimum dependency on the board%0Aif sys.argv%5B0%5D not in (%22-c%22, %22-m%22) :%0A @@ -6...
df3d6aab0300d74e3be5452e4e1649ea94e0c5ef
Delete by individual object to attempt to remove file on S3 backend
gifbox/core/management/commands/render_gifs.py
gifbox/core/management/commands/render_gifs.py
import os import subprocess import requests import shutil import tempfile from datetime import timedelta from django.utils import timezone from django.core.management.base import BaseCommand, CommandError from core.models import Image, AnimatedGif class Command(BaseCommand): help = """ Generates animat...
Python
0
@@ -5075,35 +5075,219 @@ -snapshots_to_render +# They need to be individually deleted so the corresponding image file in S3%0A # storage is deleted as well%0A for snapshot in snapshots_to_render:%0A snapshot .delete(
0429133351580b42b5fb2d750c10e5b03ade3e0f
Allow `--sync-level=size` in transfer submissions
globus_cli/services/transfer/async_transfer.py
globus_cli/services/transfer/async_transfer.py
import click from globus_sdk import TransferData from globus_cli.parsing import ( CaseInsensitiveChoice, common_options, submission_id_option) from globus_cli.helpers import ( outformat_is_json, print_json_response, colon_formatted_print) from globus_cli.services.transfer.helpers import ( get_client, shl...
Python
0
@@ -3832,16 +3832,43 @@ ice( -(%22exists +%0A (%22exists%22, %22size %22, %22
1c2c06cfaf7a39d37e19667e2b9df4a37b0779d0
remove unneeded catch
grove/alpha/jordan_gradient/jordan_gradient.py
grove/alpha/jordan_gradient/jordan_gradient.py
from __future__ import division import numpy as np import pyquil.quil as pq from pyquil.gates import X, H from grove.alpha.phaseestimation.phase_estimation import phase_estimation from grove.alpha.jordan_gradient.gradient_utils import binary_to_real, \ measurements_to_bf def initialize_system(ancilla_qubit): ...
Python
0.000056
@@ -2665,85 +2665,8 @@ nts) -%0A if isinstance(measurements, str):%0A raise ValueError(measurements) %0A%0A
9ddb5f7a31776b9e7e978d2a4fdc015acdc4670f
update dev version after 0.46.0 tag [ci skip]
py/desitarget/_version.py
py/desitarget/_version.py
__version__ = '0.46.0'
Python
0
@@ -14,10 +14,18 @@ '0.46.0 +.dev4345 '%0A
e6fa3d68dc49ef3618e086b9ee5651cbf90cb37c
Make email a required field when using Twitter auth (affects #162).
pyconde/accounts/forms.py
pyconde/accounts/forms.py
# -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.core.urlresolvers import reverse from django.contrib.auth import forms as auth_forms from django.utils.translation import ugettext_lazy as _ from userprofiles.forms import RegistrationForm from userprofiles.contrib.profiles.f...
Python
0
@@ -7113,36 +7113,35 @@ lField(required= -Fals +Tru e)%0A%0A def __in
7aa47042d22ef1c51b9a545b6cdf6363b5d30df3
Correct author email
pytest_github/__init__.py
pytest_github/__init__.py
"""Plugin for py.test that associates tests with github issues using a marker.""" __version__ = "0.3.0" __author__ = "James Laska" __author_email__ = "<jlaska AT redhat.com>"
Python
0.999595
@@ -156,12 +156,9 @@ aska - AT +@ redh
5ae24ac9ca357e34d652a926588a10dedff4d4da
fix to build
quspin/operators/setup.py
quspin/operators/setup.py
def cython_files(): import os,glob,numpy from Cython.Build import cythonize package_dir = os.path.dirname(os.path.realpath(__file__)) package_dir = os.path.expandvars(package_dir) cython_src = glob.glob(os.path.join(package_dir,"*.pyx")) include_dirs = [numpy.get_include()] include_dirs....
Python
0
@@ -779,17 +779,16 @@ .append( -%5B %22-std=c+ @@ -791,17 +791,16 @@ d=c++11%22 -%5D )%0A%0A p
b608ed45a100c6923c92cd84db40cc58cb042a54
Fix assert arguments in a test (#12273)
src/python/pants/util/strutil_test.py
src/python/pants/util/strutil_test.py
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from textwrap import dedent import pytest from pants.util.strutil import ( ensure_binary, ensure_text, first_paragraph, hard_wrap, path_safe, pluralize, strip...
Python
0.000009
@@ -747,17 +747,19 @@ sert %22%E5%BF%AB%22 -, + == ensure_
ec63ee7ca57f4fb8d19216be9c01cf4659094d08
check for some substrings only (thanx to some output changes in the json module)
src/unittest/python/analyzer_tests.py
src/unittest/python/analyzer_tests.py
from __future__ import print_function import unittest from mock import patch, mock_open from testhelper import myAssertDictEqual import netkraken_analyzer class AnalyzerTest(unittest.TestCase): def test_calc_index(self): self.assertEquals(0.886, netkraken_analyzer.calc_index("foo")) def test_calc...
Python
0
@@ -659,192 +659,266 @@ -self.assertEqual(%22%22%22%7B%5Cn %22links%22: %7B%5Cn %22foo%22: %22bar%22%5Cn %7D, %5Cn %22nodes%22: %5B%5Cn %22a%22%5Cn %5D%5Cn%7D%22%22%22,%0A netkraken_analyzer.dumps(%7B%22foo%22: %22bar%22%7D, %5B%22a%22%5D) +result_string = netkrak...
eb3cd218d1bcb7cdc8d0f097f6332a7b59936929
Add a comment.
st2reactor/st2reactor/rules/filter.py
st2reactor/st2reactor/rules/filter.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
@@ -5574,16 +5574,166 @@ ttern):%0A + # Note: Here we want to use strict comparison to None to make sure that%0A # other falsy values such as integer 0 are handled correctly.%0A
b87cfe7ee0c4318eaeeb36030c3500e614cd735e
Remove duplicate config registration
st2reactor/st2reactor/timer/config.py
st2reactor/st2reactor/timer/config.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
@@ -1006,39 +1006,8 @@ TH%0A%0A -common_config.register_opts()%0A%0A CONF
cd081f9ee5677b1e9031e1edfa8e4ef735017f24
Bump version 0.1.1
accounting/__init__.py
accounting/__init__.py
import os # Use 'final' as the 4th element to indicate # a full release VERSION = (0, 1, 0, 'alpha', 1) def get_short_version(): return '%s.%s' % (VERSION[0], VERSION[1]) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) # Append 3rd digit if > 0 if VERSION[2]: version = '%s....
Python
0.000001
@@ -87,20 +87,8 @@ , 1, - 0, 'alpha', 1)%0A @@ -333,174 +333,8 @@ 2%5D)%0A - elif VERSION%5B3%5D != 'final':%0A version = '%25s %25s' %25 (version, VERSION%5B3%5D)%0A if len(VERSION) == 5:%0A version = '%25s %25s' %25 (version, VERSION%5B4%5D)%0A
7790b8b57aba48127c76bcf2f6ed0176b9b3bd16
Update __init__.py
adaptivemd/__init__.py
adaptivemd/__init__.py
############################################################################## # adaptiveMD: A Python Framework to Run Adaptive Molecular Dynamics (MD) # Simulations on HPC Resources # Copyright 2017 FU Berlin and the Authors # # Authors: Jan-Hendrik Prinz # Contributors: # # `adaptiveMD` is free software: ...
Python
0.000072
@@ -2662,17 +2662,16 @@ rsions%0A%0A -# from .rp
ac29e356097c8d1290352316a4ae2f121c8ee76f
fix the bug of wrong gene/transcript picking
scripts/make_fusion_genes.py
scripts/make_fusion_genes.py
""" Generate a user-defined fusion file Input file should be a text file containing 1. gene name and 2. transcript name (optional) For example: gene1 transcript1 gene2 gene3 transcript3 """ __author__ = "Kai" __date__ = "20/05/2020" import argparse def read_genelist(inputf): with open(inputf, "r") as fh...
Python
0.000037
@@ -622,78 +622,16 @@ -if gene%5B0%5D not in line:%0A continue%0A _ +cur_gene , tr @@ -719,32 +719,101 @@ n%22).split(%22%5Ct%22)%0A + if gene%5B0%5D != cur_gene:%0A continue%0A @@ -1157,77 +1157,8 @@ fh:%0A - ...
ce63ceeb3675c0fb81a419d09816b9e3ea9d31c2
fix the bug in gene orientation
scripts/make_fusion_genes.py
scripts/make_fusion_genes.py
""" Generate a user-defined fusion file Input file should be a text file containing 1. gene name and 2. transcript name (optional) For example: gene1 transcript1 gene2 gene3 transcript3 """ __author__ = "Kai" __date__ = "20/05/2020" import argparse def read_genelist(inputf): with open(inputf, "r") as fh...
Python
0.000029
@@ -701,33 +701,38 @@ nscript, chrom, -_ +strand , start, end, _, @@ -1253,17 +1253,22 @@ chrom, -_ +strand , start, @@ -1536,16 +1536,66 @@ ))%5B:-1%5D%0A + if strand == %22-%22:%0A exons = exons%5B::-1%5D%0A for
634a1127c077542083c9e11f8284cfe92c634c7c
fix `bootstrap-android` on Python 3
python/servo/util.py
python/servo/util.py
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
Python
0.998407
@@ -2986,38 +2986,32 @@ resp.info().get -header ('Content-Length @@ -3053,22 +3053,16 @@ fo().get -header ('Conten
8e0ed2f3b4dd54dc3bbc6b6fe8d7f1a66c6019af
Fix StmtTracker properties
coffee/ast_analyzer.py
coffee/ast_analyzer.py
# This file is part of COFFEE # # COFFEE is Copyright (c) 2014, Imperial College London. # Please see the AUTHORS file in the main source directory for # a full list of copyright holders. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
Python
0
@@ -4674,32 +4674,50 @@ in self.values() + if stmt_info.stmt ))%0A%0A @propert @@ -4810,16 +4810,35 @@ values() + if stmt_info.place ))%0A%0A
2d114f87f08347178db420aa4f34fbd8bc031d58
Use same decenter_redirector version
ignite.py
ignite.py
#!usr/bin/env python # # Create Ignition JSON for specified instance. # import json INSTANCES = { 'zg1': '1.1.4', 'zg3': '1.1.4', } UPDATE_CONF_FILE = { 'filesystem': 'root', 'path': '/etc/coreos/update.conf', 'contents': { 'source': 'data:,GROUP%3Dbeta%0AREBOOT_STRATEGY%3D%22etcd-lock%22...
Python
0
@@ -3599,15 +3599,24 @@ mat( -'1.1.1' +decenter_version ),%0A
783f247ba398395c8d885cd74a339f433b467339
remove unused import
polling_stations/apps/uk_geo_utils/management/commands/import_cleaned_addresses.py
polling_stations/apps/uk_geo_utils/management/commands/import_cleaned_addresses.py
import os import glob from django.db import connection from django.core.management.base import BaseCommand class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument( 'cleaned_ab_path', help='The path to the folder containing the cleaned AddressBase CSVs' ...
Python
0.000001
@@ -7,20 +7,8 @@ os%0A -import glob%0A from
5e2aae6070d60f2149c49e1137ab2a99f3966b3a
Add specific colors for heights
python/volumeBars.py
python/volumeBars.py
#!/usr/bin/env python from rgbmatrix import RGBMatrix from random import randint import numpy import math import time rows = 16 chains = 1 parallel = 1 ledMatrix = RGBMatrix(rows, chains, parallel) height = ledMatrix.height width = ledMatrix.width barWidth = width / 4 pi = numpy.pi barHeights = numpy.array([0, pi / 4...
Python
0.000006
@@ -555,10 +555,9 @@ ht): -%09 %0A + %09%09%09i @@ -583,16 +583,31 @@ Height:%0A +%09%09%09%09if y %3E 14%0A%09 %09%09%09%09next @@ -631,57 +631,129 @@ y, -randint(0, 255), randint(0, 255), randint(0, 255) +255, 0, 0)%0A%09%09%09%09else if y %3E 10%0A%09%09%09%09%09nextFrame.SetPixel(x, y, 200, 200, 0)%0A%09%09...
214d5f7e09e9b5e854e7471c6dc337456f428647
Add missing ensure_str for PY2
quickavro/_compat.py
quickavro/_compat.py
# -*- coding: utf-8 -*- import sys PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 default_encoding = "UTF-8" def with_metaclass(meta, *bases): class metaclass(meta): __call__ = type.__call__ __init__ = type.__init__ def __new__(cls, name, this_bases, d): if this...
Python
0.00005
@@ -844,8 +844,37 @@ da s: s%0A + ensure_str = lambda s: s%0A
9e286b72d5ceb9b7242f0bf659bc8f6680d31d3a
Revert default value on the rating field in the OverallRating class.
agon_ratings/models.py
agon_ratings/models.py
import datetime from decimal import Decimal from django.db import models from django.conf import settings from django.contrib.auth.models import User from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models import ContentType from agon_ratings.categories import RATI...
Python
0
@@ -706,31 +706,8 @@ True -, default=Decimal(0.00) )%0A
d21b8e40c21cb701aada3b0e8e39bd583589f71c
update version to 0.2.2-dev (#129)
google/cloud/sql/connector/version.py
google/cloud/sql/connector/version.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, s...
Python
0
@@ -587,11 +587,15 @@ = %220.2. -1 +2-dev %22%0A
133020c24861adfac20c7b9f7a0cfc13920b55d5
Set a random default seed in launch.py
metal/mmtl/launch.py
metal/mmtl/launch.py
""" Example command to run all 9 tasks: python launch.py --tasks COLA,SST2,MNLI,RTE,WNLI,QQP,MRPC,STSB,QNLI --checkpoint_dir ckpt --batch_size 16 """ import argparse import datetime import json import logging import os from time import strftime import numpy as np from metal.mmtl.glue.glue_tasks import create_tasks_a...
Python
0.000001
@@ -1452,24 +1452,206 @@ alse%0A )%0A%0A + parser.add_argument(%0A %22--seed%22,%0A type=int,%0A default=np.random.randint(1e6),%0A help=%22A single seed to use for trainer, model, and task configs%22,%0A )%0A%0A # Model
9804fbb527fb053296533c5cd4604afcb7043a28
Add unit_of_measurement to various Transmission sensors (#30037)
homeassistant/components/transmission/const.py
homeassistant/components/transmission/const.py
"""Constants for the Transmission Bittorent Client component.""" DOMAIN = "transmission" SENSOR_TYPES = { "active_torrents": ["Active Torrents", None], "current_status": ["Status", None], "download_speed": ["Down Speed", "MB/s"], "paused_torrents": ["Paused Torrents", None], "total_torrents": ["Tot...
Python
0
@@ -135,36 +135,42 @@ tive Torrents%22, -None +%22Torrents%22 %5D,%0A %22current_ @@ -277,36 +277,42 @@ used Torrents%22, -None +%22Torrents%22 %5D,%0A %22total_to @@ -331,36 +331,42 @@ otal Torrents%22, -None +%22Torrents%22 %5D,%0A %22upload_s @@ -439,28 +439,34 @@ Torrents%22, -None +%22Torrents...
a3d2d0cd22efef3fa24fce3a92b579d8cc938805
Add latest OpenSSL versions
var/spack/repos/builtin/packages/openssl/package.py
var/spack/repos/builtin/packages/openssl/package.py
import urllib import llnl.util.tty as tty from spack import * class Openssl(Package): """The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security ...
Python
0
@@ -633,16 +633,74 @@ 93d28')%0A + version('1.0.1t', '9837746fcf8a6727d46d22ca35953da1')%0A vers @@ -922,16 +922,74 @@ eba7aa') +%0A version('1.0.2h', '9392e65072ce4b614c1392eefc1f23d0') %0A%0A de
471da3f3fa9bb26f3b3ae20efbcfb90a0476c893
update settings module
openssl/settings.py
openssl/settings.py
""" Django settings for mapoint project. Generated by 'django-admin startproject' using Django 1.8.3. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build path...
Python
0
@@ -1141,16 +1141,28 @@ 'nose',%0A + 'slack'%0A )%0A%0ALOCAL
f8be56c94159814f9261bcafb6a75e8b2e2153f2
add 2.4.2 (#27094)
var/spack/repos/builtin/packages/r-withr/package.py
var/spack/repos/builtin/packages/r-withr/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RWithr(RPackage): """Run Code 'With' Temporarily Modified Global State A set of funct...
Python
0.000006
@@ -628,151 +628,119 @@ -url = %22https://cloud.r-project.org/src/contrib/withr_1.0.2.tar.gz +cran = %22withr %22%0A +%0A -list_url = %22https://cloud.r-project.org/src/contrib/Archive/withr%22%0A +version('2.4.2', sha256='48f96a4cb780cf6fd5fbbea1f1eb04ea3102d7a4a644cae1ed1e91139dcbbac8') %0A
041f96b349b3291cce412a855b9cefe5cdffc76b
Update the texlive distro digest. (#2679)
var/spack/repos/builtin/packages/texlive/package.py
var/spack/repos/builtin/packages/texlive/package.py
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0
@@ -1836,40 +1836,40 @@ ', ' -1962b756794827467b50ed4da94d8ee8 +01461ec2cc49fe0b14812eb67abbea46 ',%0A
046861c4ef2825cebc2aacb82343537a5cc11208
add v 1.4.4 (#21981)
var/spack/repos/builtin/packages/xkbcomp/package.py
var/spack/repos/builtin/packages/xkbcomp/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Xkbcomp(AutotoolsPackage, XorgPackage): """The X Keyboard (XKB) Extension essentially repl...
Python
0
@@ -802,16 +802,112 @@ ar.gz%22%0A%0A + version('1.4.4', sha256='159fba6b62ef4a3fb16ef7fc4eb4fc26f3888652471ceb604c495783dda020bc')%0A vers
7afa290eff20f843831beeb273254289f84af2e2
add hook docstrings
mitmproxy/proxy2/layers/tcp.py
mitmproxy/proxy2/layers/tcp.py
from typing import Optional from mitmproxy import flow, tcp from mitmproxy.proxy2 import commands, events, layer from mitmproxy.proxy2.commands import Hook from mitmproxy.proxy2.context import ConnectionState, Context from mitmproxy.proxy2.utils import expect class TcpStartHook(Hook): flow: tcp.TCPFlow class T...
Python
0.000001
@@ -274,32 +274,83 @@ tartHook(Hook):%0A + %22%22%22%0A A TCP connection has started.%0A %22%22%22%0A%0A flow: tcp.TC @@ -393,101 +393,429 @@ -flow: tcp.TCPFlow%0A%0A%0Aclass TcpEndHook(Hook):%0A flow: tcp.TCPFlow%0A%0A%0Aclass TcpErrorHook(Hook): +%22%22%22%0A A TCP connection has received a...
6caa570f33199b15dc3a60ef05d523f98d4921ab
fix code style
minesweeper/views.py
minesweeper/views.py
from pyramid.view import view_config from services import GameService, Jsonify from models import Player ERROR = {"404":"Resources not found"} @view_config(route_name='home', renderer='templates/index.pt') def my_view(request): return {'project': 'minesweeper'} @view_config(route_name='api.init', renderer='json'...
Python
0.000022
@@ -1058,32 +1058,44 @@ ._game._result), +%0A request.session @@ -1098,32 +1098,32 @@ sion%5B'level'%5D%5D;%0A - %0A@view_config(ro @@ -1564,16 +1564,28 @@ result), +%0A request @@ -2088,32 +2088,44 @@ ._game._result), +%0A service._game._ @@ -2461,24 +2461,24 @@ g(row, col)...
dd377cc72a66e239e9d86978991120a76ab7903d
Fix and rework from_db_value & to_python for EncryptedJSONField
osf/utils/fields.py
osf/utils/fields.py
import jwe from django.db import models from django.db.models import JSONField from website import settings from osf.utils.functional import rapply from osf.exceptions import NaiveDatetimeException SENSITIVE_DATA_KEY = jwe.kdf(settings.SENSITIVE_DATA_SECRET.encode('utf-8'), settings.SENSI...
Python
0
@@ -3320,39 +3320,38 @@ value):%0A -value = +return rapply(value, d @@ -3389,55 +3389,17 @@ ix)%0A - return super(EncryptedJSONField, self). +%0A def from @@ -3412,36 +3412,94 @@ lue( +self, value, -N +expressi on -e , -None)%0A%0A def +connection):%0A value = super(EncryptedJS...
74948ad0998a61e6d0d87614d902b13442ebc9f9
Update makeid_file.py
gsoc2017-nausheen/HOLE/makeid_file.py
gsoc2017-nausheen/HOLE/makeid_file.py
f=open("train.txt","r") id_dict={} relation_dict={} for line in f: line=line.strip() line_tokens=line.split() try: a=id_dict[line_tokens[0]] except: id_dict[line_tokens[0]]=0 try: a=id_dict[line_tokens[2]] except: id_dict[line_tokens[2]]=0 try: ...
Python
0.000002
@@ -1,16 +1,30 @@ f=open(%22 +standard_data/ train.tx @@ -31,16 +31,16 @@ t%22,%22r%22)%0A - %0Aid_dict @@ -422,16 +422,30 @@ f=open(%22 +standard_data/ test.txt @@ -828,16 +828,30 @@ f=open(%22 +standard_data/ valid.tx @@ -1259,16 +1259,30 @@ w=open(%22 +standard_data/ entity2i @@ -1408,32 +1408,32 @@ count...
ac492068d99f52ec5f0852b31dd7156876d4e6a2
make imports more convenient
commonfate/__init__.py
commonfate/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Version info""" short_version = '0.1' version = '0.1.0'
Python
0.000001
@@ -1,68 +1,100 @@ -#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%22%22%22Version info%22%22%22 +from commonfate import decompose, model, transform%0A__all__ = %5B%22decompose%22, %22model%22, %22transform%22%5D %0A%0Ash
45c4efcd229c94603e287cb242ddb04c9963d758
use 2.0 api
databricks/databricks-jobs.py
databricks/databricks-jobs.py
import sys import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning import json INSTANCE_ID = sys.argv[1] JOB_NAME = sys.argv[2] API_VERSION = '/api/2.1' print("----------RUNNING JOB " + JOB_NAME ) # Run Get request with api_command param # /jobs/list/ with api 2.0 returns all jobs, 2....
Python
0
@@ -176,17 +176,17 @@ '/api/2. -1 +0 '%0A%0Aprint @@ -1375,20 +1375,25 @@ d %7D%0A -task +job_statu s = getR @@ -1414,16 +1414,23 @@ runs/get +-output ', run_p @@ -1448,140 +1448,18 @@ ()%5B%22 -tasks%22%5D%0A print(tasks)%0A job_status = %22%22%0A for x in tasks:%0A if x%5B%22run_id%22%5D ==...
7462ae98ca64a2693bb094ace51b8a8cb2f184c5
fix missing 'raise'
rclpy/rclpy/clock.py
rclpy/rclpy/clock.py
# Copyright 2018 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
Python
0.993996
@@ -7853,16 +7853,22 @@ +raise TypeErro
9600c2d364e94f6176b139243ab8d2720e1e86cb
Add TODO for streaming I/O with -y
yq/__init__.py
yq/__init__.py
""" yq: Command-line YAML processor - jq wrapper for YAML documents yq transcodes YAML documents to JSON and passes them to jq. See https://github.com/kislyuk/yq for more information. """ from __future__ import absolute_import, division, print_function, unicode_literals import os, sys, argparse, subprocess, json fro...
Python
0
@@ -2986,32 +2986,300 @@ gs.yaml_output:%0A + # TODO: enable true streaming in this branch (with asyncio, asyncproc, a multi-shot variant of%0A # subprocess.Popen._communicate, etc.)%0A # See https://stackoverflow.com/questions/375427/non-blocking-read-on-a-subprocess-pipe-in-python%0A...
023edad5e041bf083b6008129cdcef7b48bd0a2b
stop updating cdc-stressor
sdcm/cdclog_reader_thread.py
sdcm/cdclog_reader_thread.py
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
Python
0
@@ -2627,281 +2627,8 @@ ')%0A%0A - # Update cdc-stressor with last changes.%0A docker.run(cmd=%22go get -u github.com/piodul/cdc-stressor%22,%0A timeout=self.timeout,%0A ignore_status=True,%0A log_file=log_file_name,%0A verbose=True)...
38f7074e4eaa6d87cbcd433c044a57408c34c182
Update request.py
yql/request.py
yql/request.py
import requests class Request(object): """Class is responsible for prepare request query and send reqest to YQL Yahoo API.""" parameters = { 'q': '', 'format': 'json', 'diagnostics': 'false', 'env': 'store://datatables.org/alltableswithkeys', 'callback': '' } ap...
Python
0.000001
@@ -100,14 +100,11 @@ send - reqes +s i t to
e6303ec411181a6f593caa56de2d8dca643a9f0d
Update denorm command
project/apps/api/management/commands/denormalize.py
project/apps/api/management/commands/denormalize.py
from django.core.management.base import ( BaseCommand, ) from apps.api.models import ( Convention, Contest, Contestant, Group, ) class Command(BaseCommand): help = "Command to denormailze data." def handle(self, *args, **options): cs = Contestant.objects.all() for c in cs...
Python
0.000001
@@ -134,21 +134,76 @@ nt,%0A -Group +Performance,%0A Group,%0A Person,%0A Singer,%0A Director ,%0A)%0A%0A%0Acl @@ -323,23 +323,23 @@ -c +v s = Con -testant +vention .obj @@ -365,14 +365,14 @@ for -c +v in -c +v s:%0A @@ -382,17 +382,17 @@ -c +v .save()%0A @@ -472,39 +472,120 ...
9130203312f5a986dad2edfc4503bc976a732a41
correct subject
stock_level_from_mrp/cron/mailer/stock_level_report.py
stock_level_from_mrp/cron/mailer/stock_level_report.py
# -*- coding: utf-8 -*- ############################################################################### # # ODOO (ex OpenERP) # Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>) # Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebrush>) # This prog...
Python
0.00075
@@ -2014,108 +2014,71 @@ '%3Cp%3E -To the stock management operators. Evaluation data: %25s%3C/p%3E%0A %3Cp%3EAll product and raw +Fecha: %25s%3C/p%3E%0A %3Cp%3EInventario actual de las materia ls a @@ -2077,248 +2077,230 @@ eria -l s -are represented in stock %0A status. Use ...
87537f552eadda62839db4a1cf3220575a568db2
test against the return value of get_holiday instead of the function itself
reactor_bot/emoji.py
reactor_bot/emoji.py
#!/usr/bin/env python3 # encoding: utf-8 import re import string from datetime import date def get_poll_emoji(message): """generate the proper emoji to react to any poll message""" if message.count('\n') > 0: # ignore the first line, which is the command line for line in message.split('\n')[1:]: if not line...
Python
0.000013
@@ -1555,16 +1555,18 @@ _holiday +() == 'Apr
7d177e9d8dbb90226174cf2b433ffd31faff79b5
Update Customer to inherit AbstractResource
pagarme/customer.py
pagarme/customer.py
# encoding: utf-8 from __future__ import unicode_literals class Customer(object): def __init__(self, name=None, document_number=None, email=None, address_street=None, address_neighborhood=None, address_zipcode=None, address_street_number=None, address_complement...
Python
0
@@ -56,30 +56,79 @@ als%0A -%0Aclass Customer(object +from .resource import AbstractResource%0A%0Aclass Customer(AbstractResource ):%0A%0A @@ -149,16 +149,30 @@ __(self, + api_key=None, name=No @@ -419,16 +419,26 @@ ber=None +, **kwargs ):%0A%0A @@ -665,16 +665,48 @@ ata = %7B%0A + 'api_key': api...
36a56d7ff7c599cb84735de76f029d8a298d6a45
enable test_stride1x2 asm test
Tensile/Tests/extended/convolution_config/test_conv_vs_contraction.py
Tensile/Tests/extended/convolution_config/test_conv_vs_contraction.py
import logging import pytest from Tensile.SolutionStructs import Convolution log =logging.getLogger("testlog") """ These tests run the convolution-vs-contraction mode always, """ def test_simple(run_convolution_vs_contraction): z={} # problemType definition conv = Convolution(z, 'ConvolutionForward', ...
Python
0
@@ -620,51 +620,8 @@ )%0A%0A%0A -@pytest.mark.skip(reason=%22asm path fails%22)%0A def
54a18b4965cd220537d6f38132d7d5d748ae7f13
Fix OrderedDict syntax for py2 compatibility
readtagger/gff_io.py
readtagger/gff_io.py
import os import subprocess import tempfile from collections import OrderedDict from functools import partial from concurrent.futures import ThreadPoolExecutor from BCBio import GFF from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio.SeqFeature import SeqFeature, FeatureLocation def write_cluster(cl...
Python
0
@@ -543,13 +543,25 @@ s = -%7Btid: +OrderedDict((tid, Seq @@ -579,16 +579,17 @@ %22%22), sn) +) for tid @@ -624,17 +624,17 @@ erences) -%7D +) %0A
62a49d1f05b335779fd2aad2413cf84d656a869a
add Session error handle -> re_start session
kino/bot.py
kino/bot.py
#coding: UTF-8 import asyncio import websockets import slack import utils # Send a message to channel (init) slackbot = slack.SlackerAdapter() config = utils.Config() MASTER_NAME = config.kino["MASTER_NAME"] BOT_NAME = config.kino["BOT_NAME"] hello_text = "{}님 안녕하세요! \n저는 {}님의 개인비서 {}입니다.\n반갑습니다.".format(MASTER_NAM...
Python
0
@@ -274,21 +274,20 @@ n%EC%A0%80%EB%8A%94 -%7B%7D%EB%8B%98%EC%9D%98 %EA%B0%9C%EC%9D%B8%EB%B9%84%EC%84%9C %7B%7D -%EC%9E%85 + %EB%9D%BC%EA%B3%A0 %ED%95%A9 %EB%8B%88%EB%8B%A4.%5C @@ -318,21 +318,8 @@ AME, - MASTER_NAME, BOT @@ -553,16 +553,41 @@ ion!')%0A%0A +def start_session():%0A async de @@ -599,24 +599...
a88eb2c7fc2c2d875836f0a4c201ede0c082aceb
Update the test model definitions.
selectable/tests/__init__.py
selectable/tests/__init__.py
from django.db import models from ..base import ModelLookup from ..registry import registry class Thing(models.Model): name = models.CharField(max_length=100) description = models.CharField(max_length=100) def __unicode__(self): return self.name def __str__(self): return self.name ...
Python
0
@@ -21,16 +21,78 @@ t models +%0Afrom django.utils.encoding import python_2_unicode_compatible %0A%0Afrom . @@ -150,16 +150,45 @@ istry%0A%0A%0A +@python_2_unicode_compatible%0A class Th @@ -306,61 +306,8 @@ 0)%0A%0A - def __unicode__(self):%0A return self.name%0A%0A @@ -348,24 +348,53 @@ self.nam...
74d9c0839e071df398c6dffdcd5c8af8aa76f411
fix version number
src/Python/setup.py
src/Python/setup.py
#!/usr/bin/env python from setuptools import setup, Extension from setuptools.command.install import install from subprocess import call import numpy import os import sys import platform # Path to CUDA on Linux and OS X cuda_dir = "/usr/local/cuda" # Path to CUDA library on Windows, 64 for 64 bit win_cuda_dir = "C:/Pr...
Python
0.000014
@@ -4514,10 +4514,8 @@ 1.5. -0. 1',%0A @@ -5033,11 +5033,9 @@ ) - %0A
231dd378f542c02171c51428bf1b7fa7e8084316
Add get_config_from_file method to ConfigParser
seleniumtid/config_parser.py
seleniumtid/config_parser.py
# -*- coding: utf-8 -*- u""" (c) Copyright 2014 Telefónica, I+D. Printed in Spain (Europe). All Rights Reserved. The copyright to the software program(s) is property of Telefónica I+D. The program(s) may be used and or copied only with the express written consent of Telefónica I+D or in accordance with the terms and ...
Python
0.000001
@@ -453,16 +453,31 @@ port os%0A +import logging%0A %0A%0Aclass @@ -2923,8 +2923,911 @@ pass%0A +%0A @staticmethod%0A def get_config_from_file(conf_properties_files):%0A %22%22%22Reads properties files and saves them to a config object%0A%0A :param conf_properties_files: comma-separated list ...
6e06dad48af41c81a1ccae99b2f9522f2f8b0cc6
add more debug
models/github_api.py
models/github_api.py
import os import logging import requests from urlparse import urlparse import random from app import db from time import sleep logger = logging.getLogger("github_api") class GithubRateLimitException(Exception): pass class GithubKeyring(): def __init__(self): self.expired_keys = [] def get(self)...
Python
0
@@ -1098,16 +1098,17 @@ t(%22,%22)%5D%0A +%0A @@ -1382,16 +1382,65 @@ token%5D)%0A + print %22expired keys:%22, self.expired_keys%0A %0A%0A de @@ -1681,24 +1681,24 @@ in, token))%0A - @@ -1739,16 +1739,71 @@ ining%22%5D%0A + print %22remaining comes back as%22, remainin...
2578241996f76eda87a769586fcbeab9e32dfda7
fix default value. test=develop
python/paddle/fluid/tests/unittests/test_ir_memory_optimize_transformer.py
python/paddle/fluid/tests/unittests/test_ir_memory_optimize_transformer.py
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
Python
0.999206
@@ -621,24 +621,91 @@ %0Aimport -unittest +sys%0Aimport unittest%0Afrom timeit import default_timer as timer%0Aimport paddle %0Aimport @@ -758,16 +758,53 @@ as core +%0Aimport paddle.dataset.wmt16 as wmt16 %0A%0Aos.env @@ -992,235 +992,1190 @@ ort -TestTransformer%0Afrom test_parallel_executor_transformer impo...
e3fcead75fc273fe7f69b2d3db7bbf2bc4ba722c
Fix dependency regression (fixes #194). (#196)
testcontainers/core/generic.py
testcontainers/core/generic.py
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
Python
0.000001
@@ -731,16 +731,58 @@ recated%0A +ADDITIONAL_TRANSIENT_ERRORS = %5B%5D%0Atry:%0A from sql @@ -813,24 +813,110 @@ tionalError%0A + ADDITIONAL_TRANSIENT_ERRORS.append(OperationalError)%0Aexcept ImportError:%0A pass%0A %0A%0Aclass DbCo @@ -1071,32 +1071,44 @@ s_ready( -OperationalError +*ADDITIONAL_TRANSIEN...
181b54b0303e38803b47696fbceb0ff1f9e0a0b5
change config tpl file name
distrib/installer/components/mapping/cuMappingRimManagedServiceProcessor.py
distrib/installer/components/mapping/cuMappingRimManagedServiceProcessor.py
# CC installer mapping rim managed service configuration unit # # Copyright (C) 2014 Mathilde Ffrench # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, ...
Python
0.000001
@@ -1777,39 +1777,16 @@ cc.core. -mapping.ds.rim.runtime. MappingR @@ -1890,31 +1890,8 @@ ore. -mapping.ds.rim.runtime. Mapp
658f76ee6257cce8ab6f12d85a9a9472f925cc9d
print in a new location
pyTwinkle/light_strand.py
pyTwinkle/light_strand.py
import bluetooth import sys LIGHTS_NAME = "00651 36L RGB" class LightStrand: address = None port = None socket = None connected = False def __init__(self, address, port): self.address = address self.port = port def __del__(self): if self.socket: self.sock...
Python
0.000328
@@ -538,50 +538,216 @@ -except:%0A self.connected = False + print %22Connected to:%22, self.address%0A sys.stdout.flush()%0A except:%0A self.connected = False%0A print %22Could not connect to:%22, self.address%0A sys.stdout.flush() %0A%0A @@ -136...