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
605bbb907b6769089ff1061def1a023847616727
Fix function name cases for jucybot tests
web/test_jucybot.py
web/test_jucybot.py
import github import jucybot import unittest import mock from django.test.utils import override_settings from django.test import TestCase class JucyBotTest(unittest.TestCase): def setUp(self): self.gh = mock.MagicMock() self.jb = jucybot.FromGithubClient(self.gh, login='testJucyBot') def test...
Python
0.000036
@@ -257,19 +257,21 @@ bot. -FromG +from_g ithub -C +_c lien @@ -506,25 +506,26 @@ lf.jb.format -I +_i ssue('This w @@ -895,25 +895,26 @@ lf.jb.create -I +_i ssue('Jucyio @@ -1418,33 +1418,34 @@ tTrue(self.jb.is -C +_c ollaboratorOnRep @@ -1431,35 +1431,37 @@ .is_collaborator -OnR +_on_r epo(repo))%0A @@...
be759ce3ae4843a6b14e6d9883f38c6175ec5691
Change regex to make it </path> inclusive
americangut/format.py
americangut/format.py
#!/usr/bin/env python __author__ = "Yoshiki Vazquez Baeza" __copyright__ = "Copyright 2013, The American Gut Project" __credits__ = ["Yoshiki Vazquez Baeza"] __license__ = "BSD" __version__ = "unversioned" __maintainer__ = "Yoshiki Vazquez Baeza" __email__ = "yoshiki.vazquezbaeza@colorado.edu" from re import compile,...
Python
0.000001
@@ -150,16 +150,39 @@ z Baeza%22 +, %22Adam Robbins-Pianka%22 %5D%0A__lice @@ -1221,16 +1221,77 @@ le_id)%0A%0A + # find the matches of the tags only within the same path%0A re = @@ -1316,16 +1316,22 @@ =%22%25s%22.*? +%3C/path %3E' %25 esc
565fa70731bd55ab10e2dc4d57d575967d6990a8
make internal_setup private
hephaestus/transports.py
hephaestus/transports.py
from __future__ import absolute_import, division, print_function, unicode_literals import os import sys import importlib import logging from .exceptions import * from .encoders import SQSMessageEncoder transportLogger = logging.getLogger('hephaestus.transport') class Transport(object): _type = None klass =...
Python
0.000001
@@ -410,16 +410,18 @@ def +__ internal @@ -863,16 +863,18 @@ self. +__ internal
c8331e67cb264f1c458028b4eb205d69711134a3
Handle case where _parse_message_id cannot find an address
ForgeMail/forgemail/lib/util.py
ForgeMail/forgemail/lib/util.py
import re import logging import smtplib import email.feedparser from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText from email import header import tg from paste.deploy.converters import asbool, asint from pylons import c from allura.lib.helpers import push_config, find_project from allu...
Python
0.000022
@@ -3850,24 +3850,37 @@ if addrs + and addrs%5B0%5D : return add
e9348d962c6a6a8beab054d278283ae8ef57154d
Use $HOME to generalize pickle file naming.
probability_filters/scripts/bounding_box_filter/project_ar_tag.py
probability_filters/scripts/bounding_box_filter/project_ar_tag.py
#!/usr/bin/env python import rospy import tf import cv2 from cv_bridge import CvBridge from sensor_msgs.msg import Image, CameraInfo from geometry_msgs.msg import PointStamped from image_geometry import PinholeCameraModel from ar_track_alvar.msg import AlvarMarkers import pickle # gonna need a pickle class ARTagCor...
Python
0
@@ -29,16 +29,26 @@ t rospy%0A +import os%0A import t @@ -385,10 +385,30 @@ e = +os.environ%5B'HOME'%5D + ' -~ /ar_
6303224fe1d61bf60908d80d9c93ca500dcf652e
add pool info
src/info/pool.py
src/info/pool.py
# coding: UTF-8 import libvirt from xml.dom import minidom from kvmconnect.base import BaseReadOnly class PoolInfo(BaseReadOnly): """ Show Storage Pool's information """ def __init__(self): super().__init__() # Show storage pool's information def get_pool_info_all(self): stora...
Python
0
@@ -1125,8 +1125,710 @@ _pool%7D%0A%0A + def get_pool_info(self, name):%0A pool = self.connection.storagePoolLookupByName(name)%0A info = pool.info()%0A pool_info = %7B%7D%0A %0A pool_info.update(%7B'name': pool.name()%7D)%0A pool_info.update(%7B'name': pool.UUIDString()%7D...
88e813d02ca370da6e7190050a526e0c535be771
Revert "Adding support for ISSO_CORS_ORIGIN env variable to allow defining wildcard CORS origins"
isso/wsgi.py
isso/wsgi.py
# -*- encoding: utf-8 -*- import socket from urllib.parse import quote, urlparse from socketserver import ThreadingMixIn from http.server import HTTPServer from werkzeug.serving import WSGIRequestHandler from werkzeug.wrappers import Request as _Request from werkzeug.datastructures import Headers def host(environ...
Python
0
@@ -1827,97 +1827,8 @@ on): -%0A if 'ISSO_CORS_ORIGIN' in environ:%0A return environ%5B'ISSO_CORS_ORIGIN'%5D %0A%0A
7d3a45afec5a02608e5ec198fcf9d4b0f6cbd437
Remove CSRF protection from tests
hyrodactil/hyrodactil/settings/test.py
hyrodactil/hyrodactil/settings/test.py
from base import * ########## TEST SETTINGS TEST_RUNNER = 'discover_runner.DiscoverRunner' TEST_DISCOVER_TOP_LEVEL = SITE_ROOT TEST_DISCOVER_ROOT = join(SITE_ROOT, "tests") # Default is test*.py TEST_DISCOVER_PATTERN = "*" ########## IN-MEMORY TEST DATABASE DATABASES = { "default": { "ENGINE": "django.db....
Python
0
@@ -218,16 +218,307 @@ = %22*%22%0A%0A +MIDDLEWARE_CLASSES = (%0A # Default Django middleware.%0A 'django.middleware.common.CommonMiddleware',%0A 'django.contrib.sessions.middleware.SessionMiddleware',%0A 'django.contrib.auth.middleware.AuthenticationMiddleware',%0A 'django.contrib.messages.middleware....
989fe7eb93317b4a77a377be93d7f63f721d7831
check for postgres port environmental variable
hera_mc/cm_gen_sqlite.py
hera_mc/cm_gen_sqlite.py
"""Methods to check and update the database files for sqlite.""" import json import os.path import re from . import cm_table_info, mc class SqliteHandling: """ Database csv table hash info handler. Attributes ---------- cm_csv_path : str or None Path containing the csv data files. If No...
Python
0
@@ -4018,36 +4018,214 @@ -subprocess.call(f%22pg_dump -s +if %22POSTGRES_PORT%22 in os.environ:%0A postgres_port = os.environ%5B%22POSTGRES_PORT%22%5D%0A else:%0A postgres_port = 5432%0A%0A subprocess.call(%0A f%22pg_dump -s -p %7Bpostgres_port%7D her @@ -4249,32 +...
84c5d376997f0db55ce1a458c3c1b5d5b0aa8442
fix bug in webserver
webserver.py
webserver.py
#!/usr/bin/env python from flask import Flask, request from gevent import monkey; monkey.patch_socket() from gevent.wsgi import WSGIServer import redis ps = redis.StrictRedis().pubsub() app = Flask(__name__) @app.route('/github', methods=['POST']) def github(): payload = request.POST['payload'] owner = payl...
Python
0.000001
@@ -281,20 +281,20 @@ request. -POST +form %5B'payloa @@ -652,16 +652,36 @@ message) +%0A%0A print(message) %0A %0A
e39f2243cd596da8558a7e83364d55a16c332f67
Fix setting access
corehq/sql_db/routers.py
corehq/sql_db/routers.py
from django.conf import settings from .config import PartitionConfig PROXY_APP = 'sql_proxy_accessors' FORM_PROCESSOR_APP = 'form_processor' SQL_ACCESSORS_APP = 'sql_accessors' ICDS_REPORTS_APP = 'icds_reports' class PartitionRouter(object): def db_for_read(self, model, **hints): return db_for_read_wri...
Python
0.000001
@@ -756,24 +756,73 @@ return +hasattr(settings, %22ICDS_UCR_DATABASE_ALIAS%22) and db == settin
4fbb9020bcd280f70f9905886cdf2ec3d581f1ed
Update loggers configuration
application.py
application.py
#!/usr/bin/env python import os from app import create_app from flask.ext.script import Manager, Server import watchtower import logging application = create_app( os.getenv('EQ_ENVIRONMENT') or 'development' ) application.debug = True manager = Manager(application) port = int(os.environ.get('PORT', 5000)) manage...
Python
0.000001
@@ -380,57 +380,157 @@ ))%0A%0A -logging.basicConfig(level=logging.INFO)%0Alogger = +cloud_watch_handler = watchtower.CloudWatchLogHandler()%0A%0Alogging.basicConfig(level=logging.INFO)%0Alogging.getLogger().addHandler(cloud_watch_handler)%0A logg @@ -556,15 +556,8 @@ e__) -%0Alogger .add @@ -568,41 +568,89 @@ le...
d11f95b356ef8f53d063c4196a84b1de38a8ea00
fix name of info.pool
src/info/pool.py
src/info/pool.py
# coding: UTF-8 import libvirt from xml.dom import minidom from kvmconnect.base import BaseReadOnly class PoolInfo(BaseReadOnly): """ Show Storage Pool's information """ def __init__(self): super().__init__() # Show storage pool's information def get_storage_info_all(self): st...
Python
0.000058
@@ -279,23 +279,20 @@ def get_ -storage +pool _info_al @@ -315,16 +315,21 @@ storage +_pool = %5B%5D%0A%0A @@ -1060,16 +1060,21 @@ storage +_pool .append( @@ -1099,17 +1099,27 @@ return + %7B%22pools%22: storage %0A @@ -1117,9 +1117,15 @@ storage +_pool%7D %0A
abbbc5eb7ea0c49868631af5ce5bb2502bae46ed
Change name of pandas letor converter
pyltr/data/pandas_converter.py
pyltr/data/pandas_converter.py
import pandas as pd class Pandas_Converter(object): ''' Class Converter implements parsing from original letor txt files to pandas data frame representation. ''' def __init__(self, path): ''' Arguments: path: path to letor txt file ''' self._path = path...
Python
0.000001
@@ -27,17 +27,21 @@ s Pandas -_ +Letor Converte
08aa5214a1b1a5fc6872de76b12cf97f5ceb03c9
Disable JHU kpoint generationt test.
pymatgen/ext/tests/test_jhu.py
pymatgen/ext/tests/test_jhu.py
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import unittest import requests from pymatgen.ext.jhu import get_kpoints from pymatgen.io.vasp.inputs import Incar from pymatgen.io.vasp.sets import MPRelaxSet from pymatgen.util.testing import PymatgenTest ...
Python
0
@@ -600,68 +600,54 @@ pIf( -not website_is_up, %22http://muellergroup.jhu.edu:8080 is down +True, %22This code is way too buggy to be tested .%22)%0A
d35b81de3590366c8c147680dff561461b6685ef
Document how to set the alias file location for alias state (#33380)
salt/states/alias.py
salt/states/alias.py
# -*- coding: utf-8 -*- ''' Configuration of email aliases The mail aliases file can be managed to contain definitions for specific email aliases: .. code-block:: yaml username: alias.present: - target: user@example.com .. code-block:: yaml thomas: alias.present: - target: thoma...
Python
0
@@ -327,16 +327,293 @@ ple.com%0A +%0AThe default alias file is set to %60%60/etc/aliases%60%60, as defined in Salt's%0A:mod:%60config execution module %3Csalt.modules.config%3E%60. To change the alias%0Afile from the default location, set the following in your minion config:%0A%0A.. code-block:: yaml%0A%0A aliases...
ae9121f885577b9f86db212fce599958854c9bc1
add test for monit state fix comments
salt/states/monit.py
salt/states/monit.py
# -*- coding: utf-8 -*- ''' Monit state =========== Manage monit states .. code-block:: yaml monit_enable_service_monitoring: monit.monitor: - name: service monit_disable_service_monitoring: monit.unmonitor: - name: service .. note:: Use of these states require that the :mod:`monit <salt.modules.mo...
Python
0
@@ -1033,32 +1033,33 @@ being monitored +. ').format(name)%0A @@ -1105,32 +1105,229 @@ else:%0A + if __opts__%5B'test'%5D:%0A ret%5B'comment'%5D = 'Service %7B0%7D is set to be monitored.'.format(name)%0A ret%5B'result'%5D = None%0A r...
adc6c7be69bcc34f7a9803e8629fdfc655606c68
Raise meaningful error on empty MSA.
pypeline/common/formats/msa.py
pypeline/common/formats/msa.py
#!/usr/bin/python # # Copyright (c) 2012 Mikkel Schubert <MSchubert@snm.ku.dk> # # 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 #...
Python
0.000004
@@ -1873,24 +1873,114 @@ cord.name)%0A%0A + if not records:%0A raise MSAError(%22MSA does not contain any sequences%22)%0A%0A inst
b26e65d7e5e35a669dc84e089b2ba0c22db4b69b
Fix Rituals Perfume Genie sensors icons (#53517)
homeassistant/components/rituals_perfume_genie/sensor.py
homeassistant/components/rituals_perfume_genie/sensor.py
"""Support for Rituals Perfume Genie sensors.""" from __future__ import annotations from pyrituals import Diffuser from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_SIGNAL_STRENGTH, PERCENTAGE, ) from homeassistant.core import HomeAss...
Python
0
@@ -1746,45 +1746,89 @@ - self._attr_icon = %22mdi:tag-remove +@property%0A def icon(self) -%3E str:%0A %22%22%22Return the perfume sensor icon.%22%22 %22%0A @@ -1828,32 +1828,38 @@ .%22%22%22%0A if +self._ diffuser.has_car @@ -1882,39 +1882,60 @@ -self._attr_icon = %22mdi:tag-text...
89d9787fc5aa595f6d93d49565313212c2f95b6b
Add simple form to flask upload server
helper_servers/flask_upload.py
helper_servers/flask_upload.py
from flask import Flask, render_template, request, redirect, url_for from werkzeug.utils import secure_filename import datetime import os def timestamp(): return datetime.datetime.now().strftime('%Y%m%d%H%M%S') app = Flask(__name__) app.config['UPLOAD_FOLDER'] = '/uploads' @app.route('/', methods=['GET']) def i...
Python
0
@@ -1022,30 +1022,247 @@ tle%3E -Hi%3C/title%3E%0A Hi%0A ''' +Upload%3C/title%3E%0A %3Cform enctype=%22multipart/form-data%22 action=%22/ul%22 method=%22POST%22%3E%0A %3Cinput type=%22file%22 id=%22file%22 name=%22file%22%3E%0A %3Cinput type=%22submit%22%3E%0A %3C/form%3E%0A '''%0A%0A%0Aif __name_...
1067bb431cb2bacff06c58e83cb35b45fed740c9
Use flask.render_template()
wrapweb/ui.py
wrapweb/ui.py
# Copyright 2015 The Meson development team # # 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 ...
Python
0.000001
@@ -620,41 +620,20 @@ on%0A%0A -from flask import render_template +import flask %0A%0Afr @@ -878,32 +878,38 @@ t())%0A return +flask. render_template( @@ -1096,32 +1096,38 @@ ct))%0A return +flask. render_template( @@ -2674,16 +2674,22 @@ return +flask. render_t
be3f2579907cc21e3320626b29348aaf97cb7986
Modify error message
pytablereader/csv/formatter.py
pytablereader/csv/formatter.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import import dataproperty from ..data import TableData from ..error import InvalidDataError from ..formatter import TableFormatter class CsvTableFormatter(TableFormatter): def to_table_data(self...
Python
0.000001
@@ -651,18 +651,17 @@ ing item -: +. %22%0A @@ -679,56 +679,105 @@ %22 -the first line expected to contain header data.%22 +all of the items should contain header name.%22%0A %22actual=%7B%7D%22.format(header_list) )%0A%0A
dbd05cf9c5604ab99022acfaeb87b9c2c7a83abe
Update tests
python-primitiv/tests/model.py
python-primitiv/tests/model.py
from primitiv import Trainer, Parameter, Device, Model from primitiv import devices as D from primitiv._model import _ModelParameter from primitiv._model import _ModelSubModel import unittest class ModelTest(unittest.TestCase): @classmethod def setUpClass(cls): pass @classmethod def tearDow...
Python
0.000001
@@ -188,16 +188,93 @@ ttest%0A%0A%0A +class TestModel(Model):%0A def __init__(self):%0A super().__init__()%0A%0A%0A class Mo @@ -596,16 +596,20 @@ model = +Test Model()%0A @@ -775,32 +775,36 @@ model1 = +Test Model()%0A @@ -804,32 +804,36 @@ model2 = +Test Model()%0A @...
5c3c90c9c26a2dbe6eba9a1ebb49f1a24cbc251f
Remove unused test setting
holonet/settings/test.py
holonet/settings/test.py
MASTER_DOMAINS = [ 'test.holonet.no' ] TEST_RUNNER = "djcelery.contrib.test_runner.CeleryTestSuiteRunner" SENDER_WHITELIST_ENABLED = False DOMAIN_WHITELIST_ENABLED = False STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage' SECRET_KEY = 'test' DATABASES = { 'default': { 'ENGINE': 'django.db.ba...
Python
0.000001
@@ -176,66 +176,8 @@ se%0A%0A -STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'%0A%0A SECR @@ -335,14 +335,14 @@ : 'h -ans olo +net '%0A
ce1a286ee6d02cfd89097adacac4991f1477950d
Revert "test add_physical_volume()"
test/examples/swiss_cheese.py
test/examples/swiss_cheese.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import pygmsh as pg import numpy as np def generate(): geom = pg.Geometry() X0 = np.array([ [0.0, 0.0, 0.0], [0.5, 0.3, 0.1], [-0.5, 0.3, 0.1], [0.5, -0.3, 0.1] ]) R = np.array([0.1, 0.2, 0.1, 0.14]) holes...
Python
0
@@ -591,15 +591,8 @@ %0A - ball = geo @@ -641,24 +641,74 @@ =holes)%0A%0A + # Fails on travis for some reason. TODO fix%0A # geom.add_ph
d17b3b36fc820908aac745ed29dc68a7a606d402
Fix #3: Crash with url none
webspider.py
webspider.py
#!/usr/bin/python ################################################################################ ''' Copyright (c) 2013, janague <janague@gmail.com> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1...
Python
0.000033
@@ -3307,17 +3307,17 @@ print %22 -i +I nfo: Ver @@ -3419,123 +3419,37 @@ -print %22Bullet: %25s.%22 %25 st.WS_BULLET%0A st.WS_BULLET = args.bullet%5B0%5D%0A print %22Bullet: %25s.%22 %25 st.WS_BULLET +st.WS_BULLET = args.bullet%5B0%5D %0A @@ -3600,29 +3600,235 @@ -print %22URL:%25s.%22...
e674fe96a95422167a270eb76f5d3ea14b03122f
Revert show_cv2 example
examples/show_cv2.py
examples/show_cv2.py
import logging logging.basicConfig(level=logging.INFO) import time import numpy as np import cv2 import pyrealsense as pyrs from pyrealsense.constants import rs_option color_stream = pyrs.stream.ColorStream(color_format='bgr') depth_stream = pyrs.stream.DepthStream() def convert_z16_to_bgr(frame): hist = np.hi...
Python
0
@@ -168,615 +168,8 @@ n%0A%0A%0A -color_stream = pyrs.stream.ColorStream(color_format='bgr')%0Adepth_stream = pyrs.stream.DepthStream()%0A%0A%0Adef convert_z16_to_bgr(frame):%0A hist = np.histogram(frame, bins=0x10000)%5B0%5D%0A hist = np.cumsum(hist)%0A hist -= hist%5B0%5D%0A rgb_frame = np.empty(frame.sh...
1e2fcf8aad74c3ea6c5ed6184e01c7bf0052e6e2
Fix resource __repr__ function, to_dict is a function
solar/solar/core/resource.py
solar/solar/core/resource.py
# -*- coding: utf-8 -*- import copy import os from copy import deepcopy import yaml import solar from solar.core import actions from solar.core import observer from solar.core import signals from solar import utils from solar.core import validation from solar.core.connections import ResourcesConnectionGraph from s...
Python
0.999519
@@ -1307,16 +1307,18 @@ .to_dict +() )%0A%0A d
6a86f901082dbb069b3364719c800ed6c404ead1
Update bitbucket link.
hgtools/managers/subprocess.py
hgtools/managers/subprocess.py
import os import subprocess from . import base from . import cmd class Subprocess: env = None def _invoke(self, *params): """ Invoke self.exe as a subprocess """ cmd = [self.exe] + list(params) proc = subprocess.Popen( cmd, stdout=subprocess.PI...
Python
0
@@ -1196,21 +1196,18 @@ s:// -bitbucket.org +github.com /jar @@ -1223,16 +1223,17 @@ ls/issue +s /7 for d
2727dc1a8e1029c8702bdba4bba5f9e56878a0f8
Update about_control_statements.py
python2/koans/about_control_statements.py
python2/koans/about_control_statements.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutControlStatements(Koan): def test_if_then_else_statements(self): if True: result = 'true value' else: result = 'false value' self.assertEqual(__, result) def test_if_then_state...
Python
0.000001
@@ -266,34 +266,44 @@ elf.assertEqual( -__ +'true value' , result)%0A%0A d @@ -437,34 +437,44 @@ elf.assertEqual( -__ +'true value' , result)%0A @@ -700,34 +700,44 @@ elf.assertEqual( -__ +'true value' , result)%0A%0A d @@ -891,34 +891,39 @@ elf.assertEqual( -__ +3628800 , result)%0A%0A d @@ -110...
e3950a577be91c1ab1c0f9d8ac948f4ed941adb0
remove the message in HumanAgent about typing pass to pass, since that operation is not supported.
agents/human_agent.py
agents/human_agent.py
from agents.agent import Agent class HumanAgent(Agent): """This agent is controlled by a human, who inputs moves via stdin.""" def __init__(self, reversi, color, **kwargs): pass def get_action(self, game_state, legal_moves): choice = None while True: raw_choice = inpu...
Python
0
@@ -336,26 +336,8 @@ x,y - (or pass to pass) : ')
d8bfbe6c11249dbfe4a722cc75555ddc3a506acc
make sure any dotted params are turned into underscores as dotted isn't supported
hiispider/resources/exposed.py
hiispider/resources/exposed.py
import sys from twisted.web import server from twisted.internet.defer import maybeDeferred from .base import BaseResource class ExposedResource(BaseResource): isLeaf = True def __init__(self, server, function_name): self.primary_server = server self.function_name = function_name ...
Python
0
@@ -556,16 +556,34 @@ %5Bkey%5D%5B0%5D +.replace('.', '_') %0A
347e6f94144ecc10ab6aa36b384c57d10caeb906
fix typo in ref_dict['evsonganaly']
hvc/parse/ref_spect_params.py
hvc/parse/ref_spect_params.py
import numpy as np import scipy.signal refs_dict = { 'tachibana': { 'nperseg': 256, 'noverlap': 192, 'window': 'Hann', # Hann window 'freq_cutoffs': [10, 15990], # basically no bandpass, as in Tachibana 'filter_func': 'diff', 'spect_func': 'mpl', 'log_trans...
Python
0.009164
@@ -741,17 +741,17 @@ ndow': ' -h +H ann',%0A
136cfa28cc5223a14281179374fc12580fd37743
deltas are gold
hiispider/servers/cassandra.py
hiispider/servers/cassandra.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Cassandra using version of BaseServer.""" import os import simplejson import zlib import pprint import urllib import traceback import logging import time from uuid import uuid4 from twisted.internet.defer import inlineCallbacks, returnValue from twisted.internet impor...
Python
0.999977
@@ -5173,17 +5173,16 @@ service) -, %0A @@ -5250,16 +5250,20 @@ %25s%22 %25 +(str (delta_i @@ -5263,16 +5263,17 @@ delta_id +) , user_c @@ -5811,84 +5811,8 @@ ng)%0A - logger.debug(%22Inserting user column: %25s%22 %25 user_column)%0A @@ -6049,17 +6049,16 @@ value='' -, %0A ...
6cf437a0193a59fc0cccd15f90a39d9f9fbc18b5
use alpha transparency
examples/daynight.py
examples/daynight.py
import numpy as np from mpl_toolkits.basemap import Basemap, netcdftime import matplotlib.pyplot as plt from datetime import datetime # example showing how to compute the day/night terminator and shade nightime # areas on a map. def epem(date): """ input: date - datetime object (assumed UTC) ouput: gha - ...
Python
0.000003
@@ -2519,16 +2519,182 @@ 0,0,1%5D)%0A +# fill continents 'coral' (with zorder=0), color wet areas 'aqua'%0Amap.drawmapboundary(fill_color='aqua')%0Amap.fillcontinents(color='coral',lake_color='aqua',zorder=0)%0A # create @@ -2717,16 +2717,16 @@ night=1%0A - # 1441 m @@ -2902,33 +2902,74 @@ ht, -axis background fo...
b6cc405b4add181b22f2bf235d804f44019f6fd5
add nightshade method to Basemap base class.
examples/daynight.py
examples/daynight.py
import numpy as np from mpl_toolkits.basemap import Basemap, netcdftime, shiftgrid import matplotlib.pyplot as plt from datetime import datetime from numpy import ma # example showing how to compute the day/night terminator and shade nightime # areas on a map. def epem(date): """ input: date - datetime object...
Python
0.000015
@@ -68,19 +68,8 @@ time -, shiftgrid %0Aimp @@ -2488,16 +2488,453 @@ ynight%0A%0A +class Basemap2(Basemap):%0A def nightshade(self,color=%220.5%22,nlons=1441,alpha=0.5):%0A # create grid of day=0, night=1%0A # 1441 means use a 0.25 degree grid.%0A lons,lats,daynight = daynightgrid(d,nlons)%0A...
f084b22710f36bd67b02d6f0783a98a1c49349e1
add --iocp command line option to use IOCP event loop on Windows
examples/tcp_echo.py
examples/tcp_echo.py
#!/usr/bin/env python3 """TCP echo server example.""" import argparse import asyncio try: import signal except ImportError: signal = None class EchoServer(asyncio.Protocol): TIMEOUT = 5.0 def timeout(self): print('connection timeout, closing.') self.transport.close() def connect...
Python
0
@@ -78,16 +78,27 @@ asyncio%0A +import sys%0A try:%0A @@ -2390,16 +2390,130 @@ umber')%0A +ARGS.add_argument(%0A '--iocp', action=%22store_true%22, dest='iocp',%0A default=False, help='Use IOCP event loop')%0A %0A%0Aif __n @@ -2848,69 +2848,349 @@ -loop = asyncio.get_event_loop()%0A if signal ...
31297fd58faf24f8513d343315d5f89d75410b29
Bump version
weebullet.py
weebullet.py
#!/usr/bin/env python import json import re import urllib import weechat as w w.register('weebullet', 'Lefty', '0.3.0', 'BSD', 'weebullet pushes notifications from IRC to Pushbullet.', '', '') w.hook_print("", "irc_privmsg", "", 1, "priv_msg_cb", "") w.hook_command( "send_push_note", #command "send a push n...
Python
0
@@ -112,17 +112,17 @@ ', '0.3. -0 +1 ', 'BSD'
dc8bc70ba411f54442eef75cd4944c1ab7696470
Add Evidence to Event in Sofia
indra/sources/sofia/processor.py
indra/sources/sofia/processor.py
import itertools from indra.statements import Influence, Concept, Event, Evidence, \ WorldContext, TimeContext, RefContext pos_rels = ['provide', 'led', 'lead', 'driv', 'support', 'enabl', 'develop'] neg_rels = ['restrict', 'worsen', 'declin', 'limit', 'constrain', 'decreas', 'hinder', 'deplet', 'reduc...
Python
0
@@ -688,16 +688,125 @@ ('Time') +,%0A 'Source': event_dict.get('Source_File'),%0A 'Text': event_dict.get('Sentence') %7D%0A%0A d @@ -2914,16 +2914,160 @@ me=loc)%0A +%0A text = event_entry.get('Text')%0A ref = event_entry.get('Source')%0A ev = Evidence(source_api...
9f1134174c594564519a88cbfafe443b2be782e2
Update track_name, short_label, and long_label per discussions on 2016-09-09
python/render/render_tracks.py
python/render/render_tracks.py
__author__ = 'dcl9' from render import render_template import argparse import yaml def generate_track_dict(metadata): d = dict() d['track_name'] = '{}_{}({})'.format(metadata['protein'], metadata['serial_number'], metadata['author_identifier']) d['bigbed_url'] = metadata['track_filename'] d['short_lab...
Python
0
@@ -160,12 +160,8 @@ %7D_%7B%7D -(%7B%7D) '.fo @@ -215,39 +215,8 @@ er'%5D -, metadata%5B'author_identifier'%5D )%0A @@ -289,78 +289,27 @@ %5D = -'%7B%7D_%7B%7D binding'.format(metadata%5B'protein'%5D, metadata%5B'serial_number'%5D) +metadata%5B'protein'%5D %0A @@ -372,16 +372,32 @@ th = %7B%7D) +; iMADS m...
3ce7a707d1933c89d00c773f95096e31d31325b5
add Python logging module import to provide log.error
salt/states/tls.py
salt/states/tls.py
# -*- coding: utf-8 -*- ''' Enforce state for SSL/TLS ========================= ''' # Import Python Libs from __future__ import absolute_import, unicode_literals, print_function import time import datetime __virtualname__ = 'tls' def __virtual__(): if 'tls.cert_info' not in __salt__: return False ...
Python
0.000002
@@ -200,16 +200,31 @@ datetime +%0Aimport logging %0A%0A__virt
bfdd781728d0166658ea13735c689618d6dd6062
add tmp_tags to mailtrain.update_person
agir/lib/mailtrain.py
agir/lib/mailtrain.py
from datetime import datetime import warnings from urllib3 import Retry import requests from requests import HTTPError from django.conf import settings from django.db.models import Q from agir.lib.utils import generate_token_params from urllib.parse import urlencode params = {'access_token': settings.MAILTRAIN_API_...
Python
0.000001
@@ -569,32 +569,47 @@ om_person(person +, tmp_tags=None ):%0A data = %7B%7D @@ -1802,16 +1802,109 @@ + ','%0A%0A + if tmp_tags:%0A data%5B'MERGE_TAGS'%5D = ',' + ','.join(tmp_tags) + data%5B'MERGE_TAGS'%5D%0A%0A if l @@ -3474,24 +3474,39 @@ erson(person +, tmp_tags=None ):%0A data @@ -3530,1...
039ca493135867bb70c182ba640628c5cc88081e
Simplify Post Detail queryset.
blog/views.py
blog/views.py
from django.core.urlresolvers import reverse_lazy from django.views.generic import ( ArchiveIndexView, CreateView, DeleteView, DetailView, MonthArchiveView, YearArchiveView) from core.utils import UpdateView from user.decorators import \ require_authenticated_permission from .forms import PostForm from .m...
Python
0
@@ -1215,42 +1215,8 @@ cts%0A - .select_related('author')%0A
e9c736ef9f18fbda71cde517306c838ace0721e6
add MRMS 1km precip to the JSON multiday file
htdocs/iemre/multiday.py
htdocs/iemre/multiday.py
#!/usr/bin/env python import sys import cgi from pyiem import iemre, datatypes import netCDF4 import datetime import json form = cgi.FormContent() ts1 = datetime.datetime.strptime( form["date1"][0], "%Y-%m-%d") ts2 = datetime.datetime.strptime( form["date2"][0], "%Y-%m-%d") if ts1 >= ts2: sys.stdout.write('Conten...
Python
0
@@ -726,21 +726,39 @@ ts2 = -tsend +datetime.datetime.now() - datet @@ -1833,16 +1833,351 @@ lose()%0A%0A +if ts1.year %3E 2012:%0A fn = %22/mesonet/data/iemre/%25s_mw_mrms_daily.nc%22 %25 (ts1.year,)%0A nc = netCDF4.Dataset(fn, 'r')%0A j2 = int((lat - iemre.SOUTH) * 100.0)%0A i2 = int((lon - iemre.W...
bd73bd36f65f6711a5ce3158b3f1ef3483d505f8
change default values.
examples/ensemble_average_plot.py
examples/ensemble_average_plot.py
import numpy as np import matplotlib.pyplot as plt import atomic class AnnotateRight(object): def __init__(self, lines, texts, loc='last', ha=None, va='center'): self.lines = lines self.texts = texts self.location = loc self.ha = ha self.va = va self.axes = lines...
Python
0
@@ -4221,10 +4221,10 @@ = 1e -19 +20 %0A%0A @@ -4271,15 +4271,13 @@ nt(' -tungste +carbo n')) @@ -4349,14 +4349,8 @@ ay(%5B -1e13, 1e14 @@ -4373,16 +4373,22 @@ 17, 1e18 +, 1e19 %5D)/densi
1eed345f4494313274eb97bcc8fdc60089545f51
test script
assets/test.py
assets/test.py
#!env python3 #for x in range(859, 1400): # print(x / 858); # 1,06993006993007 # 1,05893536121673 for vert in range(1053, 1900): for horiz in range(859, 1400): horiztest = (horiz / 858) verttest = (vert / 1052) ref = horiztest * verttest * 54 if ref == 72.0: print...
Python
0.000002
@@ -99,16 +99,30 @@ 121673%0A%0A +results = %7B%7D%0A%0A for vert @@ -298,109 +298,366 @@ -if ref == 72.0:%0A print(%22%25.60f %25.60f %25f %25f %25f%22 %25 (horiztest, verttest, ref, horiz, vert));%0A +results%5Bref%5D = %7B %0A %22horiztest%22: horiztest,%0A %22verttes...
36472b552a119aa57acb484b9522445b3cd804dd
check for corrupted audio files
python/test/audio_proc_test.py
python/test/audio_proc_test.py
''' Try processing audio from Illiad in python Long Le <longle1@illinois.edu> University of Illinois ''' print(__doc__) import numpy as np from scipy.io import wavfile from scipy import signal import matplotlib.pyplot as plt import sys sys.path.insert(0,sys.path[0]+'/../src/') #print(sys.path) from sasclient import *...
Python
0
@@ -733,16 +733,57 @@ name'%5D)%0A +if 'RIFF' == data%5B0:4%5D.decode('utf-8'):%0A%09 with ope @@ -809,16 +809,17 @@ ) as f:%0A +%09 %09f.write @@ -824,16 +824,57 @@ te(data) +%0Aelse:%0A%09sys.exit('Corrupted audio file!') %0A%0Afs,dat
a5ca6c7f1cb94d60265ec6b1322fb481d3788af9
Fix a bug in admin dashboard when a project doesn’t have an owner
qipr_approver/approver/views/dashboard.py
qipr_approver/approver/views/dashboard.py
import json from operator import itemgetter from django.shortcuts import render from django.http import HttpResponse, Http404, HttpResponseRedirect from django.views.decorators.csrf import csrf_protect from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required, user_passes_te...
Python
0
@@ -5472,16 +5472,25 @@ 'owner': + getattr( project. @@ -5494,17 +5494,18 @@ ct.owner -. +,' gatorlin @@ -5505,17 +5505,25 @@ atorlink -, +','None') %0A
340bad0a905d6b683629b086a1e71dd95bfdf322
Remove .c file to force recompilation regardless of timestamp.
Cython/Build/Tests/TestCyCache.py
Cython/Build/Tests/TestCyCache.py
import difflib import glob import gzip import os import tempfile import Cython.Build.Dependencies import Cython.Utils from Cython.TestUtils import CythonTest class TestCyCache(CythonTest): def setUp(self): CythonTest.setUp(self) self.temp_dir = tempfile.mkdtemp( prefix='cycache-test'...
Python
0
@@ -1301,32 +1301,55 @@ open(a_c).read() +%0A os.unlink(a_c) %0A%0A open(a @@ -1471,16 +1471,39 @@ ).read() +%0A os.unlink(a_c) %0A%0A
7b1d65d17dbbc71cbd80c49fd2ed19636f49680e
Add initial hue parameter
nucanvas/color/sinebow.py
nucanvas/color/sinebow.py
import math from math import sin, pi import colorsys def sinebow(hue): '''Adapted from http://basecase.org/env/on-rainbows''' hue = -(hue + 0.5) # Start at red rotating clockwise rgb = sin(pi * hue), sin(pi * (hue + 1.0/3.0)), sin(pi * (hue + 2.0/3.0)) return tuple(int(255 * c**2) for c in rgb) def distinct...
Python
0.000001
@@ -329,18 +329,80 @@ equence( -): +hue=0.0):%0A # Hue is normalized from 0-1.0 for one revolution%0A %0A phi = @@ -513,63 +513,9 @@ i)%0A -%0A hue = 0.0 # Normalized from 0-1.0 for one revolution + %0A w
dc7b3a2e1c3b67c77257afc7d9af8ae5b8096c3b
Make assignments that override abstract properties into simple attributes.
blivet/formats/fslabeling.py
blivet/formats/fslabeling.py
# fslabeling.py # Filesystem labeling classes for anaconda's storage configuration module. # # Copyright (C) 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (a...
Python
0.000001
@@ -2262,39 +2262,19 @@ _label = - property(lambda s: %22%22 -) %0A lab @@ -2281,35 +2281,16 @@ el_app = - property(lambda s: fslabel @@ -2293,25 +2293,24 @@ abel.E2Label -) %0A%0A def la @@ -2485,35 +2485,16 @@ _label = - property(lambda s: %22NO NAM @@ -2495,17 +2495,16 @@ NO NAME%22 -) %0A lab...
f4681567b3137f419208fbc1d26de748cb4f3194
test fastrcp.ProtocolError
python/test/serverproxytest.py
python/test/serverproxytest.py
#!/usr/bin/python import fastrpc import unittest class ServerProxyTest(unittest.TestCase): def setUp(self): self.host = "localhost" self.port = 2424 self.url = "http://%s:%i/RPC2" % (self.host, self.port) def test_getattr(self): client = fastrpc.ServerProxy(self.url...
Python
0.000014
@@ -1891,16 +1891,426 @@ ll_exc%0A%0A + def test_raise(self):%0A client = fastrpc.ServerProxy(self.url, readTimeout=1000,%5C%0A writeTimeout=1000, connectTimeout=1000, %5C%0A useBinary =fastrpc.ON_SUPPORT_ON_KEEP_ALIVE,)%0A%0A try:%0A client.sys...
fa5bb37159d09c5bff53b83a4821e3f154892d1d
Fix issue with test discovery and broken CUDA drivers.
numba/cuda/device_init.py
numba/cuda/device_init.py
from __future__ import print_function, absolute_import, division # Re export from .stubs import (threadIdx, blockIdx, blockDim, gridDim, syncthreads, shared, local, const, grid, gridsize, atomic, threadfence_block, threadfence_system, threadfence) from .cudad...
Python
0
@@ -777,37 +777,471 @@ %22%22%22%0A -return driver.driver. +# whilst %60driver.is_available%60 will init the driver itself,%0A # the driver initialization may raise and as a result break%0A # test discovery/orchestration as %60cuda.is_available%60 is often%0A # used as a guard for whether to run a CUDA te...
e754c16b0e78fbf084374f470367f1971c826cd3
Update constants.py
bioinformatics/bioworkflow/constants.py
bioinformatics/bioworkflow/constants.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 t...
Python
0.000001
@@ -1211,16 +1211,17 @@ 'admin'%0A +# AUTHURL @@ -1281,22 +1281,21 @@ 192.168. -100.11 +50.15 :5000/v2
2cc638564f7bdda60f1408c928e9fae25e4ab1ac
Save pre- and post-alignment files (useful for debugging)
augur/align.py
augur/align.py
import os,sys,argparse import numpy as np from Bio import AlignIO, SeqIO, Seq def make_gaps_ambiguous(aln): ''' replace all gaps by 'N' in all sequences in the alignment. TreeTime will treat them as fully ambiguous and replace then with the most likely state ''' for seq in aln: seq_array = ...
Python
0
@@ -70,16 +70,44 @@ qIO, Seq +%0Afrom shutil import copyfile %0A%0Adef ma @@ -1070,16 +1070,77 @@ = None%0A%0A + # potentially add the reference seuqnce to the sequences%0A if r @@ -1862,16 +1862,201 @@ fname)%0A%0A + # before aligning, make a copy of the data that the aligner receives as input (very use...
6a144b25ec4e75dc526f821b651f4e426d792d75
Handle comments on same line as function declaration
rapi_bwa/extract_bwa_header.py
rapi_bwa/extract_bwa_header.py
#!/usr/bin/env python import re import os import sys RequiredPrototypes = { 'kt_for': 'kthread.c', 'mem_align1_core': 'bwamem.c', 'mem_approx_mapq_se': 'bwamem.c', 'mem_mark_primary_se': 'bwamem.c', 'mem_matesw': 'bwamem_pair.c', 'mem_pair': 'bwamem_pair.c' } def writeline(txt=''): sys.st...
Python
0.000002
@@ -634,16 +634,19 @@ )%5Cs*(;%7C%7B +%7C// )' %25 fn_ @@ -707,16 +707,213 @@ group(1) +%0A # remove any trailing comments%0A comment_pos = proto.find('//')%0A if comment_pos %3E= 0:%0A proto = proto%5B0:comment_pos%5D%0A # strip whitespace%0A proto = proto .strip()
4ad67a81e2b8620649c27628473542c2d12ba02b
change those timeformats
ebu_tt_live/scripts/ebu_dummy_encoder.py
ebu_tt_live/scripts/ebu_dummy_encoder.py
import logging from .common import create_loggers from ebu_tt_live import bindings from ebu_tt_live.bindings import _ebuttm as metadata from pyxb import BIND from datetime import timedelta log = logging.getLogger('ebu_dummy_encoder') def main(): create_loggers() log.info('Dummy XML Encoder') tt = bindin...
Python
0.010584
@@ -1161,37 +1161,45 @@ begin= -'00:00:00.50' +timedelta(seconds=.5) ,%0A @@ -1216,21 +1216,31 @@ end= -'00:00:03.24' +timedelta(seconds=3.42) ,%0A @@ -1292,21 +1292,29 @@ gin= -'00:00:00.50' +timedelta(seconds=.5) ,%0A
818db31562abf772fbb8632439116a4cbd6cdfbf
Add canonical URL to Post object
anatolik/Post.py
anatolik/Post.py
#!/usr/bin/env python3 import os import yaml from datetime import date from pwd import getpwuid from zlib import crc32 from pypandoc import convert from mako.template import Template from mako.lookup import TemplateLookup import requests from .Site import site from .flickr import Flickr from . import Util class Po...
Python
0
@@ -488,24 +488,55 @@ lf.Url = ''%0A + self.CanonicalUrl = ''%0A self @@ -2534,16 +2534,85 @@ '.html' +%0A self.CanonicalUrl = os.path.join(site.info%5B'url'%5D, self.Url) %0A%0A
9d7b48def2c39c751994bedbdf4d953d2acc4a62
change test to work with python2.5 and 2.6 report correct exception message
examples/libtest/ExceptionTest.py
examples/libtest/ExceptionTest.py
from UnitTest import UnitTest import sys class MyException: def toString(self): return "MyException" class MyException2: def toString(self): return "MyException2" class ExceptionTest(UnitTest): def __init__(self): UnitTest.__init__(self) def getName(self): ...
Python
0.000004
@@ -34,24 +34,26 @@ port sys%0D%0A%0D%0A +%0D%0A class MyExce @@ -115,24 +115,26 @@ ception%22%0D%0A%0D%0A +%0D%0A class MyExce @@ -198,24 +198,26 @@ eption2%22%0D%0A%0D%0A +%0D%0A class Except @@ -1181,18 +1181,16 @@ ed%22)%0D%0A%0D%0A -%0D%0A def @@ -5382,114 +5382,141 @@ -self.assertEqual(e.args%5...
95685d567a0221279887b4d196b0ec662daedac3
remove mailgun email verification
inbox-server/inbox/util/url.py
inbox-server/inbox/util/url.py
from dns.resolver import query as dns_query from urllib import urlencode import requests import logging as log def validate_email(address_text): args = { "address": address_text } MAILGUN_API_PUBLIC_KEY = "pubkey-8nre-3dq2qn8-jjopmq9wiwu4pk480p2" MAILGUN_VALIDATE_API_URL = "https://api.m...
Python
0
@@ -36,16 +36,31 @@ ns_query +, NoNameservers %0Afrom ur @@ -85,25 +85,8 @@ ode%0A -import requests%0A%0A impo @@ -107,570 +107,201 @@ log%0A -%0Adef validate_email(address_text):%0A%0A args = %7B%0A %22address%22: address_text%0A %7D%0A%0A MAILGUN_API_PUBLIC_KEY = %22pubkey-8nre-3dq2qn8-jjopmq...
adbbd5fb74d867b0c393c1508c81db76d251ef05
move the element factory to zeit.edit
src/zeit/content/cp/blocks/block.py
src/zeit/content/cp/blocks/block.py
# Copyright (c) 2009-2010 gocept gmbh & co. kg # See also LICENSE.txt import gocept.lxml.interfaces import lxml.objectify import zeit.cms.content.property import zeit.content.cp.centerpage import zeit.content.cp.interfaces import zeit.edit.interfaces import zope.component import zope.interface class ElementFactory(o...
Python
0
@@ -209,32 +209,55 @@ t.cp.interfaces%0A +import zeit.edit.block%0A import zeit.edit @@ -260,32 +260,32 @@ edit.interfaces%0A - import zope.comp @@ -339,192 +339,87 @@ ory( -object):%0A %22%22%22Base class for block factories.%22%22%22%0A%0A zope.interface.implements(zeit.edit.interfaces.IElementFactory)%0A%...
54a24423c07e1d6e2c0a6e8c7c7586b8655aa6e7
Fix `date` filter for models with `time` field
api/filters.py
api/filters.py
# -*- coding: utf-8 -*- from django_filters import rest_framework as filters from core import models class TimeFieldFilter(filters.FilterSet): date = filters.DateFilter(field_name='date', label='Date') date_min = filters.DateFilter(field_name='time__date', label='Min. Date', ...
Python
0.000001
@@ -180,16 +180,22 @@ d_name=' +time__ date', l
bfa10071db2a3f0e265aecdc71e015416f340d6a
Move scope of machine up to be more accessible in chpl_platform.py.
util/chplenv/chpl_platform.py
util/chplenv/chpl_platform.py
#!/usr/bin/env python import platform, os, os.path, re, sys, optparse from utils import memoize @memoize def get(flag='host'): if flag == 'host': platform_val = os.environ.get('CHPL_HOST_PLATFORM') elif flag == 'target': platform_val = os.environ.get('CHPL_TARGET_PLATFORM') if not plat...
Python
0
@@ -1426,16 +1426,43 @@ +machine = uname%5B4%5D%0A if platf @@ -1484,39 +1484,8 @@ ux': -%0A machine = uname%5B4%5D %0A
adbb54f0c935ef04e4e2e00cf147e3729d8c1761
Add version number
angr/__init__.py
angr/__init__.py
# pylint: disable=wildcard-import if bytes is str: raise Exception(""" =-=-=-=-=-=-=-=-=-=-=-=-= WELCOME TO THE FUTURE! =-=-=-=-=-=-=-=-=-=-=-=-=-= angr has transitioned to python 3. Due to the small size of the team behind it, we can't reasonably maintain compatibility between both python 2 and python 3. If y...
Python
0.000009
@@ -28,16 +28,45 @@ import%0A%0A +__version__ = (8, 19, 2, 4)%0A%0A if bytes
364b9c71442b141edaafae9acacad497f091f7db
Fix name duplication in `app_config` Bazel rule
oak/common/app_config.bzl
oak/common/app_config.bzl
# # Copyright 2020 The Project Oak Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
Python
0.000001
@@ -766,16 +766,123 @@ file.%0A%0A + Implicit output targets:%0A name.bin: A binary file with a serialized application configuration.%0A%0A Args @@ -930,16 +930,63 @@ ary file + (the output file will have a %60.bin%60 extension) .%0A @@ -1563,20 +1563,103 @@ -outs = %5B +# Name of the rul...
130630b3513744097287a92ec2183c5f58409b96
Use an older pytest to work around temp dirs (#1080)
api/python/setup.py
api/python/setup.py
import os import sys from setuptools import setup, find_packages from setuptools.command.install import install VERSION = "3.0.5" def readme(): readme_short = """ Quilt is a data management tool designed for data discoverability, data dependency management, and data version control using `data packages <...
Python
0
@@ -2395,18 +2395,70 @@ 'pytest -', +%3C5.1.0', # TODO: Fix pytest.ensuretemp in conftest.py %0A
a328ed67748c1ecefc19344f1a6d01aa2dad927a
Update context namespace after each document in module has been processed
edgedb/lang/common/lang/yaml/__init__.py
edgedb/lang/common/lang/yaml/__init__.py
## # Copyright (c) 2008-2010, 2012 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## import collections import importlib import itertools import os import yaml from metamagic.utils.lang import meta, context as lang_context, loader as lang_loader from metamagic.utils.lang.import_ import utils as imp...
Python
0
@@ -4726,32 +4726,79 @@ ldr.get_dict():%0A + context.namespace.update((d,))%0A
91da9bdee050029c31f665f192984ba76463e1b2
Remove the row from the print table
geoportailv3/views/luxprintproxy.py
geoportailv3/views/luxprintproxy.py
# -*- coding: utf-8 -*- # Copyright (c) 2011-2015, Camptocamp SA # All rights reserved. # Redistribution and use in source and # binary forms, with or without # modification, are permitted provided # that the following conditions are met: # 1. Redistributions of source code must # retain the above copyright...
Python
0.000024
@@ -4132,35 +4132,38 @@ ry(LuxPrintJob). -get +filter (%0A se @@ -4151,32 +4151,50 @@ ter(%0A + LuxPrintJob.id == self.request.ma
7204f6d4e957c3f15068e0bbf72f822717193b39
Add serializer param to RPC service
ironic/openstack/common/rpc/service.py
ironic/openstack/common/rpc/service.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
Python
0.000065
@@ -1305,16 +1305,33 @@ ger=None +, serializer=None ):%0A @@ -1417,16 +1417,53 @@ = topic%0A + self.serializer = serializer%0A @@ -1839,16 +1839,83 @@ manager%5D +,%0A self.serializer )%0A%0A
bf73e73c93c323a6b7395b3a1d40dd55dea4b65a
Update init file with descriptions
indra/sources/dgi/__init__.py
indra/sources/dgi/__init__.py
Python
0
@@ -0,0 +1,542 @@ +# -*- coding: utf-8 -*-%0A%0A%22%22%22A processor for the %60Drug Gene Interaction Database (DGI-DB) %3Chttp://www.dgidb.org%3E%60_.%0A%0A* %60Integration of the Drug%E2%80%93Gene Interaction Database (DGIdb 4.0) with open crowdsource efforts%0A %3Chttps://doi.org/10.1093/nar/gkaa1084%3E%60_. Fresh...
6425c8a85ccb9873e9d78c36b56b362c68d1fa50
Fix in writing of the terminal interviewer explanation.
iepy/human_validation.py
iepy/human_validation.py
from collections import OrderedDict import sys from colorama import init as colorama_init from future.builtins import input, str QUESTION_TEMPLATE = str(u""" Is the following text evidence of the Fact %(fact)s? %(text)s (%(keys)s): """) PY3 = sys.version > '3' class TerminalInterviewer(object): """ Cap...
Python
0.000002
@@ -2642,18 +2642,18 @@ chance +t o -f be %22%0A @@ -2665,27 +2665,24 @@ r += u%22 -an evidence of the @@ -2669,32 +2669,33 @@ = u%22evidence +s of the Fact express @@ -2686,27 +2686,18 @@ the -Fact expressed next +seed facts . Pl
85d5cdee452fff9bf58a061e6db9da20e7b48bc6
fix query_string test
integration_tests/test_integr.py
integration_tests/test_integr.py
import pytest import subprocess import sys import urllib3.connection import socket import psutil import time import json import urllib.parse import string import re import base64 from hypothesis import given, strategies as st, settings, Verbosity @pytest.fixture(autouse=True) def server(): server = subprocess.Pop...
Python
0.000116
@@ -2153,61 +2153,8 @@ 200%0A - if not query_string:%0A query_string = None%0A
571e4d827aee1445ed40467f7c394a29f1b730db
Remove request argument
user/views.py
user/views.py
from django.http import HttpResponseRedirect from django.views import generic from django.shortcuts import render, reverse from django.contrib.auth import login, logout from .forms import SignupForm, SigninForm, UpdateForm from .models import User class ProfileView(generic.ListView): model = User template_na...
Python
0.000001
@@ -609,39 +609,32 @@ r = form.signin( -request )%0A if @@ -1218,23 +1218,16 @@ .signin( -request )%0A
fecdc92a9be73465e268077eccd00ea75622bd72
fix closed acc bug
instabot/bot/bot_like_feed.py
instabot/bot/bot_like_feed.py
import time import random def like_timeline(bot, amount=None): """ Likes last 8 medias from timeline feed """ print ("Liking timeline feed:") if amount is not None and amount > 8: amount = 8 print (" Can't request more than 8 medias from timeline... yet") if not bot.getTimelineFeed(): ...
Python
0.000001
@@ -956,24 +956,131 @@ ed(user_id)%0A + if bot.LastJson%5B%22status%22%5D == 'fail':%0A print (%22 This is a closed account%22)%0A return False%0A not_like
9672b63fb1c2c896e16ca2c8abee9f8f3affae58
Update forward compatibility horizon to 2021-12-28
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 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
@@ -1340,9 +1340,9 @@ 2, 2 -7 +8 )%0A_F
c1b4b2adc84dad470dc90f0aa898b41ae6fe7162
remove tests for infer_repo as it no longer exists
ice_setup/tests/test_system.py
ice_setup/tests/test_system.py
import os import tempfile from pytest import raises import pytest from textwrap import dedent from ice_setup.ice import get_fqdn, infer_ceph_repo, ICEError, DirNotFound class FakeSocket(object): pass @pytest.fixture def cephdeploy_conf(): path = tempfile.mkstemp() def fin(): os.remove(path) ...
Python
0
@@ -126,25 +126,8 @@ qdn, - infer_ceph_repo, ICE @@ -809,1106 +809,4 @@ om'%0A -%0A%0Aclass TestInferCephRepo(object):%0A%0A def test_does_not_find_cephdeployconf(self):%0A with raises(DirNotFound):%0A infer_ceph_repo(_configs=%5B''%5D)%0A%0A def test_does_not_find_a_ceph_repo_section(self, ...
5db0dfc3ada74f338a598d7e82405ba47556d79d
Update models.py
ijizhang_prj/jizhang/models.py
ijizhang_prj/jizhang/models.py
#coding=utf-8 from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse # Create your models here. class Category(models.Model): INCOME_CHOICES = ( (True, _(u'收入')), (False, _(u'支出')...
Python
0
@@ -412,24 +412,46 @@ e=_(u%22%E7%88%B6%E7%B1%BB%E5%90%8D%E7%A7%B0%22) +, related_name='child' )%0A name =
64a78085fffe8dc525596b870c8e150d9171f271
Fix issue where Pulsar would enter a restart loop when cancelling a buffering
resources/site-packages/pulsar/monitor.py
resources/site-packages/pulsar/monitor.py
import xbmc import urllib2 import threading from pulsar.config import PULSARD_HOST class PulsarMonitor(xbmc.Monitor): def __init__(self): self._closing = threading.Event() @property def closing(self): return self._closing def onAbortRequested(self): self._closing.set() d...
Python
0
@@ -291,25 +291,128 @@ -self._closing.set +# Only when closing Kodi%0A if xbmc.abortRequested:%0A self._closing.set()%0A self._closing.clear ()%0A%0A
822571366271b5dca0ac8bf41df988c6a3b61432
Bump version.
alchemist/_version.py
alchemist/_version.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division __version_info__ = (0, 3, 11) __version__ = '.'.join(map(str, __version_info__))
Python
0
@@ -112,17 +112,17 @@ (0, 3, 1 -1 +2 )%0A__vers
d11d6a3c7d7978eed167a370577169b5bcb65ef3
Add early stopping test case for multinomial AUC (#5410)
h2o-py/tests/testdir_algos/gbm/pyunit_PUBDEV_7269_multinomial_auc_large.py
h2o-py/tests/testdir_algos/gbm/pyunit_PUBDEV_7269_multinomial_auc_large.py
from __future__ import print_function import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils from h2o.estimators.gbm import H2OGradientBoostingEstimator from tests.pyunit_utils import roc_auc_score def multinomial_auc_prostate_gbm(): data = h2o.import_file(pyunit_utils.locate("smallda...
Python
0
@@ -4290,16 +4290,445 @@ _aucpr)) +%0A%0A # test early stopping%0A ntrees = 100%0A gbm = H2OGradientBoostingEstimator(ntrees=ntrees, max_depth=2, nfolds=3, distribution=distribution, score_each_iteration=True, auc_type=%22MACRO_OVR%22, stopping_metric=%22AUC%22, stopping_rounds=3)%0A gbm.train(x=predictors...
d91b32f9f14787d45e271561094a5372990adea4
Fix Meta/__meta__ resolution over more than two levels of inheritance
venom/util.py
venom/util.py
from typing import Dict, Any, Tuple # FIXME should be Generic class AttributeDict(dict): __getattr__ = dict.__getitem__ __setattr__ = dict.__setitem__ def _meta_obj_to_dict(meta_obj): dct = {} for k, v in meta_obj.__dict__.items(): if not k.startswith('__'): dct[k] = v return...
Python
0.00002
@@ -535,16 +535,126 @@ tr(base, + '__meta__') and base.__meta__ is not None:%0A meta_.update(base.__meta__)%0A elif hasattr(base, meta_na @@ -705,17 +705,32 @@ ict( -base.Meta +getattr(base, meta_name) ))%0A%0A
adc533b76845fa7055ab41bd669ea8145e966849
Fix default_seat_identifier
terminalone/models/supplysource.py
terminalone/models/supplysource.py
# -*- coding: utf-8 -*- """Provides supply source object.""" from __future__ import absolute_import from ..entity import Entity class SupplySource(Entity): """SupplySource object""" collection = 'supply_sources' resource = 'supply_source' _relations = { 'parent_supply', } _rtb_types =...
Python
0.000328
@@ -441,27 +441,8 @@ = %7B%0A - 'id': int,%0A @@ -574,29 +574,20 @@ ifier': -Entity._strpt +None ,%0A @@ -801,32 +801,51 @@ y._int_to_bool,%0A + 'id': int,%0A 'is_pros
102f3768544c180395b5b044ad0c0bf628d5f89a
Fix import
taiga/projects/votes/serializers.py
taiga/projects/votes/serializers.py
from django.contrib.auth import get_user_model from rest_framework import serializers class VoterSerializer(serializers.ModelSerializer): full_name = serializers.CharField(source='get_full_name', required=False) class Meta: model = get_user_model() fields = ('id', 'username', 'first_name', '...
Python
0.000002
@@ -2,78 +2,74 @@ rom -django.contrib.auth import get_user_model%0A%0Afrom rest_framework +rest_framework import serializers%0A%0Afrom taiga.users.models import seri @@ -64,27 +64,20 @@ import +U ser -ializers %0A%0A%0Aclass @@ -238,24 +238,12 @@ l = -get_user_model() +User %0A
6d93bf9cac2d8c5a2388d8681c29dc24a7490502
disable github api test on ci
_unittests/ut_loghelper/test_github_api.py
_unittests/ut_loghelper/test_github_api.py
""" @brief test tree node (time=12s) """ import sys import os import unittest try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "..", ".."))) if path not in sys.p...
Python
0.000001
@@ -788,20 +788,8 @@ or() - == %22travis%22 :%0A
9915d7ce33897409e23ce007806fa1f5f34e183b
Drop (py3.6+) environment printout in test example
jpype/_pyinstaller/example.py
jpype/_pyinstaller/example.py
import os import jpype import jpype.imports from jpype.types import * for key, value in sorted(os.environ.items()): print(f'{key!r}: {value!r}') print('+++ about to start JVM') jpype.startJVM() print('+++ JVM started')
Python
0
@@ -41,114 +41,8 @@ orts -%0Afrom jpype.types import *%0A%0Afor key, value in sorted(os.environ.items()):%0A print(f'%7Bkey!r%7D: %7Bvalue!r%7D') %0A%0Apr
fb99e7248441353ab1e4a271102ba269b331c6b8
Update libchromiumcontent to have mas build
script/lib/config.py
script/lib/config.py
#!/usr/bin/env python import errno import os import platform import sys BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \ 'http://github-janky-artifacts.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = '04523758cda2a96d2454f9056fb1fb9a1c1f95f1' PLATFORM = { 'cygwin': 'win32', 'darwin': ...
Python
0
@@ -140,29 +140,27 @@ ://g -ithub-janky-artifacts +h-contractor-zcbenz .s3. @@ -226,48 +226,48 @@ = ' -04523758cda2a96d2454f9056fb1fb9a1c1f95f1 +78e54bc39a04b758ed5167cd980cc4d9951bd629 '%0A%0AP
1c3e1141b7140fc5b2e1898deb889a29bf7ad0aa
update TwilioCapability to latest api
vbx/http.py
vbx/http.py
import datetime import twilio.base.values import twilio.rest import twilio.jwt.client import web import web.file import web.form import web.json import web.page import web.query import vbx.config import vbx.events import vbx.devices.browser import vbx.log import vbx.util alias = '([a-zA-Z0-9._-]+)' query = '(?:\?(...
Python
0
@@ -69,26 +69,20 @@ twilio. -jwt.client +util %0A%0Aimport @@ -357,25 +357,19 @@ lio. -jwt.client.Client +util.Twilio Capa @@ -378,13 +378,8 @@ lity -Token (acc
d2ad58a752685b9982081331971276d7c14fec92
remove print statement
ipynbsrv/web/api_client_proxy.py
ipynbsrv/web/api_client_proxy.py
from ipynbsrv.client.clients import HttpClient def get_httpclient_instance(request): base_url = "http://localhost:8000/api" username = request.user.username password = request.session.get('password') print("{}:{}".format(username, password)) return HttpClient(base_url, auth=(username, password)) ...
Python
0.999999
@@ -211,54 +211,8 @@ d')%0A - print(%22%7B%7D:%7B%7D%22.format(username, password))%0A
f996da44520a1c4e1c395c5e7e8a4476be5093dc
Make groups management compatible with Django 1.10+
openquake/server/utils.py
openquake/server/utils.py
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2015-2018 GEM Foundation # # OpenQuake 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 Licen...
Python
0.000009
@@ -1882,37 +1882,12 @@ ups. -values_list('name', flat=True +get( )%0A
c786d0fe2fecffe8bdc5e05850827cd47a0f773a
Fix a typo in logging.
scmtiles/runner.py
scmtiles/runner.py
"""Model independent definitions for running models.""" # Copyright 2016 Andrew Dawson # # 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 # # Unles...
Python
0.99839
@@ -4582,17 +4582,17 @@ le: %7B!s%7D -%60 +%5C n'.forma
4765f74af29085d08dc9c6b6bc4682e98eea63db
raise warning
examples/classification/eval_imagenet.py
examples/classification/eval_imagenet.py
import argparse import numpy as np import chainer import chainer.functions as F from chainer import iterators from chainercv.datasets import directory_parsing_label_names from chainercv.datasets import DirectoryParsingLabelDataset from chainercv.links import FeaturePredictor from chainercv.links import ResNet101 fro...
Python
0.000001
@@ -28,16 +28,32 @@ py as np +%0Aimport warnings %0A%0Aimport @@ -524,16 +524,339 @@ ssHook%0A%0A +try:%0A import cv2 # NOQA%0Aexcept ImportError:%0A warnings.warn('cv2 is not installed on your environment. '%0A 'The scores reported in the ChainerCV%5C's Github page '%0A 'are...
3badfdb0f9dc497b1f018e105b5d731dc7cd535d
Add a text property to HarvesterResponse
scrapi/requests.py
scrapi/requests.py
"""A wrapper around requests that records all requests made with it. Supports get, put, post, delete and request all calls return an instance of HarvesterResponse """ from __future__ import absolute_import import json import logging import functools from datetime import datetime import requests import cqlengi...
Python
0.000003
@@ -1157,16 +1157,95 @@ _str))%0A%0A + @property%0A def text(self):%0A return self.content.decode('utf-8')%0A%0A %0Adef rec
ba335f22cbbe6262ef938b8df04c0403e7a75715
Change variable name to more common one
scrapyd/environ.py
scrapyd/environ.py
import datetime import os from urlparse import urlparse, urlunparse from zope.interface import implements from .interfaces import IEnvironment class Environment(object): implements(IEnvironment) def __init__(self, config, initenv=os.environ): self.dbs_dir = config.get('dbs_dir', 'dbs') self...
Python
0.000024
@@ -2220,25 +2220,18 @@ -containin +lo g_dir = @@ -2291,25 +2291,18 @@ .exists( -containin +lo g_dir):%0A @@ -2329,17 +2329,10 @@ irs( -containin +lo g_di
b4e0294eed4dce7d5170cbc41e0bbec5e6387e82
Revert "improved config"
examples/service/swarm/fabfile.py
examples/service/swarm/fabfile.py
import fabricio from fabric import api as fab from fabricio import tasks, docker from fabricio.misc import AvailableVagrantHosts hosts = AvailableVagrantHosts(guest_network_interface='eth1') @fab.task(name='swarm-init') @fab.serial def swarm_init(): """ enable Docker swarm mode """ def _swarm_init()...
Python
0
@@ -426,17 +426,59 @@ arm init -' + --advertise-addr %7B0%7D'.format(fab.env.host) ,%0A
92e55388e427b9497947bf9534b612c744978bb6
Load config on startup, reorganize imports, remove comments, log dry run start
backend/api.py
backend/api.py
# create our little application :) import argparse import configparser from flask import Flask, request import random import tweepy app = Flask(__name__) dry_run = None def are_you_the_keymaster(): config = configparser.ConfigParser() config.read('keys.ini') return config def twitter_handler(message): ...
Python
0
@@ -28,16 +28,50 @@ tion :)%0A +from flask import Flask, request%0A%0A import a @@ -102,41 +102,8 @@ ser%0A -from flask import Flask, request%0A impo @@ -150,16 +150,16 @@ ame__)%0A%0A - dry_run @@ -164,16 +164,30 @@ n = None +%0Aconfig = None %0A%0Adef ar @@ -578,50 +578,8 @@ e))%0A - #return str(api.veri...
e196d2450d68158b4e63be11c8a83bcd89126345
Fix compatibility bug introduced by #762
indra/literature/pmc_client.py
indra/literature/pmc_client.py
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import re import logging import os.path import requests from lxml import etree from lxml.etree import QName import xml.etree.ElementTree as ET from indra.literature import pubmed_client from indra.util import Unicod...
Python
0
@@ -337,16 +337,88 @@ as UTB%0A%0A +# Python 2%0Atry:%0A basestring%0A# Python 3%0Aexcept:%0A basestring = str%0A%0A logger = @@ -4292,19 +4292,26 @@ nt.tag, -str +basestring ) and %5C%0A
fdcebafe4e6dadd5ea29858ac4ff595e5061f039
corrige erros
HumanRegex.py
HumanRegex.py
__title__ = 'HumanRegex' __version__ = '0.1.0' __author__ = 'Marcelo Fonseca Tambalo' import re class HumanRegex(object): def __init__(self): self.pattern = '' self.prefixes = '' self.source = '' self.suffixes = '' self.end_of_line_called = False self.start_of_li...
Python
0.000004
@@ -1,8 +1,19 @@ +import re%0A%0A __title_ @@ -96,20 +96,8 @@ '%0A%0A%0A -import re%0A%0A%0A clas @@ -252,91 +252,8 @@ ''%0A%0A - self.end_of_line_called = False%0A self.start_of_line_called = False%0A%0A @@ -614,24 +614,31 @@ def any(self +, value ):%0A r @@ -681,17 +681,16 @@ ) + %22...
3a15797507678c1ae2962e5421ba2c28afe01f26
Remove outdated comments.
Lib/symbol.py
Lib/symbol.py
#! /usr/bin/env python # # Non-terminal symbols of Python grammar (from "graminit.h") # # This file is automatically generated; please don't muck it up! # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # PYTHONPATH=Lib:Modules...
Python
0
@@ -295,175 +295,28 @@ -PYTHONPATH=Lib:Modules ./python Lib/symbol.py%0A#%0A# (this path allows the import of string.py, token.py, and regexmodule.so%0A# for a site with no installation in place) +python Lib/symbol.py %0A%0A#- @@ -1550,22 +1550,4 @@ n()%0A -%0A#%0A# end of file%0A
b3e78b4934bebaf43fdb7787c5a3b3e166a35e23
Bump to 0.2.1
cms_bootstrap3/__init__.py
cms_bootstrap3/__init__.py
__version__ = '0.2.0'
Python
0.000563
@@ -12,11 +12,11 @@ = '0.2. -0 +1 '%0A
a2fdd4c71c53095ce0285ab562f88950aab01bd7
Fix indentation
scripts/add_users.py
scripts/add_users.py
from google.cloud import firestore import argparse import datetime import names import random genders = [u'male', u'female'] interests = [u'Movies', u'Football', u'Books', u'Music'] script_version=1 def queryUsers(db): users_ref = db.collection(u'users') docs = users_ref.get() for doc in docs: print(u'{} => {}...
Python
0.017244
@@ -214,17 +214,18 @@ rs(db):%0A -%09 + users_re @@ -252,17 +252,18 @@ users')%0A -%09 + docs = u @@ -278,17 +278,18 @@ .get()%0A%0A -%09 + for doc @@ -297,17 +297,18 @@ n docs:%0A -%09 + print( @@ -394,17 +394,18 @@ range):%0A -%09 + doc_ref @@ -441,17 +441,18 @@ ument()%0A -%09 + uid = do ...