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
0f28018d75b220d5519a1b616a85568b680c82b6
fix the --d2 option on the test all script
bin/chuck.py
bin/chuck.py
#! /usr/bin/env python """ Chuck is an Outcast wrapper for invoking a package's automated unit tests =============================================================================== usage: chuck [options] --match PATTERN [args <testargs>...] chuck [options] --file CMDLIST chuck [--help] Arguments: -...
Python
0.000071
@@ -4200,52 +4200,58 @@ -if ( args%5B'--d2'%5D ):%0A filtered = +d2 = True%0A if ( args%5B'--d2'%5D and len( fnma @@ -4261,24 +4261,21 @@ .filter( -filtered +names , args%5B' @@ -4278,24 +4278,56 @@ gs%5B'--d2'%5D ) +) == 0 ):%0A d2 = False %0A if @@ -4346,16 +4346...
3eee8121980a4709558e18549646cf9483467a2e
Force database autocommit to False
tkp/db/database.py
tkp/db/database.py
import logging import tkp.config logger = logging.getLogger(__name__) class Database(object): """ An object representing a database connection. """ _connection = None _configured = False # this makes this class a singleton _instance = None def __new__(cls, *args, **kwargs): if...
Python
0.999738
@@ -1760,16 +1760,162 @@ f.port%0A%0A + # During pipeline operation, we force autocommit to off (which should%0A # be the default according to the DB-API specs). See #4885.%0A @@ -1974,16 +1974,57 @@ tdb.sql%0A + kwargs%5B'autocommit'%5D = False%0A @@ -2196,32 +2196,80 @@ ...
99aaf537197b8f652780cbbb16fb2090e448ecc5
increment minor version to 1.8.0
tmuxp/__about__.py
tmuxp/__about__.py
__title__ = 'tmuxp' __package_name__ = 'tmuxp' __version__ = '1.7.0a3' __description__ = 'tmux session manager' __email__ = 'tony@git-pull.com' __author__ = 'Tony Narlock' __github__ = 'https://github.com/tmux-python/tmuxp' __docs__ = 'https://tmuxp.git-pull.com' __tracker__ = 'https://github.com/tmux-python/tmuxp/issu...
Python
0.000593
@@ -61,13 +61,11 @@ '1. -7 +8 .0 -a3 '%0A__
cd5d86803b7f72a17ac53c11737af75d167a7155
Test constants
tests/sockopt_function_test.py
tests/sockopt_function_test.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import unittest import pycurl from . import appmanager setup_module, teardown_module = appmanager.setup(('app', 8380)) class SockoptFunctionTest(unittest.TestCase): def setUp(self): self.curl = pycurl.Curl() self.curl.setopt(self.curl.U...
Python
0.000001
@@ -85,16 +85,35 @@ pycurl%0A%0A +from . import util%0A from . i @@ -1669,16 +1669,328 @@ lled'%5D%0A%0A + @util.min_libcurl(7, 28, 0)%0A def test_socktype_accept(self):%0A assert hasattr(pycurl, 'SOCKTYPE_ACCEPT')%0A assert hasattr(self.curl, 'SOCKTYPE_ACCEPT')%0A %0A def test_socktype_ipc...
38374eac7e04bfdfe63777b4c39263d04bdf4743
delete unused line
toami/collector.py
toami/collector.py
""" asyncronouse SNMP collector. """ import asyncio from pysnmp.hlapi.asyncio import (SnmpEngine, getCmd, CommunityData, UdpTransportTarget, ContextData, ObjectType, ObjectIdentity) CONCURRENT_REQUEST_LIMIT = 5 sem = asyncio.Semaphore(CONCURRENT_RE...
Python
0.000005
@@ -280,58 +280,8 @@ = 5%0A -sem = asyncio.Semaphore(CONCURRENT_REQUEST_LIMIT)%0A %0A%0Acl
b35f2e10763f8a3ce04755fd246ebfd5c4eee297
Support vim keybindings (up/down) in toggle view (#1)
todo/utils/menu.py
todo/utils/menu.py
# coding: utf-8 """ Interactive menu to select items """ try: import curses except ImportError: pass EXIT_KEYS = [113, 27, 127, 10] SPACE_KEY = 32 def show_options(title=None, subtitle=None, items=[], callback=None): try: screen = curses.initscr() except NameError: import sys ...
Python
0
@@ -2970,27 +2970,28 @@ if key -== +in ( curses.KEY_D @@ -2993,16 +2993,27 @@ KEY_DOWN +, ord('j')) :%0A @@ -3110,19 +3110,20 @@ lif key -== +in ( curses.K @@ -3127,16 +3127,27 @@ s.KEY_UP +, ord('k')) :%0A
a69d9e2126a8e241bed43aee67e35db1bffc73ed
Fix document mapping
apps/search/bible/views.py
apps/search/bible/views.py
from django.db.models import Q from django.http import Http404 from django.utils.decorators import classonlymethod from django_elasticsearch_dsl_drf.filter_backends import FilteringFilterBackend, DefaultOrderingFilterBackend, \ HighlightBackend from django_elasticsearch_dsl_drf.viewsets import DocumentViewSet from ...
Python
0.000174
@@ -3552,16 +3552,56 @@ VerseNTR +,%0A Versions.KJV: indexes.VerseKJV %0A %7D%0A%0A
42c5872c9cb611b34e3e9514ac1c5270b874594f
fix caching
apps/widget/video_cache.py
apps/widget/video_cache.py
# Universal Subtitles, universalsubtitles.org # # Copyright (C) 2010 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
Python
0.000002
@@ -884,16 +884,68 @@ settings +%0Afrom django.utils.hashcompat import sha_constructor %0A%0ATIMEOU @@ -2386,25 +2386,54 @@ .format( -video_url +sha_constructor(video_url).hexdigest() )%0A%0Adef _
a017c42dcee1e377d3056d123e8899aabaeeabe8
Make sure we stop child process when capturing KeyboardInterrupt
envdir/__main__.py
envdir/__main__.py
import glob import optparse import os import subprocess import sys from .__version__ import __version__ # must have shell = True on Windows shellout = sys.platform == 'win32' class EnvOptionParser(optparse.OptionParser): def error(self, msg, no=2): """error(msg : string, [no : int]) Print a us...
Python
0
@@ -3783,32 +3783,42 @@ try:%0A + process = subprocess.chec @@ -3813,26 +3813,21 @@ process. -check_call +Popen (child_a @@ -3831,16 +3831,21 @@ d_args,%0A + @@ -3887,32 +3887,37 @@ _newlines=True,%0A + @@ -3976,32 +3976,37 @@ + bufsize=0,%...
244974962c30c5d1be9733445d26406b9196e419
include path
bin/clean.py
bin/clean.py
#!/usr/local/bin/python3.3 # encoding: utf-8 ''' pyverse.bin.clean -- cleans all objects from selected DB pyverse.bin.clean While drop handles only objects that are defined in the assests folder, clean will remove ALL objects in the database, regardless if they came from assets or where created there manually by other...
Python
0.000001
@@ -556,16 +556,57 @@ port os%0A +path, filename = os.path.split(__file__)%0A sys.path @@ -620,30 +620,19 @@ (0, -os. path -.abspath(' ++'/ ..') -) %0Aimp @@ -3325,8 +3325,9 @@ (main()) +%0A
4a570af993867feb8588cd608372f7d7ee7ca484
incorrect import
bin/start.py
bin/start.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from subprocess import Popen from ipasnhistory.libs.helpers import get_homedir if __name__ == '__main__': # Just fail if the env isn't set. get_homedir() p = Popen(['run_backend.py', '--start']) p.wait() Popen(['uwhoisd', '-c', str(get_homedir() / 'ex...
Python
0.998246
@@ -79,25 +79,15 @@ rom -ipasnhistory.libs +uwhoisd .hel
0aa9b8811c8ed8f19f490141f32e09984cfea49d
revert variable name back to `date`
cea/demand/demand_main.py
cea/demand/demand_main.py
""" =========================== Analytical energy demand model algorithm =========================== """ from __future__ import division import multiprocessing as mp import pandas as pd import time import cea.globalvar import cea.inputlocator from cea.demand import occupancy_model from cea.demand import thermal_load...
Python
0.000033
@@ -2844,26 +2844,20 @@ ()%0A%0A -time_steps +date = pd.da @@ -3276,26 +3276,20 @@ e_maker( -time_steps +date , locato @@ -3533,34 +3533,28 @@ properties, -time_steps +date , gv, locato @@ -3776,18 +3776,12 @@ es, -time_steps +date , gv
c240abde6630f2203e02f68c2fc0c8f3dea54162
change creation of the new file name
renamer.py
renamer.py
#!/usr/bin/env python3 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. Redistri...
Python
0
@@ -1523,18 +1523,65 @@ ame(self -): +, extension=%22new%22):%0A self.ext = extension%0A %0A @@ -1602,16 +1602,20 @@ 1%7D - %7B2%7D +.%7B3%7D %22.format @@ -1615,16 +1615,29 @@ .format( +%0A self.sea @@ -1664,16 +1664,26 @@ elf.name +, self.ext )%0A%0Aclass @@ -2022,25 +2022,8 @@ ame)...
abe5d11262b642d537c753f33c9b0b6a399b2b42
add '--version' flag
renamer.py
renamer.py
#!/usr/bin/env python3 # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. Redistri...
Python
0.000556
@@ -2656,24 +2656,126 @@ ntParser()%0A%0A + parser.add_argument(%22-v%22, %22--version%22, action=%22version%22,%0A version=%22%25(prog)s -- dev build%22)%0A parser.a
adfe03b431f13d6982fdb7a85e57f52d765e54f2
handle all errors coming from an attempt to connect
ceph_deploy/connection.py
ceph_deploy/connection.py
from ceph_deploy.lib.remoto import Connection from sudo_pushy import needs_sudo # TODO move this to utils once pushy is out def get_connection(hostname, logger): """ A very simple helper, meant to return a connection that will know about the need to use sudo. """ return Connection( hostna...
Python
0
@@ -272,24 +272,37 @@ do.%0A %22%22%22%0A + try:%0A return C @@ -320,16 +320,20 @@ + + hostname @@ -334,16 +334,20 @@ stname,%0A + @@ -369,16 +369,20 @@ + + sudo=nee @@ -396,10 +396,219 @@ (),%0A + )%0A%0A except Exception as error:%0A msg =...
6bdbfe74813744476681074f5578737795d9b728
remove bootstrap-rgw key via forgetkeys
ceph_deploy/forgetkeys.py
ceph_deploy/forgetkeys.py
import logging import errno from .cliutil import priority LOG = logging.getLogger(__name__) def forgetkeys(args): import os for f in [ 'mon', 'client.admin', 'bootstrap-osd', 'bootstrap-mds', ]: try: os.unlink('{cluster}.{what}.keyring'.format( ...
Python
0
@@ -230,16 +230,41 @@ p-mds',%0A + 'bootstrap-rgw',%0A
de0e8c54827d8c79c47f28c93c6951b2921fe8e1
create a working dev sub-command
ceph_installer/cli/dev.py
ceph_installer/cli/dev.py
class Dev(object): help = "Development options" def __init__(self, arguments): self.arguments = arguments def main(self): raise SystemExit(0)
Python
0
@@ -1,175 +1,1997 @@ -%0A%0Aclass Dev(object):%0A%0A help = %22Development options%22%0A%0A def __init__(self, arguments):%0A self.arguments = arguments%0A%0A def main(self):%0A raise SystemExit(0 +from os import path%0Afrom textwrap import dedent%0Afrom tambo import Transport%0A%0Afrom ceph_inst...
ce5c26ea73ac9764dc45d6f0cef7b7958dc06a30
FIx minor bugs and styles
chainer/testing/matrix.py
chainer/testing/matrix.py
import numpy from chainer.utils import argument def generate_matrix(shape, dtype=float, **kwargs): """Generates a random matrix with given singular values. This function generates a random NumPy matrix (or a set of matrices) that has specified singular values. It can be used to generate the inputs for a...
Python
0
@@ -99,16 +99,17 @@ s):%0A +r %22%22%22Gener @@ -157,16 +157,16 @@ values.%0A - %0A Thi @@ -904,16 +904,18 @@ kwargs, +(' singular @@ -925,13 +925,16 @@ lues -= +', None +) ,%0A @@ -1062,16 +1062,25 @@ t(shape) +%0A )%0A k_ @@ -1184,16 +1184,47 @@ atrices%0A + dtype = numpy.dtype(dt...
ed0484931b104026ebd7ac9a411c89e50efa9bdb
Revert "fix"
chainercv/testing/attr.py
chainercv/testing/attr.py
from chainer.testing.attr import cudnn # NOQA from chainer.testing.attr import slow # NOQA from chainer.testing.attr import multi_gpu # NOQA from chainer.testing.attr import gpu # NOQA try: import pytest disk = pytest.mark.disk except ImportError: from chainer.testing.attr import _dummy_callable di...
Python
0
@@ -5,33 +5,51 @@ chainer.testing -. + import attr%0A%0Afrom attr import cudn @@ -63,32 +63,16 @@ QA%0Afrom -chainer.testing. attr imp @@ -93,32 +93,16 @@ QA%0Afrom -chainer.testing. attr imp @@ -128,32 +128,16 @@ QA%0Afrom -chainer.testing. attr imp @@ -228,61 +228,8 @@ or:%0A - from chainer.testing.a...
1d350bbf24e9941919d34cdd85f9fae483a48f05
Print URL when starting benchmark
benchmark.py
benchmark.py
#/usr/bin/env/python import timeit import time import string import argparse # Import clients, so script fails fast if not available from pycurl import Curl try: from cStringIO import StringIO except: try: from StringIO import StringIO except ImportError: from io import StringIO import requ...
Python
0.000001
@@ -5072,21 +5072,93 @@ print - args +('TESTING AGAINST URL: %7B0%7D with delay %7B1%7D'.format(args%5B'url'%5D,args%5B'delay'%5D)) %0A run
187acfeee9a7dfa3f9bd5300a392852ab8b1c30c
Add ua_reset. Print log messages before a command is executed.
bin/admin.py
bin/admin.py
#!/usr/bin/python2.5 # # Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the 'License') # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Python
0
@@ -1313,16 +1313,49 @@ lease',%0A + 'ua_reset': '/admin/ua/reset',%0A %7D%0A%0A%0Acl @@ -2312,47 +2312,333 @@ -while not params.get('is_done', False): +elapsed_time = datetime.timedelta()%0A request_time = datetime.timedelta()%0A while not params.get('is_done', False):%0A logging.info(%0A ...
395fec516acdfe1a8ed6fc2ec8025e317fee311e
bump master for jenkins
traptor/version.py
traptor/version.py
__version__ = '1.4.13.0' if __name__ == '__main__': print(__version__)
Python
0
@@ -69,8 +69,9 @@ sion__)%0A +%0A
d5a21c3031f45c845b2b244040ea8dcf99801299
Use basestring to allow percentage definition in MaintenanceWindowTask (#1151)
troposphere/ssm.py
troposphere/ssm.py
# Copyright (c) 2015, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .validators import (integer, boolean, s3_bucket_name, notification_type, notification_event, json_checker, task_type, ...
Python
0
@@ -4894,31 +4894,34 @@ currency': ( -integer +basestring , False),%0A @@ -4936,31 +4936,34 @@ axErrors': ( -integer +basestring , True),%0A
399cb5ab293ffbe615ff6dd503ad6fee6bd84af9
Fix error when using keystone v3
cloudkitty/tenant_fetcher/keystone.py
cloudkitty/tenant_fetcher/keystone.py
# -*- coding: utf-8 -*- # !/usr/bin/env python # Copyright 2015 Objectif Libre # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
Python
0.000002
@@ -765,16 +765,52 @@ kclient%0A +from keystoneclient import discover%0A from key @@ -1923,41 +1923,288 @@ -tenant_list = self.admin_ks.tenan +keystone_version = discover.normalize_version_number(%0A CONF.keystone_fetcher.keystone_version)%0A if discover.version_match((2,), keystone_version):%...
7bf848b17e892d9c99c2d4632d4ac1acda78d939
make it work
bin/start.py
bin/start.py
#!/usr/bin/env python # -*-python-*- import os import sys import logging import subprocess import signal import time # please rewrite me in go (so it can be cross-compiled) if __name__ == '__main__': import optparse opt_parser = optparse.OptionParser() opt_parser.add_option('-d', '--data', dest='data',...
Python
0.000142
@@ -1368,16 +1368,25 @@ %229999%22, + %22-path%22, options @@ -1437,16 +1437,25 @@ %228001%22, + %22-path%22, www%5D%0A%0A @@ -1566,16 +1566,34 @@ _cmd))%0A%0A + # sys.exit()%0A%0A pip
4a64f395c1c5f38be670676fe169109950576f0d
Fix training syntax error
bin/train.py
bin/train.py
#! /usr/bin/env python """Main script to run training and evaluation of models. """ import functools import os import tempfile from seq2seq import models from seq2seq.data import data_utils, vocab from seq2seq.training import HParamsParser from seq2seq.training import utils as training_utils from seq2seq.training im...
Python
0.000011
@@ -1098,16 +1098,17 @@ t%22, None +, %0A
db5072f372e7e5d68955641ff801461e4ec4038e
Change the redrawing strategy in the watch script
bin/watch.py
bin/watch.py
#!/usr/bin/env python3 import os, sys sys.path.append(os.path.dirname(__file__)) import matplotlib.pyplot as pp import numpy as np import socket def main(dimension_count, address): print('Connecting to {}...'.format(address)) client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.connect(addre...
Python
0.000001
@@ -365,90 +365,60 @@ p -p.figure(figsize=(14, 6), dpi=80, facecolor='w', edgecolor='k')%0A pp.pause(1e-3) +lots = prepare(dimension_count)%0A x_limit = %5B0, 1%5D %0A @@ -533,20 +533,28 @@ -half +sample_count = len(r @@ -562,16 +562,55 @@ w) // 2%0A + x = np.arange(0, sample_count)%0A...
91488439ced9b744cadf237ae30f02aae4c6d7d3
Define base_dir as a variable
bootstrap.py
bootstrap.py
#!/usr/bin/env python3 # Copyright 2013 Daniel Narvaez # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
Python
0
@@ -759,16 +759,70 @@ equest%0A%0A +base_dir = os.path.dirname(os.path.abspath(__file__))%0A environ_ @@ -1044,80 +1044,131 @@ 1%22%0A%0A -%0Adef get_base_dir():%0A return os.path.dirname(os.path.abspath(__file__ +virtualenv_dir = os.path.join(%22build%22, %22eta%22,%0A os.environ.get...
9850ec3200ac80fd85f400fbbe115483ce0c3173
Create symlink instead of copy
bootstrap.py
bootstrap.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import shutil import subprocess commands = { 'ssh_key': "ssh-keygen -t rsa -b 4096 -C '{email}'" } DOTFILES = [ '.aliases', '.bash_profile', '.bash_prompt', '.exports', '.functions', '.gitconfig', '.gitignore', '.hushlogin', ...
Python
0.000001
@@ -669,45 +669,11 @@ -total = len(DOTFILES)%0A%0A for index, +for dot @@ -684,26 +684,16 @@ in -enumerate( DOTFILES ):%0A @@ -688,17 +688,16 @@ DOTFILES -) :%0A @@ -737,25 +737,24 @@ otfile)%0A -%0A shutil.c @@ -749,19 +749,18 @@ -shutil.copy +os.symlink (dot @@ -788,13 +788...
8aab608efa6f7a53de061f57da64bebc54adf143
Update to check_next_launch()
bot/tasks.py
bot/tasks.py
from bot.app.DailyDigest import DailyDigestServer from celery.schedules import crontab from celery.task import task, periodic_task from celery.utils.log import get_task_logger from bot.app.Notifications import NotificationServer logger = get_task_logger('bot') TAG = 'Digest Server' @periodic_task( run_every=(c...
Python
0
@@ -1055,14 +1055,28 @@ ication. -run +check_next_launch ()%0A
15136a5ec497713f26f2118694e36834fe8f5a09
Correct variable to use when setting the product
bugsy/bug.py
bugsy/bug.py
import datetime import requests VALID_STATUS = ["RESOLVED", "ASSIGNED", "NEW", "UNCONFIRMED"] VALID_RESOLUTION = ["FIXED", "INCOMPLETE", "INVALID", "WORKSFORME", "DUPLICATE", "WONTFIX"] def str2datetime(s): return datetime.datetime.strptime(s, '%Y-%m-%dT%H:%M:%SZ') class BugException(Exception): """ ...
Python
0.000011
@@ -3972,23 +3972,30 @@ self._ +bug%5B' product +'%5D = value
516ea71d120eca94a76245fbcb62811b7980b63c
Fix run.
build/run.py
build/run.py
#!/usr/bin/env python # Copyright (c) 2015 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 argparse import os import sys import game_project import vinn def _RelPathToUnixPath(p): return p.replace(os.sep, '/') ...
Python
0
@@ -467,16 +467,17 @@ hs=list( +%5B project. @@ -487,17 +487,17 @@ rce_path -s +%5D ),%0A j
83990caf71fca170b6f46c5487627e9872091453
Fix files for the last time.
commands/kcdownloader2.py
commands/kcdownloader2.py
#!/usr/bin/env python3 # ^ can someone check if that works? (i got ": No such file or directory" from bash). # -*- coding: utf-8 -*- # Kantai Collection Downloader Script for assets. # Written by Coburn (SoftwareGuy on GitHub) # Please make sure you have json and requests installed! import json import os.path import ...
Python
0
@@ -327,16 +327,17 @@ ts%0A%0A%0A%0A%0A%0A +%0A # Define @@ -4030,16 +4030,22 @@ me'%5D, x) +, 'wb' ) as out
d70ece2a18264fad88081e0b842b7c73223e9ee2
Correct command desc and changed comments
Cogs/Boop.py
Cogs/Boop.py
import asyncio import discord import random from discord.ext import commands from Cogs import DisplayName from Cogs import Nullify def setup(bot): # Add the bot bot.add_cog(Boop(bot)) class Boop: # Init with the bot reference, and a reference to the settings var def __init__(self, bot): se...
Python
0
@@ -430,25 +430,21 @@ %09%22%22%22 -Drink like a boss +Boop da snoot .%22%22%22 @@ -517,29 +517,28 @@ ck if we're -drink +boop ing nothing%0D @@ -1162,29 +1162,28 @@ ck if we're -drink +boop ing a member @@ -1333,21 +1333,20 @@ # We're -drink +boop ing... o @@ -2860,13 +2860,12 @@ 're -drink +boop ing @@...
969f0046b69606d40a30dde8d6969afa410ac993
Update PCPP.py
Cogs/PCPP.py
Cogs/PCPP.py
import requests from pyquery import PyQuery as pq def normalStyle(types, names, escape = False): padTo = 0 for t in types: # Find out which has the longest tempLen = len(t) if tempLen > padTo: padTo = tempLen if escape: partdown = '\`\`\`\n' else: partdown = '```\n' for i in range(0, len(types)): ...
Python
0.000001
@@ -2711,24 +2711,48 @@ int( -type(children%5B0%5D +'%22%7B%7D%22'.format(children%5B0%5D.text_content() ))%0A%09
974fa61b0ea26c07d7b16ff8d53eb682d3f0c21f
Fix tests for IPython.testing
IPython/testing/plugin/show_refs.py
IPython/testing/plugin/show_refs.py
"""Simple script to show reference holding behavior. This is used by a companion test case. """ from __future__ import print_function import gc class C(object): def __del__(self): pass #print 'deleting object...' # dbg if __name__ == '__main__': c = C() c_refs = gc.get_referrers(c) ref_ids...
Python
0.000096
@@ -316,16 +316,21 @@ f_ids = +list( map(id,c @@ -335,16 +335,17 @@ ,c_refs) +) %0A%0A pri @@ -362,16 +362,21 @@ rrers:', +list( map(type @@ -376,17 +376,18 @@ ap(type,c_refs)) +) %0A
762ff9af1be33daad8d0965221a86f85c265e96b
Update baseapp.py
flask_appbuilder/baseapp.py
flask_appbuilder/baseapp.py
from .babel.views import LocaleView from .security.manager import SecurityManager from .security.views import AuthDBView, AuthOIDView, ResetMyPasswordView, \ ResetPasswordView, UserDBGeneralView, UserOIDGeneralView, RoleGeneralView, \ PermissionViewGeneralView, ViewMenuGeneralView, PermissionGeneralView fr...
Python
0.000001
@@ -435,22 +435,8 @@ port - BabelManager, Bab @@ -473,16 +473,65 @@ gettext%0A +from flask.ext.babel.manager import BabelManager%0A from fla
96f58343dfa3935034f4e753d51f67b26bf0e771
Fix TypeError in Py3k.
image_slicer/main.py
image_slicer/main.py
import sys import time import os import random from math import sqrt, ceil from PIL import Image def get_prefix(filename): """Strip extension to leave only the filename.""" return os.path.splitext(filename)[0] def open_images(directory): """Open all images in a directory. Return tuple of Image instances...
Python
0
@@ -2101,17 +2101,26 @@ %22%22%22%0A -# try: + # Needs tests. %0A @@ -2150,91 +2150,8 @@ me)%0A -# except:%0A# raise ValueError('Invalid image file: %7B0%7D'.format(filename))%0A @@ -2318,16 +2318,20 @@ ile_h = +int( im_w / c @@ -2336,19 +2336,24 @@ columns +) , i +nt(i m_h / ro @@ -2...
1386afaa7a7a7d892ac5722c0ac0163bda51f7ba
include git hashes in the report (thanks ChriDr)
modules/processing/analysisinfo.py
modules/processing/analysisinfo.py
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import logging from lib.cuckoo.core.database import Database, Task from lib.cuckoo.common.abstr...
Python
0
@@ -391,16 +391,68 @@ VERSION%0A +from lib.cuckoo.common.constants import CUCKOO_ROOT%0A from lib @@ -1432,55 +1432,822 @@ -return dict(%0A version=CUCKOO_VERSION +filepath = os.path.join(%0A CUCKOO_ROOT, %22.git%22, %22refs%22, %22heads%22, %22master%22%0A )%0A%0A if os.path...
3f6cad820aa84dfa1899368f0b3677b1c6907c71
quit webdriver at end
dallinger/bots.py
dallinger/bots.py
"""Bots.""" import logging from selenium import webdriver from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from dallinger.config import get_confi...
Python
0
@@ -358,16 +358,34 @@ cConfig( +level=logging.INFO )%0Alogger @@ -3789,8 +3789,35 @@ n_off()%0A + self.driver.quit()%0A
a3d2cc9f86342859d7ad6d68689e03f8e1b1266e
Fix docstring style
dasem/__main__.py
dasem/__main__.py
""" Usage: dasem <query> Options: --max-n-pages=<int> Maximum number of pages -v --verbose Verbose debug messaging """ def main(): raise NotImplementedError if __name__ == '__main__': main()
Python
0.000002
@@ -1,11 +1,18 @@ %22%22%22 +dasem.%0A %0AUsage:%0A @@ -23,139 +23,68 @@ asem - %3Cquery%3E%0A%0AOptions:%0A --max-n-pages=%3Cint%3E Maximum number of pages%0A -v --verbose Verbose debug messaging%0A%0A%22%22%22%0A%0A%0Adef main(): +%0A%0A%22%22%22%0A%0A%0Adef main():%0A %22%22%22Handle command-line in...
19a7e6bab3bf497ef23d72f3d5bbecde5c7a8cc5
Fix error message for php mess detector
bin/tools.py
bin/tools.py
# -*- coding: utf-8 -*- # config.py # # Copyright (c) 2012-2013 Henning Glatter-Götz # # For the full copyright and license information, please view the LICENSE # file that was distributed with this source code. # tools.py - Collection of configuration tasks for fabric # # To include it in the fabfile.py add this near...
Python
0.000001
@@ -1304,38 +1304,39 @@ he PEAR package -phploc +PHP_PMD is not installe @@ -1456,38 +1456,39 @@ pear.phpunit.de/ -phploc +PHP_PMD ')%0A%0A%0A@task%0Adef c
5c7e3608a06f335022b8a07b429e7f932cff4032
Check if raw source file exists
bin/train.py
bin/train.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Create and train a given model.""" import logging import sys logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.DEBUG, stream=sys.stdout) import os import yaml import datetime # hwrt modules import...
Python
0
@@ -959,16 +959,220 @@ folder%0A + if not os.path.isfile(raw_source_file):%0A logging.error(%22File '%25s' was not found.%22, raw_source_file)%0A logging.error(%22You should eventually execute 'hwrt download'.%22)%0A sys.exit(-1)%0A dt =
f1ff1e1c98af8e922ecb60fd06138403792cf958
Fix Discord validation (#2356)
mozillians/phonebook/validators.py
mozillians/phonebook/validators.py
import re from django.apps import apps from django.core.validators import EmailValidator, URLValidator from django.forms import ValidationError from django.utils.translation import ugettext as _ def validate_twitter(username): """Return a twitter username given '@' or http(s) strings.""" if username: ...
Python
0
@@ -3112,10 +3112,9 @@ (r'%5E -%5CS +. +#%5B0
07178f1f95e3c3cfe3acc2d2eb9ac3422ba32e28
Update tica sampling
msmbuilder/io/sampling/sampling.py
msmbuilder/io/sampling/sampling.py
# Author: Muneeb Sultan <msultan@stanford.edu> # Contributors: Matthew Harrigan <matthew.harrigan@outlook.com> # Copyright (c) 2016, Stanford University and the Authors # All rights reserved. from __future__ import absolute_import import numpy as np from ...utils import KDTree def sample_dimension(trajs, dimension, ...
Python
0
@@ -1362,327 +1362,216 @@ es%5D%0A -%0A -# sort it because all three sampling schemes use it%0A all_vals = %5B%5D%0A for traj in trajs:%0A all_vals.extend(traj%5B:, 0%5D)%0A all_vals = np.sort(all_vals)%0A%0A if scheme == %22linear%22:%0A max_val = all_vals%5B-1%5D%0A min_val = a...
385f190d782c7d2edbba8b425db2418e6891ea86
Consolidate hasattr + getter to single statement with default value.
framework/mongo/__init__.py
framework/mongo/__init__.py
# -*- coding: utf-8 -*- from flask import request from modularodm.storedobject import StoredObject as GenericStoredObject from modularodm.ext.concurrency import with_proxies, proxied_members from bson import ObjectId from .handlers import client, database, set_up_storage from api.base.api_globals import api_globals...
Python
0
@@ -812,11 +812,11 @@ if -has +get attr @@ -842,33 +842,15 @@ est' -) and api_globals.request +, None) is
a9a433b3a1d55e849e693f47af96a98369516e6a
Remove unused imports
bkkcsirip.py
bkkcsirip.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import time import locale import logging from itertools import chain from datetime import datetime import arrow import requests from redis import StrictRedis from requests_oauthlib import OAuth1 BKK_API_URL = 'https://www.bkk.hu/apps/bkkinfo/lista-api.php' TW...
Python
0.000001
@@ -67,22 +67,8 @@ ime%0A -import locale%0A impo @@ -109,38 +109,8 @@ hain -%0Afrom datetime import datetime %0A%0Aim
b969c421436c633a7ab8a68667621c018bb0bb8d
Update test.py
test/test.py
test/test.py
# -*- coding: utf-8 -*- """ Created on Sat Jan 23 13:03:00 2016 @author: p """ import wellapplication as wa import pandas as pd import matplotlib def test_getelev(): x = [-111.21, 41.4] m = wa.getelev(x) assert m > 100.0 def test_gethuc(): x = [-111.21, 41.4] huc_data = wa.get_huc(x) assert ...
Python
0.000001
@@ -1641,38 +1641,37 @@ p(xle)%0A x = ' -Values +Level '%0A xle1 = wa. @@ -1824,14 +1824,13 @@ = ' -Values +Level '%0A
d657b952628114eb05245af30ae84f7a5b137a76
remove mock
docs/conf.py
docs/conf.py
# -*- coding: utf-8 -*- # # Scikit-plot documentation build configuration file, created by # sphinx-quickstart on Sun Feb 12 17:56:21 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. #...
Python
0.000463
@@ -657,16 +657,18 @@ here.%0A#%0A +# import o @@ -669,16 +669,18 @@ port os%0A +# import s @@ -682,16 +682,18 @@ ort sys%0A +# sys.path @@ -725,16 +725,18 @@ h('.'))%0A +# sys.path @@ -773,266 +773,8 @@ /')) -%0Afrom mock import Mock as MagicMock%0A%0A%0Aclass Mock(MagicMock):%0A @classmethod%0A def...
6fcda40d9727d071f2a2139a49af1e034e10530c
Use https for numpy's intersphinx inventory
docs/conf.py
docs/conf.py
# # Diofant documentation build configuration file. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (module imports are okay, they're removed automatically). # # All configuration ...
Python
0
@@ -968,17 +968,16 @@ rsphinx' -, %5D%0A%0Anumpy @@ -4477,16 +4477,17 @@ : ('http +s ://docs.
5dfdad4abd09e02202d8cb74e42469323ff33a2c
Increase length for new property type
ratechecker/models.py
ratechecker/models.py
from django.db import models from localflavor.us.models import USStateField # I'm not fond of how these fields are named, but I tried to balance # Python naming conventions with how the fields are actually referred to # outside this software. class Product(models.Model): """ Loan Product. """ FIXED = 'FIXE...
Python
0.000001
@@ -3830,17 +3830,17 @@ length=1 -0 +2 , null=T
36b9f7d389d4984be34228b643f69093a96afa6c
Make API docs compilable with only a Django installation somewhere on sys.path
docs/conf.py
docs/conf.py
# -*- coding: utf-8 -*- # # Plata documentation build configuration file # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented...
Python
0.000001
@@ -774,24 +774,12 @@ = ' -example.settings +conf '%0A%0A#
6b576c658d7cf6c0792976b6ec451da4071d9322
Enter Jake
test_game.py
test_game.py
#!/usr/bin/env python import logging from mgl2d.app import App from mgl2d.graphics.post_processing_step import PostProcessingStep from mgl2d.graphics.screen import Screen from mgl2d.graphics.shader import Shader from mgl2d.input.game_controller_manager import GameControllerManager from mgl2d.math.rect import Rect fro...
Python
0.998435
@@ -821,16 +821,18 @@ + # ('mac', @@ -855,32 +855,88 @@ FOOTPRINT_DIM),%0A + ('jake', Player.DEFAULT_FOOTPRINT_DIM),%0A
7a5169a2945ea905fbb79b48fb40c3f7b0fe0868
Updated the docs conf.py to have the correct version number.
docs/conf.py
docs/conf.py
# -*- coding: utf-8 -*- # # Django documentation build configuration file, created by # sphinx-quickstart on Thu Mar 27 09:06:53 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleab...
Python
0.999377
@@ -1350,17 +1350,17 @@ on = '1. -1 +2 '%0A# The @@ -1480,17 +1480,17 @@ on = '1. -2 +3 '%0A%0A# The
2fb48c09362f30935396bde06fcdeb16f504a67f
add scene ownership tests
tests/api.py
tests/api.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 GoPro Inc. # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file #...
Python
0.000003
@@ -1384,16 +1384,1040 @@ iewer%0A%0A%0A +def test_ctx_ownership():%0A viewer = ngl.Viewer()%0A viewer2 = ngl.Viewer()%0A assert viewer.configure(offscreen=1, width=16, height=16) == 0%0A assert viewer2.configure(offscreen=1, width=16, height=16) == 0%0A scene = ngl.Render(ngl.Quad())%0A viewer.set_s...
37771791dea67d5df88afdd2e5720731a5303ce8
Fix test running for running from src dir.
tests/run.py
tests/run.py
# -*- coding: utf-8 -*- """ Pygments unit tests ~~~~~~~~~~~~~~~~~~ Usage:: python run.py [testfile ...] :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys, os if sys.version_info >= (3,): # copy test suite over ...
Python
0
@@ -684,45 +684,94 @@ ot)%0A - __file__ = os.path.join('run.py') +else:%0A # only find tests in this directory%0A os.chdir(os.path.dirname(__file__))%0A %0A%0Atr @@ -975,55 +975,14 @@ t(0, - os.path.join(os.path.dirname(__file__), '..') -) %0A
890190f40b9061f7bfa15bbd7e56abc0f1b7d44a
Make fitters available at main import level.
redmapper/__init__.py
redmapper/__init__.py
from __future__ import division, absolute_import, print_function from ._version import __version__, __version_info__ version = __version__ from .configuration import Configuration from .runcat import RunCatalog from .solver_nfw import Solver from .catalog import DataObject, Entry, Catalog from .redsequence import Re...
Python
0
@@ -844,8 +844,120 @@ nerator%0A +from .fitters import MedZFitter, RedSequenceFitter, RedSequenceOffDiagonalFitter, CorrectionFitter, EcgmmFitter%0A
e148c2a01272b5aa2e131e6b67e21bbe6b8c37b4
remove obsoleted python filter for `\cboxbegin` and `\cboxend`
textohtml.py
textohtml.py
#!/usr/bin/env python # Author: Carsten Gips <carsten.gips@fh-bielefeld.de> # Copyright: (c) 2016 Carsten Gips # License: MIT """ Pandoc filter to replace certain LaTeX macros with matching HTML tags. In my beamer slides I use certain macros like `\blueArrow` which produces an arrow in deep blue color. This filter ...
Python
0
@@ -665,86 +665,8 @@ r'%7D%5D -%0AcboxStart = re.compile('%5C%5C%5C%5Ccboxbegin')%0AcboxEnd = re.compile('%5C%5C%5C%5Ccboxend') %0A%0Ade @@ -1072,193 +1072,8 @@ ()%5D%0A - if cboxStart.match(s):%0A return RawInline(%22html%22, %22%3Cspan class='cbox'%3E%22)%0A if cboxEnd.match(...
c818c0cae04a924c0cff3da126ae5d680f35e284
add mock modules for sphinx
docs/conf.py
docs/conf.py
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
Python
0
@@ -646,31 +646,599 @@ ys%0A%0A -import sphinx_rtd_theme +from unittest.mock import MagicMock%0A%0Aimport sphinx_rtd_theme%0A%0A%0Aclass Mock(MagicMock):%0A @classmethod%0A def __getattr__(cls, name):%0A return MagicMock()%0A%0A%0AMOCK_MODULES = %5B%0A 'alembic',%0A 'bcrypt',%0A 'flask',%0A 'f...
90d629227ebfe083fec9e729bdf4f0794289a04b
add abspath to docs (#55)
docs/conf.py
docs/conf.py
# pylint: disable-all #!/usr/bin/env python3 # -*- coding: utf-8 -*- # # circleci.py documentation build configuration file, created by # sphinx-quickstart on Fri Oct 27 18:51:43 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration value...
Python
0
@@ -702,18 +702,16 @@ here.%0A#%0A -# import o @@ -712,18 +712,16 @@ port os%0A -# import s @@ -723,18 +723,16 @@ ort sys%0A -# sys.path @@ -760,16 +760,17 @@ spath('. +. '))%0Afrom
2e20b293addcd03a561fcd29b623b9e70665645b
Prepend intersphinx name to ignored SSL.Context
docs/conf.py
docs/conf.py
#! /usr/bin/env python3 # Requires Python 3.6+ # pylint: disable=invalid-name """Configuration of Sphinx documentation generator.""" from pathlib import Path import sys # Make in-tree extension importable in non-tox setups/envs, like RTD. # Refs: # https://github.com/readthedocs/readthedocs.org/issues/6311 # https:/...
Python
0
@@ -4137,16 +4137,26 @@ lass', ' +pyopenssl: OpenSSL.
cc71c674e044f31ff154b8cc7a8f55975e4ff2ad
Fix conf.py
docs/conf.py
docs/conf.py
#!/usr/bin/env # Copyright 2014 LinkedIn Corp. # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache Lice...
Python
0.000026
@@ -881,64 +881,8 @@ ime%0A -sys.path.append(%22/Users/avenkatr/Zopkio%22)%0Aimport zopkio%0A # Ad
74329a7fa2a482309e4eb244b3920e28a76cfcbf
Remove excess hack
docs/conf.py
docs/conf.py
# -*- coding: utf-8 -*- # # Setuptools documentation build configuration file, created by # sphinx-quickstart on Fri Jul 17 14:22:37 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pick...
Python
0
@@ -998,45 +998,8 @@ ..') -%0Aexec(open('../bootstrap.py').read()) %0A%0A#
165b02d35bf88456a96c0b5e4f63f3033eb3091d
Fix for changed Need datamodel
registration/admin.py
registration/admin.py
from django.contrib import admin from django.contrib.sites.models import RequestSite from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from models import RegistrationProfile from scheduler.models import Need class RegistrationAdmin(admin.ModelAdmin): actions = [...
Python
0
@@ -766,140 +766,8 @@ ted( -'time_period_from',%0A 'time_period_to',%0A 'top
daf6914206899aab2404054396233327048ea444
add session
registration/views.py
registration/views.py
from django import forms from django.contrib.auth.forms import UserCreationForm from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render from .models import MyUser from django.contrib.auth import authenticate, login as auth_login from django.contrib.auth import logout from django.c...
Python
0
@@ -560,16 +560,101 @@ tatus%0A%0A%0A +from rest_framework.authentication import SessionAuthentication, BasicAuthentication%0A %0A%0AuserID @@ -1478,32 +1478,107 @@ nView(APIView):%0A + authentication_classes = (SessionAuthentication, BasicAuthentication)%0A%0A def post(sel
4b185b973b7cb0d8b636e94ab4ecd3b08eaee394
Add status info
timelapse.py
timelapse.py
#!/usr/bin/python from datetime import datetime from datetime import timedelta import subprocess import time from wrappers import GPhoto from wrappers import Identify from wrappers import Curl #sudo /usr/local/bin/gphoto2 --capture-image-and-download --filename 'test3.jpg' #curl --form "fileupload=@test7.jpg" http:/...
Python
0
@@ -2431,16 +2431,59 @@ cquired%0A + print %22calculating brightness%22%0A @@ -2634,16 +2634,51 @@ htness)%0A + print %22start uploading%22 %0A
7a034aa3c944d4074aef87b72313f6581216a274
Enhance logging
repour/adjust/util.py
repour/adjust/util.py
# flake8: noqa import argparse import asyncio import logging import os import re from xml.dom import minidom from .. import asutil, exception logger = logging.getLogger(__name__) REPOUR_JAVA_KEY = "-DRepour_Java=" stdout_options = asutil.process_stdout_options stderr_options = asutil.process_stderr_options def ge...
Python
0
@@ -3951,16 +3951,29 @@ warning( +%0A %22No gene @@ -4006,17 +4006,55 @@ ustspec! -%22 + Contents: %22 + str(adjustspec)%0A )%0A
ae2e8cc85b6b4d2202e42d704dde8757ffd31da6
Make make_rel_symlink.py use python3.
tools/make_rel_symlink.py
tools/make_rel_symlink.py
#!/usr/bin/env python import os import os.path import sys import pdb import shutil def relative_ln_s( from_, to_ ): """ This is just so dirty & boring: create a relative symlink, making the to_ path relative to from_. No errorchecks. Both arguments must be files, a destination directory doesn't work ...
Python
0
@@ -14,16 +14,17 @@ v python +3 %0A%0Aimport @@ -848,14 +848,15 @@ rint - +( USAGE +) %0A @@ -915,17 +915,17 @@ print - +( %22Removin @@ -958,16 +958,17 @@ .argv%5B2%5D +) %0A shu @@ -1071,17 +1071,17 @@ print - +( link_pat @@ -1081,16 +1081,17 @@ ink_path +) %0Aelse:%0A
06b1ec9ac39de9ccadbb3940845792abed9b1636
Update todo.py
todo/todo.py
todo/todo.py
from flask import Flask, render_template, session, redirect, url_for, flash from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.bootstrap import Bootstrap from datetime import datetime import os basedir = os.path.abspath(os.path.dirname(__file__)) SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir,...
Python
0
@@ -68,17 +68,25 @@ r, flash +,request %0A - from fla @@ -904,16 +904,23 @@ category + = None , post_d @@ -1222,24 +1222,38 @@ self.title %0A + %0A %0A %0Aclass C @@ -1608,136 +1608,1004 @@ ery. -all()%0A return render_template('index.html',todos = todos )%0A #return ''.join('+++'.join(%5Bx....
e4879d5cb5cf266ac8f755c947bb693ed7bebc05
print hello
togeojson.py
togeojson.py
# simple create copycat functions from togeojson.js # generate a short, numeric hash of a string def okhash(x):
Python
0.999999
@@ -106,8 +106,25 @@ ash(x):%0A + print('hello')%0A
93fb776ae231bb29551b639ad5fc710d3e0d78be
Update llvm bootstrap
bootstrap.py
bootstrap.py
#!/usr/bin/env python # Requires Python 2.6 for the subprocess module import subprocess from os import chdir from os.path import isfile import os status_str = ''' %(bars)s %(status)s %(bars)s''' def status(s): linelength = max([len(l) for l in s.splitlines()]) bars = ''.join(['-' for i in range(linelength)]...
Python
0.000001
@@ -426,13 +426,15 @@ lvm/ -Debug +Release +Ass @@ -2140,16 +2140,38 @@ rtions', + '--enable-optimized', '--enab @@ -2185,16 +2185,18 @@ ets=all' +%5D# , '--ena @@ -2634,25 +2634,26 @@ uilding -fimag +halid e.cm +x a')%0Achec @@ -2675,17 +2675,18 @@ ild -fimag +halid e.cm +x a'.s
aa8234d1e6b4916e6945468a2bc5772df2d53e28
Add Discord Admin for debugging.
bot/admin.py
bot/admin.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from . import models @admin.register(models.Notification) class NotificationAdmin(admin.ModelAdmin): list_display = ('launch', 'last_net_stamp', 'last_twitter_post', 'last_notification_sent', 'las...
Python
0
@@ -635,8 +635,145 @@ 'data') +%0A%0A%0A@admin.register(models.DiscordChannel)%0Aclass DiscordBotAdmin(admin.ModelAdmin):%0A list_display = ('name', 'channel_id', 'server_id')
547530a8facd5c86fbe4bfb81ad63d3b98be0e7a
Correct mhd.py
boyle/mhd.py
boyle/mhd.py
# -*- coding: utf-8 -*- #====================================================================== #Program: Diffusion Weighted MRI Reconstruction #Module: $RCSfile: mhd_utils.py,v $ #Language: Python #Author: $Author: bjian $ #Date: $Date: 2008/10/27 05:55:55 $ #Version: $Revision: 1.2 $ # Last Ed...
Python
0.000003
@@ -494,24 +494,26 @@ import *%0D%0A%0D%0A +%0D%0A MHD_TAGS = %5B @@ -1404,16 +1404,18 @@ t64%7D%0D%0A%0D%0A +%0D%0A NUMPY_TO
a0a5b155c5201ce948c21ac00d160ff3db0f9d28
Use prompt instead of info log
breakable.py
breakable.py
#!/usr/bin/env python """ Break: For when you're frustrated with Make. Inspired by the elegant process invocation and management features of Spack (https://github.com/LLNL/spack). """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ imp...
Python
0
@@ -1516,20 +1516,22 @@ log. -info +prompt (command
edeab6cce4fa9a1a646dd6f7ccd246a4ae592368
tweak excludes
blueprint.py
blueprint.py
# -*- coding: utf-8 -*- import codecs import getpass import json import os import requests from clint.textui import colored, puts from cssmin import cssmin from flask import g, Blueprint from jinja2 import Markup from slimit import minify from tarbell.hooks import register_hook from tarbell.utils import ensure_directo...
Python
0.000002
@@ -722,29 +722,8 @@ = %5B%0A - #'node_modules',%0A @@ -762,30 +762,21 @@ -#'*.md',%0A #'* +'bower .json' +, %0A%5D%0A%0A
64e7c46cf54da0040918d5acdd8d8fa18c568702
Remove flaky tab reordering test (#20629)
common/test/acceptance/tests/studio/test_studio_tabs.py
common/test/acceptance/tests/studio/test_studio_tabs.py
""" Acceptance tests for Studio related to the Pages. """ from common.test.acceptance.tests.studio.base_studio_test import StudioCourseTest from common.test.acceptance.pages.studio.edit_tabs import PagesPage class PagesTest(StudioCourseTest): """ Test that Pages functionality is working properly on studio sid...
Python
0
@@ -4263,1180 +4263,8 @@ )%0A%0A - def test_user_can_reorder_builtin_tabs(self):%0A %22%22%22%0A Scenario: Users can reorder built-in pages%0A Given I have opened the pages page in a new course%0A Then the built-in pages are in the default order%0A When I drag the...
716db272743944f8adc18f6af10282c91030a7ac
Fix spelling and test
src/akllt/tests/test_news_import.py
src/akllt/tests/test_news_import.py
import datetime import unittest import pkg_resources import django.test from django.core.management import call_command from wagtail.wagtailcore.models import Page from akllt.dataimport.news import import_news from akllt.models import NewsStory def shorten_values(item): shortened = {} for key, value in ite...
Python
0.001053
@@ -1919,16 +1919,17 @@ 'test +s /fixture @@ -2017,11 +2017,11 @@ ount(), -2 +1 )%0A
d79b4845a644836e728e5fd39743c2624b04059a
Version 0.5.0.dev0
tornadowebapi/_version.py
tornadowebapi/_version.py
MAJOR = 0 MINOR = 4 MICRO = 0 IS_RELEASED = True __version__ = '%d.%d.%d' % (MAJOR, MINOR, MICRO) if not IS_RELEASED: __version__ += '.dev0'
Python
0.000007
@@ -15,9 +15,9 @@ R = -4 +5 %0AMIC @@ -41,11 +41,12 @@ D = -Tru +Fals e%0A%0A_
e07156b5bc5628d7888269a96b4db73acda5710f
Set the AssumeRolePolicyDocument on policies
touchdown/aws/iam/role.py
touchdown/aws/iam/role.py
# Copyright 2014 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
Python
0
@@ -1694,16 +1694,647 @@ s = %5B%5D%0A%0A + for change in super(Apply, self).update_object():%0A yield change%0A%0A remote_policy = self.object.get('AssumeRolePolicy', %7B%7D).get('AssumeRolePolicyDocument', '')%0A local_policy = serializers.Json().render(self.runner, self.resource.assu...
11281719a3f1b0e18d986906a312c68c9d84e57f
add missing dependency for tr_barcode
tr_barcode/__openerp__.py
tr_barcode/__openerp__.py
# -*- coding: utf-8 -*- #/############################################################################# # # Tech-Receptives Solutions Pvt. Ltd. # Copyright (C) 2004-TODAY Tech-Receptives(<http://www.tech-receptives.com>). # # This program is free software: you can redistribute it and/or modify # it unde...
Python
0.000001
@@ -1351,16 +1351,33 @@ %22base%22,%0A + 'stock',%0A %5D,%0A
af8b9fdeb144279b35abcf7de9f0538d88ac7a5d
Add field mapping to tuid provider
tuid_provider/provider.py
tuid_provider/provider.py
from allauth.socialaccount import providers from allauth.socialaccount.providers.base import ProviderAccount from allauth_cas.providers import CASProvider class TUIDAccount(ProviderAccount): pass class TUIDProvider(CASProvider): id = 'tuid' # Choose an identifier for your provider name = 'TU-ID CAS Pro...
Python
0
@@ -386,16 +386,343 @@ ccount%0A%0A + def extract_uid(self, data):%0A return str(data%5B1%5D%5B'cn'%5D)%0A%0A def extract_common_fields(self, data):%0A return dict(username=data%5B1%5D%5B'cn'%5D,%0A email=data%5B1%5D.get('mail', ''),%0A first_name=data%5B1%5D.g...
7bdfa64277889ac1db6b1bba11829b8e61a2445d
Increment version to 0.4.2
importio2/version.py
importio2/version.py
# # Copyright 2017 Import.io # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
0.998761
@@ -589,11 +589,11 @@ = '0.4. -1 +2 '%0A
158e3b384a3368c94f3fd4c231bbe688b6628e1a
add use flag for gdbm
build/use.py
build/use.py
# # Copyright (c) 2004 Specifix, Inc. # All rights reserved # """ Provides the build configuration as special dictionaries that directly export their namespaces. Should read, or be provided, some sort of configuration information relative to the build being done. For now, we'll intialize a static configuration suffi...
Python
0
@@ -1423,16 +1423,36 @@ %09False,%0A + 'gdbm':%09%09False,%0A %7D)%0A%0AArch
fadc09d2cfa69356cc9300c24772c3c2d745b7a4
Add Job view
job_scheduler_web/scheduler_web/views.py
job_scheduler_web/scheduler_web/views.py
from django.shortcuts import render from django.http import HttpResponse from django.template import loader from django import forms from time import strftime import csv from .models import Server, Job, LoadMeasurement, JobSchedulingEvent from .forms import AddServerForm, AddJobForm import rest import requests # C...
Python
0
@@ -2464,35 +2464,142 @@ -#send API request to server +payload = %7B'command':request.POST%5B'command'%5D,'priority':request.POST%5B'priority'%5D,%0A 'deadline':request.POST%5B'deadline'%5D%7D %0A
a19efd8fdaa4fa2f03b608b7cbac330b2cd53c76
Reduce tweet period to 300 seconds.
twinsies/onewordtweets.py
twinsies/onewordtweets.py
import tweepy import json from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream from datetime import datetime from memory_profiler import profile import os CONSUMER_KEY = os.environ['OWT_API_KEY'] CONSUMER_SECRET = os.environ['OWT_API_SECRET'] ACCESS_TOKEN = os.environ...
Python
0.999999
@@ -395,16 +395,44 @@ CRET'%5D%0A%0A +TWEET_PERIOD_SECONDS = 300%0A%0A last_upd @@ -877,11 +877,28 @@ ) %3E -900 +TWEET_PERIOD_SECONDS :%0A
ac1af0040b7c4960f37ab9c10edaa9a839c5cad1
Version bump
website/__init__.py
website/__init__.py
__version__ = '1.0b12'
Python
0.000001
@@ -14,10 +14,9 @@ '1. -0 +1 b1 -2 '%0A
6aa2690295993e133dcce64723bedfa5153a7856
Add for loop
write_to_g_sheet.py
write_to_g_sheet.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Program: Write to G Sheet Programmer: Michael Fryar, Research Fellow, EPoD Date created: January 5, 2017 Purpose: Write to Google Sheets via API. """ # Note: Must first establish SSH connection to epodx analytics import csv import os import subprocess import httplib2 ...
Python
0
@@ -5893,199 +5893,92 @@ -tunnel_and_write_to_g_sheet(%22AGG%22)%0A tunnel_and_write_to_g_sheet(%22COM%22)%0A tunnel_and_write_to_g_sheet(%22CBA%22)%0A tunnel_and_write_to_g_sheet(%22DES%22)%0A tunnel_and_write_to_g_sheet(%22IMP%22)%0A +courses = %5B%22AGG%22, %22COM%22, %22CBA%22, %22DES%22, %22IMP%2...
fe0847f11b6aac70013eaf4aaf4360dad3e18892
Replace if-statement in cc_upload for phone check with str.replace()
cc_upload.py
cc_upload.py
import os import requests import xlrd import constantcontact as cc from credentials import general_list_id, after_hours_list_id # Assumes directory with the workbook is relative to script's location. directory = 'workbooks/' workbook = '' for dirpath, dirnames, filenames in os.walk(directory): for files in filena...
Python
0
@@ -1275,103 +1275,8 @@ e()%0A -%0A if row_values%5B16%5D == 'No Primary Phone':%0A contact%5B'home_phone'%5D = ''%0A else:%0A @@ -1313,16 +1313,48 @@ lues%5B16%5D +.replace('No Primary Phone', '') %0A%0A co
ee358a1ae3d15857e5d566d35cd9f1718a9a2118
store metadata in a single json object.
erun/erun.py
erun/erun.py
#!/usr/bin/env python2 """ Output a batch of commands corresponding to a single experiment and store metadata. This utility makes a number of assumptions to simplify its implementation. Specifically, in order for it to work properly the base command must satisfy the following requirements: - Accept only one posit...
Python
0
@@ -2035,16 +2035,113 @@ lags)%5D)%0A + metadata_file = os.path.join(args.o, 'METADATA')%0A metadata = load_metadata(metadata_file)%0A for @@ -2482,30 +2482,24 @@ -store_ metadata (open(os @@ -2494,53 +2494,33 @@ data -(open(os.path.join(args.o, 'METADATA'), 'a'), +.append(compose_metadata( %...
3ef48d0735f4b49e0d1fe6f92b5127078d0c12da
Add Consul test to versions_test.py
unittest/versions_test.py
unittest/versions_test.py
#!/usr/bin/env python import unittest import sys import os import re class TestVersionFunctions(unittest.TestCase): def setUp(self): pass def test_sendmail(self): #if (self.__test_version(ver.check_sendmail()) == False): # self.addError("Sendmail version doesn't seem to be versi...
Python
0
@@ -3510,32 +3510,151 @@ )) %5C%0A )%0A%0A + def test_consul(self):%0A self.assertTrue( %5C%0A self.__test_version(ver.check_consul()) %5C%0A )%0A%0A def __test_v
2c32f0f770e713ceb0a1214a45e4ec501661def8
Apply fix from e7dd59bffce (#2) to unbreak test suite
update_dotdee/__init__.py
update_dotdee/__init__.py
# Generic modularized configuration file manager. # # Author: Peter Odding <peter@peterodding.com> # Last Change: March 25, 2018 # URL: https://pypi.python.org/pypi/update-dotdee """The Python API of the update-dotdee program.""" # Standard library modules. import hashlib import logging import os # External dependen...
Python
0
@@ -2509,16 +2509,32 @@ um_file) +.decode('ascii') %0A
b7836720994530678875a724be9a6742c9a3dd02
patch manage.py for eventlet
ureport_project/manage.py
ureport_project/manage.py
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 from django.core.management import execute_manager import settings if __name__ == "__main__": execute_manager(settings)
Python
0
@@ -126,16 +126,199 @@ settings +%0Aimport eventlet%0Aimport eventlet.debug%0Aimport os%0A#patch for eventlet%0Aos.environ%5B%22EVENTLET_NOPATCH%22%5D = 'True'%0Aeventlet.monkey_patch()%0Aeventlet.debug.hub_prevent_multiple_readers(False) %0A%0Aif __n
2c62a20305117b8d9b6c98ad048dea48c9b52efc
use python built in for updating a dict
faq/views.py
faq/views.py
from django.views.generic.list_detail import object_detail, object_list from models import Question import datetime def dict_to_dict(origin, new): """ A utility method to add items from one dictionary to an already existing dictionary. Primary use is for extra_context population. """ for...
Python
0.000001
@@ -114,347 +114,8 @@ me%0A%0A -def dict_to_dict(origin, new):%0A %22%22%22%0A A utility method to add items from one dictionary to an already existing dictionary.%0A %0A Primary use is for extra_context population.%0A%0A %22%22%22%0A %0A for key, value in new.items():%0A if callable(value)...
22d38272ab0a94491408d4c69fc11767b4b7d96f
version 1.0.11
rhcephpkg/__init__.py
rhcephpkg/__init__.py
__version__ = '1.0.10'
Python
0.000001
@@ -13,11 +13,11 @@ = '1.0.1 -0 +1 '%0A
506a5821b57672a11d4aaf03735a8ce3a72a92f8
save command
MoMMI/Modules/bot_administration.py
MoMMI/Modules/bot_administration.py
import asyncio from typing import Match import aiohttp from discord import Message from MoMMI.commands import command from MoMMI.master import master from MoMMI.server import MChannel from MoMMI.role import MRoleType @command("reload", "reload", roles=[MRoleType.OWNER]) async def reload(channel: MChannel, match: Matc...
Python
0.000003
@@ -2061,8 +2061,221 @@ r=data)%0A +%0A@command(%22save%22, r%22save%22, roles=%5BMRoleType.OWNER%5D)%0Aasync def avatar_command(channel: MChannel, match: Match, message: Message):%0A for server in master.servers.values():%0A await server.save_all_storages()%0A
8f0a4fd16a9365aa2de9b75583cc9200860e2ed1
update secret_key
__init__.py
__init__.py
#!usr/bin/env python # coding=utf-8 # Created by zhezhiyong@163.com on 2017/3/22. import logging from flask import Flask logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.DEBUG) logger = logging.getLogger() app = Flask(__name__) app.config['WECHAT_APPID'] = 'wx3b602e650c2c8dda' a...
Python
0.000001
@@ -463,51 +463,40 @@ = ' -QCgz5h5kaixpc7Kb5gYyx7JXwYFRQlf439Bp9us4zZW +9c66bc144457b9ba8c63f17f4ad93356 ' #
4dd07e3f5476c15977b1ab215aaa05162f4fdacf
fix tabs
__init__.py
__init__.py
# -*- coding: utf-8 -*- import time from modules.core.props import Property, StepProperty from modules.core.step import StepBase from modules import cbpi @cbpi.step class HERMSStep(StepBase): ''' Just put the decorator @cbpi.step on top of a method ''' # Properties target_temp = Property.Number("T...
Python
0.000001
@@ -191,80 +191,8 @@ e):%0A - '''%0A Just put the decorator @cbpi.step on top of a method%0A ''' %0A @@ -1197,32 +1197,36 @@ self.mash_tun)%0A%09 + self.set_target_ @@ -1800,32 +1800,36 @@ self.mash_tun)%0A%09 + self.set_target_ @@ -1960,16 +1960,20 @@ h_tun)%0A%09 + self.set @@ -2366,24...
2be45cb0eb4e92543b5c3975796f73f96f059aa8
return data
__init__.py
__init__.py
#!/usr/bin/env python3 # -*- coding: utf-8 -* from flask import Flask, render_template, send_from_directory from flask.ext.mysql import MySQL from mysecret import DATABASE_USER, DATABASE_PASS, DATABASE_HOST from werkzeug import generate_password_hash, check_password_hash app = Flask(__name__) @app.route('/') def ho...
Python
0.999999
@@ -965,29 +965,12 @@ urn -render_template( data -) %0A%0A%0Ai
d705799b745a2de8ff404476485310a390aea9b2
Switch to Python 3.
__main__.py
__main__.py
import facebook import os from getpass import getpass PRINGUS_DINGUS = '1475782379372580' def get_token(): # Read the FACEBOOK_TOKEN environment variable, # or ask for it if none is set. # On Mac OS X, this can be temporarily set via: # launchctl setenv FACEBOOK_TOKEN <user access token here> ...
Python
0.000002
@@ -1,12 +1,35 @@ +#!/usr/bin/env python3%0A import faceb @@ -592,17 +592,17 @@ print - +( pringusD @@ -618,16 +618,17 @@ mments'%5D +) %0A%0A%0Aif __
7203821b645fab24ee0cfd58eca4026a0f81d5cf
Version bump.
zenaida/__init__.py
zenaida/__init__.py
__version__ = (0, '1a')
Python
0
@@ -16,9 +16,9 @@ 0, ' -1 +2 a')%0A