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
7434c48d9d749a60f7c33179080c3ce390b298f0
Switch from httplib to fetch_url
lib/ansible/modules/extras/notification/pushover.py
lib/ansible/modules/extras/notification/pushover.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2012, Jim Richardson <weaselkeeper@gmail.com> # All rights reserved. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software F...
Python
0
@@ -1821,31 +1821,16 @@ lib%0A -import httplib%0A %0A%0Aclass push @@ -1825,17 +1825,17 @@ %0A%0Aclass -p +P ushover( @@ -1920,87 +1920,191 @@ '''%0A -%0A def __init__(self):%0A self.host, self.port = 'api.pushover.net', 443 + base_uri = 'https://api.pushover.net'%0A port = 443%0A%0A def __in...
c85a42be0f88e1e56af93a8173c4fd62535683e7
Add tests for datastore name prefix filtering.
st2api/tests/unit/controllers/v1/test_kvps.py
st2api/tests/unit/controllers/v1/test_kvps.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
@@ -891,16 +891,79 @@ /v3'%0A%7D%0A%0A +KVP_2 = %7B%0A 'name': 'keystone_version',%0A 'value': 'v3'%0A%7D%0A%0A KVP_WITH @@ -1541,16 +1541,816 @@ vp_id)%0A%0A + def test_get_all_prefix_filtering(self):%0A put_resp1 = self.__do_put(KVP%5B'name'%5D, KVP)%0A put_resp2 = self.__do_put(KVP_2%5B'nam...
cc6c00656f8a7bd969c400904647fc9fc6125486
add space
apps/empleabilidad/forms.py
apps/empleabilidad/forms.py
from django import forms from . import models from apps.utils import forms as utils, constants from django.forms import models as models_form from apps.personas import models as persona_models class VacanteForm(utils.BaseFormAllFields): title = 'Vacante' fecha = forms.DateField(input_formats=constants.INPUT_F...
Python
0.999965
@@ -1916,28 +1916,29 @@ mset,%0A **kwargs%0A ) +%0A
4e379e5813f8686578397043554819fbb5dbb410
add ALMA beta server
astroquery/alma/__init__.py
astroquery/alma/__init__.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ ALMA Archive service. """ from astropy import config as _config class Conf(_config.ConfigNamespace): """ Configuration parameters for `astroquery.alma`. """ timeout = _config.ConfigItem(60, "Timeout in seconds") archive_url = _c...
Python
0
@@ -562,16 +562,176 @@ o.ac.jp' +,%0A 'http://beta.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/aq', # the beta server (for testing)%0A %5D,%0A
937d0d731d03348696046a9783524ad5959dcb31
Fix exception in doorbird logbook during startup (#74649)
homeassistant/components/doorbird/logbook.py
homeassistant/components/doorbird/logbook.py
"""Describe logbook events.""" from homeassistant.components.logbook.const import ( LOGBOOK_ENTRY_ENTITY_ID, LOGBOOK_ENTRY_MESSAGE, LOGBOOK_ENTRY_NAME, ) from homeassistant.const import ATTR_ENTITY_ID from homeassistant.core import callback from .const import DOMAIN, DOOR_STATION, DOOR_STATION_EVENT_ENTIT...
Python
0.000005
@@ -23,16 +23,75 @@ ents.%22%22%22 +%0Afrom __future__ import annotations%0A%0Afrom typing import Any %0A%0Afrom h @@ -970,16 +970,32 @@ ain_data +: dict%5Bstr, Any%5D = hass. @@ -1016,31 +1016,20 @@ for -config_entry_id +data in doma @@ -1035,16 +1035,25 @@ ain_data +.values() :%0A @@ -1058,66 +10...
30c99ce954b7b888e552deea4a1b91e056360fd1
Fix memory leak in insteon (#49466)
homeassistant/components/insteon/__init__.py
homeassistant/components/insteon/__init__.py
"""Support for INSTEON Modems (PLM and Hub).""" import asyncio from contextlib import suppress import logging from pyinsteon import async_close, async_connect, devices from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.const import CONF_PLATFORM, EVENT_HOMEASSISTANT_STOP from homeassistant.exce...
Python
0
@@ -2867,16 +2867,47 @@ eption%0A%0A + entry.async_on_unload(%0A hass @@ -2980,16 +2980,22 @@ nection) +%0A ) %0A%0A aw
ea4ad854883b77d39c8b2f5c5cf3915f258e780c
Replace StrictVersion with AwesomeVersion (#46331)
homeassistant/components/updater/__init__.py
homeassistant/components/updater/__init__.py
"""Support to check for available updates.""" import asyncio from datetime import timedelta from distutils.version import StrictVersion import logging import async_timeout from distro import linux_distribution # pylint: disable=import-error import voluptuous as vol from homeassistant.const import __version__ as curr...
Python
0.000008
@@ -89,88 +89,86 @@ lta%0A -from distutils.version import StrictVersion%0Aimport logging%0A%0Aimport async_timeout +import logging%0A%0Aimport async_timeout%0Afrom awesomeversion import AwesomeVersion %0Afro @@ -2608,22 +2608,23 @@ if -Strict +Awesome Version( @@ -2633,22 +2633,23 @@ west) %3E -Strict +Awes...
4e8a64fd2b39e9d7b8cfc65f403f0bf677344c68
Change timeseries() to use itertools.groupby
backdrop/core/timeseries.py
backdrop/core/timeseries.py
from datetime import timedelta, time import time as _time from dateutil.relativedelta import relativedelta, MO import pytz class Period(object): @property def delta(self): return self._delta @property def start_at_key(self): return "_%s_start_at" % self.name def _is_boundary(self...
Python
0
@@ -30,16 +30,46 @@ a, time%0A +from itertools import groupby%0A import t @@ -4026,21 +4026,21 @@ t_at = _ -index +group _by_star @@ -4059,17 +4059,69 @@ -def entry +results = %5B%5D%0A for period_start, period_end in period.range (sta @@ -4166,16 +4166,23 @@ o_index( +period_ start)%0A @@ -4233,28 +42...
bc58596f2452a5f17cc84e03aaff7c7a32c7a7b0
Update CORS origin regex to include all subdomains
backend/backend/settings.py
backend/backend/settings.py
""" Django settings for backend project. Generated by 'django-admin startproject' using Django 1.11.1. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os...
Python
0
@@ -4136,15 +4136,17 @@ /)?( +( %5Cw+%5C.) -? +*) unim
3045914789360ff2b40c100213d4002e0188272d
Add table sample2sample and it's extra indices.
backend/scripts/dbcreate.py
backend/scripts/dbcreate.py
#!/usr/bin/env python import rethinkdb as r from os import environ MCDB_PORT = environ.get('MCDB_PORT') or 28015 r.connect("localhost", int(MCDB_PORT)).repl() def create_database(): run(r.db_create("materialscommons")) def create_tables(): create_table("users", "apikey", "admin") # User groups should ...
Python
0
@@ -3064,32 +3064,100 @@ datafile_id%22%5D)%0A%0A + create_table(%22sample2sample%22, %22parent_sample_id%22, %22sample_id%22)%0A%0A create_table
826aaa01e843adefc2ee9d0937fe38c8a9fec2d3
Revise checking empty l1 or l2
lc0023_merge_k_sorted_lists.py
lc0023_merge_k_sorted_lists.py
"""Leetcode 23. Merge k Sorted Lists Hard URL: https://leetcode.com/problems/merge-k-sorted-lists/ Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5, 1->3->4, 2->6 ] Output: 1->1->2->3->4->4->5->6 """ # Definition for singly-linked lis...
Python
0.000484
@@ -2394,22 +2394,25 @@ if -l1 and +not l1 or not l2: @@ -2437,55 +2437,11 @@ n l1 -%0A elif not l1 and l2:%0A return + or l2%0A
d60b61bacc829ffd8312b3780e120df1f9a19cb2
Add class SolutionSort
lc480_sliding_window_median.py
lc480_sliding_window_median.py
"""Leetcode 480. Sliding Window Median Hard URL: https://leetcode.com/problems/sliding-window-median/ Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value. Examples: [2,3,4] , the median is 3 [2,3], the ...
Python
0
@@ -3420,16 +3420,206 @@ _nums%0A%0A%0A +class SolutionSort(object):%0A def medianSlidingWindow(self, nums, k):%0A %22%22%22%0A :type nums: List%5Bint%5D%0A :type k: int%0A :rtype: List%5Bfloat%5D%0A %22%22%22%0A pass%0A%0A%0A def main
e011e3b9b6a846f7e32fe978e5205554c64fc631
Add baz()
coveralls_trial/coveralls_trial.py
coveralls_trial/coveralls_trial.py
# -*- coding: utf-8 -*- def foo(): return True def bar(): return False
Python
0
@@ -74,8 +74,116 @@ n False%0A +%0Adef baz(x)%0A if x:%0A return x**2%0A elif x == 0:%0A return x + 17%0A else:%0A return x%0A
6cb545af8b147a275e153efd070c9aafc6ad2549
Fix incorrect error message when deleting invalid synonym.
frontends/etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py
frontends/etiquette_flask/etiquette_flask/endpoints/tag_endpoints.py
import flask; from flask import request import json import etiquette from .. import caching from .. import common from .. import decorators from .. import jsonify site = common.site session_manager = common.session_manager # Individual tags ##########################################################################...
Python
0.000025
@@ -4908,42 +4908,29 @@ on.P +.get _tag( +name= synonym -, response_type='json' )%0A
5acf96a7fecdfcc539a5e0624984eae2210c85ec
set delta directly when product not found in production (warning!!!)
csv_setup_inventory_delta/delta.py
csv_setup_inventory_delta/delta.py
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
Python
0
@@ -6803,52 +6803,82 @@ -note += '%25s %7C %25s %7C %25s (previous: +inventory_delta = product_qty %0A note += '%25s. %25s -) NO DATA !!!%5C @@ -6873,16 +6873,31 @@ NO DATA + (set as start) !!!%5Cn' %25 @@ -6942,56 +6942,9 @@ code -, 0, record%5B4%5D)%0A continue ...
a7fb434f9feda129e1e412fb7fd763f134d39ce0
update uri handler for change in daemon output
lbrynet/lbrynet_daemon/Apps/LBRYURIHandler.py
lbrynet/lbrynet_daemon/Apps/LBRYURIHandler.py
import os import json import webbrowser import subprocess import sys from time import sleep from jsonrpc.proxy import JSONRPCProxy API_CONNECTION_STRING = "http://localhost:5279/lbryapi" UI_ADDRESS = "http://localhost:5279" class Timeout(Exception): def __init__(self, value): self.parameter = value ...
Python
0
@@ -640,35 +640,24 @@ status = -json.loads( self.daemon. @@ -664,35 +664,24 @@ is_running() -)%5B'result'%5D %0A @@ -1479,27 +1479,16 @@ tatus = -json.loads( self.dae @@ -1507,19 +1507,8 @@ ng() -)%5B'result'%5D %0A @@ -1920,535 +1920,77 @@ -r = json.loads(self.daemon.get(%7B'name': lbr...
3be8748e1cb4eef61183fe48530ed12c691ceb63
simulate real sms with '+' prefix
corehq/apps/sms/tests/test_phone_number_in_multiple_domains.py
corehq/apps/sms/tests/test_phone_number_in_multiple_domains.py
import contextlib import uuid from datetime import datetime from unittest.mock import MagicMock, Mock, patch from django.test import TestCase from corehq.apps.formplayer_api.smsforms.tests.test_formplayer_interface import ( MockFormplayerRequest, ) from corehq.apps.sms.api import _process_incoming from corehq.app...
Python
0.873148
@@ -4339,16 +4339,22 @@ get_sms( +%22+%22 + number.p
f324973667467dea00e015b18da31c033894b549
fix ambiguous characters in VCF
bcbio/variation/samtools.py
bcbio/variation/samtools.py
"""Variant calling using samtools 1.0 mpileup and bcftools. http://www.htslib.org/workflow/#mapping_to_variant """ import os from distutils.version import LooseVersion from bcbio.utils import file_exists from bcbio.distributed.transaction import file_transaction from bcbio.log import logger from bcbio.pipeline import...
Python
0.001163
@@ -3894,16 +3894,60 @@ else %22%22%0A + fix_ambig = vcfutils.fix_ambiguous_cl()%0A cmd @@ -4003,24 +4003,52 @@ s_opts%7D - %22%0A + %22%7C %7Bfix_ambig%7D %22%0A %22
481142127970960cda4ae29f3a24713c2a46991e
Update __init__.py
appassure/core/__init__.py
appassure/core/__init__.py
"""This package contains the AppAssureAPI class and its subclasses, which provide direct access to the AppAssure Core API's interfaces and services, as described at http://docs.appassure.com/display/AA50D/. """
Python
0.000072
@@ -61,19 +61,16 @@ lasses,%0A - which pr @@ -132,11 +132,8 @@ ces%0A - and
60193bd891a819d519d181a6f31b263b01cf50a7
revert to the correct imports
powerstripflocker.tac
powerstripflocker.tac
# Copyright ClusterHQ Inc. See LICENSE file for details. from twisted.web import server, resource from twisted.application import service, internet from powerstripflocker.adapter import (HandshakeResource, CreateResource, DestroyResource, MountResource, UnmountResource) def getAdapter(): root = resource.Reso...
Python
0.000015
@@ -181,17 +181,16 @@ import -( Handshak @@ -204,75 +204,23 @@ ce, -CreateResource,%0A DestroyResource, MountResource, Unmount +Adapter Resource )%0A%0Ad @@ -215,17 +215,16 @@ Resource -) %0A%0Adef ge
2e548989c11a745ac8df2f774e1d8479f63db8cb
clear previous session data
pqcom/pqcom_serial.py
pqcom/pqcom_serial.py
import serial from serial.tools import list_ports import threading import Queue import logging PARITY_DICT = {'None': serial.PARITY_NONE, 'Even': serial.PARITY_EVEN, 'Odd': serial.PARITY_ODD, 'Mask': serial.PARITY_MARK, 'Space': serial.PARITY_SPACE} def get_ports(): ports = [] f...
Python
0
@@ -1415,16 +1415,96 @@ ut=0.2)%0A + self.tx_queue.queue.clear()%0A self.rx_queue.queue.clear()%0A
fd4c7640cbc9add7ca141e1df9e9aa02dc97c1b5
Make password write only
application/auth/models.py
application/auth/models.py
from werkzeug.security import generate_password_hash from werkzeug.security import check_password_hash from application import db class User(db.Model): __tablename__ = 'users' email = db.Column(db.String(255), primary_key=True) _password = db.Column(db.String(255)) authenticated = db.Column(db.Boole...
Python
0.000003
@@ -685,28 +685,52 @@ r -eturn self._password +aise AttributeError(%22Password not readable%22) %0A%0A @@ -922,16 +922,17 @@ sh(self. +_ password
ec6c3c1e890d3e981b88a07c984842cc17c96762
Fix UTF-8 encoding error
press_sec_bot_plus.py
press_sec_bot_plus.py
#!/usr/bin/env python import sys from datetime import date from ConfigParser import SafeConfigParser, NoOptionError, NoSectionError from subprocess import Popen, PIPE from distutils.spawn import find_executable from tempfile import NamedTemporaryFile import twitter import jinja2 config_file='press_sec_bot_plus.conf' ...
Python
0.998998
@@ -2375,24 +2375,40 @@ e(input=html +.encode('utf-8') )%0A%0A outpu
a54a04c550ea7895f51ba59f5672ba81145a5cce
Add file header and module docstring for bridgedb.parse.versions.
lib/bridgedb/parse/versions.py
lib/bridgedb/parse/versions.py
from twisted.python import util as txutil class Version(txutil.Version): """Holds, parses, and does comparison operations for version numbers. :attr string major: The major version number. :attr string minor: The minor version number. :attr string micro: The micro version number. :attr string p...
Python
0
@@ -1,8 +1,753 @@ +# -*- coding: utf-8 ; test-case-name: bridgedb.test.test_parse_versions ; -*-%0A#%0A# This file is part of BridgeDB, a Tor bridge distribution system.%0A#%0A# :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 %3Cisis@torproject.org%3E%0A# please also see AUTHORS file%0A# :copyright: (c) 2014 Isis...
e6e1429b9e1c8b654f688b5ac2dd0681717d39ab
change SSH to HTTPS URIs and remove private repo from test
foolbox/tests/test_model_zoo.py
foolbox/tests/test_model_zoo.py
from foolbox import zoo import numpy as np import foolbox import sys import pytest from foolbox.zoo.model_loader import ModelLoader @pytest.fixture(autouse=True) def unload_foolbox_model_module(): # reload foolbox_model from scratch for every run # to ensure atomic tests without side effects module_names ...
Python
0
@@ -475,30 +475,76 @@ ata = %5B%0A -('git@ +# private repo won't work on travis%0A # ('https:// github.com:b @@ -533,33 +533,33 @@ tps://github.com -: +/ bethgelab/analys @@ -556,29 +556,27 @@ lab/ -a +A nalysis --by-s +ByS ynthesis -mod @@ -575,14 +575,8 @@ esis --model .git @@ -590,36 +590,40 @@ 28,...
ebc3990091c4d2290a01033761e484d788381309
add filtering of datasets
apps/datasetmanager/api.py
apps/datasetmanager/api.py
__author__ = 'fki' from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.request import Request from rest_framework import status from rest_framework import generics from .models import * from .serializers import * from .file_encoder import FileEncoder class Base(A...
Python
0.000002
@@ -983,16 +983,267 @@ wargs)%0A%0A + def get_queryset(self):%0A queryset = Dataset.objects.all()%0A indicator_id = self.request.GET.get('indicator_id', '')%0A%0A if indicator_id:%0A queryset = queryset.filter(indicator_id=indicator_id)%0A%0A return queryset%0A%0A %0Aclass D
999094fb90feee32c97ea61b0037ef130fb73149
Change in points scoreboard since it was not handling rounds properly.
apps/pages/status/views.py
apps/pages/status/views.py
# Create your views here. import datetime from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib.auth.decorators import user_passes_test from django.contrib.auth.models import User from django.conf import settings from django.db.models import Count from componen...
Python
0
@@ -1501,16 +1501,47 @@ __gt=0,%0A + round_name=round_name,%0A ).or
6c750b8c8df0cceb736488420f2813b4e62b39e9
fix typo in optimization
cea/plots/optimization/paretocurve_convergence.py
cea/plots/optimization/paretocurve_convergence.py
""" cehck perfromacne of pareto curve https://arxiv.org/pdf/1901.00577.pdf """ from __future__ import division from __future__ import print_function import json import plotly.graph_objs as go import cea.plots.optimization __author__ = "Jimeno Fonseca" __copyright__ = "Copyright 2018, Architecture and Building Syste...
Python
0.000199
@@ -638,18 +638,18 @@ = %22Perf -r o +r mance of
d9be748d10605e3efa648f299fd1b36e20570314
Add an ability to remove an asterisk symbol
apiDocAutocompletion.py
apiDocAutocompletion.py
# Sublime Text 3 Plugin # apiDocAutocompletion adds apiDoc tags to list of code completion suggestions. # Project: https://github.com/DWand/ST3_apiDocAutocompletion # License: MIT import sublime import sublime_plugin class apiDocAutocompletion(sublime_plugin.EventListener): _suggestions = [ ("@api\tapiDoc...
Python
0.000103
@@ -421,34 +421,39 @@ %7D $%7B2:%5Btitle%5D%7D%5Cn +$%7B3: * +%7D $%7B3:%5B @@ -441,33 +441,33 @@ * %7D $%7B -3 +4 :%5Bdescription%5D%7D%22 @@ -715,37 +715,42 @@ %7D $%7B2:%5Btitle%5D%7D%5Cn +$%7B3: * +%7D $%7B -3 +4 :example%7D%22),%0A @@ -818,21 +818,26 @@ title%7D%5Cn +$%7B3: * ...
40dd9dd2f85ac8fdc54d66e6278901f5b72e4631
Improve the error handler.
api_v3/views/support.py
api_v3/views/support.py
import rest_framework.exceptions import rest_framework.parsers import rest_framework.renderers import rest_framework.response import rest_framework.authentication import rest_framework.filters import rest_framework_json_api.metadata import rest_framework_json_api.parsers import rest_framework_json_api.renderers import ...
Python
0
@@ -385,16 +385,58 @@ i.utils%0A +import rest_framework_json_api.exceptions%0A import d @@ -498,16 +498,22 @@ import +(%0A HTTP_422 @@ -533,16 +533,40 @@ E_ENTITY +, HTTP_401_UNAUTHORIZED) %0Afrom qu @@ -4591,26 +4591,73 @@ -if isinstance(exc, +context = self.get_exception_handler_context()%0A ...
60c29aab1b0bd0ae237e023fe4587326f21daa47
Improve code of 'import_test'
website/tests/test_import_results.py
website/tests/test_import_results.py
""""Tests in this module should be pass after data import and fail before""" from database import bdb from database import make_snv_key from database import decode_csv from models import Protein def test_mappings(): """This is a simple inclusion test for genome -> proteme mutation mappigns. Knowing the data,...
Python
0.002134
@@ -161,16 +161,78 @@ ode_csv%0A +import app # this will take some time (stats initialization)%0A from mod @@ -597,27 +597,24 @@ %0A ((' -chr 17', '757293 @@ -665,19 +665,16 @@ ((' -chr 17', '19 @@ -729,19 +729,16 @@ ((' -chr 21', '40 @@ -795,19 +795,16 @@ ((' -chr 9', '125 @@ -842,16 +...
c596db8940c0ca95b746ed2ff2a26462296dedaf
Update test arg for default test file
testcases/cloud_user/ebs/vm_read_write_vol.py
testcases/cloud_user/ebs/vm_read_write_vol.py
#!/usr/bin/python import time,sys import argparse import os import select parser = argparse.ArgumentParser( prog='write_volume.py', description='write data to file to verify data integrity') parser.add_argument('-f', dest='testfile', help="file to read", default="/root/matt/testfile") parser.add_argument('-b', dest='...
Python
0
@@ -269,13 +269,8 @@ oot/ -matt/ test
e4c5aecf4b030ab1523d9d64646e1601aca3e385
Make computation of bound for phase estimation more efficient (#6231)
qiskit/algorithms/phase_estimators/phase_estimation_scale.py
qiskit/algorithms/phase_estimators/phase_estimation_scale.py
# This code is part of Qiskit. # # (C) Copyright IBM 2020. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
Python
0
@@ -6370,13 +6370,8 @@ d = -sum(%5B abs( @@ -6385,19 +6385,28 @@ um.coeff +) * +sum(abs( pauli.co @@ -6432,17 +6432,16 @@ auli_sum -%5D )%0A
174f6bdabd88c1a0a4103e3c48056f8b6a38beff
Add method to check if directory exists
pegasus/gtfar/s3.py
pegasus/gtfar/s3.py
# Copyright 2007-2014 University Of Southern California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
Python
0.000001
@@ -2115,16 +2115,216 @@ pass%0A%0A + def dir_exists(self, key):%0A key = key if key.endswith('/') else key + '/'%0A%0A files = self._bucket.list(key)%0A%0A for file in files:%0A return True%0A%0A return False%0A%0A def
82ac173a782637ba89bda7b20a7132d54947cd10
add birthday to json
pepper/api/views.py
pepper/api/views.py
from pepper.app import DB from pepper.users import User from flask import url_for, jsonify, request, Response import json, os, urllib from pepper import settings from pepper.utils import calculate_age def schedule(): SITE_ROOT = os.path.realpath(os.path.dirname(__file__)) json_url = os.path.join(SITE_ROOT, "../stati...
Python
0.002832
@@ -2617,16 +2617,40 @@ NFIRMED' +, birthday=user.birthday )%0A%09else:
2fe0353d0ad7f2afc87cd85c7dd1e1174112807d
Update cmd2 fix to still work with 0.6.7
cliff/tests/test_interactive.py
cliff/tests/test_interactive.py
# -*- encoding: utf-8 -*- # # 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 writin...
Python
0.000036
@@ -576,16 +576,29 @@ cense.%0A%0A +import cmd2%0A%0A from cli @@ -1374,17 +1374,16 @@ d define -s do_hist @@ -1385,32 +1385,408 @@ _history method%0A + # NOTE(dtroyer): Before release 0.7.0 do_hi was also defined so we need%0A # to account for that in the list of possible responses.%0A # ...
7e4d32fdbdadb8a331d13f28da1a003b2fe8acf6
Fix keepass importer csv errors
tests/test_importers/test_keepass_importer.py
tests/test_importers/test_keepass_importer.py
import pytest from passpie.importers.keepass_importer import KeepassImporter def test_keepass_importer_returns_false_when_csv_files_hasnt_expected_headers(mocker, mock_open): headers = reversed(['Group', 'Title', 'Username', 'Password', 'URL', 'Notes']) mocker.patch('passpie.importers.keepass_importer.csv.re...
Python
0.000001
@@ -299,36 +299,44 @@ eepass_importer. +unicode_ csv -. +_ reader',%0A @@ -762,28 +762,36 @@ mporter. +unicode_ csv -. +_ reader', return_ @@ -782,16 +782,33 @@ reader', +%0A return_ @@ -1216,36 +1216,44 @@ eepass_importer. +unicode_ csv -. +_ reader',%0A @@ -2107,12 +2107,20...
3271f2e6409aa753a8f619732544fa7fb36ff2f2
remove encode/decode from roscreate-pkg with Python 3 (#267)
tools/roscreate/src/roscreate/roscreatepkg.py
tools/roscreate/src/roscreate/roscreatepkg.py
# Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # 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...
Python
0
@@ -3625,16 +3625,17 @@ en(p, 'w +b ') as f: @@ -5047,79 +5047,8 @@ rr)%0A - if type(package) == str:%0A package = package.decode('utf-8')%0A
37a74b2b4b19282d892820983885003d42095130
disable algolia indexing
project/api/config.py
project/api/config.py
# Standard Library import os # Django from django.apps import AppConfig class ApiConfig(AppConfig): """Sets the configuration for the api app.""" name = 'api' def ready(self): import algoliasearch_django as algoliasearch import api.signals from .indexes import AwardIndex ...
Python
0.000001
@@ -392,32 +392,34 @@ ionIndex%0A + # from .indexes i @@ -613,16 +613,18 @@ %0A + # Person @@ -849,32 +849,34 @@ onIndex)%0A + # algoliasearch.r
e5051e1d21a7dfecb5194d34ed0df8c3d56647e7
change fallback canvas url to canvas.dev
ab_testing_tool/settings/local.py
ab_testing_tool/settings/local.py
from .base import * from logging.config import dictConfig ALLOWED_HOSTS = ['*'] EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' # For local development, allow setting a token in ENV_SETTINGS COURSE_OAUTH_TOKEN = SECURE_SETTINGS.get("course_oauth_token") INSTALLED_APPS += ('debug_toolbar', 'sslserve...
Python
0.000001
@@ -779,16 +779,15 @@ vas. -icommons +dev.tlt .har
c1335e241e4d39df1cd07b811f7ffd70ac923bdc
Fix broken tests
acapi/resources/acquiaresource.py
acapi/resources/acquiaresource.py
"""Generic Acquia Cloud API resource.""" from acapi.resources.acquiadata import AcquiaData class AcquiaResource(AcquiaData): """Acquia Cloud API resource.""" #: Valid properties for this resource object valid_keys = None def __getitem__(self, key): """Get the value of an object property."""...
Python
0.000555
@@ -394,24 +394,28 @@ lid_keys is +not None and key
12cf7d220408971509b57cb3a60f2d87b4a37477
Revert "Add support for server side authentication."
facebook_auth/models.py
facebook_auth/models.py
from uuid import uuid1 from django.conf import settings from django.contrib.auth import models as auth_models from django.db import models import facepy import simplejson from facebook_auth import utils class FacebookUser(auth_models.User): user_id = models.BigIntegerField(unique=True) access_token = models....
Python
0
@@ -1,61 +1,4 @@ -from uuid import uuid1%0A%0Afrom django.conf import settings%0A from @@ -937,294 +937,4 @@ s))%0A -%0A%0Adef get_auth_address(request, redirect_to, scope=''):%0A state = unicode(uuid1())%0A request.session%5B'state'%5D = state%0A return 'https://www.facebook.com/dialog/oauth?client_id=%25s&...
b88a7f03b43d8f2b1ceb34827295d37b7cd714e6
Implement UserToken manager class.
facebook_auth/models.py
facebook_auth/models.py
import json import logging from django.contrib.auth import models as auth_models from django.db import models import facepy from facebook_auth import utils logger = logging.getLogger(__name__) class FacebookUser(auth_models.User): user_id = models.BigIntegerField(unique=True) access_token = models.TextFiel...
Python
0
@@ -104,16 +104,50 @@ models%0A +from django.utils import timezone%0A import f @@ -1808,8 +1808,729 @@ tokens'%0A +%0A%0Aclass UserTokenManager(object):%0A @staticmethod%0A def insert_token(provider_user_id, token, expiration_date):%0A UserToken.objects.get_or_create(provider_user_id=provider_user_id,%...
48748ac4752aa32ee2ab3623155c6e417026de94
Use a relative path for the condor modules
factory/glideFactory.py
factory/glideFactory.py
# # Description: # This is the main of the glideinFactory # # Arguments: # $1 = poll period (in seconds) # $2 = advertize rate (every $2 loops) # $3 = glidein submit_dir # # Author: # Igor Sfiligoi (Sept 15th 2006) # import os import sys import time import glideFactoryConfig import glideFactoryLib import gli...
Python
0.000001
@@ -254,16 +254,43 @@ rt time%0A +sys.path.append(%22../lib%22)%0A%0A import g
17b247e195151dd6bdb7d0deb6c439cc68696783
fix tracing requirements
ambassador/tests/kat/t_tracing.py
ambassador/tests/kat/t_tracing.py
import json import pytest from typing import ClassVar, Dict, List, Sequence, Tuple, Union from kat.harness import sanitize, variants, Query, Runner from kat import manifests from abstract_tests import AmbassadorTest, HTTP from abstract_tests import MappingTest, OptionTest, ServiceType, Node, Test class TracingTest...
Python
0.000002
@@ -1894,16 +1894,22 @@ (%22url%22, +Query( %22http:// @@ -1937,16 +1937,17 @@ rvices%22) +) %0A%0A de
bc6bb8801f758fab3438dc19300abf8984b609de
Change Redis provider extra parameters logic
dbaas_zabbix/database_providers.py
dbaas_zabbix/database_providers.py
# -*- coding: utf-8 -*- from dbaas_zabbix.provider import ZabbixProvider import logging LOG = logging.getLogger(__name__) class DatabaseZabbixProvider(ZabbixProvider): def __init__(self, dbaas_api, zabbix_api): super(DatabaseZabbixProvider, self).__init__(dbaas_api, zabbix_api) self.main_clientg...
Python
0
@@ -5374,32 +5374,143 @@ bbixProvider):%0A%0A + def get_web_monitors_extra_parameters(self,):%0A return self.extra_parameters('create_web_monitors')%0A%0A def create_d @@ -5770,32 +5770,27 @@ = self.get_ -database +web _monitors_ex
a6c945550ea6da48c3cb102bdb27027b7248a461
Use the message length constant
commands/BoardGameGeekLookup.py
commands/BoardGameGeekLookup.py
import HTMLParser import xml.etree.ElementTree as ElementTree import requests from bs4 import BeautifulSoup from CommandTemplate import CommandTemplate from IrcMessage import IrcMessage import SharedFunctions import Constants class Command(CommandTemplate): triggers = ['boardgame'] helptext = "Searches info on th...
Python
0.000015
@@ -3196,11 +3196,36 @@ t = -295 +Constants.MAX_MESSAGE_LENGTH - l
4847f24829f7243f2c244a18644d018a29cca0f7
enable flop printing & logging at the beginning of train & test
detectron2/structures/instances.py
detectron2/structures/instances.py
# Copyright (c) Facebook, Inc. and its affiliates. import itertools from typing import Any, Dict, List, Tuple, Union import torch class Instances: """ This class represents a list of instances in an image. It stores the attributes of instances (e.g., boxes, masks, labels, scores) as "fields". All fiel...
Python
0
@@ -5362,32 +5362,121 @@ s%5B0%5D.image_size%0A + if not isinstance(image_size, torch.Tensor): # could be a tensor in tracing%0A for i in @@ -5496,16 +5496,20 @@ ts%5B1:%5D:%0A +
4a98f56f9f1436c9cd3609c22efa60383b953bd0
Include function description on timeout/retry
devil/devil/utils/timeout_retry.py
devil/devil/utils/timeout_retry.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A utility to run functions with timeouts and retries.""" # pylint: disable=W0702 import logging import threading import time from devil.utils import rer...
Python
0.000001
@@ -4627,16 +4627,56 @@ rgs = %7B%7D +%0A if not desc:%0A desc = func.__name__ %0A%0A num_ @@ -5357,35 +5357,8 @@ desc - if desc else func.__name__ )%0A @@ -5783,16 +5783,21 @@ ' +(%25s) Exceptio @@ -5805,19 +5805,12 @@ on -thread %25s ( +%25s, atte @@ -5821,17 +5821,16 @@ %25d of %25d -) : ...
65912d16ceee00a744bd92ae8ebd155d7a030c8b
Fix assets regexp
ass2m/plugins/assets.py
ass2m/plugins/assets.py
# -*- coding: utf-8 -*- # Copyright (C) 2011 Romain Bignon, Laurent Bachelier # # This file is part of ass2m. # # ass2m 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
@@ -1151,16 +1151,31 @@ e(r' -%5Cw+ +%5E%5B%5Cw%5C-%5D+(?: %5C. +%5B %5Cw -+ +%5C-%5D+)+$ ')%0A%0A
ddd54bc1ca104ac7e8b6e637f7bcacb136adb372
Remove abanding strategy for level3
jsk_2016_01_baxter_apc/node_scripts/work_order.py
jsk_2016_01_baxter_apc/node_scripts/work_order.py
#!/usr/bin/env python # -*- coding:utf-8 -*- import os.path as osp import sys import json import rospy from jsk_2015_05_baxter_apc.msg import WorkOrder, WorkOrderArray import jsk_apc2016_common from jsk_topic_tools.log_utils import jsk_logwarn import numpy as np def get_sorted_work_order(json_file, gripper, object_d...
Python
0.000001
@@ -4100,24 +4100,26 @@ inue%0A + # if len(bin_ @@ -4148,32 +4148,34 @@ # Level3%0A + # jsk_logwarn @@ -4250,32 +4250,34 @@ _=bin_))%0A + # continue%0A
008b272ccc27a5a0e50aae8c40a12a80f0684d6b
Fix crash with 'any' type for discover plugin on with some searches. fix #1369
flexget/utils/search.py
flexget/utils/search.py
""" Common tools used by plugins implementing search plugin api """ import re from difflib import SequenceMatcher from unicodedata import normalize from flexget.utils.titles.parser import TitleParser from flexget.utils.titles.movie import MovieParser from flexget.utils import qualities def clean_symbols(text...
Python
0.000001
@@ -1081,16 +1081,37 @@ .a = ''%0D +%0A self.b = ''%0D %0A%0D%0A d @@ -1235,20 +1235,26 @@ -pass +self.b = b %0D%0A%0D%0A
8b71efade7d549f16882851b96c9c1812b8c6368
add TimeVaryingInterp
complexism/agentbased/statespace/be/timeseries.py
complexism/agentbased/statespace/be/timeseries.py
import scipy.interpolate as ipl from complexism.element import Event, ScheduleTicker, Clock from ..modifier import GloRateModifier from .behaviour import ActiveModBehaviour __author__ = 'TimeWz667' __all__ = ['TimeVarying'] class TimeVarying(ActiveModBehaviour): def __init__(self, name, func, t_tar, dt): ...
Python
0.00005
@@ -216,16 +216,37 @@ Varying' +, 'TimeVaryingInterp' %5D%0A%0A%0Aclas
18977bca9e6d1b42e1d5c095e625438abd33a10a
Write the fit params into the header
14B-088/HI/analysis/rotation_curves/vrot_fit.py
14B-088/HI/analysis/rotation_curves/vrot_fit.py
import numpy as np from scipy.optimize import curve_fit from astropy.table import Table import os from astropy.io import fits import astropy.wcs as wcs import matplotlib.pyplot as p from galaxies import Galaxy ''' Fit Meidt+08 Eq. 5 (Eq. 1 Faber & Gallagher 79) ''' make_plot = False make_rotmodel = True def vcirc(...
Python
0.000001
@@ -2461,17 +2461,224 @@ l. 2008. -%22 + n=%7B0:.2f%7D+/-%7B1:.2f%7D, %22 %5C%0A %22Vmax=%7B2:.2f%7D+/-%7B3:.2f%7D km/s, %7B4:.2f%7D+/-%7B5:.2f%7D pix%22.%5C%0A format(pars%5B0%5D, np.sqrt(pcov%5B0, 0%5D), pars%5B1%5D, np.sqrt(pcov%5B1, 1%5D),%0A pars%5B2%5D, np.sqrt(pcov%5B2, 2%5D)) %0A ...
30322e79409de2ea0e1747deed44720fe2b24fd1
Fix minor issues and add a comment to the flag version
16B/pipeline4.6.0_custom/EVLA_Lband_RFI_flag.py
16B/pipeline4.6.0_custom/EVLA_Lband_RFI_flag.py
''' Several portions of the L-band have constant RFI that is unrecoverable. This is meant to be run in the pipeline environment to remove these regions before wasting time trying to find solutions. ''' from glob import glob import os from tasks import flagdata, flagmanager logprint("Starting EVLA_Lband_RFI_flag.p...
Python
0
@@ -1700,21 +1700,15 @@ ;31; -48;49; 69;70%22%0A + @@ -1827,16 +1827,19 @@ = %227:44~ +127 %22%0A%0A f @@ -1940,24 +1940,24 @@ kup=False)%0A%0A - flagmana @@ -2011,16 +2011,136 @@ own_RFI%22 +,%0A comment=%22Removal of constant L-band RFI in 16B. See %22%0A %22E...
64079b449d272fa1e06206c89ed1ba680cade50a
Fix kick message
discordbot/titanembeds/commands.py
discordbot/titanembeds/commands.py
class Commands(): def __init__(self, client, database): self.client = client self.database = database async def ban(self, message): serverid = message.server.id content = message.content.strip() if len(content.split()) == 2: await self.client.send_message(mes...
Python
0
@@ -1228,35 +1228,36 @@ scriminator) to -ban +kick a guest user.%5Cn @@ -1258,35 +1258,36 @@ ser.%5CnExample: %60 -ban +kick Titan#0001%60%22)%0A
7271fc8a7ba44feacea38b7e8d5a1974845670cb
Add compliance with rule E261 to import.py.
zerver/management/commands/import.py
zerver/management/commands/import.py
from __future__ import absolute_import from __future__ import print_function from optparse import make_option from django.core.management import call_command from django.core.management.base import BaseCommand, CommandParser from django.db import connection from django.conf import settings from zerver.models import ...
Python
0
@@ -585,16 +585,17 @@ l = Any + # TODO:
b116eaa48594fbbc762a910442d8d7bafc1c2907
Clarify in docs that end_play affects all hosts (#40235)
lib/ansible/modules/utilities/helper/meta.py
lib/ansible/modules/utilities/helper/meta.py
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Ansible, a Red Hat company # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
Python
0
@@ -2444,16 +2444,53 @@ the host +(s). Note that this affects all hosts .%22%0A
e75bafa43908d9f66f94ffae1393f18c9262f5a1
Add basic test for get_all_certs_keys IInstaller interface method.
letsencrypt-postfix/TestPostfixConfigGenerator.py
letsencrypt-postfix/TestPostfixConfigGenerator.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import io import logging import unittest import Config import PostfixConfigGenerator as pcg logger = logging.getLogger(_...
Python
0
@@ -491,16 +491,189 @@ rg%22%22%22%0A%0A%0A +certs_only_config = %22%22%22%0Asmtpd_tls_cert_file = /etc/letsencrypt/live/www.fubard.org/fullchain.pem%0Asmtpd_tls_key_file = /etc/letsencrypt/live/www.fubard.org/privkey.pem%0A%22%22%22%0A%0A%0A def GetF @@ -1053,16 +1053,86 @@ %0A + self.fopen_certs_only...
049e87babd4d7bca7667973ffb8aae6e20aa5a59
Delete code probably making the test invalid
infrastructure/tests/test_data_import.py
infrastructure/tests/test_data_import.py
from django.test import TestCase, Client, override_settings, TransactionTestCase from django.conf import settings from django.urls import reverse from io import BytesIO from django.contrib.auth.models import User from django.contrib.admin.sites import AdminSite from django_q.models import OrmQ from django_q.tasks impor...
Python
0.00001
@@ -3789,39 +3789,8 @@ un() -%0A raise ValueError() %0A%0A
a040736c7e5278733249776dd07421f1de364271
Manage exception
backend/lib/Acquisition.py
backend/lib/Acquisition.py
# coding: utf-8 import serial import time import datetime import logging from DbConnector import DbConnector class Acquisition(object): def __init__(self): """ Constructor """ self._StopRequested = False self._PreviousTime = datetime.datetime.now() ...
Python
0.000001
@@ -1696,17 +1696,95 @@ except -: + Exception as e:%0D%0A logging.error(%22Can't open serial: %7B0%7D%22.format(e)) %0D%0A
640a059f1240ca35082991a87ecf996d7a031b16
Update documentation
platoai/__init__.py
platoai/__init__.py
import os import json from platoai.push_request import PushRequest import gql from platoai.transport import HttpTransport import platoai.auth class Client(object): """Plato AI API client. Args: url (str, optional): The URL for the API. """ def __init__(self, url=None, token=None, timeout=None)...
Python
0
@@ -136,16 +136,17 @@ i.auth%0A%0A +%0A class Cl @@ -187,16 +187,17 @@ client.%0A +%0A Args @@ -190,32 +190,32 @@ ent.%0A%0A Args:%0A - url (str @@ -248,16 +248,154 @@ he API.%0A + token (str, optional): The JWT authenticating this Client to the API.%0A timeout (int, optional): The t...
29e1c2382d0da3be4d1ef985a61371216be98e54
add vendors
django_extended/emailing/models.py
django_extended/emailing/models.py
# encoding: utf-8 import datetime import operator import hashlib import urllib import random import re from django.conf import settings from django.db import models from django.conf import settings from django.contrib import auth, messages from django.contrib.sites.models import Site from django.contrib.auth import ge...
Python
0
@@ -4107,178 +4107,8 @@ e)%0A%0A - # TODO replace mailchimp var on self.template%0A template = clean_html_for_email(self.template)%0A template = set_mailchimp_vars(template)%0A%0A @@ -4403,24 +4403,29 @@ html = +self. template %0A%0A @@ -4416,16 +4416,68 @@ template +...
beaec5ced03575ac82ce6874ab2d840f69985f4a
C2 should be a list
plugins/androrat.py
plugins/androrat.py
from templates import Plugin class Androrat(Plugin): NAME = 'Androrat' def recon(self): for cls in self.dvm.get_classes(): if 'Lmy/app/client/ProcessCommand;'.lower() in cls.get_name().lower(): self.process_class = cls return True return False d...
Python
0.999456
@@ -1479,17 +1479,19 @@ %7B'c2': +%5B server +%5D %7D%0A%0A
9b72ccaf065aa90437a6f9cdadb8753d1d2e7cae
Update comment routine on detail get template
django_mongoengine/views/detail.py
django_mongoengine/views/detail.py
from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from django.utils.encoding import smart_str from django.utils.translation import ugettext as _ from django.views.generic.base import TemplateResponseMixin, View from django_mongoengine.forms.utils import get_document_options from ...
Python
0
@@ -5725,20 +5725,20 @@ plates/_ -form +type s.html%0A
5aaf6ff87be02fc371e92bca2f24ac7c95019609
Fix referencing the wrong expression
corehq/apps/userreports/expressions/date_specs.py
corehq/apps/userreports/expressions/date_specs.py
import datetime import calendar from dateutil.relativedelta import relativedelta from dimagi.ext.jsonobject import JsonObject from jsonobject.base_properties import DefaultProperty from corehq.apps.userreports.expressions.getters import transform_date, transform_int, \ transform_datetime from corehq.apps.userrepor...
Python
0.999435
@@ -3742,24 +3742,25 @@ self. +_ from_express @@ -3790,24 +3790,25 @@ self. +_ to_expressio @@ -3913,16 +3913,17 @@ me(self. +_ from_exp @@ -3987,16 +3987,17 @@ me(self. +_ to_expre
1be9d41d061ff587288867cada468b97e640319c
Improve and update MetaVal tool-info module
benchexec/tools/metaval.py
benchexec/tools/metaval.py
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import argparse import benchexec.tools.template import re import threading from benchexec...
Python
0
@@ -281,16 +281,31 @@ port re%0A +import pathlib%0A import t @@ -361,16 +361,81 @@ seTool2%0A +from benchexec.tools.template import UnsupportedFeatureException%0A %0A%0Aclass @@ -1121,16 +1121,25 @@ s()) + %5B +%0A %22VERSION @@ -1143,16 +1143,66 @@ ION.txt%22 +,%0A %22metaval.py%22,%0A %2...
71b9aea356f02b439fd4452888aed5160ebdbdf9
repair fixture after #3203
lino_cosi/lib/products/fixtures/furniture.py
lino_cosi/lib/products/fixtures/furniture.py
# -*- coding: UTF-8 -*- # Copyright 2009-2019 Rumma & Ko Ltd # License: BSD (see file COPYING for details) from __future__ import unicode_literals from lino.utils.instantiator import Instantiator from lino_xl.lib.products.choicelists import ProductTypes from lino.api import dd def objects(): productcat = Inst...
Python
0
@@ -741,16 +741,15 @@ pes. -services +default , **
f8b1750a8ae9594b791022606c2540d6d1108d23
fix typo : test was always false
beyond/propagators/base.py
beyond/propagators/base.py
from abc import ABCMeta, abstractmethod from datetime import timedelta from collections.abc import Iterable from ..dates import Date from ..orbits.listeners import Speaker class Propagator(Speaker, metaclass=ABCMeta): """Base class for propagators """ orbit = None @abstractmethod def _iter(self...
Python
0.999999
@@ -2567,22 +2567,20 @@ if -%22 stop -%22 is None
35364552d7aa56ad103132f3b62a852b0ff7b485
use boot timeout option for testimage
lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py
lib/python2.7/site-packages/autobuilder/buildsteps/RunSanityTests.py
''' Created on Jan 10, 2013 __author__ = "Elizabeth 'pidge' Flanagan" __copyright__ = "Copyright 2012-2013, Intel Corp." __credits__ = ["Elizabeth Flanagan"] __license__ = "GPL" __version__ = "2.0" __maintainer__ = "Elizabeth Flanagan" __email__ = "elizabeth.flanagan@intel.com" ''' from buildbot.steps.shell import S...
Python
0
@@ -1779,32 +1779,127 @@ onf/auto.conf;%22%0A + command = command + %22echo 'TEST_QEMUBOOT_TIMEOUT = %5C%221500%5C%22' %3E%3E ./conf/auto.conf;%22%0A if s
c6c2febcf32d2316baf41b55d23162eb06253ea4
Delete duplicate versioneer section
audiorename/__init__.py
audiorename/__init__.py
# -*- coding: utf-8 -*- """Rename audio files from metadata tags.""" import os from audiorename.args import parser from .batch import Batch from ._version import get_versions __version__ = get_versions()['version'] del get_versions def execute(args=None): args = parser.parse_args(args) args.path = os.path....
Python
0
@@ -605,97 +605,4 @@ e()%0A -%0Afrom ._version import get_versions%0A__version__ = get_versions()%5B'version'%5D%0Adel get_versions%0A
38ae039fbd74a6b3d87bb15a4286f68ef222be82
Rename "Password" to "New password"
authentication/forms.py
authentication/forms.py
from django import forms class LoginForm(forms.Form): username = forms.CharField(max_length=100, label="Username", widget=forms.TextInput(attrs={'placeholder': 'Username'})) password = forms.CharField(max_length=100, ...
Python
0.999202
@@ -882,32 +882,36 @@ 'placeholder': ' +New Password'%7D))%0A @@ -1120,32 +1120,36 @@ 'placeholder': ' +New Password'%7D))%0A%0A%0Ac
1a639b4f6401bfb05b1bb2aefe961f7a09c9299b
Fix keyword argument name
crestify/views/apiservice.py
crestify/views/apiservice.py
# -*- coding: utf-8 -*- from flask import request from crestify import api, redis, hashids from flask.ext.restful import Resource, reqparse from crestify.models import Bookmark, User, Tag, db from crestify.services import bookmark from crestify.tasks import bookmark_tasks from functools import wraps import shortuuid im...
Python
0.998551
@@ -4246,32 +4246,33 @@ user +_ id=userid, tags= @@ -4453,16 +4453,17 @@ user +_ id=useri
7388a8f19baa6178b09c6a47c567f2013836824c
Update mimikittenz.py
lib/modules/powershell/credentials/mimikittenz.py
lib/modules/powershell/credentials/mimikittenz.py
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module that will appear in module menus 'Name': 'Invoke-Mimikittenz', # list of one...
Python
0.000001
@@ -1101,20 +1101,19 @@ Safe' : -Fals +Tru e,%0A
4805c7d7bc97ae4fc1b44e6dbd3626bfe5bd0ff9
fix favouriting own bookmark
bookmarks/api/favourites.py
bookmarks/api/favourites.py
from flask import request, jsonify, url_for, g from flask.views import MethodView from flask_login import login_required from flask_smorest import Blueprint, abort from bookmarks import csrf from bookmarks.models import Bookmark, Favourite from bookmarks.logic import _save, _unsave from .schemas import FavouriteSchem...
Python
0.000001
@@ -1081,9 +1081,9 @@ _id -! += = g.
01c5021dbbe1a7ab20d13bf6c82e23eab69a11f1
Check for raw before checking if item is nil.
backend/mcapi/dmutil.py
backend/mcapi/dmutil.py
import json import error import rethinkdb as r from flask import g from args import add_all_arg_options, json_as_format_arg, add_pluck_when_fields from mcexceptions import RequiredAttributeException, DatabaseError def get_required(what, d): if what not in d: print "get_required not found: %s" % (what) ...
Python
0
@@ -1877,16 +1877,50 @@ %0A if +raw:%0A return item%0A elif not item @@ -2025,42 +2025,8 @@ e))%0A - elif raw:%0A return item%0A
0dc2140d645d94d585fa8e3e5d189cd776574d28
Fix to avoid db migration failure in virtualenv
nova/db/sqlalchemy/migrate_repo/versions/012_add_ipv6_flatmanager.py
nova/db/sqlalchemy/migrate_repo/versions/012_add_ipv6_flatmanager.py
# Copyright (c) 2011 NTT. # 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 appl...
Python
0
@@ -868,16 +868,131 @@ vices.%0A# +%0Ainstances = Table('instances', meta,%0A Column('id', Integer(), primary_key=True, nullable=False),%0A ) %0A%0A#%0A# Ta
45e8082bf7c6b1099feaf79d4cfe928b269b2227
Check if local file size is less than expected size before trying to download
calaccess_raw/management/commands/downloadcalaccessrawdata.py
calaccess_raw/management/commands/downloadcalaccessrawdata.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Download the latest CAL-ACCESS database ZIP. """ from __future__ import unicode_literals import os import logging import requests from datetime import datetime from hurry.filesize import size from clint.textui import progress from django.conf import settings from django...
Python
0
@@ -5600,24 +5600,171 @@ ion.save()%0A%0A + # check if local zip file is already completely downloaded before trying%0A if self.local_file_size %3C self.version.expected_size:%0A self
b8cfcf00729395aad65f9d5b16a87da422a01666
Divide long int by a long int
calaccess_raw/management/commands/downloadcalaccessrawdata.py
calaccess_raw/management/commands/downloadcalaccessrawdata.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Download the latest CAL-ACCESS database ZIP. """ from __future__ import unicode_literals import os import logging import requests from datetime import datetime from hurry.filesize import size from clint.textui import progress from django.conf import settings from django...
Python
0.99996
@@ -7061,16 +7061,21 @@ size) / +long( chunk_si @@ -7080,16 +7080,17 @@ size + 1 +) %0A
f7cd4ebd0a3663ceecdf8d1db3bea4aa420129cd
Add betasigma to iam fake simualtion
bin/iam_fake_full_stack.py
bin/iam_fake_full_stack.py
import argparse import os import logging from joblib import Parallel, delayed import simulators from bin.coadd_analysis_script import main as anaylsis_main from bin.coadd_chi2_db import main as db_main from simulators.fake_simulator import main as fake_generator from simulators.iam_script import main as iam_script_mai...
Python
0.998221
@@ -3293,24 +3293,40 @@ e=area_scale +, betasigma=True )%0A fo
72fc1d570fb7fed2995e200532010cebfe762701
Update stock_picking_out_report.py
eln_reports/report/stock_picking/stock_picking_out_report.py
eln_reports/report/stock_picking/stock_picking_out_report.py
# -*- coding: utf-8 -*- # Copyright 2019 El Nogal - Pedro Gómez <pegomez@elnogal.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import registry from datetime import datetime def parser(cr, uid, ids, data, context): parameters = {} name = '' model = 'stock.picking' d...
Python
0.000001
@@ -1911,24 +1911,40 @@ 'prod_name': + move_id.name or product_id.
09a62c743ba386475addc580dc215ff1f363a333
raise TokensExhausted when maximum ShortUrl objects are reached
brevisurl/backends/local.py
brevisurl/backends/local.py
import string import random import logging from django.contrib.sites.models import Site from django.core.urlresolvers import reverse import brevisurl.settings from brevisurl.backends.base import BaseBrevisUrlBackend from brevisurl.models import ShortUrl log = logging.getLogger(__name__) class BrevisUrlBackend(Bas...
Python
0
@@ -286,16 +286,59 @@ ame__)%0A%0A +class TokensExhausted(Exception):%0A pass%0A %0Aclass B @@ -2220,16 +2220,158 @@ digits)%0A + if ShortUrl.objects.count %3E= chars ** size:%0A raise TokensExhausted('Consider incrementing the token length or chars list')%0A @@ -2631,12 +2631,13 @@ r...
b9965c21c053e7338e92e43ecc3b42e344ae5777
Make default headers a field of the InfluxDBWriter class
kafka_influxdb/writer/influxdb_writer.py
kafka_influxdb/writer/influxdb_writer.py
# -*- coding: utf-8 -*- import logging import influxdb import sys import requests class InfluxDBWriter(object): def __init__(self, host, port, user, password, dbname, retention_policy=None, time_precision=None): """ Initialize InfluxDB writer """ self.retention_policy = retention_...
Python
0.000001
@@ -208,24 +208,137 @@ sion=None):%0A + DEFAULT_HEADERS = %7B%0A 'Content-type': 'application/octet-stream',%0A 'Accept': 'text/plain'%0A %7D%0A %22%22%22%0A @@ -676,16 +676,60 @@ dbname%7D%0A + self.headers = self.DEFAULT_HEADERS%0A
56923dda1ae075d990e7fc36f6598d71dfd9c8fa
Fix import error for Django 1.4
batch_requests/views.py
batch_requests/views.py
''' @author: Rahul Tanwani @summary: A module to perform batch request processing. ''' import json from django.core.urlresolvers import resolve from django.http.response import HttpResponse, HttpResponseBadRequest,\ HttpResponseServerError from django.template.response import ContentNotRenderedError from django....
Python
0.000251
@@ -156,25 +156,16 @@ ngo.http -.response import
e4b679afd6c7a43450faa668ba6454389935a668
remove sensor
app/sensors/__init__.py
app/sensors/__init__.py
""" Include the sensor modules that you have created here. Kervi will load the sensors that are imported here. """ from . import my_sensor from . import system_sensors
Python
0.000002
@@ -113,16 +113,17 @@ %0D%0A %22%22%22%0D%0A +# from . i
9a7d48aa33f266e71ab7a5aa51f30939077d3bb3
fix return value if not spikein fasta files
bcbio/rnaseq/spikein.py
bcbio/rnaseq/spikein.py
"""Function to counts on the fly the spike in sequences given as a parameter in the yaml file""" import os import sys import pandas as pd # from bcbio.rnaseq import sailfish import bcbio.pipeline.datadict as dd from bcbio.utils import (file_exists, safe_makedir, is_gzipped, partition, rbind) import bcbio.utils as util...
Python
0.000002
@@ -826,16 +826,12 @@ urn -%5B%5B data -%5D%5D %0A
4378aef47a7e2b80a4a22af2bbe69ce4b780ab6d
Fix due to Flask-Login version up
pokr/views/login.py
pokr/views/login.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- from flask import g, render_template, redirect, request, url_for from flask.ext.login import current_user, login_required, logout_user from social.apps.flask_app.template_filters import backends def register(app): @login_required @app.route('/done/') def ...
Python
0
@@ -754,12 +754,8 @@ and -not user @@ -763,18 +763,20 @@ is_a -nonymous() +uthenticated %0A
fd529fd38d8d36af02f4555619e3cfb5326b24d8
improve internal image selection
postcards_random.py
postcards_random.py
#!/usr/bin/env python # encoding: utf-8 from postcards import Postcards import urllib from util.random_search_term.random_search_term import get_random_search_term from bs4 import BeautifulSoup import json import urllib.request, urllib.error, urllib.parse import random import sys class PostcardsBingRandom(Postcards)...
Python
0.000001
@@ -756,17 +756,16 @@ _args):%0A -%0A @@ -774,17 +774,16 @@ gs = %5B%5D%0A -%0A @@ -1067,17 +1067,17 @@ .error(' -N +n o images @@ -1124,16 +1124,49 @@ xit(1)%0A%0A + if cli_args.keyword:%0A @@ -1194,16 +1194,123 @@ mgs)%5B2%5D%0A + else:%0A img = imgs%5B...
13c5d813b1f6ea2c401e3b16ceadf876b7fc6202
Bump version
postgresql_audit.py
postgresql_audit.py
import re from contextlib import contextmanager from weakref import WeakSet import sqlalchemy as sa from sqlalchemy.dialects.postgresql import HSTORE, INET from sqlalchemy.ext.compiler import compiles from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.schema import CreateTable __version__ = '0.1...
Python
0
@@ -314,17 +314,17 @@ = '0.1. -1 +2 '%0A%0A%0A@com
30aadaced337cbe01ed58041d76b5976d61b948d
Remove superfluous test setup after zeit.cms got smarter
src/zeit/campus/browser/tests/test_article.py
src/zeit/campus/browser/tests/test_article.py
import zeit.campus.testing import zeit.cms.testing import zeit.content.article.testing class StudyCourseTest(zeit.cms.testing.BrowserTestCase): layer = zeit.campus.testing.LAYER def test_study_course_can_be_edited(self): with zeit.cms.testing.site(self.getRootFolder()): with zeit.cms.tes...
Python
0
@@ -230,123 +230,8 @@ f):%0A - with zeit.cms.testing.site(self.getRootFolder()):%0A with zeit.cms.testing.interaction():%0A @@ -275,24 +275,16 @@ e'%5D = (%0A - @@ -334,24 +334,16 @@ icle())%0A - @@ -402,32 +402,24 @@ - - self...
8560139ce4380226a72c776023045faf801a2cc0
Add missing user id constant
app/soc/mapreduce/convert_user.py
app/soc/mapreduce/convert_user.py
#!/usr/bin/python2.5 # # Copyright 2012 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 applicable...
Python
0.000097
@@ -1034,16 +1034,52 @@ second'%0A +MISSING_USER_ID = 'missing_user_id'%0A IGNORED_
1c8de2450313843bba360b98814def4555608917
Update stuffaboutcode_bridge.py
mcpipy/stuffaboutcode_bridge.py
mcpipy/stuffaboutcode_bridge.py
#!/usr/bin/env python #www.stuffaboutcode.com #Raspberry Pi, Minecraft - auto bridge # mcpipy.com retrieved from URL below, written by stuffaboutcode # http://www.stuffaboutcode.com/2013/02/raspberry-pi-minecraft-auto-bridge.html #import the minecraft.py module from the minecraft directory from .. import minecraft f...
Python
0
@@ -287,31 +287,28 @@ rectory%0A -from .. import +mcpi. minecraf @@ -312,23 +312,42 @@ raft -%0Afrom .. import + as minecraft%0Aimport mcpi.block as blo @@ -2395,8 +2395,9 @@ ep(0.01) +%0A
71089e9cf1fd991fbcd2cccd906448c3d9bde13e
Update win_batch_md2ipynb.py
build/win_batch_md2ipynb.py
build/win_batch_md2ipynb.py
import glob import nbformat import notedown import os from subprocess import check_output import sys import time def mkdir_if_not_exist(path): if not os.path.exists(os.path.join(*path)): os.makedirs(os.path.join(*path)) # timeout for each notebook, in sec timeout = 20 * 60 # the files wi...
Python
0.000002
@@ -757,16 +757,29 @@ 'build', + 'win_ipynb', in_md%5B:
d015c90f06b3b8413955ebaac3ec828d4517c2d1
upgrade java to 1.9.64 (#78)
appengine/variables.bzl
appengine/variables.bzl
"""This file is a central location for configuring new SDK versions. """ # Not all languages are released for every SDK version. Whenever possible, set # ${LANG}_SDK_VERSION = APPENGINE_VERSION. APPENGINE_VERSION = "1.9.63" SDK_URL_PREFIX = "https://storage.googleapis.com/appengine-sdks/featured" JAVA_SDK_SHA256 = "4...
Python
0
@@ -214,17 +214,17 @@ = %221.9.6 -3 +4 %22%0A%0ASDK_U @@ -316,72 +316,72 @@ = %22 -477eb0bdec2c98fa68e4d0d9cbd1329c140e907fa64be2c3c9c065373369e93b +8eb229a6f2a1d6dbe4345ba854b7388c77abfd64af1f9fc8bdd1316811b2f8fc %22%0A%0AJ
b84ce75ab4c88e69ba6978761e5cfcae9f872b10
add basic auth to config
application/settings.py
application/settings.py
# -*- coding: utf-8 -*- import os os_env = os.environ class Config(object): SECRET_KEY = os_env.get('APPLICATION_SECRET', 'secret-key') # TODO: Change me APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir)) BCRYPT_LOG_...
Python
0.000001
@@ -32,28 +32,8 @@ os%0A%0A -os_env = os.environ%0A %0Acla @@ -74,12 +74,16 @@ = os -_ +. env +iron .get @@ -389,32 +389,218 @@ , %22redis%22, etc.%0A + BASIC_AUTH_FORCE = os.environ.get('BASIC_AUTH_FORCE')%0A BASIC_AUTH_USERNAME = os.environ.get('BASIC_AUTH_USERNAME')%0A BASIC_AUTH_PASSWORD = os.environ...
4c85062284537195d411119d2dba7f07f1c27e02
Support uploads with offset other than 0
bepasty/views/upload.py
bepasty/views/upload.py
# Copyright: 2013 Bastian Blank <bastian@waldi.eu.org> # License: BSD 2-clause, see LICENSE for details. import collections from flask import abort, current_app, jsonify, redirect, request, url_for from flask.views import MethodView from ..utils.name import ItemName from . import blueprint class ContentRange(colle...
Python
0
@@ -1484,78 +1484,327 @@ et=0 -):%0A # Copy data from temp file into storage%0A while True: +, size_input=None):%0A %22%22%22%0A Copy data from temp file into storage.%0A %22%22%22%0A read_length = 16*1024%0A size_written = 0%0A%0A while True:%0A if si...
22d5752a3663765fe5c16c3e12d37c5f66434020
Fix off by one error.
proxy/data/ships.py
proxy/data/ships.py
import socket import io import struct import time from twisted.internet import reactor from twisted.internet.endpoints import TCP4ServerEndpoint from twisted.python import log from config import bindIp as interface_ip import blocks blockShipList = { 12100: "210.189.208.1", 12200: "210.189.208.16", 1230...
Python
0
@@ -2279,16 +2279,17 @@ pIndex %3E += len(que
98622b9db80cb1c5670bbc77b49b5ca88a76b497
fix split
bin/full_map_any_sky.py
bin/full_map_any_sky.py
#!/usr/bin/env python import sys import os import numpy as N from pylab import * import matplotlib.pyplot as P import matplotlib.patches as mpatches def readmulticolumn(f,names,types): for line in f: line=line.strip() if line.startswith('#') or len(line)==0: continue items=...
Python
0.000001
@@ -1425,29 +1425,8 @@ - split=mra%3E360+ra_min %0A @@ -1466,14 +1466,8 @@ min) -&split %0A
68a574d6a81b7e9d151fba78fb5531a85ee7bec0
Check Content-Type header returned from RPC server
bitcoinrpc/authproxy.py
bitcoinrpc/authproxy.py
""" Copyright 2011 Jeff Garzik AuthServiceProxy has the following improvements over python-jsonrpc's ServiceProxy class: - HTTP connections persist for the life of the AuthServiceProxy object (if server supports HTTP/1.1) - sends protocol 'version', per JSON-RPC 1.1 - sends proper, incrementing 'id' ...
Python
0.000024
@@ -6671,24 +6671,314 @@ server'%7D)%0A%0A + content_type = http_response.getheader('Content-Type')%0A if content_type != 'application/json':%0A raise JSONRPCException(%7B%0A 'code': -342, 'message': 'non-JSON HTTP response with %5C'%25i %25s%5C' from server' %25 (http_response...
6f0a28810acd28a0a680d82761216f7fe5518076
Remove the log transform stub. Will add it back in later if needed.
bokeh/models/transforms.py
bokeh/models/transforms.py
''' ''' from __future__ import absolute_import from ..core.enums import StepMode, JitterRandomDistribution from ..core.properties import abstract from ..core.properties import Either, Enum, Float, Instance, Seq, String, Tuple from ..model import Model from .sources import ColumnDataSource @abstract class Transform(M...
Python
0
@@ -2347,280 +2347,8 @@ s%0A%0A%0A -class LogInterpolator(Interpolator):%0A ''' Compute a log interpolation between the points given by %60%60values%60%60.%0A%0A '''%0A base = Float(default=10, help=%22%22%22%0A Base value for the logorithm. For example, if base = 10, then that would imply log_10.%0A %...