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
5abf8cdea0bd8c5d9d813cb081f4afd2c6715a81
Fix up tests
payments/tests/test_customer.py
payments/tests/test_customer.py
import decimal from django.test import TestCase from django.contrib.auth.models import User from mock import patch from ..models import Customer, Charge class TestCustomer(TestCase): def setUp(self): self.user = User.objects.create_user(username="patrick") self.customer = Customer.objects...
Python
0.000319
@@ -4139,33 +4139,13 @@ -decimal.Decimal(%22 500 -. 00 -%22) %0A @@ -4487,33 +4487,13 @@ -decimal.Decimal(%22 300 -. 00 -%22) %0A @@ -4830,33 +4830,13 @@ -decimal.Decimal(%22 500 -. 00 -%22) %0A
43d53871d3c391d85be88da3ab94df1fbd5eff64
Update to use existing strip html function
website/search/util.py
website/search/util.py
import re import copy import webcolors from werkzeug.contrib.atom import AtomFeed COLORBREWER_COLORS = [(166, 206, 227), (31, 120, 180), (178, 223, 138), (51, 160, 44), (251, 154, 153), (227, 26, 28), (253, 191, 111), (255, 127, 0), (202, 178, 214), (106, 61, 154), (255, 255, 153), (177, 89, 40)] RE_XML_ILLEGAL = u...
Python
0
@@ -77,16 +77,62 @@ omFeed%0A%0A +from website.util.sanitize import strip_html%0A%0A %0ACOLORBR @@ -833,55 +833,8 @@ L)%0A%0A -RE_HTML_TAG_COMPILED = re.compile(r'%3C%5B%5E%3E%5D+%3E')%0A%0A %0Adef @@ -3471,37 +3471,19 @@ urn -RE_HTML_TAG_COMPILED.sub('', +strip_html( new_
31b0b97590ce496ba22a39c396ff868c6f511637
install pre-commit
dacsspace/client.py
dacsspace/client.py
#!/usr/bin/env python3 import argparse from configparser import ConfigParser from asnake.aspace import ASpace #published_only = False class ArchivesSpaceClient: """Handles communication with ArchivesSpace.""" def __init__(self): config = ConfigParser() config.read("local_settings.cfg") ...
Python
0
@@ -19,25 +19,8 @@ hon3 -%0A%0Aimport argparse %0Afro @@ -54,16 +54,17 @@ gParser%0A +%0A from asn @@ -93,32 +93,8 @@ ce%0A%0A -#published_only = False%0A %0Acla @@ -1269,156 +1269,10 @@ on%0A%0A - #return resource.publish%0A #return resource_json%0A #return resource...
7cfc16d016906e1437580acff42e503d3b2fa188
Change %s to .format
src/pip/_internal/distributions/source/legacy.py
src/pip/_internal/distributions/source/legacy.py
# The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False import logging from pip._internal.build_env import BuildEnvironment from pip._internal.distributions.base import AbstractDistribution from pip._internal.exceptions import InstallationError from pip._internal.uti...
Python
0.000007
@@ -1943,18 +1943,18 @@ ' -%25s +%7B%7D is inco @@ -1971,14 +1971,18 @@ ith -%25s' %25 +%7B%7D'.format (ins
d96041d38cc9f0cae1a96cfafd6f1cd781844dcc
Allow users to login with the usernane or the email
wger/core/api/views.py
wger/core/api/views.py
# -*- coding: utf-8 -*- # This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
Python
0
@@ -1427,24 +1427,66 @@ rializer,%0A)%0A +from wger.core.forms import UserLoginForm%0A from wger.co @@ -3598,17 +3598,16 @@ n=True)%0A -%0A @@ -3645,24 +3645,25 @@ rname%22%5D%0A +%0A password @@ -3658,73 +3658,43 @@ -password = serializer.data%5B%22password%22%5D%0A%0A try:%0A ...
612b5731a38823e06e567c78a5094ad18dd30b51
add online tool
dashlib/mnb_misc.py
dashlib/mnb_misc.py
import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '.')) import time def clear_screen(): os.system('clear') def check_version(): from mnb_explorer import get_version_txt cur_version = get_dashmnbversion() git_version = get_version_txt() if ((cur_version.get('major') !=...
Python
0
@@ -2710,16 +2710,96 @@ print( +'%5Cn* be sure to check masternode status again using online tools like dashninja' )%0A%0A%0Adef
0ca727f0ce5877ba2ca3ef74c9309c752a51fbf6
Fix enable action on plugins
src/sentry/web/frontend/project_plugin_enable.py
src/sentry/web/frontend/project_plugin_enable.py
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.plugins import plugins from sentry.web.frontend.base import ProjectView class ProjectPluginEnableView(ProjectView): required_scope = 'project:write' def post(self, request, organization, team, project, slug): ...
Python
0
@@ -535,12 +535,8 @@ if -not plug
0599b259ed08121160196734f7212dc7fa33149f
Remove execute_auth_api_request method
devicehive/token.py
devicehive/token.py
from devicehive.api_request import ApiRequest from devicehive.api_response import ApiResponseError class Token(object): """Token class.""" AUTH_HEADER_NAME = 'Authorization' AUTH_HEADER_VALUE_PREFIX = 'Bearer ' def __init__(self, transport, auth): self._transport = transport self._lo...
Python
0.000025
@@ -43,61 +43,8 @@ est%0A -from devicehive.api_response import ApiResponseError%0A %0A%0Acl @@ -1193,430 +1193,8 @@ ue%0A%0A - def execute_auth_api_request(self, api_request, error_message):%0A api_request.header(*self.auth_header)%0A try:%0A return api_request.execute(error_message)%0A ...
e32acfcfa14ec785a3d716f60b61cc66d6c496ea
add celery
app/tasks.py
app/tasks.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # author: Kun Jia # date: 20/06/2017 # email: me@jack003.com from celery.schedules import crontab from celery.task import periodic_task from celery.utils.log import get_task_logger from flask import current_app from pymongo import MongoClient from app import celery from .a...
Python
0.999861
@@ -2497,17 +2497,17 @@ e': t, ' -d +s list': d @@ -2513,17 +2513,17 @@ dlist, ' -d +s content'
0237fb8114f5a8423d39f44b2882d5dbf10954d7
make .seen replies for CTCP ACTIONs say "doing nick message"; leaves .seen replies for PRIVMSG to channel the same ("saying message").
willie/modules/seen.py
willie/modules/seen.py
# coding=utf8 """ seen.py - Willie Seen Module Copyright 2008, Sean B. Palmer, inamidst.com Copyright © 2012, Elad Alfassa <elad@fedoraproject.org> Licensed under the Eiffel Forum License 2. http://willie.dftba.net """ from __future__ import unicode_literals import time import datetime from willie.tools import Identi...
Python
0
@@ -886,16 +886,76 @@ essage') +%0A action = bot.db.get_nick_value(nick, 'seen_action') %0A%0A @@ -1350,16 +1350,117 @@ sender:%0A +%09 if action:%0A msg = msg + %22 in here, doing %22 + nick + %22 %22 + message%0A%09 else:%0A @@ -1505,16 +1505,16 @@ message%0A - ...
b4af07754c64e915fcfc5fbec00389dee6a11020
disable one unit test on travis
_unittests/ut_helpgen/test_notebooks_api.py
_unittests/ut_helpgen/test_notebooks_api.py
""" @brief test log(time=8s) @author Xavier Dupre """ import sys import os import unittest try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "..", ".."))) if ...
Python
0
@@ -478,16 +478,39 @@ p_folder +, is_travis_or_appveyor %0Afrom sr @@ -1958,32 +1958,148 @@ return%0A%0A + if is_travis_or_appveyor() in ('travis', 'appveyor'):%0A # no latex, no pandoc%0A return%0A%0A path = o
b03b9276e48edfa53a70a46dc5779cd1de2299e0
add priv_dns_name sub command
aws_utils/ec2.py
aws_utils/ec2.py
#!/usr/bin/env python3 import sys import argparse import boto3 # -------------------------------------------------------------------------------- # arg parse # -------------------------------------------------------------------------------- parser = argparse.ArgumentParser(description='ec2 utils') parser.set_defaults...
Python
0.000003
@@ -2437,16 +2437,370 @@ p_pub)%0A%0A +def ip_pub(ns):%0A ec2 = boto3.resource('ec2')%0A for instance in ec2.instances.all():%0A printIfMatchOrEmpty(getInstanceName(instance), ns.name, instance.private_dns_name)%0A%0Asub_parser = sub_parsers.add_parser('priv_dns_name')%0Asub_parser.set_defaults(target='pr...
83a0f135e806cd901bfc62eddda008d0c295feaa
fix regexes
dictionaria/util.py
dictionaria/util.py
# coding: utf8 from __future__ import unicode_literals from collections import OrderedDict, defaultdict import re from clldutils.text import truncate_with_ellipsis from clldutils.misc import UnicodeMixin from clld.db.models import common from clld.db.meta import DBSession from bs4 import BeautifulSoup from clldmpg imp...
Python
0.999586
@@ -1,59 +1,4 @@ -# coding: utf8%0Afrom __future__ import unicode_literals%0A from @@ -1424,16 +1424,17 @@ +r '((?%3C=%5CW @@ -3334,16 +3334,17 @@ re.sub( +r '%5C*%5C*%7B0%7D
107b72da8629d97452dc6b7ee0f44eeb7d9e351c
remove x-based matplotlib rendering
gamma_limits_sensitivity/__init__.py
gamma_limits_sensitivity/__init__.py
''' This is the hard working code in order to calculate ULs, sensitivities, and time to detections. ''' import matplotlib.pyplot as plt def upper_limit(N_on, N_off, alpha, l_lim, A_eff): figures = [plt.figure()] dictionary = { 'plots': figures } return dictionary def sensitivity(s_bg, a...
Python
0.000001
@@ -129,16 +129,37 @@ as plt%0A +matplotlib.use('Agg') %0A%0Adef up
2a67ef989fa79aefccb9bcefe543715346642f91
Normalize time to UTC.
abusehelper/contrib/autoshun/autoshunbot.py
abusehelper/contrib/autoshun/autoshunbot.py
import idiokit from abusehelper.core import utils, cymruwhois, bot, events AUTOSHUN_CSV_URL = "http://www.autoshun.org/files/shunlist.csv" class AutoshunBot(bot.PollingBot): COLUMNS = ["ip", "time", "type"] feed_url = bot.Param(default=AUTOSHUN_CSV_URL) use_cymru_whois = bot.BoolParam(default=True) ...
Python
0.960634
@@ -8,16 +8,53 @@ idiokit%0A +import time as _time%0Aimport calendar%0A from abu @@ -1286,44 +1286,503 @@ rl)%0A - yield idiokit.send(event +%0A times = event.values(%22time%22)%0A event.clear(%22time%22)%0A for time in times:%0A event.add(%22time%22, self._...
85e5957103d2bd796a657a8d9d75d862258c7c1e
Save .npy with str instead of int
generate_adjacency_matrix_one_npy.py
generate_adjacency_matrix_one_npy.py
import numpy as np import argparse from matrix import * from multiprocessing.pool import ThreadPool from ctypes import c_char_p import multiprocessing as mp import sys import time import math import string def parse_args(): ''' Parses arguments. ''' parser = argparse.ArgumentParser(description="Produce...
Python
0
@@ -4542,20 +4542,16 @@ .append( -int( lines%5Bl_ @@ -4579,17 +4579,16 @@ %5Bl_i%5D)%5D) -) %0A%09%09%09fina
86af85e46b0b313ecd0804916539d18556fba84a
Use api.constrains
account_analytic_required/models/account.py
account_analytic_required/models/account.py
# -*- coding: utf-8 -*- # © 2011 Akretion # © 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from openerp import _, api, fields, models from openerp.tools import float_is_zero class AccountAccountType(models.Model): _inherit = "account.account.type" @api.model def _get...
Python
0.000001
@@ -149,16 +149,28 @@ _, api, + exceptions, fields, @@ -2926,131 +2926,166 @@ api. -multi%0A def _check_analytic_required(self):%0A return not self._check_analytic_required_msg()%0A%0A _constraints = %5B( +constrains('analytic_account_id', 'account_id', 'debit', 'credit')%0A def _check_analytic_req...
ed45fb28c75e0c8b942425420fef05c6e503da62
Remove last LEDGER_INDEX_INFO reference
corehq/pillows/ledger.py
corehq/pillows/ledger.py
from collections import namedtuple from functools import lru_cache from pillowtop.checkpoints.manager import ( get_checkpoint_for_elasticsearch_pillow, ) from pillowtop.pillow.interface import ConstructedPillow from pillowtop.processors import PillowProcessor from corehq.apps.change_feed import topics from corehq...
Python
0.000001
@@ -599,77 +599,8 @@ end%0A -from corehq.pillows.mappings.ledger_mapping import LEDGER_INDEX_INFO%0A from
a7973885ac792da0a369615b0c0240f491b01ef5
PYCBC-1047 Ping test fails on all platforms
couchbase/diagnostics.py
couchbase/diagnostics.py
from abc import abstractmethod from typing import Optional, Mapping, Union, Any from enum import Enum from couchbase_core import JSON from datetime import timedelta from couchbase.exceptions import InvalidArgumentException import json import copy class EndpointState(Enum): Disconnected = "disconnected" Connec...
Python
0.995142
@@ -5661,68 +5661,36 @@ # -TODO: check if LCB will update this to namespace (like java) +was 'scope', now 'namespace' %0A @@ -5692,32 +5692,64 @@ '%0A return + self._src_ping.get('namespace', self._src_ping. @@ -5758,32 +5758,33 @@ t('scope', None) +) %0A%0A @property%0A
19afe973bffe1bb90942757fcbf81f3630ffddda
Update code formatting.
crawler/args.py
crawler/args.py
#!/usr/bin/env python3 # chameleon-crawler # # Copyright 2015 ghostwords. # # 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/. from os import path import argparse def ...
Python
0
@@ -526,16 +526,25 @@ rgument( +%0A %22crx%22, m @@ -581,28 +581,24 @@ H',%0A - type=lambda @@ -626,36 +626,32 @@ arser),%0A - help=%22path to Ch @@ -670,16 +670,21 @@ package%22 +%0A )%0A%0A g @@ -751,16 +751,25 @@ rgument( +%0A %22--headl @@ -809,20 +809,16 @@...
bbbf133b1da08b851bbae1409b8dd5696eaa1187
Remove unused imports in tests.app.soc.modules.gsoc.views.test_profile.
tests/app/soc/modules/gsoc/views/test_profile.py
tests/app/soc/modules/gsoc/views/test_profile.py
#!/usr/bin/env python2.5 # # Copyright 2010 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
Python
0
@@ -722,24 +722,8 @@ %5D%0A%0A%0A -import httplib%0A%0A from @@ -789,106 +789,8 @@ ic%0A%0A -from tests.timeline_utils import TimelineHelper%0Afrom tests.profile_utils import GSoCProfileHelper%0A from @@ -4227,17 +4227,19 @@ nse, url -+ + + '?valida
696b4e093171e9d6f17502650f15c9299438b874
Drop Py2 and six on tests/integration/modules/test_virtualenv_mod.py
tests/integration/modules/test_virtualenv_mod.py
tests/integration/modules/test_virtualenv_mod.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import os import tempfile import salt.utils.path from salt.modules.virtualenv_mod import KNOWN_BINARY_NAMES from tests.support.case import ModuleCase from tests.support.helpers import slowTest from tests.support.runtests ...
Python
0
@@ -1,102 +1,4 @@ -# -*- coding: utf-8 -*-%0Afrom __future__ import absolute_import, print_function, unicode_literals%0A%0A impo @@ -503,34 +503,8 @@ per( -VirtualenvModuleTest, self ).se
d8b144c3142534714ecff90cf88749a6b8ed347d
Remove django 1.8 workaround no longer needed
pucas/management/commands/createcasuser.py
pucas/management/commands/createcasuser.py
from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from pucas.ldap import LDAPSearch, LDAPSearchException, \ user_info_from_ldap class Command(BaseCommand): help = 'Initialize a new CAS user account' def add_arguments(self, parser): parser.add_argu...
Python
0
@@ -1660,25 +1660,50 @@ lf.style -_success( +.SUCCESS(%0A %22%25s user @@ -1708,19 +1708,16 @@ er '%25s'%22 - %5C %0A @@ -1936,11 +1936,8 @@ und%22 - %5C %0A @@ -1961,267 +1961,27 @@ -%25 netid))%0A%0A def style_success(self, msg):%0A # workaround to support dja...
872320e02d5c922e177434f6b9fa70af8cf822b9
Revert "RT-26"
wkhtmltopdf/__init__.py
wkhtmltopdf/__init__.py
# Have to comment this import to perfrom pip install at the same time as django install # import os # if 'DJANGO_SETTINGS_MODULE' in os.environ: # from .utils import * __author__ = 'Incuna Ltd' __version__ = '2.0.3'
Python
0.000001
@@ -1,107 +1,14 @@ -# Have to comment this import to perfrom pip install at the same time as django install%0A# import os%0A%0A# +import os%0A if ' @@ -50,9 +50,8 @@ on:%0A -#
563a82246180d949917bcd444411bbeb82604e97
Add an assertion in search.py
recipe_modules/buildbucket/tests/search.py
recipe_modules/buildbucket/tests/search.py
# Copyright 2019 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. from recipe_engine import types from google.protobuf import json_format from PB.go.chromium.org.luci.buildbucket.proto import build as build_pb2...
Python
0
@@ -556,16 +556,54 @@ s(api):%0A + limit = api.properties.get('limit')%0A builds @@ -757,40 +757,65 @@ mit= -api.properties.get('limit'),%0A ) +limit,%0A )%0A assert limit is None or len(builds) %3C= limit %0A p @@ -2024,16 +2024,80 @@ UCCESS)%0A + # Returning more to test trimming of the returned li...
51251817fe1c10d49b27f121c2b826e7f260205d
Fix TypeError in get_issues_from_pr in changelog-generator.py
tools/changelog-generator/changelog-generator.py
tools/changelog-generator/changelog-generator.py
from github import Github from git import Repo from jinja2 import Environment, FileSystemLoader import re import datetime import click def get_issues_from_pr(p): return [m.groups()[0] for m in re.finditer(r"#(\d+)", p.body)] def generate_topic_list(labels): r = set() for l in labels: if l == 'ar...
Python
0.000001
@@ -157,16 +157,86 @@ _pr(p):%0A + text = %22%7B%7D%5Cn%7B%7D%22.format(p.title, %22%22 if p.body is None else p.body)%0A retu @@ -285,22 +285,20 @@ (%5Cd+)%22, -p.body +text )%5D%0A%0A%0Adef
a34357d2221f72bb4a9160d931cd10de4b8eddc2
Move dateutil import higher
redash/query_runner/google_spreadsheets.py
redash/query_runner/google_spreadsheets.py
from base64 import b64decode import json import logging import sys from redash.query_runner import * from redash.utils import JSONEncoder logger = logging.getLogger(__name__) try: import gspread from oauth2client.client import SignedJwtAssertionCredentials from dateutil import parser enabled = True ex...
Python
0
@@ -53,18 +53,35 @@ ing%0A +from dateutil import -sys +parser %0Afro @@ -281,40 +281,8 @@ als%0A - from dateutil import parser%0A
ebe5a4ce8c12489bceb8991f627fdea29329e854
Enable discovery server to reply also when started w/o net connection
xfd_discovery_server.py
xfd_discovery_server.py
#!/usr/bin/env python # # Author Aske Olsson aske.olsson@switch-gears.dk # import socket import struct #MCAST_GRP = '224.1.1.1' #MCAST_PORT = 5007 MCAST_ADDR = "239.77.124.213" MCAST_PORT = 19418 MCAST_ANS_PORT = 19419 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) sock.setsockopt(socke...
Python
0
@@ -14,18 +14,16 @@ v python - %0A#%0A# Aut @@ -95,16 +95,28 @@ t struct +%0Aimport time %0A%0A#MCAST @@ -226,16 +226,53 @@ 19419%0A%0A +def socket_setup():%0A try:%0A sock = s @@ -339,16 +339,24 @@ TO_UDP)%0A + sock.set @@ -406,16 +406,24 @@ DDR, 1)%0A + sock.bin @@ -442,16 +442...
2cf4a0b93db423207798ffd93b2e91cdb73b6d2b
Add identifier for UT Brownsville
tx_salaries/utils/transformers/ut_brownsville.py
tx_salaries/utils/transformers/ut_brownsville.py
from . import base from . import mixins class TransformedRecord(mixins.GenericCompensationMixin, mixins.GenericDepartmentMixin, mixins.GenericIdentifierMixin, mixins.GenericJobTitleMixin, mixins.GenericPersonMixin, mixins.MembershipMixin, mixins.OrganizationMixin, mixins.PostMixin, mix...
Python
0.00011
@@ -431,32 +431,70 @@ : 'First Name',%0A + 'middle_name': 'Middle Name',%0A 'departm @@ -513,16 +513,16 @@ tment',%0A - @@ -581,52 +581,8 @@ e',%0A - 'status': 'LABEL FOR FT/PT STATUS',%0A @@ -1044,16 +1044,16 @@ xample:%0A - @@ -1089,16 +1089,415 @@ != ''%0A%0A + ...
3aaaefcb91b31fbd58f1b928c9d975c2bc218eea
Fix compatibility with Python 3.4
src/neuroglancer_scripts/file_accessor.py
src/neuroglancer_scripts/file_accessor.py
# Copyright (c) 2016, 2017, 2018 Forschungszentrum Juelich GmbH # Author: Yann Leprince <y.leprince@fz-juelich.de> # # This software is made available under the MIT licence, see LICENCE.txt. """Access to a Neuroglancer pre-computed dataset on the local filesystem. See the :mod:`~neuroglancer_scripts.accessor` module ...
Python
0.000187
@@ -360,16 +360,26 @@ rt gzip%0A +import os%0A import p @@ -2793,43 +2793,41 @@ -file_path.parent.mkdir(parents=True +os.makedirs(str(file_path.parent) , ex @@ -4571,32 +4571,48 @@ ry:%0A +os.makedirs(str( chunk_path.paren @@ -4616,27 +4616,9 @@ rent -.mkdir(parents=True +) , ex
c3df6a10d008441c79eb07b889f52fe0de22538b
Fix the default prefix
powerline_vaulted_segment/vaulted.py
powerline_vaulted_segment/vaulted.py
from __future__ import (unicode_literals, division, absolute_import, print_function) from powerline.theme import requires_segment_info @requires_segment_info def vaulted(pl, segment_info, prefix=None): '''Return the current vaulted vault :param string prefix: The prefix to use in front of the vault ...
Python
0.998784
@@ -191,20 +191,18 @@ prefix= -None +'' ):%0A '
b9749b3e635c2af40eb2c08b5d5ef29d354ba453
fix a test
micronota/bfillings/tests/test_diamond.py
micronota/bfillings/tests/test_diamond.py
# ---------------------------------------------------------------------------- # Copyright (c) 2015--, micronota development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # ---------------------------------------------...
Python
0.999791
@@ -2747,29 +2747,27 @@ rse_sam('%25s. -idcov +sam ' %25 test.exp
a0dc4dc94d27e824ac4fd9d6c7fe7f929587f08c
Add 19.0.{1,2,3} (#11401)
var/spack/repos/builtin/packages/mesa/package.py
var/spack/repos/builtin/packages/mesa/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import sys class Mesa(MesonPackage): """Mesa is an open-source implementation of the OpenGL spe...
Python
0.000152
@@ -770,37 +770,83 @@ on(' -19.0.0', tag='mesa-19.0.0 +develop', branch='master')%0A version('19.1.develop', branch='19.1 ')%0A -%0A @@ -901,37 +901,172 @@ on(' -develop', branch='master +19.0.3', tag='mesa-19.0.3', preferred=True)%0A version('19.0.2', tag='mesa-19.0.2')%0A version('19.0.1',...
cffead618248743046655aeb030938cde5180545
fix glint enable configuration reference
web_frontend/cloudscheduler/csv2/server_views.py
web_frontend/cloudscheduler/csv2/server_views.py
from django.conf import settings config = settings.CSV2_CONFIG from django.shortcuts import render, get_object_or_404, redirect from django.views.decorators.csrf import requires_csrf_token from django.http import HttpResponse from django.core.exceptions import PermissionDenied from cloudscheduler.lib.schema import cs...
Python
0
@@ -7113,16 +7113,44 @@ config. +categories%5B%22web_frontend%22%5D%5B%22 enable_g @@ -7153,16 +7153,18 @@ le_glint +%22%5D ,%0A
1ba440ca24b0108d4dcf911f1f3c967ff7de1dc4
Create a unique filename when uploading a team file.
hackday/teams/models.py
hackday/teams/models.py
from django.contrib.auth.models import User from django.db import models from django import forms from django.template.defaultfilters import slugify from assets.models import Attachment, ImageAttachment, Link from charities.models import Charity from voting.moremodels import Category class STATUS(object): """ ...
Python
0
@@ -1,20 +1,33 @@ +import time%0A%0A from django.contrib. @@ -945,24 +945,482 @@ '),%0A )%0A%0A%0A +def create_unique_team_filename(instance, filename):%0A %22%22%22 Return a uniqque filename for an uploaded team file.%0A -- called when saving a Team to the DB%0A %22%22%22%0A filename_parts = f...
b941499db4b1ee57b4c576483b6b738259dc9fda
fix tf delete_status bug using keras.clear_session() instead of gc
rl/session.py
rl/session.py
import gc import gym import json import multiprocessing as mp from datetime import datetime from functools import partial from rl.spec import game_specs from rl.util import * class Session(object): ''' main.py calls this The base class for running a session of a DQN Agent, at a problem, with agent pa...
Python
0.000001
@@ -1,14 +1,4 @@ -import gc%0A impo @@ -105,16 +105,47 @@ partial%0A +from keras import backend as K%0A from rl. @@ -2113,18 +2113,23 @@ -gc.collect +K.clear_session ()
e4cc4447bf9aca4f579eef34baccd3aaf73939c3
Print statement verwijderd uit functie
hamming-code/hamming.py
hamming-code/hamming.py
from matrix import Matrix #The encoding matrix encoding_matrix = Matrix([ [1, 1, 0, 1], [1, 0, 1, 1], [1, 0, 0, 0], [0, 1, 1, 1], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1] ]) #The parity checking matrix checking_matrix = Matrix([ [1, 0, 1, 0, 1, 0, 1], [0, 1, 1, 0, 0, 1, 1], [0, 0...
Python
0.999972
@@ -452,37 +452,8 @@ e):%0A - print(message.transpose())%0A ve
825eb37e15e2fb08ac205b7495e93a91acb79c26
Add function for flashing all form errors
app/utils.py
app/utils.py
import re from flask import url_for def register_template_utils(app): """Register Jinja 2 helpers (called from __init__.py).""" @app.template_test() def equalto(value, other): return value == other @app.template_global() def is_hidden_field(field): from wtforms.fields import Hidd...
Python
0
@@ -28,16 +28,23 @@ url_for +, flash %0A%0A%0Adef r @@ -757,16 +757,255 @@ return stripped%0A +%0A%0Adef flash_errors(form):%0A for field, errors in form.errors.items():%0A for error in errors:%0A flash(u%22Error in the %25s field - %25s%22 %25 (%0A getattr(form, field).label.tex...
3289a259a7fa9ed959eb18d012c2d2e52198b033
Update malshare.py
plugins/analytics/public/malshare.py
plugins/analytics/public/malshare.py
import json import requests import logging from core.analytics import OneShotAnalytics from core.errors import ObservableValidationError from core.observables import Url, Hash class MalshareAPI(object): """Base class for querying the Malshare API. This is the public API, 1000 samples per day. Limit rej...
Python
0
@@ -1030,22 +1030,15 @@ rams -, verify=False +=params )%0A
c0e1bed70bc331041622e0db06871d4f3e3277f3
Update activate-devices.py
cron/activate-devices.py
cron/activate-devices.py
#!/usr/bin/env python import MySQLdb #import datetime #import urllib2 #import os import datetime import RPi.GPIO as GPIO try: import RPi.GPIO as GPIO except RuntimeError: print("Error importing RPi.GPIO!") servername = "localhost" username = "pi" password = "password" dbname = "pi_heating_db" GPIO.setmode(G...
Python
0.000001
@@ -643,16 +643,21 @@ CE_PIN = + int( result%5B @@ -658,16 +658,18 @@ esult%5B2%5D + ) %0A DEV @@ -679,16 +679,21 @@ _VALUE = + int( result%5B @@ -694,16 +694,18 @@ esult%5B3%5D + ) %0A%0A GP
8f02edd1a79c3f893964198d05edf2990144bb31
Update to sim code
predict_binary_similarity_two_libraries.py
predict_binary_similarity_two_libraries.py
#Author : Lewis Mervin lhm30@cam.ac.uk #Supervisor : Dr. A. Bender #All rights reserved 2016 #Protein Target Prediction Tool trained on SARs from PubChem (Mined 21/06/16) and ChEMBL21 #Molecular Descriptors : 2048bit Morgan Binary Fingerprints (Rdkit) - ECFP4 #Dependencies : rdkit, sklearn, numpy #libraries from rdkit...
Python
0
@@ -4057,25 +4057,25 @@ at(sys.argv%5B -3 +4 %5D)%0A%09except V
8701318037b9d425149f0689fa137be78a782aa7
return the name of the face found
app/views.py
app/views.py
from app import app from flask import Flask, request, jsonify import kairos DEFAULT_GALLERY = 'default_gallery' # App Logic @app.route('/', methods=['GET']) def index(): return 'yo' @app.route('/upload/<name>', methods=['POST']) def upload(name): img_url = request.form['img_url'] success = kairos.add_fac...
Python
0.999999
@@ -489,23 +489,20 @@ l')%0A -allowed +name = kairo @@ -507,13 +507,16 @@ ros. -check +identify _fac @@ -555,41 +555,133 @@ -return jsonify(%7B'allowed': allowed +allowed = name is not None%0A # TODO: open the door.%0A return jsonify(%7B'allowed': allowed,%0A 'name': name %7D)%0...
a8ace4f53a67d30e39b7f25d8db4cbc6fdd8fcf8
Update allowed hosts
cub/settings.py
cub/settings.py
""" Django settings for cub project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths insi...
Python
0
@@ -779,43 +779,9 @@ = %5B' -127.0.0.1', '0.0.0.0', '192.168.3.3 +* '%5D%0A @@ -1275,25 +1275,56 @@ D_HOSTS = %5B' -* +https://connecthub.herokuapp.com '%5D%0A SECUR
b3b489fb8b476a17e8d9e08d70f90aec38756c8a
Allow use of a custom user model
cuser/fields.py
cuser/fields.py
# Copyright (c) 2009-2011 Dennis Kaarsemaker <dennis@kaarsemaker.net> # 2011 Atamert Olcgen <muhuk@muhuk.com> # 2012 Alireza Savand <alireza.savand@gmail.com> # # Small piece of middleware to be able to access authentication data from # everywhere in the django code. # # Redistribution and u...
Python
0
@@ -1829,16 +1829,105 @@ ettings%0A +%0A%0Aif hasattr(settings, 'AUTH_USER_MODEL'):%0A User = settings.AUTH_USER_MODEL%0Aelse:%0A from dja @@ -1962,16 +1962,18 @@ rt User%0A +%0A%0A from dja
194dd71de22e34e5f262b8fe0735347d6b7f1bd8
Support title page (-1)
portfolio/pdf-scripts/do-page-generate.py
portfolio/pdf-scripts/do-page-generate.py
import subprocess from music21 import * from pyPdf import PdfFileReader, PdfFileWriter from reportlab.pdfgen import canvas from reportlab.lib import pagesizes from reportlab.lib.units import inch from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import TTFont # some important constants MUSIC_XML_...
Python
0
@@ -2118,16 +2118,95 @@ a%22, 12)%0A +%0Aif pageNum != -1:%09# title page is -1, and we don't want a page number there.%0A%09 if pageN @@ -2265,16 +2265,17 @@ n right%0A +%09 %09widthOf @@ -2343,16 +2343,17 @@ a%22, 12)%0A +%09 %09pageNum @@ -2452,16 +2452,17 @@ Number)%0A +%09 else:%09# @@ -2480,16 +2480,17 @...
f7ce07f6775fd88a0d8e5bf0f980eb22050f2d92
Update file_regression.py
src/pytest_regressions/file_regression.py
src/pytest_regressions/file_regression.py
# encoding: UTF-8 from functools import partial import six from .common import perform_regression_check, check_text_files class FileRegressionFixture(object): """ Implementation of `file_regression` fixture. """ def __init__(self, datadir, original_datadir, request): """ :type datad...
Python
0.000001
@@ -946,30 +946,24 @@ tent -s to -write to the file +be verified. %0A
761b26d2e259fe5b36ed223fd3b54750a741869b
Expand activity list
src/sentry/api/endpoints/group_details.py
src/sentry/api/endpoints/group_details.py
from __future__ import absolute_import, print_function from django.utils import timezone from rest_framework import serializers from rest_framework.response import Response from sentry.api.base import DocSection from sentry.api.bases.group import GroupEndpoint from sentry.api.fields import UserField from sentry.api.s...
Python
0.998565
@@ -1053,18 +1053,16 @@ oup, num -=7 ):%0A @@ -3189,9 +3189,11 @@ num= -7 +100 )%0A
107ffa054406cefa71f245045fe0ad140d44cc55
Update drinkertest
drinkertest.py
drinkertest.py
from hieretikz import * import subprocess from hierarchy import * formulae = lem, wlem, dp, he, dnsu, dnse, glpo, glpoa, gmp = \ 'lem', 'wlem', 'dp', 'he', 'dnsu', 'dnse', 'glpo', 'glpoa', 'gmp' _______ = None formula_layout = [ ' glpoa ', ' ...
Python
0.000001
@@ -1640,32 +1640,41 @@ ula_layout, +set( proofs +) , +set( counter_mode @@ -1668,32 +1668,33 @@ (counter_models) +) + %5C%0Ar'''%0A%5Cend%7Bt @@ -1821,16 +1821,25 @@ ut, +set( proofs +) , +set( coun @@ -1849,16 +1849,17 @@ _models) +) + %5C%0Ar''
70dce683db055fabab30b7aa90f8ea6cc9441e44
Fix minor issue when field_value is no longer a string
drip/models.py
drip/models.py
import six from datetime import datetime, timedelta from django.db import models from django.db.models import F try: from django.conf import settings User = settings.AUTH_USER_MODEL except AttributeError: from django.contrib.auth.models import User from django.core.exceptions import ValidationError # j...
Python
0.000007
@@ -79,39 +79,8 @@ dels -%0Afrom django.db.models import F %0A%0Atr @@ -5886,32 +5886,37 @@ ions%0A if +self. field_value.star @@ -6016,16 +6016,23 @@ value = +models. F(field_
cd87391b989c04f39fe8d7dfae540c53222a8ab0
Simplify scoring
dwi/autoroi.py
dwi/autoroi.py
"""Automatic ROI search.""" ADCM_MIN = 0.00050680935535585281 ADCM_MAX = 0.0017784125828491648 import numpy as np import dwi.util def get_score_param(img, param): """Return parameter score of given ROI.""" if param.startswith('ADC'): #r = 1-np.mean(img) r = 1./(np.mean(img)-0.0008) #...
Python
0.000088
@@ -271,24 +271,25 @@ mg)%0A +# r = 1./(np.m @@ -305,16 +305,44 @@ 0.0008)%0A + r = 1./np.mean(img)%0A
e6f477088dd3a32c389871a78d09effca269c017
Remove unused import and variable from base_templates for GCI.
app/soc/modules/gci/views/base_templates.py
app/soc/modules/gci/views/base_templates.py
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
Python
0
@@ -900,57 +900,8 @@ ate%0A -from soc.views.base_templates import LoggedInMsg%0A %0A%0Ade @@ -3582,42 +3582,8 @@ ta)%0A - redirect = self.data.redirect%0A
a400ad0efd91550952f49598a0d5471839d36ce5
Refactor the Program project list to use the new Project model and its logic function.
app/soc/modules/gsoc/views/projects_list.py
app/soc/modules/gsoc/views/projects_list.py
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
Python
0
@@ -931,56 +931,96 @@ ogic -.models.student_project import logic as sp_logic + import project as project_logic%0Afrom soc.modules.gsoc.models.project import GSoCProject %0Afro @@ -1370,16 +1370,38 @@ = data%0A%0A + r = data.redirect%0A list @@ -1539,23 +1539,24 @@ entity. -stud +par ent +() .name()) @@ -...
23f87565a9074b7d6bd5e45b1ce8686ba49d3ce8
Update nsoltSynthesis2dNetwork.py
appendix/pytorch/nsoltSynthesis2dNetwork.py
appendix/pytorch/nsoltSynthesis2dNetwork.py
import torch import torch.nn as nn from nsoltBlockIdct2dLayer import NsoltBlockIdct2dLayer from nsoltFinalRotation2dLayer import NsoltFinalRotation2dLayer class NsoltSynthesis2dNetwork(nn.Module): def __init__(self, number_of_channels=[], decimation_factor=[]): super(NsoltSynt...
Python
0.000001
@@ -85,16 +85,17 @@ t2dLayer + %0D%0Afrom n @@ -154,16 +154,128 @@ Layer %0D%0A +from nsoltLayerExceptions import InvalidNumberOfChannels, InvalidPolyPhaseOrder, InvalidNumberOfVanishingMoments %0D%0A%0D%0Aclas @@ -403,66 +403,532 @@ r=%5B%5D -):%0D%0A super(NsoltSynthesis2dNetwork, self).__init__( +,%0D%0...
0d056fefa1896a1e4d17b56f0e84dae106c17c57
fix bug
meta/api/views.py
meta/api/views.py
from django.conf.urls import patterns, url from django.shortcuts import render from django.http import Http404 from django.http import JsonResponse from django.views.decorators.csrf import csrf_exempt from django.contrib.sites.shortcuts import get_current_site import requests from .forms import UploadImageForm from ....
Python
0.000001
@@ -501,16 +501,32 @@ roccoli' +,%0A 'pear' %0A %5D)%0A
421ef714711ceda42877b1e0bd171ffc88ad911d
Update Python requirement.
postgresql/release/distutils.py
postgresql/release/distutils.py
## # .release.distutils - distutils data ## """ Python distutils data provisions module. For sub-packagers, the `prefixed_packages` and `prefixed_extensions` functions should be of particular interest. If the distribution including ``py-postgresql`` uses the standard layout, chances are that `prefixed_extensions` and ...
Python
0
@@ -5265,17 +5265,17 @@ ': '%3E=3. -3 +8 ',%0A%09%7D%0A%09i
afebd530cb19196d2101b91cee59011c770b9709
fix bug
meta/api/views.py
meta/api/views.py
from django.conf.urls import patterns, url from django.shortcuts import render from django.http import Http404 from django.http import JsonResponse from django.views.decorators.csrf import csrf_exempt from django.contrib.sites.shortcuts import get_current_site import requests from .forms import UploadImageForm from ....
Python
0.000001
@@ -2600,16 +2600,22 @@ sspace() + and s ,%0A
8ba569e719ccf552c8ff3e1a1d64ccd23d5aa4ff
move debug log to main process, fix nb_epoch
minos/train/trainer.py
minos/train/trainer.py
''' Created on Feb 12, 2017 @author: julien ''' import logging from multiprocessing import Queue, Process from threading import Thread from time import time import traceback from minos.experiment.training import EpochStoppingCondition,\ AccuracyDecreaseStoppingCondition, AccuracyDecreaseStoppingConditionWrapper f...
Python
0
@@ -2217,16 +2217,222 @@ result:%0A + logging.debug(%0A 'Blueprint %25d: score %25f after %25d epochs',%0A result%5B0%5D,%0A result%5B1%5D,%0A result%5B2%5D)%0A @@ -4585,32 +4585,127 @@ nb_ep...
3400dc215ecd8f06a00d68ddcd9dda54d837a040
tweak unionfs config wording.
mint/buildtemplates.py
mint/buildtemplates.py
# Copyright (c) 2004-2006 rPath, Inc. # # All Rights Reserved import sys from mint.data import RDT_STRING, RDT_BOOL, RDT_INT, RDT_ENUM, RDT_TROVE from mint import buildtypes class BuildOption(tuple): def __new__(self): return tuple.__new__(tuple, (self.type, self.default, self.prompt)) class StringOption(...
Python
0
@@ -2578,25 +2578,23 @@ ble -copy-on-write for +UnionFS for the ent @@ -2613,56 +2613,37 @@ em. -To use this, your group must contain +(For this option, the -u +U nion -fs +FS ker @@ -2656,112 +2656,94 @@ dule -. (unionfs is available in contrib (unsupported). The unionfs module you use must match your ker...
bfe039111e2b8e83a450b0d5e5f56827338cd017
Fix slashes in blog urlpatterns.
mezzanine/urls.py
mezzanine/urls.py
""" This is the main ``urlconf`` for Mezzanine - it sets up patterns for all the various Mezzanine apps, third-party apps like Grappelli and filebrowser. """ from __future__ import unicode_literals from future.builtins import str from django.conf.urls import include, url from django.contrib.sitemaps.views import site...
Python
0.000001
@@ -2116,16 +2116,22 @@ rip(%22/%22) + + %22/%22 %0A blo @@ -2530,16 +2530,28 @@ LOG_SLUG +.rstrip(%22/%22) :%0A
338282a17766345f054f570d5063a7b0b803727b
Enable migration with special chars in pw
migrations/env.py
migrations/env.py
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from sqlalchemy.engine.url import make_url from logging.config import fileConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.co...
Python
0
@@ -183,24 +183,65 @@ t fileConfig +%0Afrom six.moves.urllib.parse import quote %0A%0A# this is @@ -1032,16 +1032,155 @@ %22utf8%22)%0A + # We need to quote the password in case it contains special chars%0A parsed_url.password = quote(parsed_url.password)%0A @@ -3367,16 +3367,17 @@ ...
3380d0fed1a8d24eba8627bd65dccc1fb2f772dd
Update version to next release
minio/__init__.py
minio/__init__.py
# -*- coding: utf-8 -*- # MinIO Python Library for Amazon S3 Compatible Cloud Storage, # (C) 2015, 2016, 2017 MinIO, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.ap...
Python
0
@@ -1074,17 +1074,17 @@ = '5.0. -1 +2 '%0A__lice
5f7cde32f64965fe8f75dd229d67598a53362701
Fix checker
model/simple-python/components/checker.py
model/simple-python/components/checker.py
from . import * import z3 class PropertyChecker (object): """Actually check for properties in the network graph etc.""" def __init__ (self, context, network): self.ctx = context self.net = network self.solver = z3.Solver() self.constraints = list () self.primed = False ...
Python
0.000003
@@ -1911,16 +1911,23 @@ == srcn +.z3Node ))),%0A @@ -2041,17 +2041,19 @@ h, dest. -n +z3N ode, p)) @@ -2127,16 +2127,23 @@ ) == src +.z3Node )))%0A
7b3e630f60ab2a917106cc6e09b92123001a0083
Fix code indentation typo
module/plugins/internal/CaptchaService.py
module/plugins/internal/CaptchaService.py
# -*- coding: utf-8 -*- import re from random import random class CaptchaService: __name__ = "CaptchaService" __version__ = "0.07" __description__ = """Base captcha service plugin""" __author_name__ = "pyLoad Team" __author_mail__ = "admin@pyload.org" KEY_PATTERN = None key = None ...
Python
0.000008
@@ -137,9 +137,9 @@ %220.0 -7 +8 %22%0A%0A @@ -2231,16 +2231,17 @@ None%0A%0A%0A + def c
97b594b84811da7bd90a615752c47c8982c1303c
fix addon order - dumper must be last
mitmproxy/dump.py
mitmproxy/dump.py
from __future__ import absolute_import, print_function, division from typing import Optional # noqa import typing # noqa from mitmproxy import controller from mitmproxy import exceptions from mitmproxy import flow from mitmproxy import builtins from mitmproxy import options from mitmproxy.builtins import dumper, te...
Python
0
@@ -1048,49 +1048,8 @@ lse%0A - self.addons.add(dumper.Dumper())%0A @@ -1135,24 +1135,65 @@ t_addons())%0A + self.addons.add(dumper.Dumper())%0A # Th
66201aadbace8515239bc93668ded544cc9a9e32
Version 0.0.8.3
mochi/__init__.py
mochi/__init__.py
__author__ = 'Yasushi Itoh' __version__ = '0.0.8.2' __license__ = 'MIT License' import sys IS_PYTHON_34 = sys.version_info.major == 3 and sys.version_info.minor == 4
Python
0.000001
@@ -46,9 +46,9 @@ 0.8. -2 +3 '%0A__
5bd911cb1f6975f8ecafe5a53a2bbc365793256c
save tagger.py
tagger.py
tagger.py
# Convolutional tagger over subwords import itertools import functools import json import os import pickle import sys from datetime import datetime import numpy as np np.random.seed(1337) # for reproducibility import tensorflow as tf from keras.preprocessing import sequence from keras.preprocessing.text import Toke...
Python
0.000001
@@ -4367,16 +4367,18 @@ ump(loss +es , jout)%0A @@ -4369,16 +4369,73 @@ p(losses, jout)%0A +%0Ashutil.copyfile('tagger.py', output_dir + '/tagger.py')%0A
13f73e514165b54bfb879fa324cdc1364b79579e
remove some params, check prev experiments.
movielens_test.py
movielens_test.py
import numpy as np import tensorflow as tf from sklearn.model_selection import KFold import itertools from model import VAEMF num_user = 943 num_item = 1682 hidden_encoder_dim = 216 hidden_decoder_dim = 216 latent_dim = 24 output_dim = 24 learning_rate = 0.002 batch_size = 64 reg_param = 0 one_hot = False n_steps =...
Python
0
@@ -1,12 +1,33 @@ +import os, itertools%0A import numpy @@ -102,25 +102,8 @@ Fold -%0Aimport itertools %0A%0Afr @@ -306,12 +306,11 @@ t = -Fals +Tru e%0An_ @@ -321,16 +321,17 @@ s = 1000 +0 %0A%0Ahedims @@ -326,36 +326,32 @@ 0000%0A%0Ahedims = %5B -64, 128, 256, 512%5D%0Ah @@ -355,28 +355,24 @@ %5D%0Ahddims...
87f08dc5a847a12ecbb8f9dfc21303f324e12e99
Fix execution of `commit_msg`
resources/git/hooks/commit_msg.py
resources/git/hooks/commit_msg.py
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import inspect import sys import textwrap #=============================================================================== FIRST_LINE_MAX_CHAR_LENGTH = 70 MESSAGE_BODY_MAX_CHAR_LINE_LENG...
Python
0
@@ -2886,25 +2886,16 @@ for func -_and_args in comm @@ -2916,61 +2916,8 @@ cs:%0A - func, args = func_and_args%5B0%5D, func_and_args%5B1:%5D%0A @@ -2956,15 +2956,8 @@ sage -, *args )%0A
87443336f6ff71d7b43520308c32a6f7b2cd594c
move assignmentId to data
mturk/viewsets.py
mturk/viewsets.py
from rest_framework.viewsets import GenericViewSet from rest_framework import mixins from rest_framework.decorators import detail_route, list_route from django.contrib.auth.models import User from django.shortcuts import get_object_or_404 from rest_framework.response import Response from rest_framework import status fr...
Python
0.000001
@@ -1011,36 +1011,28 @@ _id=request. -query_params +data .get('worker @@ -3096,94 +3096,8 @@ s):%0A - worker = get_or_create_worker(worker_id=request.query_params.get('workerId'))%0A @@ -3240,460 +3240,8 @@ ():%0A - if not mturk_assignment.task_worker:%0A task_worker, created ...
ef1336fcb30f951d057b5c943a948e8e5d95f07b
Add import json in roomfinder_dispo
roomfinder_dispo/roomfinder_dispo/dispo.py
roomfinder_dispo/roomfinder_dispo/dispo.py
#!/usr/bin/env python2.7 import sys reload(sys) sys.setdefaultencoding("utf-8") from flask import Flask, render_template, request, jsonify import argparse import datetime import os, sys import requests from socket import error as SocketError import errno app = Flask(__name__) @app.route("/book", methods=["GET"]) def...
Python
0.000001
@@ -248,16 +248,28 @@ rt errno +%0Aimport json %0A%0Aapp = @@ -573,16 +573,129 @@ ', '')%0A%0A + if starttime is None or endtime is None or user_name is None or user_email is None or room_name is None:%0A retu @@ -739,17 +739,16 @@ uest%5Cn%22%0A -%0A data
4815315b2200cb8061640f6333f2cb96b0707965
update admin to enable list edit
django_sso/admin.py
django_sso/admin.py
from django.contrib import admin from django_sso import settings from django_sso.models import Assignment class AssignmentAdmin(admin.ModelAdmin): pass admin.site.register(Assignment, AssignmentAdmin) if settings.DJANGO_SSO_ADD_LOGIN_BUTTON: admin.site.login_template = 'django_sso/login.html'
Python
0
@@ -151,12 +151,173 @@ -pass +list_display = ('__unicode__', 'username', 'username_mode', 'domain', 'user', 'weight')%0A list_editable = ('username', 'username_mode', 'domain', 'user', 'weight') %0A%0Aad
5022cefce20ecf20d7689fa6d2c280f8774ee677
add forgot password link to admin login
djangogirls/urls.py
djangogirls/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic.base import RedirectView urlpatterns = patterns('', # Redirect old links: url(r'^pages/in-your-city/$', RedirectView.as_view(url='/organize/', permanent=True)), url(r'^admin$', RedirectView.as_vi...
Python
0
@@ -350,16 +350,336 @@ rue)),%0A%0A + # Admin link for password reset%0A # See: https://github.com/darklow/django-suit/blob/92a745d72935622220eca80edfce779419c30094/suit/templates/admin/login.html#L61%0A url(r'%5Eadmin/password_reset/$',%0A RedirectView.as_view(url='/account/password_reset', permanent=...
caa63e934fb252c17feac25a01f4298ee4d9b3e1
Remove STATIC_URL from Django settings.
hello_world/settings.py
hello_world/settings.py
""" Django settings for hello_world project. Generated by 'django-admin startproject' using Django 1.9.1. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import o...
Python
0
@@ -3178,52 +3178,4 @@ c/'%0A -%0ASTATIC_ROOT = os.path.join(BASE_DIR, 'static')%0A
c7291b333c00d11e54339b2b2ae14b399cfdc12c
fix sys import (thank you, Orlando)
retirement_api/utils/check_api.py
retirement_api/utils/check_api.py
# script to check the retirement api to make sure # the SSA Quick Calculator is operational # and to log the result to a csv (currently via cron) import requests import datetime import json import time import signal timestamp = datetime.datetime.now() # rolling dob to guarantee subject is 44 and full retirement age i...
Python
0
@@ -139,16 +139,27 @@ a cron)%0A +import sys%0A import r @@ -219,16 +219,46 @@ t signal +%0Afrom urlparse import urlparse %0A%0Atimest @@ -2861,24 +2861,39 @@ %22%22%22%0A -%0A -try +for arg in sys.argv :%0A @@ -2898,39 +2898,98 @@ -ba +par se +d = -sys.argv%5B1%5D%0A except:%0A +urlp...
123f3e706e1931120e035acd2f11fcb1fa3320c7
Remove unnecessary files
rules/QEMU.py
rules/QEMU.py
import xyz class Qemu(xyz.BuildProtocol): pkg_name = 'QEMU' deps = ['pkg-config', 'gettext', 'glib'] def configure(self, builder, config): env = {} ldflags = '{standard_ldflags} -F/Library/Frameworks -F/System/Library/Frameworks' args = ('{source_dir_from_build}/configure', ...
Python
0.000004
@@ -3,16 +3,30 @@ port xyz +%0Aimport shutil %0A%0Aclass @@ -144,25 +144,8 @@ self -, builder, config ):%0A @@ -1279,24 +1279,29 @@ g'.format(** +self. config),%0A @@ -1443,16 +1443,21 @@ ormat(** +self. config)%0A @@ -1515,16 +1515,21 @@ +self. builder. @@ -1560,16 +1560,21 @@ config= +self. ...
7bab4f09278a14e0b2dbc64de82cf56ef25ed066
add a random sleep as workaround to prevent mangadex api spam blocker from throwing 503 errors
cum/scrapers/mangadex.py
cum/scrapers/mangadex.py
from bs4 import BeautifulSoup from cum import config, exceptions, output from cum.scrapers.base import BaseChapter, BaseSeries, download_pool from functools import partial from mimetypes import guess_type from urllib.parse import urljoin, urlparse import concurrent.futures import re import requests import json class ...
Python
0
@@ -241,16 +241,68 @@ rlparse%0A +from time import sleep%0Afrom random import randrange%0A import c @@ -471,16 +471,97 @@ 0-9%5D+)') +%0A # TODO remove when there are properly spaced api calls%0A spam_failures = 0 %0A%0A de @@ -780,32 +780,32 @@ lf.url_re, url)%0A - r = requ @@ -868,16 +868,974 @...
232d4c2c8876b05cec4a427fcdf141a036c97045
Rename "Events" into "EventRegistry" and "trigger" into "notify"
pyofwave_server/pyofwave/core/operation.py
pyofwave_server/pyofwave/core/operation.py
""" Standard interface for connecting client protocols to the operation extensions. """ from delta import DeltaObserverPool as dop import opdev, delta # Perform operation def _getChildren(tag): rep = [tag.text, ] for child in tag: rep.append(child) rep.append(child.tail) return rep def pe...
Python
0.000001
@@ -486,17 +486,22 @@ vent -s.trigger +Registy.notify (ope @@ -671,17 +671,23 @@ ss Event -s +Registy (object) @@ -1737,15 +1737,14 @@ def -trigger +notify (ope
7c120c02097bfaa1f494627ac93d6cddf5fb9049
FIX adding newline for chunks
cutools/diff/__init__.py
cutools/diff/__init__.py
from hashlib import md5 from clint.textui import puts, colored def clean_diff(diff): """Removes diff header from a diff. """ res = [] skip = True for line in diff.split('\n'): if line.startswith('diff --git'): skip = True if line.startswith('@@ '): skip = Fa...
Python
0
@@ -1033,24 +1033,31 @@ .join(chunk) + + '%5Cn' )%0A @@ -1170,16 +1170,23 @@ n(chunk) + + '%5Cn' )%0A re
c8fa72a130d84d921b23f5973dafb8fa91367381
Make ip_type a RadioSelect in the PTR form
cyder/cydns/ptr/forms.py
cyder/cydns/ptr/forms.py
from django import forms from cyder.cydns.forms import DNSForm from cyder.cydns.ptr.models import PTR class PTRForm(DNSForm): def delete_instance(self, instance): instance.delete() class Meta: model = PTR exclude = ('ip', 'reverse_domain', 'ip_upper', 'ip_lower') ...
Python
0.000001
@@ -368,10 +368,59 @@ Multiple +,%0A 'ip_type': forms.RadioSelect %7D%0A
e68c85ae4526557efd0d3c1bd45857583d542659
handle errors in better bibtex
python/citation_vim/zotero/betterbibtex.py
python/citation_vim/zotero/betterbibtex.py
# -*- coding: utf-8 -*- import os import shutil import json import sqlite3 class betterBibtex(object): def __init__(self, zotero_path, cache_path): self.bb_file = os.path.join(zotero_path, 'better-bibtex/db.json') self.bb_database = os.path.join(zotero_path, 'betterbibtex-lokijs.sqlite') ...
Python
0.000002
@@ -1247,16 +1247,33 @@ ys = %7B%7D%0A + try:%0A @@ -1331,16 +1331,20 @@ + if 'cite @@ -1355,18 +1355,43 @@ in item -:%0A + and 'itemID' in item:%0A @@ -1457,14 +1457,22 @@ + else:%0A + @@ -1512,16 +1512,54 @@ '%5D%5D = %22%22 +%0A except...
cbdbe14365d5caad28fe77d9c2ca1c66cbf783bd
test travis turning off db switch
python/marvin/tests/misc/test_db_switch.py
python/marvin/tests/misc/test_db_switch.py
#!/usr/bin/env python2 # encoding: utf-8 # # test_db_switch.py # # Created by José Sánchez-Gallego on Sep 7, 2016. from __future__ import division from __future__ import print_function from __future__ import absolute_import def create_connection(db_name): """Creates the connection and import the model classes."...
Python
0
@@ -1050,16 +1050,18 @@ focal%0A%0A%0A +# db_name @@ -1070,16 +1070,18 @@ 'manga'%0A +# db, mang @@ -1115,16 +1115,18 @@ b_name)%0A +# print(pe @@ -1154,16 +1154,18 @@ Data))%0A%0A +# db_name_ @@ -1184,16 +1184,18 @@ a_copy'%0A +# db, mang @@ -1234,16 +1234,18 @@ e_copy)%0A +# print(pe
c8df75a2112cd8e6a4f929ceac21714b716e46ce
Use the IRC nickname for !twitter if one is not provided.
dasbit/plugin/twitter.py
dasbit/plugin/twitter.py
from twisted.web.client import getPage from urllib import urlencode import json class Twitter: def __init__(self, manager): self.client = manager.client manager.registerCommand('twitter', 'lookup', 'twitter', '(?P<query>.*?)', self.lookup) def lookup(self, source, query): if query.isd...
Python
0
@@ -398,34 +398,49 @@ query%0A el -se +if len(query) %3E 0 :%0A ur @@ -525,16 +525,151 @@ query%7D) +%0A else:%0A url = 'http://api.twitter.com/1/users/show.json?%25s' %25 urlencode(%7B'screen_name' : source.prefix%5B'nickname'%5D%7D) %0A%0A
2dd7e97c1bf0ca927e41ad3aff05013e470f7702
Add twitter alias command
dasbit/plugin/twitter.py
dasbit/plugin/twitter.py
from dasbit.core import Config from twisted.web.client import getPage from urllib import urlencode, quote_plus import os import base64 import json import HTMLParser class Twitter: def __init__(self, manager): self.client = manager.client self.parser = HTMLParser.HTMLParser() self.config = C...
Python
0.000132
@@ -359,24 +359,215 @@ twitter'))%0A%0A + if not 'aliases' in self.config:%0A self.config%5B'aliases'%5D = %7B%7D%0A%0A manager.registerCommand('twitter', 'authenticate', 'alias-twitter', '(?P%3Chandle%3E%5B%5E %5D+)', self.alias)%0A mana @@ -802,16 +802,245 @@ ookup)%0A%0A + def ...
1cd445e7e2f41665200a43728cbd5196098b7cad
fix crash
school/api.py
school/api.py
# -*- coding: utf-8 -*- from django.core.paginator import Paginator, InvalidPage from django.http import Http404 from django.urls import re_path from django.db.models import Q from haystack.query import SearchQuerySet from tastypie import fields from tastypie.resources import ModelResource from tastypie.resources impo...
Python
0.000003
@@ -1495,16 +1495,42 @@ ers=None +, ignore_bad_filters=False ):%0A
774da53edef30cb2f3c45cc47c63d46f142a4e07
Use four space indentation, repo_path to arguments
score_repo.py
score_repo.py
#!/usr/bin/env python3 import argparse import importlib import json import sys def loadAttributePlugins(attributes): for attribute in attributes: if attribute['enabled']: try: attribute['implementation'] = importlib.import_module("attributes.{0}.main".format(attribute['name'])) except Import...
Python
0.000001
@@ -62,16 +62,26 @@ rt json%0A +import os%0A import s @@ -88,33 +88,34 @@ ys%0A%0Adef load -A +_a ttribute Plugins(attr @@ -94,33 +94,34 @@ f load_attribute -P +_p lugins(attribute @@ -124,16 +124,18 @@ butes):%0A + for at @@ -153,24 +153,28 @@ attributes:%0A + if attri @@ -196,21 +196,35 @@ :%0...
564f61102bbcdd357a768fc2768b4ec0f44bf8e2
Add QWebSettings to modify browsing behavior
screenshot.py
screenshot.py
# -*- coding: utf-8 -*- """Web screen capture script with QtWebKit How to use ========== $ python screenshot.py -h usage: screenshot.py [-h] [-a AGENT] [-l LANGUAGE] [-w WIDTH] [-H HEIGHT] [-p PREFIX] [-s] url positional arguments: url specify...
Python
0
@@ -1333,16 +1333,30 @@ QWebPage +, QWebSettings %0A%0Aexcept @@ -1559,32 +1559,76 @@ QNetworkRequest%0A + from PyQt5.QtWebKit import QWebSettings%0A from PyQt5.Q @@ -2540,24 +2540,342 @@ itialize()%0A%0A + def _private_browse(self):%0A print(%22Enable private browsing mode%22)%0A self.sett...
47c7cccc674beee06c2d4d6f6f197cb860d33354
Update bno055.py
home/Calamity/bno055.py
home/Calamity/bno055.py
arduino = Runtime.createAndStart("arduino","Arduino") arduino.connect("COM11") bno = Runtime.createAndStart("bno","Bno055") bno.setController(arduino) if bno.begin(): event = bno.getEvent() print event.orientation.x print event.orientation.y print event.orientation.z
Python
0
@@ -161,16 +161,34 @@ egin():%0A + while (True):%0A event @@ -204,16 +204,18 @@ Event()%0A + print @@ -236,16 +236,18 @@ ion.x%0A + + print ev @@ -266,16 +266,18 @@ ion.y%0A + + print ev @@ -294,9 +294,21 @@ ation.z%0A + sleep(1) %0A
59f96d2ca0f3752052d870ef9c7bc5bc21f21e40
add header
host/pydaq/HL/tdc_s3.py
host/pydaq/HL/tdc_s3.py
# # ------------------------------------------------------------ # Copyright (c) SILAB , Physics Institute of Bonn University # ------------------------------------------------------------ # # SVN revision information: # $Rev:: 1 $: # $Author:: TheresaObermann $: # $Date:: 2013-10-09 10...
Python
0.000001
@@ -228,17 +228,17 @@ $Rev:: -1 + @@ -270,23 +270,23 @@ r:: -TheresaObermann + @@ -304,29 +304,29 @@ e:: -2013-10-09 10:58:06 # + $:%0D%0A
b7339a48f8a2622a571d1dadb312e2625d1e4daf
fix mda_tweets None case
anyway/parsers/mda_twitter/mda_twitter.py
anyway/parsers/mda_twitter/mda_twitter.py
from .get_mda_tweets import get_user_tweets from anyway.utilities import init_flask from flask_sqlalchemy import SQLAlchemy import os def get_latest_tweet_id_from_db(db): """ get the latest tweet id :return: latest tweet id """ tweet_id = db.session.execute( "SELECT id FROM new...
Python
0.999842
@@ -4971,16 +4971,58 @@ I_KEY)%0D%0A + if mda_tweets is None:%0D%0A return %0D%0A md @@ -5413,50 +5413,8 @@ %5D%5D%0D%0A - if mda_tweets is None:%0D%0A return %0D%0A
70f460d3d0ba4c605704bb7179e3618583311621
add docstrings for SPIRE funcs
hsadownload/getspire.py
hsadownload/getspire.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from hsadownload.access import getHsaFits, getObsUrn, parseContextHdu, fixHerschelHeader import os import astropy.io.fits as fits def downloadSpireMap(ldict, obsid, le...
Python
0
@@ -398,16 +398,588 @@ False):%0A + %22%22%22%0A Download SPIRE map. Not meant to be called directly but to be called by%0A storeSpirePhoto.%0A%0A Parameters:%0A -----------%0A ldict (dict) : dictionary of level labels and urn strings%0A obsid (long int) : observation id%0A lev (string) : level...
f52921e78cc6a8af38df50f0b0ba4d04b15fd768
fix the import error in db.py
service/db.py
service/db.py
#coding=utf-8 import torndb import datetime from constants.errorcode import Errorcode from util.lt_exception import LTException class DB(object): def __init__(self, application): self.mysql_read = application.mysql_conn_read self.mysql_write = application.mysql_conn_write ...
Python
0.000035
@@ -6,17 +6,16 @@ ng=utf-8 -%0D %0Aimport @@ -20,17 +20,16 @@ t torndb -%0D %0Aimport @@ -36,17 +36,16 @@ datetime -%0D %0Afrom co @@ -78,17 +78,16 @@ rrorcode -%0D %0Afrom ut @@ -89,18 +89,19 @@ om util. -lt +gip _excepti @@ -114,10 +114,11 @@ ort -LT +Gip Exce @@ -126,14 +126,10 @@ tion - %0D%0A%0D%0A...
624adf50b90f97454857185d71259f6fb7a7fed6
fix imports
hublib/rappture/tool.py
hublib/rappture/tool.py
from __future__ import print_function from .node import Node import numpy as np from lxml import etree as ET import os from subprocess import call, Popen, PIPE import sys from .rappture import RapXML from hublib.use import _use class Tool(RapXML): def __init__(self, tool): """ tool can be any of t...
Python
0.000002
@@ -112,20 +112,22 @@ port os%0A -from +import subproc @@ -133,33 +133,8 @@ cess - import call, Popen, PIPE %0Aimp @@ -174,36 +174,8 @@ XML%0A -from hublib.use import _use%0A %0A%0Acl
0b4b57f90ee3d0fe0af3ba9921adccda784d6301
Allow to order payment profile by name, type and status.
src/waldur_mastermind/invoices/filters.py
src/waldur_mastermind/invoices/filters.py
import django_filters from rest_framework import filters from waldur_core.core import filters as core_filters from . import models class InvoiceFilter(django_filters.FilterSet): customer = core_filters.URLFilter( view_name='customer-detail', field_name='customer__uuid' ) customer_uuid = django_f...
Python
0
@@ -958,16 +958,103 @@ ES%0A ) +%0A o = django_filters.OrderingFilter(fields=(('name', 'payment_type', 'is_active'),)) %0A%0A cl
af0fbfe74ecaac67fb37f03e01a9aefcd06ce83f
Change default scriptPubKey in coinbase
qa/rpc-tests/test_framework/blocktools.py
qa/rpc-tests/test_framework/blocktools.py
# blocktools.py - utilities for manipulating blocks and transactions # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from mininode import * from script import CScript, CScriptOp # Create a block (with regtest difficulty) ...
Python
0
@@ -268,17 +268,39 @@ ScriptOp +, OP_TRUE, OP_CHECKSIG %0A - %0A# Creat @@ -1126,34 +1126,16 @@ Create a -n anyone-can-spend coinbas @@ -1171,16 +1171,126 @@ ner fees +.%0A# If pubkey is passed in, the coinbase output will be a P2PK output;%0A# otherwise an anyone-can-spend output. %0Adef cre @@ -1336,16 +1336,...
4d413d45def838d730806097484d7ccf9d49744f
Fix to test code
mycluster/test.py
mycluster/test.py
import mycluster mycluster.create_submit('hybrid:hybrid.q',script_name='test.job',num_tasks=2, tasks_per_node=2, my_script='test.bsh', ...
Python
0.000018
@@ -13,16 +13,34 @@ luster%0A%0A +mycluster.init()%0A%0A mycluste
1db0f887dc3f89533beb986bcd19c5fb7b0c80e7
clean unicode encoding (fix UnicodeEncodeError in non-ascii environments)
taskgv.py
taskgv.py
#!/usr/bin/env python 'graph dependencies in projects' import json from subprocess import Popen, PIPE import subprocess import sys import textwrap # Typical command line usage: # # taskgv TASKFILTER # # TASKFILTER is a taskwarrior filter, documentation can be found here: http://taskwarrior.org/projects/taskwarrior/wi...
Python
0
@@ -2399,16 +2399,32 @@ te(instr +.encode('utf-8') )%0A%0Aif __
c01eabde155da101e50c6587065b21b07c74a83a
remove debug msg
mjpegtools/__init__.py
mjpegtools/__init__.py
from sys import version_info if version_info < (3,): from urllib2 import Request,urlopen else: from urllib.request import Request,urlopen from io import BytesIO import re import logging from base64 import b64encode class MjpegParser(object): def __init__(self, url, auth=None, timeout=2): """ :param u...
Python
0.000048
@@ -1701,16 +1701,17 @@ :%0A +# print(co
7977e7874e78718cf2e1980c82003169fdd3c1fb
Fix "undefined reference to `_sbrk'" // Resolve #90
builder/frameworks/arduino/maple/stm32f1.py
builder/frameworks/arduino/maple/stm32f1.py
# Copyright 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
Python
0
@@ -3890,16 +3890,33 @@ , %22ld%22)%5D +,%0A%0A LIBS=%5B%22c%22%5D %0A)%0A%0A# re @@ -4153,13 +4153,8 @@ in ( -%22c%22, %22std
f75f1a9f26c6a4b96251f076cfd369e7fc276cab
fix layout parameter
bumblebee_status/modules/contrib/spotify.py
bumblebee_status/modules/contrib/spotify.py
"""Displays the current song being played and allows pausing, skipping ahead, and skipping back. Requires the following library: * python-dbus Parameters: * spotify.format: Format string (defaults to '{artist} - {title}') Available values are: {album}, {title}, {artist}, {trackNumber} * spotify.la...
Python
0
@@ -641,16 +641,104 @@ thanks! +%0A%0Afixed icons and layout parameter by %60gkeep %3Chttps://github.com/gkeep%3E%60_ - many thanks! %0A%22%22%22%0A%0Aim @@ -1005,77 +1005,82 @@ t = -self.parameter(%0A %22layout%22,%0A util.format.aslist( +util.format.aslist(%0A self.parameter(%0A ...
24f929d30924a5ee62d798e4069668cc42a51fde
Add -y option for skipping confirmation prompts
dcp/__main__.py
dcp/__main__.py
#!/usr/bin/env python3 """Format a drive for use as a Digital Cinema Package. """ import argparse import sys from subprocess import CalledProcessError import dcp.bytesize as bytesize from dcp.__init__ import __version__ from dcp.drive import attached_drives, drive_size, unmount from dcp.drive ...
Python
0
@@ -3433,24 +3433,173 @@ igabytes')%0A%0A + group.add_argument(%0A '-y', '--no-confirm',%0A default=False,%0A action='store_true',%0A help='skip confirmation dialogs')%0A%0A group = @@ -4297,22 +4297,78 @@ ))%0A%0A -if not +# Prompt before continuing.%0A%0A accepted = args....