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
a6ac3a7a0955fab9cce1d2866a064ff6d4943dd0
bump version to 0.1.2
json5/version.py
json5/version.py
# Copyright 2014 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 ag...
Python
0.000001
@@ -604,11 +604,11 @@ = '0.1. -1 +2 '%0A
8d40b5369a8c38477f004ac2eff467efe44ff3ce
Split device log processing by section #prefactor
corehq/ex-submodules/phonelog/utils.py
corehq/ex-submodules/phonelog/utils.py
from corehq.apps.users.util import format_username from corehq.apps.users.dbaccessors import get_user_id_by_username from phonelog.models import UserEntry, DeviceReportEntry def device_users_by_xform(xform_id): return list( UserEntry.objects.filter(xform_id__exact=xform_id) .distinct('username').v...
Python
0
@@ -745,35 +745,118 @@ -form_data = xform.form_data +_process_user_subreport(xform)%0A _process_log_subreport(domain, xform)%0A%0A%0Adef _process_user_subreport(xform): %0A @@ -869,32 +869,38 @@ ogs = _get_logs( +xform. form_data, 'user @@ -1379,16 +1379,92 @@ _save)%0A%0A +%0Adef _process_log_subreport...
c269d9f7398be2b7740aecf2a48f307d29107744
FIX really?
api/sonetworks/buckets/facebook.py
api/sonetworks/buckets/facebook.py
import os import sys import logging import json from django.conf import settings from django.db import migrations, models from requests_oauthlib import OAuth2Session from requests_oauthlib.compliance_fixes import facebook_compliance_fix from oauthlib.oauth2 import WebApplicationClient class Facebook: def __ini...
Python
0
@@ -3419,16 +3419,484 @@ )%0A + ltoken = self.oauth.fetch_token(%0A token_url = token_url +%0A 'grant_type=fb_exchange_token&' +%0A 'client_id='+settings.SOCIAL_AUTH_FACEBOOK_KEY +%0A '&client_secret=' + settings.SOCIAL_AUTH_FACEBOOK_SECRET +...
d999e0164a346114d70222581ed37af8f44c457b
Update gapminder_data_analysis.py
gapminder_data_analysis.py
gapminder_data_analysis.py
# Importing the required libraries # Note %matplotlib inline works only for ipython notebook. It will not work for PyCharm. It is used to show the plot distributions %matplotlib inline import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns sns.set(color_codes=True) # Reading the d...
Python
0
@@ -159,16 +159,155 @@ butions%0A +# Make sure to put %25matplotlib inline as the first line of code when visualising plots. Also in pyCharm IDE use plt.show() to see the plot%0A %25matplot
007c6283b3ed05b31f1cb9a2dd5a3166f465b828
Move graphs.js to dot dir
generator/generate_data.py
generator/generate_data.py
# -*- coding: utf-8 -*- import itertools import json import multiprocessing import os import re import shutil import urllib import workerpool import jobs LAST_BUILD_URL_BASE = ('https://fuel-jenkins.mirantis.com/job/' 'nailgun_performance_tests/lastCompletedBuild/') LAST_BUILD_INFO = LAST_BUILD_URL_BAS...
Python
0.000001
@@ -585,16 +585,20 @@ PATH = ' +dot/ graphs.j
d8c7d33aae350d0be1abdc9aedbb8a26e1eec1d2
reformat template_loaders
tenant_schemas/template_loaders.py
tenant_schemas/template_loaders.py
""" Adaptations of the cached and filesystem template loader working in a multi-tenant setting """ import hashlib from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.template.base import TemplateDoesNotExist from django.template.loader import (BaseLoader, get_template_f...
Python
0.000001
@@ -2206,16 +2206,48 @@ te_name, +%0A hashlib @@ -2553,16 +2553,41 @@ _string( +%0A template @@ -4474,16 +4474,34 @@ 't valid +%0A # UTF-8.%0A
9ffd9eee7247adebd0f48d53a8d593fc6b9b7bf6
Update forward compatibility horizon to 2020-05-20
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1448,10 +1448,10 @@ 5, -19 +20 )%0A_F
300e0e74fcc4ef7e1f2ec8c7866bd0c192d2578c
Update forward compatibility horizon to 2020-09-24
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1445,17 +1445,17 @@ 20, 9, 2 -3 +4 )%0A_FORWA
dba43fa59df7eda4bcda93ff0a0ac7a9d0db8b7e
Update forward compatibility horizon to 2020-03-30
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1382,18 +1382,18 @@ 020, 3, -29 +30 )%0A_FORWA
09792df012c22622324f085f46edde33006c7355
Update forward compatibility horizon to 2018-08-26
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1142,9 +1142,9 @@ 8, 2 -5 +6 )%0A%0A%0A
b9a8a022573447f2560e31f0a106cf842634ec19
Update forward compatibility horizon to 2019-02-18
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1143,9 +1143,9 @@ 2, 1 -7 +8 )%0A%0A%0A
b49bb4851c87890894eaf306ec49954b1cec38c7
Update forward compatibility horizon to 2021-08-06
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1444,17 +1444,17 @@ 021, 8, -5 +6 )%0A_FORWA
2b42112aa540701809b228e1a9e9439f7ee1dbc6
Update forward compatibility horizon to 2021-10-02
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1335,17 +1335,17 @@ 21, 10, -1 +2 )%0A_FORWA
b504d86ca21f9ce57700d017ab8f6d411ca5afde
Update forward compatibility horizon to 2019-01-08
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1142,9 +1142,9 @@ 1, -7 +8 )%0A%0A%0A
75ba615684492a49e67fd2c2a59af4ee0e56838b
Update forward compatibility horizon to 2020-02-04
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1382,17 +1382,17 @@ 020, 2, -3 +4 )%0A_FORWA
8021e91b13443a0d5f26fb997da883db1636df73
Make "kevlar filter" summary output more correct
kevlar/filter.py
kevlar/filter.py
#!/usr/bin/env python # # ----------------------------------------------------------------------------- # Copyright (c) 2017 The Regents of the University of California # # This file is part of kevlar (http://github.com/dib-lab/kevlar) and is # licensed under the MIT license: see LICENSE. # ----------------------------...
Python
0.999999
@@ -3145,14 +3145,37 @@ ked -by the +as contaminant or included in ref
8ba62b47d2d94eb56122f9061b8309e06cc62cdd
add .get()
kibitzr/stash.py
kibitzr/stash.py
import contextlib import logging logger = logging.getLogger(__name__) class Stash(object): FILENAME = 'stash.db' @contextlib.contextmanager def open(self): import shelve with contextlib.closing(shelve.open(self.FILENAME)) as db: yield db def read(self): with se...
Python
0.000001
@@ -706,16 +706,19 @@ f._stash +obj = None%0A @@ -740,16 +740,17 @@ def +_ stash(se @@ -776,16 +776,19 @@ f._stash +obj is None @@ -812,16 +812,19 @@ f._stash +obj = self. @@ -856,16 +856,19 @@ f._stash +obj %0A%0A de @@ -913,16 +913,17 @@ rn self. +_ stash%5Bke @@ -925,8 +925,148 @@ sh%5Bkey%5D...
c749d82035f72b9d57c52dfc2dbdd70f42fbdf66
add missing import
ktbh/__init__.py
ktbh/__init__.py
import time import pika import json import landing_page def hand_off(amqp_host, out_queue, body): connection = pika.BlockingConnection( pika.ConnectionParameters(host=amqp_host)) channel = connection.channel() channel.queue_declare(queue=out_queue, durable=True) channel.basic_publish(exchange='...
Python
0.000042
@@ -1,12 +1,23 @@ +import sys%0A import time%0A
2d08761a898ba96ff84fdbecef4a6d71cdb54926
Use base64 to store pickled data in text fields.
src/django_future/models.py
src/django_future/models.py
import datetime import cPickle from django.db import models from django.conf import settings from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType __all__ = ['ScheduledJob'] END_OF_TIME = datetime.datetime(2047, 9, 14) class ScheduledJob(models.Model): STA...
Python
0
@@ -1125,33 +1125,30 @@ return -cPickle.loads(str +self._unpickle (self.ar @@ -1150,33 +1150,32 @@ lf.args_pickled) -) %0A def _set_ar @@ -1223,25 +1223,18 @@ d = -cPickle.dumps(tup +self._pick le(v @@ -1238,17 +1238,16 @@ e(value) -) %0A arg @@ -1328,25 +1328,22 @@ urn -cPickle.loads(str +self._unpi...
ba927036c6170c754f4f95d90e62928b5da5d726
Write config file while init
gitcd/Git/Commands/Init.py
gitcd/Git/Commands/Init.py
from gitcd.Git.Command import Command class Init(Command): # no special subcommands, only run which is meant to be default def execute(self, dummy: str): self.config.setMaster( self.interface.askFor( "Branch name for production releases?", False, ...
Python
0.000001
@@ -2185,8 +2185,37 @@ Scheme)%0A +%0A self.config.write()%0A
8319a938e1a511073094ba49d95d91c64ccac118
Refactor how the API handles options.
api/common.py
api/common.py
#!/usr/bin/python import mechanize import urllib import simplejson from urllib2 import HTTPError import time class HumbugAPI(): def __init__(self, email, api_key, verbose=False, site="https://app.humbughq.com"): self.browser = mechanize.Browser() self.browser.set_handle_robots(False) self.b...
Python
0.000008
@@ -907,55 +907,22 @@ lf, -last_received = None):%0A submit_hash +options = %7B%7D +): %0A @@ -922,35 +922,31 @@ %7D):%0A -submit_hash +options %5B%22email%22%5D = @@ -960,35 +960,31 @@ ail%0A -submit_hash +options %5B%22api-key%22%5D @@ -1002,138 +1002,8 @@ key%0A - if last...
e2c92e8b6e8fb10addc73986914014b278598470
Fix docstring in standardnormal example
spotpy/examples/spot_setup_standardnormal.py
spotpy/examples/spot_setup_standardnormal.py
''' Copyright 2015 by Tobias Houska This file is part of Statistical Parameter Estimation Tool (SPOTPY). :author: Tobias Houska This example implements the Rosenbrock function into SPOT. ''' from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ ...
Python
0.000051
@@ -155,18 +155,23 @@ the -Rosenbrock +Standard Normal fun
d33a54c56215bf01abd6d119f7ab12585720edee
remove notices from nickserv plugin
gozerlib/plugs/nickserv.py
gozerlib/plugs/nickserv.py
# gozerlib/plugs/nickserv.py # # """ authenticate to NickServ. """ __author__ = "Wijnand 'tehmaze' Modderman - http://tehmaze.com" __license__ ='BSD' ## gozerlib imports from gozerlib.examples import examples from gozerlib.callbacks import callbacks from gozerlib.commands import cmnds from gozerlib.datadir import ...
Python
0
@@ -2003,14 +2003,11 @@ ow=%22 -notice +msg %22)%0A
5db4d1f0b98b2dbef3041e4dd72ea634450e67ee
Use absolute directory path to avoid errors with empty path strings
maxmindupdater/__init__.py
maxmindupdater/__init__.py
"""Function to keep a maxmind database file up to date""" import hashlib import os import shutil import sys import tarfile import requests __version__ = '0.1.0' __url__ = 'https://github.com/yola/maxmind-updater' def _hash_file(filename): if not os.path.exists(filename): return '' block_size = 655...
Python
0.000001
@@ -608,16 +608,32 @@ _path = +os.path.abspath( os.path. @@ -644,24 +644,25 @@ ame(db_path) +) %0A db_arch
ac98be78363b98def729e129484a06c26324dccd
Use Undefined instead of the now deprecated INVALID (#1143)
graphene/types/datetime.py
graphene/types/datetime.py
from __future__ import absolute_import import datetime from aniso8601 import parse_date, parse_datetime, parse_time from graphql.error import INVALID from graphql.language import StringValueNode from .scalars import Scalar class Date(Scalar): """ The `Date` scalar type represents a Date value as specif...
Python
0
@@ -127,22 +127,16 @@ phql -.error import INVA @@ -131,23 +131,25 @@ import -INVALID +Undefined %0Afrom gr @@ -1062,39 +1062,41 @@ return -INVALID +Undefined %0A%0A%0Aclass DateTim @@ -1893,23 +1893,25 @@ return -INVALID +Undefined %0A%0A%0Aclass @@ -2687,12 +2687,14 @@ urn -INVALID +Undefine...
d46368024ee89143bca15a2bdf23f8792970cf5c
add property 'external' to menu nodes
menu_external_urls/menu.py
menu_external_urls/menu.py
from menus.base import Modifier from menus.menu_pool import menu_pool from menu_external_urls.models import MenuExternalUrl class MenuExternalUrlMod(Modifier): """ Adds ability to link page to an external URL. """ def modify(self, request, nodes, namespace, root_id, post_cut, breadcrumb): if p...
Python
0
@@ -630,16 +630,53 @@ nal_url%0A + node.external = True%0A
c973385f877d940231deb8d81e929647eadc280a
Use standard env var for DATABASE_URL
app/config.py
app/config.py
# -*- coding: utf-8 -*- """ Application configuration """ import os from os.path import dirname, join # get settings from environment, or credstash if running in AWS env = os.environ if env.get('SETTINGS') == 'AWS': from lib.aws_env import env ASSETS_DEBUG = False DEBUG = bool(env.get('DEBUG', True)) HUMANIZ...
Python
0.000001
@@ -710,17 +710,17 @@ ABASE_UR -I +L ',%0A '
fb8a69706f38b2c21f7ab284f8ec9b0ace2216b2
use correct label in warning
addons/hr_attendance/models/hr_employee.py
addons/hr_attendance/models/hr_employee.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import pytz from datetime import datetime from dateutil.relativedelta import relativedelta from odoo import models, fields, api, exceptions, _, SUPERUSER_ID class HrEmployeeBase(models.AbstractModel): _inherit = "...
Python
0
@@ -4456,17 +4456,17 @@ ing': _( -' +%22 No emplo @@ -4486,24 +4486,26 @@ ding to -barcode +Badge ID ' %25(barcod @@ -4507,17 +4507,19 @@ arcode)s -' +.'%22 ) %25 %7B'ba
2f5c855336a0d182ad731fc50b6dc652f64b80d3
remove lazy=dynamic
app/models.py
app/models.py
from app import db class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column('username', db.String(32), unique=True, index=True) password = db.Column('password', db.String(32)) rounds = db.relationship('Round', backref='user_o', lazy='dynamic') @property def is...
Python
0.99834
@@ -270,34 +270,18 @@ 'user_o' -, lazy='dynamic' )%0A + %0A @pr @@ -1120,32 +1120,16 @@ round_o' -, lazy='dynamic' )%0A%0A d @@ -1760,32 +1760,16 @@ ourse_o' -, lazy='dynamic' )%0A te @@ -1814,32 +1814,16 @@ ourse_o' -, lazy='dynamic' )%0A%0A d @@ -2128,24 +2128,24 @@ b.Integer)%0A%0A + holes...
b07fd0f19de4c1f25ce4fbf6caef9473858e7c40
Change diskusage message.
helpers/resource_helper.py
helpers/resource_helper.py
import collections import datetime from copy import copy from numpy import logspace, log10, where from psutil import virtual_memory, cpu_percent, disk_partitions, disk_usage from helpers import slack_helper from helpers import utils def mem_percents_logspaced(start_percent=None, end_percent=90, bins_count=30): ...
Python
0
@@ -3394,37 +3394,32 @@ ~~~~~~~~~~~~~~~~ -~~~~~ %22%5D)%0A for @@ -3893,37 +3893,32 @@ ~~~~~~~~~~~~~~~~ -~~~~~ %22%5D)%0A%0A msg @@ -5431,37 +5431,8 @@ ~~~~ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %22%5D)%0A @@ -5962,37 +5962,8 @@ ~~~~ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %22%5D)%0A
c313550b52369edad73e97769ca509075d9e4ef6
Establish table relationships
app/models.py
app/models.py
from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from app import db class User(UserMixin, db.Model): """This class represents the user table.""" __tablename__ = 'users' id = db.Column(db.Integer, primary_key=True) username = db.Column(db.Str...
Python
0.000023
@@ -1500,16 +1500,79 @@ stamp()) +%0A created_by = db.Column(db.Integer, db.ForeignKey(User.id)) %0A%0A de
7fe6130c1f94bdfcab1508bd9102d02f8fd123a0
update tests
corehq/apps/cloudcare/tests/test_session.py
corehq/apps/cloudcare/tests/test_session.py
import uuid from django.test import TestCase from casexml.apps.case.models import CommCareCase from corehq.apps.cloudcare.touchforms_api import ( get_user_contributions_to_touchforms_session, ) from corehq.apps.custom_data_fields.models import ( CustomDataFieldsDefinition, CustomDataFieldsProfile, Fi...
Python
0.000001
@@ -981,32 +981,114 @@ r_data'%5D, dict)) +%0A self.assertTrue(data%5B'user_data'%5D%5B'commcare_project'%5D, 'cloudcare-tests') %0A%0A def test_d @@ -3228,16 +3228,98 @@ , dict)) +%0A self.assertTrue(data%5B'user_data'%5D%5B'commcare_project'%5D, 'cloudcare-tests') %0A%0A de
962fbf0b493a9d759faeccaa50c7cb34e9991527
allow external command hooks to fail backup
holland/commands/backup.py
holland/commands/backup.py
import os, sys from subprocess import Popen, PIPE import time import errno import fcntl import logging from holland.core.command import Command, option, run from holland.core.backup import BackupRunner, BackupError from holland.core.exceptions import BackupError from holland.core.config import hollandcfg, ConfigError f...
Python
0.000001
@@ -4527,16 +4527,22 @@ ng: %25s%22, + hook, cmd)%0A @@ -5073,31 +5073,110 @@ , line)%0A -%0A + -else:%0A + if process.returncode != 0:%0A raise BackupError(%22%25s command failed%22 %25 hook)%0A retu
172c7a3ee0c75462f08e726716bf906ad88eadab
add test of plugin registry options
altair/utils/tests/test_plugin_registry.py
altair/utils/tests/test_plugin_registry.py
from ..plugin_registry import PluginRegistry class RegistryTest(PluginRegistry): pass def test_plugin_registry(): plugins = RegistryTest() assert plugins.names() == [] assert plugins.active == '' assert plugins.get() is None assert repr(plugins) == "RegistryTest(active='', registered=[])" ...
Python
0
@@ -42,28 +42,145 @@ try%0A -%0A%0Aclass RegistryTest +from typing import Callable%0A%0A%0Aclass TypedCallableRegistry(PluginRegistry%5BCallable%5B%5Bint%5D, int%5D%5D):%0A pass%0A%0A%0Aclass GeneralCallableRegistry (Plu @@ -246,24 +246,37 @@ ugins = +TypedCallable Registry Test()%0A%0A @@ -267,20 +267,16 @@ ...
ff1de15061b94cf9caedb22488664001b6b1e55c
Fix by_gene_role_type function.
indra/db/query_db_stmts.py
indra/db/query_db_stmts.py
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import json from indra.statements import * from indra.sources.signor import SignorProcessor, _default_csv_file from indra.db import get_primary_db from indra.databases import hgnc_client def by_gene_role_type(agent...
Python
0
@@ -2723,24 +2723,58 @@ o_stmt_count +,%0A db=db )%0A return
f591b6fde4d59147146c3566973f737caa63d0a6
corrected rval to rval**2
treetime/utils.py
treetime/utils.py
from __future__ import division, print_function import numpy as np from scipy.interpolate import interp1d import config as ttconf from scipy.integrate import quad from scipy import stats import datetime from scipy.ndimage import binary_dilation class DateConversion(object): """ Small container class to store p...
Python
0.999415
@@ -818,16 +818,19 @@ lf.r_val +**2 ))%0A
6b64a544e9d410e274ac1e36375122d0ba05d9f4
Use something more different; #360
judge/admin/runtime.py
judge/admin/runtime.py
from django.db.models import TextField from django.forms import TextInput, ModelForm, ModelMultipleChoiceField from django.utils.html import format_html from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from reversion.admin import VersionAdmin from django_ace import ...
Python
0.000001
@@ -1600,16 +1600,91 @@ else %5B%5D%0A + form = super(LanguageAdmin, self).get_form(request, obj, **kwargs)%0A @@ -1707,37 +1707,32 @@ ne:%0A -self. form.base_fields @@ -1823,67 +1823,12 @@ urn -super(LanguageAdmin, self).get_form(request, obj, **kwargs) +form %0A%0A%0Ac
ebe5d80075ce818181a154b6ec772a08e335ae4a
fix test name
trtools/core/tests/test_timeseries.py
trtools/core/tests/test_timeseries.py
from unittest import TestCase import pandas as pd from pandas.core.groupby import BinGrouper import trtools.util.testing as tm import numpy as np import trtools.core.timeseries as ts # start on friday, so second day is saturday df = tm.fake_ohlc(1000000, freq="5min", start="2000-01-07") # business days and trading h...
Python
0.000546
@@ -352,18 +352,17 @@ eek %3C 5%5D - %0A + df = ts. @@ -581,16 +581,21 @@ def +test_ downsamp @@ -872,17 +872,16 @@ %22%22%22 - %0A @@ -1209,78 +1209,8 @@ nose - %0A @@ -1289,12 +1289,9 @@ t=False) - %0A
15d0a23e8a15fe5bb05d00a4c5b9bcbaec43832c
Fix missing help text for option groups
selvbetjening/core/events/forms.py
selvbetjening/core/events/forms.py
from django import forms from django.utils.translation import ugettext_lazy as _ from django.forms import ModelForm from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Fieldset, Layout from selvbetjening.core.translation.utility import translate_model from selvbetjening.core.invoice.mod...
Python
0.9986
@@ -196,18 +196,8 @@ mit, - Fieldset, Lay @@ -323,16 +323,76 @@ ayment%0A%0A +from selvbetjening.viewbase.forms.helpers import SFieldset%0A%0A from mod @@ -2713,17 +2713,16 @@ lp_text' - : self.o @@ -2777,17 +2777,16 @@ e_hints' - : True%7D%0A @@ -2802,32 +2802,33 @@ layout = Layout( +S Fieldset(*fields @@...
c22024d29548f93d5bf6cfac6fc9f5bd02915e92
Try reverse with strings
judge/views/problem.py
judge/views/problem.py
from django.contrib.auth.decorators import login_required from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.http import Http404, HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from judge.forms i...
Python
0.999083
@@ -1711,16 +1711,20 @@ gs=%5B +str( model.id %5D))%0A @@ -1719,16 +1719,17 @@ model.id +) %5D))%0A
f386fce820fb60abfe1b18c141dfd8ce268c5f4f
Update queue_on_list.py (#851)
data_structures/queue/queue_on_list.py
data_structures/queue/queue_on_list.py
"""Queue represented by a python list""" class Queue(): def __init__(self): self.entries = [] self.length = 0 self.front=0 def __str__(self): printed = '<' + str(self.entries)[1:-1] + '>' return printed """Enqueues {@code item} @param item i...
Python
0
@@ -664,32 +664,33 @@ front%5D%0D%0A +# self.front-=1%0D%0A @@ -688,32 +688,33 @@ ont-=1%0D%0A +# self.entries = s @@ -739,16 +739,57 @@ ront:%5D%0D%0A + self.entries = self.entries%5B1:%5D%0D%0A
91540aefccdccdeb0c668b8ce5a99bb5471a3200
Change order slightly.
avenue/web.py
avenue/web.py
# -*- coding: utf-8 -*- # Copyright (c) 2012 Michael Babich # See LICENSE.txt or http://opensource.org/licenses/MIT '''Acts as an interface between what Flask serves and what goes on in the rest of the application. ''' from avenue import app, api from avenue.database import content from flask import render_template, m...
Python
0
@@ -722,16 +722,17 @@ _data()%0A +%0A them @@ -853,89 +853,8 @@ ls() -%0A css = %7B%7D%0A%0A for theme in themes:%0A css%5Bthemes%5Btheme%5D%5B'url'%5D%5D = theme %0A%0A @@ -2492,24 +2492,106 @@ set_tags()%0A%0A + css = %7B%7D%0A%0A for theme in themes:%0A css%5Bthemes%5Btheme%5D%5B...
50d3fcb1ad4326a55bb156fd641ce40bf52a9a51
rework router
ldapdb/router.py
ldapdb/router.py
# -*- coding: utf-8 -*- # # django-ldapdb # Copyright (c) 2009-2010, Bolloré telecom # All rights reserved. # # See AUTHORS file for a full list of contributors. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # ...
Python
0.000001
@@ -1686,16 +1686,149 @@ AGE.%0A#%0A%0A +def is_ldap_model(model):%0A # FIXME: there is probably a better check than testing 'base_dn'%0A return hasattr(model, 'base_dn')%0A%0A class Ro @@ -2046,75 +2046,31 @@ -from +if is_ ldap -db. +_ model -s import Model%0A if Model in model.__bases__ +(mode...
84bbcdcb547468385291a420f6d88eb594c03fd1
Add lex and handle semicolons correctly
twosheds/shell.py
twosheds/shell.py
""" twosheds.shell ~~~~~~~~~~~~~~ This module implements the central user interface for access to an operating system's kernel services. """ import os import subprocess import sys import traceback class Shell(object): """The shell is an sh-compatible command language interpreter that executes ...
Python
0.000003
@@ -935,34 +935,32 @@ -return +lines = self. +l ex -pand (raw_inp @@ -979,63 +979,211 @@ pt)) -%0A except EOFError:%0A raise SystemExit( +.split(%22;%22)%0A for line in lines:%0A yield self.expand(line)%0A except EOFError:%0A raise SystemExit(...
9b8ac5d82771a39773d39d6fd607dc7b2b304e37
factor out common code in use_*()
txaio/__init__.py
txaio/__init__.py
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software with...
Python
0.998509
@@ -3024,16 +3024,39 @@ port tx%0A + _use_framework(tx)%0A impo @@ -3056,32 +3056,32 @@ import txaio%0A - txaio.using_ @@ -3131,221 +3131,8 @@ lse%0A - for method_name in __all__:%0A if method_name in %5B'use_twisted', 'use_asyncio'%5D:%0A continue%0A twisted_method = geta...
cf1137ff1f64f2a13b40583ff5ab9a8563165d2f
Send messages terminating in \r\n, not just \n
txircd/ircbase.py
txircd/ircbase.py
from twisted.protocols.basic import LineOnlyReceiver class IRCBase(LineOnlyReceiver): delimiter = "\n" # Default to splitting by \n, and then we'll also split \r in the handler def lineReceived(self, data): for line in data.split("\r"): command, params, prefix, tags = self._parseLine(line) if command: ...
Python
0.000013
@@ -3013,24 +3013,38 @@ lf.sendLine( +%22%7B%7D%5Cr%22.format( lineToSend.r @@ -3060,16 +3060,17 @@ 0%22, %22%22)) +) %0A%09%0A%09def
9501ab023a51ca6f3e37fcad3c9c9ff04223986b
update version to 0.4
txjsonrpc/meta.py
txjsonrpc/meta.py
display_name = "txJSON-RPC" library_name = "txjsonrpc" version = "0.3.1" author = "Duncan McGreggor" author_email = "oubiwann@adytum.us" license = "BSD, GPL" url = "http://launchpad.net/%s" % library_name description = "Code for creatig Twisted JSON-RPC servers and clients."
Python
0.000001
@@ -65,11 +65,9 @@ %220. -3.1 +4 %22%0Aau
0dc29df1e97b8c5f36320b55c659c8290f021c69
Fix parallelization of number of topics script
DilipadTopicModelling/experiment_number_of_topics.py
DilipadTopicModelling/experiment_number_of_topics.py
import logging import glob from multiprocessing import Process from CPTCorpus import CPTCorpus from CPT_Gibbs import GibbsSampler def run_sampler(corpus, nTopics, nIter, beta, out_dir): alpha = 50.0/nTopics logger.info('running Gibbs sampler (nTopics: {}, nIter: {}, alpha: {}, ' 'beta: {})'.f...
Python
0.000141
@@ -49,22 +49,19 @@ import P -rocess +ool %0A%0Afrom C @@ -803,16 +803,32 @@ ata/ -tmp/test +dilipad/20112012/gov_opp /*') @@ -864,30 +864,28 @@ ata/ -tmp/generated/test_exp +dilipad/res_20112012 /%7B%7D' @@ -1121,61 +1121,45 @@ pus. -CPTCorpus.load('%7B%7Dcorpus.json'.format(out_dir),%0A# +load(out_dir.form...
8ec5a19bcac5676cee85a122e1bf9a2554a61b01
bump back to 2 concurrent jobs. too many 503s
ingestor/l8_process_run.py
ingestor/l8_process_run.py
#!/usr/bin/env python import argparse import sys import os import shutil import pprint import sets import time from usgs import api from usgs import USGSError import pusher import scene_info import l8_process_scene from puller_usgs import backoff_factor def retry_login(retries=4, verbose=False): """ Retry ...
Python
0.000216
@@ -4397,17 +4397,17 @@ llel -j -3 +2 %25s %25s -
23e609ba624ad1eb4cf33f609f873afec38d6c85
Fix Instruments to use self.
labtoolkit/__init__.py
labtoolkit/__init__.py
# -*- coding: utf-8 -*- __author__ = """David A Lutton""" __email__ = 'david@dalun.space' __version__ = '0.1.0' import sys import visa from pprint import pprint from . import PowerMeter from . import SignalGenerator from . import WaveformGenerator from . import SpectrumAnalyser from . import NetworkAnalyser from ....
Python
0
@@ -861,17 +861,16 @@ ame__):%0A -%0A @@ -4398,26 +4398,20 @@ alue in -instrument +self .__dict_
443774e9adbd59d13ac4f6c076a22f67a9a113f1
Fix courses liste
Rules/Courses.py
Rules/Courses.py
from ._shared import * class Courses(Rule): """Handles shopping list""" def __init__(self, bot): self.bot = bot def __call__(self, serv, author, args): """Handles shopping list""" if len(args) < 3: raise InvalidArgs try: comment = " ".join(args[3:]...
Python
0.000019
@@ -231,16 +231,779 @@ s) %3C 3:%0A + if len(args) == 2 and args%5B1%5D == %22liste%22:%0A query = (%22SELECT item, author, date FROM shopping WHERE bought=0%22)%0A try:%0A bdd = self.bot.mysql_connect(serv)%0A assert(bdd is not None)%0A ...
0f10ec94a7a62968aeafe10c55913e08bb0c7ce6
Fix Bug: Type Error
Scripts/Judge.py
Scripts/Judge.py
#--coding:utf-8-- import re import json import chardet class Judge(): def __init__(self, SurnameCharacter = 'Surname.Chinese.json', SurnamePinyin = 'Surname.Pinyin.json'): # self.SurnameCharacter = json.load(open(SurnameCharacter, 'rb')) self.SurnamePinyin = json.load(open(SurnamePiny...
Python
0
@@ -549,17 +549,21 @@ ct(Name) -%5B +.get( 'encodin @@ -556,33 +556,42 @@ ).get('encoding' -%5D +, 'utf-8') )%0A if sel @@ -1095,17 +1095,21 @@ ription) -%5B +.get( 'encodin @@ -1110,17 +1110,26 @@ ncoding' -%5D +, 'utf-8') )%0A
16a54fc100874159da7212e35361e5c7110a7ab2
Add /start route for expeditions
kancolle/api/expedition.py
kancolle/api/expedition.py
"""Expedition blueprint.""" from flask import Blueprint from util import prepare_api_blueprint api_mission = Blueprint("api_mission", __name__) prepare_api_blueprint(api_mission)
Python
0
@@ -21,16 +21,33 @@ int.%22%22%22%0A +import datetime%0A%0A from fla @@ -65,17 +65,119 @@ lueprint -%0A +, g%0Afrom flask import request, abort%0Aimport time%0A%0Aimport util%0Afrom db import Expedition, Fleet, Admiral %0Afrom ut @@ -207,16 +207,24 @@ lueprint +, svdata %0A%0Aapi_mi @@ -300,8 +300,1568 @@ missio...
e75dca8d0b5b1872c509d6f1fa4bc880743a7f45
fix crash with control layers
GlyphNote.glyphsPalette/Contents/Resources/plugin.py
GlyphNote.glyphsPalette/Contents/Resources/plugin.py
# encoding: utf-8 ####################################################################################### # # Palette Plugin # # Read the docs: # https://github.com/schriftgestalt/GlyphsSDK/tree/master/Python%20Templates/Palette # ####################################################################################### ...
Python
0
@@ -1961,16 +1961,26 @@ Glyphs:%0A +%09%09%09%09try:%0A%09 %09%09%09%09this @@ -1997,24 +1997,25 @@ sGlyph.note%0A +%09 %09%09%09%09if thisN @@ -2026,24 +2026,25 @@ == %22%22:%0A%09%09%09%09%09 +%09 thisNote = N @@ -2047,16 +2047,17 @@ = None%0A +%09 %09%09%09%09allN @@ -2078,16 +2078,70 @@ isNote)%0A +%09%09...
e7e244c3a9914bc2d562b008b00341cea31d2ef7
add boolean_labels
lcdblib/utils/utils.py
lcdblib/utils/utils.py
import os import contextlib from collections.abc import Iterable @contextlib.contextmanager def temp_env(env): """ Context manager to temporarily set os.environ. """ env = dict(env) orig = os.environ.copy() _env = {k: str(v) for k, v in env.items()} os.environ.update(_env) try: ...
Python
0.998838
@@ -2120,8 +2120,943 @@ eturn d%0A +%0A%0Adef boolean_labels(names, idx, mapping=%7BTrue: 'AND', False: 'NOT'%7D,%0A strip='AND_'):%0A %22%22%22%0A Creates labels for boolean lists.%0A%0A For example:%0A%0A %3E%3E%3E names = %5B'exp1', 'exp2', 'exp3'%5D%0A %3E%3E%3E idx = %5BTrue, True...
bbc167ca39beb7a1df5192d61c0385ca34eb129a
Fix bug when id cannot be coerced to right type
src/cerberus_ac/apps.py
src/cerberus_ac/apps.py
# -*- coding: utf-8 -*- """App module providing the application settings class.""" import importlib from django.apps import AppConfig import appsettings as aps class CerberusACConfig(AppConfig): name = 'cerberus_ac' verbose_name = 'Cerberus AC' def ready(self): AppSettings.check() def _impo...
Python
0
@@ -1768,16 +1768,17 @@ except +( cls.Does @@ -1777,32 +1777,45 @@ cls.DoesNotExist +, ValueError) :%0A
684a7b8f972595722b664dfc002faaf63dba25fe
version bump
ubelt/__init__.py
ubelt/__init__.py
# -*- coding: utf-8 -*- # flake8: noqa """ CommandLine: # Partially regenerate __init__.py python -c "import ubelt" python -c "import ubelt" --print-ubelt-init --dyn python -c "import ubelt" --update-ubelt-init --dyn # TODO: ensure this new way will work with multilevel modules python -c "impor...
Python
0.000001
@@ -779,9 +779,9 @@ .0.3 -4 +5 '%0A%0AG
ae03b5bf4c0ff2c5104bb7b7826adc135528788d
Change ProductMedia url property to return correctly
shoop/core/models/product_media.py
shoop/core/models/product_media.py
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import with_statement from django.db import models from dja...
Python
0
@@ -2857,23 +2857,25 @@ if -not self. -public +external_url :%0A @@ -2889,85 +2889,31 @@ r -aise ValueError(%22%60get_effective_url()%60 may not be used on non-public media%22)%0A +eturn self.external_url %0A @@ -2921,35 +2921,32 @@ if self.file -_id :%0A re @@ -2976,50 +2976,17 @@ ...
49d7ba5c4ddf858129bbdd3dea1c968aff8345c1
Update hackerland_radio_transmitters.py
python/hackerrank/practice/hackerland_radio_transmitters.py
python/hackerrank/practice/hackerland_radio_transmitters.py
n, k = map(int, input().split()) arr = list(map(int, input().split())) # arr=[1,7,8,15,16,18,19,21,23] # n=9 # k=2 # sorted_arr = sorted(arr) sorted_arr = [] coverage = (2 * k) my_set = set() for i in arr: my_set.add(i) for i in my_set: sorted_arr.append(i) # 7 2 4 6 5 9 12 11 ...
Python
0.000001
@@ -549,16 +549,17 @@ l %3C= r: + %0A
b5a0c3424b83c779c80e94b3ccfd795eb0e23642
FIX show only paid invoices in together participant barometer
crowdfunding_compassion/controllers/main.py
crowdfunding_compassion/controllers/main.py
############################################################################## # # Copyright (C) 2020 Compassion CH (http://www.compassion.ch) # @author: Quentin Gigon # # The licence is in the file __manifest__.py # ############################################################################## from odoo.http ...
Python
0
@@ -1039,18 +1039,16 @@ ate -!= %22cancel +== %22paid %22)%0A%0A
62fa3e075284b275c5b65a9d3e7a80c95af5d4cb
Fix bug that could cause crash when opening the GMN home page
d1_mn_generic/src/gmn/app/views/internal.py
d1_mn_generic/src/gmn/app/views/internal.py
# -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2016 DataONE # # Licensed under the Apache License, Version 2.0 ...
Python
0
@@ -2699,18 +2699,25 @@ ngs. -MEDIA_ROOT +OBJECT_STORE_PATH )%0A
4ea4247f531c78e3d26f135c5b85bbe4b5f2ca5e
Reorder imports
coalib/tests/parsing/ConfParserTest.py
coalib/tests/parsing/ConfParserTest.py
from collections import OrderedDict import os import sys sys.path.insert(0, ".") from coalib.misc.Compatability import FileNotFoundError from coalib.parsing.ConfParser import ConfParser from coalib.settings.Section import Section import unittest import tempfile class ConfParserTest(unittest.TestCase): example_f...
Python
0
@@ -39,17 +39,16 @@ port os%0A -%0A import s @@ -49,16 +49,48 @@ port sys +%0Aimport tempfile%0Aimport unittest %0A%0Asys.pa @@ -260,40 +260,8 @@ ion%0A -import unittest%0Aimport tempfile%0A %0A%0Acl
008b466b561a923c1cb0b19a4788e0f5bb540dac
Version bump for Pandas connector.
uproot/version.py
uproot/version.py
#!/usr/bin/env python # Copyright (c) 2017, DIANA-HEP # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list ...
Python
0
@@ -1586,17 +1586,17 @@ __ = %222. -2 +3 .0%22%0Avers
7cee7de43fc77e362cf19a9484f243d66e034f59
Refactor from_json
upstream/chunk.py
upstream/chunk.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from upstream.exc import ChunkError class Chunk(object): def __init__(self, filehash=None, decryptkey=None, filename=None, filepath=None): """ Stores information about an encryted chunk. Allows for format conversions. ...
Python
0.000009
@@ -959,20 +959,20 @@ def -load +from _json(se @@ -975,19 +975,24 @@ n(self, -raw +json_str ):%0A @@ -1003,22 +1003,27 @@ elf. -raw_json = raw +json_str = json_str %0A @@ -1049,11 +1049,16 @@ ads( -raw +json_str )%0A @@ -1133,36 +1133,16 @@ a%5B'key'%5D -%0A return self %0A%0A #
1a089c634bc608e5862ce549ed598e50c02b8d09
Bump version
users/__init__.py
users/__init__.py
__version__ = '0.1.2'
Python
0
@@ -16,7 +16,7 @@ 0.1. -2 +3 '%0A
a070334b7088bbb4f364d2a2f0c9b6da8d652609
add spitzer m81 project dir
util/2mass_get.py
util/2mass_get.py
#! /usr/bin/env python import re import sys import socket import time from urllib2 import urlopen, URLError from urllib import urlencode from urlparse import urlparse, urljoin from os.path import basename from optparse import OptionParser from xml.dom import minidom from astrometry.util.starutil_numpy import * from a...
Python
0
@@ -531,16 +531,26 @@ efn=None +, band='A' ):%0A%0A%09for @@ -832,34 +832,50 @@ d': -'A', # All bands ( +band, # 'A'=All bands; alternatives: J,H,K -_s) %0A%09%09%7D @@ -3451,24 +3451,105 @@ : 2mass-)')%0A +%09parser.add_option('-B', dest='band', help='Band (J, H, K); default: all three')%0A %09parser.set_ @@ ...
14f7767ed95346ea89b13ddc0dcb6369292f6105
Fix initial view creation with an empty db.
been/couch.py
been/couch.py
from hashlib import sha1 import couchdb from core import Store # Add time serialization to couchdb's json repertoire. import json import time import calendar class TimeEncoder(json.JSONEncoder): def default(self, obj): if type(obj) is time.struct_time: return calendar.timegm(obj) else: ...
Python
0
@@ -819,27 +819,38 @@ -doc = self.db.get(' +views = %7B%0A %22_id%22: %22 _des @@ -865,36 +865,12 @@ vity -', %7B%7D) +%22, %0A - doc.update(%7B%0A @@ -902,16 +902,17 @@ cript%22,%0A + @@ -940,16 +940,17 @@ + %22sources @@ -950,24 +950,25 @@ sources%22: %7B%0A +...
2cc15f71d00eb226cc5072cd28cc7eb134dedd52
correct typo error in generation script.
test/scripts/make_snp_deletions.py
test/scripts/make_snp_deletions.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # base import import argparse import sys import os # specific import import random from collections import defaultdict # log import import logging # logger configuration def conf_logger(): """ Set configuraion of root logger """ logger = logging.getLogger() ...
Python
0
@@ -5576,19 +5576,19 @@ put%22%5D+%22. -vde +eva %22, %22a%22)%0A
e90cb967a9bfdaafd2833d5005142c321615a8f2
Add a change log when importing a report. (#1746)
components/server/src/routes/report.py
components/server/src/routes/report.py
"""Report routes.""" import os from urllib import parse import bottle import requests from pymongo.database import Database from database import sessions from database.datamodels import latest_datamodel from database.measurements import recent_measurements_by_metric_uuid from database.reports import insert_new_repor...
Python
0
@@ -827,16 +827,194 @@ t.json)%0A + user = sessions.user(database)%0A report%5B%22delta%22%5D = dict(%0A uuids=%5Breport%5B%22report_uuid%22%5D%5D, email=user%5B%22email%22%5D, description=f%22%7Buser%5B'user'%5D%7D imported a report.%22%0A )%0A resu
03fe02df027ef34cada5417205e641c5238c2403
__init__
TBFW/__init__.py
TBFW/__init__.py
# coding=utf-8 """ TBFW library """ __version__ = '2.0.0' __author__ = 'Nephy Project Team' __license__ = 'MIT' from TBFW.core import Core from TBFW.api import Plugin if __name__ == "__main__": pass
Python
0.998994
@@ -148,25 +148,121 @@ BFW. -api import Plugin +database import DBProvider%0Afrom TBFW.api import Plugin%0Afrom TBFW.exceptions import GeneralError, OutOfMemoryError %0A%0Aif
85a13b7ad7d10c5ff431090cb1de63b84e68ff08
Add proper translation contexts to RemovableDriveOutputDevice
plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py
plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py
import os.path from UM.Application import Application from UM.Logger import Logger from UM.Message import Message from UM.Mesh.WriteMeshJob import WriteMeshJob from UM.Mesh.MeshWriter import MeshWriter from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator from UM.OutputDevice.OutputDevice import Outp...
Python
0.999928
@@ -642,32 +642,46 @@ (catalog.i18nc(%22 +@action:button %22, %22Save to Remo @@ -730,32 +730,45 @@ (catalog.i18nc(%22 +@info:tooltip %22, %22Save to Remo @@ -2101,24 +2101,36 @@ alog.i18nc(%22 +@info:status %22, %22Saving t @@ -2139,35 +2139,56 @@ Removable Drive -%7B0%7D +%3Cfilename%3E%7B0%7D%3C/filename%3E ...
44202d1c178d76c5db22a9b9ce4e7138a0cb73c7
upgrade to v3.9.4
kiteconnect/__version__.py
kiteconnect/__version__.py
__title__ = "kiteconnect" __description__ = "The official Python client for the Kite Connect trading API" __url__ = "https://kite.trade" __download_url__ = "https://github.com/zerodhatech/pykiteconnect" __version__ = "3.9.2" __author__ = "Zerodha Technology Pvt ltd. (India)" __author_email__ = "talk@zerodha.tech" __lic...
Python
0.000001
@@ -219,9 +219,9 @@ 3.9. -2 +4 %22%0A__
f1217f04f17daa3d77c9a3197b33d87b8f775056
Replace OpenERP by Odoo
l10n_ch_zip/__openerp__.py
l10n_ch_zip/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author Nicolas Bessi. Copyright Camptocamp SA # Contributor: WinGo SA # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all...
Python
0.000144
@@ -1652,22 +1652,19 @@ IP) in O -penERP +doo to%0Aease @@ -1720,14 +1720,11 @@ se O -penERP +doo in
9c029788cf438ec5c796e22b77006559c1e59b99
needs json
lablog/controllers/node.py
lablog/controllers/node.py
from flask import Blueprint, Response, render_template, request, g from flask.views import MethodView from lablog.app import App from lablog import config from lablog.util.jsontools import jsonify from lablog.util import aes from flask_oauthlib.provider import OAuth2Provider import logging from lablog.controllers.auth ...
Python
0.999702
@@ -273,23 +273,8 @@ der%0A -import logging%0A from @@ -340,16 +340,43 @@ datetime +%0Aimport logging%0Aimport json %0A%0Anode =
dc5eebe521c480fa06c13eae0f41922d3cb08b63
Convert newlines in command subject into spaces.
lambda/control/__init__.py
lambda/control/__init__.py
from __future__ import print_function import datetime import hmac import hashlib import re timestamp_format = '%Y%m%d%H%M%S' signed_cmd_regex = re.compile(r'^(?P<cmd>.+) (?P<timestamp>\d{14}) (?P<signature>[\da-f]{40})$') from config import signing_key, signed_validity_interval from sestools import msg_get_header, ...
Python
0.000358
@@ -1245,16 +1245,35 @@ ubject') +.replace('%5Cn', ' ') %0A pri
b37988c7d6b260793cc8e88e0057f1a59d2fcc0b
fix migration file
custom/icds_reports/migrations/0060_added_phone_number_to_views.py
custom/icds_reports/migrations/0060_added_phone_number_to_views.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-09-10 14:05 from __future__ import unicode_literals from __future__ import absolute_import from django.db import migrations from corehq.sql_db.operations import RawSQLMigration migrator = RawSQLMigration(('custom', 'icds_reports', 'migrations', 'sql_templa...
Python
0.000001
@@ -434,53 +434,27 @@ '005 -7_aggregateccsrecordpostnatalcareforms_is_ebf +9_update_blob_paths '),%0A
84a025793ded83302212ef902660642f26d76d24
fix bug
spider/src/mydm/pipelines/image.py
spider/src/mydm/pipelines/image.py
# -*- coding: utf-8 -*- import logging import base64 from io import BytesIO from urllib.parse import urlparse, urljoin from PIL import Image as ImageLib from lxml.html import fromstring, HTMLParser from scrapy.http import Request from mydm.exceptions import ImgException from scrapy.pipelines.media import MediaPipel...
Python
0.000001
@@ -1120,24 +1120,25 @@ aPipeline):%0A +%0A MEDIA_NA @@ -1208,17 +1208,62 @@ lf, -filter +settings):%0A super().__init__(settings=setting s) -: %0A @@ -1268,24 +1268,30 @@ self. +image_ filters = fi @@ -1292,69 +1292,131 @@ s = -filters%0A%0A @classmethod%0A def from_settings(cls, ...
c5f2b65aa172b10206950a5981a06afef5742173
Improve reliability of galera_consistency.py
galera_consistency.py
galera_consistency.py
import optparse import subprocess def table_checksum(user, password, host): args = ['/usr/bin/pt-table-checksum', '-u', user, '-p', password] if host: args.extend(['-h', host]) proc = subprocess.Popen(args, stderr=subprocess.PIPE) (out, err) = proc.communicate() return (proc.return_code, ...
Python
0
@@ -1,12 +1,22 @@ +import io%0A import optpa @@ -81,16 +81,93 @@ host):%0A + %22%22%22Run pt-table-checksum with the user, password, and host specified.%22%22%22%0A args @@ -276,16 +276,64 @@ host%5D)%0A%0A + out = io.StringIO()%0A err = io.StringIO()%0A proc @@ -386,18 +386,218 @@ PE)%0A +%0A ...
1b2fa45766b1ea5945f246d74bc4adf0114abe84
Fix typo in description of config item
astroquery/splatalogue/__init__.py
astroquery/splatalogue/__init__.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Splatalogue Catalog Query Tool ----------------------------------- :Author: Adam Ginsburg (adam.g.ginsburg@gmail.com) :Originally contributed by: Magnus Vilhelm Persson (magnusp@vilhelm.nu) """ from astropy import config as _config class Conf...
Python
0.000107
@@ -655,17 +655,16 @@ ' -S Splatalo
8223f308eb1e17ea93981eceaf96aa5210e6724c
Update common.py
bin/common.py
bin/common.py
#!/usr/bin/python import os import numpy as np import multiprocessing as mp import subprocess as sub import shlex #Make sure a directory path contains a trailing /# def fixDirName(dirpath): if dirpath[-1] != '/': dirpath += '/' return dirpath #Check if a directory exists, make it if needed# def makeDi...
Python
0.000001
@@ -2013,24 +2013,27 @@ , 'int64', ' +np. float64')%7D,%0A
3300caac7c7b420d31010e37aebbdde519f4723f
change 开通虚拟消费卡
backend/server/route/user_route.py
backend/server/route/user_route.py
# -*- coding: UTF-8 -*- """ @author: Bingwei Chen @time: 8/4/17 @desc: user route 1. user register 2. user login """ from flask import Blueprint from flask import jsonify from flask import request from flask_jwt_extended import create_access_token from playhouse.shortcuts import model_to_dict from peewee import D...
Python
0
@@ -6222,37 +6222,9 @@ = %7B%0A - # %22username%22: %22Shuo_Ren%22 %0A + @@ -6297,38 +6297,8 @@ y()%0A - data = request.get_json()%0A @@ -6359,16 +6359,16 @@ l_card(%0A + @@ -6393,27 +6393,8 @@ me,%0A - **data%0A
a1c60939302bd60d0e7708d19b7eee3d2970bbfb
Fix minion state assertions - multiple keys possible
assertions.py
assertions.py
import re import shlex import subprocess from config import SALT_KEY_CMD def assert_minion_key_state(env, expected_state): STATES_MAPPING = dict( unaccepted=re.compile("Unaccepted Keys:\n{HOSTNAME}".format(**env)), accepted=re.compile("Accepted Keys:\n{HOSTNAME}".format(**env)) ) assert ex...
Python
0.000004
@@ -76,235 +76,57 @@ def +h as -sert_minion_key_state(env, expected_state):%0A STATES_MAPPING = dict(%0A unaccepted=re.compile(%22Unaccepted Keys:%5Cn%7BHOSTNAME%7D%22.format(**env)),%0A accepted=re.compile(%22Accepted Keys:%5Cn%7BHOSTNAME%7D%22.format(**env))%0A ) +_expected_state(expected_state...
9845a0566e1c96ae72ce0ac6438e8ddd9f6db053
Add better instructions on changing kernels
metatlas/tools/notebook.py
metatlas/tools/notebook.py
"""Jupyter notebook helper functions""" import logging import os import shutil import sys from pathlib import Path import pandas as pd from IPython.core.display import display, HTML from metatlas.tools.logging import activate_logging logger = logging.getLogger(__name__) def configure_environment(log_level): ""...
Python
0.005869
@@ -2032,16 +2032,17 @@ er.info( +( 'Reload @@ -2054,16 +2054,21 @@ age and +then change k @@ -2096,17 +2096,185 @@ rgeted%22. -' + '%0A %22On the menu bar at the top of this page select 'Kernel'%3E'Change Kernel..' %22%0A %22then find 'Metatlas Targeted' in the drop down list.%2...
c8b772542dffda0de95034b54b3eaea465dac2e7
Correct exception handling.
bin/sender.py
bin/sender.py
#!/usr/bin/env python # Copyright (C) 2012 STFC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
Python
0.000001
@@ -3828,32 +3828,49 @@ %0A try:%0A + try:%0A server_c @@ -3907,16 +3907,144 @@ erver')%0A + if not os.path.isfile(server_cert):%0A raise Ssm2Exception('Server cerficate location incorrect.')%0A exce @@ -4066,32 +4066,36 @@ .NoOptionError:%0A + ...
f3ec85cd7baf65036ed76a2c4ab4fe935b81b805
introduce logging
midas/scripts/md_config.py
midas/scripts/md_config.py
# -*- coding: utf-8 -*- import sys from midas.scripts import MDCommand import midas.config as md_cfg class MDConfig(MDCommand): """ Read all configuration files, print the final configuration and exit. This can be used to see how a configuration file (e.g. a job file) alters the whole configuratio...
Python
0
@@ -18,16 +18,31 @@ -8 -*-%0A%0A +import logging%0A import s @@ -113,16 +113,54 @@ md_cfg%0A%0A +logger = logging.getLogger(__name__)%0A%0A class MD
8790eec0fdd94beeb4d0ceac8b24a1de77bd3eee
Update sql2rf.py
bin/sql2rf.py
bin/sql2rf.py
#!/usr/bin/env python # -*- coding: utf8 -*- """Script to search for records within an SQL database created using snapshot2sql and convert to Researcher Format.""" # Import required modules # import datetime import getopt # import sys from iams2rf import * __author__ = 'Victoria Morris' __license__ = 'M...
Python
0.000001
@@ -400,24 +400,82 @@ f usage():%0D%0A + %22%22%22Function to print information about the script%22%22%22%0D%0A print('= @@ -509,32 +509,32 @@ ============')%0D%0A - print('sql2r @@ -920,25 +920,8 @@ ATH --o OUTPUT_FOLDER %5BOPT @@ -1141,78 +1141,8 @@ ')%0D%0A - print(' -o Folder to save Re...
544ddadc244df4c77c08cf6a97a4de84f3379f38
raise error if more than one result by id
atws/query.py
atws/query.py
from __future__ import absolute_import import sys from datetime import datetime from xml.etree.ElementTree import Element, SubElement, tostring from xml.sax.saxutils import escape from .helpers import datetime_to_api_timezone from .constants import (AUTOTASK_API_QUERY_ID_LIMIT, AUTOTASK_API_QUER...
Python
0.000001
@@ -1075,25 +1075,164 @@ -return result%5B0%5D%0A +for i, e in enumerate(result):%0A first_entity = e%0A if i == 1:%0A raise ValueError('too many results')%0A return first_entity%0A %0A%0Ade
2d35031cfdb98503f326cc375f6d9962daf1faf8
Set BaseAnimation.sleep_time as late as possible.
bibliopixel/animation/animation.py
bibliopixel/animation/animation.py
import contextlib, threading, time from . runner import Runner from .. import log from .. threads.animation_threading import AnimationThreading class BaseAnimation(object): free_run = False def __init__(self, led): self._led = led self.internal_delay = None def preRun(self, amt=1): ...
Python
0
@@ -1498,32 +1498,307 @@ _context(self):%0A + if self.free_run:%0A self.sleep_time = None%0A elif self.internal_delay:%0A self.sleep_time = self.internal_delay%0A else:%0A self.sleep_time = self.runner.sleep_time%0A self._led.animation_sleep_time = self.slee...
796952dca75a78e0b71b5809112bd0815fa87986
Method instructions format: text/x-web-intelligent
bika/lims/content/method.py
bika/lims/content/method.py
from AccessControl import ClassSecurityInfo from Products.CMFCore.permissions import ModifyPortalContent, View from Products.Archetypes.public import * from Products.Archetypes.references import HoldingReference from Products.ATExtensions.ateapi import RecordsField as RecordsField from bika.lims.browser.widgets import ...
Python
0.999106
@@ -621,21 +621,33 @@ = 'text/ -plain +x-web-intelligent ',%0A @@ -686,16 +686,69 @@ ext/ -plain',) +x-web-intelligent',),%0A default_output_type=%22text/html%22 ,%0A
5132d4f7719862db733ab7cbfe8eec79af90487e
Update the latest_query_at on ohloh
apps/applications/models.py
apps/applications/models.py
import os.path import datetime import urllib, re from xml.dom.minidom import parse, parseString # Django from django.conf import settings from django.db import models from django.contrib.sites.models import Site from django.contrib.sites.managers import CurrentSiteManager from django.db.models.signals import m2m_change...
Python
0.000001
@@ -6986,24 +6986,83 @@ data = data%0A + self.latest_query_at = datetime.datetime.now()%0A %0A app
39ea9c83646146ef09ce46acd646942a4cc9f03f
Update fabrictask to add devilry_statistics javascript.
devilry/project/develop/fabrictasks.py
devilry/project/develop/fabrictasks.py
import os from os.path import exists, join, relpath from os import remove, getcwd import shutil from fabric.api import local, abort, task from fabric.context_managers import shell_env, lcd DB_FILE = join('devilry_developfiles', 'db.sqlite3') LANGUAGES = ['en', 'nb'] def _managepy(args, djangoenv='develop', environm...
Python
0
@@ -5104,32 +5104,109 @@ vilry_theme3/')%0A + local('git rm -r devilry/devilry_statistics/static/devilry_statistics/')%0A local('ievv @@ -5317,32 +5317,107 @@ vilry_theme3/')%0A + local('git add devilry/devilry_statistics/static/devilry_statistics/')%0A local('pytho
2ddf45b958f45aa1490e95ded2224fb307fe6b27
clean up
budget/database/sqlitedb.py
budget/database/sqlitedb.py
import sqlite3 class Datastore(): """This class represents data-storage object. The Datastore will store all the account information for food and miscellaneous accounts. Attributes: _conn (sqlite3.Connection): A sqlite3.Connection object that represents the database _cursor (sqlite3....
Python
0.000001
@@ -511,19 +511,17 @@ FileName - = += None):%0A
7c382a33fa3f691fcbf89621b48c0c9e3a921d03
update version number
vaspy/__init__.py
vaspy/__init__.py
__version__ = '0.1.0' # add electro module class VasPy(object): def __init__(self, filename): "Base class to be inherited by all classes in VASPy." self.filename = filename class CarfileValueError(Exception): "Exception raised for errors in the CONTCAR-like file." pass class Unmatched...
Python
0.000002
@@ -12,17 +12,17 @@ = '0.1. -0 +1 ' # add @@ -26,22 +26,33 @@ add -electro module +d-band center calculation %0A%0A%0Ac
4d63320c2bf077e90cffb98286e0354dcab1fc64
Make runTestCases.py possible to run independently
build-tools/runTestCases.py
build-tools/runTestCases.py
#! /usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "L...
Python
0
@@ -840,16 +840,115 @@ port sys +%0Aimport os%0A%0AtestLogDir = %22testlog/%22%0A%0Aif not os.path.exists(testLogDir):%0A os.makedirs(testLogDir) %0A%0AtestCm @@ -1229,26 +1229,26 @@ ePath = -%22 test -log/%22 +LogDir + tcNam
cb7574b1f4f4362988ba8dbfa279a7ce78e29b6a
version bumb
vespa/__init__.py
vespa/__init__.py
__version__ = '0.4.6' try: __VESPA_SETUP__ except NameError: __VESPA_SETUP__ = False if not __VESPA_SETUP__: __all__ = ['FPPCalculation', 'EclipsePopulation', 'EBPopulation', 'HEBPopulation', 'BEBPopulation', 'PlanetPopulation', 'PopulationSet', ...
Python
0.000001
@@ -16,9 +16,9 @@ 0.4. -6 +7 '%0A%0At
a6270ec08d8c5945435a1b3334b9b363026a3b56
Use BadRequest exception
app/soc/modules/gci/views/student_forms.py
app/soc/modules/gci/views/student_forms.py
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
Python
0
@@ -885,16 +885,60 @@ bstore%0A%0A +from soc.logic.exceptions import BadRequest%0A from soc @@ -5769,46 +5769,24 @@ r -eturn self.error(httplib.BAD_REQUEST, +aise BadRequest( 'No
bbdc969214e698a62020603dafac9165d7bf6a84
add tests that train is called if no model passed
tests/cli/test_rasa_interactive.py
tests/cli/test_rasa_interactive.py
import argparse from typing import Callable, Text from unittest.mock import Mock from _pytest.monkeypatch import MonkeyPatch from _pytest.pytester import RunResult import rasa from rasa.cli import interactive, train def test_interactive_help(run: Callable[..., RunResult]): output = run("interactive", "--help") ...
Python
0
@@ -211,16 +211,53 @@ , train%0A +from rasa import train as rasa_train%0A %0A%0Adef te @@ -2255,27 +2255,1713 @@ ly c -ode%0A mock.method +alled%0A mock.method.assert_called_once()%0A%0A%0Adef test_train_called_when_no_model_passed(%0A default_stack_config: Text, monkeypatch: MonkeyPatch,%0A) -%3E None:%0A ...
200a2492129cbfab4024c435e8971e79c8aa836f
Build scripts: the insertValue transformation no longer uses the re module
buildlib/transformations.py
buildlib/transformations.py
''' The MIT License Copyright (c) 2011 Steven G. Brown Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, pu...
Python
0
@@ -1156,31 +1156,25 @@ lue( -variableName, variableV +includeTagName, v alue @@ -1285,25 +1285,27 @@ ag with -variableV +the given v alue. Fo @@ -1349,24 +1349,26 @@ ed with -variable +includeTag Name='ve @@ -1380,24 +1380,16 @@ ' and va -riableVa lue='1.0 @@ -1399,18 +1399,16 @@ then any -%0A occuran @@...
6afc7a4b8ae60a85e804980bbeace8395d899683
Append self doctype to get_applicable_for_doctype_list
frappe/core/doctype/user_permission/user_permission.py
frappe/core/doctype/user_permission/user_permission.py
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, json from frappe.model.document import Document from frappe.permissions import (get_valid_perms, update_permission_property) from f...
Python
0
@@ -3059,16 +3059,46 @@ .keys()%0A +%09linked_doctypes += %5Bdoctype%5D%0A %09if txt:
e977d997ab66196b519c60dea34e360dfa4fb15d
Complete decreasing pivot swap reverse sol
lc0031_next_permutation.py
lc0031_next_permutation.py
"""Leetcode 31. Next Permutation Medium URL: https://leetcode.com/problems/next-permutation/ Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascen...
Python
0.000002
@@ -396,17 +396,16 @@ memory.%0A -%0A Here are @@ -579,16 +579,42 @@ Solution +DecreasingPivotSwapReverse (object) @@ -773,54 +773,1296 @@ ad.%0A - %22%22%22%0A pass%0A%0A%0Adef main():%0A pas +%0A Time complexity: O(n).%0A Space complexity: O(1).%0A %22%22%22%0A # From...