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
343499674bb2dea15b3ecc8d3c2bb41ab273e758
Improve exception printing
src/psd2svg/rasterizer/batik_rasterizer.py
src/psd2svg/rasterizer/batik_rasterizer.py
# -*- coding: utf-8 -*- """ Batik-based rasterizer module. Download the latest batik rasterizer to use the module. Note Ubuntu 16.04LTS package is broken and does not work. Prerequisite: wget http://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&\ filename=xmlgraphics/batik/binaries/batik-bin-1.9.tar...
Python
0.000001
@@ -695,17 +695,16 @@ ame__)%0A%0A -%0A BATIK_PA @@ -780,18 +780,18 @@ zer.jar%22 -) %0A +) %0A%0Aclass @@ -1104,16 +1104,84 @@ ) as d:%0A + basename, ext = os.path.splitext(os.path.basename(url))%0A @@ -1215,22 +1215,18 @@ oin(d, %22 -output +%7B%7D .%7B%7D%22.for @@ -1229,16 +1229,26 @@ ...
d0040eae3dc4fc5d17dc57013a1e139d853862a9
Add force parameter
quilt/pop.py
quilt/pop.py
# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80: # python-quilt - A Python implementation of the quilt patch system # # Copyright (C) 2012 Björn Ricks <bjoern.ricks@googlemail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as ...
Python
0
@@ -1443,27 +1443,40 @@ _check(self +, force=False ):%0A - if n @@ -1563,16 +1563,351 @@ elf.db)%0A + if not force:%0A patch = self.db.top_patch()%0A pc_dir = self.quilt_pc + patch.get_name()%0A refresh = File(pc_dir.get_name() + %22~refresh%22)%0A if refr...
24de6c10411fdbf1aad398c3f3a5634155fe6ee7
Make stock_available_mrp compatible with other modules like stock_available_immediately
stock_available/models/product_template.py
stock_available/models/product_template.py
# Copyright 2014 Numérigraphe # Copyright 2016 Sodexis # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import models, fields, api from odoo.addons import decimal_precision as dp from odoo.addons.stock.models.product import OPERATORS class ProductTemplate(models.Model): _inherit = '...
Python
0
@@ -1058,24 +1058,80 @@ usable_qty%22%5D + -%0A variants_dict%5Bp.id%5D%5B%22potential_qty%22%5D for p in%0A @@ -1422,24 +1422,56 @@ y_usable_qty + +%0A potential_qty ,%0A
856acc0829fee6b50c6063b48cea2e6d4e459f90
fix zero confirmation rules. Now zero-qty quants are not removed straight away but by a cron job. Therefore, we have to also check that the quants are not zero-qty ones.
stock_cycle_count/models/stock_location.py
stock_cycle_count/models/stock_location.py
# Copyright 2017-18 Eficent Business and IT Consulting Services S.L. # (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). import logging from odoo import api, fields, models, tools from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT from datetime import datetime _logger...
Python
0
@@ -2150,16 +2150,29 @@ main = %5B +%0A ('locati @@ -2192,16 +2192,62 @@ self.id) +,%0A ('quantity', '%3E', 0.0),%0A %5D%0A
7ce5438e9f0b4b2ac87a708996ccde69d891b2dd
Make modules uninstallable
survey_conditional_question/__openerp__.py
survey_conditional_question/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
Python
0
@@ -1431,11 +1431,12 @@ e': -Tru +Fals e,%0A
1879c68debe7420fda2582955156c8cfe4ff8dfe
update code
tensorflowTUT/tf22_scope/tf22_RNN_scope.py
tensorflowTUT/tf22_scope/tf22_RNN_scope.py
# visit https://morvanzhou.github.io/tutorials/ for more! # 22 scope (name_scope/variable_scope) from __future__ import print_function import tensorflow as tf class TrainConfig: batch_size = 20 time_steps = 20 input_size = 10 output_size = 2 cell_size = 11 learning_rate = 0.01 class TestCon...
Python
0
@@ -2559,19 +2559,16 @@ .concat( -1, self.cel @@ -2576,16 +2576,19 @@ _outputs +, 1 ), %5B-1, @@ -3384,35 +3384,39 @@ with tf. -nam +variabl e_scope('trian') @@ -3591,29 +3591,29 @@ error(y_ -pre, y_target +target, y_pre ):%0A @@ -3642,24 +3642,29 @@ .sub -(y_pre, y_target +tract(y_target, y_pre...
41921ba6f35dd61f869aba28e7e204584cd6e18f
Fix for Py3
tests/unit/webapi25/test_cityidregistry.py
tests/unit/webapi25/test_cityidregistry.py
import unittest from StringIO import StringIO from pyowm.webapi25.cityidregistry import CityIDRegistry from pyowm.webapi25.location import Location class TestCityIdRegistry(unittest.TestCase): _instance = CityIDRegistry('%03d-%03d.txt') _test_file_contents = """dongditou,1812600,39.261391,117.368332,CN dongd...
Python
0
@@ -2180,17 +2180,16 @@ 2756723 -L )%0A @@ -2601,17 +2601,16 @@ 2756723 -L , 'NL')%0A
b9c91a84c88a1a3b98997a45aec4430ea3ec19bf
Reformat with the new black
tests/whitebox/unittest/test_formatting.py
tests/whitebox/unittest/test_formatting.py
# Copyright 2019 Red Hat, 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 agreed to in writing...
Python
0
@@ -994,17 +994,16 @@ %5B -u %22Pool Na @@ -1013,17 +1013,16 @@ 30ame%22, -u %22Na%5Cu030
056e27acf790cf7134d99b60f9d924111b7003fa
Update to 22.04
teuthology/test/test_get_distro_version.py
teuthology/test/test_get_distro_version.py
from teuthology.misc import get_distro_version class Mock: pass class TestGetDistroVersion(object): def setup(self): self.fake_ctx = Mock() self.fake_ctx.config = {} self.fake_ctx_noarg = Mock() self.fake_ctx_noarg.config = {} self.fake_ctx_noarg.os_version = None ...
Python
0
@@ -638,17 +638,17 @@ on == '2 -0 +2 .04'%0A%0A
98edac8e2436ddb3841bcd080d19daca1f3cb243
Fix not returning the sanitized string
libs/utils.py
libs/utils.py
# -*- coding: UTF-8 -*- # # Copyright (c) 2015-2019 by Inteos Sp. z o.o. # All rights reserved. See LICENSE file for details. # from __future__ import unicode_literals import ssl import socket import hashlib import random import re def countbytes(fbyte, bs): if bs == 'B': return int(float(fbyte)) i...
Python
0.999964
@@ -2790,8 +2790,27 @@ %22 -%3E %5C%22%0A + return confstr%0A
592e8847af041e0d6c628459fac4ef45ea5f141b
Change likelihood.py
likelihood.py
likelihood.py
import math #Log-likelihood of a ciphertext: case of general k def ciphertextLL(ciphertext,perm,mat,k): s=0.0 for i in range(len(ciphertext)-(k-1)): kmer = ''.join([perm[c] for c in ciphertext[i:i+k]]) begin = kmer[:k-1] end = kmer[1:] if (begin in mat) and (end in mat[begin]): ...
Python
0.000001
@@ -831,16 +831,514 @@ turn s%0A%0A +#Log-likelihood of a proposed plaintext%0Adef plaintextLL2(plaintext,mat,k):%0A s=0.0%0A for i in range(len(plaintext)-(k-1)):%0A kmer = plaintext%5Bi:i+k%5D%0A begin = kmer%5B:k-1%5D%0A end = kmer%5B1:%5D%0A print begin,end%0A if (begin in ...
fb94b59a863559e07dd0c1bfe7de00173a9be95f
update views.py
loja/views.py
loja/views.py
# -*- coding: utf-8 -*- from .models import Usuario, Produto, Pedido, Item from .forms import FormLogin, FormCadastro, FormStatus from django.contrib.auth import authenticate, login from django.contrib import messages from django.shortcuts import render, get_object_or_404, redirect from .controllers import ControllerUs...
Python
0
@@ -1973,22 +1973,16 @@ save()%0A%09 -else:%0A %09%09return @@ -1995,18 +1995,33 @@ ect( -login)%0A%09%09%0A +pedidos_usuario)%0A%09else:%0A%09 %09ret @@ -2033,32 +2033,23 @@ edirect( -pedidos_usuario) +login)%0A %0A%0Adef pr
1ddd7c16ab79f09c395aa11a56c10a8c4a7a1064
Disable smash responses in tweets for the moment
lrrbot/rpc.py
lrrbot/rpc.py
import asyncio import aiomas import random import re import math import logging import json import traceback import sqlalchemy import common.utils import common.rpc from common import utils from common.config import config from common import game_data from common import twitch from lrrbot import storage import lrrbot...
Python
0
@@ -3491,24 +3491,25 @@ CRET, 2))%0A%09%09 +# if 'smash' i @@ -3531,32 +3531,33 @@ 'responses'%5D:%0A%09%09 +# %09options.append(
252f5be14a1c6c00871d73a5a4ed2f5125b44a8f
Fix APPEND_SLASH behavior
main/views.py
main/views.py
# -*- coding: utf-8 -*- # # Copyright (c) 2007-2012 Peter Kuma import os from django.http import Http404 from django.shortcuts import render from django.template import RequestContext from django.utils import translation from django.http import HttpResponseRedirect from django.conf import settings from django.shortcu...
Python
0.00001
@@ -866,17 +866,16 @@ uest))%0A%0A -%0A def atta @@ -928,80 +928,272 @@ ):%0A%09 -if page_name == '':%0A%09%09c = get_object_or_404(C +def redirect_or_404():%0A%09%09if not request.path.endswith('/'):%0A%09%09%09return HttpResponseRedirect(request.path + '/')%0A%09%09raise Http404%0A%09%09%0A%09if page_name == '':%0...
4d6b254cd6b5f586619e54cf40efeb71da35e3a7
Update getchar simprocedure to use the new read calling convention
simuvex/procedures/libc___so___6/getchar.py
simuvex/procedures/libc___so___6/getchar.py
import simuvex from simuvex.s_type import SimTypeInt ###################################### # getchar ###################################### class getchar(simuvex.SimProcedure): def run(self): self.return_type = SimTypeInt(32, True) data = self.state.posix.read(0,1) data = data.zero_extend...
Python
0
@@ -276,16 +276,21 @@ six.read +_from (0,1)%0A
6ec3f5b6361c05fdd5c6ddf2fdfa9c99cb0b3d70
Add directed motion (still need work
sktracker/tracker/cost_function/directed.py
sktracker/tracker/cost_function/directed.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function import numpy as np import pandas as pd import scipy as sp from scipy import interpolate from . import AbstractCostFunction __all__ = ["Basi...
Python
0
@@ -213,27 +213,8 @@ s pd -%0Aimport scipy as sp %0A%0Afr @@ -476,33 +476,33 @@ The +s co -st between two posi +re for each situa tion +s is @@ -518,36 +518,100 @@ the -square of their%0A distance +cosine similarity between a guessed trajectory%0A vector and the vector made by two points. %0A%0A @@ ...
f35b4b4016c773a8b086d9170609fe6dea3a09cd
include also common_resource in distribution
demo/package.py
demo/package.py
#!/usr/bin/env python import os from time import localtime from zipfile import ZipFile, ZIP_DEFLATED FILES = {'': ['rundemo.py', 'README.txt'], 'login_tests': ['valid_login.txt', 'invalid_login.txt', 'html_resource.txt', 'flex_resource.txt'], 'demoapp': ['server.py'], ...
Python
0
@@ -266,24 +266,72 @@ esource.txt' +,%0A 'common_resource.txt' %5D,%0A
d92591712e36d647c77adafefe6390e8c91d8aa4
make pep8 happy
smartcard/ExclusiveConnectCardConnection.py
smartcard/ExclusiveConnectCardConnection.py
"""CardConnectionDecorator that provides exclusive use of a card. __author__ = "http://www.gemalto.com" Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com This file is part of pyscard. pyscard is free software; you can redistribute it and/or modify it under the terms of th...
Python
0.000001
@@ -1310,16 +1310,17 @@ d.pcsc%0A%0A +%0A class Ex @@ -1348,17 +1348,16 @@ nection( - CardConn @@ -1371,17 +1371,16 @@ ecorator - ):%0A ' @@ -1436,16 +1436,20 @@ d during +%0A connect @@ -1468,20 +1468,16 @@ nt other -%0A process @@ -1503,24 +1503,25 @@ is card.'''%0A +%0A def __in @@ -1517...
1ea05d239a90dd11bd80058f64afa35ddd225efc
Add url to error.
deploy_stack.py
deploy_stack.py
#!/usr/bin/env python __metaclass__ = type import yaml from collections import defaultdict from cStringIO import StringIO from datetime import datetime, timedelta import subprocess import sys from time import sleep import urllib2 class ErroredUnit(Exception): def __init__(self, unit_name, state): Excep...
Python
0
@@ -2989,16 +2989,66 @@ cess!')%0A + url = 'http://%25s/wp-admin/install.php' %25 host%0A for @@ -3129,47 +3129,11 @@ pen( -'http://%25s/wp-admin/install.php' %25 host +url )%0A @@ -3334,10 +3334,21 @@ reen -.' + at %25s' %25 url )%0A%0A%0A
2bedd0f38d6d8dfb06966169c68894b8ae1d4e52
Add test for the ReserseProxied middleware
source/jormungandr/tests/end_point_tests.py
source/jormungandr/tests/end_point_tests.py
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
Python
0
@@ -2191,402 +2191,843 @@ i%22%0A%0A - def test_empty_coverage(self):%0A #even with no loaded kraken, the response should be valid%0A json_response = self.query(%22/v1/coverage%22)%0A%0A assert 'regions' in json_response%0A assert not json_response%5B'regions'%5D%0A%0A def test_v1(sel...
5e6536de38955faf71ab1bf768aa0546d6e7b998
Rename update command to rebuild in help
sender.py
sender.py
#!/usr/bin/env python import pika import json from optparse import OptionParser import logging parser = OptionParser() parser.add_option("-a", "--application", help="application name", type="string", dest="name", default="") parser.add_option("-o", "--operation", help="operation create|update|delete", type="string", ...
Python
0
@@ -286,14 +286,15 @@ ate%7C -update +rebuild %7Cdel
1f2625e3d31698faeaca1eb79343bd65979da4b2
Add UnknownCodeError to spambl module
spambl.py
spambl.py
#!/usr/bin/python # -*- coding: utf-8 -*- class SpamBLError(Exception): ''' Base exception class for spambl module ''' class DNSBL(object): ''' Represents a DNSBL service provider ''' def __init__(self, identifier, query_suffix, code_item_class, lists_ips, lists_uris): ''' Create new DNSBL ob...
Python
0
@@ -116,16 +116,136 @@ dule ''' +%0A %0Aclass UnknownCodeError(SpamBLError):%0A ''' Raise when trying to use an unexpected value of dnsbl return code ''' %0A%0Aclass
5d281e5443b62a40c186b85503bbe9523a94fc66
Fix file IO
sqlviz.py
sqlviz.py
#! usr/bin/env python3 """SQLViz Usage: sqlviz [-hnkdlpo DIR] FILE Options: -h --help Display this help file -k --keys Graph the number of foreign keys vs primary keys -d --datatypes Graph the distribution of datatypes -l --lengths Graph the distribution of lengths for each data t...
Python
0.000014
@@ -61,20 +61,22 @@ po DIR%5D -FILE +%3Cfile%3E %0A%0AOption @@ -98,16 +98,23 @@ p + Display @@ -144,24 +144,31 @@ -keys + Graph the nu @@ -224,16 +224,23 @@ atypes + Graph th @@ -283,24 +283,31 @@ -lengths + Graph the di @@ -367,16 +367,23 @@ nt + + ...
9f150373b720f341c8e30df712d534ecc20114aa
Fix houd error
membership.py
membership.py
import os import pkgutil import json from optparse import OptionParser from functools import reduce # This is where all files are read from and saved to PREFIX = '/Qt.py' SKIP_MODULES = [ 'PyQt4.uic.pyuic', # Problematic as it is executed on import 'PyQt5.uic.pyuic' # Problematic as it is executed on impor...
Python
0.000004
@@ -5477,32 +5477,70 @@ Skipped import', +%0A modname, error)
0a170b84c956a958270131b46e2e1b7e8f6d6777
Bump to version 0.29.0
meza/__init__.py
meza/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ meza ~~~~ Provides methods for reading and processing data from tabular formatted files Attributes: CURRENCIES [tuple(unicode)]: Currency symbols to remove from decimal strings. ENCODING (str): Default file encoding. DEF...
Python
0
@@ -583,11 +583,11 @@ '0.2 -8.5 +9.0 '%0A%0A_
0dc330e720f7d46f0747a790212117cad52e0817
Fix spelling
mne/selection.py
mne/selection.py
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: BSD (3-clause) from os import path from .io.meas_info import Info from . import pick_types from .utils import logger, verbos...
Python
0.00007
@@ -964,16 +964,17 @@ a com +b ination
fb6d9596ffc335b855d65350d723eb70035897dc
Fix log message so it only includes fires in its batch
temba/campaigns/tasks.py
temba/campaigns/tasks.py
from __future__ import unicode_literals import logging import six from celery.task import task from collections import defaultdict from django.db import transaction from django.utils import timezone from django_redis import get_redis_connection from temba.campaigns.models import Campaign, CampaignEvent, EventFire fro...
Python
0.000001
@@ -1561,17 +1561,22 @@ in fire -s +_batch )%0A
d48356215cf48f86926d2ce3044180881827db5e
Fix integration test directory
tests/test_all.py
tests/test_all.py
"""Integration tests for the `gdm` package.""" import os import shutil import pytest import gdm from gdm.config import Config from .conftest import FILES @pytest.mark.integration def test_install(): """Verify dependencies can be installed.""" config = Config(FILES) shutil.rmtree(config.location, ignor...
Python
0.000001
@@ -150,16 +150,22 @@ rt FILES +, ROOT %0A%0A%0A@pyte @@ -244,32 +244,51 @@ e installed.%22%22%22%0A + os.chdir(ROOT)%0A config = Con @@ -739,24 +739,43 @@ stalled.%22%22%22%0A + os.chdir(ROOT)%0A config = @@ -781,32 +781,33 @@ = Config(FILES)%0A +%0A assert gdm.i @@ -887,33 +887,32 @@ ninsta...
519790719eb481c3c7282d76da6010dc0f5418c7
Add ability to mock git ref
recipe_modules/buildbucket/test_api.py
recipe_modules/buildbucket/test_api.py
# Copyright 2017 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import base64 import json from google.protobuf import json_format from google.protobuf import timestamp_pb2 from recipe_engine import recipe_tes...
Python
0
@@ -1216,24 +1216,59 @@ _repo=None,%0A + git_ref='refs/heads/master',%0A revisi @@ -2246,35 +2246,23 @@ ref= -'refs/heads/master' +git_ref ,%0A
b5c261349b168c4c45f10198506800258ca569cf
Add directory functions
deduplicated/__init__.py
deduplicated/__init__.py
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Eduardo Klosowski # License: MIT (see LICENSE for details) # from __future__ import unicode_literals from hashlib import sha1 import os # workaround for Python 2 try: from configparser import ConfigParser except ImportError: from ConfigParser import ConfigParser...
Python
0.000002
@@ -143,16 +143,38 @@ terals%0A%0A +from glob import glob%0A from has @@ -986,16 +986,649 @@ ectory%0A%0A +def directory_delete(hashcache):%0A for filename in glob(os.path.join(CACHE_DIR, hashcache + '.*')):%0A os.remove(filename)%0A%0A%0Adef directory_get(hashcache):%0A config = ConfigParser()%0A if...
a85cb3467180898c721792973bd31b14e1b96baa
use POST only.
task_manager/task_processor/views.py
task_manager/task_processor/views.py
from django.shortcuts import render from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.db.models import Q from models import ImageNeuralTask from time import strftime, localtime import logging l = logging.getLogger(__name__) def index(request): #l.error(__name_...
Python
0
@@ -677,13 +677,10 @@ est. -REQUE +PO ST.g
22bc63280e60e2bbe83d3ec3cb2feab53227160a
prepare for setuptools/pypi
seriously.py
seriously.py
#!/usr/bin/env python3 import sys if sys.version_info[0] != 3: print("You must use Python 3 to run this script!") exit() import argparse from ast import literal_eval import binascii import hashlib import random import re import readline import traceback import SeriouslyCommands from lib.cp437 import CP437 from...
Python
0
@@ -5805,33 +5805,18 @@ ))%0A%0A -if __name__ == '__ +def main -__' +() :%0A @@ -6505,13 +6505,54 @@ args.code)%0A -%0A + %0Aif __name__ == '__main__':%0A main()
6ac70cd71cec7bc0de87a2e7b0c1131ce5b0ff39
update House Get api
SmartHome/api/serializers.py
SmartHome/api/serializers.py
# use for our data representations # You can also use primary key and various other relationships, # but hyperlinking is good RESTful design. #from django.contrib.auth.models import User, Group from .models import House, Nodes, NodeState, CurrentState, IRcommend, TaskSchedule from rest_framework import serializers # ...
Python
0
@@ -478,16 +478,72 @@ gth=10)%0A +%09nodes = serializers.SerializerMethodField('node_list')%0A %09%0A%09class @@ -594,16 +594,25 @@ , 'Name' +, 'nodes' ) # fiel @@ -921,16 +921,116 @@ stance%0A%0A +%09def node_list(self, obj):%0A%09%09node_list = obj.nodes.all() %0A%09%09return %5Bstr(x.ID) for x in node_list%5D%0...
bff5e3725e81e9abd65280da51978a4a38ea5a3f
make bus and channel first-class citizens of the shellbot package
shellbot/__init__.py
shellbot/__init__.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 ...
Python
0
@@ -817,16 +817,91 @@ ellBot%0D%0A +from .bus import Bus, Subscriber, Publisher%0D%0Afrom .channel import Channel%0D%0A from .co @@ -1351,24 +1351,52 @@ ersion__',%0D%0A + 'Bus',%0D%0A 'Channel',%0D%0A 'Command @@ -1395,24 +1395,24 @@ 'Command',%0D%0A - 'Context @@ -1484,24 +1484,42 @@ Notifier',%0...
4ae307813fd7727901d7289585b2887760c057d7
add cflags -ggdb to jansson
deps/jansson/jansson.gyp
deps/jansson/jansson.gyp
{ 'conditions': [ ['TO == "ios"', { 'xcode_settings': { 'SDKROOT': 'iphoneos', }, # xcode_settings }], # TO == "ios" ], # conditions 'target_defaults': { 'conditions': [ ['TO == "ios"', { 'xcode_settings': { 'TARGETED_DEVICE_FAMILY': '1,2', 'COD...
Python
0.000003
@@ -1387,32 +1387,102 @@ DE'%0A %5D%0A + %7D, %7B%0A 'cflags': %5B%0A '-ggdb',%0A %5D%0A %7D%5D, #
b3f196341afde5d3213eee2698447a65c7275b49
Add LocalQueue class.
job_queue.py
job_queue.py
import subprocess import xml.etree.ElementTree as ET import time class GridEngineQueue: subq = {} def __init__(self, max_submit=8000): self.max_submit = max_submit def _update(self): xmlstr = subprocess.check_output(['qstat', '-xml']).decode('utf-8') root = ET.fromstring(...
Python
0
@@ -1,12 +1,41 @@ +import multiprocessing as mp%0A import subpr @@ -2919,86 +2919,1152 @@ def -submit(self, cmd_str):%0A pass%0A def wait(self, job_name=''):%0A pass +__init__(self, max_submit=None):%0A cpu_n = mp.cpu_count()%0A if max_submit == None or max_submit %3E cpu_n:%0A ...
374bd4881e00c2605f28ea816fa94468a76f2621
Add MultiplePublisher to handle topic name suffix
jps/utils.py
jps/utils.py
import json from .publisher import Publisher from .common import DEFAULT_PUB_PORT from .common import DEFAULT_HOST from .env import get_master_host class JsonMultiplePublisher(object): '''publish multiple topics by one json message Example: >>> p = JsonMultiplePublisher() >>> p.publish('{"topic1":...
Python
0
@@ -799,12 +799,406 @@ ublish(msg)%0A +%0A%0Aclass MultiplePublisher(object):%0A def __init__(self, base_topic_name):%0A self._publishers = %7B%7D%0A self._base_topic_name = base_topic_name%0A%0A def publish(self, msg, topic_suffix=''):%0A if topic_suffix not in self._publishers:%0A ...
2a401ba3340edb4432d3fc12697e01d3ed924c87
Validate gradeeditorid.
devilry/apps/gradeeditors/registry.py
devilry/apps/gradeeditors/registry.py
""" .. attribute:: gradeeditor_registry A :class:`Registry`-object. """ import json from django.conf import settings from django.core.exceptions import ValidationError class ConfigValidationError(ValidationError): """ Raised when :meth:`RegistryItem.validate_config` fails to validate the configstring...
Python
0
@@ -3140,22 +3140,18 @@ expected -editor +id ):%0A @@ -3502,24 +3502,162 @@ as keys.')%0A + if gradeeditor%5B'id'%5D != expectedid:%0A raise DraftValidationError('The gradeeditor id must be %22%7B0%7D%22'.format(expectedid))%0A retu
429fe80e8d00799de93a1121abe392c4d97b003b
Add credit for baumer for the original tag
template_utils/templatetags/feeds.py
template_utils/templatetags/feeds.py
""" Tags which can retrieve and parse RSS and Atom feeds, and return the results for use in templates. """ import datetime import feedparser from django import template from django.template.loader import render_to_string from template_utils.nodes import ContextUpdatingNode class FeedIncludeNode(template.Node): ...
Python
0
@@ -97,16 +97,149 @@ lates.%0A%0A +Based, in part, on the original idea by user baumer1122 and posted to%0Adjangosnippets at http://www.djangosnippets.org/snippets/311/%0A%0A %22%22%22%0A%0Aimp
24f449ad9c5ed738e767f21d1f137d784e2b2d2c
add register url mapping
simpleoncall/urls.py
simpleoncall/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin from simpleoncall import api urlpatterns = patterns( '', url(r'^$', 'simpleoncall.views.dashboard', name='dashboard'), url(r'^login', 'simpleoncall.views.login', name='login'), url(r'^logout', 'simpleoncall.views.logo...
Python
0.000001
@@ -265,24 +265,95 @@ e='login'),%0A + url(r'%5Eregister', 'simpleoncall.views.register', name='register'),%0A url(r'%5El
17cea2e1d22e29fa073133044afbcab571bc1c58
Add version number to init
AdaptivePELE/__init__.py
AdaptivePELE/__init__.py
Python
0.000001
@@ -1 +1,22 @@ +__version__ = %221.4.2%22 %0A
967f1b7d5a3eff3ab8c88a8b0c866546ebbf8652
Update docstring formatting (numpydoc)
microdrop/gui/channel_sweep.py
microdrop/gui/channel_sweep.py
from flatland import Form, Float from flatland.validation import ValueAtLeast from pygtkhelpers.ui.form_view_dialog import create_form_view from pygtkhelpers.ui.views.select import ListSelect import gtk import pandas as pd import pygtkhelpers.ui.extra_widgets # Include widget for `Float` form fields def get_channel_...
Python
0
@@ -526,11 +526,17 @@ -Arg +Parameter s%0A @@ -537,30 +537,31 @@ ers%0A ---- -%0A%0A +------%0A voltage @@ -560,23 +560,29 @@ voltage -(int) : +: int%0A Default @@ -605,20 +605,16 @@ ge.%0A - frequenc @@ -619,15 +619,21 @@ ncy -(int) : +: int%0A Def @@ -662,20 +662...
27f6d9de9cb0ed64637f76c1af2b7ce17b938db7
Update forticare template path
api_client/templates/forticare.py
api_client/templates/forticare.py
# Copyright (c) 2017 Fortinet, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
Python
0
@@ -978,37 +978,27 @@ Registration -MR2017Q3_base +Dev /Main.aspx?f @@ -1083,21 +1083,11 @@ tion -MR2017Q3_base +Dev /Mai @@ -1498,10 +1498,11 @@ obal -Q3 +Dev /For @@ -2679,34 +2679,35 @@ %22: %22/FortiGlobal -Q1 +Dev /FortiAuthServic @@ -3482,10 +3482,11 @@ obal -Q1 +Dev /For
454a11008abab4c752d3d5b14f7450c4c2b3f82f
Add default CACHE_PREFIX and CACHE_TIMEOUT settings to dev_settings.
dev_settings.py
dev_settings.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
@@ -2233,16 +2233,71 @@ unning%0A%0A +CACHE_PREFIX = 'unisubsdevsettings'%0ACACHE_TIMEOUT = 0%0A%0A COMPRESS
4307f9972bd02b0df2f52ed4d9b8c34a776de301
Add XML support for test_create_server.py
tempest/tests/compute/test_create_server.py
tempest/tests/compute/test_create_server.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack, LLC # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
Python
0.000001
@@ -922,21 +922,16 @@ pute -.base import Base @@ -926,31 +926,20 @@ import -B +b ase -ComputeTest %0A%0A%0Aclass @@ -955,22 +955,13 @@ est( -BaseComputeTes +objec t):%0A @@ -1024,29 +1024,30 @@ n_ssh%0A%0A @ -class +static method%0A d @@ -1070,53 +1070,8 @@ s):%0A - super(ServersTest, cls).s...
2efc5444d23bed7d203d02d1a5f93f247f0b00a2
use threading so that solution does not block
sfepy_gui.py
sfepy_gui.py
#!/usr/bin/env python import sys import os import numpy as np from enthought.traits.api import HasTraits, Range, Instance, File, Str,\ Directory, Button, on_trait_change from enthought.traits.ui.api import View, Item, Group, TextEditor, \ FileEditor, DirectoryEditor from enthought.tvtk.pyface.scene_editor...
Python
0.000001
@@ -36,16 +36,68 @@ port os%0A +from threading import Thread%0Afrom time import sleep%0A import n @@ -381,24 +381,109 @@ SceneEditor%0A +from enthought.pyface.gui import GUI%0Afrom enthought.pyface.timer.api import do_later%0A from enthoug @@ -780,16 +780,346 @@ Viewer%0A%0A +def assign_solution_to_gui(gui, sol):%...
3e26bede0b9f2319e6f69367ed84be575112022b
Fix typo in previous commit.
gfxprim_config.py
gfxprim_config.py
# # gfxprim_config.py - module configuring GfxPrim code generation and # known PixelTypes # # # 2011 - Tomas Gavenciak <gavento@ucw.cz> # 2011 - Cyril Hrubis <metan@ucw.cz> # # This file is sourced by all the generating scripts. # Moreover, the generated files are sourced by almost all Gfxprim s...
Python
0
@@ -1984,16 +1984,17 @@ me='xRGB +1 4666', p
cadae5454859af11ba0a2793750265a4a1f9e38a
change hakbeon to bunryu which can be more generally used
model/user.py
model/user.py
from datetime import datetime from sqlalchemy import Boolean, Column, DateTime, Integer, String, Text from sqlalchemy.orm import relationship from model.base import Base from helper.pbkdf2 import pbkdf2, pbkdf2_check class User(Base): __tablename__ = "user" uid = Column(Integer(), primary_key=True) user...
Python
0.000001
@@ -729,23 +729,22 @@ %0A pd_ -hakbeon +bunryu = Colum @@ -990,23 +990,22 @@ one, pd_ -hakbeon +bunryu , pd_bio @@ -1276,28 +1276,26 @@ .pd_ -hakbeon = pd_hakbeon +bunryu = pd_bunryu %0A
291cf78839bc9f1ad51f5a3d348d5bded4611ef4
bad index
module/module.py
module/module.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2014: # Gabes Jean, naparuba@gmail.com """ This is a broker and webui module to save host/service snapshots data into a mongodb database """ import time import uuid try: import pymongo from pymongo.connection import Connection except ImportError...
Python
0.999207
@@ -2453,17 +2453,17 @@ st_name' -: +, pymongo. @@ -2491,17 +2491,17 @@ ot_time' -: +, pymongo.
38791bf66166b194c6f90c140589e11c9d614673
test c-model
transiNXOR_modeling/transixor_predictor.py
transiNXOR_modeling/transixor_predictor.py
import sys sys.path.append('../') import numpy as np from itertools import product from pinn_api import predict_ids_grads, predict_ids import matplotlib.pyplot as plt import glob ## ------------ True data --------------- ids_file = glob.glob('./transiXOR_data/current_D9.npy') # ids_file = glob.glob('./transiXOR_data...
Python
0.000005
@@ -446,16 +446,18 @@ -------%0A +# vds = np @@ -482,16 +482,18 @@ 3, 101)%0A +# vbg = np @@ -515,16 +515,18 @@ 0.1, 1)%0A +# vtg = np @@ -548,18 +548,16 @@ 0.2, 1)%0A -# vds = np @@ -579,18 +579,16 @@ 0.2, 1)%0A -# vbg = np @@ -602,34 +602,32 @@ ce(0.1, 0.1, 1)%0A -# vtg = np.linspac @@ -639,17 +639,...
8fcb9e425d914c6a2ca6ff61afe180eb8da5cbd2
add back in apps
snaas/settings.py
snaas/settings.py
import os import excavator import dj_database_url import django_cache_url # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/dev/howto/depl...
Python
0.000001
@@ -777,25 +777,88 @@ contrib. -staticfil +contenttypes',%0A 'django.contrib.staticfiles',%0A 'django.contrib.sit es',%0A
48dc53c5c92a49fca959a962434bee6c2810a0c8
Add missing license to pip package
tensorboard_plugin_wit/pip_package/setup.py
tensorboard_plugin_wit/pip_package/setup.py
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -980,16 +980,42 @@ ages(),%0A + license='Apache 2.0',%0A pack
fb53a328b4de86c1ec5f741f4a206037981f8428
generalize for butterflies
direct/src/interval/ActorInterval.py
direct/src/interval/ActorInterval.py
"""ActorInterval module: contains the ActorInterval class""" from PandaModules import * import Interval import math import LerpBlendHelpers class ActorInterval(Interval.Interval): # create ActorInterval DirectNotify category notify = directNotify.newCategory('ActorInterval') # Name counter animNum =...
Python
0.999999
@@ -6351,16 +6351,55 @@ anims.%0A + if self.startAnim != None:%0A @@ -6435,20 +6435,65 @@ elf. -end +start Anim, + 1.0 - w)%0A + if self.endAnim != None:%0A @@ -6529,32 +6529,24 @@ ct(self. -startAnim, 1.0 - +endAnim, w)%0A%0A%0A
7d2623b3910a74aeccc715c1c2125d0d637675fb
Add todo
models_ida.py
models_ida.py
import json import pida_fields from sqlalchemy import Column, INTEGER, TEXT, BLOB from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class IdaRawName(Base): __tablename__ = 'ida_raw_names' id = Column('id', INTEGER, primary_key=True) name = Column('name', TEXT) address ...
Python
0.000002
@@ -2972,32 +2972,47 @@ ord%0A %22%22%22%0A + # TODO%0A # return @@ -3234,32 +3234,47 @@ %5B%5D)%0A %22%22%22%0A + # TODO%0A # return @@ -3727,32 +3727,47 @@ ord%0A %22%22%22%0A + # TODO%0A # return
00092b1a6af866fb74c04923be627d8b0b44e630
fix ver
modules/admin.py
modules/admin.py
#!/usr/bin/env python # ============================================================================= # file = opme.py # description = gbot module # author = GR <https://github.com/shortdudey123> # create_date = 2014-07-12 # mod_date = 2014-07-12 # version = 0.1 # usage = loaded by gbot # notes = # python_ver = 2.7.6 #...
Python
0.000002
@@ -445,18 +445,16 @@ on = 0.1 -.1 %0Ahelp =
eecded05bdd04cafe93793efdc97742b58903e83
Fix broken imports in ParticleTest
direct/src/particles/ParticleTest.py
direct/src/particles/ParticleTest.py
if __name__ == "__main__": from direct.directbase.TestStart import * from pandac.LinearVectorForce import LinearVectorForce from pandac.Vec3 import Vec3 import ParticleEffect from direct.tkpanels import ParticlePanel import Particles import ForceGroup # Showbase base.enabl...
Python
0.000005
@@ -90,27 +90,18 @@ anda -c.LinearVectorForce +3d.physics imp @@ -140,14 +140,15 @@ anda -c.Vec3 +3d.core imp
198824caf096becbb14454d8969c4c8616c521ae
bump version
smartmin/__init__.py
smartmin/__init__.py
from __future__ import unicode_literals __version__ = '2.2.2'
Python
0
@@ -53,11 +53,11 @@ = '2.2. -2 +3 '%0A
254e3a8c22bea72a0f7f24f0455460e1dc5e5383
Rename Loader._do_interpolation to _interpolate
local_settings/loader.py
local_settings/loader.py
import os import re from collections import Mapping, OrderedDict, Sequence from six import string_types from .base import Base from .exc import SettingsFileNotFoundError from .types import LocalSetting from .util import NO_DEFAULT as PLACEHOLDER class Loader(Base): def __init__(self, file_name=None, section=No...
Python
0.000001
@@ -3387,27 +3387,24 @@ self._ -do_ interpolatio @@ -3401,19 +3401,17 @@ terpolat -ion +e (setting @@ -3456,19 +3456,16 @@ def -_do _interpo @@ -3467,19 +3467,17 @@ terpolat -ion +e (self, v @@ -3652,27 +3652,24 @@ %5Bk%5D = self._ -do_ interpolatio @@ -3666,19 +3666,17 @@ terpolat -ion +e (v%5Bk...
ecf389d3e802e747479132b12cd2a638c55f7e85
add some combinations of countries
scripts/postal/build_all_country_db.py
scripts/postal/build_all_country_db.py
#!/usr/bin/env python import argparse, os, collections parser = argparse.ArgumentParser(description=''' This script generates a country specific databases for use with libpostal routines. Its a driver that runs build_country_db.sh for every country found in the countries_languages.txt . The driver will generate data...
Python
0.999999
@@ -1069,16 +1069,76 @@ )%5B0%5D )%0A%0A +# add combinations to cover special cases in PBF downloads%0A%0A # add Ir @@ -1228,16 +1228,207 @@ b-ie%22)%0A%0A +countries.append(%22ht-do%22)%0Acountries.append(%22sn-gm%22)%0A%0A# gcc states%0Acountries.append(%22bh-kw-om-qa-sa-ae%22)%0A%0Acountries.append(%22il-ps%22)%0...
7e19647a7c0f3072f982f0501f6f4e8ff7de3fd3
Add a missing space in a print of initialize_virtualenv.py (#27793)
scripts/tools/initialize_virtualenv.py
scripts/tools/initialize_virtualenv.py
#!/usr/bin/env python3 # 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 # "...
Python
0.000205
@@ -5330,16 +5330,17 @@ openssl + %22%0A
c1470a058f21bf98d83b9dc345c61626b87035cc
Increase initial RPC timeout to 60 seconds
test/functional/test_framework/test_node.py
test/functional/test_framework/test_node.py
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Class for bitcoind node under test""" import errno import http.client import logging import os import subpr...
Python
0
@@ -2652,25 +2652,24 @@ ect.%22%22%22%0A -%0A # Wait f @@ -2660,16 +2660,31 @@ +timeout_s = 60 # Wait f @@ -2692,17 +2692,17 @@ r up to -1 +6 0 second @@ -2745,25 +2745,108 @@ -for _ in range(40 +poll_per_s = 4 # Poll at a rate of four times per second%0A for _ in range(timeout_s...
6a7e2db1d7e2220004d37f4f4531e75672f9a2b3
Fix issue #14 dont parse path twice
modules/files.py
modules/files.py
#!/usr/bin/python import os, sys, commands, string from options import SIXMOZ_options from logger import SIXMOZ_logger from rules import SIXMOZ_rules class SIXMOZ_files(): def __init__(self): #besoin d'ajouter check si files est vide ou [''] pass @staticmethod def get_files(): re...
Python
0
@@ -894,16 +894,43 @@ folder + + %22 -type f -readable %5C( %22 + SIXMOZ_ @@ -960,16 +960,131 @@ ons') + +%0A %22 %5C) -and -not -path %5C%22%22 + SIXMOZ_options.path + %22*%5C %22 %7C sort @@ -1326,16 +1326,40 @@ s.path + + %22 -type f -readable %22 +...
4b081f7a0e3f4c2069e2da77b584c37fa6d0705f
add listener for searching playlists
voiceControl.py
voiceControl.py
from utils.voiceParser import * COMMANDS = [ { 'aliases': ['please set', 'pls set', 'please','pls', 'go','set'], 'script': 'python3.6 kodiCrud.py', 'hasArgs': True }, { 'aliases': ['music','play music'], 'script': 'python3.6 playYtPlaylist.py' }, { 'a...
Python
0
@@ -295,32 +295,299 @@ y'%0A %7D,%0A %7B%0A + 'aliases': %5B'play playlist', 'search playlist'%5D,%0A 'script': 'python3.6 playYtSearchPlaylist.py',%0A 'hasArgs': True%0A %7D,%0A%0A%0A %7B%0A 'aliases': %5B'play'%5D,%0A 'script': 'python3.6 playYtSearch.py 10',%0A ...
21291e6c65cb1ab4958ee0574e68160724157277
Add support for easy_install's 'index-url' command line argument to virtual environment bootstrap creation task.
paver/virtual.py
paver/virtual.py
"""Tasks for managing virtualenv environments.""" from paver.easy import task, options, dry, debug from paver.release import setup_meta try: import virtualenv as venv except ImportError: has_virtualenv = False else: has_virtualenv = True _easy_install_tmpl = ( " subprocess.call([join(%s, 'easy_inst...
Python
0
@@ -563,32 +563,48 @@ + index_url=None, find_links=None @@ -674,16 +674,98 @@ ns = %5B%5D%0A + if index_url:%0A easy_install_options.extend(%5B'--index-url', index_url%5D)%0A if f @@ -3814,24 +3814,79 @@ s to False)%0A + index_url%0A base URL of Python Package Index%0A ...
af822a557355434ea900eb0742d5429c0f2c9d30
Add session to function
scripts/write_antenna_location_file.py
scripts/write_antenna_location_file.py
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2016 the HERA Collaboration # Licensed under the 2-clause BSD license. """ Script to write out antenna locations for use in cal files. """ import pandas as pd from hera_mc import mc, geo_handling, cm_handling import datetime parser = mc.get_mc_a...
Python
0
@@ -740,16 +740,23 @@ andling( +session )%0Acm_ver
dd06396803df422bc50320a8a7f8b3d53557e060
deal with cases mod.__file__ is not accessible
ryu/utils.py
ryu/utils.py
# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp> # # 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://...
Python
0
@@ -1561,24 +1561,37 @@ same(a, b):%0A + try:%0A if os.pa @@ -1609,32 +1609,36 @@ (a, b):%0A + + return True%0A @@ -1629,24 +1629,121 @@ return True%0A + except OSError:%0A # m.__file__ is not always accessible. eg. egg%0A return False%0A if chop_ @@ -1975,16 +1975...
e12580f1749493dbe05f474d2fecdec4eaba73c5
bump version
tensornetwork/version.py
tensornetwork/version.py
# Copyright 2019 The TensorNetwork Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
Python
0
@@ -610,7 +610,7 @@ 0.4. -5 +6 '%0A
fcf8d941386913e9ec7bdf9403f5a8ed61fef3e7
support for proper inheritance of adaptor backed saga classes
saga/base.py
saga/base.py
__author__ = "Andre Merzky, Ole Weidner" __copyright__ = "Copyright 2012-2013, The SAGA Project" __license__ = "MIT" import sys import string import inspect import radical.utils.signatures as rus import radical.utils.logger as rul import saga.engine.engine import saga.adaptors.base as sab # -...
Python
0
@@ -916,29 +916,48 @@ +if not hasattr ( self -. +, ' _apitype = sel @@ -948,18 +948,46 @@ _apitype - +') :%0A self._apitype = self. @@ -1002,16 +1002,17 @@ type ()%0A +%0A
130af66197095a188ff01906fd1323f107d72246
Fix nomination form
voting/views.py
voting/views.py
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django.http import Http404, HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from .models import Position, Nomina...
Python
0.000004
@@ -1218,90 +1218,8 @@ e()%0A - context = %7B'form': form,%0A 'position': position%7D%0A @@ -1357,20 +1357,16 @@ nForm()%0A - cont @@ -1401,20 +1401,16 @@ - 'positio @@ -1423,17 +1423,16 @@ sition%7D%0A -%0A retu
8513cf85b3bf8ff1b58e54c73718a41ef6524a4c
Version 1.8
logging_tree/__init__.py
logging_tree/__init__.py
"""Introspection for the ``logging`` logger tree in the Standard Library. You can install this package with the standard ``pip`` command:: $ pip install logging_tree While you can write programs that call this package's ``tree()`` function and examine the hierarchy of logger objects that it finds inside of the S...
Python
0
@@ -2716,16 +2716,153 @@ ------%0A%0A +**Version 1.8** - 2018 August 5%0A Improve the output to better explain what happens if a %22parent%22%0A attribute has been set to None.%0A%0A **Versio @@ -4340,17 +4340,17 @@ __ = '1. -7 +8 '%0A__all_
6e12a1dfbb31fd27436ed66e630ebdc29482757b
use SECURE_SSL to redirect http://* to https://www
codesy/settings.py
codesy/settings.py
""" Django settings for codesy project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ import os import dj_database_url from decouple import config # Build path...
Python
0
@@ -1502,24 +1502,77 @@ CLASSES = (%0A + 'django.middleware.security.SecurityMiddleware',%0A 'django. @@ -3594,16 +3594,139 @@ 'https') +%0ASECURE_SSL_HOST = config('DJANGO_SECURE_SSL_HOST', None)%0ASECURE_SSL_REDIRECT = config('DJANGO_SECURE_SSL_REDIRECT', False) %0A%0A# Allo
42e79803b9298c87cb1c010c3ab47230275d425b
Save the minimal subcube
17B-162/HI/imaging/feather_cubes.py
17B-162/HI/imaging/feather_cubes.py
''' Create feathered VLA cubes with the 3 different SD datasets. ''' from spectral_cube import SpectralCube import os from os.path import join as osjoin from astropy import log import scipy.ndimage as nd import numpy as np from cube_analysis.feather_cubes import feather_cube from paths import (seventeenB_HI_data_02...
Python
0.026433
@@ -3619,28 +3619,199 @@ chunk=chunk, verbose=False)%0A +%0A # Now resave a minimal version of the feathered cube%0A cube = SpectralCube.read(save_name)%0A cube.minimal_subcube().write(save_name, overwrite=True)%0A del cube%0A
49591db698256d65ce8a2072e420640ec540542d
Remove deubg line
sentry/plugins/sentry_mail/__init__.py
sentry/plugins/sentry_mail/__init__.py
""" sentry.plugins.sentry_mail ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from django import forms from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string...
Python
0.000003
@@ -3536,36 +3536,16 @@ event):%0A - return True%0A
4c3bfb7c41199bcf76ff4c40ab68c7b9f44fe910
validate slug
waliki/forms.py
waliki/forms.py
from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Page from ._markups import get_all_markups from .settings import WALIKI_CODEMIRROR_SETTINGS as CM_SETTINGS from .acl import check_perms class DeleteForm(forms.Form): what = forms.ChoiceField(label=_('What do you w...
Python
0.999496
@@ -200,16 +200,26 @@ SETTINGS +, get_slug %0Afrom .a @@ -1382,24 +1382,126 @@ be empty%22))%0A + if get_slug(slug) != slug:%0A raise forms.ValidationError(_(%22The slug isn't valid%22))%0A if n @@ -1777,32 +1777,35 @@ th this slug%22))%0A +%0A%0A%0A return s
3229ae048b623833925f6c5db4fe6016940dcc06
fix path to db
tworavensproject/settings/dev_container.py
tworavensproject/settings/dev_container.py
from __future__ import absolute_import import json import sys from os import makedirs from os.path import join, normpath, isdir, isfile from .base import * DEBUG = True # False - will be False ROOT_URLCONF = 'tworavensproject.urls_prod' APACHE_WEB_DIRECTORY = '/var/www/html' SECRET_KEY = 'ye-dev-container-secret-k...
Python
0.000004
@@ -345,19 +345,10 @@ oin( -BASE_DIR, ' +/ srv'
e6655d2682d104730607f5ed57cf9623ad7bf5e9
Remove debug prints
mra_module.py
mra_module.py
import sys import traceback import os import subprocess import base64 import pysb.export from jnius import autoclass, cast from TripsModule import trips_module from pysb.tools import render_reactions from pysb import Parameter from mra import MRA KQMLPerformative = autoclass('TRIPS.KQML.KQMLPerformative') KQMLList = a...
Python
0.000001
@@ -2158,28 +2158,8 @@ cr)%0A - print descr%0A @@ -4260,73 +4260,8 @@ id)%0A - print model.rules%0A print model.initial_conditions%0A @@ -4464,16 +4464,17 @@ +# tracebac
e57beade0052e9b7b1eb367bb0a4f784fab87e3e
update contact.py
fixture/contact.py
fixture/contact.py
class ContactHelper: def __init__(self, app): self.app = app def create(self, contact): self.add_new_contact_form() self.fill_out_form(contact) def fill_out_form(self, contact): wd = self.app.wd # name section wd.find_element_by_name("firstname").click() ...
Python
0
@@ -91,32 +91,57 @@ self, contact):%0A + wd = self.app.wd%0A self.add @@ -195,16 +195,126 @@ contact) +%0A # submit confirmation%0A wd.find_element_by_xpath(%22//div%5B@id='content'%5D/form/input%5B21%5D%22).click() %0A%0A de @@ -4979,118 +4979,8 @@ tes) -%0A # submit confirm...
e7bdf1b8a74e72b120021428778c6ba2ef92941f
modeify post
zifeiyu/frontend/views.py
zifeiyu/frontend/views.py
#!/usr/bin/env python # -*- coding:utf-8 -*- """ zifeiyu.frontend.views ~~~~~~~~~~~~~~~~~~~~ The module provides the views for entry :copyright: (c) 2016 by zifeiyu. :license: MIT, see LICENSE for more details. """ from zifeiyu.models import Post, Column, Archive, Tag, Message, MessageRelpy, Weibo...
Python
0.999429
@@ -2361,16 +2361,46 @@ t.query. +filter_by(status='PUBLISHED'). paginate @@ -2421,32 +2421,32 @@ ER_PAGE, False)%0A - return rende @@ -2664,16 +2664,36 @@ olumn_id +, status='PUBLISHED' ).pagina @@ -2988,16 +2988,36 @@ chive_id +, status='PUBLISHED' ).pagina @@ -3228,32 +3228,32 @@ tag_id,page=1):%0A - ...
5200e1d18efa2c71993f69a7d10e605b4af01430
add file type
main/models/meta_data.py
main/models/meta_data.py
from django.db import models from odk_logger.models import XForm import os def upload_to(instance, filename): return os.path.join( instance.xform.user.username, 'docs', filename ) def unique_type_for_form(xform, data_type, data_value=None): result = type_for_form(xform, data_ty...
Python
0.000002
@@ -896,16 +896,81 @@ ll=True) +%0A data_file_type = models.CharField(max_length=255, null=True) %0A%0A @s @@ -1721,16 +1721,75 @@ ata_file +,%0A data_file_type=data_file.content_type )%0A
f780a386ec5b386b40312cbf54e16347b9324fb9
print used config files
flashget/config.py
flashget/config.py
# -*- coding: utf-8 -*- try: import ConfigParser as configparser except ImportError: import configparser import os from .helper import open import tempfile from appdirs import AppDirs dirs = AppDirs("flashget", "balrok") config = {} # TODO implement a checking method which looks if all required configs are ...
Python
0.000001
@@ -158,16 +158,66 @@ mpfile%0A%0A +import logging%0Alog = logging.getLogger(__name__)%0A%0A from app @@ -4720,220 +4720,8 @@ ()%0A%0A - # todo make this more generic (based on getConfigLocations:%0A if not os.path.exists(os.path.expanduser(os.path.join('~', '.flashget'))):%0A os.mkdir(os.path.expanduse...
6b9b851d3c9b77e0a383a7c67a610337d58ec8ce
Add manage command
flask_dynstatic.py
flask_dynstatic.py
from flask import current_app from functools import wraps import os class DynStatic(object): views = [] def __init__(self, app=None): self.app = app @staticmethod def construct_html(): for view in DynStatic.views: with open(os.path.join(current_app.config['DYNSTATIC_ROOT'...
Python
0.000005
@@ -51,16 +51,53 @@ t wraps%0A +from flask.ext.script import Command%0A import o @@ -424,16 +424,75 @@ ew%5B1%5D()) +%0A print('%7B0%7D done%5Cn'.format(html_file.name)) %0A%0A @s @@ -803,16 +803,16 @@ wrapper%0A - @@ -828,8 +828,133 @@ corator%0A +%0A%0Aclass GetStatic(Command):%0A ...
d6e6009b4e81f68ef45b1d78344980a5d957ca2c
Improve the documentation of the config module.
marconi/common/config.py
marconi/common/config.py
# Copyright (c) 2013 Rackspace, 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 agreed to in wr...
Python
0.000001
@@ -816,16 +816,25 @@ options( +%0A foo=(%22ba @@ -846,16 +846,24 @@ usage%22), +%0A ...)%0A%0A, @@ -987,16 +987,33 @@ ons( -port=80, +%0A port=80,%0A ... @@ -1322,16 +1322,627 @@ option. +%0A%0AConfigurations can be read from an INI file, where the global options%0Aare under the ...
9ac171412de1d85bb37f33cafe1a14c0ceb811ed
version 2.4.5, adding autocommit to transactions
mysql_exec.py
mysql_exec.py
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- import struct import io import pymysql from ansible.module_utils.basic import AnsibleModule """ Pure python implementation of mysql utility as ansible module (and standalone script for python>2.7) This code uses pymysql 3d party library This module permit free query exec...
Python
0
@@ -932,32 +932,34 @@ +re s%5Bline%5D = 0%0A @@ -1232,16 +1232,18 @@ +re s%5Bline%5D
6725c540a6efeaac2e231204b50043bd38d547e0
Migrate _CommandMechanicalJobControl to FemCommands
src/Mod/Fem/_CommandMechanicalJobControl.py
src/Mod/Fem/_CommandMechanicalJobControl.py
#*************************************************************************** #* * #* Copyright (c) 2013-2015 - Juergen Riegel <FreeCAD@juergen-riegel.net> * #* * #* This pr...
Python
0
@@ -1739,16 +1739,52 @@ FreeCAD +%0Afrom FemCommands import FemCommands %0A%0Aif Fre @@ -1901,16 +1901,29 @@ bControl +(FemCommands) :%0A %22t @@ -1972,42 +1972,109 @@ def -GetResources(self):%0A return +__init__(self):%0A super(_CommandMechanicalJobControl, self).__init__()%0A self.resou...
937a5e32c77ca57917d60a891616fbcf19ab19f9
Fix a bug that caused HTTP Accept headers with whitespace to be parsed incorrectly
respite/utils.py
respite/utils.py
from django import forms def generate_form(model): """ Generate a form from a model. Arguments: model -- A Django model. """ _model = model class Form(forms.ModelForm): class Meta: model = _model return Form def parse_http_accept_header(header): """ Return ...
Python
0.000003
@@ -508,16 +508,42 @@ onents = + %5Bitem.strip() for item in header. @@ -552,16 +552,17 @@ lit(',') +%5D %0A%0A l @@ -655,16 +655,42 @@ onents = + %5Bitem.strip() for item in compone @@ -702,16 +702,17 @@ lit(';') +%5D %0A
4c4c32e9a627fcbca8527aa38b5ea41457e96683
Fix errant import
editorsnotes/api/tests/serializers.py
editorsnotes/api/tests/serializers.py
import json from rest_framework import serializers from rest_framework.renderers import JSONRenderer from django.test.client import RequestFactory from editorsnotes.auth.models import Project from .views import ClearContentTypesTransactionTestCase from ..serializers.base import EmbeddedItemsMixin from ..serializers...
Python
0.000008
@@ -268,12 +268,14 @@ ers. -base +mixins imp
3a479db126d081532e76a5a4018bcfb6ad11f5e9
Fix hook param name in nonpython example (#9373)
doc/en/example/nonpython/conftest.py
doc/en/example/nonpython/conftest.py
# content of conftest.py import pytest def pytest_collect_file(parent, fspath): if fspath.suffix == ".yaml" and fspath.name.startswith("test"): return YamlFile.from_parent(parent, path=fspath) class YamlFile(pytest.File): def collect(self): # We need a yaml parser, e.g. PyYAML. impor...
Python
0
@@ -67,17 +67,20 @@ arent, f -s +ile_ path):%0A @@ -86,17 +86,20 @@ if f -s +ile_ path.suf @@ -118,17 +118,20 @@ l%22 and f -s +ile_ path.nam @@ -202,17 +202,20 @@ , path=f -s +ile_ path)%0A%0A%0A
79824ea824796ae0dcfedd4a466eb2ded851fee8
Implement user validation
src/pushover_complete/pushover_api.py
src/pushover_complete/pushover_api.py
from urllib.parse import urljoin import requests from .error import PushoverCompleteError PUSHOVER_API_URL = 'https://api.pushover.net/1/' class PushoverAPI(object): def __init__(self, token): self.token = token def _send_message(self, user, message, device=None, title=None, url=None, url_title=No...
Python
0.000007
@@ -2433,8 +2433,317 @@ ounds')%0A +%0A def validate(self, user, device=None):%0A payload = %7B%0A 'token': self.token,%0A 'user': user,%0A 'device': device%0A %7D%0A resp = requests.post(%0A urljoin(PUSHOVER_API_URL, 'users/validate.json'),%0A ...
1d269506eab765a70bd7a59cd1806d86146ebabc
Fix outdated comment.
photo/idxitem.py
photo/idxitem.py
"""Provide the class IdxItem which represents an item in the index. """ import os.path import hashlib from photo.exif import Exif from photo.geo import GeoPosition def _checksum(fname, hashalg): """Calculate the md5 hash for a file. """ if not hashalg: return {} m = { h:hashlib.new(h) for h i...
Python
0.000001
@@ -212,20 +212,14 @@ ate -the md5 hash +es for
4a526c061dd3e171c587890bf945f9b235eaa638
bump version
medialibrary/__init__.py
medialibrary/__init__.py
"A pluggable django app for media management." __version__ = '1.4.7'
Python
0
@@ -64,7 +64,7 @@ 1.4. -7 +8 '%0A
d21ff98f92180497d1175b72bbf4343823c16732
Update Bob.py
forest/bobs/Bob.py
forest/bobs/Bob.py
""" Copyright (c) 2017 Eric Shook. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. @author: eshook (Eric Shook, eshook@gmail.edu) @contributors: <Contribute and add your name here!> """ # TODO: Replace individual variables with numpy arrays # ...
Python
0
@@ -427,16 +427,216 @@ speedup. +%0A# This would align with other projects that use arrays to process x,y,z using vectorization%0A# In particular, I think this could be helpful for using Bobs for indexing (e.g., r-tree, etc.) %0A%0A# Just @@ -674,16 +674,33 @@ folks a +Spatial-Temporal Bounding
5163441aece292da59c6f0d2cb7874a2ce5921ed
test suite passes more
test/suite_adapters/test_wasm_spec_suite.py
test/suite_adapters/test_wasm_spec_suite.py
""" Run the tests as can be found here https://github.com/WebAssembly/spec/tree/master/test The directory structure of this spec is as follows: - test - core - address.wast -> test snippet in wasm text format with additional test info To use these tests, clone https://github.com/WebAssembly/spec and se...
Python
0
@@ -2260,24 +2260,548 @@ odule(data)%0A + %0A # Go back%0A data2 = m1.to_bytes()%0A %0A # Wont always be the same, e.g. some tests use non-minimal LEB ints%0A # assert data == data2...
9f7ecf5b575625cf5d18687d12b79b2e21d59fb0
Increase coverage
test/test_uploader/test_generic_uploader.py
test/test_uploader/test_generic_uploader.py
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2014 SF Isle of Man Limited # # PyBossa 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...
Python
0
@@ -2286,16 +2286,397 @@ False, err_msg%0A +%0A @with_context%0A def test_get_filename_extension(self):%0A u = Uploader()%0A filename = %22image.png%22%0A err_msg = %22The extension should be PNG%22%0A assert u.get_filename_extension(filename) == 'png', err_msg%0A filename = %...
e3829703c8020214beba842340b5fe19f52088ed
give the test input
ScheduleAddData.py
ScheduleAddData.py
__author__ = 'chuqiao' from apscheduler.schedulers.blocking import BlockingScheduler import EventsPortal import sys import logging def logger(): """ Function that initialises logging system """ global logger # create logger with 'syncsolr' logger = logging.getLogger('scheduleAddData') ...
Python
0.999999
@@ -1698,32 +1698,34 @@ + # %22http://bioeven @@ -1805,34 +1805,32 @@ - # %22http://bioeven
718b7cdad91c22a5359c35a53a41a04caedb0017
create schedule add data to soar script
ScheduleAddData.py
ScheduleAddData.py
__author__ = 'chuqiao' from apscheduler.schedulers.blocking import BlockingScheduler import logging logging.basicConfig() import EventsPortal import sys def scheduleUpdateSolr(sourceUrl,patternUrl,solrUrl): """ """ # logger.info('***Starting update every hour***') sched = BlockingScheduler() ...
Python
0
@@ -84,45 +84,8 @@ ler%0A -import logging%0Alogging.basicConfig()%0A impo @@ -186,16 +186,17 @@ %22%22%22%0A +%0A # lo @@ -351,10 +351,9 @@ es= -60 +1 , ar
43582e2ce55e374622d68d3a9ef8b0ab2e66a5fb
Update prod config
voer/settings/prod.py
voer/settings/prod.py
''' Created on 16 Dec 2013 @author: huyvq ''' from base import * # FOR DEBUG DEBUG = True DEVELOPMENT = True TEMPLATE_DEBUG = DEBUG # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'voer_django', ...
Python
0.000001
@@ -423,16 +423,29 @@ %7D%0A%7D%0A%0A +#VPR Address%0A VPR_URL @@ -439,32 +439,39 @@ ress%0AVPR_URL = ' +http:// dev.voer.vn'%0AVPR @@ -469,107 +469,70 @@ r.vn -'%0AVPR_PORT = '2013'%0AVPR_VERSION = '1.0'%0AVPR +:2013/1.0/'%0A%0A#VPT Address%0AVPT _URL -_FULL = os.path.join(VPR_URL, VPR_PORT, VPR_VERSION) + =...
90284acf9490d239bf5ca9e82337b191022c48a0
build bump
voiceplay/__init__.py
voiceplay/__init__.py
#-*- coding: utf-8 -*- """ get version, etc """ __title__ = 'VoicePlay' __description__ = 'Client-side first music centered voice controlled player' __version__ = '0.2.3.0' __author__ = 'Bohdan Turkynewych' __author_email__ = 'tb0hdan@gmail.com' __license__ = 'UNLICENSE' __copyright__ = 'public domain' __website__ = ...
Python
0
@@ -165,17 +165,17 @@ '0.2.3. -0 +1 '%0A__auth
2c476f7fccaab131f78050a886be42c1792f119d
version bump
voiceplay/__init__.py
voiceplay/__init__.py
#-*- coding: utf-8 -*- """ get version, etc """ __title__ = 'VoicePlay' __description__ = 'Client-side first music centered voice controlled player' __version__ = '0.2.4.8' __author__ = 'Bohdan Turkynewych' __author_email__ = 'tb0hdan@gmail.com' __license__ = 'UNLICENSE' __copyright__ = 'public domain' __website__ = ...
Python
0.000001
@@ -165,17 +165,17 @@ '0.2.4. -8 +9 '%0A__auth
c75bf26e277ac25e72261a72718bb0f2663ac4b2
Fix 404 on protected page detail
app/grandchallenge/pages/views.py
app/grandchallenge/pages/views.py
from django.contrib import messages from django.contrib.auth.mixins import UserPassesTestMixin from django.db.models import Q from django.views.generic import ( CreateView, DeleteView, DetailView, ListView, UpdateView, ) from guardian.mixins import ( LoginRequiredMixin, PermissionRequiredMix...
Python
0
@@ -1930,16 +1930,89 @@ _iexact%22 +%0A raise_exception = True%0A login_url = reverse_lazy(%22account_login%22) %0A%0A de
615643365eac1592867d03834e094247d33467dc
Update common utilities.
reveal_user_annotation/common/config_package.py
reveal_user_annotation/common/config_package.py
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import os import inspect import multiprocessing import reveal_user_annotation from reveal_user_annotation.common.datarw import get_file_row_generator ###################################################################################################################...
Python
0
@@ -128,80 +128,8 @@ ion%0A -from reveal_user_annotation.common.datarw import get_file_row_generator%0A %0A%0A## @@ -502,390 +502,8 @@ )%0A%0A%0A -def get_data_path():%0A data_file_path = get_package_path() + %22/common/res/config_data_path.txt%22%0A file_row_gen = get_file_row_generator(data_file_path, %22=%2...