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
9cb694e3ca0f5c0296579f427c59558ac7bfa59b
Update python example
snippet/example/python/gunicorn-conf.py
snippet/example/python/gunicorn-conf.py
# -*- encoding: utf-8 -*- # Notice: This config file is a Python module file. import multiprocessing appname = "sgapi" # [Gunicorn Setting] daemon = True bind = "0.0.0.0:10100" errorlog = "/log/sgapi/{}.log".format(appname) pidfile = "/log/sgapi/{}.pid".format(appname) proc_name = appname worker_class = "gevent" wor...
Python
0.000001
@@ -107,21 +107,25 @@ name = %22 -sgapi +%7BAPPNAME%7D %22%0A%0A# %5BGu @@ -194,23 +194,34 @@ = %22/log/ -sgapi/%7B +%7Bappname%7D/%7Bappname %7D.log%22.f @@ -233,16 +233,24 @@ (appname +=appname )%0Apidfil @@ -263,15 +263,26 @@ log/ -sgapi/%7B +%7Bappname%7D/%7Bappname %7D.pi @@ -298,16 +298,24 @@ (appname +=...
f63a174dd35731b6737e4f653139d92bd2f57aef
Add a location destroyed hook
lab/hookspec.py
lab/hookspec.py
import pytest @pytest.hookspec def pytest_lab_configure(envmanager): """pytestlab startup""" @pytest.hookspec(historic=True) def pytest_lab_addroles(config, rolemanager): """new role registered""" # TODO: Hook for publishing new role **should not** be historic - this # no longer makes sense. Roles can now...
Python
0
@@ -775,32 +775,182 @@ oyed.%0A %22%22%22%0A%0A%0A +@pytest.hookspec%0Adef pytest_lab_location_destroyed(config, location):%0A %22%22%22Called when a location is released by the environment manager.%0A %22%22%22%0A%0A%0A @pytest.hookspec
fbe7b34c575e30114c54587952c9aa919bc28d81
Add import of django-annoying patch
south/introspection_plugins/__init__.py
south/introspection_plugins/__init__.py
# This module contains built-in introspector plugins for various common # Django apps. # These imports trigger the lower-down files import south.introspection_plugins.geodjango import south.introspection_plugins.django_tagging import south.introspection_plugins.django_taggit import south.introspection_plugins.django_o...
Python
0
@@ -329,10 +329,67 @@ missions +%0Aimport south.introspection_plugins.annoying_autoonetoone %0A%0A
b94286de30fdd154cfcd1c88889819c047693f7a
Fix regression test
spacy/tests/regression/test_issue595.py
spacy/tests/regression/test_issue595.py
# coding: utf-8 from __future__ import unicode_literals from ...symbols import POS, VERB, VerbForm_inf from ...vocab import Vocab from ...lemmatizer import Lemmatizer from ..util import get_doc import pytest def test_issue595(): """Test lemmatization of base forms""" words = ["Do", "n't", "feed", "the", "do...
Python
0.000064
@@ -353,17 +353,8 @@ ERB, - 'morph': Ver @@ -362,16 +362,22 @@ Form_inf +: True %7D%7D%0A r
46f53d845d29508a08617fc5c8ce514824ecbf00
fix update_database import
assignment_dashboard/commands.py
assignment_dashboard/commands.py
import os import sys import click import update_database from alembic import command from alembic.config import Config from . import app from .database import db, session from .model_helpers import update_names_from_csv from .models import Assignment, Repo, User def assert_github_token(): token_name = 'GITHUB_...
Python
0.000001
@@ -33,31 +33,8 @@ ck%0A%0A -import update_database%0A from @@ -109,16 +109,33 @@ port app +, update_database %0Afrom .d
79a78eed1198b83a785682f0adcbf1a6b9bf09ae
Fix Dinner donor subscription names.
astrobin_apps_donations/utils.py
astrobin_apps_donations/utils.py
from subscription.models import UserSubscription SUBSCRIPTION_NAMES = ( 'AstroBin Donor Coffee Monthly', 'AstroBin Donor Snack Monthly', 'AstroBin Donor Pizza Monthly', 'AstroBin Donor Movie Monthly', 'AstorBin Donor Dinner Monthly', 'AstroBin Donor Coffee Yearly', 'AstroBin Donor Snack Ye...
Python
0
@@ -211,34 +211,34 @@ nthly',%0A 'Ast -o r +o Bin Donor Dinner @@ -398,18 +398,18 @@ 'Ast -o r +o Bin Dono
1947d222830803093a37f7ca90ff889908692fcb
add explicit check against Python 3.0/3.1.
lib/__init__.py
lib/__init__.py
''' anorack's private modules ''' type(...) # Python >= 3 is required
Python
0
@@ -28,16 +28,28 @@ es%0A'''%0A%0A +import sys%0A%0A type(... @@ -77,8 +77,130 @@ equired%0A +if sys.version_info %3C (3, 2):%0A raise RuntimeError('Python %3E= 3.2 is required')%0A%0A__all__ = %5B%5D%0A%0A# vim:ts=4 sts=4 sw=4 et%0A
53333456ae5e7476ff61a8402638bb54348aaa57
Add ParameterValue __unicode__ method.
src/damis/models.py
src/damis/models.py
from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse # from django.contrib.contenttypes import generic # from django.contrib.contenttypes.models import ContentType class DatasetLicense(models.Model...
Python
0
@@ -5350,28 +5350,116 @@ ue', null=True, blank=True)%0A +%0A def __unicode__(self):%0A return '%25s: %25s' %25 (self.task.algorithm, self.value)%0A
23ac4ade910b664f3fbb9fd634da6a8a32b620c7
Add specific failing string detail to datetime format test (#148)
babybuddy/tests/tests_formats.py
babybuddy/tests/tests_formats.py
# -*- coding: utf-8 -*- import datetime from django.core.exceptions import ValidationError from django.forms.fields import DateTimeField from django.test import TestCase class FormatsTestCase(TestCase): def test_datetime_input_formats(self): field = DateTimeField() supported_custom_examples = [ ...
Python
0.000001
@@ -517,16 +517,37 @@ amples:%0A + try:%0A @@ -584,16 +584,20 @@ xample)%0A + @@ -648,16 +648,128 @@ atetime) +%0A except ValidationError:%0A self.fail('Format of %22%7B%7D%22 not recognized!'.format(example)) %0A%0A
b8526da20e215e883da78a42d8034b2d9a4d2f82
update simple_client.py
bindings/python/simple_client.py
bindings/python/simple_client.py
#!/bin/python # Copyright Arvid Norberg 2008. Use, modification and distribution is # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import libtorrent as lt import time ses = lt.session() ses.listen_on(6881, 6891) e = lt....
Python
0.000001
@@ -383,16 +383,192 @@ nfo(e)%0A%0A +atp = %7B%7D%0Aatp%5B%22ti%22%5D = info%0Aatp%5B%22save_path%22%5D = %22./%22%0Aatp%5B%22storage_mode%22%5D = lt.storage_mode_t(1)%0Aatp%5B%22paused%22%5D = False%0Aatp%5B%22auto_managed%22%5D = True%0Aatp%5B%22duplicate_is_error%22%5D = True%0A%0A h = ses. @@ -583,18 +583,11 @@ ...
a857e572c02b48053cda422aff26b1bdf6922daf
check statuscode (closes #5)
calflate/__init__.py
calflate/__init__.py
# -*- encoding: utf-8 -*- # AUTHOR: http://www.christoph-polcin.com # LICENSE: FreeBSD License # CREATED: 2014-01-16 from base64 import encodestring from optparse import OptionParser from os import path import re from urllib2 import Request, urlopen def calflate(SRC, DST, options): items = get_items(get_calendar...
Python
0
@@ -1276,20 +1276,22 @@ TE'%0A -p = +is_ok( urlopen( @@ -1288,24 +1288,25 @@ k(urlopen(r) +) %0A%0Adef put_it @@ -1621,16 +1621,22 @@ UT'%0A +is_ok( urlopen( @@ -1637,16 +1637,138 @@ lopen(r) +)%0A%0Adef is_ok(response):%0A if response.getcode() %3C 200 or response.getcode() %3E= 300:%0A raise...
83de10dccf921ced05e3801e660b7f9c286f4d3a
Remove commented code
sqlalchemy_continuum/reverter.py
sqlalchemy_continuum/reverter.py
#from itertools import chain import sqlalchemy as sa #from sqlalchemy_utils.functions import primary_keys from .operation import Operation from .utils import versioned_column_properties, parent_class def first_level(paths): for path in paths: yield path.split('.')[0] def subpaths(paths, name): for p...
Python
0
@@ -1,109 +1,27 @@ -#from itertools import chain%0Aimport sqlalchemy as sa%0A#from sqlalchemy_utils.functions import primary_keys +import sqlalchemy as sa %0Afro
fcd9ceb45e4903c532fe428eba6516d16f58fcaa
Fix pkg-config.py default output after r248477.
build/config/linux/pkg-config.py
build/config/linux/pkg-config.py
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import os import subprocess import sys import re from optparse import OptionParser # This script runs pkg-config, optionally filtering out s...
Python
0.000312
@@ -1245,16 +1245,19 @@ %5B%5D,%5B%5D,%5B%5D +,%5B%5D %5D%22%0A sys
0d8585a2ab57ca4d8f3f4ee2429a2137f2045c6a
Return 0 as an int rather than a string.
bumblebee/modules/arch-update.py
bumblebee/modules/arch-update.py
"""Check updates to Arch Linux.""" import subprocess import bumblebee.input import bumblebee.output import bumblebee.engine class Module(bumblebee.engine.Module): def __init__(self, engine, config): widget = bumblebee.output.Widget(full_text=self.utilization) super(Module, self).__init__(engine,...
Python
0
@@ -770,11 +770,9 @@ urn -'0' +0 %0A%0A
4fa2fadad4bf43668cbbd97a57f4c05635530d6a
Version 28.3.0.
cantools/__init__.py
cantools/__init__.py
from __future__ import print_function import sys import argparse import re import binascii import struct from . import database from .database.utils import format_and from . import tester # Remove once less users are using the old package structure. from . import database as db __author__ = 'Erik Moqvist' __version_...
Python
0
@@ -321,17 +321,17 @@ _ = '28. -2 +3 .0'%0A%0A%0A#
118f99a239a7851665bd095c8bbeae915cfcf980
add exproxy bundle group.
TWLight/ezproxy/views.py
TWLight/ezproxy/views.py
# -*- coding: utf-8 -*- import hashlib import logging import urllib.request, urllib.parse, urllib.error from time import gmtime from calendar import timegm from django.conf import settings from django.core.exceptions import ( PermissionDenied, SuspiciousOperation, ValidationError, ) from django.core.valid...
Python
0
@@ -859,24 +859,112 @@ sername.%22)%0A%0A + if request.user.editor.wp_bundle_eligible:%0A groups.append(%22BUNDLE%22)%0A%0A try:
299a9eca9c2d327410ee45861fd93c012ebbd386
Remove email as an argument
cihui/handler/api.py
cihui/handler/api.py
# -*- coding: utf-8 -*- # Copyright (c) 2014 Geoff van der Meer <gmwils@gmail.com> from base64 import b64encode from cihui.handler import common from datetime import datetime, timedelta from tornado import gen import base64 import functools import json import logging import tornado.httpclient import tornado.web impor...
Python
0.000282
@@ -2898,15 +2898,8 @@ self -, email ):%0A
5d89191538f2fb2a45e8fbb2c50c1500b3cd1a4a
Bump version to 3.1.1
wsgidav/__init__.py
wsgidav/__init__.py
# -*- coding: utf-8 -*- """ Current WsgiDAV version number. See https://www.python.org/dev/peps/pep-0440 Examples Pre-releases (alpha, beta, release candidate): '3.0.0a1', '3.0.0b1', '3.0.0rc1' Final Release: '3.0.0' Developmental release (to mark 3.0.0 as 'used'. Don't publish this): ...
Python
0.000001
@@ -478,11 +478,8 @@ .1.1 --a1 %22%0A%0A#
0c43c2305ea5ba81011dfc95593d7c725212760a
Bump version
wsproto/__init__.py
wsproto/__init__.py
# -*- coding: utf-8 -*- """ wsproto ~~~ A WebSocket implementation. """ __version__ = "0.10.0"
Python
0
@@ -85,13 +85,13 @@ _ = %220.1 -0 +1 .0%22%0A
527566810b85047fa1aa4844e996a0a7bca46493
Check tagged documents are routes only
c2corg_api/views/document_tag.py
c2corg_api/views/document_tag.py
import logging from c2corg_api import DBSession from c2corg_api.models.document import Document from c2corg_api.models.document_tag import DocumentTag, DocumentTagLog from c2corg_api.models.route import ROUTE_TYPE from c2corg_api.search.notify_sync import notify_es_syncer from c2corg_api.views import cors_policy, rest...
Python
0
@@ -1101,16 +1101,69 @@ t exists +, is a route and%0A not merged with another document .%0A %22%22 @@ -1319,32 +1319,130 @@ document_id). %5C%0A + filter(Document.type == ROUTE_TYPE). %5C%0A filter(Document.redirects_to.is_(None)). %5C%0A exists()
bb1ff690d319ab87d71efd1768c7901c50edcdca
set pool size to number of colors available
chef_solo_cup/commands/runner.py
chef_solo_cup/commands/runner.py
from __future__ import with_statement import argparse import collections import logging import multiprocessing import random import Queue import signal import sys import time from fabric.api import env from fabric.exceptions import NetworkError from chef_solo_cup.helpers import run_dry, sudo_dry from chef_solo_cup.l...
Python
0
@@ -2134,39 +2134,51 @@ e = -multiprocessing.cpu_count() * 2 +6 # we don't have more colors than this :P %0A
3bc09b149d5c52efa33ddfe0e03119ae78caf101
fix name of receiver in emails
ckanext/reminder/logic/action.py
ckanext/reminder/logic/action.py
from ckan.common import request, _ from pylons import config from ckan import model from ckan.lib.mailer import mail_user from ckan.lib.mailer import mail_recipient from ckanext.reminder.model import Reminder, ReminderSubscriptionPackageAssociation from ckan.logic import ValidationError import ckan.logic as logic impo...
Python
0.998384
@@ -1390,31 +1390,18 @@ cipient( -recipient_email +%22%22 , recipi @@ -4148,35 +4148,10 @@ ent( -subscriber.subscriber_email +%22%22 , su
7e5fd0ad1f9e6f77e602d0bb9e2757d239df46f6
Allow empty location.
_scripts/cfdoc_qa.py
_scripts/cfdoc_qa.py
# The MIT License (MIT) # # Copyright (c) 2013 CFEngine AS # # 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, modif...
Python
0.000028
@@ -2061,32 +2061,52 @@ ile.write(%22%5Cn%22)%0A +%09if len(location):%0A%09 %09logfile.write(%22
27650d81ae3c9d4877df438d8a2e5f15bca8aa31
Handle readline safely, as it might raise an EOFError or IOError
classified/probe/ssl/__init__.py
classified/probe/ssl/__init__.py
# Python imports import stat # Project imports from classified.probe.base import Probe class SSL(Probe): target = ('text/*',) format = '{filename}[{line:d}]: {key_info} {key_type} {username}' def probe(self, item): item.open() try: key = False key_info = ['plainte...
Python
0.000002
@@ -460,38 +460,127 @@ -data = item.readline() +try:%0A data = item.readline()%0A except Exception, e:%0A break%0A %0A @@ -786,25 +786,25 @@ y = 'RSA pri -v +) ate key'%0A @@ -1414,38 +1414,127 @@ -data = item.readline() +try:%0A ...
a227448de3925bb5b1a4c97623c580e40a06f618
Make tool names case-insensitive
lib/settings.py
lib/settings.py
import sublime import platform import re from os import path from . import debug basepackage = re.sub(r"\.lib$", "", __package__) host_settings = None platform_settings = None user_settings = None _tool_list = None _tool_map = None _plugin_loaded = False _on_plugin_loaded_callbacks = list() d...
Python
0.999999
@@ -2329,16 +2329,24 @@ (tool_id +.lower() , None)%0D @@ -3063,24 +3063,57 @@ %22%5D = key%0D%0A%0D%0A + key = key.lower()%0D%0A%0D%0A
210358dabedca59e81fcf3eeec47586823b3f57f
Version bumpt to 0.2.2
aberdeen/__init__.py
aberdeen/__init__.py
#!/usr/bin/env python3 # # aberdeen # """ A static file CMS generator """ __author__ = "Andrew Kubera" __version__ = "0.2.1" __license__ = "Apache 2.0" __contact__ = 'andrew.kubera@gmail.com' __homepage__ = 'https://github.com/akubera/aberdeen' import sys def read_config(repo_path='.'): from configparser import C...
Python
0.000001
@@ -115,17 +115,17 @@ = %220.2. -1 +2 %22%0A__lice
89ebf52fa951091304fe18b8cdfb939b2da9f602
remove extra quotes in bullet_train key
accelerator/utils.py
accelerator/utils.py
from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Permission from bullet_train import BulletTrain from django.conf import settings def create_mc_permission(permission): ct, _ = ContentType.objects.get_or_create( app_label="mc", model=permission.conte...
Python
0
@@ -699,69 +699,199 @@ -bt = BulletTrain(environment_id=settings.BULLET_TRAIN_API_KEY +if settings.BULLET_TRAIN_API_KEY:%0A bullet_tran_key = settings.BULLET_TRAIN_API_KEY.strip('%22')%0A else:%0A bullet_tran_key = ''%0A bt = BulletTrain(environment_id=bullet_tran_key )%0A
95e619f4e54b1d4b5033e959cece6ab0b72f8e9e
Fix backwards compat issue
aligner/archive.py
aligner/archive.py
import os import pickle from tempfile import mkdtemp from shutil import copy, copyfile, rmtree, make_archive, unpack_archive # default format for output FORMAT = "zip" class Archive(object): """ Class representing data in a directory or archive file (zip, tar, tar.gz/tgz) Largely duplicated from...
Python
0.000013
@@ -2306,37 +2306,49 @@ = True)%0A -copy( +ali_model_path = os.path.join(sel @@ -2374,39 +2374,147 @@ al.mdl') -, destination)%0A +%0A if os.path.exists(ali_model_path):%0A copyfile(ali_model_path, os.path.join(destination, 'final.mdl'))%0A copy(os. @@ -2497,36 +2497,42 @@ dl...
6965f7992ceff4ad59294db3f15cbf2d6d95a222
Constrain output of sugar tests to ASCII
yepes/test/sugar.py
yepes/test/sugar.py
# -*- coding:utf-8 -*- from __future__ import unicode_literals from unittest import TestResult, TextTestRunner from django.test.runner import DiscoverRunner __all__ = ('SugarDiscoverRunner', 'SugarTestResult', 'SugarTestRunner') TERMINAL_COLORS = { 'error': '\033[1;91m', # Bold, Light red 'gray': '\033[...
Python
0.999999
@@ -834,33 +834,33 @@ ORS%5B'error'%5D + ' -%E2%A8%AF +x ' + TERMINAL_COL @@ -1030,25 +1030,25 @@ %5B'info'%5D + ' -%E2%A8%AF +x ' + TERMINAL @@ -1202,9 +1202,9 @@ + ' -%E2%A8%AF +x ' + @@ -1525,25 +1525,25 @@ uccess'%5D + ' -%E2%9C%93 +. ' + TERMINAL @@ -1737,9 +1737,9 @@ + ' -%E2%9C%93 +. ' +
e6418e667ba38e8386ebbc27bac2c15ff0aca4f2
Disable autoflush in timespan query get to avoid collisions
lib/timespan.py
lib/timespan.py
import re import calendar from dateutil.parser import parse from tasks.meta import OBSTimespan, current_session QUARTERS = {1: 'first', 2: 'second', 3: 'third', 4: 'fourth'} def get_timespan(timespan_id): ts_id, ts_alias, ts_name, ts_description, ts_timespan = parse_timespan(t...
Python
0
@@ -325,16 +325,169 @@ pan_id)%0A + session = current_session()%0A with session.no_autoflush:%0A timespan = session.query(OBSTimespan).get(ts_id)%0A if not timespan:%0A time @@ -595,16 +595,20 @@ mespan)%0A + retu @@ -610,33 +610,23 @@ return -current_ session -() .merge...
5c828795ad9b3322cad817914826dfc8cbe82b22
fix import bug
aip/imfs/__init__.py
aip/imfs/__init__.py
Python
0.000001
@@ -0,0 +1,60 @@ +from .base import ImfsError, NotFoundError, ConnectionError%0A
5f422542135a5009a02815ece5c1cade2fbe9ba7
fix up normalize_utf8 method
lib/xml_util.py
lib/xml_util.py
#!/usr/bin/env python """ Collection of useful functions and tools for working with XML documents """ import re from itertools import chain, izip from unicodedata import normalize def flatten(ls_of_ls): """ Takes in a list of lists, returns a new list of lists where list `i` contains the `i`th element fr...
Python
0.000125
@@ -1496,16 +1496,17 @@ (string, + unicode) @@ -1593,21 +1593,28 @@ C', -unicode(string +string.decode('utf-8' ))%0A
25cd9af4579990f22e23953a86b8a29b80ca5c46
Make password_confirmation be compared to password
api/serializers.py
api/serializers.py
from pip._vendor.requests.api import post from rest_framework.serializers import ModelSerializer from rest_framework import serializers from api.models import Comment, Badge from api.models import Image from api.models import Medal from api.models import Post from api.models import Rating from api.models import Tag fr...
Python
0.999996
@@ -807,32 +807,119 @@ delSerializer):%0A + password_confirmation = serializers.CharField(allow_blank=False, write_only=True)%0A%0A class Meta:%0A @@ -1034,16 +1034,41 @@ assword' +, 'password_confirmation' )%0A @@ -1204,97 +1204,37 @@ -# Exclude password_confirmation from user creation%0A ...
abdde2eebdfff4d9394a74ae21bdc6bd8f4a2e90
Fix sutdent test.
api/serializers.py
api/serializers.py
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth import authenticate from rest_framework import serializers, exceptions from rest_framework.authtoken.serializers import AuthTokenSerializer from activities.mode...
Python
0.000001
@@ -1331,16 +1331,31 @@ = user. +common_profile. college%0A
21b405f1968dd75a663b253feb19d730af34d380
Revert to old entry point.
docker-entrypoint.py
docker-entrypoint.py
#!/usr/bin/env python3 # Single entry point / dispatcher for simplified running of 'pman' import os from argparse import RawTextHelpFormatter from argparse import ArgumentParser str_desc = """ NAME docker-entrypoint.py SYNOPSIS docker-entrypoint.py [optional cmd args for...
Python
0.000001
@@ -551,24 +551,26 @@ herArgs)%0A + # str_CMD = %22
36d284ff6de4e341afb6d9a68e2587ecb66313a8
Fix hash in config
alerts/lib/config.py
alerts/lib/config.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 http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # # Contributors: # Anthony Verez averez@mozilla.com # Je...
Python
0.000064
@@ -745,16 +745,17 @@ ='*/2')%7D +, %0A 'un
624430e4571ee85e935c24b39cfe9520ef5499ce
Use new basekey location
libnacl/dual.py
libnacl/dual.py
''' The dual key system allows for the creation of keypairs that contain both cryptographic and signing keys ''' # import libnacl libs import libnacl import libnacl.utils import libnacl.public import libnacl.sign class DualSecret(libnacl.utils.BaseKey): ''' Manage crypt and sign keys in one object ''' ...
Python
0
@@ -158,21 +158,20 @@ libnacl. -utils +base %0Aimport @@ -236,13 +236,12 @@ acl. -utils +base .Bas
a57277c640fa53b8042e731d2f90db3466c26912
Fix setting response headers
src/clubbable/dropboxer/views.py
src/clubbable/dropboxer/views.py
import hashlib import hmac import json import logging from functools import wraps from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import user_passes_test from django.http import ( HttpResponseRedirect, HttpResponseForbidden, HttpResponseBadRequest, ...
Python
0.000002
@@ -3587,36 +3587,40 @@ , '')%0A re -turn +sponse = HttpResponse(ch @@ -3632,46 +3632,21 @@ ge, -headers=%7B%0A 'C +c ontent --Type': +_type= 'tex @@ -3653,17 +3653,17 @@ t/plain' -, +) %0A @@ -3663,20 +3663,25 @@ - +response%5B 'X-Conte @@ -3696,17 +3696,19 @@ Options...
e1b7ba8bbbd4435977590e7bebc52bad0411b36b
Remove unused import
alignak_app/popup.py
alignak_app/popup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2016: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Sof...
Python
0.000001
@@ -850,19 +850,8 @@ %22%22%0A%0A -import sys%0A from
548b740bc34b502fb965a93dc66382e1dd9f623c
Remove unused import
donut/email_utils.py
donut/email_utils.py
import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart def send_email(to, text, subject, use_prefix=True, group=None): """ Sends an email to a user. Expects 'to' to be a comma separated string of emails, and for 'msg' and 'subject' to be strings. If group is...
Python
0.000001
@@ -49,55 +49,8 @@ ext%0A -from email.mime.multipart import MIMEMultipart%0A %0A%0Ade @@ -348,17 +348,16 @@ %22%22%22%0A -%0A msg @@ -375,16 +375,8 @@ text -, %22html%22 )%0A
2d4befbff34944e6385b80b84857c84adb84a1da
update errorcode.py
dop/dop/errorcode.py
dop/dop/errorcode.py
# coding:utf-8 ################### # version 0.1 # author 王节红, ################### # 错误号 英文代码 中文描述 备注 CONSTANT = { "100001": ["Required field can not be empty", u"必填字段不能空"], "100002": ["Request type error", u"请求类型错误"], "100003": ["Check forbidden words throw exception.", u"禁词检查出现异常"], "100004...
Python
0.000001
@@ -1337,16 +1337,139 @@ API%E6%8E%A5%E5%8F%A3%22%5D, +%0A %22300032%22: %5B%22Update interface fail%22, u%22%E6%9B%B4%E6%96%B0API%E6%8E%A5%E5%8F%A3%E5%A4%B1%E8%B4%A5%22%5D,%0A %22300033%22: %5B%22Update interface throw exception%22, u%22%E6%9B%B4%E6%96%B0API%E6%8E%A5%E5%8F%A3%E5%87%BA%E7%8E%B0%E5%BC%82%E5%B8%B8...
022e867499446fdaf6c3ac110eb56331a1a7eee1
Tweak comments
drivetestbed/http.py
drivetestbed/http.py
# mock http service that intercepts calls to allow Drive to work locally import json from urlparse import urlparse, parse_qs from httplib2 import Response from drivetestbed.services import ServiceDirectory from routes import Mapper class TestbedHttp(object): def __init__(self, files=None): self._services ...
Python
0
@@ -226,16 +226,17 @@ Mapper%0A%0A +%0A class Te @@ -408,132 +408,8 @@ s):%0A - # figure out how to dispatch the URL%0A # TODO -- look into setting up a Flask app or something to do routing%0A%0A @@ -482,16 +482,79 @@ i.path:%0A + # TODO -- use Routes for discovery service as well%0A ...
6b98eb3a036f470eccb31bb12c378c55e56fdeb4
Update __init__.py
dsxtools/__init__.py
dsxtools/__init__.py
from dsxtools.objectStore import objectStore
Python
0.000072
@@ -1,8 +1,32 @@ +%0Afrom io import StringIO %0Afrom ds
ff882c0b55bb46836d86189f2353a3806bbfa4ec
Bump version to 0.4
django_tenant_templates/__init__.py
django_tenant_templates/__init__.py
""" Django Tenant Templates """ from threading import local as _local version = '0.3' local = _local() local.tenant_slug = None
Python
0
@@ -82,9 +82,9 @@ '0. -3 +4 '%0A%0A%0A
e0dbc65198a2c8808d81331e3200a54634593ff3
Save Author relation updates
api/models/author.py
api/models/author.py
from django.db import models from uuidfield import UUIDField from user import APIUser from api_settings import settings import os def get_image_path(instance, filename): return os.path.join('photos', str(instance.id), filename) class Author(APIUser): """ Extends the existing Django User model as reccomend...
Python
0
@@ -2151,16 +2151,40 @@ (author) +%0A self.save() %0A%0A de @@ -2392,32 +2392,56 @@ ding.add(friend) +%0A self.save() %0A%0A self.f @@ -2676,32 +2676,56 @@ ends.add(friend) +%0A self.save() %0A%0A # upda @@ -3248,32 +3248,56 @@ ests.add(friend) +%0A se...
151b78036067e2b8cec7bd0eabaad5d27b2c37c1
Handle upstream timeouts gracefully
api/streams/views.py
api/streams/views.py
from api.streams.models import StreamConfiguration from django.http import JsonResponse, Http404 from django.http.request import HttpRequest import requests def get_stream_status(request: HttpRequest, stream_slug: str): try: stream = StreamConfiguration.objects.get(slug=stream_slug) except StreamConfig...
Python
0.000001
@@ -289,16 +289,129 @@ am_slug) +%0A%0A r = requests.get('http://%7Bstream.host%7D:%7Bstream.port%7D/status-json.xsl'.format(stream=stream), timeout=5) %0A exc @@ -534,16 +534,18 @@ g))%0A -%0A -r = +except req @@ -554,97 +554,109 @@ sts. -get('http://%7Bstream.host%7D:%7Bstream.port%7D/status-jso...
50cae9a8ad848febe741dfac0928b1fd8ff2bd9f
Revert to using Python sorted instead of reflection_table.sort, as introduced by 3ad45d4, because the latter can't handle composite data types like miller_index and vec3_double
command_line/sort_reflections.py
command_line/sort_reflections.py
#!/usr/bin/env python # # dials.sort_reflections.py # # Copyright (C) 2013 STFC Rutherford Appleton Laboratory, UK. # # Author: David Waterman # # This code is distributed under the BSD license, a copy of which is # included in the root directory of this package. # LIBTBX_SET_DISPATCHER_NAME dev.dials.sort_reflect...
Python
0.000001
@@ -373,16 +373,52 @@ load_env +%0Afrom dials.array_family import flex %0A%0Ahelp_m @@ -917,17 +917,16 @@ uld be a -n column @@ -1447,16 +1447,223 @@ ssage)%0A%0A + @staticmethod%0A def sort_permutation(column, reverse=False):%0A indices = flex.size_t_range(len(column))%0A perm = sorted(indices, key=lamb...
85106ebec37381abadc508f3495a92ca06cb8aa3
Implement embedded property functionality
elixir/processors.py
elixir/processors.py
import os.path from elixir import rbxmx class BaseProcessor: """The primary processor class. A processor is what compilers use to determine what happens when they encounter a file or folder. All of the `process` methods return a new instance from `elixir.rbx`. For example, when processing a file...
Python
0
@@ -1337,24 +1337,25 @@ ontent)%0A +%0A return r @@ -1338,38 +1338,40 @@ ntent)%0A%0A -return +script = rbxmx.ScriptEle @@ -1413,16 +1413,80 @@ content) +%0A script.use_embedded_properties()%0A%0A return script %0A%0Aclass
67311e427f87847849c32dc9d472092964c5ae63
Improve type hint formatting for role name command
Discord/cogs/role.py
Discord/cogs/role.py
import discord from discord.ext import commands from operator import attrgetter from utilities import checks def setup(bot): bot.add_cog(Role(bot)) class Role(commands.Cog): def __init__(self, bot): self.bot = bot # Role @commands.group(aliases = ["roles"], invoke_without_command = True, case_insensiti...
Python
0
@@ -3864,33 +3864,32 @@ (self, ctx, role - : discord.Role, @@ -3895,17 +3895,16 @@ *, name - : str =
ef63d85d887bc350f9df14acf8ea952384da4017
Improve discriminator command formatting
Discord/cogs/user.py
Discord/cogs/user.py
import discord from discord.ext import commands import inspect from typing import Optional from modules import utilities from utilities import checks def setup(bot): bot.add_cog(User(bot)) class User(commands.Cog): def __init__(self, bot): self.bot = bot for name, command in inspect.getmembers(self): if...
Python
0.000031
@@ -1868,16 +1868,26 @@ ator%7D%22, +%0A%09%09%09%09%09%09%09%09%09 footer_t
67dea90ed39225f600988ea8eaa2906caca5e915
Use cog check for wows cog
Discord/cogs/wows.py
Discord/cogs/wows.py
from discord.ext import commands import datetime from utilities import checks def setup(bot): bot.add_cog(WoWS(bot)) class WoWS(commands.Cog): def __init__(self, bot): self.bot = bot self.api_urls = {"asia": "https://api.worldofwarships.asia/wows/", "eu": "https://api.worldofwarships.eu/wows/", ...
Python
0
@@ -421,16 +421,90 @@ ws/%22%7D%0A%09%0A +%09def cog_check(self, ctx):%0A%09%09return checks.not_forbidden_predicate(ctx)%0A%09%0A %09@comman @@ -630,33 +630,8 @@ ue)%0A -%09@checks.not_forbidden()%0A %09asy @@ -845,33 +845,8 @@ ue)%0A -%09@checks.not_forbidden()%0A %09asy
3dede50c099bfc340114c9b7448b8644e59112e1
define cache_date_format in backend
backend/backend.py
backend/backend.py
from celery import Celery from celery.utils.log import get_task_logger from os import environ from redis import Redis logger = get_task_logger(__name__) redis_host = environ.get('OMNOMNOM_REDIS_HOST') or 'localhost' redis_port = environ.get('OMNOMNOM_REDIS_PORT') or 6379 cache_interval = environ.get('OMNOMNOM_CACHE_...
Python
0.00001
@@ -527,16 +527,47 @@ atabase) +%0Acache_date_format = '%25Y-%25m-%25d' %0A%0Aapp =
64652f603c89d8871ce11af938ec3bf8a872f5d0
use Template.set_metadata instead of add_metadata (#1864)
examples/Metadata.py
examples/Metadata.py
from troposphere import Template t = Template() t.set_description("Example to show adding a Metadata section to the template") t.add_metadata({ "Comments": "Initial Draft", "LastUpdated": "Jan 1st 2015", "UpdatedBy": "First Last", "Version": "V1.0", }) print(t.to_json())
Python
0
@@ -125,19 +125,19 @@ ate%22)%0At. -add +set _metadat
a855c9b828c0406ae04d1cc224dab8f754ffcd47
update example with s/set_tags/tags
examples/__init__.py
examples/__init__.py
from __future__ import print_function import sys from zdesk import Zendesk ################################################################ # NEW CONNECTION CLIENT ################################################################ # README: To configure this example so that it will actually execute, you need # to pro...
Python
0
@@ -2831,34 +2831,35 @@ ' -set_ tags': +%5B 'coffee - +', ' drinks' +%5D ,%0A
045ef7b801e99a07b179694285aa104881f307bf
Add docstring to satisfy pylint
examples/__init__.py
examples/__init__.py
# Mininet Examples
Python
0.000001
@@ -1,6 +1,8 @@ -# +%22%22%22%0A Mini @@ -14,8 +14,35 @@ xamples%0A +See README for details%0A%22%22%22%0A
76f3284143e935ec087333dc679f5aad874cd8b7
Add indexes for jesta's tools
src/mongostorage.py
src/mongostorage.py
#!/usr/bin/python # -*- coding: utf-8 -*- import pymongo from pymongo.errors import ConnectionFailure MONGO_HOST = 'localhost' MONGO_PORT = 27017 DB_NAME = 'SteemData' class MongoStorage(object): def __init__(self, db_name=DB_NAME, host=MONGO_HOST, port=MONGO_PORT): try: mongo_url = 'mongodb...
Python
0
@@ -3806,16 +3806,610 @@ -1)%5D)%0A%0A + # 4 jesta's tools%0A self.Operations.create_index(%0A %5B('producer', 1), ('type', 1), ('timestamp', 1)%5D,%0A sparse=True, background=True)%0A self.Operations.create_index(%0A %5B('curator', 1), ('type', 1), ('timestamp', ...
e00353b94d2d0d448d25a4edbcad8a31951a3453
Set a default status page URL that can be overridden by an environment variable
alexa_signiant_status.py
alexa_signiant_status.py
""" Return Signiant Platform Status """ from __future__ import print_function import time import urllib2 import json import os SIGNIANT_STATUS_URL = os.environ['statusPageUrl'] STATUS_PAGE_API_KEY = os.environ['statusPageApiKey'] def get_signiant_status(): ''' :return: dictionary of services with their respe...
Python
0.000001
@@ -122,16 +122,196 @@ ort os%0A%0A +# Default Signiant Status Page URL%0ASIGNIANT_STATUS_URL = 'https://1dmtgkjnl3y3.statuspage.io/api/v2/summary.json'%0ASTATUS_PAGE_API_KEY = None%0A%0Aif 'statusPageUrl' in os.environ:%0A SIGNIANT @@ -352,16 +352,57 @@ geUrl'%5D%0A +if 'statusPageApiKey' in os.environ:%0A ...
56e959efd539e4db408e74c483c7c75bf9968801
Fix bug for Python 3.7
lpc_checksum.py
lpc_checksum.py
#!/usr/bin/env python import sys import struct import argparse import intelhex __version__ = "2.0.0" """ Calculate checksum image for LPC firmware images and write. Code is a Python port of the C version written by Roel Verdult named `lpcrc'. The checksum is the two's-complement of the sum of the first seven 4-byte...
Python
0.00001
@@ -2205,17 +2205,8 @@ ray( -map(ord, hand @@ -2239,17 +2239,16 @@ _TOTAL)) -) %0A%0A if
4228574868a2ab72214ed5d2f3fab55134d9c1bb
add traited example to debug script
examples/pe_debug.py
examples/pe_debug.py
import nipype.pipeline.engine as pe import nipype.interfaces.spm as spm import nipype.interfaces.fsl as fsl reload(pe) realign = pe.Node(spm.Realign(), name = 'spmrealign') coreg = pe.Node(spm.Coregister(), name = 'coreg') realign2 = pe.Node(spm.Realign(), name = 'spmrealign2') bet = pe.MapNode(fsl.Bet(), iterfield=[...
Python
0.000001
@@ -431,16 +431,84 @@ ')%5D)%5D)%0A%0A +w1.inputs.spmrealign.fwhm = 0.5%0Aassert(realign.inputs.fwhm == 0.5)%0A%0A w2 = pe.
0e66b47fb3b972d261a8c5705f0e9dc2d08ae74d
Fix #39 Flask RESTful is fully supported
examples/restfull.py
examples/restfull.py
""" FIRST: pip install flask-restful """ from flask import Flask from flasgger import Swagger from flask_restful import reqparse, abort, Api, Resource app = Flask(__name__) api = Api(app) app.config['SWAGGER'] = { 'title': 'Flasgger RESTful', 'uiversion': 2 } Swagger(app) TODOS = { 'todo1': {'task': 'bui...
Python
0
@@ -86,16 +86,27 @@ Swagger +, swag_from %0Afrom fl @@ -3597,16 +3597,170 @@ , 201%0A%0A%0A +class Username(Resource):%0A @swag_from('username_specs.yml', methods=%5B'GET'%5D)%0A def get(self, username):%0A return %7B'username': username%7D, 200%0A%0A%0A api.add_ @@ -3831,16 +3831,67 @@ o_id%3E')%0A ...
de209b4add50c900a78b828d1df6a3b6d0d58ff2
fix flake8 error
altair/utils/__init__.py
altair/utils/__init__.py
from .core import ( infer_vegalite_type, sanitize_dataframe, parse_shorthand, use_signature, update_subtraits, update_nested, display_traceback, SchemaBase, Undefined ) from .html import spec_to_html from .plugin_registry import PluginRegistry __all__ = ( 'infer_vegalite_type',...
Python
0.000001
@@ -336,24 +336,44 @@ dataframe',%0A + 'spec_to_html',%0A 'parse_s
9ff63d002293da44871307960d5b439b5e6ba48f
Remove 'lights' command for a while
app/commands/help.py
app/commands/help.py
def proc(command, message): return { "data": { "status": "ok", "html": """ <p> Hi! I can control your Raspberry Pi. Send me the commands <b>in bold</b> to make me do stuff.<br><br> &#128247; camera controls<br> ...
Python
0.001624
@@ -404,249 +404,8 @@ %0A - &#128161; light controls%3Cbr%3E%0A %3Cb%3Elights on %3Ci%3Ecolor%3C/i%3E%3C/b%3E: I will shine with the specified %3Ci%3Ecolor%3C/i%3E (red, green, blue)%3Cbr%3E%0A %3Cb%3Elights off%3C/b%3E: I will stop shining!%3Cbr%3E%3Cbr%3E%0A ...
d9e959c54450b6854b9d567b9a13e0a2395eb124
fix filesize which went missing in master
bepasty_cli/cli.py
bepasty_cli/cli.py
#!/usr/bin/env python # Copyright: 2014 Dennis Schmalacker <github@progde.de> # License: BSD 2-clause, see LICENSE for details. """ commandline client for bepasty-server """ from __future__ import print_function import base64 from io import BytesIO import os import sys import click import magic import requests @c...
Python
0.000001
@@ -1248,16 +1248,38 @@ ilename%0A + stdin = False%0A else @@ -2118,16 +2118,198 @@ k # EOF +%0A if stdin:%0A if raw_data_size %3C read_size:%0A filesize = offset + raw_data_size%0A else:%0A filesize = offset + raw_data_size + 1 %0A%0A
2897b0fe0e41c6fe81637540e603b3697ffa974d
correct bug
connector_web_product/product.py
connector_web_product/product.py
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
Python
0.000004
@@ -2323,32 +2323,26 @@ -connector.host, connecto +server.host, serve r.po
0a6b43f2202cb63aad18c119d7d46916b4d54873
Make it easier to load the initial page
examples/site-api.py
examples/site-api.py
#!/usr/bin/env python # Sets up a basic site that can allow two browsers to connect to each # other via WebRTC DataChannels, sending connection events via WebSockets. from flask import Flask, send_from_directory from flask_sockets import Sockets import json app = Flask(__name__) sockets = Sockets(app) channels = {}...
Python
0.000006
@@ -1003,26 +1003,16 @@ route('/ -index.html ')%0Adef s
38f9b888539996fdfa7dfa3ca26f8545d535b7fd
Print statement as function call
examples/tracking.py
examples/tracking.py
import shippo ''' In this tutorial we have an order with a sender address, recipient address and parcel information that we need to ship. ''' # Replace <API-KEY> with your key shippo.config.api_key = "<API-KEY>" # Tracking based on a Shippo transaction transaction_id = '<TRANSACTION-ID>' transaction = shippo.Transac...
Python
0.000076
@@ -834,17 +834,16 @@ r_token, - %0A tra @@ -871,17 +871,16 @@ _number, - %0A met @@ -924,14 +924,15 @@ '%0A)%0A +%0A print - +( webh @@ -943,19 +943,21 @@ response +) %0A%0A# + For more @@ -1057,16 +1057,17 @@ ut our%0A# + complete
1f301bdc44852cfdd2d8d92ecf8e9c72f68dbe44
fix tutorial
examples/tutorial.py
examples/tutorial.py
from xenon import ( PasswordCredential, FileSystem, CopyRequest, Path, CopyStatus, Scheduler, JobDescription) tmpdir = Path('.') location = '0.0.0.0:10022' # # step 0: write our script # sleep_script = [ "#!/bin/bash", "echo \"Sleeping for $1 second(s).\"", "sleep $1" ] with open(tmpdir / 'sleep...
Python
0.000001
@@ -111,16 +111,43 @@ iption)%0A +import xenon%0A%0A%0Axenon.init() %0A%0Atmpdir @@ -155,17 +155,21 @@ = Path(' -. +/tmp/ ')%0Alocat @@ -325,24 +325,28 @@ %0A%0Awith open( +str( tmpdir / 'sl @@ -352,16 +352,17 @@ leep.sh' +) , 'w') a @@ -1551,16 +1551,24 @@ us.error +_message )%0A%0A#%0A# s @@ -2562,21 +2562,...
13b65b7ddcb84d6a214cb3858070c6706b034e5b
Add transaction verification API
api/mastercoin_verify.py
api/mastercoin_verify.py
import os import glob from flask import Flask, request, jsonify, abort, json data_dir_root = os.environ.get('DATADIR') app = Flask(__name__) app.debug = True @app.route('/addresses') def addresses(): currency_id = request.args.get('currency_id') response = [] addr_glob = glob.glob(data_dir_root + '/addr/*.jso...
Python
0
@@ -1120,17 +1120,1394 @@ e):%0A -%0A return %22%22 + currency_id = request.args.get('currency_id')%0A%0A print address, currency_id%0A%0A if address == None:%0A abort(400)%0A%0A if not exists(address):%0A abort(404)%0A%0A addr = read(address)%0A transactions = %5B%5D%0A tx_lists = %5B'accept_transaction...
c90f47b14e019fecb0280ed1f7cefeefc6484135
print config
marsi/config.py
marsi/config.py
# Copyright 2016 Chr. Hansen A/S and The Novo Nordisk Foundation Center for Biosustainability, DTU. # 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....
Python
0.000234
@@ -2906,16 +2906,306 @@ fp(file) +%0A%0A print(%22Configuration:%22)%0A for section_name in config.sections():%0A print('Section:', section_name)%0A print(' Options:', config.options(section_name))%0A for name, value in config.items(section_name):%0A print(' %25s = %25s' %25 (n...
281375dee857d3a5373a13d2ba9e8345e54e842a
Add force_bytes to ensure bytes.
marvin/utils.py
marvin/utils.py
""" marvin.utils ~~~~~~~~~~~~ A collection of utilities that might be handy in several places in the marvin code. """ from . import generic_error_handler from flask import abort, current_app, g, request from flask.ext.principal import identity_changed, Identity from itsdangerous import BadData, constant...
Python
0
@@ -1283,24 +1283,426 @@ n.utils')%0A%0A%0A +def _generate_salt_bytes():%0A %22%22%22 Generate a random bytestring that can be used as a cryptographic salt.%0A%0A The resulting bytestring will be approx 88 bytes long, 64 bytes of pure randomness%0A and 33%25 overhead due to base64-encoding the result.%0A %...
72222dd7dcf08ad13937edd1b01a75df0a71f67f
Bump app version to 2018.12
app/handlers/__init__.py
app/handlers/__init__.py
__version__ = "2018.11" __versionfull__ = __version__
Python
0
@@ -14,17 +14,17 @@ %222018.1 -1 +2 %22%0A__vers
080c8d9a1f225730ff424d87422e1daaddc70102
decrease the waiting time for syninc in Drupal
core/deployers/drupaldeployer.py
core/deployers/drupaldeployer.py
import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) import logging import re import time import traceback from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_con...
Python
0.000001
@@ -6014,25 +6014,18 @@ e.sleep( -WAIT_TIME +10 )%0A%0A
034de1c45601e550289b1d076006e9364150f162
Add redirection from the root URL to the catalogue index.
src/oscar/config.py
src/oscar/config.py
# flake8: noqa, because URL syntax is more readable with long lines from django.apps import apps from django.conf import settings from django.conf.urls import url from django.urls import reverse_lazy from oscar.core.application import OscarConfig from oscar.core.loading import get_class class Shop(OscarConfig): ...
Python
0
@@ -193,16 +193,67 @@ rse_lazy +%0Afrom django.views.generic.base import RedirectView %0A%0Afrom o @@ -1172,16 +1172,112 @@ rls = %5B%0A + url(r'%5E$', RedirectView.as_view(url=reverse_lazy('catalogue:index')), name='home'),%0A
07cdde2cd5d82a5f6f8082458b11ffba43e16637
Remove print statement.
HardwareInterface.py
HardwareInterface.py
import RPi.GPIO as GPIO import time from RecordingQuality import RecordingQuality # sudo pip install enum34 from enum import Enum class RecordingLEDState(Enum): off = 1 on = 2 blinking = 3 # Minimum time between two buton presses for them to register as two separate presses BOUNCE_TIME = 300 # Pin Numbe...
Python
0.000046
@@ -1956,67 +1956,8 @@ l):%0A - print %22handling button on channel: %25d%22 %25 (channel)%0A
44e8a3903aded3566f563daaffcf3439780d3e9f
Fix error when setup callbacks not defined
fapistrano/deploy.py
fapistrano/deploy.py
# -*- coding: utf-8 -*- import os import new from datetime import datetime from fabric.api import runs_once from fabric.api import local from fabric.api import run from fabric.api import env from fabric.api import cd from fabric.api import prefix from fabric.api import task from fabric.api import abort from fabric.ap...
Python
0.000002
@@ -3669,32 +3669,80 @@ anch)s' %25 env)%0A%0A + if callable(first_setup_repo_func):%0A print gr @@ -3767,32 +3767,36 @@ etting up repo'%0A + first_se @@ -4814,32 +4814,78 @@ anch)s' %25 env)%0A%0A + if callable(setup_repo_func):%0A # se @@ -4893,16 +4893,...
3809a1d2854bdcd65a84619a66aea6f64d933726
Delete task decorator on make_async_build_v2
corehq/apps/app_manager/tasks.py
corehq/apps/app_manager/tasks.py
from django.utils.translation import gettext as _ from celery.task import task from celery.utils.log import get_task_logger from corehq.apps.app_manager.dbaccessors import ( get_app, get_auto_generated_built_apps, get_latest_build_id, ) from corehq.apps.app_manager.exceptions import SavedAppBuildException...
Python
0.000001
@@ -927,126 +927,8 @@ )%0A%0A%0A -# Can be deleted after deploy%0A@serial_task('%7Bapp_id%7D-%7Bversion%7D', max_retries=0, timeout=60 * 60, serializer='pickle')%0A def
073859067bcdd684d78eb0ddc2c4ecd1ed1b92f6
Increase chunk size
corehq/apps/userreports/const.py
corehq/apps/userreports/const.py
from __future__ import absolute_import from datetime import timedelta from django.utils.translation import ugettext_lazy as _ from corehq.apps.change_feed import topics REPORT_BUILDER_EVENTS_KEY = 'REPORT_BUILDER_EVENTS_KEY' DATA_SOURCE_NOT_FOUND_ERROR_MESSAGE = _( 'Sorry! There was a problem viewing your report....
Python
0.000001
@@ -1253,9 +1253,10 @@ E = -2 +10 0%0A%0AX
f00f49824d152db2cf896b6af30732a40335d46f
Fix typo
cosmos-cli/cosmos/cli/compute.py
cosmos-cli/cosmos/cli/compute.py
# -*- coding: utf-8 -*- # # Telefónica Digital - Product Development and Innovation # # THIS CODE AND INFORMATION ARE PROVIDED 'AS IS' WITHOUT WARRANTY OF ANY KIND, # EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. # # Copyri...
Python
0.999999
@@ -4716,21 +4716,18 @@ , help=%22 -cl us -t er id%22)%0A
23df510235c51678537bc2ec98de4fe5cf24f8b4
handle 404s for past terms
course_grader/dao/graderoster.py
course_grader/dao/graderoster.py
from uw_sws_graderoster import get_graderoster from uw_sws_graderoster.models import GradeRoster from course_grader.dao.person import person_from_regid from course_grader.dao.section import get_section_by_url, is_grader_for_section from course_grader.dao.term import ( is_grading_period_open, is_grading_period_past)...
Python
0.000002
@@ -484,16 +484,77 @@ eImport%0A +from restclients_core.exceptions import DataFailureException%0A from lxm @@ -1843,24 +1843,41 @@ on.term))):%0A + try:%0A ret_ @@ -1938,32 +1938,36 @@ uestor)%0A + ret_graderoster. @@ -2004,32 +2004,36 @@ section%0A + + ret_graderoster...
7816fde729bfed6b012a4b11318c6067e8f12582
order by update_at desc
bookmarks/views.py
bookmarks/views.py
# -*- coding: utf-8 -*- import uuid from flask import Blueprint from flask_restful import abort, Api, marshal_with, Resource from .extensions import db from .models import Tag, Category, URL from .serializers import ( tag_fields, category_fields, url_fields, url_parser_create, url_parser_update ) api_bp = Bl...
Python
0
@@ -1029,18 +1029,25 @@ URL. -cre +upd ated_at +.desc() ).al
087a0e23dc6387fbb622779e2ce174d6b3c8281f
raise version
brilws/_version.py
brilws/_version.py
__version__ = "0.10.5"
Python
0
@@ -17,7 +17,7 @@ .10. -5 +6 %22%0A
d86ac5d3236b7a016e93f28d01d18dbca35ea209
Fix flipped LOG and LINEAR constants
feeltech/__init__.py
feeltech/__init__.py
# The MIT License (MIT) # # Copyright (c) 2015 Josef Gajdusek # # 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, ...
Python
0
@@ -1395,21 +1395,21 @@ 6%0A%0AL -INEAR +OG = 1%0AL -OG +INEAR = 2
ac65ea3ff380b11c06d2dce3984a7a90abc3ada3
Increase createLink retry count
mininet/util.py
mininet/util.py
#!/usr/bin/env python '''Utility functions for Mininet.''' from time import sleep from resource import setrlimit, RLIMIT_NPROC, RLIMIT_NOFILE import select from subprocess import call, check_call, Popen, PIPE, STDOUT from mininet.logging_mod import lg def run(cmd): '''Simple interface to subprocess.call() ...
Python
0
@@ -2197,24 +2197,25 @@ move_intf: %25 +s not success @@ -4242,16 +4242,42 @@ 0.0001%0A%0A +CREATE_LINK_RETRIES = 10%0A%0A def crea @@ -4550,33 +4550,51 @@ :%0A retry( -3 +CREATE_LINK_RETRIES , MOVEINTF_DELAY @@ -4659,17 +4659,35 @@ retry( -3 +CREATE_LINK_RETRIES , MOVEIN
1a3b3c7e25a229febbeb50038272d65bfda4be56
Fix __str__ for Frame model
src/photo/models.py
src/photo/models.py
""" Django models for the photo application. Models: :model:`photo.Developer`: a film developer :model:`photo.Film`: a type of film :model:`photo.FilmFormat`: a film format :model:`photo.FilmRoll`: an individual roll of film :model:`photo.Manufacturer`: a manufacturer of photo products :model:`...
Python
0
@@ -6611,19 +6611,28 @@ .name, self. -index +frame_number() )%0A
83e3d3383e3683bad6cb881751fa883c3294e876
use 30 seconds prior to the last sync
crate_project/apps/pypi/tasks.py
crate_project/apps/pypi/tasks.py
import collections import datetime import hashlib import logging import re import time import xmlrpclib import redis import requests from celery.task import task from django.conf import settings from packages.models import Package from pypi.processor import PyPIPackage logger = logging.getLogger(__name__) INDEX_U...
Python
0.000001
@@ -1534,64 +1534,13 @@ (s)) -%0A #since = 1320000896%0A #since = 1329500152 + - 30 %0A%0A
b10915aee13eea1bcefcc8426685239e0100cc23
Decrease the size of the font used in the legend
crispy/gui/widgets/plotwidget.py
crispy/gui/widgets/plotwidget.py
# coding: utf-8 # /*########################################################################## # # Copyright (c) 2016-2017 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to d...
Python
0.000092
@@ -1433,10 +1433,10 @@ = ' -14 +23 /02/ @@ -2791,16 +2791,41 @@ legends +, prop=%7B'size': 'medium'%7D )%0A
b395fa59567b08ee67c16988b9f0b151d78959f8
Use slug for G-Cloud 4 & 5 validator names
app/service_utils.py
app/service_utils.py
from flask import current_app, abort from sqlalchemy.exc import IntegrityError from .utils import get_json_from_request, \ json_has_matching_id, json_has_required_keys, drop_foreign_fields from .validation import validate_updater_json_or_400, get_validation_errors from . import search_api_client, apiclient from . ...
Python
0
@@ -1088,17 +1088,16 @@ rvice):%0A -%0A fram @@ -1218,35 +1218,36 @@ ug%0A%0A if slug -== +in %5B 'g-cloud-4':%0A @@ -1241,16 +1241,30 @@ cloud-4' +, 'g-cloud-5'%5D :%0A @@ -1274,33 +1274,33 @@ alidator_name = -%22 +' services-g-cloud @@ -1296,104 +1296,76 @@ ces- -g-cloud-4%22%0A elif sl...
f08d4eb203113ee582249d6c18f1ecef61d2118f
Comment out RecentDonationManager in the Donation model.
apps/donations/models.py
apps/donations/models.py
from decimal import Decimal from django.db import models from django.utils import timezone from django.utils.translation import ugettext as _ from django.core.exceptions import ValidationError from django.db.models.base import ObjectDoesNotExist from django_extensions.db.fields import ( ModificationDateTimeField,...
Python
0
@@ -441,16 +441,86 @@ yField%0A%0A +# FIXME This is not currently being used because it breaks migrations. %0Aclass R @@ -2010,16 +2010,55 @@ %22))%0A%0A + # FIXME: This breaks migrations.%0A # recent_
c9363986cb36fd73e5b9dcb1718292f1eed8af82
Fix choice options for status and permission in ChallengeHost model. (#119)
apps/hosts/models.py
apps/hosts/models.py
from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from accounts.models import (TimeStampedModel, ) # from challenges.models import (Challenge, ) class ChallengeHostTeam(TimeStampedModel): """ Model representing the Host Team for a partiuclar cha...
Python
0
@@ -1287,26 +1287,22 @@ choices= -PERMISSION +STATUS _OPTIONS @@ -1353,38 +1353,42 @@ gth=30, choices= -STATUS +PERMISSION _OPTIONS)%0A%0A c
9bf1fa49b56fab585d000e3e2943ee8bb56f7224
Use MacOS.string_id_to_buffer for id() to buffer address hack
Mac/Lib/Audio_mac.py
Mac/Lib/Audio_mac.py
QSIZE = 100000 error='Audio_mac.error' class Play_Audio_mac: def __init__(self, qsize=QSIZE): self._chan = None self._qsize = qsize self._outrate = 22254 self._sampwidth = 1 self._nchannels = 1 self._gc = [] self._usercallback = None def __del__(self): self.stop() self._usercallback = None def ...
Python
0.000002
@@ -816,16 +816,31 @@ struct%0A +%09%09import MacOS%0A %09%09if not @@ -1371,10 +1371,31 @@ ta)+ -12 +MacOS.string_id_to_data ,%0A%09%09
87116a8f14f948d9c1fb00cc1281bf71e6746158
Update version to 9.2.4.dev0 [ci skip]
archinfo/__init__.py
archinfo/__init__.py
""" archinfo is a collection of classes that contain architecture-specific information. It is useful for cross-architecture tools (such as pyvex). """ __version__ = "9.2.3.dev0" if bytes is str: raise Exception("This module is designed for python 3 only. Please install an older version to use python 2.") # NewTy...
Python
0
@@ -164,17 +164,17 @@ = %229.2. -3 +4 .dev0%22%0A%0A
0e73156e1868cf9800b71fcd425cd29aa17134d9
Update __init__.py
artagger/__init__.py
artagger/__init__.py
# -*- coding: utf-8 -*- from .Utility.Utils import getWordTag, readDictionary from .InitialTagger.InitialTagger import initializeSentence from .SCRDRlearner.SCRDRTree import SCRDRTree from .SCRDRlearner.Object import FWObject import os import copy import pickle class Word: def __init__(self, **kwargs): sel...
Python
0.000072
@@ -254,16 +254,30 @@ t pickle +%0Aimport codecs %0A%0Aclass @@ -1533,16 +1533,23 @@ %22rdr%22: +codecs. open(os. @@ -1658,16 +1658,23 @@ %22dict%22: +codecs. open(os.
af737d9225540ce7f2c3459daf67ad86dafc12c9
Fix SafeBag attributes to be a set instead of a sequence
asn1crypto/pkcs12.py
asn1crypto/pkcs12.py
# coding: utf-8 """ ASN.1 type classes for PKCS#12 files. Exports the following items: - CertBag() - CrlBag() - Pfx() - SafeBag() - SecretBag() Other type classes are defined that help compose the types listed above. """ from __future__ import unicode_literals, division, absolute_import, print_function from ....
Python
0.000001
@@ -1701,30 +1701,25 @@ ttributes(Se -quence +t Of):%0A _ch
45207056a30e11acabf2b9ebe0155e3a772e3b6d
Remove annoying warnings from chardet's detect()
please/pleaseshare/torrent/bencode.py
please/pleaseshare/torrent/bencode.py
#coding: utf-8 # The contents of this file are subject to the Python Software Foundation # License Version 2.3 (the License). You may not copy or use this file, in # either source code or executable form, except in compliance with the License. # You may obtain a copy of the License at http://www.python.org/license. # ...
Python
0
@@ -691,16 +691,66 @@ t detect +%0Afrom warnings import catch_warnings, simplefilter %0A%0Adef de @@ -2686,16 +2686,78 @@ fterall%0A + with catch_warnings():%0A simplefilter(%22ignore%22)%0A enc
2f84d1efa0c5ec1f7c5f789981f0c515f76940c0
Remove debug info
chartflo/charts.py
chartflo/charts.py
import pandas as pd from goerr import err from dataswim import ds from django.db.models.query import QuerySet from django.utils._os import safe_join from django.conf import settings class Chart(): """ Class to handle charts """ def __init__(self): """ Set a default rendering engine ...
Python
0.000001
@@ -1371,49 +1371,8 @@ bj)%0A -%0A print('STACK', ds.reports)%0A%0A @@ -3185,95 +3185,8 @@ w()%0A - print(%22COLS%22, dataset.columns.values)%0A print(%22DATASET%22, dataset.head())%0A
93612081ecaf5e8f99744e49762d88a95b3ec707
Add Context to __init__.py
chisel/__init__.py
chisel/__init__.py
# # Copyright (C) 2012-2015 Craig Hobbs # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, ...
Python
0.998784
@@ -1112,17 +1112,17 @@ = '0.9. -1 +2 '%0A%0Afrom @@ -1217,16 +1217,31 @@ lication +, %5C%0A Context %0A%0Afrom .
d6e0fd43b5b20f70595e2e479e0015569fae4e0c
Fix documentation
doc/source/doc_util.py
doc/source/doc_util.py
from __future__ import print_function import re INDENT = 1 NAME = 2 INHERIT = 3 ARGUMENTS = 3 PASS=' pass\n' def pythonize_arguments(arg_str): """ Remove types from function arguments in cython """ out_args = [] # If there aren't any arguments return the empty string if arg_str is None: ...
Python
0.000001
@@ -3298,32 +3298,195 @@ not in_comment%0A + # If this is a single line comment, end in_comment scope%0A if l.count('%22%22%22') %3E 1:%0A in_comment = False%0A
9c7f6d8f1b7917ee2fa252dc4f30e52462502d84
return json
asyncmailer/views.py
asyncmailer/views.py
from asyncmailer.tasks import async_mail, async_select_and_send import cgi from django.conf import settings from django.contrib.admin.views.decorators import staff_member_required from django.http.response import HttpResponse from django.shortcuts import render from django.template.loader import render_to_string import...
Python
0.999999
@@ -61,19 +61,8 @@ end%0A -import cgi%0A from @@ -3711,20 +3711,37 @@ nse( -'send success' +json.dumps(%7B'success': 'true'%7D) )%0A
7d8bab4d1af012e98b0bab8d72bb180814b13c83
Set version to 0.1.27a1
src/powerdns_manager/__init__.py
src/powerdns_manager/__init__.py
# -*- coding: utf-8 -*- # # This file is part of django-powerdns-manager. # # django-powerdns-manager is a web based PowerDNS administration panel. # # Development Web Site: # - http://www.codetrax.org/projects/django-powerdns-manager # Public Source Code Repository: # - https://source.codetrax.org/hgroot/dja...
Python
0.000471
@@ -1065,9 +1065,9 @@ 1, 2 -6 +7 , 'a
8e5b032a153d542040019c3033af24b81ace2fa8
Update logging command to output only collection logs
augur/cli/logging.py
augur/cli/logging.py
import click import os from os import walk from augur.logging import AUGUR_LOG_DIR, WORKER_LOG_DIR @click.group("logging", short_help="View Augur's log files") def cli(): pass @cli.command("directory") def directory(): """ Print the location of Augur's logs directory """ print(AUGUR_LOG_DIR) @cli...
Python
0
@@ -1210,33 +1210,76 @@ for file in -filenames +%5Bfile for file in filenames if %22collection%22 in file%5D :%0A