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
8dbfc9608c1755c65119479a96f86508bc310d0b
add a default value for the smoothing parameter
cleverhans/loss.py
cleverhans/loss.py
import json import os from .model import Model from .compat import softmax_cross_entropy_with_logits import tensorflow as tf class Loss(object): """ An abstract interface for loss wrappers that allows flexible control of real examples, adversarial examples and labels. These losses are used for defens...
Python
0
@@ -1301,16 +1301,19 @@ moothing +=0. , attack
3104834e9ee7525a8f8b43edcb00443d913e0792
Update config settings.
ecommerce/settings/production.py
ecommerce/settings/production.py
"""Production settings and globals.""" from os import environ # Normally you should not import ANYTHING from Django directly # into your settings, but ImproperlyConfigured is an exception. from django.core.exceptions import ImproperlyConfigured import yaml from ecommerce.settings.base import * from ecommerce.setting...
Python
0
@@ -1032,12 +1032,8 @@ ng(' -EDX_ ECOM
2a3ecf262ac2057503ea8b9a4576068aaa8cfa1f
Fix filter gte (>=)/lte (<=)
mining/utils.py
mining/utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import unicodedata import re from decimal import Decimal from pandas import tslib, date_range def fix_render(value): if type(value) is str: try: return unicode(value) except UnicodeDecodeError: return unicode(value.decode('lati...
Python
0.000004
@@ -1254,16 +1254,17 @@ field%5D %3E += value)%0A @@ -1318,16 +1318,17 @@ field%5D %3C += value)%0A
030c677d0a81516da199296ad524c00014c0d56d
fix ALLOWED_HOSTS issue
mis/settings.py
mis/settings.py
""" Django settings for mis project. Generated by 'django-admin startproject' using Django 1.10.5. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os # ...
Python
0.000001
@@ -499,18 +499,13 @@ ', %22 -Production +Local %22).l @@ -756,19 +756,8 @@ EY') -.split(',') %0A%0A%0A# @@ -933,16 +933,66 @@ _HOSTS') +.split(',') if os.getenv('ALLOWED_HOSTS') else %22*%22 %0A%0A%0A# App
f6b2ab1d3707a368fb46ea7a1d0420339df006fe
make sure unit tests can fail
unit_tests.py
unit_tests.py
import json import traceback import unittest from test import test_support from keylib import ECPrivateKey, ECPublicKey from blockstack_profiles import ( sign_token_record, sign_token_records, verify_token_record, get_profile_from_tokens, make_zone_file_for_hosted_data, get_person_from_legacy_format ) ...
Python
0.000001
@@ -1523,16 +1523,47 @@ aval%22%5D)%0A + self.assertTrue(False)%0A %0A%0Aclass
992dc6fd59363eaf600564140f5f3a2e7b0b79e8
fix for samplesheet error dump
igf_data/utils/samplesheet_utils.py
igf_data/utils/samplesheet_utils.py
import os import pandas as pd from igf_data.illumina.basesMask import BasesMask from igf_data.utils.sequtils import rev_comp from igf_data.illumina.samplesheet import SampleSheet from igf_data.utils.fileutils import get_temp_dir,copy_local_file,check_file_path,remove_dir from igf_data.process.singlecell_seqrun.processs...
Python
0
@@ -6225,16 +6225,27 @@ ite( -msg,'%5Cn' +'%7B0%7D%5Cn'.format(msg) )%0A
3a0ad5bf81edd6c778f5ab011af5dc364820e3be
correct feature import
src/ObjectModel/XMLDSBASELINEClass.py
src/ObjectModel/XMLDSBASELINEClass.py
# -*- coding: utf-8 -*- """ BASELINE class Herv Djean cpy Xerox 2016 READ project a class for baseline """ from XMLDSObjectClass import XMLDSObjectClass from config import ds_xml_def as ds_xml class XMLDSBASELINEClass(XMLDSObjectClass): """ BASELINE c...
Python
0.000001
@@ -64,10 +64,12 @@ Herv +%EF%BF%BD D +%EF%BF%BD jean @@ -3566,12 +3566,11 @@ rom -read +spm .fea
49d4b4e7452f70a9f09ffbeb0a35e4e1b6ac8b48
Improve candidate selection significantly
auto_meander/hamiltonian_cycle.py
auto_meander/hamiltonian_cycle.py
import cv2 from grid_ops import shift_up, shift_right, shift_down, shift_left import numpy import random def pick_candidate(candidates): y, x = candidates.shape num_candidates = numpy.sum(candidates) choice_index = random.randint(1, num_candidates) - 1 skipped_candidates = 0 for yi in xrange(y): ...
Python
0.000001
@@ -99,16 +99,34 @@ random%0A%0A +_INDEX_CACHE = %7B%7D%0A %0Adef pic @@ -182,360 +182,287 @@ ape%0A +%0A -num_candidates = numpy.sum(candidates)%0A choice_index = random.randint(1, num_candidates) - 1%0A skipped_candidates = 0%0A for yi in xrange(y):%0A for xi in xrange(x):%0A if ca...
e51edc5a25dc30aee64ed33cddcd56cc3c1f4f9c
FIX EWC init warnings
avalanche/training/plugins/ewc.py
avalanche/training/plugins/ewc.py
from collections import defaultdict from typing import Dict, Tuple import torch from torch import Tensor from torch.utils.data import DataLoader from avalanche.models.utils import avalanche_forward from avalanche.training.plugins.strategy_plugin import StrategyPlugin from avalanche.training.utils import copy_params_d...
Python
0
@@ -1940,18 +1940,18 @@ r (mode -is +== 'online @@ -1989,22 +1989,156 @@ set -a decay_factor +%60online%60 mode to use %60decay_factor%60.%22%0A assert (decay_factor is not None) or (mode != 'online'), %5C%0A %22You need to set %60decay_factor%60 to
8cc7fe4ddab2239bcc14a68c0303ff2bb2e337c3
Update ChatterBot.py
Cogs/ChatterBot.py
Cogs/ChatterBot.py
import asyncio import discord import time import requests import urllib import os from aiml import Kernel from os import listdir from discord.ext import commands from Cogs import Nullify from pyquery import PyQuery as pq from Cogs import FuzzySearch class ChatterBot: # Init with the bot reference, and a reference to...
Python
0
@@ -4265,17 +4265,41 @@ XYZ -_-./?@%3C%3E! +%60~!@#$%25%5E&*()_+-=%5B%7B%7D%5D%5C%7C/?.%3E,%3C;:'%5C%22 %22 %0A%09
7a5e09864ea3459a83840386b521005ddcef1159
Update models.py
backend/hashhacks2/APIs/models.py
backend/hashhacks2/APIs/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from datetime import datetime import pytz import random from .utils.lr import getCreditRating # Create your models here. class profileModel(models.Model): name = models.CharField(max_length=20) aadhar = models.CharFie...
Python
0
@@ -180,16 +180,62 @@ itRating +%0Afrom .utils.socialScore.py import calculateSS %0A%0A# Crea @@ -3572,8 +3572,9 @@ /%25m/%25y') +%0A
290838a09bc932e11f95140f5de449c732110a71
add x access mode to Log/
utilLogger.py
utilLogger.py
import os.path import datetime import time # for chmod import os from stat import * ''' v0.7 2015/12/03 - change access mode of the file and folder(Log/) to make OTHER writable v0.6 2015/12/02 - add msec string for time stamp v0.5 2015/12/01 - remove CRLF at the end of the line - save to Log/ - use [0] * 10 to...
Python
0
@@ -1363,17 +1363,16 @@ (%22Log%22)%0A -# %09%09%09os.ch @@ -1393,32 +1393,42 @@ WUSR %7C S_IRUSR %7C + S_IXUSR %7C S_IWGRP %7C S_IRG @@ -1423,32 +1423,42 @@ WGRP %7C S_IRGRP %7C + S_IXGRP %7C S_IWOTH %7C S_IRO @@ -1459,16 +1459,26 @@ S_IROTH + %7C S_IXOTH )%0A%0A%09def
b45102947b758d1c9f44bd9a815288a24c683daf
Remove superfluous newline at EOF
coalib/tests/parsing/StringProcessing/SearchForTest.py
coalib/tests/parsing/StringProcessing/SearchForTest.py
import sys import unittest sys.path.insert(0, ".") from coalib.tests.parsing.StringProcessing.StringProcessingTestBase import ( StringProcessingTestBase) from coalib.parsing.StringProcessing import search_for class SearchForTest(StringProcessingTestBase): # Match either "out1" or "out2". test_basic_patte...
Python
0.000001
@@ -4193,9 +4193,8 @@ sity=2)%0A -%0A
166cf3019c1e259d5029bf42d0be006deb2df051
Fix error reporting accidentally happening twice
backslash/contrib/slash_plugin.py
backslash/contrib/slash_plugin.py
from __future__ import print_function import hashlib import itertools import os import socket import sys from .keepalive_thread import KeepaliveThread import time import webbrowser import git import logbook import requests from urlobject import URLObject as URL import slash from slash.plugins import PluginInterface ...
Python
0.000002
@@ -5906,24 +5906,109 @@ raise +%0A # continue to try compacting%0A else:%0A break %0A%0A def wa
9f0f79f946b3b3ff340e83725fba8a080c74219a
Update import statements
PEATSA/Tools/ApplyWeights.py
PEATSA/Tools/ApplyWeights.py
#! /bin/env python '''Reweights the terms of an uffbaps calculation and recalcualtes the totals. The components of the UFFBAPS calculation are assumed to be in contiguous columns in the provided file.''' from PEAT_SA import Core import sys, operator, optparse usage = "usage: %prog [options]" parser = optparse.Option...
Python
0
@@ -207,17 +207,16 @@ rom PEAT -_ SA impor
560bb4c3d086a0a875ade9bda1abd8b49dd7a7d2
fix test
common/djangoapps/student/tests/test_scope_resolver.py
common/djangoapps/student/tests/test_scope_resolver.py
""" Test for student tasks. """ from student.tests.factories import UserFactory, CourseEnrollmentFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from student.models import CourseEnrollment from student.scope_resolver import (...
Python
0.000002
@@ -4743,32 +4743,97 @@ None%0A )%0A%0A + emails = %5Bemail%5B'email'%5D for email in emails_resultset%5D%0A%0A self.ass @@ -4867,26 +4867,16 @@ n emails -_resultset )%0A%0A d
96cfab119da233069108237b4a2de0123a214bb5
test DELETE response status cod
billjobs/tests/tests_group_api.py
billjobs/tests/tests_group_api.py
from django.urls import reverse from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APITestCase, APIClient from billjobs.tests.generics import GenericAPIStatusCode class GenericAPITest(APITestCase): """ Generic Test class to test an API endpoint """...
Python
0.000821
@@ -1380,16 +1380,124 @@ ='json') +%0A elif method == 'DELETE':%0A response = self.client.delete(self.url, format='json') %0A%0A
b5de756da50fb699eb497226ce4ee1e45759ac2a
Add port drawing to GraphBlock
src/gui/graphblock.py
src/gui/graphblock.py
# -*- coding: utf-8 -*- from PySide import QtGui class GraphBlock(QtGui.QGraphicsWidget): """ GraphBlock represents IPFBlock in graphics scene """ block_width = 40 block_height = 32 def __init__(self, block): super(GraphBlock, self).__init__() self.block = block ...
Python
0
@@ -203,16 +203,35 @@ ht = 32%0A + port_size = 10%0A %0A @@ -987,31 +987,1291 @@ _items = dict()%0A + for iport in self.block.input_ports:%0A self.input_ports_items%5Biport%5D = QtGui.QGraphicsEllipseItem(self.rect_item)%0A for oport in self.block.output_ports:%0A self.o...
36700dff3bfc010a31cb406108473d4823467dee
Update check_updates.py
check_updates/check_updates.py
check_updates/check_updates.py
#!/usr/bin/python import json import platform import subprocess PLUGIN_VERSION = "1" HEARTBEAT="true" data={} data['plugin_version'] = PLUGIN_VERSION data['heartbeat_required']=HEARTBEAT data['packages_to_be_updated']=0 data['security_updates']=0 command="yum check-update --security | grep -i 'needed for security'"...
Python
0.000003
@@ -12,16 +12,27 @@ python%0A%0A +import sys%0A import j @@ -46,35 +46,255 @@ ort -platform%0Aimport subprocess%0A +subprocess%0A%0APYTHON_MAJOR_VERSION = sys.version_info%5B0%5D%0Aif PYTHON_MAJOR_VERSION == 3:%0A import distro as platform%0Aelif PYTHON_MAJOR_VERSION == 2:%0A import platform %...
8fd9bd1a1084f1d8d1f61774fdf28a45be9cb4e5
Undo faulty work
nap/rpc/views.py
nap/rpc/views.py
import inspect import json from django.views.generic import View from nap import http from nap.utils import JsonMixin RPC_MARKER = '_rpc' def method(view): '''Mark a view as accessible via RPC''' setattr(view, RPC_MARKER, True) return view def is_rpc_method(m): return getattr(m, RPC_MARKER, Fals...
Python
0.000062
@@ -1006,15 +1006,8 @@ ror) - as err :%0A @@ -1043,28 +1043,8 @@ est( -self.dumps(err.args) )%0A%0A
833d7072ed11c278c94fd53fc28a27f2fe190e93
remove native xattr handling and use filebot itself
Contents/Libraries/Shared/libfilebot/main.py
Contents/Libraries/Shared/libfilebot/main.py
# coding=utf-8 import subprocess import sys import traceback import logging import re import binascii import types import os from pipes import quote from lib import find_executable mswindows = False if sys.platform == "win32": mswindows = True from pyads import ADS logger = logging.getLogger(__name__) def...
Python
0
@@ -1141,16 +1141,18 @@ ),%0A + # %22darwin @@ -1151,32 +1151,34 @@ %22darwin%22: (%0A + # lambda fn: @@ -1222,28 +1222,30 @@ %22, fn%5D,%0A +# + lambda resul @@ -1335,24 +1335,26 @@ %5Cr', '')%0A + # @@ -1413,24 +1413,26 @@ (%22%5Cx00%22)%0A + # ),%0A %22win
4f6d9bd2539e4a97c91703f1719936e4e53dfcc1
Add check for netifaces
pingGateway.py
pingGateway.py
#!/usr/bin/env python # pingDefault.py -- pings the machine's default gateway # In most home networks, this is 192.168.0.1, but this script does not # make that assumption # It does, however, assume linux ping utility # Linux is notorious for dropping WiFi connections, especially on laptops # I found that pinging ...
Python
0
@@ -569,17 +569,158 @@ mport os -, +%0A%0Atry:%0A%09import netifaces%0Aexcept ImportError:%0A%09print %22We need to install netifaces%22%0A%09os.system('sudo apt-get install python-netifaces')%0A%09import netifac
3d8aa4d4b1923f35584eec2611b85fa1e644ff30
Change name of "release" method in delayed logs handler
mopidy/internal/log.py
mopidy/internal/log.py
import logging import logging.config import logging.handlers import platform LOG_LEVELS = { -1: dict(root=logging.ERROR, mopidy=logging.WARNING), 0: dict(root=logging.ERROR, mopidy=logging.INFO), 1: dict(root=logging.WARNING, mopidy=logging.DEBUG), 2: dict(root=logging.INFO, mopidy=logging.DEBUG), ...
Python
0.000001
@@ -868,16 +868,29 @@ release +_delayed_logs (self):%0A @@ -2415,16 +2415,29 @@ .release +_delayed_logs ()%0A%0A%0Adef
9be9a99c893a262bdf224d49c8d140836c11b472
Add a manual reset mechanism.
ping_server.py
ping_server.py
#!/usr/bin/python from gevent.monkey import patch_all patch_all() import serial, operator, gevent from gevent.event import Event from gevent import Greenlet # change to your Arduino serial device port = '/dev/tty.usbmodem411' distance = [list((100, 100)) for i in xrange(6)] real_on = [list((False, False)) for i in ...
Python
0
@@ -3718,16 +3718,54 @@ _fakes() +%0A return jsonify(%7B'success': True%7D) %0A%0A@socke
32566b73fae3a07fea95d20aa12962754b46efb1
use django convention for importing urls defaults (gets handler404, etc.)
lib/rapidsms/djangoproject/urls.py
lib/rapidsms/djangoproject/urls.py
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import os from django.conf.urls.defaults import patterns, url from rapidsms.utils.modules import try_import from ..conf import settings # this list will be populated with the urls from the urls.urlpatterns of # each installed app, then found by django as if we'd li...
Python
0
@@ -98,21 +98,9 @@ ort -patterns, url +* %0Afro
90192ecc7057c99749956b88e18040fcccf1b379
add exits operate
ndb/statement.py
ndb/statement.py
#coding=utf-8 ''' @author: Huiyugeng ''' import types import operate class Statement: ''' ndb语句执行器 ''' def __init__(self): pass def execute(self, node, query, action): ''' Execute ndb query @param query 需要执行的ndb语句 @param nd...
Python
0.000001
@@ -1249,32 +1249,71 @@ mmand != None:%0D%0A + command = command.lower()%0D%0A if c @@ -1342,32 +1342,54 @@ command == 'one' + or command == 'exist' :%0D%0A @@ -1699,26 +1699,318 @@ -result = result%5B0%5D +if len(result) %3E 0:%0D%0A result = res...
82a1cbc477bcf57629f8d5e07184cb03e536b603
Check for device connection before sending packet.
neblinaDevice.py
neblinaDevice.py
#!/usr/bin/env python ################################################################################### # # Copyright (c) 2010-2016 Motsai # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwa...
Python
0
@@ -2356,16 +2356,51 @@ acket):%0A + if self.isConnected():%0A
2a6211e0a6dd99cef7d890cd7bcab54656072d94
fix order of lines in create()
bin/report/printscreen/ps_form.py
bin/report/printscreen/ps_form.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
Python
0.000002
@@ -1927,20 +1927,19 @@ -mode +poo l = pool .get @@ -1938,27 +1938,29 @@ pool +er .get -(datas%5B'model'%5D +_pool(cr.dbname )%0A @@ -1961,35 +1961,36 @@ me)%0A -poo +mode l = pool er.get_pool( @@ -1977,37 +1977,35 @@ l = pool -er .get -_pool(cr.dbname +(datas%5B'model'%5D )%0A @@ -2345...
335bb6cc9bc93320915aa08d56c5e5d24eb70b18
replace $ with command prefix
modules/help.py
modules/help.py
class HelpModule: def __init__(self, circa): self.circa = circa self.events = { "cmd.help": [self.help] } self.docs = { "help": "help [<module>[.<command>]|$<command>] → show usage info for a command, or list all commands in a module, or list all modules" } def help(self, fr, to, msg, m): pfx = sel...
Python
0.012816
@@ -1422,16 +1422,34 @@ cs%5Bc%5B1%5D%5D +.replace(%22$%22, pfx) %0A%09%09%09%09sel
60ea2738b39b38bdc1f25594a759aace0f520501
Add utility function to dump flask env
web/manage.py
web/manage.py
from flask.ext.script import Manager from app import get_app from create_db import drop_all_tables, create_barebones_data, create_all_data, create_server app = get_app('config.DockerConfiguration') manager = Manager(app) manager.command(drop_all_tables) manager.command(create_barebones_data) manager.command(create_...
Python
0.000001
@@ -355,16 +355,192 @@ erver)%0A%0A +@manager.command%0Adef config():%0A 'Print out all config values from the fully assembled flask app'%0A print('%5Cn'.join('%25s=%25s' %25 item for item in sorted(app.config.items())))%0A %0Aif __na
e5394a9b6f534ab13d185800fa9b2a4b93f8e727
Update models.py
web/models.py
web/models.py
from django.db import models # Game definitions """ ATTRIBUTES: Strength Vitality Dexterity Charisma Intelligence Wisdom """ """ ELEMENTS: Physical Spell Shadow Arcane Lightning Poison Fire Ice Psychic Chaos """ """ SLOTS: Head Neck Ch...
Python
0.000053
@@ -2367,32 +2367,33 @@ cription += str( +( %22+%22 if self.flat @@ -2400,32 +2400,33 @@ _min%3E=0 else %22-%22 +) + abs(self.flat @@ -2443,24 +2443,25 @@ to %22 + str( +( %22+%22 if self. @@ -2472,32 +2472,33 @@ _max%3E=0 else %22-%22 +) + abs(self.flat @@ -2557,16 +2557,17 @@ += str( +( %22+%22 if s @@ ...
b4078ad91d56d653c575d10d32ee34168b1df5b3
Add list_of_numbers
json_schema_helpers/helpers.py
json_schema_helpers/helpers.py
# Simple types type_string = dict(type="string") type_null = dict(type="null") type_integer = dict(type="integer") type_number = dict(type="number") type_object = dict(type="object") type_list = dict(type="array") # Python clashed with JavaScript :-) type_boolean = dict(type="boolean") # Simple type or null type_str...
Python
0.002067
@@ -725,16 +725,73 @@ ing%22%7D%5D)%0A +list_of_numbers = dict(type=%22array%22, items=%5Btype_number%5D) %0A%0A# Comp
9001989292761e40adc648cb14d421dcb9703ad8
Change port number and bind to default ip address
webhookapp.py
webhookapp.py
# import Flask from flask import Flask, request # import custom-made modules import sparkmessage import argparse # Create an instance of Flask app = Flask(__name__) TOKEN = "" # Index page will trigger index() function @app.route('/') def index(): return 'Hello World' # Webhook page will trigger webhooks() func...
Python
0
@@ -1479,10 +1479,35 @@ app.run( +host=%220.0.0.0%22, port=8000 )%0A
41b512b3c97ac1ec68d0ff201bd2e1513be8c401
Remove duplicated code.
wikked/web.py
wikked/web.py
import os import os.path import logging from werkzeug import SharedDataMiddleware from flask import Flask, abort, g from wikked.wiki import Wiki, WikiParameters # Create the main app. static_folder = os.path.join(os.path.dirname(__file__), 'static') app = Flask( 'wikked', static_folder=static_folder, ...
Python
0.000019
@@ -2951,177 +2951,8 @@ %5D%0A%0A%0A -# We'll hook this up to the post-page-update event, where we want to%0A# clear all cached page lists.%0Adef remove_page_lists(wiki, url):%0A wiki.db.removeAllPageLists()%0A%0A%0A # Wh @@ -3173,65 +3173,8 @@ ki)%0A - wiki.post_update_hooks.append(remove_page_lists)%0A ...
285abd8efb048e449b99ce96cad273e8d9f28206
Set quiet variable to correct value and stop debug output from being printed if quiet is True.
cloudflare_ddns.py
cloudflare_ddns.py
#!/usr/bin/env python # # CloudFlare DDNS script. # # usage: # cloudflare_ddns.py [config] # # See README for details # import requests import json import time import yaml import os import sys from subprocess import Popen, PIPE # CloudFlare api url. CLOUDFLARE_URL = 'https://api.cloudflare.com/client/v4' # Time-to...
Python
0.000001
@@ -1392,18 +1392,8 @@ et = - 'true' == con @@ -3483,24 +3483,46 @@ get_name))%0A%0A + if not quiet:%0A print(js
7b894956d5922c8ad1a792bf3c497409bf6efd96
Add a doc coverage report
Doc/source/conf.py
Doc/source/conf.py
# -*- coding: utf-8 -*- # # fontTools documentation build configuration file, created by # sphinx-quickstart on Thu Apr 20 11:07:39 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
@@ -1125,16 +1125,39 @@ apoleon%22 +, %22sphinx.ext.coverage%22 %5D%0A%0Aautod
b64794f0d64f619a3979fea703aba95a884a14c7
Revert accidental commit. I disabled MCP client only for dev purposes.
src/dashboard/src/main/views.py
src/dashboard/src/main/views.py
from django.db.models import Max from django.core import serializers from django.core.urlresolvers import reverse from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.shortcuts import render_to_response from django.http import Http404, HttpResponse, HttpResponseRedirect, HttpResponseServerErr...
Python
0
@@ -1856,17 +1856,16 @@ ass%0A -# client = @@ -1881,17 +1881,16 @@ t()%0A -# jobsAwai
2daace6af733e833246830ecaa129bea09c247a9
Fix topic rewrite
DebianDevelChangesBot/utils/rewrite_topic.py
DebianDevelChangesBot/utils/rewrite_topic.py
# -*- coding: utf-8 -*- # # Debian Changes Bot # Copyright (C) 2015 Sebastian Ramacher <sramacher@debian.org> # # 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 ...
Python
0.000009
@@ -957,29 +957,13 @@ ll: -(running%7Cnot running) +%5B%5E%7C%5D* ')%0A
69fa066c793c5467c3653420da16b574e4c72702
fix bug in extend mission
mysite/charge/views.py
mysite/charge/views.py
from django.shortcuts import render, render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.template import RequestContext from django.contrib import auth from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.decorators import login_required, permission_requi...
Python
0
@@ -1165,18 +1165,108 @@ Dict = %7B +%22meal%22:%5B%5D,%22consecutivebudget%22:%5B%5D,%22consecutiveconsume%22:%5B%5D,%22consecutivelogin%22:%5B%5D,%22random%22:%5B%5D %7D%0A - for @@ -1482,22 +1482,28 @@ %5B%22meal%22%5D - = +.extend( mis +) %0A @@ -1689,22 +1689,28 @@ budget%22%5D - = +.extend( ...
7e5886d1f1a94c4eeccd5431fde982c93283d329
rename local variable "language" to "query" in views.py
mysite/search/views.py
mysite/search/views.py
from django.http import HttpResponse, QueryDict from django.shortcuts import render_to_response from django.core import serializers from mysite.search.models import Bug, Project import simplejson # Via http://www.djangosnippets.org/snippets/1435/ import datetime from dateutil import tz import pytz def encode_datetime(...
Python
0.000077
@@ -725,24 +725,21 @@ ld%0A%0A -language +query = reque @@ -761,24 +761,56 @@ guage', '')%0A + query_words = query.split()%0A format = @@ -960,35 +960,47 @@ .all()%0A%0A -if language +for word in query_words :%0A bu @@ -1034,24 +1034,20 @@ anguage= -language +word )%0A%0A # @@ -2051,24...
0d4023d629b14d4396d370c395a68fa87b59ddb2
rename to __version__
mythril/__version__.py
mythril/__version__.py
"""This file contains the current Mythril version. This file is suitable for sourcing inside POSIX shell, e.g. bash as well as for importing into Python. """ VERSION = "v0.20.8" # NOQA
Python
0.999158
@@ -157,15 +157,19 @@ %22%22%0A%0A -VERSION +__version__ = %22 @@ -180,13 +180,5 @@ 0.8%22 - # NOQA %0A
6de456df864fcf3f801f41e247d1fcf551195429
fix conflict
n0core/compute/main.py
n0core/compute/main.py
import sys sys.path.append('../../') # NOQA import pulsar from n0core.lib.n0mq import N0MQ from n0core.lib.proto import CreateVMRequest client = N0MQ('pulsar://localhost:6650') consumer = client.subscribe('persistent://sample/standalone/compute/handle') @consumer.on('CreateVMRequest') def create_VM_request(messag...
Python
0.031708
@@ -467,8 +467,528 @@ isten()%0A +=======%0Afrom mqhandler import MQHandler%0A%0Amqhandler = MQHandler('pulsar://localhost:6550',%0A 'persistent://sample/standalone/volumer/114514',%0A subscription_name='compute')%0A%0A%0A@mqhandler.handle('CreateVMRequest')%0Adef create_VM_ha...
e50e14b1d6677cabbe1a281967626d2ea8b470c0
Set initial credential username as xsede username
cluster/views.py
cluster/views.py
from django.shortcuts import render, redirect from django.template import Context from django.http import HttpResponse from django.contrib.auth.decorators import login_required from django.utils import simplejson from models import Job, CredentialForm import utils @login_required def job_index(request): return r...
Python
0.000402
@@ -392,24 +392,93 @@ x(request):%0A + initial = %7B%22username%22:request.user.get_profile().xsede_username%7D%0A if reque @@ -705,16 +705,30 @@ ialForm( +inital=initial )%0A el @@ -761,16 +761,31 @@ ialForm( +initial=initial )%0A%0A c
c3626cdea8b73d81f21aa3acf14a9e018df64790
Fix tests/functional/get_installed_test.py
tests/functional/get_installed_test.py
tests/functional/get_installed_test.py
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from testing import run from testing import venv_update_script def get_installed(): out, err = venv_update_script('''\ import pip_faster as p for p in sorted(p.reqnames(p.pip_get_installed())): ...
Python
0.000003
@@ -111,16 +111,31 @@ terals%0A%0A +import pytest%0A%0A from tes @@ -790,16 +790,70 @@ lit()%0A%0A%0A +@pytest.mark.usefixtures('pypi_server_with_fallback')%0A def test
498a3ed8627f9a46dd757d3514ee155502cccd2a
Fix error for missing previewId member.
build_results.py
build_results.py
import sublime, sublime_plugin from .fuse_util import * paths = [] buildResultPanel = None def NameRegions(view): return view.find_by_selector("entity.name.filename.find-in-files.warning") + view.find_by_selector("entity.name.tag.error") class BuildResults: def __init__(self, window, buildId, previewId): global ...
Python
0
@@ -593,16 +593,45 @@ buildId +%0A%09%09self.previewId = previewId %0A%0A%09%09self
1d0734b343d0d36c0c49a0d3ed276c1864d4cc06
Remove revocation notifier's ZMQ frontend socket file before killing the process
keylime/revocation_notifier.py
keylime/revocation_notifier.py
''' SPDX-License-Identifier: Apache-2.0 Copyright 2017 Massachusetts Institute of Technology. ''' from multiprocessing import Process import threading import functools import time import os import sys import signal import simplejson as json import zmq from keylime import config from keylime import crypto from keylim...
Python
0
@@ -1160,24 +1160,192 @@ s not None:%0A + # Remove the socket file before we kill the process%0A if os.path.exists(%22/tmp/keylime.verifier.ipc%22):%0A os.remove(%22/tmp/keylime.verifier.ipc%22)%0A os.k
7024a02daeabd98cd6fa02c63f339a60995f9200
Rename SpacyVectors->StaticVectors, and refactor to make it easier to customise vector loading
thinc/neural/_classes/spacy_vectors.py
thinc/neural/_classes/spacy_vectors.py
import numpy from ...import describe from ...describe import Dimension, Synapses, Gradient from .._lsuv import LSUVinit from ..ops import NumpyOps from ...api import layerize from .model import Model from ...extra.load_nlp import get_vectors try: import cupy except ImportError: cupy = None @layerize def get...
Python
0
@@ -1001,20 +1001,21 @@ %0Aclass S -pacy +tatic Vectors( @@ -1022,16 +1022,252 @@ Model):%0A + '''Load a static embedding table, and learn a linear projection from it.%0A %0A Out-of-vocabulary items are modded into the table, receiving an arbitrary%0A vector (but the same word will always receive the sam...
b13a0bdbc3d66cc8fb63c916e9337e5e715e0ef4
update options
kolibri/plugins/html5_viewer/options.py
kolibri/plugins/html5_viewer/options.py
import logging logger = logging.getLogger(__name__) # Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox allowable_sandbox_tokens = set( [ "allow-downloads-without-user-activation", "allow-forms", "allow-modals", "allow-orientation-lock", ...
Python
0.000001
@@ -1332,16 +1332,28 @@ e-origin + allow-forms %22, # TO
89e1040f4a3beae18655a16366e8661ae08378db
Add a /favicon.ico url to fix errors in dev/test
labonneboite/web/root/views.py
labonneboite/web/root/views.py
# coding: utf8 from flask import Blueprint, current_app from flask import abort, send_from_directory, redirect, render_template, request from labonneboite.common import doorbell from labonneboite.common import pro from labonneboite.conf import settings from labonneboite.web.search.forms import CompanySearchForm from ...
Python
0
@@ -536,16 +536,148 @@ orm())%0A%0A +@rootBlueprint.route('/favicon.ico')%0Adef favicon():%0A return send_from_directory(current_app.static_folder, 'images/favicon.ico')%0A %0A@rootBl
fa4dd74bca5d89db946dae78c20e2f5f0f758dd7
Add fake @decorator_tag
cacheops/fake.py
cacheops/fake.py
from funcy import ContextDecorator from django.db.models import Manager from django.db.models.query import QuerySet # query def cached_as(*samples, **kwargs): return lambda func: func cached_view_as = cached_as def install_cacheops(): if not hasattr(Manager, 'get_queryset'): Manager.get_queryset = la...
Python
0.00008
@@ -1458,8 +1458,91 @@ ation()%0A +%0A%0Adef decorator_tag(func=None, takes_context=False):%0A raise NotImplementedError%0A
749be8f768ad299c8e6744bc2cb5de3692aa41ef
Fix buyback bug.
lampmud/lpmud/feature/store.py
lampmud/lpmud/feature/store.py
import itertools from collections import deque from lampost.di.resource import Injected, module_inject from lampost.meta.auto import AutoField from lampost.db.dbofield import DBOField from lampost.gameops.action import obj_action, ActionError from lampmud.model.item import ItemDBO ev = Injected('dispatcher') module_...
Python
0
@@ -2129,16 +2129,19 @@ antity, +ev. current_ @@ -2145,18 +2145,16 @@ nt_pulse -() ))%0A
eaa397715c2f667c375e936581296feb609c799d
Add tabswitching.typical_25 benchmark
tools/perf/benchmarks/tab_switching.py
tools/perf/benchmarks/tab_switching.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry import test from measurements import tab_switching class TabSwitchingTop10(test.Test): test = tab_switching.TabSwitching page_set = 'pa...
Python
0
@@ -334,16 +334,133 @@ 0.py'%0A%0A%0A +class TabSwitchingTypical25(test.Test):%0A test = tab_switching.TabSwitching%0A page_set = 'page_sets/typical_25.py'%0A%0A%0A class Ta
a5d47b978e0a4c7b0f0f96ab2a596833af934b96
Update Nimbus.io storage driver name so it's unique.
libcloud/storage/drivers/nimbus.py
libcloud/storage/drivers/nimbus.py
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
Python
0
@@ -3065,16 +3065,19 @@ 'Nimbus +.io '%0A we
f57616df11408514e43dec70aee121b4221039a7
store the total budget
logistic_budget/model/sale_order.py
logistic_budget/model/sale_order.py
# -*- coding: utf-8 -*- # Copyright 2014 Camptocamp SA # # 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, or (at your option) any later ve...
Python
0.000845
@@ -1419,16 +1419,60 @@ _budget' +,%0A store=True )%0A%0A @
a5847a40104e17d243e0b41ae40bc4820dcd9725
update head comments typo
leetcode/merge-overlapping-intervals.py
leetcode/merge-overlapping-intervals.py
#Author: Maple0 #Github:https://github.com/Maple0 #4th Sep 2016 #pGiven a collection of intervals, merge all overlapping intervals. #For example, #Given [1,3],[2,6],[8,10],[15,18], #return [1,6],[8,10],[15,18]. class Interval(object): def __init__(self, s=0, e=0): self.start = s self.end = e class Merge_Res...
Python
0
@@ -58,17 +58,16 @@ p 2016%0A# -p Given a
b68149f807cd3814cb7ed7e9c695e80f9400a66b
Update _version.py
mpf/_version.py
mpf/_version.py
"""Holds various Version strings of MPF. This modules holds the MPF version strings, including the version of BCP it needs and the config file version it needs. It's used internally for all sorts of things, from printing the output of the `mpf --version` command, to making sure any processes connected via BCP are the...
Python
0.000002
@@ -432,9 +432,9 @@ ev.3 -8 +9 '%0A''
5f8a57c6b1635e5debb0a012a1defbb583d6414b
fix for new external libs
mac/MusicPlayer/build-copyScript.py
mac/MusicPlayer/build-copyScript.py
#!/usr/bin/python # build-copyScript.py # MusicPlayer # # Created by Albert Zeyer on 21.08.12. # Copyright (c) 2012 Albert Zeyer. All rights reserved. import os, shutil from subprocess import Popen, PIPE from glob import glob import re env = os.environ cp = shutil.copyfile import sys, time sys.path += [env["PROJ...
Python
0
@@ -1814,16 +1814,86 @@ wait()%0A%0A +externalPath = os.path.normpath(env%5B%22PROJECT_DIR%22%5D + %22/../external%22)%0A%0A def fixB @@ -1979,16 +1979,30 @@ ,%22/opt/%22 +, externalPath %5D, strip
39946f9fa5127d240d7147d50b676ad083514e85
Add custom debug toolbar URL mount point.
campus02/urls.py
campus02/urls.py
#!/usr/bin/python # -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns( '', url(r'^', include('django.contrib.auth.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^web/', include('campus02.web.urls', namespace='we...
Python
0
@@ -36,16 +36,49 @@ -8 -*-%0A%0A +from django.conf import settings%0A from dja @@ -418,8 +418,158 @@ e')),%0A)%0A +%0Aif settings.DEBUG:%0A import debug_toolbar%0A urlpatterns += patterns(%0A '',%0A url(r'%5E__debug__/', include(debug_toolbar.urls)),%0A )%0A
2478bccb0bebda67d5e28974ee526776041493f0
make contact routes cleaner
newebe/routes.py
newebe/routes.py
import sys sys.path.append("../") from newebe.apps.contacts import handlers as contacts from newebe.apps.profile import handlers as profile from newebe.apps.auth import handlers as auth from newebe.apps.news import handlers as news from newebe.apps.activities import handlers as activities from newebe.apps.notes import...
Python
0
@@ -1125,59 +1125,8 @@ ),%0A%0A - ('/contacts/all/$', contacts.ContactsHandler),%0A @@ -1180,32 +1180,32 @@ UpdateHandler),%0A + ('/contacts/ @@ -1592,267 +1592,9 @@ tact -THandler),%0A ('/contacts/content/$', contacts.ContactContentTHandler),%0A ('/contacts/tutorial/1/$', contacts.ContactTutoria...
c25947147ec592142ddbce7dc9e25e3969255c9a
Check iplayer installed
library/get_iplayer/get_iplayer.py
library/get_iplayer/get_iplayer.py
#Copyright (C) 2014 OpenBet Limited # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, distribu...
Python
0
@@ -1798,16 +1798,49 @@ layer')%0A +%09%09shutit.send_and_expect('cd -')%0A %09%09return @@ -1891,13 +1891,55 @@ urn -False +shutit.file_exists('~/get_iplayer/get_iplayer') %0A%0Ade
f600ed4210a58a50d30e6c3c3209071ab49f201c
Comment out push db in css_scrapper
src/checker/plugin/css_scraper.py
src/checker/plugin/css_scraper.py
from bs4 import BeautifulSoup from yapsy.IPlugin import IPlugin import urllib class CssScraper(IPlugin): def __init__(self): self.database = None def setDb(self, DB): self.database = DB def getId(self): return "css_scraper" def check(self, transactionId, content): sou...
Python
0
@@ -1267,24 +1267,25 @@ nlines%0A%0A +# def push_db( @@ -1330,16 +1330,17 @@ +# uri = se @@ -1381,16 +1381,17 @@ +# reqId = @@ -1490,32 +1490,33 @@ != -1:%0A +# self.database.se @@ -1754,32 +1754,33 @@ style):%0A +# self.push_db(tra @@ -2155,24 +2155,25 @@ e):%0A ...
d5f7eeae83ac1f6ff45cab85552fcea215b4ddda
Edit docstring
inverse_covariance/model_average.py
inverse_covariance/model_average.py
import numpy as np from sklearn.base import BaseEstimator class ModelAverage(BaseEstimator): """ Randomized model averaging meta-estimator. Parameters ----------- estimator : An inverse covariance estimator class After being fit, estimator.precision_ must either be a matrix ...
Python
0.000002
@@ -1340,32 +1340,101 @@ in the estimator +. This parameter is %0A unimportant if use_scalar_penalty=True. %0A e.g., ' @@ -1459,16 +1459,21 @@ Lasso, ' +alpha ' for Gr
86e8c32199332fe93cd6267c0346f7d12f8379cc
fix utf-8 length encoding bug; fix lock release bug in pool exception case
mcm/sdos/core/MappingPersistence.py
mcm/sdos/core/MappingPersistence.py
#!/usr/bin/python # coding=utf-8 """ Project MCM - Micro Content Management SDOS - Secure Delete Object Store Copyright (C) <2016> Tim Waizenegger, <University of Stuttgart> This software may be modified and distributed under the terms of the MIT license. See the LICENSE file for details. """ import logging ...
Python
0
@@ -2210,17 +2210,17 @@ S_MAPP_V -1 +2 %5C0%5C0%5C0%5C0
f88a6c65fc0e6a1c65284890052b8e1ceb4081ec
Add Kennard-Stone algorithm
muv/__init__.py
muv/__init__.py
Python
0.018825
@@ -0,0 +1,1144 @@ +%22%22%22%0AMiscellaneous utilities.%0A%22%22%22%0Aimport numpy as np%0A%0A%0Adef kennard_stone(d, k):%0A %22%22%22%0A Use the Kennard-Stone algorithm to select k maximally separated%0A examples from a dataset.%0A%0A Algorithm%0A ---------%0A 1. Choose the two examples separated by...
3a036c947835c51bc7dcf89b2b4e3ae6ab32de75
Return bytes, not a bytearray
linehaul/protocol/line_receiver.py
linehaul/protocol/line_receiver.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
Python
0.000527
@@ -1849,16 +1849,22 @@ %22, line= +bytes( self._bu @@ -1856,21 +1856,22 @@ =bytes(self._buffer) +) %0A
6756e234c63aef5dd14ef4c19e95d48504f7d9f5
add async library
monitoring-agent.gyp
monitoring-agent.gyp
{ 'variables': { 'target_arch': 'ia32', # TODO: handle multiple agents somehow? 'library_files': [ 'lib/lua/virgo_init.lua', 'agents/monitoring/lua/monitoring-agent.lua', 'agents/monitoring/lua/test.lua', ], 'luvit_library_files': [ 'deps/luvit/lib/emitter.lua', 'deps...
Python
0.000001
@@ -182,32 +182,114 @@ ing-agent.lua',%0A + 'agents/monitoring/lua/async.lua',%0A 'agents/monitoring/lua/queue.lua',%0A 'agents/mo
bfd681fa240c8d10677eb0ea75a7b9ae7ac104e4
Improve log handling
nanodlna/cli.py
nanodlna/cli.py
#!/usr/bin/env python3 from __future__ import print_function import argparse import json import os import sys import datetime from . import devices, dlna, streaming import logging def get_subtitle(file_video): video, extension = os.path.splitext(file_video) file_subtitle = "{0}.srt".format(video) i...
Python
0.000004
@@ -120,16 +120,32 @@ datetime +%0Aimport tempfile %0A%0Afrom . @@ -195,16 +195,546 @@ gging%0A%0A%0A +def set_logs(args):%0A%0A log_filename = os.path.join(%0A tempfile.mkdtemp(),%0A %22nanodlna-%7B%7D.log%22.format(%0A datetime.datetime.today().strftime(%22%25Y-%25m-%25d_%25H-%25M-%25S%...
44186c1a03d8504aad8a68f1261538801f689c03
Make sure backends is a fully functional list
mopidy/core/actor.py
mopidy/core/actor.py
import itertools import pykka from mopidy.audio import AudioListener from .current_playlist import CurrentPlaylistController from .library import LibraryController from .playback import PlaybackController from .stored_playlists import StoredPlaylistsController class Core(pykka.ThreadingActor, AudioListener): #...
Python
0.000008
@@ -1675,13 +1675,11 @@ nds( -objec +lis t):%0A @@ -1725,453 +1725,262 @@ s -elf._b +uper(B ackends - = backends%0A%0A uri_schemes_by_backend = %7B%0A backend: backend.uri_schemes.get()%0A for backend in backends%7D%0A self.by_uri_scheme = %7B%0A uri_scheme: backend...
f7909cd72361d06bac259fea0cb021a410885336
Add compulsory keywords
listentotwitter/keywordsmanager.py
listentotwitter/keywordsmanager.py
import time from listentotwitter import socketio from listentotwitter.tweetanalyser import TweetAnalyser from listentotwitter.tweetstreamer import TweetStreamer def keyword_test(keyword): if len(keyword) >= 3 and len(keyword) <= 15: return True else: return False class KeywordsManager: ...
Python
0.000017
@@ -354,16 +354,51 @@ out = 30 +%0A compulsory_keywords = ('lol',) %0A%0A de @@ -621,16 +621,105 @@ tweet)%0A%0A + for keyword in self.compulsory_keywords:%0A self.ping_keyword(keyword)%0A%0A def @@ -812,32 +812,32 @@ words_tracking:%0A - if t @@ -835,16 +835,60 @@ i...
2fbbdb3725ec5abe73d633618e318e958617acd3
Prepend file path prefix to XML doc file paths
lib/custom_data/character_loader_new.py
lib/custom_data/character_loader_new.py
"""This module loads character data from XML files and stores them in CharacterData objects that can be read by the game engine. Attributes: CHARACTER_LIST_PATH (String): The filepath for the text file which lists the paths to all of the characters' XML files. Each path is separated by a new-line. ...
Python
0
@@ -1933,25 +1933,74 @@ = %5B -line.rstrip('%5Cn') +FILEPATH_PREFIX + line.rstrip('%5Cn')%0A for
fa7f3be4fb9b4b34081f4bb46eaf836a87e9931c
add support to afreecatv.com.tw
src/livestreamer/plugins/afreecatv.py
src/livestreamer/plugins/afreecatv.py
import re from livestreamer.plugin import Plugin from livestreamer.plugin.api import http, validate from livestreamer.plugin.api.utils import parse_query from livestreamer.stream import RTMPStream VIEW_LIVE_API_URL = "http://api.afreeca.tv/live/view_live.php" _url_re = re.compile("http(s)?://(\w+\.)?afreeca.tv/(?P<...
Python
0
@@ -260,60 +260,238 @@ hp%22%0A -%0A_url_re = re.compile(%22http(s)?://(%5Cw+%5C.)?afreeca.tv +VIEW_LIVE_API_URL_TW = %22http://api.afreecatv.com.tw/live/view_live.php%22%0A%0A_url_re = re.compile(%22http(s)?://(%5Cw+%5C.)?(afreecatv.com.tw%7Cafreeca.tv)/(?P%3Cchannel%3E%5B%5Cw%5C-_%5D+)%22)%0A_url_re_tw = re.compile(...
dff7153d7f68dfed2e4dc002c22f34008378a81a
Remove unused imports
locust_tests/load_testing_locus.py
locust_tests/load_testing_locus.py
# Import the locust libraries import time import getpass from locust import HttpUser, task, between # Request the username and password to login into NearBeach username = input("\nPlease enter the username: ") password = getpass.getpass("\nPlease enter the password: ") class QuickstartUser(HttpUser): wait_time =...
Python
0.000001
@@ -27,20 +27,8 @@ ies%0A -import time%0A impo
28aceed6144400e63a457034f6b3cd0c31492d47
fix formatting of static bucket
treeano/sandbox/nodes/static_bucket.py
treeano/sandbox/nodes/static_bucket.py
from __future__ import division, absolute_import from __future__ import print_function, unicode_literals import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn fX = theano.config.floatX @treeano.register_node('static_bucket') class StaticBucketNode(treeano.NodeImpl): ...
Python
0.000022
@@ -392,16 +392,20 @@ kets for +%0A regress @@ -409,21 +409,16 @@ ession. -%0A attentio @@ -472,16 +472,20 @@ ructured +%0A case an @@ -486,21 +486,16 @@ ase and -%0A independ @@ -839,16 +839,67 @@ _type%22%5D, +%0A 'structu @@ -949,16 +949,1...
52889e9dfaa38766ea3c4c95be775a3b89b8524c
Test that the errback is triggered on a pending job when the connection to exiftool was lost.
twisted_exiftool/test/test_protocol.py
twisted_exiftool/test/test_protocol.py
""" Tests for L{twisted_exiftool.ExiftoolProtocol} """ from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from twisted.internet import defer, error, protocol from twisted.python import failure from twisted.test import proto_helpers from twisted.trial.unittest...
Python
0
@@ -4877,16 +4877,43 @@ losed)%0A%0A + @defer.inlineCallbacks%0A def @@ -4932,32 +4932,254 @@ ion_lost(self):%0A + self.tag += 1%0A%0A pending_job = self.proto.execute('/path/to/file.jpg')%0A self.assertEqual(self.tr.value(), '/path/to/file.jpg%5Cn-execute%7B:d%7D%5Cn'.format(self.tag).e...
13b0a9e570563bd4a0a08f228f26f8f8fed98d60
Add option --cmake-prefix
example/cmake-pkg/use-gsl-pkg.py
example/cmake-pkg/use-gsl-pkg.py
#!/usr/bin/env python # # Copyright 2015-2018 by Martin Moene # # gsl-lite is based on GSL: Guideline Support Library, # https://github.com/microsoft/gsl # # This code is licensed under the MIT License (MIT). # # example/cmake-pkg/use-gsl-pkg.py # from __future__ import print_function import argparse import os # g...
Python
0.000004
@@ -2161,32 +2161,164 @@ ll_pfx else ''%0A + opt_cmake_pfx = '-DCMAKE_PREFIX_PATH=%22%7Bcmake_pfx%7D%22' .format( cmake_pfx=opt.cmake_pfx ) if opt.cmake_pfx else ''%0A opt_gsl_lite @@ -2539,16 +2539,32 @@ all_pfx%7D + %7Bopt_cmake_pfx%7D %7Bopt_gs @@ -2782,16 +2782,54 @@ all_pfx%0A + ...
d92b8c824b1efed241c1857f12132e8ef5742a8b
add staticfiles storage
meinberlin/config/settings/build.py
meinberlin/config/settings/build.py
from .base import * SECRET_KEY = "dummykeyforbuilding"
Python
0.000001
@@ -49,8 +49,94 @@ ilding%22%0A +STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'%0A
af520ea27409dcd674a09066ad6c617eb43409f9
remove the formated log handler to remove duplicate log messages
mppsolar/__init__.py
mppsolar/__init__.py
# !/usr/bin/python import logging from argparse import ArgumentParser from .version import __version__ # noqa: F401 # import mppcommands from .mpputils import mppUtils log = logging.getLogger('MPP-Solar') # setup logging (DEBUG, INFO, WARNING, ERROR, CRITICAL) ch = logging.StreamHandler() # create formatter and add ...
Python
0.000001
@@ -257,16 +257,18 @@ ITICAL)%0A +# ch = log @@ -288,16 +288,16 @@ ndler()%0A - # create @@ -334,16 +334,18 @@ andlers%0A +# formatte @@ -437,16 +437,18 @@ age)s')%0A +# ch.setFo @@ -495,16 +495,18 @@ logger%0A +# log.addH @@ -516,16 +516,16 @@ ler(ch)%0A - # set de @@ -541,17 +541,16 @@ levels%0A -#...
954b910ad660d0eae8fdab2742a69429d1eabfe0
Fix reference to open() function in validator docs
mrcfile/validator.py
mrcfile/validator.py
# Copyright (c) 2018, Science and Technology Facilities Council # This software is distributed under a BSD licence. See LICENSE.txt. """ validator --------- Module for top-level functions that validate MRC files. This module is runnable to allow files to be validated easily from the command line. """ # Import Pyth...
Python
0.000004
@@ -2525,24 +2525,33 @@ ling :func:%60 +~mrcfile. open%60 (with%0A
8527e226ccb2f70fbe635799f199cba6cd9ee8ba
make it compatible with python 2 and 3
mssql/mssql_shell.py
mssql/mssql_shell.py
#!/usr/bin/env python2 from __future__ import print_function # Author: Alamot # Use pymssql >= 1.0.3 (otherwise it doesn't work correctly) # To upload a file type: UPLOAD local_path remote_path # e.g. UPLOAD myfile.txt C:\temp\myfile.txt # If you omit the remote_path it uploads the file on the current working folder. ...
Python
0.003028
@@ -14,17 +14,16 @@ v python -2 %0Afrom __ @@ -53,17 +53,16 @@ unction%0A -%0A # Author @@ -390,16 +390,83 @@ hashlib%0A +from io import open%0Atry: input = raw_input%0Aexcept NameError: pass%0A%0A %0AMSSQL_S @@ -733,25 +733,24 @@ lumns = -row.keys( +list(row )%0A @@ -755,30 +755,97 @@ -print(row%5...
589f3cf6ca9031bfb44215d891bdf20b15bcc7bc
add methods to find and follow links
mechanicalsoup/stateful_browser.py
mechanicalsoup/stateful_browser.py
from __future__ import print_function from six.moves import urllib from .browser import Browser from .utils import LinkNotFoundError from .form import Form import sys class StatefulBrowser(Browser): def __init__(self, session=None, soup_config=None, requests_adapters=None): super(StatefulBrowser, self)._...
Python
0
@@ -161,16 +161,26 @@ ort sys%0A +import re%0A %0A%0Aclass @@ -3444,32 +3444,1704 @@ return resp%0A%0A + def list_links(self, *args, **kwargs):%0A %22%22%22Display the list of links in the current page.%22%22%22%0A print(%22Links in the current page:%22)%0A for l in self.links(*args, **kw...
7a4284cd1fd69847e9beba1fa45bfa9ebfebe2f2
Use errno module instead of hardcoding error codes
keyring/tests/backends/test_file.py
keyring/tests/backends/test_file.py
import os import tempfile import sys from ..py30compat import unittest from ..test_backend import BackendBasicTests from ..util import random_string from keyring.backends import file class FileKeyringTests(BackendBasicTests): def setUp(self): super(FileKeyringTests, self).setUp() self.keyring =...
Python
0.000001
@@ -29,16 +29,29 @@ port sys +%0Aimport errno %0A%0Afrom . @@ -592,17 +592,28 @@ rrno != -2 +errno.ENOENT : # No s
ce990bfb3c742c9f19f0af43a10aad8193fa084c
Use the package name when looking up version
keystoneclient_kerberos/__init__.py
keystoneclient_kerberos/__init__.py
# -*- coding: utf-8 -*- # 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, softw...
Python
0.000002
@@ -668,16 +668,23 @@ o(%0A ' +python- keystone @@ -681,33 +681,33 @@ n-keystoneclient -_ +- kerberos').versi
2c38a175cd2e72e0767f9860c6ef77b2bab89870
fix "RuntimeError: dictionary changed size during iteration"
canteen/views.py
canteen/views.py
from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import render from .canteen_utils import * def login_required(request, login_url='/login/'): pass def homepage(request): if request.session.get('id', False): if request.method == 'POST': ...
Python
0
@@ -4805,16 +4805,21 @@ key in +list( cleaned_ @@ -4829,16 +4829,17 @@ t.keys() +) :%0A
1633b57ae3550b9e4ec6c01ec97c010fd0f2a5c9
Verify source/destination files exist in whisper-fill
carbonate/cli.py
carbonate/cli.py
import argparse import errno import fileinput import logging import os import sys from time import time from .aggregation import setAggregation, AGGREGATION from .fill import fill_archives from .list import listMetrics from .lookup import lookup from .sieve import filterMetrics from .sync import run_batch from .util ...
Python
0
@@ -6734,16 +6734,189 @@ s.dest%0A%0A + if not os.path.isfile(src):%0A raise SystemExit('Source file not found.')%0A%0A if not os.path.isfile(dst):%0A raise SystemExit('Destination file not found.')%0A%0A star
7cc3176579bd668a0295eff6d01addf8a1457336
Version 0.5.3
cards/version.py
cards/version.py
# coding=utf-8 __version__ = '0.5.2'
Python
0.000001
@@ -32,7 +32,7 @@ 0.5. -2 +3 '%0A
f652dd6673a9e4c193c9e43aed41fe92af6fa29e
Simplify cart groups
cart/__init__.py
cart/__init__.py
from delivery import DummyShipping, DigitalDelivery from django.conf import settings from django.utils.translation import ugettext from itertools import groupby from prices import Price from product.models import StockedProduct, DigitalShip from satchless import cart from satchless.item import Item, ItemLine, ItemSet, ...
Python
0.000011
@@ -416,2654 +416,383 @@ -_state = None%0A default_error_messages = %7B%0A 'attribute_error': '%5C'%25s%5C' object has no attribute %5C'%25s%5C''%0A %7D%0A%0A def __init__(self, items):%0A super(Group, self).__init__(items)%0A self._state = %7B%7D%0A%0A def __getstate__(self):%0A ...
091a34f196197caa5b8f001da8b5e2227504d089
Fix broken review feed
museum_site/feeds.py
museum_site/feeds.py
from django.contrib.syndication.views import Feed from django.urls import reverse from django.template.defaultfilters import slugify from museum_site.models import Article, File, Review from museum_site.constants import ( PUBLISHED_ARTICLE, DETAIL_UPLOADED, DETAIL_LOST ) class LatestArticlesFeed(Feed): titl...
Python
0.000029
@@ -2253,18 +2253,16 @@ ile. -identifier +filename %5D%0A
a05bb771a8b9ee7cffb296534b4b7f6244784d4b
Configure default logging handler
mwclient/__init__.py
mwclient/__init__.py
""" Copyright (c) 2006-2011 Bryan Tong Minh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,...
Python
0
@@ -1149,8 +1149,297 @@ port ex%0A +%0A# Logging: Add a null handler to avoid %22No handler found%22 warnings.%0Aimport logging%0Atry:%0A from logging import NullHandler%0Aexcept ImportError:%0A class NullHandler(logging.Handler):%0A def emit(self, record):%0A pass%0A%0Alogging.getLogger(__name...
f2d08c29ae60a9bec661ab8b38a3f47552ee75eb
Return new envelopes instead of modifying in place
contones/geometry.py
contones/geometry.py
from osgeo import ogr class Envelope(object): """Rectangular bounding extent. This class closely resembles OGREnvelope which is not included in the SWIG bindings. """ def __init__(self, min_x, min_y, max_x, max_y): """ Creates an envelope, from lower-left and upper-right coordina...
Python
0.000001
@@ -1736,26 +1736,37 @@ %22%22Re -scale the envelope +turns a new envelope rescaled by @@ -1932,32 +1932,48 @@ y / 2.0%0A +return Envelope( self.min_x += w%0A @@ -1972,67 +1972,67 @@ _x + -= w -%0A self.max_x -= w%0A self.min_y += h%0A +, self.min_y + h,%0A s...
1be5dce30ebf6b3f5cbdae82b5b57b9e566108a4
stop racing during long streams
lbrynet/blob_exchange/downloader.py
lbrynet/blob_exchange/downloader.py
import asyncio import typing import logging from lbrynet.utils import drain_tasks from lbrynet.blob_exchange.client import request_blob if typing.TYPE_CHECKING: from lbrynet.conf import Config from lbrynet.dht.node import Node from lbrynet.dht.peer import KademliaPeer from lbrynet.blob.blob_manager impo...
Python
0
@@ -945,16 +945,549 @@ %5D = %7B%7D%0A%0A + def should_race_continue(self):%0A if len(self.active_connections) %3E= self.config.max_connections_per_download:%0A return False%0A # if a peer won 2 or more blob races and is active as a downloader, stop the race so bandwidth improves%0A ...
e5624f14e19cebd0587a856cda310eaa9bf44bd0
Update globalvar.py
cea/globalvar.py
cea/globalvar.py
# -*- coding: utf-8 -*- """ Global variables - this object contains context information and is expected to be refactored away in future. """ from __future__ import absolute_import import cea.config __author__ = "Jimeno A. Fonseca" __copyright__ = "Copyright 2015, Architecture and Building Systems - ETH Zurich" __credit...
Python
0.000001
@@ -736,24 +736,25 @@ run%0A +# self.date_st
e7ec7259eb4af64db3d4ee19462084141ec37100
Rename FileOperations to SystemOperations because I will add command execution soon.
src/libeeyore/main.py
src/libeeyore/main.py
import cmd_runner import cpp_compiler from eeyoreoptions import EeyoreOptions from usererrorexception import EeyUserErrorException from buildsteps.sourcebuildstep import SourceBuildStep from buildsteps.lexbuildstep import LexBuildStep from buildsteps.parsebuildstep import ParseBuildStep from buildsteps.render...
Python
0
@@ -825,20 +825,22 @@ %0A%0Aclass -File +System Operatio @@ -1031,18 +1031,19 @@ ( opts, -fl +sys _op, exe @@ -1171,34 +1171,35 @@ ssage%0A%0A with -fl +sys _op.open_read( i @@ -1555,18 +1555,19 @@ with -fl +sys _op.open @@ -2531,12 +2531,14 @@ ns, -File +System Oper
5c9fd359903f80636c3b611390588fa0c0ffb942
Add property to use system libraries for things like python, pulse or X11
cerbero/build.py
cerbero/build.py
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
Python
0
@@ -2763,16 +2763,44 @@ e clean' +%0A use_system_libs = False %0A%0A _p @@ -2937,16 +2937,35 @@ 'clean' +, 'use_system_libs' %5D%0A%0A d @@ -3184,32 +3184,64 @@ nfigure (self):%0A + self._add_system_libs()%0A if self. @@ -4080,16 +4080,660 @@ ld_dir)%0A + self._restore_pkg_config_...
0fa6815277ffe5aaf2288385457a201760788d7b
fix conf changes for test_cli_new
ceph_deploy/tests/test_cli_new.py
ceph_deploy/tests/test_cli_new.py
import pytest from mock import patch import re import subprocess import uuid from .. import conf from ..cli import main from .directory import directory from .fakes import fake_getaddrinfo def test_help(tmpdir, cli): with cli( args=['ceph-deploy', 'new', '--help'], stdout=subprocess.PIPE, ...
Python
0
@@ -1,18 +1,4 @@ -import pytest%0A from @@ -556,36 +556,57 @@ loy.new. -sock +n et.get -hostbyname +_nonlocal_ip', lambda x: '10.0.0.1 '):%0A @@ -641,45 +641,53 @@ new. -socket.getaddrinfo', fake_getaddrinfo +arg_validators.Hostname', lambda: lambda x: x ):%0A @@ -828,32 +828,37 @@ cfg = conf. +ceph. ...
23c6d836ecc6d528e8e0c619b70d82352460ad9c
remove 'ceph' from install tests as it is no longer used
ceph_deploy/tests/test_install.py
ceph_deploy/tests/test_install.py
from mock import Mock from ceph_deploy import install class TestSanitizeArgs(object): def setup(self): self.args = Mock() # set the default behavior we set in cli.py self.args.default_release = False self.args.stable = None def test_args_release_not_specified(self): ...
Python
0
@@ -1975,32 +1975,24 @@ %0A - 'ceph', 'ceph-osd', @@ -2018,32 +2018,32 @@ mon', 'radosgw'%0A + %5D)%0A%0A @@ -2447,32 +2447,24 @@ %0A - 'ceph', 'ceph-osd', @@ -2721,32 +2721,24 @@ %0A - 'ceph', 'ceph-osd', @@ -3114,32 +3114,32 @@ ult == sorted(%5B%0A + ...
84a4f0e3e26403fc4618f06f56a1fbd8443d6e1a
Remove remnant debug statements
src/foremast/pipeline/__main__.py
src/foremast/pipeline/__main__.py
"""Create Spinnaker Pipeline.""" import argparse import logging from ..args import add_app, add_debug, add_gitlab_token, add_properties, add_env from ..consts import LOGGING_FORMAT, ENVS from .create_pipeline import SpinnakerPipeline from .create_pipeline_onetime import SpinnakerPipelineOnetime def main(): """Ru...
Python
0
@@ -133,17 +133,8 @@ ties -, add_env %0Afro @@ -996,24 +996,8 @@ gs() -%0A print(args) %0A%0A
9fa0c60a2277491d1666048f3043938880b7a66a
clarify docstring
osmnx/_api.py
osmnx/_api.py
"""Expose the core OSMnx API.""" from .bearing import add_edge_bearings from .boundaries import gdf_from_place from .boundaries import gdf_from_places from .distance import get_nearest_edge from .distance import get_nearest_edges from .distance import get_nearest_node from .distance import get_nearest_nodes from .elev...
Python
0.00078
@@ -7,26 +7,70 @@ ose -the core OSMnx API +most common parts of public API directly in %60osmnx.%60 namespace .%22%22%22
4e39b5661fe9e171acc6a4ca6404b9724a949445
split between user and server notices
modules.py
modules.py
import importlib import logging import commands import timers MODULEPATH = "remote." class ModuleSet(object): def __init__(self, send): self.modules = {} self.remotes = {} self.cmd = commands.CommandSet(send) self.timers = timers.TimerSet() self.aliases = {} self....
Python
0.000523
@@ -3304,24 +3304,27 @@ %22: self. -on notice +split ,%0A @@ -3970,24 +3970,221 @@ nd%5D(*args)%0A%0A + def noticesplit(self, *args):%0A # distinguish between server and user notices%0A if len(args) == 2:%0A self.onsnotice(*args)%0A else:%0A self.onnotice(*args)%0...
be751cb7e354a621502ee94e72f431f826e14444
Convert mox to mock: tests/compute/test_nova.py
cinder/tests/compute/test_nova.py
cinder/tests/compute/test_nova.py
# Copyright 2013 IBM Corp. # # 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 agree...
Python
0.000156
@@ -598,16 +598,48 @@ cense.%0A%0A +import contextlib%0A%0Aimport mock%0A%0A from cin @@ -1265,152 +1265,123 @@ t()%0A - self.mox.StubOutWithMock(nova, 'novaclient')%0A%0A def test_update_server_volume(self):%0A nova.novaclient(self.ctx).AndReturn(self. +%0A def test_update_server_volume(self):%0...
5769c0760513cec655898e0e2ed71cbe640aac0f
Call fetch_and_import on container, not util
ciscripts/deploy/python/deploy.py
ciscripts/deploy/python/deploy.py
# /ciscripts/deploy/python/deploy.py # # Activate haskell container in preparation for deployment. This is required # because we need to have pandoc available in our PATH. # # See /LICENCE.md for Copyright information """Place a symbolic link of pandoc in a writable directory in PATH.""" import os import shutil from...
Python
0.000001
@@ -2443,20 +2443,20 @@ %22)%0A%0A -util +cont .fetch_a