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
1c1be3ebb0d23eeb0044b52ab8c7c03c3dc42046
Add ledger stop to migration script.
data/migrations/deb/1_3_433_to_1_3_434.py
data/migrations/deb/1_3_433_to_1_3_434.py
#!/usr/bin/python3.5 import os import sys import traceback from indy_common.config_util import getConfig from indy_common.config_helper import NodeConfigHelper from ledger.compact_merkle_tree import CompactMerkleTree from ledger.genesis_txn.genesis_txn_initiator_from_file import GenesisTxnInitiatorFromFile from plen...
Python
0
@@ -3191,16 +3191,34 @@ (ledger) +%0A ledger.stop() %0A%0A if
d53d344e770bbeeb839323500f526400692e554b
Fix test failing on Python 2.7
h2o-py/tests/testdir_jira/pyunit_pubdev_6394.py
h2o-py/tests/testdir_jira/pyunit_pubdev_6394.py
from h2o import H2OFrame from tests import pyunit_utils def pubdev_6394(): # JUnit tests are to be found in RapidsTest class data = [['location'], ['X県 A市'], ['X県 B市'], ['X県 B市'], ['Y県 C市'], ['Y県 C市']] originalFrame = H2OFrame(data, he...
Python
0.000351
@@ -1,12 +1,36 @@ +# -*- coding: utf-8 -*-%0A from h2o imp @@ -74,16 +74,17 @@ _utils%0A%0A +%0A def pubd @@ -470,18 +470,18 @@ es() == - %5B +u '%EF%BC%B8%E7%9C%8C %EF%BC%A1%E5%B8%82', @@ -481,16 +481,17 @@ %EF%BC%B8%E7%9C%8C %EF%BC%A1%E5%B8%82', +u '%EF%BC%B8%E7%9C%8C %EF%BC%A2%E5%B8%82', @@ -491,16 +491,1...
6e000645b909970416fbe9f1b37af658eee5202a
Update event.py
src/model/event.py
src/model/event.py
import secure from model.helpers import ( r2d, DB, PermissionError, ) from model.user import User from model.org import Org class Event: def __init__(self): raise Exception("This class is a db wrapper and should not be instantiated.") @classmethod def get(cls, event_id, user_email, **__): user = ...
Python
0.000002
@@ -1509,16 +1509,23 @@ or b in +secure. token_by
bb9a5021f11167794ce28a66292c837e060f1a60
make solarize test cases independent
Allura/allura/tests/unit/test_solr.py
Allura/allura/tests/unit/test_solr.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 (t...
Python
0.000007
@@ -2056,107 +2056,8 @@ ):%0A%0A - def setUp(self):%0A self.obj = mock.MagicMock()%0A self.obj.index.return_value = %7B%7D%0A%0A @@ -2158,37 +2158,63 @@ (self):%0A -self. +obj = mock.MagicMock()%0A obj.index.return @@ -2253,29 +2253,24 @@ al(solarize( -self. obj), None)%0A @@...
1ddfee2d2db59e8f188e26daf098186600cebd50
add __repr__()
AlphaTwirl/ProgressBar/ProgressBar.py
AlphaTwirl/ProgressBar/ProgressBar.py
# Tai Sakuma <tai.sakuma@cern.ch> import time import sys, collections ##__________________________________________________________________|| class ProgressBar(object): def __init__(self): self.reports = collections.OrderedDict() self.lines = [ ] self.interval = 0.1 # [second] self._...
Python
0.000648
@@ -317,32 +317,133 @@ lf._readTime()%0A%0A + def __repr__(self):%0A return '%7B%7D()'.format(%0A self.__class__.__name__%0A )%0A%0A def nreports
35d12d972e0c69dc0d6e26eacfb14702b66c2be6
send posts to the current webapp api
totalimpactwebapp/updater.py
totalimpactwebapp/updater.py
#!/usr/bin/env python import argparse import logging, os, sys, random, datetime, time import requests from sqlalchemy.sql import text from totalimpactwebapp import db logger = logging.getLogger('ti.updater') logger.setLevel(logging.DEBUG) # run in heroku by a) commiting, b) pushing to heroku, and c) running # he...
Python
0
@@ -388,16 +388,37 @@ rl_slugs +, webapp_api_endpoint ):%0A Q @@ -495,31 +495,32 @@ l = -u%22http://localhost:5000 +webapp_api_endpoint + u%22 /use @@ -613,16 +613,63 @@ l_slug)%0A + print %22going to post to this url%22, url%0A @@ -1356,32 +1356,53 @@ umber_to_update, + webapp_api_endpoint, ...
d4f36358686dfc959a3ac987786015099cabc04d
Remove unused method 'string_to_bool' from utils
heatclient/common/utils.py
heatclient/common/utils.py
# Copyright 2012 OpenStack Foundation # 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 requ...
Python
0.00064
@@ -3452,95 +3452,8 @@ )%0A%0A%0A -def string_to_bool(arg):%0A return arg.strip().lower() in ('t', 'true', 'yes', '1')%0A%0A%0A def
28bf23ef6e76c076243153affec2a4ccef04c306
add util to print lexer output.
toydist/core/parser/utils.py
toydist/core/parser/utils.py
# Generator to enable "peeking" the next item: # >>> a = [1, 2, 3, 4] # >>> peeker = Peeker(a) # >>> for i in peeker: # >>> try: # >>> next = peeker.peek() # >>> print "Next to %d is %d" % (i, next) # >>> except StopIteration: # >>> print "End of stream", i # >>> class Peeker(ob...
Python
0
@@ -1282,8 +1282,141 @@ n self%0A%0A +def print_tokens_simple(lexer):%0A while True:%0A tok = lexer.token()%0A if not tok:%0A break%0A print tok%0A%0A
8029d3e592714f2173d3147ae18768523418ad46
remove some blank lines
homeassistant/components/switch/transmission.py
homeassistant/components/switch/transmission.py
""" homeassistant.components.switch.transmission ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Enable or disable Transmission BitTorrent client Turtle Mode Configuration: To use the Transmission switch you will need to add something like the following to your config/configuration.yaml switch: platform: transmiss...
Python
0.999999
@@ -87,17 +87,16 @@ ~~~~~~~%0A -%0A Enable o @@ -851,15 +851,12 @@ ce.%0A -%0A%0A %22%22%22%0A -%0A from @@ -1103,17 +1103,16 @@ sionrpc%0A -%0A from tra @@ -1155,17 +1155,16 @@ onError%0A -%0A import l @@ -1388,15 +1388,27 @@ the +transmission sensor -s . %22%22 @@ -2187,16 +2187,16 @@ %5D)%0A%0A%0A ...
b438da2080f06e319ecd70fc771a934e3ce53044
Fix Organization API reference
udata/core/organization/api_fields.py
udata/core/organization/api_fields.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from flask import url_for from udata.api import api, pager, fields from .models import ORG_ROLES, MEMBERSHIP_STATUS @api.model(fields={ 'id': fields.String(description='The organization identifier', required=True), 'name': fields.String(descri...
Python
0
@@ -909,57 +909,8 @@ e),%0A - 'image_url': organization.image_url,%0A @@ -964,20 +964,16 @@ 'logo': -str( organiza @@ -981,16 +981,30 @@ ion.logo +(external=True ),%0A
4e10895a1925eeb626a4f0b2949973ccceb7c9f8
Remove unchecked return value in synology_dsm (#39929)
homeassistant/components/synology_dsm/camera.py
homeassistant/components/synology_dsm/camera.py
"""Support for Synology DSM cameras.""" from typing import Dict from synology_dsm.api.surveillance_station import SynoSurveillanceStation from homeassistant.components.camera import SUPPORT_STREAM, Camera from homeassistant.config_entries import ConfigEntry from homeassistant.helpers.typing import HomeAssistantType ...
Python
0
@@ -779,21 +779,16 @@ return - True %0A%0A su
35568c2773ddc133c41f6bc7f9e1acd38c544384
Fix doc sidebar
doc/source/theme_config.py
doc/source/theme_config.py
colors = { "bg0": " #fbf1c7", "bg1": " #ebdbb2", "bg2": " #d5c4a1", "bg3": " #bdae93", "bg4": " #a89984", "gry": " #928374", "fg4": " #7c6f64", "fg3": " #665c54", "fg2": " #504945", "fg1": " #3c3836", "fg0": " #282828", "red": " #cc241d", "red2": " #9d0006", "oran...
Python
0
@@ -767,27 +767,28 @@ d_sidebar%22: -Tru +Fals e,%0A %22glob @@ -836,17 +836,18 @@ depth%22: -0 +-1 ,%0A #
4b9b6317449ef93e218b69df77f016784bb78270
Fix TabError: inconsistent use of tabs and spaces in indentation
rest_auth/serializers.py
rest_auth/serializers.py
from django.contrib.auth import get_user_model from django.conf import settings from django.contrib.auth.forms import PasswordResetForm, SetPasswordForm try: from django.utils.http import urlsafe_base64_decode as uid_decoder except: # make compatible with django 1.5 from django.utils.http import base36_to_i...
Python
0.000017
@@ -3625,9 +3625,16 @@ ():%0A -%09 +
02d2336924907f7cea29f6792e264646b5a75cb9
Syntax/keyword spelling mistake.
ibpy/ib/types/execution.py
ibpy/ib/types/execution.py
#!/usr/bin/env python """ Defines the Execution class. """ from ib.lib import setattr_mapping class Execution(object): """ Execution(...) -> execution details """ def __init__(self, orderId=0, clientId=0, execId='', time='', ...
Python
0.999997
@@ -622,16 +622,17 @@ retu +r n False%0A
7fdcad9aec3189af2558ed26053dc9f1229dce48
sanitize input for datadog
idea_town/metrics/views.py
idea_town/metrics/views.py
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.permissions import IsAuthenticated from django.conf import settings import datadog import json import datetime import logging logger = logging.getLogger(__name__) datadog.initialize(**settings.DATADOG_KEYS) cla...
Python
0.99886
@@ -583,16 +583,246 @@ -event'%0A + # TODO: we will be updating user instance state from these%0A # events down the road. But we want to always sanitize before%0A # sending to third party services.%0A if 'user' in d:%0A del d%5B'user'%5D%0A
32bac398a94e0a23d993bfeafcbda1ac0da68b0c
version 0.2.3
stellar_base/version.py
stellar_base/version.py
__version__ = "0.2.2"
Python
0.000003
@@ -12,11 +12,11 @@ = %220.2. -2 +3 %22%0A
9bac47925e604a92df068f8644559741dc24769c
clean up
src/renamer.py
src/renamer.py
from parser import Parser import os class Renamer: def __init__(self): self.infos = None self.excess = None self.parse_file = None self.rename_file = [] self.compteur = 0 self.filename = None def rename(self, files): self.parse_file = Parser().parse(f...
Python
0.000001
@@ -240,18 +240,16 @@ = None%0A%0A -%0A%0A def @@ -757,28 +757,16 @@ eur +=1%0A - %0A @@ -954,28 +954,16 @@ ename)%0A%0A -%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A if __nam
8d0eedae1fb2f9f0c93606963743b5c1bf2fa591
change default db settings to point to postgis://localhost/straymapperdb
straymapper/settings.py
straymapper/settings.py
import os import dj_database_url import djcelery from S3 import CallingFormat djcelery.setup_loader() def map_path(directory_name): return os.path.join(os.path.dirname(__file__) + '/../', directory_name).replace('\\', '/') DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Aurelio Tinio', 'aureli...
Python
0
@@ -419,18 +419,17 @@ t='postg -re +i s://loca @@ -433,16 +433,30 @@ ocalhost +/straymapperdb ')%7D%0ABROK
c6df07ce73063ab8bbf1ed9660fa6d37580ab2f1
Update version
studip_sync/__init__.py
studip_sync/__init__.py
"""Stud.IP file synchronization tool. A command line tool that keeps track of new files on Stud.IP and downloads them to your computer. """ __license__ = "Unlicense" __version__ = "0.4.0" __author__ = __maintainer__ = "Wolfgang Popp" __email__ = "mail@wolfgang-popp.de" def _get_config_path(): import os pref...
Python
0
@@ -180,11 +180,11 @@ = %22 -0.4 +2.0 .0%22%0A
4389c21a431405d94b5602087f856f4ee8a9da7f
Fix SQL
sydent/db/valsession.py
sydent/db/valsession.py
# -*- coding: utf-8 -*- # Copyright 2014 OpenMarket Ltd # # 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 l...
Python
0.9985
@@ -2761,16 +2761,17 @@ ('id', +' medium', @@ -2836,24 +2836,27 @@ es (?, ?, ?, + ?, ?)%22, (sid, @@ -5869,37 +5869,16 @@ cute(sql -, (delete_before_ts,) )%0A%0A
f90649eb2b0988c771fa329ba7a0a5ba81fe2396
Fix 500 on invalid utf-8 in request
synapse/http/servlet.py
synapse/http/servlet.py
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
Python
0.000006
@@ -5717,35 +5717,74 @@ ept -simplejson.JSONDecodeError: +Exception as e:%0A logger.warn(%22Unable to parse JSON: %25s%22, e) %0A
57882e6754f6d5897690c97dfda2db371989206e
Fix test ModifiedHamiltonianExchange resuming
Yank/tests/test_sampling.py
Yank/tests/test_sampling.py
#!/usr/local/bin/env python """ Test sampling.py facility. """ # ============================================================================== # GLOBAL IMPORTS # ============================================================================== from openmmtools import testsystems from mdtraj.utils import enter_temp_di...
Python
0.000001
@@ -1963,16 +1963,39 @@ sitions, + mc_atoms=ligand_atoms, %0A
39650bf110b9ea4fc290226c689e9c3c2bee6206
Clarify read-only intention of the command options dict
src/sheldon.py
src/sheldon.py
# -*- coding: utf-8 -*- """ http://bit.ly/1baSfhM """ import shlex # http://bit.ly/1baSfhM#tag_02_04 RESERVED_WORDS = frozenset([ '!', '{', '}', 'case', 'do', 'done', 'elif', 'else', 'esac', 'fi', 'for', 'if', 'in', 'then', 'until', 'while', ]) class Command(object): def __init__(self, program,...
Python
0.000548
@@ -330,34 +330,8 @@ s):%0A - self.options = %7B%7D%0A @@ -568,29 +568,502 @@ self._ -parse_ options + = self._parse_options(arguments)%0A%0A def get_options(self):%0A %22%22%22Retrieve a copy of the command options.%22%22%22%0A # Changes to the options dict will not propagate to the%...
28492e8311d1c676b81a7c52cf1efb4fcd904c37
handle "./." calls
taboo/input/vcf/core.py
taboo/input/vcf/core.py
# -*- coding: utf-8 -*- import codecs import logging import os import vcf_parser from sqlalchemy.exc import IntegrityError import pysam import taboo.store from taboo.store.models import Genotype import taboo.rsnumbers logger = logging.getLogger(__name__) def load_vcf(store, vcf_path, rsnumber_stream, experiment='s...
Python
0.999319
@@ -4498,112 +4498,235 @@ a -nalyses%5Bsample_id%5D.append(%7B%0A 'rsnumber': rsnumber.id,%0A 'allele_1': +llele_1 = ('0' if sample.allele_indices%5B0%5D is None else%0A variant.alleles%5Bsample.allele_indices%5B0%5D%5D)%0A allele_2 = (...
4cd9276a25b55638d46044ab4f9618b3eaa01ed2
Rename deprecated queryset method
taggit_helpers/admin.py
taggit_helpers/admin.py
from django.contrib import admin from django.contrib.contenttypes.admin import (GenericStackedInline, GenericTabularInline) from django.db.models import Count from taggit.models import TaggedItem class TaggitCounter(): """ Display (and sort by) number of Taggit tags associated with tagged items. Usa...
Python
0.000001
@@ -793,32 +793,36 @@ %22%22%22%0A%0A def +get_ queryset(self, r @@ -877,17 +877,16 @@ et_query -_ set()%0A
72d1c08259e0954380e3d38a751de3ca20beca2d
Add import for unit test
ion/services/dm/test/test_replay_integration.py
ion/services/dm/test/test_replay_integration.py
""" @author Swarbhanu Chatterjee @file ion/services/dm/test/test_replay_integration.py @description Provides a full fledged integration from ingestion to replay using scidata """ import hashlib from prototype.hdf.hdf_array_iterator import acquire_data from pyon.public import CFG from interface.objects import CouchStora...
Python
0
@@ -1114,16 +1114,32 @@ rt log%0A%0A +import unittest%0A import r
3ec0f7fa6ee03052118d7d7e6db257f903ce8748
Fix capitalization to default style.
instana/http_propagator.py
instana/http_propagator.py
from __future__ import absolute_import import opentracing as ot from basictracer.context import SpanContext from instana import util, log prefix_tracer_state = 'X-INSTANA-' field_name_trace_id = prefix_tracer_state + 'T' field_name_span_id = prefix_tracer_state + 'S' field_count = 2 class HTTPPropagator(): """A ...
Python
0.000001
@@ -162,14 +162,14 @@ 'X-I -NSTANA +nstana -'%0Af
53790af64ca601832872d3a21ab8264ce4c9be10
Update the build version
src/version.py
src/version.py
BUILD = 43
Python
0
@@ -7,6 +7,6 @@ = 4 -3 +4 %0A
a1dd8a009fd0e716fd4eeb3b4b85dcb11710faf1
fix width
ironandblood/game/forms.py
ironandblood/game/forms.py
from django import forms from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from .models import Exchange, Resources, Territory, Bond from .widgets import KnobInput class ExchangeForm(forms.Form): offeror_as_bond = forms.BooleanField(label = 'As Bond?', ini...
Python
0
@@ -1533,18 +1533,8 @@ = ' -Negotiate Bond @@ -1556,60 +1556,216 @@ alse -)%0A offeree_bond = forms.IntegerField(required=False +,%0A widget = forms.NumberInput(attrs = %7B%0A 'style': 'width: 50px'%0A %7D))%0A offeree_bond = forms.IntegerField(required=False,%0A widget = forms.NumberInput(attrs = ...
e8a316bc48ceb371e61cbd17238fe102785491b7
revert change
src/weakref.py
src/weakref.py
# -*- coding: iso-8859-1 -*- # ----------------------------------------------------------------------------- # weakref.py - weak reference # ----------------------------------------------------------------------------- # $Id$ # # This file contains a wrapper for weakref that the weak reference can # be used the same wa...
Python
0.000001
@@ -3294,28 +3294,16 @@ f._ref() - is not None :%0A
c54223c1b4dd8701a49dd47d51d0947d858b7f79
add __unicode__ methods (omg why)
jakniedojade/app/models.py
jakniedojade/app/models.py
from django.db import models from django_resized import ResizedImageField class Core(models.Model): id = models.AutoField(primary_key=True) last_modified = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) class Meta: abstract = True class Image(Core): ...
Python
0.000022
@@ -499,24 +499,85 @@ ame or '-'%0A%0A + def __unicode__(self):%0A return self.name or u'-'%0A%0A %0Aclass Conne @@ -849,24 +849,85 @@ ame or '-'%0A%0A + def __unicode__(self):%0A return self.name or u'-'%0A%0A %0Aclass Vote(
2d09bec744eb189e879d57a25b2c96188b56f05b
Implement function/method decorators.
jaspyx/visitor/function.py
jaspyx/visitor/function.py
import _ast import ast from jaspyx.ast_util import ast_call, ast_load from jaspyx.context.function import FunctionContext from jaspyx.visitor import BaseVisitor class Function(BaseVisitor): def visit_FunctionDef(self, node): if node.name: self.stack[-1].scope.declare(node.name) args =...
Python
0
@@ -1908,32 +1908,170 @@ ))),%0A )%0A%0A + for decorator in node.decorator_list:%0A body = ast_call(%0A decorator,%0A body%0A )%0A%0A if not n
6508db3283ec6d419064e679e1315ffa79765010
Read config from envvar
schoool/app.py
schoool/app.py
# -*- coding: utf-8 -*- import json import os from bs4 import BeautifulSoup from flask import Flask, request, Response import requests from werkzeug.exceptions import default_exceptions from schoool import cache from schoool.views import blueprints def create_app(config=None): app = Flask(__name__) if conf...
Python
0.000002
@@ -395,49 +395,38 @@ -raise Exception('config file is not given +app.config.from_envvar('CONFIG ')%0A%0A
9f0093d7332c4dcd6eac742c44984d29e07b7258
Refactor parser
absence/generator/parser.py
absence/generator/parser.py
from html.parser import HTMLParser import re import datetime class AbsenceRecord: """ Store information about absence """ def __init__(self, date, hours): """ :param date: day when absence have place :type date: datetime.date :param hours: which hours have been skipped ...
Python
0.000005
@@ -626,54 +626,54 @@ s -elf.state = 'start'%0A super().__init__() +uper().__init__()%0A self.state = 'start' %0A%0A @@ -1561,32 +1561,59 @@ __init__(self):%0A + super().__init__()%0A self.res @@ -1674,35 +1674,8 @@ None -%0A super().__init__() %0A%0A @@ -2410,32 +2410,8...
d162d71623c80345fd063c641b28f8d4dbacdb98
update headers
instancebuilder/dc_node.py
instancebuilder/dc_node.py
#!/usr/bin/env python3 """Docstring for module.""" import sys import argparse import os from elementbase import ElementBase # ============================================================================== __version__ = "0.1" __copyright__ = "Copyright 2017, devops.center" __credits__ = ["Bob Lozano", "Gregg Jensen"] ...
Python
0.000001
@@ -353,18 +353,18 @@ 2014-20 +2 1 -7 devops.
c2f480cf1709b06cfe7b1373165efa968e4096e3
bump version number
academictorrents/version.py
academictorrents/version.py
__version__ = "2.0.11"
Python
0.000004
@@ -13,12 +13,12 @@ = %222.0.1 -1 +2 %22%0A%0A
7b028dfff6a1d093f8a4d4b49ff7443a36f4fb94
debug output for all sids during disconnect
dino/hooks/disconnect.py
dino/hooks/disconnect.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 # distributed under the Li...
Python
0
@@ -5157,32 +5157,289 @@ ser_id(user_id)%0A + if all_sids is None:%0A all_sids = list()%0A%0A logger.debug(%0A 'sid %25s disconnected, all_sids: %5B%25s%5D for user %25s (%25s)' %25 (%0A environ.env.request.sid, ','.join(all_sids), user_id, user_n...
ae7bb70ba852dae072eb9f7f82fa16b7be8952db
remove debugging line
kolibri/core/discovery/utils/network/search.py
kolibri/core/discovery/utils/network/search.py
import atexit import json import logging import socket import time from contextlib import closing from zeroconf import get_all_addresses from zeroconf import NonUniqueNameException from zeroconf import ServiceInfo from zeroconf import USE_IP_OF_OUTGOING_INTERFACE from zeroconf import Zeroconf from kolibri.core.auth.m...
Python
0.000473
@@ -4476,40 +4476,8 @@ ce)%0A - logger.info(str(instances))%0A
0423952c736ae4ed319c2c3e189b5fc679837c4b
change debug log format
seabird/irc.py
seabird/irc.py
import asyncio import logging LOG = logging.getLogger(__name__) def _decode_tag(data): # https://github.com/ircv3/ircv3-specifications/blob/master/core/message-tags-3.2.md#escaping-values mapping = [ (';', '\\:'), (' ', '\\s'), ('\\', '\\\\'), ('\r', '\\r'), ('\n', '\\...
Python
0.000001
@@ -3599,11 +3599,11 @@ ug(' -IN +%3C-- %25s' @@ -4559,11 +4559,11 @@ ug(' -OUT +--%3E %25s'
0823c5266caf97f05524b1ff3b1e7f99f95e1911
make shell context
ui/manage.py
ui/manage.py
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Shell, Manager app = create_app(os.getenv('APP_CONFIG') or 'default') manager = Manager(app) if __name__ == '__main__': manager.run()
Python
0.000413
@@ -177,16 +177,69 @@ r(app)%0A%0A +def make_shell_context():%0A return dict(app=app)%0A%0A%0A if __nam
3b94cc59b444e166467e6cb81e2e07e80bdebf28
disable cache-flushing again, leave caching for only 1 hour
totalimpact/cache.py
totalimpact/cache.py
import os import pylibmc import hashlib import logging import json from cPickle import PicklingError from totalimpact.utils import Retry # set up logging logger = logging.getLogger("ti.cache") class CacheException(Exception): pass class Cache(object): """ Maintains a cache of URL responses in memcached """ ...
Python
0
@@ -903,32 +903,34 @@ he cache%0A + # mc = self._get_ @@ -963,16 +963,18 @@ %0A + # mc.flus
504d5a92e72ee8972d39d261ac95506279db41f5
Version bump.
tp/netlib/version.py
tp/netlib/version.py
version = (0, 2, 2)
Python
0
@@ -11,11 +11,11 @@ (0, 2, -2 +3 )%0A
2369c88103e731b9df0582fe8c1cef4cafee860d
Update views.py
trafficdata/views.py
trafficdata/views.py
from django.shortcuts import render from imp import load_source # Create your views here. from pymongo import MongoClient#mongo db client from django.shortcuts import get_object_or_404, render from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse from .models import Tweets,User,City...
Python
0
@@ -533,53 +533,41 @@ b:// -saukumar:1234@ds062059.mlab.com:62059/test_df +XXX:XXXX@dsXXXX.mlab.com:XXX/XXXX '%0Acl @@ -4061,12 +4061,13 @@ return None +%0A
3163d016db3849c3c9e801c1cdb9e6e907afa313
install python files to libxml2 prefix instead of python prefix and ignore non-python files when activating
var/spack/packages/libxml2/package.py
var/spack/packages/libxml2/package.py
from spack import * class Libxml2(Package): """Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform), it is free software available under the MIT License.""" homepage = "http://xmlsoft.org" url = "http://xmlsoft.org/sources/lib...
Python
0
@@ -12,16 +12,26 @@ import * +%0Aimport os %0A%0Aclass @@ -512,16 +512,106 @@ +python' +, ignore=r'(bin.*$)%7C(include.*$)%7C(share.*$)%7C(lib/libxml2.*$)%7C(lib/xml2.*$)%7C(lib/cmake.*$)' )%0A de @@ -716,16 +716,132 @@ n spec:%0A + site_packages_dir = os.path.join(prefix, 'lib/python%25s.%25s/site-...
45f253560e2c0da9472285fccc7f3cba652fde69
Test fade to white
tasks/task_countdown.py
tasks/task_countdown.py
import sys, os import time try: from picamera.array import PiRGBArray from picamera import PiCamera except: pass import cv2 from cv2 import VideoCapture import numpy as np import logging import settings from PIL import Image from image_lib import overlay_image, overlay_np_image_pi, overlay_pil_image_pi...
Python
0
@@ -1491,24 +1491,36 @@ 0))%0A%09%09%09%09else + is not None :%0A%09%09%09%09%09self.
3bf259d6b3b8c535c158f4b2a8cf6f2a7ba1232e
Make TLObjects picklable (#752)
telethon/tl/tlobject.py
telethon/tl/tlobject.py
import struct from datetime import datetime, date from threading import Event class TLObject: def __init__(self): self.confirm_received = Event() self.rpc_error = None self.result = None # These should be overrode self.content_related = False # Only requests/functions/que...
Python
0
@@ -117,48 +117,8 @@ f):%0A - self.confirm_received = Event()%0A @@ -143,16 +143,16 @@ = None%0A + @@ -202,24 +202,24 @@ be overrode%0A - self @@ -281,16 +281,751 @@ ries are +%0A %0A # Internal parameter to tell pickler in which state Event object was%0A self._...
68087f7805b7728d655ceba03f47339470eb675c
Make sure cli CommandFailed prints out stdout and stderr
tempest/cli/__init__.py
tempest/cli/__init__.py
# Copyright 2013 OpenStack Foundation # 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 requ...
Python
0.000232
@@ -5815,23 +5815,16 @@ -stderr= result_e @@ -6343,81 +6343,19 @@ led( -subprocess.CalledProcessError):%0A # adds output attribute for python2.6 +Exception): %0A @@ -6409,11 +6409,8 @@ derr -=%22%22 ):%0A @@ -6456,24 +6456,69 @@ t__( -returncode, cmd) +)%0A self.returncode = returncode%0A ...
519b1264f3e6d778e201a3dbb6a2bba9452b1989
vtlcreator package: fixed a bug when locator is None
vistrails/packages/vtlcreator/init.py
vistrails/packages/vtlcreator/init.py
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
Python
0.999418
@@ -4663,17 +4663,37 @@ el -s +if locator is not Non e:%0A
47f3aa90a8be4498450ed36b04ab6842ddb100da
Update Machine definitions to make use of new helper
django_lightweight_queue/machine_types.py
django_lightweight_queue/machine_types.py
from django.utils.functional import cached_property from .utils import get_queue_counts from .cron_scheduler import CRON_QUEUE_NAME class Machine: """ Dummy machine class to contain documentation. Implementations may extend this class if desired, though this is not required. """ @property ...
Python
0
@@ -81,16 +81,36 @@ e_counts +, get_worker_numbers %0Afrom .c @@ -1888,37 +1888,24 @@ for queue -, num_workers in sorted(g @@ -1918,28 +1918,27 @@ ue_counts(). -item +key s()):%0A @@ -2052,32 +2052,32 @@ in -range(1, num_workers + 1 +get_worker_numbers(queue ):%0A @@ -2807,21 +2807,8 @@ ueue -, nu...
41db16ee01600a14703e68ec9ec529150359c27e
Remove unused import
packages/dcos-integration-test/extra/test_metronome.py
packages/dcos-integration-test/extra/test_metronome.py
import pytest __maintainer__ = 'ichernetsky' __contact__ = 'marathon-team@mesosphere.io' def test_metronome(dcos_api_session): job = { 'description': 'Test Metronome API regressions', 'id': 'test.metronome', 'run': { 'cmd': 'ls', 'docker': {'image': 'busybox:latest...
Python
0.000001
@@ -1,19 +1,4 @@ -import pytest%0A%0A __ma
2d5467a1e7144de3911dc14392d8bee9585280b3
replace static url for boolean image
staff/admin.py
staff/admin.py
from django.contrib import admin from django.utils.translation import ugettext as _ from staff.models import Person, DressSize, Settings, GroupCategory, OrgaJob, HelperJob, TutorGroup from staff.admin_actions import mail_export, staff_nametag_export, staff_overview_export, helper_job_overview, orga_job_overview, tutor...
Python
0.000803
@@ -76,16 +76,176 @@ ext as _ +%0Afrom django.utils.html import format_html%0A%0Afrom django.templatetags.static import static%0Afrom django.contrib.admin.templatetags.admin_list import _boolean_icon %0A%0Afrom s @@ -1730,33 +1730,35 @@ name', ' -extended_is_tutor +is_tutor_with_title ', 'is_o @@ -3091,33 +3091,35 ...
6512692ee2f6f41e742f0449a040e1ca527bbcc0
change case of environment detection
example_project/settings.py
example_project/settings.py
# Django settings for example_project project. import os import dj_database_url def project_dir(*paths): base = os.path.realpath(os.path.dirname(__file__)) return os.path.join(base, *paths) # default to DEBUG=True DEBUG = os.environ.get('ENVIRONMENT', 'DEV') == 'DEV' TEMPLATE_DEBUG = DEBUG ADMINS = ( ...
Python
0.000002
@@ -263,21 +263,21 @@ ', ' -DEV +dev ') == ' -DEV +dev '%0ATE
b71e8d589ef2f8e16a9f5bdcf574461e6ed73f3c
Drop leftover from old-style formatting
examples/4-ideal-payment.py
examples/4-ideal-payment.py
# coding=utf-8 # # Example 4 - How to prepare an iDEAL payment with the Mollie API. # from __future__ import print_function import os import time import flask from app import database_write from mollie.api.client import Client from mollie.api.error import Error def main(): try: # # Initialize t...
Python
0
@@ -966,9 +966,8 @@ ue=%22 -%25 %7Bid%7D
066cea33bc5a0033ec0227a9861034f66abcfeee
version updated
epys/__init__.py
epys/__init__.py
#!/usr/bin/env python """ ePYs is a python library for the manipulation, processing and plotting of the input and output files of ESA Experiment Planning Software (EPS). .. WARNING:: This is a very beta-project. It's not on PyPI and can't be installed via PIP. """ __author__ = 'Jonathan McAuliffe' __email__ = '...
Python
0
@@ -361,9 +361,9 @@ 0.3. -1 +4 '%0A__
7fe5747178f95ee5b3c13e723c002a72e8c5c0a7
Fix get_parameter if event object is deleted
django_emarsys/models.py
django_emarsys/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from jsonfield import JSONField from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from django_emarsys import EventParam log = logging.getL...
Python
0.000024
@@ -4400,17 +4400,28 @@ cts. -get(pk=pk +filter(pk=pk).first( )%0A%0A
4712e44b11cb7cb276c98691d6de05e21e25d118
improve coverage
django_excel/__init__.py
django_excel/__init__.py
from django.core.files.uploadhandler import MemoryFileUploadHandler, TemporaryFileUploadHandler from django.core.files.uploadedfile import InMemoryUploadedFile, TemporaryUploadedFile from django.http import HttpResponse import pyexcel as pe import pyexcel_webio as webio class ExcelMemoryFile(webio.ExcelInput, InMemor...
Python
0
@@ -773,32 +773,145 @@ yUploadedFile):%0A + def _get_file_extension(self):%0A extension = self.name.split(%22.%22)%5B1%5D%0A return extension%0A %0A def load_sin @@ -982,40 +982,64 @@ load -(self.file.replace(%22.upload%22, %22%22 +_from_memory(self._get_file_extension(), self.file.read( ...
de98e9ee2c919fb6fa135209f1673f23e76127af
Version changed to final
django_odesk/__init__.py
django_odesk/__init__.py
VERSION = (0, 0, 2, 'beta', 0) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: if VERSION[3] != 'final': version = "%s %s...
Python
0
@@ -18,12 +18,13 @@ 2, ' -beta +final ', 0
a8d701059bec7f32051e8f65eee4af9015f328d1
Update baluhn.py
src/baluhn.py
src/baluhn.py
__all__ = ['generate', 'verify'] decimal_decoder = lambda s: int(s, 10) decimal_encoder = lambda i: str(i) def luhn_sum_mod_base(string, base=10, decoder=decimal_decoder): # Adapted from http://en.wikipedia.org/wiki/Luhn_algorithm digits = list(map(decoder, string)) return ( sum(digits[::-2]) + ...
Python
0.000001
@@ -283,25 +283,16 @@ return ( -%0A sum(digi @@ -350,11 +350,9 @@ od(2 - * +* d, b @@ -375,21 +375,16 @@ ::-2%5D))) -%0A ) %25 base @@ -384,16 +384,20 @@ %25 base%0A + %0A%0Adef ge
1c088e07ceef7c0f9ace6e42a9ee037dc25dfb1f
Update models.py
analytics_kits/models.py
analytics_kits/models.py
from __future__ import unicode_literals from django.db import models from django.apps import apps from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericForeignKey from django.utils.translation import ugettext_lazy as _ import logging # A model to save absol...
Python
0
@@ -644,28 +644,22 @@ tsMixin( -models.Model +object ):%0A%0A @@ -1397,57 +1397,8 @@ ()%0A%0A - class Meta:%0A abstract = True%0A%0A %0A# M
b143c7ae9bbfa7b67ad5111ffce417f380e7f0ea
Bump version to 1.0a1 for dev.
djangosecure/__init__.py
djangosecure/__init__.py
__version__ = "0.1.3"
Python
0
@@ -12,11 +12,12 @@ = %22 -0.1.3 +1.0.a1 %22%0A
d752e0fa3a47269b2d6f4fc795e127ad89fb53a2
update formbot example RasaHQ/roadmap#280
examples/formbot/actions.py
examples/formbot/actions.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import typing from typing import Dict, Text, Any, List, Union from rasa_core_sdk import ActionExecutionRejection from rasa_core_sdk.forms import ...
Python
0
@@ -1231,15 +1231,8 @@ of -all of them
ac05645bceb129783bbb55b1777abf45a838f6d4
Remove commented statements
lib/ansible/modules/packaging/os/rhn_channel.py
lib/ansible/modules/packaging/os/rhn_channel.py
#!/usr/bin/python # (c) Vincent Van de Kussen # # 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.0', 'status': ['preview'],...
Python
0
@@ -2048,263 +2048,8 @@ #%0A%0A -# unused:%0A#%0A#def get_localsystemid():%0A# f = open(%22/etc/sysconfig/rhn/systemid%22, %22r%22)%0A# content = f.read()%0A# loc_id = re.search(r'%5Cb(ID-)(%5Cd%7B10%7D)' ,content)%0A# return loc_id.group(2)%0A%0A# ------------------------------------------------------- #...
029b3c1b2fe1de06040c0a378860971738265f4f
Remove status-swallowing flags
dmoj/graders/standard.py
dmoj/graders/standard.py
import os from functools import partial from dmoj.error import CompileError from dmoj.executors import executors from dmoj.graders.base import BaseGrader from dmoj.result import Result, CheckerResult from dmoj.utils.communicate import safe_communicate, OutputLimitExceeded class StandardGrader(BaseGrader): def gr...
Python
0.000001
@@ -1799,16 +1799,17 @@ s codes%0A +%0A @@ -1815,39 +1815,8 @@ if -not case.config.swallow_ir and proc @@ -1973,40 +1973,8 @@ if -not case.config.swallow_rte and proc @@ -2220,16 +2220,16 @@ signal%0A + @@ -2235,40 +2235,8 @@ if -not case.config.swallow_tle and proc
8e3da82d6c037e8e23f364991ed1f32e61787703
Modify date fields display in order admin
tshop/order/admin.py
tshop/order/admin.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Autor: jordi collell <jordi@tempointeractiu.cat> # http://tempointeractiu.cat # ------------------------------------------------------------------- ''' ''' from django.contrib import admin from models import * from django.core.urlresolvers import reverse from django.ht...
Python
0
@@ -233,16 +233,45 @@ t admin%0A +from django.db import models%0A from mod @@ -283,16 +283,16 @@ mport *%0A - from dja @@ -1016,16 +1016,17 @@ Admin):%0A +%0A inli @@ -1122,24 +1122,26 @@ atus', 'date +_c ', 'pay_type @@ -1143,16 +1143,25 @@ _type', +%0A 'pay_dat @@ -1157,24 +1157,35 @@ 'pay_...
33e0bb5cf947c45baa0d9cc1f85df4f9780d6108
Make path sort order case insensitive
spreadflow_xslt/proc.py
spreadflow_xslt/proc.py
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import collections import glob import os from twisted.internet import defer # Use parser from defusedxml if possible. from defusedxml import lxml as etree # XSLT is not present in defusedxml, explicitely g...
Python
0.999773
@@ -2096,102 +2096,175 @@ -for path in sorted(reduce(lambda x, y: x + y, %5Bglob.glob(pattern) for pattern in patterns%5D, %5B%5D +discovered = reduce(lambda head, tail: head + tail, %5Bglob.glob(pattern) for pattern in patterns%5D, %5B%5D)%0A for path in sorted(discovered, key=lambda s: s.lower( )):%...
f085c1eb9fabf2266376b884b414b85575c2677a
update version
twitcher/__init__.py
twitcher/__init__.py
import logging logger = logging.getLogger(__name__) __version__ = '0.3.0' def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ from pyramid.config import Configurator config = Configurator(settings=settings) # include twitcher components config....
Python
0
@@ -65,17 +65,17 @@ = '0.3. -0 +1 '%0A%0A%0Adef
c6d285dd2a80ae713e1399ce1efaf9b514878755
Fix test
python/ql/test/library-tests/frameworks/aiopg/test.py
python/ql/test/library-tests/frameworks/aiopg/test.py
import aiopg # Only a cursor can execute sql. async def test_cursor(): # Create connection directly conn = await aiopg.connect() cur = await conn.cursor() await cur.execute("sql") # $ getSql="sql" constructedSql="sql" # Create connection via pool async with aiopg.create_pool() as pool: ...
Python
0.002051
@@ -766,16 +766,22 @@ conn = + await pool.ac
eb34c605fc970a70b9f97a79094997757940c9e8
Fix boilerplate.
statzlogger.py
statzlogger.py
import logging try: NullHandler = logging.NullHandler except ImportError: class NullHandler(logging.Handler): def emit(self, record): pass logging.getLogger().addHandler(NullHandler()) class StatsLogger(logging.Logger): """A statistics logger. Methods stolen from szl: col...
Python
0.000028
@@ -51,38 +51,41 @@ lHandler%0Aexcept -Import +Attribute Error:%0A class
426aba0b0fa278e721dfc663db1b60d15dba16d5
Test staticfiles.json beginning string
utils/tests/test_pipeline.py
utils/tests/test_pipeline.py
import os from io import StringIO from django.conf import settings from django.core.management import call_command from django.core.management.base import CommandError from django.test import TestCase class PipelineTestCase(TestCase): def setUp(self): file_path = os.path.join(settings.STATIC_ROOT, 'stati...
Python
0.000003
@@ -260,16 +260,21 @@ +self. file_pat @@ -358,16 +358,21 @@ .isfile( +self. file_pat @@ -397,16 +397,21 @@ .remove( +self. file_pat @@ -576,16 +576,332 @@ ingIO()) +%0A with open(self.file_path) as f:%0A contents = f.read()%0A start_content = '%7B%5Cn %22paths%22: %7B%5Cn...
ea08b388e29c83fdbbcc6d35d88627d4afe5f859
Clean unused cruft
storm/cloud.py
storm/cloud.py
import sys import pyinotify as inf import asyncore import logbook from storm import util from storm import conf from storm import bolt class EventHandler(inf.ProcessEvent): # Setup some static vars that should really be in a conf file. # TODO: Conf file plz. font = conf.CONFIG['font']['name'] separat...
Python
0
@@ -173,102 +173,8 @@ t):%0A - # Setup some static vars that should really be in a conf file.%0A # TODO: Conf file plz.%0A @@ -208,16 +208,16 @@ 'name'%5D%0A + sepa @@ -300,30 +300,8 @@ ()%0A%0A - descriptors = %7B%7D%0A%0A @@ -768,74 +768,8 @@ %5D)%0A%0A - def filename(self, path):%0A ...
a2ad076a16e9f30371acd32bb6828acfe1a8d8f5
add max_participants to admin
agir/events/admin/panels.py
agir/events/admin/panels.py
from django.contrib import admin from django.urls import reverse from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from django.contrib.gis.admin import OSMGeoAdmin from django.db.models import F, Sum from django.utils import timezone from django.utils.encoding import ...
Python
0
@@ -4215,24 +4215,44 @@ 'fields': ( +'max_participants', 'subscriptio
7954487cdf7607497e62322690eb5c497798a401
Fix pep8 issue
alfred_collector/process.py
alfred_collector/process.py
import msgpack import multiprocessing import zmq from alfred_db.models import Report, Fix from datetime import datetime from markdown import markdown from sqlalchemy import create_engine class CollectorProcess(multiprocessing.Process): def __init__(self, database_uri, socket_address): super().__init__() ...
Python
0
@@ -1585,10 +1585,12 @@ t.id + == + repo
4163a86c1e5c892a397a32e759a53467f4bd30fe
fix deprecated method
analytics/report_builder.py
analytics/report_builder.py
from django.conf import settings from django.utils.timezone import utc from uw_canvas.accounts import Accounts as CanvasAccounts from uw_canvas.analytics import Analytics as CanvasAnalytics from uw_canvas.reports import Reports as CanvasReports from restclients_core.exceptions import DataFailureException from analytics...
Python
0.000053
@@ -238,16 +238,65 @@ Reports%0A +from uw_canvas.terms import Terms as CanvasTerms%0A from res @@ -2453,29 +2453,29 @@ term = -self._reports +CanvasTerms() .get_ter
95a25b401d5430fd8cbfcfcb3bc6c691bf2c40ad
Remove unnecessary import
summon_list.py
summon_list.py
from wep_types import SummonType, Summon class SummonList: def __init__(self, my_summons, helper_summons): self.my_summons = my_summons self.helper_summons = helper_summons # Pair your summon with each friend list summon # @return List of summon pairs @property def summon_pairs(sel...
Python
0.000011
@@ -1,46 +1,4 @@ -from wep_types import SummonType, Summon%0A%0A clas
52f30bb037241ddb4b12fd5f6e3d72c6de49c0dc
make survey closed url matching a bit more restrictive
survey/urls.py
survey/urls.py
from django.conf.urls import patterns, url, include from survey.views import * urlpatterns = patterns('', url(r'^about', 'survey.views.about', name='about'), url(r'^management', 'survey.views.management', name='management'), url(r'^contact', 'survey.views.contact', name='contact'), url(r'^survey2/(?P<...
Python
0
@@ -404,16 +404,17 @@ (r'%5E%5BSs%5D +/ .*$', 's
3e55dcb5ac1f6776c854e486b5ea65b1f850d5cf
fix bugs
support.py
support.py
#coding: utf8 from datetime import datetime, date from decimal import Decimal import time import re # data type transfer variables and functions FALSE_VALUES = (None, '', 0, '0', 'f', 'F', 'false', 'FALSE') ISO_DATE = r'^(\d{4})-(\d\d)-(\d\d)$' ISO_DATETIME = r'^(\d{4})-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)(\.\d+)?$' d...
Python
0.000001
@@ -94,16 +94,17 @@ ort re%0A%0A +%0A # data t @@ -883,16 +883,159 @@ mal(0)%0A%0A +datetime2str = lambda dt, format='%25Y-%25m-%25d %25H:%25M:%25S': dt.strftime(format)%0Adate2str = lambda d, format='%25Y-%25m-%25d': d.strftime(format)%0A %0Adatetim @@ -1229,16 +1229,125 @@ trings%0A%0A +microseconds ...
0cbe15b7413de56a758fe8b1acd043656a8339bb
Make PageQuerySet inherit from treebeards MP_NodeQuerySet
wagtail/wagtailcore/query.py
wagtail/wagtailcore/query.py
from django.db.models.query import QuerySet from django.db.models import Q from django.contrib.contenttypes.models import ContentType class PageQuerySet(QuerySet): """ Defines some extra query set methods that are useful for pages. """ def live_q(self): return Q(live=True) def live(self):...
Python
0
@@ -1,48 +1,4 @@ -from django.db.models.query import QuerySet%0A from @@ -24,16 +24,16 @@ mport Q%0A + from dja @@ -85,16 +85,413 @@ tType%0A%0A%0A +# hack to import our patched copy of treebeard at wagtail/vendor/django-treebeard -%0A# based on http://stackoverflow.com/questions/17211078/how-to-temporarily-modify-...
a56ab27bfbb7df5e92026869a76619ed16c7add5
Remove useless comments
addons/website/tests/test_ui.py
addons/website/tests/test_ui.py
import unittest import subprocess import os import select import time import json from openerp import tools # avoid "ValueError: too many values to unpack" def _exc_info_to_string(err, test): return err # TODO according to al this should be one line of Python class LineReader: def __init__(self, file_descript...
Python
0
@@ -206,65 +206,8 @@ rr%0A%0A -# TODO according to al this should be one line of Python%0A clas @@ -2173,88 +2173,8 @@ '')%0A - # TODO use correct key from tools if exists (I could not find it --ddm)%0A @@ -5187,16 +5187,21 @@ js'), %7B%7D +, 5.0 ))%0A b
8ae94fbc42d1999d12f4dd765ce2b2b7c6ddf3ad
Update test_tasks.py
agir/people/tests/test_tasks.py
agir/people/tests/test_tasks.py
from django.test import TestCase from django.core import mail from agir.people.models import Person from agir.people import tasks class PeopleTasksTestCase(TestCase): def setUp(self): self.person = Person.objects.create_insoumise("me@me.org", create_role=True) def test_welcome_mail(self): ta...
Python
0.000009
@@ -1293,28 +1293,29 @@ rtEqual(len(mail.outbox), 1) +%0A
5abc1aa51f00ca1c2e2f01740dedaeadce745213
Fix error message when checking vm_to_host_ratio on del_host.
lib/python2.5/aquilon/server/dbwrappers/host.py
lib/python2.5/aquilon/server/dbwrappers/host.py
# ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # # Copyright (C) 2008,2009 Contributor # # This program is free software; you can redistribute it and/or modify # it under the terms of the EU DataGrid Software License. You should # have received a copy of the license...
Python
0
@@ -2997,16 +2997,20 @@ r.hosts) + - 1 ))%0A r
e38f8076bc34038e10e5eb899672eacf2ee89190
Create site-package protobuf __init__ if needed
setup_win32.py
setup_win32.py
# -*- coding: utf-8 -*- """ To create local builds and distributable .msi, run the following command: python setup_win32.py build bdist_msi """ import opcode import os import pkg_resources import sys from cx_Freeze import setup, Executable import requests.certs from lbrynet import __version__ wordlist_path = pkg_res...
Python
0.000019
@@ -360,16 +360,385 @@ dlist')%0A +%0A# protobuf needs a blank __init__.py in the site-packages/google folder for cx_freeze to find%0Aprotobuf_path = os.path.dirname(os.path.dirname(pkg_resources.resource_filename('google.protobuf', '__init__.py')))%0Aprotobuf_init = os.path.join(protobuf_path, '__init__.py')%0Aif not...
081efaf1cbed1c182e22fad5c23324dc5671c51b
simplified some of the code
examples/retriever-multi.py
examples/retriever-multi.py
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # vi:ts=4:et # $Id$ import sys import pycurl try: import signal from signal import SIGPIPE, SIG_IGN signal.signal(signal.SIGPIPE, signal.SIG_IGN) except ImportError: pass assert sys.version[:3] >= "2.2", "requires Python 2.2 or better" try: urls...
Python
0.999979
@@ -1104,19 +1104,8 @@ = 0%0A -curls = %7B%7D%0A mult @@ -1298,34 +1298,8 @@ (0)%0A - f = open(n, %22wb%22)%0A @@ -1314,32 +1314,60 @@ freelist.pop(0)%0A + c.f = open(n, %22wb%22)%0A c.setopt @@ -1421,31 +1421,12 @@ TA, +c. f) -%0A curls%5Bc%5D = f %0A @@ -1820,16 +1820,11...
51f0766a0888c8c4845b9459d1d776297b4d18a8
Increase tolerance in test that fails on windows
reproject/spherical_intersect/tests/test_reproject.py
reproject/spherical_intersect/tests/test_reproject.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from astropy.io import fits from astropy.wcs import WCS from astropy.utils.data import get_pkg_data_filename from ..core impor...
Python
0.000001
@@ -3541,33 +3541,33 @@ rray2, rtol=1.e- -6 +5 )%0A np.testing @@ -3608,17 +3608,17 @@ tol=1.e- -6 +5 )%0A%0A n @@ -3672,21 +3672,21 @@ 2, rtol= -1.e-6 +3.e-5 )%0A np @@ -3743,13 +3743,13 @@ tol= -1.e-6 +3.e-5 )%0A%0A%0A
9123873be31ad20e2f0e023ab050c4634ee1b2d2
Fix data migration with latest Flask-Mongoengine (#596)
udata/commands/db.py
udata/commands/db.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from os.path import join from pkg_resources import resource_isdir, resource_listdir, resource_string from flask import current_app from pymongo.errors import PyMongoError, OperationFailure from mongoengine.connection import get_db, DEFAU...
Python
0
@@ -270,16 +270,22 @@ re%0Afrom +flask_ mongoeng @@ -312,17 +312,57 @@ t get_db -, +%0Afrom flask_mongoengine.connection import DEFAULT
975740ccbad0b92f97e212f40dbc4ab96abaefb8
Fix stacking order of displacements
anharmonic/force_fit/fc2.py
anharmonic/force_fit/fc2.py
import numpy as np from phonopy.harmonic.force_constants import similarity_transformation, get_rotated_displacement, get_rotated_forces, get_positions_sent_by_rot_inv, distribute_force_constants class FC2Fit: def __init__(self, supercell, disp_dataset, symmetry): ...
Python
0.000013
@@ -2361,16 +2361,64 @@ forces)%0A + for i in range(self._num_atom):%0A @@ -2451,17 +2451,17 @@ um, -: +i %5D = fc%5B -: +i , 1: @@ -3696,59 +3696,59 @@ for -ssym_c in site_sym_cart:%0A for u in disps +u in disps:%0A for ssym_c in site_sym_cart :%0A @@ -4031,69 +...
dd06e14adb1fa7a652ca7434a268756dc8b6da24
Remove a comment that has become ticket #2.
shiva/shiva.py
shiva/shiva.py
"""Reasonably generic [continuously] deployment framework""" # When we need to make this work across multiple nodes: # I really have no reason to use Commander over Fabric: I don't need Chief, and # nearly all the features and conveniences Commander had over Fabric have been # since implemented in Fabric. Fabric has mo...
Python
0
@@ -58,378 +58,8 @@ %22%22%22%0A -# When we need to make this work across multiple nodes:%0A# I really have no reason to use Commander over Fabric: I don't need Chief, and%0A# nearly all the features and conveniences Commander had over Fabric have been%0A# since implemented in Fabric. Fabric has more features and more...
29ef0c329425c0dcdc89b496a27f7c2e98134074
update chgcar example
examples/tools/06-chgcar.py
examples/tools/06-chgcar.py
#!/usr/bin/env python ''' Write orbitals, electron density, molecular electrostatic potential in Gaussian cube file format. ''' import numpy as np from pyscf.pbc import gto, scf from pyscf.tools import chgcar # # Regular CHGCAR file for crystal cell # cell = gto.M(atom='H 0 0 0; H 0 0 1', a=np.eye(3)*3) mf = scf.RHF...
Python
0
@@ -56,65 +56,23 @@ sity -, molecular electrostatic potential in%0AGaussian cube file + in VASP CHGCAR for
8a58cd56e0ef6d6a273cf1c4733228533164fd83
Allow using a custom requests Session instance.
reppy/cache.py
reppy/cache.py
#! /usr/bin/env python # # Copyright (c) 2011 SEOmoz # # 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, mer...
Python
0
@@ -1597,32 +1597,97 @@ %60requests.get%60%0A + self.session = kwargs.pop('session', requests.Session())%0A self.arg @@ -3062,24 +3062,28 @@ req = -requests +self.session .get(rob
1c978ddeb98f603ecfb36079ced6553bad52684a
use multiprocessing for web server in test
test/gui/test_web.py
test/gui/test_web.py
import unittest from pympler.util.compat import HTMLParser, HTTPConnection from pympler.util.compat import Request, urlopen, URLError from socket import error as socket_error from threading import Thread from time import sleep from pympler.gui.web import show # TODO Find a way to stop server (maybe start in another ...
Python
0
@@ -173,37 +173,8 @@ ror%0A -from threading import Thread%0A from @@ -231,74 +231,190 @@ ow%0A%0A +%0A # -TODO Find a way to stop server (maybe start in another p +Use separate process for server if available. Otherwise use a thread.%0Atry:%0A from multiprocessing import Process%0Aexcept ImportError:%0A from...
5daca32e11cf69a9aa06306607077685f59d4e41
Fix link to checker script
sites/views.py
sites/views.py
import itertools from django.shortcuts import render from django.core.mail import send_mail from django.utils.html import format_html from django.http import JsonResponse, HttpResponseNotFound from .models import Site, Language from .forms import AddForm MENU = ( ('/', 'Users Home', 'home'), ('/lang/', 'Langua...
Python
0
@@ -5731,36 +5731,78 @@ https:// -users.getnikola.com/ +github.com/getnikola/nikola-users/blob/master/sites/checker.py for a h
339f11b48e613d0a629e637fdaa14fef1d267c03
fix reader
src/yass/reader.py
src/yass/reader.py
import os import numpy as np class READER(object): def __init__(self, bin_file, dtype, CONFIG, n_sec_chunk=None, buffer=None): # frequently used parameters self.n_channels = CONFIG.recordings.n_channels self.sampling_rate = CONFIG.recordings.sampling_rate self.rec_len = CONFIG.rec...
Python
0.000003
@@ -1088,16 +1088,89 @@ _list)%0A%0A + # spike size%0A self.spike_size = CONFIG.spike_size%0A %0A %0A def @@ -4373,32 +4373,37 @@ e_times, n_times +=None , channels=None) @@ -4467,16 +4467,83 @@ '''%0A%0A + if n_times is None:%0A n_times = self.spike_size%0A%0A ...
7c9a6bea89632ff34151e3851f344d9eda82e65f
Update core.py
slackn/core.py
slackn/core.py
import os import logging from uuid import uuid4 from slacker import Slacker from redis import StrictRedis from collections import defaultdict log = logging.getLogger('slackn') icon_url = 'https://slack.global.ssl.fastly.net/4324/img/services/nagios_48.png' class Attachment(object): """ Nagios notification formatt...
Python
0
@@ -1113,129 +1113,22 @@ -if slack_channel.startswith('#'):%0A self.channel = slack_channel%0A else:%0A self.channel = '#' + +self.channel = sla
eeebc0d51e7d46af82fc2e27d975f540c5e56a4f
Replace old manage.py script used for testing with the default one created by django-admin
src/manage.py
src/manage.py
#!/usr/bin/env python #...............................licence........................................... # # (C) Copyright 2008 Telefonica Investigacion y Desarrollo # S.A.Unipersonal (Telefonica I+D) # # This file is part of Morfeo EzWeb Platform. # # Morfeo EzWeb Platform is free software: you can re...
Python
0
@@ -19,4489 +19,224 @@ hon%0A -%0A#...............................licence...........................................%0A#%0A# (C) Copyright 2008 Telefonica Investigacion y Desarrollo%0A# S.A.Unipersonal (Telefonica I+D)%0A#%0A# This file is part of Morfeo EzWeb Platform.%0A#%0A# Morfeo EzWeb Platform is...
b302fc0b2b8fdbc3b220d0c81d8f1f13a871f27b
fix windows check
standard-format.py
standard-format.py
import sublime import sublime_plugin import subprocess import os import shutil # import inspect SETTINGS_FILE = "StandardFormat.sublime-settings" # load settings settings = None platform = sublime.platform() global_path = os.environ["PATH"] # Initialize a global path. Works on all OSs def calculate_user_path(): ...
Python
0.999709
@@ -3218,22 +3218,18 @@ latform -is not +!= %22window
d29bb72d0f4ffc83b30bf1f9daf77c9540949e14
improve message, wrap long line [skip ci]
service.py
service.py
#!/usr/bin/env python # vim: set expandtab sw=4 ts=4: ''' Retrieve Travis CI build data and log to Keen.io Copyright (C) 2014 Dieter Adriaenssens <ruleant@users.sourceforge.net> This file is part of buildtimetrend/service <https://github.com/buildtimetrend/service/> This program is free software: you can redistribut...
Python
0.000001
@@ -1981,17 +1981,19 @@ cessing -a +the build l @@ -1994,16 +1994,24 @@ uild log +%0A and dat @@ -2014,24 +2014,16 @@ data of -%0A a travi
6c9c8729ea2cba2e4febfb3f4aabea3d90e17928
add documentation [skip ci]
service.py
service.py
#!/usr/bin/env python # vim: set expandtab sw=4 ts=4: ''' Retrieve Travis CI build data and log to Keen.io Copyright (C) 2014 Dieter Adriaenssens <ruleant@users.sourceforge.net> This file is part of buildtimetrend/service <https://github.com/buildtimetrend/service/> This program is free software: you can redistribut...
Python
0
@@ -1636,32 +1636,75 @@ ef index(self):%0A + '''%0A Index page%0A '''%0A return %22 @@ -1910,16 +1910,252 @@ =None):%0A + '''%0A Visiting this page triggers loading and processing a build log and data of%0A a travis CI build process.%0A Parameters:%0A r...
2d544e0e83c2c1a9654dcf7ce55827b3a568e8b1
Connect to Twitch.tv new AWS IRC server
src/master.py
src/master.py
from changetip_twitch import ChangeTipTwitch from chat_worker import TwitchIRCBot from message_center import MessageCenter import os import logging import threading logger = logging.getLogger(__name__) logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s', filename='twitch.log', level=logging.INFO) conso...
Python
0
@@ -719,16 +719,21 @@ = %22irc. +chat. twitch.t
210eec0d9648ae2ff9fbec3057b89d129cb2939b
check if a file matches content-length header rather than just if it's empty this catches cases where a file is partially downloaded
ulmo/util.py
ulmo/util.py
""" ulmo.util ~~~~~~~~~~ Collection of useful functions for common use cases """ from contextlib import contextmanager import datetime import email.utils import os import warnings import appdirs import requests import tables def download_file(url, path, check_modified=True): """downloads the file locat...
Python
0
@@ -578,31 +578,48 @@ ath) or -_is_empty_file( +not _file_size_matches(request, path):%0A @@ -3987,22 +3987,35 @@ ef _ -is_empty_file( +file_size_matches(request, path @@ -4036,70 +4036,248 @@ rns -t +T rue if -file is empty%22%22%22%0A return os.path.getsize(path) == 0 +request content-length header mat...
2c08aec2777341fdd4d50d909630d1069ffd6d96
Update settings for wsgi location.
example/example/settings.py
example/example/settings.py
# Django settings for example project. import os import dj_database_url BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) DEBUG = os.environ.get('DEBUG', 'on') == 'on' TEMPLATE_DEBUG = DEBUG ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '').split(';') DATABASES = { 'default': dj...
Python
0
@@ -3023,16 +3023,24 @@ TION = ' +example. wsgi.app
45fc4f199dc3dac48d09502af96dc3342788aa48
remove redundant phrase on explanation
algorithms/sorting/insertion.py
algorithms/sorting/insertion.py
from six.moves import range __all__ = ('insertion_sort',) def insertion_sort(array, method='forloop'): """ Sorts `array` similarly as we sort a deck of cards. Start with an empty left hand and cards on the table facing down. We pick a card from the table and find the appropriate position on the left ha...
Python
0.998768
@@ -759,49 +759,8 @@ m%60,%0A - Try to insert it on the left%0A @@ -836,20 +836,16 @@ - If found @@ -858,20 +858,16 @@ - - Remove p @@ -897,20 +897,16 @@ osition%0A -