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
dc333069f4536fdc978d76924b098d10a1a8a50a
Fix error on status for last line in file.
ruby_coverage_status.py
ruby_coverage_status.py
import os import sublime import sublime_plugin import json import re from .common.json_coverage_reader import JsonCoverageReader STATUS_KEY = 'ruby-coverage-status' class RubyCoverageStatusListener(sublime_plugin.EventListener): """Show coverage statistics in status bar.""" def on_load(self, view): ...
Python
0
@@ -1630,16 +1630,69 @@ _number%5D + if len(coverage%5B'coverage'%5D) %3E line_number else None %0A
d00a12acee4f0709a81287d925577928f8d8dcda
Fix SymbiFlow tool prefix
edalize/symbiflow.py
edalize/symbiflow.py
import logging import os.path import platform import re import subprocess from edalize.edatool import Edatool from edalize.yosys import Yosys from importlib import import_module logger = logging.getLogger(__name__) """ Symbiflow backtend A core (usually the system core) can add the following files: - Standard desi...
Python
0
@@ -4207,52 +4207,8 @@ st'%0A - toolchain_prefix = 'symbiflow_'%0A @@ -4368,205 +4368,8 @@ ffix -%0A # Newest Quicklogic toolchain release do not have any toolchain_prefix%0A # if if will change in the future this variable should be adjusted.%0A toolchain_prefix = '' ...
921bdcc5d6f6ac4be7dfd0015e5b5fd6d06e6486
Raise exception when --debug is specified to main script
runcommands/__main__.py
runcommands/__main__.py
import sys from .config import RawConfig, RunConfig from .exc import RunCommandsError from .run import run, partition_argv, read_run_args from .util import printer def main(argv=None): try: all_argv, run_argv, command_argv = partition_argv(argv) cli_args = run.parse_args(RawConfig(run=RunConfig()...
Python
0
@@ -181,16 +181,33 @@ =None):%0A + debug = None%0A try: @@ -207,16 +207,16 @@ try:%0A - @@ -411,24 +411,95 @@ e(cli_args)%0A + debug = run_args.get('debug', run.parameters%5B'debug'%5D.default)%0A run. @@ -636,24 +636,24 @@ **run_args)%0A - except R @@ -676,16 +676,201 @@ ...
5ca0e0683a663271c40d728e5f88ee19a26eca61
Add ProfileSummary to defaults
devserver/settings.py
devserver/settings.py
DEVSERVER_MODULES = ( 'devserver.modules.sql.SQLRealTimeModule', 'devserver.modules.cache.CacheSummaryModule', ) # This variable gets set to True when we're running the devserver DEVSERVER_ACTIVE = False
Python
0
@@ -61,24 +61,80 @@ Module',%0A + 'devserver.modules.profile.ProfileSummaryModule',%0A # 'devserver.
0bbe7b5d349ba0d3e4113933d6582246874f3bb6
Rearrange admin headings
dexter/admin/admin.py
dexter/admin/admin.py
from dexter.models import db, Document, Entity, Medium, DocumentType, Topic, Fairness, Individual, User from flask.ext.admin import Admin, expose, AdminIndexView from flask.ext.admin.contrib.sqla import ModelView from flask.ext.admin.model.template import macro from wtforms.fields import SelectField, TextAreaField, Tex...
Python
0.00001
@@ -5093,198 +5093,8 @@ '))%0A -admin_instance.add_view(DocumentView(Document, db.session, name=%22Articles%22, endpoint='document'))%0Aadmin_instance.add_view(EntityView(Entity, db.session, name=%22Entities%22, endpoint='entity'))%0A admi @@ -5443,23 +5443,19 @@ , name=%22 -Fairnes +Bia s%22, endp @@ -5464,15 +546...
75ac453e873727675ba18e1f45b5bc0cfda26fd7
Increment the version number
angel/__init__.py
angel/__init__.py
__title__ = 'angel' __version__ = '0.0.1' __author__ = 'Bugra Akyildiz' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Bugra Akyildiz'
Python
0.999999
@@ -32,17 +32,17 @@ = '0.0. -1 +2 '%0A__auth
c39d6494d1bc27dedb2141970cdd7a51382f0af4
Update version 0.5.0.dev1 -> 0.5.0
dimod/package_info.py
dimod/package_info.py
__version__ = '0.5.0.dev1' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.'
Python
0
@@ -17,13 +17,8 @@ .5.0 -.dev1 '%0A__
ff504057223cd71f8ebbb7e7a53dc7982a9422a8
Add stream logger config convenience function
boto3/__init__.py
boto3/__init__.py
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
Python
0
@@ -1085,16 +1085,895 @@ wargs)%0A%0A +def set_stream_logger(name='boto3', level=logging.DEBUG, format_string=None):%0A %22%22%22%0A Add a stream handler for the given name and level to the logging module.%0A By default, this logs all boto3 messages to %60%60stdout%60%60.%0A%0A %3E%3E%3E import boto3%0...
c88d5b0935f9cba8b3d76face5cf40098ef5a87b
Move difference file to build directory
preprint/latexdiff.py
preprint/latexdiff.py
#!/usr/bin/env python # encoding: utf-8 """ Command for running latexdiff. """ import logging import os import subprocess import codecs import git from preprint.textools import inline, inline_blob, remove_comments from preprint.gittools import read_git_blob from cliff.command import Command class Diff(Command): ...
Python
0
@@ -130,16 +130,30 @@ codecs%0A +import shutil%0A import g @@ -678,14 +678,12 @@ ult= -%22diff%22 +None ,%0A @@ -1029,16 +1029,166 @@ aster)%0A%0A + if parsed_args.name is None:%0A name = %22HEAD_%7B0%7D%22.format(parsed_args.prev_commit)%0A else:%0A name = parsed_args.name%0...
608e9a878b56115c914be517980d1fbaae8bb7eb
edit preprocess
preprocess_markers.py
preprocess_markers.py
#!/usr/lib/python from subprocess import call import random ''' compress those makers that are very close into a single marker which is present! ''' def bin_makers(mapfile, min_len, output_file, heteros_gt): print '1 cycle...' f1 = open(mapfile) all_lines = f1.readlines() f2 = open(output_file, 'w') ...
Python
0.000001
@@ -3911,26 +3911,27 @@ en(' -binned_markers.txt +preprocess_bin.info ', '
3e6508e4036def376f1a41943499a30f034e665c
Fix __sub__
rwrtrack/core/record.py
rwrtrack/core/record.py
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import aliased from sqlalchemy.orm.exc import NoResultFound from sqlalchemy.ext.hybrid import hybrid_property from .db import DeclarativeBase, sesh from .derivedstats import DerivedStats from .exceptions import NoRecordError class Record(...
Python
0.00023
@@ -2750,16 +2750,21 @@ ord(date +=date , accoun @@ -2771,52 +2771,119 @@ t_id -, username, xp, time_played, +=account_id, username=username, xp=xp, time_played=time_played,%0A kills= kills, +deaths= deaths, kill @@ -2878,16 +2878,28 @@ deaths, +kill_streak= kill_str @@ -2914,32 +2914,50 @...
7b071f3ccacd87f6dcb0e9a570d8ce386dbf7a4f
change FULLNAME to AUTHOR_FULLNAME
pelicanconf.py
pelicanconf.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals AUTHOR = u'jchen' FULLNAME = u'Jon Chen' SITENAME = u'BURRITO 4 LYFE' SITEURL = '' TIMEZONE = 'ETC/UTC' DEFAULT_LANG = u'en' CSS_FILE = 'style.css' # theme stuff THEME = './theme' # plugins PLUGIN_PATH = './plugins' PLUGINS = ...
Python
0.999663
@@ -100,16 +100,23 @@ 'jchen'%0A +AUTHOR_ FULLNAME
15a889dd91d0530e2ded5ed343b33296a9950c5a
Add link to license of tree_pp.
penchy/util.py
penchy/util.py
""" This module provides miscellaneous utilities. .. moduleauthor:: Fabian Hirschmann <fabian@hirschm.net> .. moduleauthor:: Michael Markert <markert.michael@googlemail.com> :copyright: PenchY Developers 2011-2012, see AUTHORS :license: MIT License, see LICENSE """ from __future__ import print_function import ha...
Python
0
@@ -1554,16 +1554,58 @@ sclaimer +, see http://effbot.org/zone/copyright.htm .%0Adef tr
a3c582df681aae77034e2db08999c89866cd6470
Refactor earth mover's distance implementation
utilities.py
utilities.py
import collections def each(function, iterable): for item in iterable: function(item) def each_unpack(function, iterable): for item in iterable: function(*item) def minmax(*args): min = None max = None for x in args: if max < x: max = x if x > min: min = x return min, max ...
Python
0
@@ -1027,35 +1027,46 @@ -key_set = self.viewkeys() %7C +return sum(%0A (abs(self.get(bin) - com @@ -1077,178 +1077,54 @@ _to. -viewkeys()%0A%0A currentEMD = 0%0A lastEMD = 0%0A totaldistance = 0%0A%0A for key in key_set:%0A lastEMD = currentEMD%0A currentEMD = (self.get(key, 0) + las...
49151e5c490f1111e4de82aa2d6215e927e03cca
Make get_search_state dynamic for SearchHighlighter.
prompt_toolkit/layout/highlighters.py
prompt_toolkit/layout/highlighters.py
""" Highlighters for usage in a BufferControl. Highlighters are very similar to processors, but they are applied after the BufferControl created a screen instance. (Instead of right before creating the screen.) Highlighters can't change the content of the screen, but they can mark regions (start_pos, end_pos) as highl...
Python
0
@@ -2472,16 +2472,168 @@ state.%0A + :param get_search_state: (Optional) Callable that takes a%0A CommandLineInterface and returns the SearchState to be used for the highlighting.%0A %22%22%22%0A @@ -2709,16 +2709,56 @@ H_BUFFER +,%0A get_search_state=None ):%0A @@ -2864,16 +2864...
f7b964b2ce42d8c5cb6707cd571cca5eeadb2ff7
Implement feedback on final state of firmware
confluent_server/confluent/firmwaremanager.py
confluent_server/confluent/firmwaremanager.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2017 Lenovo # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
Python
0
@@ -872,16 +872,29 @@ %0A + completion = handler @@ -940,16 +940,83 @@ ogress)%0A + if completion is None:%0A completion = 'complete'%0A @@ -1051,26 +1051,26 @@ phase': -' complet -e' +ion , 'progr
d4f2e9edf2b07cc224dbccc12e583a4bef2429dc
Load config directly in save_last_tweet
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 from io import BytesIO import twitter import jinja2 from PIL import I...
Python
0.000001
@@ -669,16 +669,8 @@ eet( -config, twee @@ -675,16 +675,43 @@ eet_id): +%0A config = load_config() %0A if @@ -4734,23 +4734,8 @@ eet( -load_config(), late
26cb100e7e4782cdc4d7a55f6a096a9da2db2b5c
fix bug 1495003: add search to GraphicsDeviceAdmin
webapp-django/crashstats/crashstats/admin.py
webapp-django/crashstats/crashstats/admin.py
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.admin.models import LogEntry, ADDITION, CHANGE, DELETION from crashstats.crashstats.models import ( GraphicsDevice, Signature, ) # Fix the Django Admin User list display so it shows the columns we care about ...
Python
0
@@ -1837,16 +1837,135 @@ '%0A %5D%0A + search_fields = %5B%0A 'vendor_hex',%0A 'adapter_hex',%0A 'vendor_name',%0A 'adapter_name'%0A %5D%0A %0A%0A@admin @@ -2104,16 +2104,64 @@ rst_date'%0A %5D%0A + search_fields = %5B%0A 'signature'%0A %5D%0A
5ac72b84f943b30523b915bc1afd4432760513b1
Add a better __repr__ for syscalls
simuvex/procedures/syscalls/handler.py
simuvex/procedures/syscalls/handler.py
import simuvex import simuvex.s_cc import logging l = logging.getLogger('simuvex.procedures.syscalls') # TODO: per-OS and per-arch syscall_map = { } syscall_map['AMD64'] = { } syscall_map['AMD64'][60] = 'exit' syscall_map['AMD64'][0] = 'read' syscall_map['AMD64'][1] = 'write' syscall_map['AMD64'][2] = 'open' syscall_...
Python
0.999329
@@ -929,16 +929,45 @@ de-init%0A + self.callname = None%0A @@ -1683,201 +1683,8 @@ gc'%0A - elif self.state.arch.name == 'X86':%0A # FIXME: THIS IS A GIANT QUICK HACK FOR CGC SCORED EVENT 1!%0A map_name = 'CGC'%0A syscall_lib = 'cgc'%0A @@...
912729a30f619ac4aa3ac8edbfc751fffb146256
Make port explicit in configuration so that it is more clear how to change to MySQL
appengine/flexible/django_cloudsql/mysite/settings.py
appengine/flexible/django_cloudsql/mysite/settings.py
# Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
0.000003
@@ -3112,24 +3112,200 @@ password%3E',%0A + # For MySQL, set 'PORT': '3306' instead of the following. Any Cloud%0A # SQL Proxy instances running locally must also be set to tcp:3306.%0A 'PORT': '5432',%0A %7D%0A%7D%0A# In
da15aa46a6906dda35e80111a873b6dbbc12dcef
Define properties
turbustat/statistics/scf/scf.py
turbustat/statistics/scf/scf.py
# Licensed under an MIT open source license - see LICENSE import numpy as np from ..psds import pspec class SCF(object): ''' Computes the Spectral Correlation Function of a data cube (Rosolowsky et al, 1999). Parameters ---------- cube : numpy.ndarray Data cube. size : int, opt...
Python
0.000214
@@ -676,32 +676,33 @@ e%0A%0A self. +_ scf_surface = No @@ -697,32 +697,245 @@ surface = None%0A%0A + @property%0A def scf_surface(self):%0A return self._scf_surface%0A%0A @property%0A def scf_spectrum(self):%0A return self._scf_spectrum%0A%0A @property%0A def lags(self):%0A ...
0d2079b1dcb97708dc55c32d9e2c1a0f12595875
Replace string substitution with string formatting
salt/runners/launchd.py
salt/runners/launchd.py
# -*- coding: utf-8 -*- ''' Manage launchd plist files ''' # Import python libs import os import sys def write_launchd_plist(program): ''' Write a launchd plist for managing salt-master or salt-minion CLI Example: .. code-block:: bash salt-run launchd.write_launchd_plist salt-master ''...
Python
0.001018
@@ -339,19 +339,19 @@ _text = -%22%22%22 +''' %0A%3C?xml v @@ -769,11 +769,11 @@ -%22%22%22 +''' .str @@ -902,17 +902,17 @@ r.write( -%22 +' Supporte @@ -927,16 +927,24 @@ ms: -%25r%5Cn%22 %25 +%7B0!r%7D%5Cn'.format( supp @@ -958,16 +958,17 @@ rograms) +) %0A
b89a469a051f3844b90028182742d3dad36271ae
Format args
processors/slurper.py
processors/slurper.py
import os import json import datetime import time import requests import sqlalchemy as sa import logging import boto from boto.s3.key import Key from io import BytesIO from processors.config import DB_CONN, AWS_KEY, AWS_SECRET, S3_BUCKET, \ CARTODB_SETTINGS from processors.poll import poll class Slurper(object): ...
Python
0.000045
@@ -6976,32 +6976,38 @@ %7Btable%7D'.format( +table= CARTODB_SETTINGS
d967505ea9db8af0286abe1959a8fcba556b2d7a
add setting the slave of a specified master on a sentinel
salt/states/redismod.py
salt/states/redismod.py
# -*- coding: utf-8 -*- ''' Management of Redis server ========================== .. versionadded:: 2014.7.0 :depends: - redis Python module :configuration: See :py:mod:`salt.modules.redis` for setup instructions. .. code-block:: yaml key_in_redis: redis.string: - value: string data The redis s...
Python
0.000001
@@ -659,16 +659,28 @@ ycat%0A''' +%0Aimport copy %0A%0A__virt @@ -3071,24 +3071,1696 @@ = %5Bname%5D%0A return ret%0A +%0A%0Adef slaveof(name, sentinel_host=None, sentinel_port=None, sentinel_password=None, **connection_args):%0A '''%0A Set this redis instance as a slave.%0A %0A name%0A Master ...
73f9703abc355f91fb4c4530f73d9310cb501b99
bring in line with changes to OneSampleIterator
lib/neuroimaging/algorithms/onesample.py
lib/neuroimaging/algorithms/onesample.py
import os, types import numpy as N from neuroimaging import traits from neuroimaging.core.image.image import Image, ImageSequenceIterator from neuroimaging.algorithms.statistics import onesample from neuroimaging.algorithms.statistics.regression import RegressionOutput class ImageOneSample(onesample.OneSampleIterato...
Python
0
@@ -314,16 +314,34 @@ Iterator +, traits.HasTraits ):%0A %0A @@ -3652,32 +3652,39 @@ (self):%0A +return onesample.OneSam @@ -4276,16 +4276,17 @@ f.path)%0A +%0A
75d9f6339ad7c7cd92bd268277979aa444cd4b59
Normalized the unicode lemma
dnnwsd/corpus/base.py
dnnwsd/corpus/base.py
# -*- coding: utf-8 -*- import os import unicodedata _tokens_with_symbols = { u"ee.uu.": u"EEUU", u"estados_unidos": u"EEUU", u"u.s.a.": u"USA", u"sr.": u"sr", u"sra.": u"sra", u"srta.": u"srta", u"a.m.": u"am", u"p.m.": u"pm" } class Word(object): def __init__(self, token, tag=...
Python
0.999994
@@ -3478,38 +3478,68 @@ self.lemma = + unicodedata.normalize(%22NFC%22, lemma +) %0A self._s
a2fff1b9613d6c4349fea5001313bf9e0d1cc052
remove unnecessary import
pergenie/lib/utils/demo.py
pergenie/lib/utils/demo.py
from uuid import uuid4 from datetime import timedelta from django.core.management.base import BaseCommand, CommandError from django.db import models, transaction from django.utils import timezone from django.conf import settings from apps.authentication.models import User from apps.genome.models import Genome from li...
Python
0.000037
@@ -52,116 +52,8 @@ ta%0A%0A -from django.core.management.base import BaseCommand, CommandError%0Afrom django.db import models, transaction%0A from
be7e89bf4a6c784963b43052264ec0a6346c7958
correct tests
pgmpy/tests/test_Factor.py
pgmpy/tests/test_Factor.py
import unittest from pgmpy.Factor import Factor from pgmpy.tests import help_functions as hf from collections import OrderedDict import numpy.testing as np_test import numpy as np from pgmpy import Exceptions class TestFactorInit(unittest.TestCase): def test_class_init(self): phi = Factor(['x1', 'x2', 'x...
Python
0.00001
@@ -45,25 +45,8 @@ tor%0A -from pgmpy.tests impo
a2a6b336295e65d29881e83ba45e1758c4582bbb
add available filters
corehq/apps/reports/standard/users/reports.py
corehq/apps/reports/standard/users/reports.py
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy from memoized import memoized from corehq.apps.reports.datatables import DataTablesColumn, DataTablesHeader from corehq.apps.reports.dispatcher import UserManagementReportDispatcher from corehq.apps.reports.generic i...
Python
0
@@ -380,16 +380,31 @@ d import + DatespanMixin, Project @@ -406,24 +406,85 @@ ojectReport%0A +from corehq.apps.reports.util import datespan_from_beginning%0A from corehq. @@ -546,16 +546,31 @@ yReport( +DatespanMixin, GenericT @@ -784,16 +784,24 @@ Do: Add +pending filters%0A @@ -818,118 +818,376 @@ = %5B...
e1f6e98d7e3a1840567b1b5e379f87ec1e0aa9dc
add two more views
connector8/__openerp__.py
connector8/__openerp__.py
# -*- coding: utf-8 -*- {'name': 'Connector8', 'version': '0.1', 'author': 'Openerp Connector Core Editors and Amdeb', 'license': 'AGPL-3', 'category': 'Generic Modules', 'description': """ This is a port of OCA connector to Odoo 8.0 """, 'depends': ['mail' ], 'data': ['security/connector_security....
Python
0
@@ -465,32 +465,94 @@ oint_view.xml',%0A + 'connector_menu.xml',%0A 'setting_view.xml',%0A 'res_p
7369244fbfcda67e1b14ebedd9fb9467fe5d8870
Update module list wizard should not miss search view of Modules
bin/addons/base/module/wizard/wizard_update_module.py
bin/addons/base/module/wizard/wizard_update_module.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
Python
0
@@ -1958,22 +1958,30 @@ -return +%0A res = %7B%0A @@ -2241,17 +2241,283 @@ %7D%0A -%0A + %0A search_view_id = pooler.get_pool(cr.dbname).get('ir.ui.view').search(cr, uid, %5B('name','=','ir.module.module.list.select')%5D, context=context)%0A if search_view_id:%0A ...
199f0f3e8e02f53f570e5463cc4350568771395f
Refactor tasks.py
edx_shopify/tasks.py
edx_shopify/tasks.py
from celery import Task from celery.utils.log import get_task_logger from .models import Order, OrderItem from .utils import auto_enroll_email logger = get_task_logger(__name__) class ProcessOrder(Task): """ Process order creation event. """ def run(self, data): logger.debug('Processing ord...
Python
0
@@ -212,76 +212,544 @@ %22%22%22 -%0A Process order creation event.%0A%0A +Process a newly received order, and enroll learners in courses%0A using their email address.%0A%0A On failure, store the order in an ERROR state.%0A %22%22%22%0A%0A def __init__(self):%0A %22%22%22Set up an order as an in...
fe96f6539b40a880e88f7efe8502279cea1de506
update test
corehq/apps/accounting/tests/test_model_validation.py
corehq/apps/accounting/tests/test_model_validation.py
from datetime import date from django.core.exceptions import ValidationError from django.test import TransactionTestCase from corehq.apps.accounting.models import ( BillingAccount, CreditAdjustment, Invoice, LineItem, Subscriber, Subscription, ) from corehq.apps.accounting.tests import generat...
Python
0.000001
@@ -74,52 +74,8 @@ rror -%0Afrom django.test import TransactionTestCase %0A%0Afr @@ -771,32 +771,108 @@ objects.create(%0A + name='Test Account',%0A created_by='test@example.com',%0A curr
7c46287f7f7b0b18d671dc91e69668961c98adee
update test_flake8
_unittests/ut_module/test_flake8.py
_unittests/ut_module/test_flake8.py
""" @brief test log(time=0s) """ import sys import os import unittest import warnings try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "..", ".."))) if path not ...
Python
0.000001
@@ -920,25 +920,25 @@ extended_ref -e +a ctoring%0A%0A%0Acl
8129477b704e75bd90288aa4a672d55237bb8263
Use local memory cache instead of Memcached
election/settings.py
election/settings.py
""" Django settings for election project. Generated by 'django-admin startproject' using Django 1.9.2. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os ...
Python
0.000001
@@ -461,59 +461,8 @@ ))%0A%0A -MEMCACHED_HOST = os.environ.get('MEMCACHED_HOST')%0A%0A %0A# Q @@ -1115,155 +1115,35 @@ %0A%5D%0A%0A -# Only add cache-related middleware if the MEMCACHED_HOST env var is set.%0AMIDDLEWARE_CLASSES = %5B%5D%0Aif MEMCACHED_HOST:%0A MIDDLEWARE_CLASSES.append( +MIDDLEWARE_CLASSES = %5B%...
767b18237f0c8c4c3ead2b298ecfefcf90155a4b
update and clean up FM and WM.
agility/oodt/workflow.py
agility/oodt/workflow.py
# 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 # "License"); you may not u...
Python
0
@@ -804,13 +804,8 @@ rom -oodt_ meta
c2f3ca6c2e3c2810b3c881e09cc613bfe15e598c
Fix up some small coding errors
alerts/geomodel_alert.py
alerts/geomodel_alert.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at https://mozilla.org/MPL/2.0/. # Copyright (c) 2015 Mozilla Corporation import json import os import sys import traceback from...
Python
0.999999
@@ -1435,16 +1435,8 @@ err -.message ))%0A%0A @@ -1594,16 +1594,74 @@ (filter( +%0A lambda state: state is not None,%0A map(loca
4f040d1d7730ee611f0c4a6768ecc181c6a43ff7
Fix broken view test for select seats
karspexet/ticket/tests/test_views.py
karspexet/ticket/tests/test_views.py
# coding: utf-8 from django.shortcuts import reverse from django.test import TestCase, RequestFactory from django.utils import timezone from karspexet.show.models import Show, Production from karspexet.ticket import views from karspexet.venue.models import Venue, SeatingGroup import pytest class TestHome(TestCase)...
Python
0.000001
@@ -2200,10 +2200,12 @@ how. -id +slug %5D))%0A
e57e4152229132c9a8a8a13bf0904b58f7edf6f8
Update send_email.py
keepercommander/custom/send_email.py
keepercommander/custom/send_email.py
# _ __ # | |/ /___ ___ _ __ ___ _ _ ® # | ' </ -_) -_) '_ \/ -_) '_| # |_|\_\___\___| .__/\___|_| # |_| # # Keeper Commander # Copyright 2022 Keeper Security Inc. # Contact: commander@keepersecurity.com # # Example code to retrieve the password for a record # stored in the vault. This example also pull...
Python
0.000001
@@ -237,65 +237,211 @@ to r -etrieve the password for a record%0A# stored in the vault. +un a BreachWatch status report for %0A# all users, and send users an email reminder to address their %0A# found issues. SMTP credentials must be supplied via a vault record%0A# in order to send the mail. %0A# %0A# Thi
14f0ed32b62e2d00443e99428516a2d17a68bc58
Use COMPLEX_TEST_STRING for testing
coalib/tests/processes/communication/LogMessageTest.py
coalib/tests/processes/communication/LogMessageTest.py
""" This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT...
Python
0.000001
@@ -678,16 +678,72 @@ mport _%0A +from coalib.misc.StringConstants import StringConstants%0A from coa @@ -1447,35 +1447,43 @@ e = -%22test message %C3%A4nd umlauts!%22 +StringConstants.COMPLEX_TEST_STRING %0A @@ -1574,52 +1574,66 @@ %7B%7D%5D -test message %C3%A4nd umlauts!%22.format(_(%22ERROR%22) +%7B%7D%22...
d02e8ce821edbdcd0fa3409b82650f2f72dae29d
support None
chainercv/links/model/sequential_feature_extractor.py
chainercv/links/model/sequential_feature_extractor.py
import chainer class SequentialFeatureExtractor(chainer.Chain): """A feature extractor model with a single-stream forward pass. This class is a base class that can be used for an implementation of a feature extractor model. Callabel objects, such as :class:`chainer.Link` and :class:`chainer.Func...
Python
0.000075
@@ -2231,16 +2231,48 @@ = list() +%0A self.layer_names = None %0A%0A de @@ -2852,37 +2852,90 @@ -layer_names = self._order%5B-1%5D +self._return_tuple = False%0A self._layer_names = None%0A return %0A%0A @@ -3665,16 +3665,157 @@ %22%22%22%0A + if self._layer_names ...
7cbf46b1c44791b6a1466b08e049b568d32cf2d3
fix soil.tests.test_download_base:TestBlobDownload
corehq/ex-submodules/soil/tests/test_download_base.py
corehq/ex-submodules/soil/tests/test_download_base.py
from __future__ import absolute_import from __future__ import unicode_literals from io import BytesIO from uuid import uuid4 from django.test import TestCase from soil import BlobDownload from soil.util import expose_blob_download from corehq.blobs.tests.util import new_meta, TemporaryFilesystemBlobDB class TestBlo...
Python
0.000001
@@ -1015,16 +1015,17 @@ ntent), +b 'content @@ -1517,16 +1517,17 @@ ntent), +b 'legacy-
e09e53d289b555487167a5800865cb727d10c0c2
use relative path (still hardcoded) change default number of iterations.
planck_dust_correlation.py
planck_dust_correlation.py
import astropy.units as u import healpy as hp import numpy as np import numpy.random as random import numpy.random.mtrand from astropy.coordinates import SkyCoord, Longitude, Latitude from mpi4py import MPI from mpi_helper import r_print comm = MPI.COMM_WORLD def angular_distance(ar1, ar2): theta1, phi1 = hp.pi...
Python
0
@@ -853,31 +853,18 @@ ap(%22 -/Users/yishay/Downloads +../../data /COM @@ -4368,16 +4368,17 @@ arange(1 +0 ):%0A%0A
b15450fb774b8c6dbb1b1c181555b29f5846bc40
test mqttclient
ambulances/mqttupdate.py
ambulances/mqttupdate.py
import atexit, sys, os, time from rest_framework.parsers import JSONParser from rest_framework.renderers import JSONRenderer from .mqttclient import BaseClient, MQTTException from .models import client, Ambulance, Equipment, \ HospitalEquipment, Hospital from .serializers import AmbulanceSerializer, HospitalSer...
Python
0.000001
@@ -705,128 +705,8 @@ %0A - def publish(self, topic, message, *vargs, **kwargs):%0A self.client.publish(topic, message, *vargs, **kwargs)%0A%0A
c3367eaa7bccf5843abd12a438e14518d533cdbe
Allow API on Windows
platformio_api/__init__.py
platformio_api/__init__.py
# Copyright 2014-present Ivan Kravets <me@ikravets.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
Python
0.000001
@@ -643,31 +643,8 @@ os%0A -from time import tzset%0A %0A%0AVE @@ -1617,11 +1617,76 @@ 0%22%0At -zset() +ry:%0A from time import tzset%0A tzset()%0Aexcept ImportError:%0A pass %0A
7169cbb9aff103854cad7e8167446c56c7bcc5f4
Revise to internal helper function _findKth()
lc004_median_of_two_sorted_arrays.py
lc004_median_of_two_sorted_arrays.py
"""Leetcode 4. Median of Two Sorted Arrays Hard There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). You may assume nums1 and nums2 cannot be both empty. Example 1: nums1 = [1, 3] nums2 = [2] The ...
Python
0.000804
@@ -440,569 +440,9 @@ def -findMedianSortedArrays(self, nums1, nums2):%0A %22%22%22%0A :type nums1: List%5Bint%5D%0A :type nums2: List%5Bint%5D%0A :rtype: float%0A%0A Time complexity: O(log(m + n))%0A Space complexity: O(1)%0A %22%22%22%0A l = len(nums1) + len(n...
dc743c63c52c7ef0bcab73d7b4fcf8f3f4a54ea6
make median transmittance optional in plot_mean_transmittance.
plot_mean_transmittance.py
plot_mean_transmittance.py
import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import host_subplot import common_settings import mean_transmittance import median_transmittance lya_center = 1215.67 settings = common_settings.Settings() def do_plot(): m = mean_transmittance.MeanTransmittance.from_file(settings.get_mean_transmitta...
Python
0.000001
@@ -213,16 +213,52 @@ tings()%0A +enable_median_transmittance = False%0A %0A%0Adef do @@ -356,24 +356,342 @@ ance_npy())%0A + ar_z, mean = m.get_weighted_mean_with_minimum_count(1)%0A # low_pass_mean = m.get_low_pass_mean()%5B1%5D%0A%0A fig = plt.figure(figsize=(14, 10))%0A ax1 = fig.add_subplot(2, 1, 1)...
4173221d72356fc336be63273a7252c81831fd54
fix datetime_to_string
ephim/utils.py
ephim/utils.py
from datetime import datetime import string def to_base(num, b, numerals=string.digits + string.ascii_lowercase): return ((num == 0) and numerals[0]) or (to_base(num // b, b, numerals).lstrip(numerals[0]) + numerals[num % b]) def datetime_to_string(dt: datetime): delta = dt - datetime.fromtimestamp(0) ...
Python
0.004109
@@ -291,16 +291,19 @@ atetime. +utc fromtime
a4e14854339cc8f0677e32390d9a974266007c01
Refactor, split into functions
django_smoke_tests/management/commands/smoke_tests.py
django_smoke_tests/management/commands/smoke_tests.py
from django.core.management import BaseCommand, call_command try: from django.urls import get_resolver except ImportError: from django.core.urlresolvers import get_resolver from ...tests import SmokeTests def _test_generator(url, method, detail_url=False): def test(self): if method == 'GET': ...
Python
0.999773
@@ -1,24 +1,53 @@ +import random%0Aimport string%0A%0A from django.core.managem @@ -239,16 +239,420 @@ Tests%0A%0A%0A +class Command(BaseCommand):%0A help = %22Smoke%22%0A%0A METHODS_TO_TEST = %5B'GET', 'POST', 'DELETE'%5D%0A%0A def handle(self, *args, **options):%0A%0A all_endpoints = get_resolver(No...
f96cb9a60882bc19fef5f7b3be4a8063f2e99fa2
Add exception handling to scheduler start experiment
api/spawner/scheduler.py
api/spawner/scheduler.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import json import uuid from django.conf import settings from polyaxon_schemas.utils import TaskType from rest_framework import fields from api.utils import config from experiments.serializers import ExperimentJobSerializer fr...
Python
0.000001
@@ -95,16 +95,31 @@ rt json%0A +import logging%0A import u @@ -122,16 +122,16 @@ rt uuid%0A - %0Afrom dj @@ -155,16 +155,64 @@ settings +%0Afrom kubernetes.client.rest import ApiException %0A%0Afrom p @@ -372,16 +372,59 @@ rializer +%0Afrom repos.dockerize import get_image_info %0A%0Afrom s @@ -550,16 +550,66 @...
58ab8c5ebafad2109b8d8f19c44adbb11fe18c02
Fix broken or_else implementation
pygow/maybe.py
pygow/maybe.py
class Just: a = None def __init__(self, a): self.a = a def __eq__(self, other): return (isinstance(other, self.__class__) and self.a == other.a) def __ne__(self, other): return not self.__eq__(other) def __str__(self): return 'Just(%s)' % self.a def is...
Python
0.000003
@@ -451,32 +451,36 @@ self.a)%0A def +get_ or_else(self, x) @@ -492,32 +492,34 @@ return self +.a %0A def get_or_ @@ -503,36 +503,32 @@ self.a%0A def -get_ or_else(self, x) @@ -548,18 +548,16 @@ urn self -.a %0A%0Aclass @@ -903,32 +903,36 @@ thing()%0A def +get_ or_else(self, x) @@ -948,...
e185f187b6d8188e05f763fb2627a3fa9757cca6
Add untranslate
emoticry/emoticry.py
emoticry/emoticry.py
#!/usr/bin/python # -*- coding: utf-8 -*- import os """emoticry.emoticry This file contains the bulk of logic for the emoticry library. """ class Translation(object): """ A generic Translation class for translating filenames. By default Translates names into hex. """ def __init__(self, table=[...
Python
0.000204
@@ -598,16 +598,228 @@ ew_name%0A + %0A def untranslate(self, name):%0A new_name = ''%0A for c in name:%0A if len(c) == 1:%0A new_name += chr(self.table.index(c))%0A else:%0A new_name += c%0A %0A%0Aemoji_
2aca9f77b6f5b8171ec33906a66cd805f57937a0
Fix mistake with previous commit.
localeurl/templatetags/localeurl_tags.py
localeurl/templatetags/localeurl_tags.py
# Copyright (c) 2008 Joost Cassee # Licensed under the terms of the MIT License (see LICENSE.txt) from django import template from django.template import Node, Token, TemplateSyntaxError from django.template import resolve_variable, defaulttags from django.template.defaultfilters import stringfilter from django.conf i...
Python
0.999999
@@ -405,24 +405,47 @@ utils import + is_locale_independent, strip_local @@ -453,16 +453,26 @@ _prefix, + %5C%0A get_lan @@ -663,24 +663,59 @@ ix.%0A %22%22%22%0A + stripped_path = rmlocale(path)%0A if not l @@ -836,38 +836,37 @@ return -rmlocale( +stripped_ path -) %0A if is_l @@ -8...
ce339d471b5f9a15ac666c968cd8c191e6cf21ee
Check if schedule is str instance
pyup/config.py
pyup/config.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import yaml try: # pragma: no cover basestring except NameError: # pragma: no cover basestring = str import re SCHEDULE_REGEX = re.compile( # has to begin with every r"^every " # followed by day/mont...
Python
0.00001
@@ -5153,32 +5153,79 @@ schedule(self):%0A + if isinstance(self.schedule, str):%0A return S @@ -5263,43 +5263,41 @@ ule) - if type(self.schedule) == str else +%0A else:%0A return Non
f18d675f2877e8f9356dc64a96bf8fba364cddd3
Add search field to admin Terms.
controlled_vocabularies/admin.py
controlled_vocabularies/admin.py
from django.contrib import admin from django import forms from controlled_vocabularies.models import Vocabulary, Term, Property class PropertyInline(admin.TabularInline): model = Property fk_name = "term_key" extra = 1 class VocabularyAdmin(admin.ModelAdmin): """ Vocabulary class that determines how...
Python
0
@@ -785,24 +785,62 @@ , 'order',)%0A + search_fields = %5B'name', 'label'%5D%0A fieldset
5e6fc92bd627cb30d59929a91122301314554989
use .xml instead of .atom as a file extension
createCatalogBySubject.py
createCatalogBySubject.py
#!/usr/bin/env python #Copyright(c)2009 Internet Archive. Software license GPL version 3. """ This script creates a set of OPDS catalog files in Atom format from a CSV file. """ import csv import os import sys import datetime import codecs, cStringIO import xml.etree.ElementTree as ET # You can customize these: pub...
Python
0
@@ -2834,20 +2834,19 @@ tle + '. -atom +xml '%0A li
d68f3251c7605220da13a308ebc794a35a0c12e6
This is 0.9.1
rb/__init__.py
rb/__init__.py
""" rb ~~ The redis blaster. :copyright: (c) 2015 Functional Software Inc. :license: Apache License 2.0, see LICENSE for more details. """ from rb.cluster import Cluster from rb.clients import RoutingClient, MappingClient, FanoutClient from rb.router import BaseRouter, ConsistentHashingRouter, Par...
Python
0.999998
@@ -378,17 +378,13 @@ = ' -1.0.dev.0 +0.9.1 '%0A%0A_
726f24cf2f4a62196ba6c13d129cbb13cf9a248e
Update tutorial_mnist_mlp_static.py
examples/basic_tutorials/tutorial_mnist_mlp_static.py
examples/basic_tutorials/tutorial_mnist_mlp_static.py
import time import numpy as np import tensorflow as tf import tensorlayer as tl from tensorlayer.layers import Dense, Dropout, Input from tensorlayer.models import Model ## enable debug logging tl.logging.set_verbosity(tl.logging.DEBUG) ## prepare MNIST data X_train, y_train, X_val, y_val, X_test, y_te...
Python
0.000001
@@ -692,32 +692,16 @@ its=800, -%0D%0A act=tf. @@ -718,90 +718,8 @@ n) -# in_channels is optional in this case as it can be inferred by the previous layer %0D%0A @@ -775,32 +775,16 @@ its=800, -%0D%0A act=tf. @@ -799,92 +799,8 @@ (nn) - # in_channels is optional in this case as...
d3677042d17d3bc641c84981d5332f7fd0ddfe5d
Update process-schedules.py
cron/process-schedules.py
cron/process-schedules.py
#!/usr/bin/env python import MySQLdb #import datetime #import urllib2 #import os import datetime servername = "localhost" username = "pi" password = "password" dbname = "pi_heating_db" now = datetime.datetime.now() cnx = MySQLdb.connect(host=servername, user=username, passwd=password, db=dbname) cursorselect = ...
Python
0.000001
@@ -556,17 +556,25 @@ print(%22* -* + * * * * *%22)%0A SC @@ -2130,16 +2130,129 @@ T_TIME ) +%0A print( SCHED_TEST_DAY )%0A print( SCHED_TEST_SENSORS )%0A print( SCHED_TEST_MODES )%0A print( SCHED_TEST_TIMERS ) %0A%0A # Ch
8071bb66af3f0b661c07ef9f3ac260b30b856d04
Allow the profile boolean to the Alerts controller
fedoracommunity/mokshaapps/alerts/controllers/root.py
fedoracommunity/mokshaapps/alerts/controllers/root.py
from tg import expose, tmpl_context from pylons import cache, request from datetime import datetime, timedelta from moksha.lib.base import Controller from moksha.api.widgets import ContextAwareWidget from moksha.api.connectors import get_connector class AlertsContainer(ContextAwareWidget): template = 'mako:fedora...
Python
0.000001
@@ -28,16 +28,26 @@ _context +, validate %0Afrom py @@ -73,16 +73,50 @@ request%0A +from formencode import validators%0A from dat @@ -7115,16 +7115,68 @@ idget')%0A + @validate(%7B'profile': validators.StringBool()%7D)%0A def @@ -7200,16 +7200,31 @@ ame=None +, profile=False ):%0A @@ -7312,11 +7312...
e60ce628029e3100d6f2a8a8f7260e2ed229e6ac
Add helper method to retrieve review count per user in a skeleton
django/applications/catmaid/control/review.py
django/applications/catmaid/control/review.py
from collections import defaultdict from catmaid.models import Review def get_treenodes_to_reviews(treenode_ids=None, skeleton_ids=None, umap=lambda r: r): """ Returns a dictionary that contains all reviewed nodes of the passed <treenode_ids> and/or <skeleton_ids> lists as keys. ...
Python
0
@@ -65,16 +65,50 @@ Review%0A%0A +from django.db import connection%0A%0A %0Adef get @@ -1138,8 +1138,691 @@ reviews%0A +%0Adef get_review_count(skeleton_ids):%0A %22%22%22 Returns a dictionary that maps skelton IDs to dictonaries that map%0A user_ids to a review count for this particular skeleton.%0A %22%22...
a36a7a0eb6560156c5be6f0cc5523c17e79591e4
fix import errors
deepchem/models/tests/test_normalizing_flow_pytorch.py
deepchem/models/tests/test_normalizing_flow_pytorch.py
""" Test for Pytorch Normalizing Flow model and its transformations """ import pytest import numpy as np import unittest try: import torch from torch.distributions import MultivariateNormal from deepchem.models.torch_models.normalizing_flows_pytorch import Affine has_torch = True except: has_torch = False ...
Python
0.000025
@@ -230,33 +230,14 @@ els. -normalizing_flows_pytorch +layers imp @@ -594,17 +594,8 @@ ion -as input when @@ -609,18 +609,16 @@ ming the -%0A first f @@ -623,16 +623,18 @@ forward +%0A and inv @@ -694,14 +694,12 @@ ior -becaus +sinc e no @@ -707,16 +707,22 @@ hing is +being learned
40855d9be867119bdcaf7f531d5368dc7c91c3ee
Change internal representation of links chain to a tuple
polymer_states/__init__.py
polymer_states/__init__.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import numpy class Link(int): """A polymer chain link on a 2D lattice.""" VALID_LINK_VALUES = {1 << i for ...
Python
0.000001
@@ -666,20 +666,16 @@ -arr_ links = nump @@ -674,43 +674,20 @@ s = -numpy.array(list(map(Link, +tuple( links) -)) %0A%0A @@ -695,28 +695,24 @@ if len( -arr_ links) %3C 1:%0A @@ -845,20 +845,16 @@ mat(len( -arr_ links))) @@ -882,17 +882,31 @@ s = -arr_ +tuple(map(Link, links +)) %0A%0A @@...
3dc54a1c845cf0b99fd0dfc6fd454659895ba888
Fix import.
django_elasticsearch/contrib/restframework/__init__.py
django_elasticsearch/contrib/restframework/__init__.py
from rest_framework import VERSION from django_elasticsearch.contrib.restframework.restframework import AutoCompletionMixin if int(VERSION[0]) < 3: from django_elasticsearch.contrib.restframework.restframework2 import IndexableModelMixin from django_elasticsearch.contrib.restframework.restframework2 import El...
Python
0
@@ -77,29 +77,20 @@ amework. -restframework +base import
572fdb51cb692344d35d561d2efaf723f839221b
Update use_interoperable_auth detection.
grow/deployments/destinations/google_cloud_storage.py
grow/deployments/destinations/google_cloud_storage.py
from . import base from . import messages as deployment_messages from boto.gs import key from boto.s3 import connection from gcloud import storage from protorpc import messages import boto import cStringIO import dns.resolver import logging import mimetypes import os import webapp2 class TestCase(base.DestinationTest...
Python
0
@@ -1833,25 +1833,16 @@ fig. -access_key is not +email is Non
01cf61de5fc2c649fd5cd503df49aa880613c7c2
change potcar_data to potcar_spec
pymatgen/apps/borg/tests/test_hive.py
pymatgen/apps/borg/tests/test_hive.py
# coding: utf-8 from __future__ import division, unicode_literals """ Created on Mar 18, 2012 """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Mar 18, 2012" import unittest import ...
Python
0.000011
@@ -1252,20 +1252,20 @@ %22potcar_ -data +spec %22, %22run_
03ee56092d7f258dd37016ac06b6daf2439811f3
change article abstract count to limit to in_doaj only
portality/models/search.py
portality/models/search.py
from portality.dao import DomainObject from portality.models.cache import Cache from portality.models import Journal, Article class JournalArticle(DomainObject): __type__ = 'journal,article' __readonly__ = True # TODO actually heed this attribute in all DomainObject methods which modify data @classmetho...
Python
0
@@ -2661,28 +2661,154 @@ ery%22 - : %7B%22match_all%22 : %7B%7D +: %7B%0A %22bool%22: %7B%0A %22must%22: %5B%0A %7B%22term%22: %7B%22admin.in_doaj%22: True%7D%7D%0A %5D%0A %7D%0A %7D,%0A
6c4cd9e9f49c295fbb9738062e05bdf566d470a9
Use default client name for cinder resources
heat/engine/resources/openstack/cinder/volume_type.py
heat/engine/resources/openstack/cinder/volume_type.py
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
Python
0.000003
@@ -3195,37 +3195,37 @@ self.c -inder +lient ().volume_type_a @@ -5115,29 +5115,29 @@ ist = self.c -inder +lient ().volume_ty @@ -5460,29 +5460,29 @@ self.c -inder +lient ().volume_ty @@ -5822,21 +5822,21 @@ f self.c -inder +lient ().volum
e4596497dc57870a8ea3433e97f32d61bb7eb4e5
Version 3.14.3dev
engineio/__init__.py
engineio/__init__.py
import sys from .client import Client from .middleware import WSGIApp, Middleware from .server import Server if sys.version_info >= (3, 5): # pragma: no cover from .asyncio_server import AsyncServer from .asyncio_client import AsyncClient from .async_drivers.asgi import ASGIApp try: from .asyn...
Python
0
@@ -564,9 +564,12 @@ .14. -2 +3dev '%0A%0A_
89dac8b14610f08b12db0ab6e00b7432b527fd89
Remove trailing whitespace
python/balcaza/activity/local/text.py
python/balcaza/activity/local/text.py
from balcaza.t2types import * from balcaza.t2activity import BeanshellCode ByteArrayToString = BeanshellCode( '''if ((bytes == void) || (bytes == null)) { throw new RuntimeException("The 'bytes' parameter must be specified"); } if (encoding == void) { string = new String(bytes); } else { string = new String(bytes, ...
Python
0.999999
@@ -492,13 +492,12 @@ oString' -%09 %0A%09)%0A
d5e17c094c722cee291d493fd05b46040c5d8284
Enable python machine learning logging
python/machine_weighting_predictor.py
python/machine_weighting_predictor.py
""" Entry point for Python service, to which data is POSTed to train the ABRAID Ensemble Chain, and from which a prediction for a new datapoint is requested. """ from chain import Chain from flask import Flask, request from sklearn.externals import joblib import numpy as np app = Flask(__name__) PREDICTORS = {} FEED_...
Python
0.000007
@@ -267,16 +267,75 @@ py as np +%0Aimport logging, sys%0Alogging.basicConfig(stream=sys.stderr) %0A%0Aapp =
b324031ee683005be0307e3b323c4709ce3a01eb
Disable those new requirements because pip requires gcc to install them
python_apps/airtime_analyzer/setup.py
python_apps/airtime_analyzer/setup.py
from setuptools import setup from subprocess import call import sys # Allows us to avoid installing the upstart init script when deploying airtime_analyzer # on Airtime Pro: if '--no-init-script' in sys.argv: data_files = [] sys.argv.remove('--no-init-script') # super hax else: data_files = [('/etc/init', ...
Python
0.000002
@@ -1005,37 +1005,8 @@ SNI. - This is extremely important. Lea @@ -1041,16 +1041,87 @@ +# What sucks is that GCC is required to pip install these. %0A # 'ndg-htt @@ -1141,16 +1141,17 @@ +# 'pyasn1' @@ -1162,16 +1162,17 @@ +# 'pyopens
2c1811fad85d6bacf8d3fcaf1299994bfc5efb78
Support serializer path instead of "self" keyword
drf_extra_fields/relations.py
drf_extra_fields/relations.py
from collections import OrderedDict from rest_framework.relations import PrimaryKeyRelatedField, SlugRelatedField class PresentableRelatedFieldMixin(object): def __init__(self, **kwargs): self.presentation_serializer = kwargs.pop("presentation_serializer", None) self.presentation_serializer_kwarg...
Python
0
@@ -30,16 +30,70 @@ edDict%0A%0A +from django.utils.module_loading import import_string%0A from res @@ -1727,23 +1727,30 @@ -return +if isinstance( self.pre @@ -1769,17 +1769,23 @@ rializer -( +, str): %0A @@ -1793,129 +1793,83 @@ -data, context=self.context, **self.presentation_serializer_...
461b7c5bf5541fc3a56039d6756262d6b99e8428
Add null count.
problem/column_explorer/column_explorer.py
problem/column_explorer/column_explorer.py
#! /usr/bin/env python3 # Copyright 2019 John Hanley. # # 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, m...
Python
0.000001
@@ -1636,34 +1636,307 @@ self, table_name -): +, round_digits=3):%0A%0A meta = sa.MetaData(bind=self.engine)%0A tbl = sa.Table(table_name, meta, autoload=True)%0A%0A cnt, = self.engine.execute(f'select count(*) from %7Btable_name%7D').fetchone()%0A print(f'# %7Btable_name%7D%5Cn%7Bcnt%7D ro...
88dc575f366a95275c414569c613a9df34c35968
Update account_analytic_account.py
program_budget/account_analytic_account.py
program_budget/account_analytic_account.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Savoir-faire Linux (<www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it under the t...
Python
0.000011
@@ -2020,16 +2020,22 @@ ontext = + %7B%7D if context @@ -2039,13 +2039,28 @@ ext -or %7B%7D +is None else context %0A%0A
f65c2466cf58c4024584423da3d927ad9522eec9
Fix __repr__ if no person linked
indico/modules/events/contributions/models/persons.py
indico/modules/events/contributions/models/persons.py
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
Python
0.00004
@@ -2039,16 +2039,41 @@ ull_name + if self.person else None )%0A%0A%0Aclas @@ -2974,16 +2974,43 @@ son_id', +%0A _text=s @@ -3029,10 +3029,35 @@ ull_name + if self.person else None )%0A
2943d0f68340bc16ab29a42072751b263cf76192
Fix deleting images/pages with a legacy mapping
indico/modules/events/layout/models/legacy_mapping.py
indico/modules/events/layout/models/legacy_mapping.py
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
Python
0.000006
@@ -1628,32 +1628,45 @@ kref=db.backref( +%0A 'legacy_mapping' @@ -1658,32 +1658,86 @@ legacy_mapping', +%0A cascade='all, delete-orphan',%0A uselist=False, @@ -1727,32 +1727,44 @@ uselist=False, +%0A lazy=True)%0A @@ -1749,32 +1749,41 @@ lazy=True +%0...
86d088835a88c00af69090b6b7f1bae42ff5c09a
remove monetdb typo
lib/sqlalchemy/databases/__init__.py
lib/sqlalchemy/databases/__init__.py
# __init__.py # Copyright (C) 2005, 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php __all__ = [ 'sqlite', 'postgres', 'mysql', 'oracle', 'mssql', 'firebird', 'sybase', 'acc...
Python
0.999923
@@ -330,19 +330,8 @@ xdb' -, 'monetdb' %0A
4dc1f2b85c7728102a6cc4b149fb5200a0ffa736
Fix get_user_command to comply with new AirWatch logic TelekomLabs-DCO-1.1-Signed-off-by: Łukasz Biernot <lukasz.biernot@gmail.com> (github: ElmoVanKielmo)
src/tenants/management/commands/get_user.py
src/tenants/management/commands/get_user.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014, Deutsche Telekom AG - Laboratories (T-Labs) # # 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/lice...
Python
0
@@ -2413,16 +2413,21 @@ +smart group_id @@ -2445,16 +2445,21 @@ tadata%5B' +smart group_id @@ -2499,16 +2499,63 @@ ername%22%5D + in (%0A user%5B'Name'%5D for user in grou @@ -2560,40 +2560,55 @@ oup. -User +Smart Group. -usernames_by_group_id( +get_remote(%0A ...
71b2fcdd85187520a38ead5736d1b64b1e69afa4
Fix hedu enrolled, entrant and graduate columns
app/models/hedu.py
app/models/hedu.py
from sqlalchemy import Column, Integer, String, func from app import db class Hedu(db.Model): __tablename__ = 'hedu' year = Column(Integer, primary_key=True) region = Column(String(1), primary_key=True) mesoregion = Column(String(4), primary_key=True) ...
Python
0.000001
@@ -966,17 +966,17 @@ graduate -s + @@ -1029,17 +1029,17 @@ entrant -s + @@ -2090,17 +2090,16 @@ graduate -s ',%0A @@ -2113,17 +2113,16 @@ 'entrant -s ',%0A @@ -2491,16 +2491,17 @@ enrolled +s ': func. @@ -2553,17 +2553,16 @@ .entrant -s ),%0A @@ -2602,17 +2602,16 @@ gra...
4956868cd605faa085ae2fc4ab44076760a4fd80
Add some more auto_meta tests
metafunctions/tests/test_pipe.py
metafunctions/tests/test_pipe.py
import operator import unittest from metafunctions.tests.util import BaseTestCase from metafunctions.decorators import pipe_node class TestUnit(BaseTestCase): def test_basic_usage(self): self.assertEqual(a('_'), '_a') def test_wraps(self): @pipe_node def d(): 'a docstring...
Python
0
@@ -139,12 +139,19 @@ Test -Unit +Integration (Bas @@ -613,16 +613,149 @@ y %7C y%0A%0A + # Can't do this%0A #ayy = a %7C y + y%0A%0A # But this should work%0A yayy = y %7C a + y%0A yy_ya = y %7C y + a%0A%0A @@ -874,16 +874,109 @@ _ayyyy') +%0A self.assertEqual(y...
a4f475245c3af8470337fe0c25b136e58189a607
Update griddy to use CoordinatorEntity (#39392)
homeassistant/components/griddy/sensor.py
homeassistant/components/griddy/sensor.py
"""Support for August sensors.""" import logging from homeassistant.const import ENERGY_KILO_WATT_HOUR from homeassistant.helpers.entity import Entity from .const import CONF_LOADZONE, DOMAIN _LOGGER = logging.getLogger(__name__) async def async_setup_entry(hass, config_entry, async_add_entities): """Set up th...
Python
0
@@ -128,22 +128,45 @@ ers. -entity import +update_coordinator import Coordinator Enti @@ -581,16 +581,27 @@ eSensor( +Coordinator Entity): @@ -753,27 +753,24 @@ s -elf._coordinator = +uper().__init__( coor @@ -776,16 +776,17 @@ rdinator +) %0A @@ -1307,151 +1307,8 @@ w%22%0A%0A - @property%0A ...
f68764a05333d3c660c9f816f8926a692911fece
Use ColorMode enum in mystrom (#70526)
homeassistant/components/mystrom/light.py
homeassistant/components/mystrom/light.py
"""Support for myStrom Wifi bulbs.""" from __future__ import annotations import logging from pymystrom.bulb import MyStromBulb from pymystrom.exceptions import MyStromConnectionError import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_EFFECT, ATTR_HS_COLOR, COL...
Python
0
@@ -310,27 +310,8 @@ OR,%0A - COLOR_MODE_HS,%0A @@ -366,16 +366,31 @@ _FLASH,%0A + ColorMode,%0A Ligh @@ -2082,26 +2082,25 @@ mode = C -OLOR_MODE_ +olorMode. HS%0A _ @@ -2134,18 +2134,17 @@ = %7BC -OLOR_MODE_ +olorMode. HS%7D%0A
8021b027ae4a617712741d1e9a0668817bad9193
Fix import
experiments/tests/test_admin.py
experiments/tests/test_admin.py
from __future__ import absolute_import import json from django.contrib.auth.models import User, Permission from django.core.urlresolvers import reverse from django.test import TestCase from experiments.models import Experiment, CONTROL_STATE, ENABLED_STATE from experiments.utils import participant class AdminTestCa...
Python
0.000002
@@ -117,25 +117,27 @@ ngo. -core.urlresol +urls import re vers +e imp
86679c5b1a31d9125ebc3f55785cb9219e41ed27
Add mechanism to validate backends against buckets
edgedb/lang/common/buckets.py
edgedb/lang/common/buckets.py
## # Copyright (c) 2012, 2013 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## import weakref from metamagic.utils import abc, config class BucketMeta(abc.AbstractMeta, config.ConfigurableMeta): def __new__(mcls, name, bases, dct): cls = super().__new__(mcls, name, bases, dct) ...
Python
0.000002
@@ -2105,32 +2105,101 @@ ls, *backends):%0A + # First validate backends against the current Implementation%0A impl = c @@ -2214,32 +2214,32 @@ mplementation()%0A - for p in @@ -2560,24 +2560,283 @@ _classes))%0A%0A + # Secondly, validate backends against each child bucket class and se...
3075e63cd3b274f15a0fe75bbd17b80ed700cb51
fix plotting CPUs of only one cluster
libs/utils/analysis/cpus_analysis.py
libs/utils/analysis/cpus_analysis.py
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2015, ARM Limited and contributors. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
Python
0.000001
@@ -1953,32 +1953,54 @@ sters'%5D%5B'big'%5D)%0A + if bcpus:%0A self._pl @@ -2114,24 +2114,46 @@ %5B'little'%5D)%0A + if lcpus:%0A self
331f5b0a951e13f816e752609ac348df272e1b1e
Update conf_template.py
docs/conf_template.py
docs/conf_template.py
# Statement for enabling the development environment DEBUG = True # Define the application directory import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Define the database - we are working with # SQLite for this example SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASE_DIR, 'app.db') DATABASE_...
Python
0.000002
@@ -1729,14 +1729,15 @@ _DIR = ' +/ tmp/'%0A
67f9a47c3476c189543bffba369d791035e0f159
add per-link logs
empower/apps/survey/survey.py
empower/apps/survey/survey.py
#!/usr/bin/env python3 # # Copyright (c) 2016 Roberto Riggio # # 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 applicabl...
Python
0.000001
@@ -1329,16 +1329,40 @@ kwargs)%0A + self.links = %7B%7D%0A @@ -1399,24 +1399,24 @@ p_callback)%0A - %0A @proper @@ -1809,24 +1809,215 @@ _callback)%0A%0A + def to_dict(self):%0A %22%22%22 Return a JSON-serializable dictionary representing the Summary %22%22%22%0A%0A out = super...
16f9ec9f6d611075f3e7ec37fc53b82bdc460532
fix bug
misp_modules/modules/expansion/onyphe.py
misp_modules/modules/expansion/onyphe.py
# -*- coding: utf-8 -*- import json from pymisp import MISPEvent, MISPObject try: from onyphe import Onyphe except ImportError: print("pyonyphe module not installed.") misperrors = {'error': 'Error'} mispattributes = {'input': ['ip-src', 'ip-dst', 'hostname', 'domain'], 'output': ['hostna...
Python
0.000001
@@ -4287,16 +4287,21 @@ relation +_attr , self.a @@ -4311,32 +4311,36 @@ ibute%5B'value'%5D)%0A + objet_do @@ -4391,32 +4391,36 @@ , 'related-to')%0A + self.mis
2ca7e324931d6ebcdf23a7bd0073271bc0bf9475
check correct combinations for link,reports and imstuments
umibukela/forms.py
umibukela/forms.py
from django import forms from django.contrib.gis.geos import Point from widgets import AddAnotherWidgetWrapper from django.core.exceptions import ValidationError from .models import (Site, CycleResultSet, Monitor, ProgrammeResources, ProgrammeImage) class SiteForm(forms.ModelForm): latitude ...
Python
0
@@ -3453,16 +3453,360 @@ amme')%0A%0A + if resource.name == 'Link' and link is None:%0A raise ValidationError('Enter a link')%0A if resource.name == 'Reports' and document is None:%0A raise ValidationError('Upload a document')%0A if resource.name == 'Survey Instrument' and do...
dc7158048d491e28322af443c7918ffd0de0d22d
Use logger instead of stdout and stderr
speeches/management/import_commands.py
speeches/management/import_commands.py
import os from optparse import make_option from django.core.management.base import BaseCommand, CommandError from instances.models import Instance class ImportCommand(BaseCommand): importer_class = None document_extension = '' option_list = BaseCommand.option_list + ( make_option('--commit', ac...
Python
0.000019
@@ -1,12 +1,27 @@ +import logging%0A import os%0Afr @@ -158,16 +158,55 @@ stance%0A%0A +logger = logging.getLogger(__name__)%0A%0A%0A class Im @@ -1628,33 +1628,27 @@ -self.stdout.write +logger.info (%22Import @@ -2018,33 +2018,27 @@ -self.stdout.write +logger.info (%22Import @@ -2598,33 +2598,...
2a0e03efaca02a72a11086f7c49cbd7ba1887a60
fix import
uniqueids/admin.py
uniqueids/admin.py
import csv import codecs import io from django.contrib import admin from hellomama_registration import utils from .models import Record, State, Facility, Community, PersonnelUpload from .tasks import send_personnel_code class RecordAdmin(admin.ModelAdmin): list_display = [ "id", "identity", "write_to", ...
Python
0.000001
@@ -8,22 +8,8 @@ csv%0A -import codecs%0A impo
cfaa0df91ee072c8bd207d1d1cdb8b9a54160069
remove pdb imports
spotseeker_server/org_forms/uw_spot.py
spotseeker_server/org_forms/uw_spot.py
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 """ Changes ================================================================= sbutler1@illinois.edu: adapted to the new form framework. """ from django import forms from django.dispatch import receiver from spotseeker_serv...
Python
0.000001
@@ -3523,45 +3523,8 @@ f):%0A - # import pdb;pdb.set_trace()%0A
fe56573f318578b6359d06d0454af6992f344c20
load optimizer from config
hypergan/trainers/simultaneous_trainer.py
hypergan/trainers/simultaneous_trainer.py
import numpy as np import torch import hyperchamber as hc import inspect from hypergan.trainers.base_trainer import BaseTrainer from hypergan.optimizers.adamirror import Adamirror TINY = 1e-12 class SimultaneousTrainer(BaseTrainer): """ Steps G and D simultaneously """ def _create(self): self.optimiz...
Python
0
@@ -67,16 +67,85 @@ nspect%0A%0A +from hypergan.gan_component import ValidationException, GANComponent%0A from hyp @@ -191,16 +191,16 @@ Trainer%0A - from hyp @@ -362,32 +362,33 @@ (self):%0A +# self.optimizer = @@ -915,24 +915,25 @@ ror%0A +# self.gan.add @@ -1034,16 +1034,16 @@ irror2)%0A - ...
30db4b3ae377669b3b598c9d4d22b5fbff2082ab
Fix typo on model
app/backend/aquifers/serializers.py
app/backend/aquifers/serializers.py
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distri...
Python
0.000585
@@ -1410,17 +1410,17 @@ y_concer -t +n ', read_
306f597faad120ad5b5327544b40537fd0724f96
stop url render errors failing the plugin
flexget/plugins/output/prowl.py
flexget/plugins/output/prowl.py
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import logging from requests import RequestException from flexget import plugin from flexget.event import event from flexget.utils.template import RenderError log = logging.g...
Python
0.000001
@@ -2467,32 +2467,65 @@ nderError as e:%0A + message_url = ''%0A
2954d63dbd4f48eb6141fdb1298290c2adaf5814
Fix installed-unit builder.
flocker/provision/_rackspace.py
flocker/provision/_rackspace.py
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Rackspace provisioner. """ from libcloud.compute.providers import get_driver, Provider from characteristic import attributes, Attribute from ._libcloud import get_size, get_image from ._install import provision # _node isn't immutable, since libcloud ...
Python
0
@@ -91,68 +91,8 @@ %22%22%0A%0A -from libcloud.compute.providers import get_driver, Provider%0A from @@ -937,16 +937,180 @@ egion):%0A + # Import these here, so that this can be imported without%0A # installng libcloud.%0A from libcloud.compute.providers import get_driver, Provider%0A
e303da18866a0e9afbc3cfd0402b966e1a019dd3
comment out sentry
everyclass/server/__init__.py
everyclass/server/__init__.py
import copy import gc import sys import logbook from flask import Flask, g, render_template, session from flask_cdn import CDN from htmlmin import minify from raven.contrib.flask import Sentry from raven.handlers.logbook import SentryHandler logger = logbook.Logger(__name__) sentry = Sentry() __app = None try: ...
Python
0
@@ -190,57 +190,8 @@ ntry -%0Afrom raven.handlers.logbook import SentryHandler %0A%0Alo @@ -1342,24 +1342,26 @@ %0A + # sentry.init @@ -1393,16 +1393,18 @@ + # sentry_ @@ -1488,32 +1488,34 @@ %E4%BB%A5%E4%B8%8A%E7%9A%84%0A + # logger.handlers @@ -2370,20 +2370,23 @@ logger. ...
96bc8bdec2736a1f86528d55331e935ecf13a529
np nan validator
pycqed/instrument_drivers/pq_parameters.py
pycqed/instrument_drivers/pq_parameters.py
from qcodes.instrument.parameter import ManualParameter from qcodes.utils.validators import Validator, Strings import numpy as np class NP_NANs(Validator): is_numeric = True def __init__(self): pass def __repr__(self): return '<nan>' def validate(self, value, context=''): tr...
Python
0.999504
@@ -210,12 +210,37 @@ -pass +self._valid_values = %5Bnp.nan%5D %0A%0A
8995d7314bddcf4418a08cb39b2fabbc8704706e
Use conservative defaults for local facebook settings.
pykeg/src/pykeg/contrib/facebook/models.py
pykeg/src/pykeg/contrib/facebook/models.py
import datetime from django.db import models from django.db.models.signals import post_save from socialregistration import models as sr_models PRIVACY_CHOICES = ( ('EVERYONE', 'Everyone'), ('ALL_FRIENDS', 'Friends'), ('FRIENDS_OF_FRIENDS', 'Friends of Friends'), ('NETWORK_FRIENDS', 'Networks and Friends'), #...
Python
0
@@ -2379,35 +2379,36 @@ anField(default= -Tru +Fals e,%0A help_te @@ -2488,19 +2488,20 @@ default= -Tru +Fals e,%0A