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
737f85cba5c9abe018251d7cbdee52aef88ed29e
Add storebot link to /about.
VocaBot/text.py
VocaBot/text.py
import logging import re from urllib.parse import unquote from telegram import ParseMode from telegram.ext import ConversationHandler from constants import __version__, OWNER_IDS from i18n import _ from settings import translate from util import botan_track BASE_START_TEXT = _("""Hello {user_name}! I'm {bot_name}. I...
Python
0
@@ -983,16 +983,137 @@ hub%3C/a%3E. +%0AIf you like this bot, please consider giving a 5 star rating on %3Ca href=%22https://storebot.me/bot/vocadbbot%22%3Estorebot%3C/a%3E %22%22%22)%0A%0A#
347fb9d271f2e8ca27465727c9d56135e9f6a266
Print more status messages during export API reads
mediawiki.py
mediawiki.py
""" Methods for importing mediawiki pages, images via the simplemediawki wrapper to the MediaWiki API. Copyright (C) 2014 Angus Gratton Licensed under New BSD License as described in the file LICENSE. """ from __future__ import print_function, unicode_literals, absolute_import, division import simplemediawiki from ppr...
Python
0
@@ -746,48 +746,131 @@ p -ages = self._query(query, %5B 'allpages' %5D +rint(%22Getting list of pages...%22)%0A pages = self._query(query, %5B 'allpages' %5D)%0A print(%22Query page revisions...%22 )%0A
6dec95cd844130a97f9cb0df2a5855fe641e4fe8
Add base_url to network search results expectations for tests
kolibri/core/discovery/test/test_network_search.py
kolibri/core/discovery/test/test_network_search.py
import socket import mock from django.test import TestCase from zeroconf import BadTypeInNameException from zeroconf import service_type_name from zeroconf import ServiceInfo from zeroconf import Zeroconf from ..utils.network.search import _id_from_name from ..utils.network.search import get_available_instances from ...
Python
0
@@ -4217,16 +4217,150 @@ %22: %5B%5D%7D,%0A + %22base_url%22: %22http://%7Bip%7D:%7Bport%7D/%22.format(%0A ip=MOCK_INTERFACE_IP, port=MOCK_PORT%0A ),%0A
d65a8e09068d66c8e7debeb0469aedc7bf03af13
Bump django.VERSION for RC 1.
django/__init__.py
django/__init__.py
VERSION = (1, 1, 0, 'beta', 1) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: version = '%s %s' % (version, VERSION[3]) if V...
Python
0.002017
@@ -18,12 +18,10 @@ 0, ' -beta +rc ', 1
9c1dfaefa9f670abbb04daae5f9e6680c3ba14c6
read ser
add_to_files.py
add_to_files.py
from Adafruit_BME280 import * import paho.mqtt.client as paho import veml6070 import time import os, sys broker = "127.0.0.1" port = 1883 def on_publish(client, userdata, result): # create function for callback print("data published \n") pass def main(): sensor = BME280(p_mode=BME280_OSAMPLE_8, t_mode...
Python
0.00006
@@ -86,23 +86,8 @@ time -%0Aimport os, sys %0A%0Abr @@ -670,16 +670,21 @@ ME_1T)%0A%0A + # file @@ -698,23 +698,16 @@ en(%E2%80%9Ctemp -erature .txt%E2%80%9D, %E2%80%9D
f759284954c1fc85e785bdaa0849eee30ce01e77
Set historical WHOIS to appropriate timeframe
pivoteer/models.py
pivoteer/models.py
import pickle import hashlib import datetime from django.db import models from django.db.models import Q from django.db.models import Max, Min from django_pgjson.fields import JsonField from core.utilities import check_domain_valid, get_base_domain class IndicatorManager(models.Manager): def host_records(self, i...
Python
0.000033
@@ -4455,17 +4455,18 @@ (hours=- -0 +24 )%0A%0A
1598056fb65879f73020eca9f8f5a731a6872a3d
Add PriceField
fields_bundle/forms/prices.py
fields_bundle/forms/prices.py
# encoding: utf-8 import re import os import logging import locale import json from django.conf import settings from django import forms from django.core.exceptions import ValidationError from django.utils.encoding import force_unicode from django.forms.utils import flatatt from babel.numbers import format_number, f...
Python
0
@@ -2122,17 +2122,8 @@ s': -original_ json @@ -2925,32 +2925,331 @@ rgs%5B'currency'%5D%0A + attrs = %7B%0A 'placeholder': self.currency,%0A 'class': 'price-formated',%0A 'data-currency': self.currency,%0A 'data-currency-patterns': json.dumps(CURRENCY_PATTERNS)%0A ...
8e689d1c5b72818a2cdb2ff72532150fe1df942b
Add missing documentation
python/thunder/rdds/spatialseries.py
python/thunder/rdds/spatialseries.py
from numpy import corrcoef, clip from thunder.rdds.series import Series class SpatialSeries(Series): """ Distributed collection of 1d array data with spatial coordinates. Backed by an RDD of key-value pairs where the key is a tuple identifying a spatial coordinate (e.g. x,y,z), and the value is ...
Python
0.000005
@@ -1954,16 +1954,658 @@ orhood): +%0A %22%22%22%0A Correlate every signal to the average of its local neighborhood.%0A%0A This algorithm computes, for every spatial record, the correlation coefficient%0A between that record's series, and the average series of all records within%0A a...
3927edb6e910643cc88b5960c983994f5fd28304
Fix RawId Field
muffin_admin/peewee.py
muffin_admin/peewee.py
"""Peewee support.""" import muffin import peewee as pw from wtforms import fields as f, Form, StringField from .filters import pw_converter from .handler import AdminHandler try: from wtfpeewee.orm import model_form, ModelConverter ModelConverter.defaults[pw.DateField] = f.DateField ModelConverter.def...
Python
0.000001
@@ -229,24 +229,35 @@ delConverter +, FieldInfo %0A%0A ModelC @@ -512,17 +512,8 @@ rm = - None%0A Mod @@ -608,24 +608,191 @@ tation.%22%22%22%0A%0A + def __init__(self, field, *args, **kwargs):%0A %22%22%22Store model field.%22%22%22%0A self.field = field%0A super(RawIDField, self)._...
9a6ae576e971af16745deb2a1f501b19d00c7af8
Update rv_transformation_tests.py
GPy/testing/rv_transformation_tests.py
GPy/testing/rv_transformation_tests.py
# Written by Ilias Bilionis """ Test if hyperparameters in models are properly transformed. """ import unittest import numpy as np import scipy.stats as st import GPy class TestModel(GPy.core.Model): """ A simple GPy model with one parameter. """ def __init__(self): GPy.core.Model.__init__(s...
Python
0.000002
@@ -2024,18 +2024,17 @@ hecks = -10 +5 %0A
9a1fc6d68b0ff15fbd177a415213ed82cfc81e0e
Remove superfluous admin autodiscover.
familio/urls.py
familio/urls.py
""" Default urlconf for familio """ from django.conf.urls import include, patterns, url from django.conf.urls.static import static from django.conf import settings from filebrowser.sites import site from django.contrib import admin from django.contrib.auth import get_user_model from django.views.generic import Templat...
Python
0
@@ -162,43 +162,8 @@ ngs%0A -from filebrowser.sites import site%0A from @@ -191,16 +191,16 @@ t admin%0A + from dja @@ -284,16 +284,51 @@ ateView%0A +from filebrowser.sites import site%0A from daj @@ -474,29 +474,8 @@ ce%0A%0A -admin.autodiscover()%0A daja
cc7a876be6c49bff68031d242d92e28d0756e202
Add KeyFactory.
farmfs/keydb.py
farmfs/keydb.py
from fs import Path from fs import ensure_dir from fs import ensure_file from hashlib import md5 from json import loads, JSONEncoder, JSONDecoder from errno import ENOENT as NoSuchFile from errno import EISDIR as IsDirectory from os.path import sep def checksum(value_str): return md5(str(value_str)).hexdigest() cla...
Python
0
@@ -474,16 +474,121 @@ oder()%0A%0A + #TODO I DONT THINK THIS SHOULD BE A PROPERTY OF THE DB UNLESS WE HAVE SOME ITERATOR BASED RECORD TYPE.%0A def wr @@ -2386,24 +2386,366 @@ elete(self.prefix+key)%0A%0A +def KeyFactory(object):%0A def __init__(self, keydb, type_):%0A self.keydb = keydb%0A self.type_ = ty...
b2962c9b9bcede38bfeef6285a5300699fa7ffa4
fix orator cmd test
tests/test_contrib/test_extensions/test_orator.py
tests/test_contrib/test_extensions/test_orator.py
from unittest import mock import sys import pytest from grpc import StatusCode from orator.exceptions.orm import (ModelNotFound, RelatedClassNotFound, ValidationError) from sea import cli from sea.contrib.extensions import orator from sea.contrib.extensions.orator.middleware import O...
Python
0.000001
@@ -2369,47 +2369,205 @@ p):%0A +%0A -sys.argv = %5B'sea', 'orator', '-h' +class EntryPoint:%0A%0A def load(self):%0A from sea.contrib.extensions.orator.cmd import main%0A return main%0A%0A def new_entry_iter(name):%0A return %5BEntryPoint() %5D%0A +%0A @@ -2575,52 +...
b689a5a2dfee54e1072912919a8ce214847d26ab
return the raw object
pipeline.py
pipeline.py
#!/usr/bin/env python import json import subprocess import sys,time class PipelineDependencyFailedException(Exception): pass class PipelineDependencyNotFinishedException(Exception): pass class PipelineProcess(object): def __init__(self, jsonParameters,config): self._id = jsonParameters['i...
Python
1
@@ -1985,23 +1985,24 @@ def -process +original JSON(sel @@ -2037,16 +2037,17 @@ Object%0A%0A +%0A class Pi @@ -2053,22 +2053,32 @@ ipeline( -object +json.JSONEncoder ):%0A d @@ -2150,16 +2150,24 @@ None):%0A + %0A
3800ce7132945424016c930a4e90e81dbb0afb37
bump version
aetros/const.py
aetros/const.py
__version__ = '0.12.0' __prog__ = "aetros" class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' class JOB_STATUS: PROGRESS_STATUS_CREATED = 0 PROGRESS_STATUS_QU...
Python
0
@@ -11,17 +11,17 @@ _ = '0.1 -2 +3 .0'%0A__pr
d7987a7fc3a40f9342aac1e09e1569d374675eab
purge useless memory total_reward history
slm_lab/agent/memory/base.py
slm_lab/agent/memory/base.py
from abc import ABC, abstractmethod from collections import deque from slm_lab.lib import logger, util import numpy as np import pydash as ps logger = logger.get_logger(__name__) class Memory(ABC): ''' Abstract class ancestor to all Memories, specifies the necessary design blueprint for agent body to wor...
Python
0.000002
@@ -1359,112 +1359,8 @@ = 0 -%0A self.total_reward_h = %5B%5D%0A self.avg_total_reward = 0%0A self.avg_total_reward_h = %5B%5D %0A%0A @@ -2141,238 +2141,8 @@ ard%0A - if done:%0A self.total_reward_h.append(self.total_reward)%0A self.avg_total_reward = np.mean(self...
c28ca58537102a5caf549ac94bd3a1e49d0b0351
Add missing attributes to Poll and PollOption `__init__`
fbchat/_poll.py
fbchat/_poll.py
# -*- coding: UTF-8 -*- from __future__ import unicode_literals import attr @attr.s(cmp=False) class Poll(object): """Represents a poll""" #: ID of the poll uid = attr.ib(None, init=False) #: Title of the poll title = attr.ib() #: List of :class:`PollOption`, can be fetched with :func:`fbcha...
Python
0
@@ -144,66 +144,8 @@ %22%22%0A%0A - #: ID of the poll%0A uid = attr.ib(None, init=False)%0A @@ -355,35 +355,69 @@ attr.ib(None -, init=Fals +)%0A #: ID of the poll%0A uid = attr.ib(Non e)%0A%0A @cla @@ -820,73 +820,8 @@ %22%22%0A%0A - #: ID of the poll option%0A uid = attr.ib(None, init=F...
361ed07073599c97b71a5ba66c2aa8990f29a0ed
add more argument logging
agilebot/cmd.py
agilebot/cmd.py
__author__ = 'ntrepid8' import argparse import os import sys import pytoml as toml import logging from copy import copy from pprint import pformat from colorlog import ColoredFormatter from agilebot import ( agilebot, cmd_slack, cmd_sprint, cmd_trello, util ) CONFIG_PATH = os.path.expanduser('~/.ag...
Python
0
@@ -3623,22 +3623,20 @@ .debug(' -p ar +g s -er namespa @@ -3662,24 +3662,88 @@ mat(args)))%0A + logger.debug('main parser: %7B%7D'.format(pformat(parser)))%0A sys.
295584314e19a191a59450e053b21809adceca2a
Fix django template context passing
haystack/management/commands/build_solr_schema.py
haystack/management/commands/build_solr_schema.py
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals from django.core.exceptions import ImproperlyConfigured from django.core.management.base import BaseCommand from django.template import Context, loader from haystack import connections, connection_router, constants f...
Python
0.000009
@@ -1580,16 +1580,8 @@ urn -Context( %7B%0A @@ -1855,17 +1855,16 @@ %7D -) %0A%0A de
ace4c19a9e97ff74a1ee1f221e417fa95601c2b1
fix bug
fbchat/utils.py
fbchat/utils.py
import re import json from time import time from random import random, choice USER_AGENTS = [ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/601.1.10 (KHTML, like Gecko) Vers...
Python
0.000001
@@ -889,20 +889,17 @@ (text):%0A - +%09 return j @@ -927,10 +927,16 @@ r.*( -;; +.*;.*;.* ).*; @@ -947,16 +947,32 @@ ', text. +encode('utf-8'). decode(%22 @@ -996,78 +996,8 @@ 1)) - # have bug !!! AttributeError: 'str' object has no attribute 'decode' %0A%0Ade @@ -1480,9 +1480,8 @@ t_id));%0A -%0A
14ebb106c868bad8573375428ac6f6e2b700e354
Update base.py
fxcmminer_v1.1/fxcmminer/timemanagement/base.py
fxcmminer_v1.1/fxcmminer/timemanagement/base.py
from datetime import time, datetime, timedelta from dateutil import tz import pytz import pandas as pd class DateTimeManagement(object): """ This top level class will hold the attribuites of each the instruments date and time information. """ def _data_frequency(self, time_frame): freq_ke...
Python
0.000001
@@ -2061,32 +2061,34 @@ our=fx_open_hour +-1 , minute=59)%0A
bb104ac04e27e3354c4aebee7a0ca7e539232490
Use click.echo() for python 2.7 compatibility
regparser/commands/outline_depths.py
regparser/commands/outline_depths.py
import logging from regparser.tree.depth import optional_rules from regparser.tree.depth.derive import derive_depths import click logger = logging.getLogger(__name__) @click.command() @click.argument('markers', type=click.STRING, required=True) def outline_depths(markers) -> None: """ Infer an outline's st...
Python
0
@@ -757,13 +757,18 @@ -print +click.echo (for
ca2665c803f7e0e1c665d9bdf87241df9748d114
Correct calling capabilities in bidi log class
py/selenium/webdriver/remote/log.py
py/selenium/webdriver/remote/log.py
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
Python
0
@@ -7622,16 +7622,23 @@ = self. +driver. caps.get
025a5425b99b3507f354c275db1ac4d7963493a2
Change 'type' to 'type_'.
plots/plot_data.py
plots/plot_data.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import os import sys sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "proto")) import matplotlib.pyplot as plt import matplotlib.colors as colors import matplotlib.cm as mplcm from message_np import Message_np ...
Python
0.999303
@@ -1480,16 +1480,17 @@ e = type +_ .partiti
a6a09198404899d4d4f672cbab366b36a903249f
Mark xarray shading test fail for GMT<=6.1.1 (#649)
pygmt/tests/test_grdimage.py
pygmt/tests/test_grdimage.py
""" Test Figure.grdimage """ import numpy as np import pytest import xarray as xr from .. import Figure from ..datasets import load_earth_relief from ..exceptions import GMTInvalidInput from ..helpers.testing import check_figures_equal @pytest.fixture(scope="module", name="grid") def fixture_grid(): "Load the gr...
Python
0
@@ -74,16 +74,54 @@ ay as xr +%0Afrom packaging.version import Version %0A%0Afrom . @@ -135,16 +135,22 @@ t Figure +, clib %0Afrom .. @@ -275,16 +275,94 @@ _equal%0A%0A +with clib.Session() as _lib:%0A gmt_version = Version(_lib.info%5B%22version%22%5D)%0A%0A %0A@pytest @@ -1870,16 +1870,21 @@ k.xfail( +%0A ...
c40fddcb183f8588d1ab5a40a580f938651c2f7d
Tidy up models.py
feeds/models.py
feeds/models.py
from operator import or_ from django.db import models from django.db.models import Q from django.utils import timezone from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.utils.timesince import timesince # Make shortcut to this manager method for con...
Python
0.000046
@@ -831,16 +831,17 @@ return +u '%25s: %25s' @@ -2594,32 +2594,33 @@ return +u '%25s %25s %25s on %25s @@ -2623,32 +2623,32 @@ %25s %25s ago' %25 (%0A - @@ -2861,32 +2861,33 @@ return +u '%25s %25s %25s %25s ago @@ -3091,24 +3091,25 @@ return +u '%25s %25s on %25...
a0adedae79b3f06b6720014786220408cd0a1d8d
Correct docstring of module.
pygments/lexers/grammar_notation.py
pygments/lexers/grammar_notation.py
# -*- coding: utf-8 -*- """ pygments.lexers.grammar_notation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for parser generators. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, bygroups from pygments....
Python
0
@@ -115,25 +115,34 @@ for -parser generators +grammer notations like BNF .%0A%0A
dbedfc68a67379d76c6abb14beb569f7627b03df
Enable NaCl when building Chrome on the ASan bots.
masters/master.chromium.memory/master_linux_cfg.py
masters/master.chromium.memory/master_linux_cfg.py
# Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from master import master_config from master.factory import chromium_factory defaults = {} helper = master_config.Helper(defaults) B = helper.Builder F...
Python
0.000002
@@ -1638,57 +1638,8 @@ =0 ' -%0A 'disable_nacl=1 ' )%7D,%0A
b9ca6825bc76c0676354a7bcb3dbdec66a3ba2dd
Fix a failing test due to GMT API change (#556)
pygmt/tests/test_clib_put_matrix.py
pygmt/tests/test_clib_put_matrix.py
""" Test the functions that put matrix data into GMT. """ import numpy as np import numpy.testing as npt import pytest from .test_clib import mock from .. import clib from ..exceptions import GMTCLibError from ..helpers import GMTTempFile def test_put_matrix(): "Check that assigning a numpy 2d array to a datase...
Python
0.000003
@@ -2946,39 +2946,37 @@ %22GMT_IS_ -SURFACE +POINT %22,%0A
e4c2fe840cdd03697f20ac27229d0a1ed3734c70
Fix bug with function completion if def was found in the current line, not it checks for 'def ' at start of line only
pyqode/python/modes/autocomplete.py
pyqode/python/modes/autocomplete.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # #The MIT License (MIT) # #Copyright (c) <2013> <Colin Duquesnoy and others, see AUTHORS.txt> # #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 wit...
Python
0.000004
@@ -4257,16 +4257,17 @@ elif +( e.text() @@ -4277,25 +4277,34 @@ %22(%22 and - %22def%22 in +%0A self.ed @@ -4323,16 +4323,45 @@ LineText +.lstrip().startswith(%22def %22)) :%0A
2bddfb82dde0ca4c9edd0e303a43e95618faf826
Add __hash__ so objects may be used in hashtable based datastructures
net/ifrename/macpci.py
net/ifrename/macpci.py
#!/usr/bin/env python # Copyright (c) 2012 Citrix Systems, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; version 2.1 only. with the special # exception on linking described in fi...
Python
0.000102
@@ -665,17 +665,17 @@ = %221.0. -0 +1 %22%0A__auth @@ -1517,16 +1517,93 @@ (self)%0A%0A + def __hash__(self):%0A return hash(%22%25s-%25s%22 %25 (self.mac, self.pci))%0A%0A def
2342540bea0e638dc39d99e3030f10475df97264
eliminate sprites ambiguity
block.py
block.py
# -*- coding: utf-8 -*- #Copyright (c) 2010 Walter Bender #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, mer...
Python
0.998635
@@ -1328,17 +1328,21 @@ , sprite -s +_list ):%0A @@ -1388,17 +1388,21 @@ = sprite -s +_list %0A%0A de
4d18e524f4ad3275492bfa6dfcf2d0a113d6dede
fix validate function not allowing exp, log, sin, ...
netpyne/specs/utils.py
netpyne/specs/utils.py
""" specs/utils.py Helper functions for high-level specifications Contributors: salvador dura@gmail.com """ from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install...
Python
0
@@ -1337,16 +1337,214 @@ d%22: rand +,%0A %22exp%22: exp, %22log%22:log, %22sqrt%22: sqrt,%0A %22sin%22:sin, %22cos%22:cos, %22tan%22:tan, %22asin%22:asin, %0A %22acos%22:acos, %22atan%22:atan, %22sinh%22:sinh, %22cosh%22:cosh, %0A %22tanh%22:tanh, %22pi%22:pi,%22e%22: e %0A %7D%0A
6569ed68b5edafe4b906c202b78bbd694ef0b214
reduce number of workers to 10
find-bad-ocr.py
find-bad-ocr.py
#!/usr/bin/env python import sys PY3 = sys.version_info > (3,) import re import csv import os if PY3: from queue import Queue else: from Queue import Queue from threading import Thread from progressbar import ProgressBar, Percentage, Bar, RotatingMarker, ETA, SimpleProgress DEBUG = False # DEBUG = True NUM_WO...
Python
0.999999
@@ -321,17 +321,17 @@ RKERS = -3 +1 0%0AMAX_FI
bf5c0c57f204e04bd303d02c5a12db0dc1705ff0
Return original word if unable to convert.
finglish/f2p.py
finglish/f2p.py
#!/usr/bin/env python3 import os import re import itertools from functools import reduce sep_regex = re.compile(r'[ \-_~!@#%$^&*\(\)\[\]\{\}/\:;"|,./?`]') def get_portable_filename(filename): path, _ = os.path.split(__file__) filename = os.path.join(path, filename) return filename def load_conversion_fi...
Python
0
@@ -1048,24 +1048,39 @@ nternal(word +, original_word ):%0A # thi @@ -1442,32 +1442,41 @@ eturn %5B(''.join( +original_ word), 1.0)%5D%0A @@ -3842,24 +3842,50 @@ .%0A%0A %22%22%22%0A%0A + original_word = word%0A%0A if word @@ -4090,16 +4090,31 @@ ternal(w +, original_word ))%0A%0A
1c4a195542b10e8ddd84d8a38534d9a9dba081b2
Fix import errors in jython
src/robot/running/timeouts.py
src/robot/running/timeouts.py
# Copyright 2008-2011 Nokia Siemens Networks Oyj # # 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...
Python
0.000009
@@ -609,68 +609,22 @@ ort -ctypes%0Aimport os%0Aimport threading%0A%0Aimport time%0Aimport thread +os%0Aimport time %0A%0Afr @@ -4264,16 +4264,86 @@ = 'nt':%0A + import ctypes%0A import thread%0A import threading%0A%0A %0A
12bacecd27ecc49bf02567ff4d8404adb1ecd36c
remove API, find HLS via simple regex
src/streamlink/plugins/tv8.py
src/streamlink/plugins/tv8.py
import logging import re from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream import HLSStream log = logging.getLogger(__name__) @pluginmatcher(re.compile( r'https?://www\.tv8\.com\.tr/canli-yayin' )) class TV8(Plugin): _player_schema = valida...
Python
0
@@ -295,294 +295,89 @@ _ -player_schema = validate.Schema(validate.all(%7B%0A 'servers': %7B%0A validate.optional('manifest'): validate.url(),%0A 'hlsmanifest': validate.url(),%0A %7D%7D,%0A validate.get('servers')))%0A%0A API_URL = ' +re_hls = re.compile(r%22%22%22file...
fbc75d784ddcc3d8b1f3aebed802614476804da5
allow multibox for textboxes in sidebars
src/parser/page_content.py
src/parser/page_content.py
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" from datetime import datetime from parser.box import Box from parser.navigation_page import NavigationPage from settings import JAHIA_DATE_FORMAT from parser.sidebar import Sidebar import logging import re class PageCont...
Python
0
@@ -2276,16 +2276,31 @@ nt=extra +, multibox=True )%0A
9e05a82f9c62bd228fd08e9bed23a22acce013d9
improve error message for missing rqlited
src/pyrqlite/_ephemeral.py
src/pyrqlite/_ephemeral.py
import contextlib import os import shutil import socket import subprocess import tempfile import time class EphemeralRqlited(object): def __init__(self): self.host = None self.http = None self.raft = None self._tempdir = None self._proc = None @staticmethod def _u...
Python
0.007374
@@ -12,16 +12,29 @@ textlib%0A +import errno%0A import o @@ -81,16 +81,27 @@ process%0A +import sys%0A import t @@ -1513,16 +1513,78 @@ evnull:%0A + filename = 'rqlited'%0A try:%0A @@ -1626,19 +1626,21 @@ en(%5B -'rqlited',%0A +filename,%0A @@ -1655,16 +1655,17...
f34ee1d180b1623823efd168bcc8f88e08864555
Fix drug class to pull BRITE information
src/rnaseq_lib/web/kegg.py
src/rnaseq_lib/web/kegg.py
import os import pandas as pd from rnaseq_lib.web import _rget # Gene Functions def find_gene(query, database='genes', human_only=True): r = _kegg_search(operation='find', database=database, query=query) if r: for hit in r.text.split('\n'): hit = hit.split('\t')[0] if human_o...
Python
0.000001
@@ -1032,128 +1032,426 @@ -for line in text.split('%5Cn'):%0A if line.startswith('CLASS'):%0A return str(line.split()%5B-1%5D)%0A%0A if text +values = %5B%5D%0A%0A # Flag for once the BRITE is reached%0A brite = False%0A for line in text.split('%5Cn'):%0A line = line.strip().s...
18c24c724603f443e0d42846696571d9a27c18e7
fix bad help text
corehq/apps/userreports/management/commands/rebuild_indicator_table.py
corehq/apps/userreports/management/commands/rebuild_indicator_table.py
from django.core.management.base import LabelCommand, CommandError from corehq.apps.userreports import tasks class Command(LabelCommand): help = "Rebuild a user configurable reporting table" args = '<indicator_config_id>' label = "" def handle(self, *args, **options): if len(args) < 1: ...
Python
0.999902
@@ -352,16 +352,31 @@ is -copy_doc +rebuild_indicator_table %25s'
bfab81b0da8567e8ceb9a58a65e5d8021fcb4c87
fix the issue that callbacks cannot be pickled by CPython.
angr/engines.py
angr/engines.py
from simuvex import SimEngine, SimProcedures, SimSuccessors, SimEngineProcedure # pylint: disable=abstract-method,unused-argument import logging l = logging.getLogger('angr.engines') class SimEngineFailure(SimEngine): def __init__(self, project): super(SimEngineFailure, self).__init__() self.p...
Python
0
@@ -1780,16 +1780,317 @@ lure()%0A%0A + #%0A # Pickling%0A #%0A%0A def __setstate__(self, state):%0A super(SimEngineFailure, self).__setstate__(state)%0A self.project = state%5B'project'%5D%0A%0A def __getstate__(self):%0A s = super(SimEngineFailure, self).__getstate__()%0A s...
4b1030d66a86dc623fef10ccd05ea98ea2b5e249
Fix path to data directory.
plugins/station.py
plugins/station.py
from irc3 import asyncio from irc3.plugins.command import command import io import re import json import aiohttp from datetime import datetime from dateutil import tz from difflib import get_close_matches URL = "https://evag-live.wla-backend.de/node/v1/departures/{extId}" RE_FIX = "(,\\s*|\\s*-\\s*){component}|{com...
Python
0
@@ -106,16 +106,26 @@ aiohttp +%0Aimport os %0A%0Afrom d @@ -351,16 +351,130 @@ -%5C%5Cs*)%22%0A +STATION_FILE = os.path.dirname(os.path.realpath(__file__)) + %5C%0A '/../data/stations.latest.json'%0A %0A%0Adef lo @@ -609,35 +609,20 @@ pen( -%22data/stations.latest.json%22 +STATION_FILE ) as @@...
1af2d7dbb26b4836d2dad2419468c2e1a8ba7c97
Call reload settings on handler init. This prevents an exception if we update status msg too quickly.
handlers/base.py
handlers/base.py
try: from ... import editor except ValueError: from floo import editor from .. import msg, event_emitter, shared as G, utils BASE_FLOORC = '''# Floobits config # Logs messages to Sublime Text console instead of a special view #log_to_console 1 # Enables debug mode #debug 1 ''' class BaseHandler(event_emi...
Python
0
@@ -474,16 +474,47 @@ T = self +%0A self.reload_settings() %0A%0A de
ccd9a7cded1a0189b4e8c8e878b20ad654497918
Drop support for py.test-1.3 and older
edgedb/lang/common/test/shell.py
edgedb/lang/common/test/shell.py
## # Copyright (c) 2010 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## import os import sys import py from semantix.utils import shell from semantix.utils.test import Exceptions as ExceptionConfig class TestCommand(shell.Command, name='test', expose=True): def get_parser(self, subparsers, ...
Python
0
@@ -91,18 +91,8 @@ #%0A%0A%0A -import os%0A impo @@ -2000,214 +2000,330 @@ -test_args = %5B%5D%0A%0A # both full and short plugin name are listed for before/after pytest-2.0 compatibility%0A test_args.extend(('-p', 'semantix.utils.test.pytest_semantix', '-p', 'semantix', +if tuple(py.__version__....
ebfbfacc7c983a12a7193f0deb8876ee27499ab6
Fix the sphinx docstring links to external interfaces
pywayland/scanner/printer.py
pywayland/scanner/printer.py
# Copyright 2015 Sean Vig # # 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, sof...
Python
0.000013
@@ -7912,17 +7912,16 @@ ss_name%7D -. %7Bfunc%7D%3E%60
6664d6a7fea7e3ede65187e90948c181a2588dca
Add assert for absolute paths in functions that require them.
src/toil_scripts/lib/files.py
src/toil_scripts/lib/files.py
from contextlib import closing import os import errno import tarfile import shutil # FIXME: replace with bd2k.util.files.mkdir_p def mkdir_p(path): """ It is Easier to Ask for Forgiveness than Permission :param str path: path to directory to create """ try: os.makedirs(path) except OS...
Python
0
@@ -912,32 +912,120 @@ in file_paths:%0A + assert file_path.startswith('/'), 'Path provided is relative not absolute.'%0A arcn @@ -1374,32 +1374,116 @@ in file_paths:%0A + assert file_path.startswith('/'), 'Path provided is relative not absolute.'%0A dest = o
b1b504ca45a1d685f6c8650f15fc2e907ccdf9f9
Update question_5.py
quiz-questions/question_5.py
quiz-questions/question_5.py
"""Intro to Python - Week 1 - Quiz.""" # Question 5 def calculate_tax(income): """Implement the code required to make this function work. Write a function `calculate_tax` that receives a number (`income`) and calculates how much of Federal taxes is due, according to the following table: | Incom...
Python
0.001502
@@ -949,9 +949,277 @@ -pass +income = int(input()%0A while income %3C= 50000:%0A return income * 0.15%0A elif income %3C= 75000:%0A return income * 0.25%0A elif income %3C= 100000:%0A return income * .30%0A else:%0A return inc...
6bfeea989d59a08f7208b0156f9586921dded12a
Fix is_enabled checking
radar/radar/auth/sessions.py
radar/radar/auth/sessions.py
from flask import request, has_request_context, _request_ctx_stack from itsdangerous import BadSignature, TimestampSigner from sqlalchemy import func from werkzeug.local import LocalProxy from radar.database import db from radar.models.user_sessions import AnonymousSession, UserSession from radar.models.users import U...
Python
0.000002
@@ -719,20 +719,17 @@ ame%0A -user +q = User. @@ -729,34 +729,34 @@ = User.query -%5C %0A - +q = q .filter(User @@ -777,26 +777,80 @@ sername) -%5C %0A - +q = q.filter(User.is_enabled == True) # noqa%0A%0A user = q .first() @@ -3376,42 +3376,72 @@ -return UserSession.query%5C%0A ...
9d1f3d62db6d2f42ae94023759427773bff61f41
Raise err.orig rather than err
nmi_mysql/nmi_mysql.py
nmi_mysql/nmi_mysql.py
""" Custom mysql wrapper for sqlalchemy Useful for raw queries and scripting """ from sqlalchemy import create_engine from pymysql.cursors import DictCursor import re import logging CONFIG_KEYS = ['host', 'user', 'password', 'db', 'port'] MAX_POOL_SIZE = 10 class DB(object): def __init__(self, conf, ...
Python
0
@@ -3771,16 +3771,21 @@ warn(err +.orig )%0A @@ -3791,32 +3791,37 @@ raise err +.orig %0A%0A return
13e9db007e41d52dfdb596c94567565135aecb03
Add getRemoteCredentials.
rest/authUtils.py
rest/authUtils.py
# Author: Braedy Kuzma import base64 from pprint import pprint # TODO stop logging accesses from django.http import HttpResponse from rest_framework import authentication from rest_framework import exceptions from .models import LocalCredentials def createBasicAuthToken(username, password): """ This creates ...
Python
0
@@ -30,16 +30,50 @@ base64%0A +from urllib.parse import urlsplit%0A from ppr @@ -1238,16 +1238,474 @@ sword)%0A%0A +def getRemoteCredentials(url):%0A %22%22%22%0A Finds a remote host that can be used for the given url.%0A Returns None if it couldn't find.%0A %22%22%22%0A hostSplit = urlsplit(url)%0A ...
a50cbf369a1eb17ce5dd23882af96148ea262172
fix imcompatibility between json and model
forum/models.py
forum/models.py
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.template.defaultfilters import slugify from autoslug import AutoSlugField from core.models import Course, Lesson class Question(models.Model): title = models.Ch...
Python
0
@@ -466,11 +466,11 @@ gth= -100 +255 , ed
3b3c7b459e84b04143220ea05b6324de870df30d
add a progress bar while downloading images
fotowebcamdl.py
fotowebcamdl.py
""" A script for downloading best-of images from www.fotowebcam.eu """ import argparse import json import urllib.request as urllib import os import sys import requests IMAGE_URL_PATTERN = "http://www.foto-webcam.eu/webcam/%s/" BESTOF_URL_PATTERN = "http://www.foto-webcam.eu/webcam/include/list.php?img=&wc=%s&bestof=1"...
Python
0
@@ -160,16 +160,38 @@ requests +%0Afrom tqdm import tqdm %0A%0AIMAGE_ @@ -428,24 +428,199 @@ s.getcwd()%0A%0A +class TqdmUpTo(tqdm):%0A def update_to(self, b=1, bsize=1, tsize=None):%0A if tsize is not None:%0A self.total = tsize%0A self.update(b * bsize - self.n)%0A%0A def print_re @@ -...
450c1c1db8bd23dd16a84b30d75e50e0f94600fb
Exclude the hypernyms already appearing in the synset
misc/link.py
misc/link.py
#!/usr/bin/env python from signal import signal, SIGPIPE, SIG_DFL signal(SIGPIPE, SIG_DFL) import argparse import csv import sys import itertools from collections import defaultdict, Counter from math import log from sklearn.feature_extraction import DictVectorizer from sklearn.metrics.pairwise import cosine_similari...
Python
0.000081
@@ -2819,16 +2819,114 @@ .keys()) +%0A hsenses = %7Bhypernym: hid for hypernym, hid in hsenses.items() if hypernym not in synsets%5Bid%5D%7D %0A%0A re
541e86f46e0e411936b9f97317e4a77d9b51d2e6
move imports outside
src/rpclib/test/test_sqla.py
src/rpclib/test/test_sqla.py
#!/usr/bin/env python # # rpclib - Copyright (C) Rpclib contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
Python
0
@@ -881,88 +881,406 @@ lib. -model.table import TableSerializer%0Afrom rpclib.model.complex import ComplexModel +application import Application%0Afrom rpclib.decorator import rpc%0Afrom rpclib.interface.wsdl import Wsdl11%0Afrom rpclib.model.table import TableSerializer%0Afrom rpclib.model.complex import ComplexModel%...
a39bb013179b0b4f3749c1f9fc99f8f90706b36e
Add a couple more donation options
readthedocs/donate/models.py
readthedocs/donate/models.py
from django.db import models from django.utils.translation import ugettext_lazy as _ AMOUNT_CHOICES = ( (5, '$5'), (10, '$10'), (25, '$25'), (50, '1 Hour ($50)'), (100, '2 Hours ($100)'), (200, '4 Hours ($200)'), (400, '1 Day ($400)'), (800, '2 Days ($800)'), (1200, '3 Days ($1200)'...
Python
0
@@ -376,16 +376,109 @@ 000)'),%0A + (4000, '2 Weeks ($4000)'),%0A (6000, '3 Weeks ($6000)'),%0A (8000, '4 Weeks ($8000)'),%0A )%0A%0A%0Aclas @@ -1064,66 +1064,8 @@ =30, -%0A choices=AMOUNT_CHOICES, def
9e8009b501ca7001f5346b278cd59ad596e3ebe0
Bump version number to 0.2.1
popeui/__init__.py
popeui/__init__.py
__version__ = "0.2.0" from .application import Application, View
Python
0.000448
@@ -12,17 +12,17 @@ = %220.2. -0 +1 %22%0Afrom .
5724ea0aa9d09b1af42f52e86a87dad4abda58e0
Remove search autosync from tests
readthedocs/settings/test.py
readthedocs/settings/test.py
from __future__ import absolute_import import os from .dev import CommunityDevSettings class CommunityTestSettings(CommunityDevSettings): SLUMBER_USERNAME = 'test' SLUMBER_PASSWORD = 'test' SLUMBER_API_HOST = 'http://localhost:8000' # A bunch of our tests check this value in a returned URL/Domain ...
Python
0
@@ -516,11 +516,12 @@ C = -Tru +Fals e%0A%0A
19fff3f8c5e7cda590ad578638aec09349d09f11
make username unique
api/__init__.py
api/__init__.py
import os, bcrypt from eve import Eve from flask.ext.bootstrap import Bootstrap from eve_docs import eve_docs from eve.auth import BasicAuth class BCryptAuth(BasicAuth): def check_auth(self, username, password, allowed_roles, resource, method): accounts = app.data.driver.db['accounts'] account = accounts.fin...
Python
0.000452
@@ -565,24 +565,45 @@ ired': True%0A + 'unique': True%0A %7D,%0A '
4fe3840d3297df2a158a3fd15d3de7a2e4da86aa
reorganize url patterns
api/api/urls.py
api/api/urls.py
from django.conf.urls import include, url from rest_framework.urlpatterns import format_suffix_patterns from desecapi import views from rest_framework.routers import SimpleRouter tokens_router = SimpleRouter() tokens_router.register(r'', views.TokenViewSet, base_name='token') tokens_urls = tokens_router.urls apiurls ...
Python
0.000116
@@ -39,70 +39,8 @@ url%0A -from rest_framework.urlpatterns import format_suffix_patterns%0A from @@ -213,45 +213,685 @@ n')%0A -tokens_urls = tokens_router.urls +%0Aauth_urls = %5B%0A url(r'%5Eusers/create/$', views.UserCreateView.as_view(), name='user-create'), # deprecated%0A url(r'%5Etoken/create/$', views...
9ed7ae9445ca59d6fdd0764bfd5584ec1f231aa7
Add a test for static de-registration
cactus/tests/test_external.py
cactus/tests/test_external.py
#coding:utf-8 import os import shutil from cactus.static.external.exceptions import ExternalFailure from cactus.static.external import External from cactus.tests import SiteTest class TestExternal(External): runs = [] def run(self): out = super(TestExternal, self).run() if self.accepted(): ...
Python
0
@@ -2473,24 +2473,378 @@ te.build()%0A%0A + def test_deregister(self):%0A %22%22%22%0A Test that we can de-register a processor.%0A %22%22%22%0A self.site.external_manager.register_processor(DummyCriticalFailingProc)%0A self.assertRaises(ExternalFailure, self.site.build)%0A ...
07aa587a204e9b42d8435a7f128c9ce35a571fd9
Add on_delete per Jared's request
herald/models.py
herald/models.py
""" Models for notifications app. """ import json import jsonpickle import six from django.conf import settings from django.db import models from django.utils.module_loading import import_string @six.python_2_unicode_compatible class SentNotification(models.Model): """ Stores info on the notification that w...
Python
0
@@ -1320,24 +1320,51 @@ e, null=True +, on_delete=models.SET_NULL )%0A attach
220d2947ddda004eb7efe76d9ebc54f72303692c
allow timestamp
cantools/subparsers/decode.py
cantools/subparsers/decode.py
import sys import re import binascii import struct from argparse_addons import Integer from .. import database from .utils import format_message_by_frame_id # Matches 'candump' output, i.e. "vcan0 1F0 [8] 00 00 00 00 00 00 1B C1". RE_CANDUMP = re.compile(r'^\s*\S+\s+([0-9A-F]+)\s*\[\d+\]\s*([0-9A-F ]*)$') # Matc...
Python
0.000891
@@ -261,16 +261,31 @@ e(r'%5E%5Cs* +(?:%5C(.*?%5C))?%5Cs* %5CS+%5Cs+(%5B
e586a5bc79b5133d46ef686a014c1994e17dadbf
Handle optional but sometimes required project_id and team_slug in has_access
src/sentry/web/decorators.py
src/sentry/web/decorators.py
from functools import wraps from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404 from sentry.conf import settings from sentry.models import Project, Team, Group from sentry.web.helpers import get_project_list, render_to_r...
Python
0
@@ -977,41 +977,8 @@ est, - team_slug=None, project_id=None, *ar @@ -984,32 +984,32 @@ rgs, **kwargs):%0A + # Al @@ -1291,32 +1291,33 @@ %0A if +' team_slug:%0A @@ -1305,25 +1305,88 @@ f 'team_slug -: +' in kwargs:%0A team_slug = kwargs.pop('team_slug') %0A ...
9da8eb9f6b1b36af125529cc62d7c236ac72a51b
make lint
donut/modules/core/helpers.py
donut/modules/core/helpers.py
import flask import sqlalchemy def get_member_data(user_id, fields=None): """ Queries the database and returns member data for the specified user_id or list of user_id's. Arguments: user_id: The member (or list of members) to look up fields: The fields to return. If None specified, t...
Python
0.000171
@@ -4133,16 +4133,17 @@ d list%0A%0A +%0A def get_ @@ -4444,32 +4444,41 @@ %22%5D).select_from( +%0A sqlalchemy.text( @@ -4477,16 +4477,29 @@ my.text( +%0A %22 group_ @@ -4636,19 +4636,17 @@ ute(s, u - = += user_id)
4acaf59830de29e09e604231891247d709ae013d
Set start height to 0 if None
export.py
export.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # export.py - Exports enumerated data for reachable nodes into a JSON file. # # Copyright (c) 2014 Addy Yeow Chin Heng <ayeowch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation file...
Python
0.999999
@@ -2000,16 +2000,87 @@ port))%0A + if start_height is None:%0A start_height = (0,)%0A else:%0A star
24b3081bb2ecb0e195bd5a126972a4d59fc7576e
Update flowcell for directory names
project_management/pmtools/core/analysis.py
project_management/pmtools/core/analysis.py
""" Pm analysis module """ import sys import os import re from cement.core import controller from pmtools import AbstractBaseController from pmtools.lib.flowcell import Flowcell from pmtools.utils.misc import group_bcbb_files ## Main analysis controller class AnalysisController(AbstractBaseController): """ Fu...
Python
0
@@ -2730,83 +2730,8 @@ '%5D)%0A - print fc_new.filename%0A print fc_new.fc_id()%0A @@ -3013,16 +3013,51 @@ ', tgts) +%0A print fc_new.as_yaml() %0A%0A
a49e09ab00311a08296ce830443cc1b06338a502
Update comments
powershellmagic.py
powershellmagic.py
"""IPython magics for Windows PowerShell. """ __version__ = '0.1' import atexit import os from subprocess import Popen, PIPE import sys import tempfile from IPython.core.magic import (cell_magic, Magics, magics_class) from IPython.core.magic_arguments import ( argument, magic_arguments, parse_argstring) @magics...
Python
0
@@ -404,20 +404,29 @@ rShell.%0A + %22%22%22 %0A + # This cl @@ -447,16 +447,22 @@ ed after +%0A # IPython @@ -494,24 +494,16 @@ tMagics. -%0A %22%22%22 %0A%0A de @@ -935,171 +935,552 @@ ent( -'--out', type=str)%0A @argument('--err', type=str)%0A @cell_magic%0A def powershell(self, lin...
3b41c495bbaa9df58cbe38903b15d1985fbc6bd2
Clean some unused method in ceilometer/keystone_client.py
ceilometer/keystone_client.py
ceilometer/keystone_client.py
# # Copyright 2015 eNovance <licensing@enovance.com> # # 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 ...
Python
0.000007
@@ -609,61 +609,8 @@ os%0A%0A -from keystoneauth1 import exceptions as ka_exception%0A from @@ -1686,1278 +1686,8 @@ n%0A%0A%0A -def get_client_on_behalf_user(auth_plugin, trust_id=None,%0A requests_session=None):%0A %22%22%22Return a client for keystone v3 endpoint, optionally using ...
d978ad5e6a883f9dc3d3d6239cc8cea7902d180e
Remove remaining eod1 code
eodatasets2/metadata/__init__.py
eodatasets2/metadata/__init__.py
# coding=utf-8 from __future__ import absolute_import import json import logging from pathlib import Path import eodatasets2.type as ptype _LOG = logging.getLogger(__name__) # From the gaip codebase. Lookup table for sensor information. with Path(__file__).parent.joinpath("sensors.json").open() as fo: SENSORS ...
Python
0
@@ -106,41 +106,8 @@ th%0A%0A -import eodatasets2.type as ptype%0A %0A_LO @@ -1482,2505 +1482,4 @@ SES%0A -%0A%0Adef get_groundstation(gsi):%0A %22%22%22%0A%0A :param gsi:%0A :rtype: ptype.GroundstationMetadata%0A %3E%3E%3E get_groundstation('ASA')%0A GroundstationMetadata(code='ASA', label='Alice Spr...
bac47ece707ad6bc43b8513d7eb4484ef2dab42e
Add Catch v2.2.1 and v1.12.1 (#7615)
var/spack/repos/builtin/packages/catch/package.py
var/spack/repos/builtin/packages/catch/package.py
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0
@@ -1417,16 +1417,73 @@ ar.gz%22%0A%0A + version('2.2.1', '54e56803c84890636bd7fe6c3856b104')%0A vers @@ -1600,24 +1600,82 @@ 4bacb1803')%0A + version('1.12.1', '7d89cffd9d61f4fdcbdb373b70cc92d1')%0A version(
b250f4d93c90bb82cfcac28038b245ab6234805c
fix merge
howdoi/howdoi.py
howdoi/howdoi.py
#!/usr/bin/env python ################################################## # # howdoi - a code search tool. # written by Benjamin Gleitzman (gleitz@mit.edu) # inspired by Rich Jones (rich@anomos.info) # ################################################## import urllib import urllib2 import sys import json import argpars...
Python
0.000001
@@ -2497,11 +2497,26 @@ rgs= -'+' +argparse.REMAINDER ,%0A
d4a1a89cd793cf0aedadd4c687b926d3d4f529e3
Use FutureWarning instead.
monty/dev.py
monty/dev.py
""" This module implements several useful functions and decorators that can be particularly useful for developers. E.g., deprecating methods / classes, etc. """ import re import sys import logging import warnings import os import subprocess import multiprocessing import functools logger = logging.getLogger(__name__) ...
Python
0
@@ -1298,19 +1298,14 @@ sg, -Deprecation +Future Warn
62df0886b15e58741b4a20e2c08cb5bef66024a6
set ir defs after inlining
hpat/compiler.py
hpat/compiler.py
from __future__ import print_function, division, absolute_import # from .pio import PIO from .distributed import DistributedPass from .hiframes import HiFrames import numba import numba.compiler from numba import ir_utils, ir from numba.targets.registry import CPUDispatcher from numba.ir_utils import (mk_unique_var, a...
Python
0.000003
@@ -396,16 +396,54 @@ e_vars)%0A +from hpat.utils import get_definitions %0A# def s @@ -2939,16 +2939,75 @@ ursively +%0A func_ir._definitions = get_definitions(func_ir.blocks) %0A%0Adef in
07d7b09c6aa3dc5d8d0026843535a0eda76b0aae
Add in env shims for host spec
moxie/cli.py
moxie/cli.py
def attach(): import asyncio import websockets import sys @asyncio.coroutine def hello(): server, job = sys.argv[1:] websocket = yield from websockets.connect( 'ws://{server}/websocket/stream/{job}/'.format( server=server, job=job)) while True: ...
Python
0
@@ -574,16 +574,138 @@ ort app%0A + import os%0A%0A host = os.environ.get(%22MOXIE_HOST%22, %22127.0.0.1%22)%0A port = int(os.environ.get(%22MOXIE_PORT%22, %228888%22))%0A%0A loop @@ -771,26 +771,20 @@ pp, -'127.0.0.1', 8888) +host, port)%0A %0A
08c9773e0e34ee2738f9cbe0a4eb8c956a8be3fb
remove now uncalled funcs from mock in test_jobmanager
eventmq/tests/test_jobmanager.py
eventmq/tests/test_jobmanager.py
# This file is part of eventmq. # # eventmq is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 2.1 of the License, or (at your option) # any later version. # # eventmq is distributed in the ...
Python
0
@@ -3838,131 +3838,23 @@ ger. -JobManager.start')%0A @mock.patch('eventmq.jobmanager.import_settings')%0A @mock.patch('eventmq.jobmanager.Sender.rebuild +import_settings ')%0A @@ -3889,22 +3889,8 @@ elf, - rebuild_mock, imp @@ -3910,48 +3910,8 @@ mock -,%0A start_mock ):%0A @@ ...
d156f31e901887beb444d9b3eb6a3f5da1ec3394
remove periodic task from indicators until we can fix it
mvp/tasks.py
mvp/tasks.py
from celery.schedules import crontab, schedule from celery.task import periodic_task, task from mvp.management.commands import mvp_update_existing @periodic_task(run_every=crontab(minute=0, hour=[0, 12])) def update_mvp_indicators(): update_existing = mvp_update_existing.Command() update_existing.handle()
Python
0.000004
@@ -141,16 +141,17 @@ isting%0A%0A +# @periodi
dbabe3fd37efe6cafd448b04e48558b140160789
Fix check for all_users option.
zerver/management/commands/add_users_to_streams.py
zerver/management/commands/add_users_to_streams.py
from __future__ import absolute_import from __future__ import print_function from optparse import make_option from typing import Any from django.core.management.base import BaseCommand, CommandParser from zerver.lib.actions import create_stream_if_needed, bulk_add_subscriptions from zerver.lib.management import Zul...
Python
0
@@ -1337,16 +1337,20 @@ one and +not options%5B @@ -1361,24 +1361,16 @@ _users%22%5D - is None ):%0A
abd1e46a0c3862977a1333cb1ce567c28c02a0a6
Make files attachments not required
projects/models.py
projects/models.py
# -*- encoding:utf-8 -*- from datetime import date from django.db import models class Project(models.Model): STATUS = ( ('unrevised', u'Неразгледан'), ('returned', u'Върнат за корекция'), ('pending', u'Предстои да бъде разгледан на СИС'), ('approved', u'Разгледан и одобрен на СИС...
Python
0.000001
@@ -18,17 +18,16 @@ f-8 -*-%0A -%0A from dat @@ -44,17 +44,16 @@ rt date%0A -%0A from dja @@ -987,16 +987,28 @@ achment' +, blank=True )%0A st
4e30a21a4e17304582724714f0be6c7a8e2c1852
Add image field to project
projects/models.py
projects/models.py
from django.db import models from wagtail.wagtailcore.models import Page, Orderable from wagtail.wagtailcore.fields import RichTextField from wagtail.wagtailadmin.edit_handlers import FieldPanel, InlinePanel from wagtail.wagtailsearch import index from modelcluster.fields import ParentalKey class ProjectPage(Ordera...
Python
0
@@ -551,24 +551,105 @@ blank=True)%0A + image = models.ImageField(upload_to='project_images', blank=True, null=True)%0A status = @@ -1199,32 +1199,61 @@ _description'),%0A + FieldPanel('image'),%0A InlinePa
63fedfb459554d742b9d24148184e249dfbd6453
Remove unused '_Mole.full_path'
py/mel/cmd/list.py
py/mel/cmd/list.py
"""List the moles in a mole catalog.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os def setup_parser(parser): parser.add_argument( '--only-no-micro', action='store_true', help="Only list moles that have no microsc...
Python
0
@@ -1313,19 +1313,8 @@ elf, - full_path, cat @@ -1393,43 +1393,8 @@ _()%0A - self.full_path = full_path%0A @@ -2674,43 +2674,8 @@ le(%0A - os.path.abspath(path),%0A
3f71420b2711bdaf721ca6db87d806093811bb5b
Fix detection of make(1) result
py/oldfart/make.py
py/oldfart/make.py
import os import re import subprocess __all__ = ['NOTHING_DONE', 'SUCCESS', 'NO_RULE', 'FAILURE', 'Maker'] NOTHING_DONE = 1 SUCCESS = 2 NO_RULE = 3 FAILURE = 4 class Maker(object): def __init__(self, project_dir='.', makefile='Makefile'): self.project_dir = os.path.abspath(project_dir) self.m...
Python
0
@@ -159,16 +159,164 @@ E = 4%0A%0A%0A +def _occur(fmt, needle, haystack):%0A return bool(re.search(('%5E' + fmt + '$').format(needle),%0A haystack, re.MULTILINE))%0A%0A%0A class Ma @@ -1306,26 +1306,23 @@ if -re.match(r +_occur( %22make: %60 %5B%5E'%5D @@ -1321,13 +1321,12 @@ e: %60 ...
5961a841acbfac7aed64056f9be8078ed2338410
Update the version ID.
pyax12/__init__.py
pyax12/__init__.py
# PyAX-12 # The MIT License # # Copyright (c) 2010,2015 Jeremie DECOCK (http://www.jdhp.org) # # 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 limitati...
Python
0
@@ -1596,17 +1596,17 @@ '0.4.dev -2 +3 '%0A%0A__all
e0a212bd9c0729a635ca1adfaa3e18d79e601c03
Bump version to 1.5.2
pycclib/version.py
pycclib/version.py
# -*- coding: utf-8 -*- __version__ = '1.5.1'
Python
0
@@ -36,11 +36,11 @@ = '1.5. -1 +2 '%0A
230ce1c38e1bba7c69fd774d83d17a8014cd4aeb
Use a generator instead of a list in get_unused_ips
pycroft/lib/net.py
pycroft/lib/net.py
# Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. from itertools import islice from ipaddr import IPv4Address, IPv6Address, IPv4Network, IPv6Network import sys ...
Python
0.000001
@@ -1053,12 +1053,8 @@ %5D = -list (ip
d1ce4a7aba39e76e2c8ab2d4d5cca75b1a55889a
Increase version number.
pygubu/__init__.py
pygubu/__init__.py
# encoding: utf8 from __future__ import unicode_literals __all__ = ['Builder', 'TkApplication', 'BuilderObject', 'register_widget', 'register_property', 'remove_binding', 'ApplicationLevelBindManager'] import pygubu.builder.builderobject from pygubu.builder import Builder from pygubu.builder.builderobject ...
Python
0.000001
@@ -448,9 +448,9 @@ .10. -3 +4 '%0A%0A%0A
2112b49445cc27cc80e9d573ce4da477ea58d6e5
Remove files that are not needed from direct_show_base_classes.gyp
modules/video_capture/main/source/Windows/direct_show_base_classes.gyp
modules/video_capture/main/source/Windows/direct_show_base_classes.gyp
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
Python
0.000006
@@ -1539,51 +1539,8 @@ p',%0A - '%3C(direct_show_dir)arithutil.cpp',%0A @@ -2361,88 +2361,8 @@ h',%0A - '%3C(direct_show_dir)perflog.cpp',%0A '%3C(direct_show_dir)perflog.h',%0A
35da412f1529097e191087abdfc46c7c60a2c0b1
Update version.
pyslvs/__init__.py
pyslvs/__init__.py
# -*- coding: utf-8 -*- """Kernel of Pyslvs. This kernel can work without GUI. Modules: + Solver: + parser + tinycadlib + Sketch Solve solver + triangulation + Number synthesis: + number + Structure Synthesis: + atlas + Dimensional synthesis: + planarlinkage + rga + firefly ...
Python
0
@@ -541,13 +541,8 @@ .5.0 -.dev0 %22%0A%0Af
ecdee217a14fd2e0fd4af66df7aabe5ff4e5ccef
Fix ip proxy list
pystil/tracking.py
pystil/tracking.py
# -*- coding: utf-8 -*- # Copyright (C) 2011-2013 by Florian Mounier, Kozea # This file is part of pystil, licensed under a 3-clause BSD license. from pystil.utils import ( try_decode, parse_ua, parse_referrer, parse_domain, visit_to_table_line) from pystil.db import Visit, country, city, asn from datetime import ...
Python
0.000004
@@ -585,16 +585,79 @@ tcnow()%0A + if ', ' in ip:%0A self.ip = ip.split(', ')%5B0%5D%0A
ef453127ff4663383e81a78beab1c9677f27e47d
Add links for swimming drills
python/training.py
python/training.py
#!/usr/bin/env python from __future__ import (absolute_import, division, print_function) from datetime import datetime, timedelta from trainingplans import trainingplans try: from icalendar import Calendar # type: ignore WITH_ICAL = True except ImportError: print('Running without icalendar support') WI...
Python
0
@@ -567,16 +567,319 @@ onday%0A%0A%0A +# ####################################################################%0A# tips on swimming technique%0A# https://www.californiatriathlon.org/swim-workouts/%0A# https://www.snackinginsneakers.com/12-week-olympic-triathlon-training-plan/%0A# #######################################...
266444b8afcf653b45cfdbeb8cb446561ba16ce6
fix dist launch script test=develop (#17404)
python/paddle/distributed/launch.py
python/paddle/distributed/launch.py
# Copyright (c) 2018 PaddlePaddle 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 appli...
Python
0
@@ -1254,16 +1254,439 @@ S = 8%0A%0A%0A +def get_gpu_ids(gpus):%0A if os.getenv(%22CUDA_VISIBLE_DEVICES%22):%0A ids = %5Bint(i)%0A for i in os.getenv(%22CUDA_VISIBLE_DEVICES%22).split(%22,%22)%5D%5B:gpus%5D%0A if gpus %3E len(ids):%0A raise EnvironmentError(%0A ...
55b2fb218548ccc90a5391423a55099d3c663052
Update rasa_core/slots.py
rasa_core/slots.py
rasa_core/slots.py
import logging from rasa_core import utils logger = logging.getLogger(__name__) class Slot(object): type_name = None def __init__(self, name, initial_value=None, value_reset_delay=None, auto_fill=True): self.name = name self.value = initial...
Python
0
@@ -2798,17 +2798,17 @@ correct -: +. %22.format
19c4fbe5a863665b045e2d510b7a368c18c46edb
Allow customizing test task ids.
recipe_modules/swarming/test_api.py
recipe_modules/swarming/test_api.py
# Copyright 2018 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. from state import TaskState from recipe_engine import recipe_test_api class SwarmingTestApi(recipe_test_api.RecipeTestApi): TaskState = TaskSt...
Python
0.000116
@@ -622,19 +622,33 @@ sk_names +, initial_id=0 ):%0A - %22%22%22G @@ -827,16 +827,71 @@ rigger.%0A + initial_id (int): The beginning of the ID range.%0A %22%22%22%0A @@ -1039,32 +1039,32 @@ %0A %7D,%0A - %7D for id @@ -1094,16 +1094,34 @@ sk_names +, start=initial_id )%5D,%0A ...
64d6cf6166001ea6dce685c4aede1b7236f37c0d
Update logger.py
redislog/logger.py
redislog/logger.py
import socket import getpass import datetime import inspect import logging def levelAsString(level): return {logging.DEBUG: 'debug', logging.INFO: 'info', logging.WARNING: 'warning', logging.ERROR: 'error', logging.CRITICAL: 'critical', logging.FATAL: ...
Python
0.000001
@@ -1386,34 +1386,19 @@ e, lvl, -fn, lno, msg, args +msg , exc_in @@ -1399,22 +1399,16 @@ exc_info -, func )%0A%0A
36a9bec0d616d3d0e9ea1aaa6285226492817005
Comment clarifications in examples/basic_volume_usage.py
examples/basic_volume_usage.py
examples/basic_volume_usage.py
""" A quick example of viewing data stored in a geoprobe volume file. """ import os import numpy as np import matplotlib.pyplot as plt import geoprobe def main(): # Path to the example data dir relative to the location of this script. datadir = os.path.dirname(__file__) + '/data/' # Read an existing geo...
Python
0
@@ -235,16 +235,95 @@ script.%0A + # This is just so that the script can be called from a different directory%0A data
aa908640caf092229d4e9b680bcafc3d1dc9ccb0
Add missing logging level shim
wal_e/log_help.py
wal_e/log_help.py
""" A module to assist with using the Python logging module """ import logging import os import time class UTCFormatter(logging.Formatter): # Undocumented, seemingly still in 2.7 (see # http://od-eon.com/blogs/stefan/logging-utc-timestamps-python/) converter = time.gmtime def formatTime(self, rec...
Python
0
@@ -3424,16 +3424,105 @@ fierce.%0A +%0A def debug(self, *args, **kwargs):%0A self.log(logging.DEBUG, *args, **kwargs)%0A%0A def
9058caa922b611ec75f5b55c85bb09ce3ddc2e39
fix date parsing
wapiti/parsers.py
wapiti/parsers.py
# Copyright (c) Ecometrica. All rights reserved. # Distributed under the BSD license. See LICENSE for details. import datetime as dt import json import re from django.db import models from django.db.models.query import QuerySet from wapiti import helpers # ISO 8601 DATE_RE = re.compile('[0-9]{4}-[0-1]?[0-9]-[1-3]?[0...
Python
0.000058
@@ -1308,24 +1308,31 @@ me.strptime( +value, DATE_FORMAT)
2e22c08960bdb2ef13c2582e9980496fb324fc17
Fix deprecation warning in graphics rendering.
src/whacked4/doom/graphics.py
src/whacked4/doom/graphics.py
#!/usr/bin/env python #coding=utf8 """ Contains classes to read Doom style patch graphics, and Doom PLAYPAL lump palette data. """ import struct import wx class Palette(object): """ A 256 color RGB palette. """ def __init__(self, data): self.colors = [] if len(data) < 768: ...
Python
0
@@ -3104,16 +3104,17 @@ x.Bitmap +. FromBuff
7b48fd6b3dfd715d902ab0fc3ae233a479c8c399
Add a docstring for extened attributes
formencode_jinja2/formfill.py
formencode_jinja2/formfill.py
import collections import formencode.htmlfill import jinja2 import jinja2.ext from jinja2 import nodes __all__ = ['FormFillExtension'] class FormFillExtension(jinja2.ext.Extension): """Jinja2 extension for filling HTML forms via :mod:`formencode.htmlfill`. For example, this code:: {% formfill {'use...
Python
0.000001
@@ -1663,16 +1663,735 @@ forms%0A%0A + This extension provides the additional variables in the Jinja2 environment:%0A%0A .. attribute:: jinja2.Environment.formfill_config%0A%0A The default rendering configuration of the %60%60formfill%60%60 tag.%0A This property accepts the same arguments of%0A ...
9da303e48820e95e1bfd206f1c0372f896dac6ec
Allow enum to be created more easily
draftjs_exporter/constants.py
draftjs_exporter/constants.py
from __future__ import absolute_import, unicode_literals # http://stackoverflow.com/a/22723724/1798491 class Enum(object): def __init__(self, tuple_list): self.tuple_list = tuple_list def __getattr__(self, name): if name not in self.tuple_list: raise AttributeError("'Enum' has no ...
Python
0
@@ -141,26 +141,25 @@ _(self, -tuple_list +*elements ):%0A @@ -170,31 +170,34 @@ elf. -tuple_list = tuple_list +elements = tuple(elements) %0A%0A @@ -259,18 +259,16 @@ elf. -tuple_list +elements :%0A @@ -936,17 +936,16 @@ = Enum( -( 'LINK', @@ -961,17 +961,16 @@ 'TOKEN') -) %0A%0AINLINE @@ -984,17...