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
508ee1dcb88e6bd8ee4f96a16b79e8643497c9fd
Add negative expressions
api/btr3baseball/ExpressionValidator.py
api/btr3baseball/ExpressionValidator.py
from pyparsing import Literal,CaselessLiteral,Word,Combine,Group,Optional,\ ZeroOrMore,Forward,nums,alphas,ParseException point = Literal( "." ) fnumber = Combine( Word( "+-"+nums, nums ) + Optional( point + Optional( Word( nums ) ) ) ) quote = Literal("'").suppress() comma = Literal(",") ident = Word(alphas) plus...
Python
1
@@ -667,16 +667,34 @@ r%0Aatom = + Optional('-') + ( num_con @@ -702,16 +702,18 @@ t %7C func + ) %0Afactor @@ -1886,16 +1886,32 @@ ,3,4)%22,%0A +%09%09%22-hi(2,3,4)%22,%0A %5D%0A%0Afor e
fcfdcdb64f5ddb8624ed25b7ca496fab55d4741b
Add gps value in csv
geotrek/signage/views.py
geotrek/signage/views.py
from django.conf import settings from django.http import HttpResponse import logging from mapentity.views import (MapEntityLayer, MapEntityList, MapEntityJsonList, MapEntityFormat, MapEntityDetail, MapEntityDocument, MapEntityCreate, MapEntityUpdate, MapEntityDelete) from geotrek.authent....
Python
0.000008
@@ -1518,16 +1518,28 @@ 'areas', + 'gps_value' %0A %5D +
a8bd3ea91563f087b6aa4b651606f4c38beba913
Bump pyleus to 0.1.9
pyleus/__init__.py
pyleus/__init__.py
import os import sys __version__ = '0.1.8' BASE_JAR = "pyleus-base.jar" BASE_JAR_INSTALL_DIR = "share/pyleus" BASE_JAR_PATH = os.path.join(sys.prefix, BASE_JAR_INSTALL_DIR, BASE_JAR)
Python
0.000004
@@ -38,9 +38,9 @@ 0.1. -8 +9 '%0A%0AB
99beb21b982efae4a9b3c07b23ae8185727f0d3b
tweak code style in autil
src/cmdlr/autil.py
src/cmdlr/autil.py
"""Analyzer utils.""" import shutil import json import tempfile import subprocess from collections import namedtuple from urllib.parse import urljoin from bs4 import BeautifulSoup from .exception import ExternalDependencyNotFound _JSResult = namedtuple('JSResult', ['eval', 'env']) def run_in_nodejs(js): """D...
Python
0.000001
@@ -27,22 +27,20 @@ ort -shutil +json %0Aimport json @@ -39,46 +39,83 @@ ort -json%0Aimport tempfile%0Aimport subprocess +subprocess%0Afrom tempfile import NamedTemporaryFile%0Afrom shutil import which %0Afro @@ -573,15 +573,8 @@ d = -shutil. whic @@ -957,17 +957,8 @@ ith -tempfile. Name
e1da6e47bced6bfd534b920f624672b9dabb618f
Raise propper exception.
astm/client.py
astm/client.py
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # import logging import socket import time from .codec import encode_message from .constants import ENQ, ...
Python
0
@@ -1604,18 +1604,19 @@ ise -ValueError +NotAccepted ('Cl
73855b7d924f6a5f15b6365f079dff3aac324fe8
fix small bug in form handling
atlas/views.py
atlas/views.py
from functools import wraps from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.utils.translation import ugettext as _ from django.contrib.gis.geos import fromstr from django.core.urlresolve...
Python
0
@@ -2735,24 +2735,25 @@ equest)%0A +%0A extra = @@ -2767,21 +2767,16 @@ : form%7D%0A - %0A retu
0ae8662557081a55b04c78912e20aa4fe1c58d0d
change search url to filter male people
flairs.py
flairs.py
import Config import Dictionary import praw def main(): r = praw.Reddit(user_agent = Config.user_agent) r.login(Config.username, Config.password) subreddit = r.get_subreddit(Config.subreddit) collect = {} for flair in subreddit.get_flair_list(limit = None): (_, user, text) = flair.values() cleaned = text #...
Python
0.000001
@@ -1186,11 +1186,14 @@ rch/ -top +people /?q= @@ -1226,16 +1226,34 @@ s%2520who%25 +20are%2520men%2520and%25 20go%2520t
dc669ca034b5841c4f64f23e59b07af18eabd943
version 3.1rc0
pyproj/__init__.py
pyproj/__init__.py
""" Python interface to PROJ (https://proj.org), cartographic projections and coordinate transformations library. Download: http://python.org/pypi/pyproj Requirements: Python 3.7+. Contact: Jeffrey Whitaker <jeffrey.s.whitaker@noaa.gov> Copyright (c) 2006-2018, Jeffrey Whitaker. Copyright (c) 2019-2021, Open sourc...
Python
0
@@ -1379,12 +1379,10 @@ %223.1 -.dev +rc 0%22%0A_
742c824f76a18fc731e88b9b3509d0f444ae8c70
Check if File is in DIR
pyroSAR/_common.py
pyroSAR/_common.py
# -*- coding: utf-8 -*- """ Created on Thu Nov 09 11:42:39 2017 @author: ibari """ from __future__ import division import numpy as np # ------- Result and Memorize Classes ------- # class Memorize(dict): """ Memorize results. """ def __getattr__(self, name): try: return self[name] ...
Python
0
@@ -127,16 +127,41 @@ py as np +%0Afrom pathlib import Path %0A%0A# ---- @@ -5508,18 +5508,405 @@ t None%0A%0A -%0A%0A +def check_is_file(files):%0A # This is only temporary. Insert here the DIR path with DEMs.%0A dir_name = %22C:%5C%5CUsers%5C%5Cibari%5C%5CDocuments%22%0A files = Path(dir_name + '%5C%5C' +...
035c32a99e6e03b2498db75dc52d9bf6818813c2
Bump version.
pyslvs/__init__.py
pyslvs/__init__.py
# -*- coding: utf-8 -*- """Kernel of Pyslvs.""" __all__ = [ '__version__', 'Coordinate', 'plap', 'pllp', 'plpp', 'pxy', 'expr_parser', 'expr_solving', 'data_collecting', 'get_vlinks', 'VJoint', 'VPoint', 'VLink', 'SolverSystem', 'norm_path', 'curvature',...
Python
0
@@ -776,10 +776,15 @@ 20.0 -5. +6.0.dev 0%22%0A_
9516115f722fb3f95882553d8077bf1ab4a670ef
FIX web_demo upload was not processing grayscale correctly
examples/web_demo/exifutil.py
examples/web_demo/exifutil.py
""" This script handles the skimage exif problem. """ from PIL import Image import numpy as np ORIENTATIONS = { # used in apply_orientation 2: (Image.FLIP_LEFT_RIGHT,), 3: (Image.ROTATE_180,), 4: (Image.FLIP_TOP_BOTTOM,), 5: (Image.FLIP_LEFT_RIGHT, Image.ROTATE_90), 6: (Image.ROTATE_270,), 7...
Python
0
@@ -646,22 +646,21 @@ on)%0A -return +img = np.asar @@ -693,16 +693,183 @@ / 255.%0A + if img.ndim == 2:%0A img = img%5B:, :, np.newaxis%5D%0A img = np.tile(img, (1, 1, 3))%0A elif img.shape%5B2%5D == 4:%0A img = img%5B:, :, :3%5D%0A return img%0A %0A%0Adef ap
61a5417af32c3e27c46a1952dcdb2aa99aec21c5
Fix Twitter login verification and error messages (#1205)
funnel/loginproviders/twitter.py
funnel/loginproviders/twitter.py
from flask import redirect, request import tweepy from baseframe import _ from ..registry import LoginCallbackError, LoginInitError, LoginProvider from ..typing import ReturnLoginProvider __all__ = ['TwitterProvider'] class TwitterProvider(LoginProvider): at_username = True def __init__( self, ...
Python
0
@@ -1434,16 +1434,20 @@ oken or +not request_ @@ -1566,42 +1566,79 @@ ror( -_(%22Twitter login failed. T +%0A _(%22If you were trying to use Twitter, please t ry again ?%22)) @@ -1625,35 +1625,47 @@ please try again -? %22) +%0A )%0A%0A auth. @@ -2178,18 +2178,26 @@ ter -lo...
4a02a2efb764ddd0e4fc5b2908146c33c101ede9
Remove debug
call_server/admin/views.py
call_server/admin/views.py
from datetime import datetime, timedelta from flask import Blueprint, render_template, current_app, flash, url_for, redirect from flask_login import login_required from flask_babel import gettext as _ from ..extensions import db, cache from sqlalchemy.sql import func, desc from ..campaign.models import TwilioPhoneNu...
Python
0.000001
@@ -3819,15 +3819,8 @@ S': -None, # cach
ccc289a725ac92c8a5acb3ff101c2bf07234e3f6
Switch docs to github pages
pytess/__init__.py
pytess/__init__.py
""" # Pytess Pure Python tessellation of points into polygons, including Delauney/Thiessin, and Voronoi polygons. Built as a convenient user interface for Bill Simons/Carson Farmer python port of Steven Fortune C++ version of a Delauney triangulator. ## Platforms Tested on Python version 2.x and 3.x. ## Dependen...
Python
0
@@ -844,34 +844,41 @@ http +s :// -pythonhosted.org +karimbahgat.github.io /Pytess +/ )%0A%0A%0A
4ca9594b5208a9d2774048b0519d9c2abe06b6db
allow multiple trees in conversion to numpy array
rootpy/root2array.py
rootpy/root2array.py
""" This module should handle: * conversion of TTrees into NumPy arrays * conversion of TTrees into carrays (http://pypi.python.org/pypi/carray) """ from .types import Variable, convert import numpy as np def to_numpy_array(tree, branches=None, use_cache=False, cache_size=1000000): # if branches is None then ...
Python
0.000002
@@ -218,20 +218,22 @@ y_array( +* tree +s , branch @@ -1158,16 +1158,79 @@ anches%5D%0A + total_entries = sum(%5Btree.GetEntries() for tree in trees%5D)%0A arra @@ -1253,32 +1253,28 @@ shape=(t -ree.GetE +otal_e ntries -() ,), dtyp @@ -1282,16 +1282,53 @@ =dtype)%0A + i = 0%0A for tree in trees:%0...
2f9825a6af8e34288353c553f980b06be6e15f65
apply the pep8 default max_line_length in _PEP8Options
flake8/run.py
flake8/run.py
""" Implementation of the command-line I{flake8} tool. """ import sys import os import os.path from subprocess import PIPE, Popen import select try: from StringIO import StringIO # NOQA except ImportError: from io import StringIO # NOQA from flake8.util import skip_file from flake8 import pep8 from ...
Python
0.000003
@@ -3097,16 +3097,59 @@ = False%0A + max_line_length = pep8.MAX_LINE_LENGTH%0A %0A%0Adef _i
e39409b6376c3d370a3affb166b0bbe8e1769629
Make an explicit list for Python 3.
avena/xcor2.py
avena/xcor2.py
#!/usr/bin/env python '''Cross-correlation of image arrays''' from numpy import ( multiply as _multiply, ones as _ones, sqrt as _sqrt, zeros as _zeros, ) from numpy.fft import ( fftshift as _fftshift, ifftshift as _ifftshift, rfft2 as _rfft2, irfft2 as _irfft2, ) from . import filter...
Python
0.001953
@@ -1605,16 +1605,21 @@ pairs = +list( zip(%0A @@ -1692,16 +1692,17 @@ ),%0A ) +) %0A for
06beae113e4ac4f954c3c1c0db56ec3d1a59a99b
Remove the now-unused set() in _get_python_files
flake8/run.py
flake8/run.py
""" Implementation of the command-line I{flake8} tool. """ import sys import os import os.path from subprocess import PIPE, Popen import select try: from StringIO import StringIO # NOQA except ImportError: from io import StringIO # NOQA from flake8.util import skip_file from flake8 import pep8 from ...
Python
0.000002
@@ -891,33 +891,16 @@ paths):%0A - seen = set()%0A for @@ -1251,33 +1251,8 @@ ath) - and fullpath not in seen :%0A @@ -1341,29 +1341,8 @@ ath) - and path not in seen :%0A
fbfa96338ada89ffc0a8121f5f129b2498a74d14
fix atol initialization
galpy/util/bovy_symplecticode.py
galpy/util/bovy_symplecticode.py
#Symplectic ODE integrators #Follows scipy.integrate.odeint inputs import numpy as nu from numpy import linalg def leapfrog(func,yo,t,args=(),rtol=None,atol=None): """ NAME: leapfrog PURPOSE: leapfrog integrate an ode INPUT: func - force function of (y,*args) yo - initial con...
Python
0.000004
@@ -653,25 +653,8 @@ is -None and atol is None @@ -680,16 +680,37 @@ 9012e-8%0A + if atol is None:%0A @@ -717,16 +717,23 @@ atol= 0. + %0A #In
e5ac319a926b6cc81280f8e954badb3a8fb374d2
Update utils.py
azure/utils.py
azure/utils.py
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
Python
0.000001
@@ -1074,24 +1074,85 @@ roups(**_):%0A + subscription_id = ctx.node.properties%5B'subscription_id'%5D%0A list_res @@ -1210,34 +1210,24 @@ criptions/'+ -constants. subscription @@ -1532,32 +1532,44 @@ ode.properties%5B' +vm_name'%5D+'_ resource_group_n @@ -1558,37 +1558,92 @@ '_resource_group -_name +'%0A ...
16c4b699b178dbaa6477e6adb74ca4ec68f1e02c
Fix incorrect macOS sequence.
pywal/sequences.py
pywal/sequences.py
""" Send sequences to all open terminals. """ import glob import os from .settings import CACHE_DIR, OS from . import util def set_special(index, color, iterm_name="h"): """Convert a hex color to a special sequence.""" alpha = util.Color.alpha_num if OS == "Darwin": return "\033[P%s%s\033\\" % (...
Python
0.000226
@@ -296,17 +296,17 @@ rn %22%5C033 -%5B +%5D P%25s%25s%5C03
b62cb22d4186be47924e241a373209d71a9b80ae
use path method from base Storage
appengine_toolkit/storage.py
appengine_toolkit/storage.py
from django.core.files.storage import Storage from django.core.exceptions import ImproperlyConfigured from django.utils import timezone import os import mimetypes import cloudstorage from google.appengine.ext import blobstore from google.appengine.api import images from .settings import appengine_toolkit_settings ...
Python
0
@@ -94,16 +94,37 @@ nfigured +, SuspiciousOperation %0Afrom dj @@ -729,21 +729,16 @@ def -_real path(sel @@ -759,61 +759,287 @@ -return os.path.join(self._ +%22%22%22%0A Returns the full path to the file, including leading '/' and bucket -, name -) if name else +.%0A Access to the buck...
ae38c24ecbd20a5fa6bc8cd0e101bb20c436412a
Fix main __init__ py instruction order (#887)
qiskit/__init__.py
qiskit/__init__.py
# -*- coding: utf-8 -*- # Copyright 2017, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. # pylint: disable=wrong-import-order # pylint: disable=redefined-builtin """Main QISKit public functionality.""" import os ...
Python
0.000206
@@ -1002,16 +1002,213 @@ alizer%0A%0A +# Allow extending this namespace. Please note that currently this line needs%0A# to be placed *before* the wrapper imports or any non-import code.%0A__path__ = pkgutil.extend_path(__path__, __name__)%0A%0A # Import @@ -1521,182 +1521,8 @@ ))%0A%0A -# Allow extending this namesp...
3715dbc3392a04cfd436cd71812b21a43851bcff
Fix n_cpu must be n_cpus
polyaxon/events/monitors/resources.py
polyaxon/events/monitors/resources.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import logging import re import docker import requests from django.conf import settings from docker.errors import NotFound import polyaxon_gpustat from polyaxon_schemas.experiment import ContainerResourcesConfig from clusters....
Python
0.999946
@@ -4373,16 +4373,17 @@ 'n_cpu +s ': num_c
5a4dd88fa798b85c90106562c3daecc2097969b7
fix bug from Sentry - SQL error for in_queue ending with comma
questions/views.py
questions/views.py
import json from django import forms from django.contrib.admin.views.decorators import staff_member_required from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from django.views.decorators.csrf import ensure_csrf_cookie ...
Python
0
@@ -1416,24 +1416,75 @@ %5D.split(%22,%22) +%0A if %22%22 in in_queue:%0A in_queue.remove(%22%22) %0A%0A simula
80397896e28839190c76fc3a3bd656817c083863
Update staff list. Fix #203.
src/core/data.py
src/core/data.py
from django.utils.translation import ugettext_lazy as _ EXTRA_DATA = {} EXTRA_DATA['about/staff'] = { 'teams': [ { 'key': _('Coordinators'), 'members': [ { 'title': _('Chairperson'), 'name': 'Tsung-Wei Hu', }, ...
Python
0
@@ -603,17 +603,16 @@ ead')%7D,%0A -%0A @@ -712,19 +712,25 @@ name': ' -Tim +Wen-Chang Hsu'%7D,%0A @@ -923,24 +923,97 @@ : 'Jason'%7D,%0A + %7B'name': 'Keith Yang'%7D,%0A %7B'name': '%E8%B3%B4%E6%98%B1%E5%BB%B7'%7D,%0A @@ -1264,17 +1264,17 @@ : 'Liang - +- B...
425adbd5f4dc475f4d3a7ce31f7df9ca1e6e3ba1
check class format
import.py
import.py
#!/usr/bin/env python """ A script to import initial data from ProEco into Theros """ import logging import argparse import sys parser=argparse.ArgumentParser(description=__doc__, formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("worksFile", help="the csv file containing the raw works expor...
Python
0.000001
@@ -121,16 +121,26 @@ port sys +%0Aimport re %0A%0Aparser @@ -1139,16 +1139,18 @@ for +i, line in fh:%0A @@ -1145,18 +1145,29 @@ line in +enumerate( fh +) :%0A @@ -1382,16 +1382,148 @@ (%22 %22,%22%22) +.upper()%0A if not re.search(r%22%5E%5Cd%5BA-Z%5D+$%22, klass):%0A raise ValueErr...
32a895ce4923468f90cdd1ab5179d8ef0070f31d
Fix the query interface
barin/query.py
barin/query.py
from itertools import chain from .base import partialmethod from .cursor import Cursor from . import mql class _CursorSource(object): def get_cursor(self): raise NotImplementedError() def __iter__(self): return iter(self.get_cursor()) def all(self): return list(self) def f...
Python
0.999998
@@ -1961,20 +1961,15 @@ +q re -turn orig( +s = self @@ -1989,26 +1989,295 @@ ry() -, *args, **kwargs) +%0A res = orig(qres%5B'filter'%5D)%0A if qres%5B'limit'%5D:%0A res = res.limit(qres%5B'limit'%5D)%0A if qres%5B'skip'%5D:%0A res = res.skip(qres...
d7eadb4720786c9c9195b5c8ebb1384a54cf45e6
support for greenlet frameworks
base_camera.py
base_camera.py
import time import threading try: from greenlet import getcurrent as get_ident except ImportError: try: from thread import get_ident except ImportError: from _thread import get_ident class CameraEvent(object): """An Event-like class that signals all active clients when a new frame is ...
Python
0
@@ -3183,16 +3183,42 @@ clients +%0A time.sleep(0) %0A%0A
cb4c0cb2c35d97e0364a4c010715cdf15d261e4c
Add a method to get username if users have valid cookie
basehandler.py
basehandler.py
# -*- conding: utf-8 -*- import os import jinja2 import webapp2 import utils JINJA_ENV = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), autoescape=True) class BaseHandler(webapp2.RequestHandler): def render(self, template, **kw): """Method render t...
Python
0.000023
@@ -996,8 +996,310 @@ th=/')%0D%0A +%0D%0A def get_username(self):%0D%0A %22%22%22Check if user has a valid cookie.%0D%0A Returns username if cookie is valid.%22%22%22%0D%0A cookie = self.request.cookies.get('user')%0D%0A if cookie and utils.valid_cookie(cookie):%0D%0A usernam...
8468274c4d6a485b78058759ef46946aece0f5d9
fix import order
external_integrations/jira.py
external_integrations/jira.py
#!/usr/bin/python3 # # Copyright 2020 Google LLC. # SPDX-License-Identifier: Apache-2.0 # ## # Summary: # This is an example script that forwards alerts from GCP to Jira. # # Dependencies: # pip3 install futures jira google-cloud-pubsub # # Usage: # Fill in the following environment variables (or replace those lines...
Python
0.000001
@@ -987,30 +987,8 @@ os%0A -from jira import JIRA%0A from @@ -1017,16 +1017,38 @@ ubsub_v1 +%0Afrom jira import JIRA %0A%0Aloggin
d906b1357be51631fa934d61fe13d2e7fc3823bc
Fix usage example to specify a checkpoint to load.
research/attention_ocr/python/demo_inference.py
research/attention_ocr/python/demo_inference.py
"""A script to run inference on a set of image files. NOTE #1: The Attention OCR model was trained only using FSNS train dataset and it will work only for images which look more or less similar to french street names. In order to apply it to images from a different distribution you need to retrain (or at least fine...
Python
0
@@ -662,16 +662,50 @@ ze=32 %5C%0A + --checkpoint=model.ckpt-399731%5C%0A --imag
af47e6a1d0a97576f34a573e5f81e8dc7f2bad91
Make returned Cursors also be MongoProxies
girder/external/mongodb_proxy.py
girder/external/mongodb_proxy.py
""" Copyright 2013 Gustav Arngarden 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 ...
Python
0.000011
@@ -2152,38 +2152,37 @@ -return +val = self.method(*ar @@ -2194,16 +2194,327 @@ *kwargs) +%0A%0A # If we get back a cursor, we need to also make sure it tries%0A # to auto-reconnect on failure.%0A if isinstance(val, pymongo.cursor.Cursor):%0A ...
dd7f7b482bce0a6b9d412458ff24e5b4350cdd50
fix admin import/export after refactor
pages/admin/actions.py
pages/admin/actions.py
from django.utils.translation import ugettext_lazy as _ from django.http import HttpResponse from django.conf import settings as global_settings from django.db import transaction from django.shortcuts import redirect, render_to_response from django.template import RequestContext from pages import settings from pages.h...
Python
0.000001
@@ -390,16 +390,46 @@ eholders +, pages_to_json, json_to_pages %0Afrom pa
605d813bf0ad572e1b17d712fc1d2d38489f7260
Change popup dialog to normal style, to prevent detach failures.
src/robotide/editor/popupwindow.py
src/robotide/editor/popupwindow.py
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
Python
0
@@ -1629,24 +1629,27 @@ how()%0A + # if IS_WIND @@ -1652,21 +1652,45 @@ WINDOWS: -%0A - +# DEBUG Should be for all%0A @@ -2473,16 +2473,47 @@ , parent +, flags=wx.DEFAULT_DIALOG_STYLE )%0A @@ -2524,32 +2524,51 @@ lf.SetSize(size) + # wx.BORDER_NONE %0A%0A def _set_a
e728590c36c656f487aac9f67b8875fc1f953c1a
Clarify breaks behaviour for man
paka/cmark/__init__.py
paka/cmark/__init__.py
"""Lightweight `cmark`_ wrapper. .. _cmark: https://github.com/jgm/cmark """ import sys from paka.cmark._cmark import ffi, lib _PY2 = sys.version_info.major == 2 _ENCODING = "utf-8" class LineBreaks(object): # pylint: disable=too-few-public-methods """How line breaks will be rendered.""" soft = "soft"...
Python
0.000077
@@ -4268,53 +4268,143 @@ -- -as newlines%0A (%60%60%5Cn%60%60). If %60%60False%60%60 -- +%E2%80%9Csoft break nodes%E2%80%9D%0A (single newlines) are rendered as newlines (%60%60%5Cn%60%60). If %60%60False%60%60%0A -- %E2%80%9Csoft break nodes%E2%80%9D are rendered as @@ -4488,34 +4488,8 @@ d...
9c704326315f2305ba78406b8867ae03cc7735d7
Revert "Adding debugging info for heroku"
gistio.py
gistio.py
import os import json import urlparse from redis import StrictRedis from markdown2 import markdown import requests import bleach from flask import Flask, render_template, make_response, abort app = Flask(__name__) HEROKU = 'HEROKU' in os.environ if HEROKU: urlparse.uses_netloc.append('redis') redis_url = ur...
Python
0
@@ -2343,36 +2343,24 @@ t='0.0.0.0', - debug=True, port=PORT)%0A
d33d7e5bf29d8c135c68eb5f1206d2f7df6f42ed
Add URL and description to search index of FoiRequest
froide/foirequest/search_indexes.py
froide/foirequest/search_indexes.py
from haystack import indexes from haystack import site from foirequest.models import FoiRequest class FoiRequestIndex(indexes.SearchIndex): text = indexes.EdgeNgramField(document=True, use_template=True) title = indexes.CharField(model_attr='title') status = indexes.CharField(model_attr='status') fir...
Python
0
@@ -250,24 +250,86 @@ tr='title')%0A + description = indexes.CharField(model_attr='description')%0A status = @@ -510,16 +510,70 @@ e')%0A +url = indexes.CharField(model_attr='get_absolute_url') %0A%0A de
1e0c74a947b800602b96c14016e525e8d7322d71
Add some simple API docs.
authserver.py
authserver.py
#!/usr/bin/env python # ##### BEGIN AGPL LICENSE BLOCK ##### # This file is part of SimpleMMO. # # Copyright (C) 2011, 2012 Charles Nelson # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundati...
Python
0
@@ -1327,121 +1327,8 @@ on%0A%0A -class PingHandler(BaseHandler):%0A def get(self):%0A self.write(%22pong%22)%0A%0A# TODO: Make an SQLUserController%0A # TO @@ -2045,16 +2045,172 @@ ashed)%0A%0A +%0Aclass PingHandler(BaseHandler):%0A '''An easy way to see if the server is alive.%0A GET /ping'...
1a79f5f76e75e773b14146375edb606572c236c6
allow not stuff to see emails examples, https://www.pivotaltracker.com/story/show/13423395
apps/emails_example/views.py
apps/emails_example/views.py
# Universal Subtitles, universalsubtitles.org # # Copyright (C) 2010 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
Python
0
@@ -1206,32 +1206,90 @@ onError%0A -%0A@check_is_staff +from django.contrib.auth.decorators import login_required%0A%0A@login_required %0Adef ind @@ -1393,38 +1393,38 @@ context)%0A%0A@ -check_is_staff +login_required %0Adef send_em @@ -2424,30 +2424,30 @@ %0A %0A@ -check_is_staff +login_required %0Adef ema ...
3bfe8ec4e10bef79b847d7c5930e0521b817dfb7
remove SumIfMetric and CountIfMetric from __all__
recipe/__init__.py
recipe/__init__.py
# -*- coding: utf-8 -*- """ Recipe ~~~~~~~~~~~~~~~~~~~~~ """ import logging from flapjack_stack import FlapjackStack from recipe import default_settings from recipe.core import Recipe from recipe.exceptions import BadIngredient, BadRecipe from recipe.ingredients import ( Dimension, DivideMetric, Filter, Having, I...
Python
0.000004
@@ -944,40 +944,8 @@ %0A - 'CountIfMetric', 'SumIfMetric', 'Fi
04e04c7bed11b1f34dd6f01aaf468d1b3a54f90b
remove unused func
gpMgmt/bin/gppylib/db/catalog.py
gpMgmt/bin/gppylib/db/catalog.py
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2008. All Rights Reserved. # """ Provides Access Utilities for Examining and Modifying the GP Catalog. """ import copy import dbconn from gppylib import gplog logger=gplog.get_default_logger() class CatalogError(Exception): pass def basicSQLExec(conn,sql): ...
Python
0.000133
@@ -2207,345 +2207,4 @@ t()%0A -%0Adef get_catalogtable_list(conn):%0A sql = %22%22%22SELECT schemaname %7C%7C '.' %7C%7C tablename %0A FROM pg_tables %0A WHERE schemaname = 'pg_catalog'%0A %22%22%22%0A cursor=None%0A try:%0A cursor=dbconn.execSQL(conn,sql)%0A %...
2897320deed93f1d119751244abf80360c31b39c
Update __init__.py.
cachupy/__init__.py
cachupy/__init__.py
Python
0.000001
@@ -0,0 +1,32 @@ +from cachupy.cache import Cache%0A
b66efd2e15d044cd2fd3c7d305424e1b7260aa3a
Update lists.py
ref/lists/lists.py
ref/lists/lists.py
#lists.py #Written by Jesse Gallarzo listOfNames = [] #A for loop that runs five times. #For every iteration, the name variable gets added to the list until the loop stops. for num in range(5): name = input('Enter a name: ') listOfNames.append(name) print(listOfNames) #For every value(num) within the list '...
Python
0.000001
@@ -29,16 +29,80 @@ Gallarzo +%0A#run in Python3 otherwise change input to raw_input for python2 %0A%0AlistOf
857d104a0795d9831602c73bae2ecf0e39ca1c67
fix who this goes to as well
scripts/cscap/email_daily_changes.py
scripts/cscap/email_daily_changes.py
""" Print out changes feed """ import gdata.spreadsheets.client import gdata.spreadsheets.data import gdata.docs.data import gdata.docs.client import gdata.gauth import re import ConfigParser import sys import util import mx.DateTime import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text i...
Python
0.000002
@@ -2777,25 +2777,35 @@ b.SMTP(' -localhost +mailhub.iastate.edu ')%0As.sen @@ -2829,36 +2829,36 @@ , %5B' -akrherz@localhost +labend@iastate.edu ', - 'akrherz 2@lo @@ -2857,19 +2857,20 @@ herz -2@localhost +@iastate.edu '%5D, @@ -2896,8 +2896,9 @@ quit()%0A%0A +%0A
1138ff879358d1ffc83ce97dd15ef90dc92dc023
Add BasePlaylistElement
mopidy/audio/playlists.py
mopidy/audio/playlists.py
from __future__ import unicode_literals import pygst pygst.require('0.10') import gst import ConfigParser as configparser import xml.etree.ElementTree import xml.dom.pulldom # TODO: make detect_FOO_header reusable in general mopidy code. # i.e. give it just a "peek" like function. def detect_m3u_header(typefind): ...
Python
0
@@ -117,16 +117,26 @@ gparser%0A +import io%0A import x @@ -2660,12 +2660,1286 @@ %5Bb'xspf'%5D)%0A +%0A%0Aclass BasePlaylistElement(gst.Bin):%0A sinktemplate = None%0A srctemplate = None%0A ghostsrc = False%0A%0A def __init__(self):%0A super(BasePlaylistElement, self).__init__()%0A self._...
0d3750128e2c8363d48d68c1ca95fe7b0b7a9086
add description of how to create custom types
plugz/plugintypes/standard_plugin_type.py
plugz/plugintypes/standard_plugin_type.py
from abc import abstractmethod from plugz import PluginTypeBase class StandardPluginType(PluginTypeBase): """ Simple plugin type that requires an activate() method. """ plugintype = 'StandardPluginType' def __init__(self, ): """ """ super(StandardPluginType).__init__(self) @abstract...
Python
0
@@ -167,143 +167,340 @@ hod. - %22%22%22 %0A%0A -p +P lugin -type = 'StandardPluginType'%0A%0A def __init__(self, ):%0A %22%22%22 %22%22%22%0A super(StandardP +s that derive from this type will have to implement%0A activate() or plugz will refuse to load the plugin.%0A%0A The plugintype ne...
36cb425efc81a504f4e27273b2c977d3c1748b2c
Fix api_tvrage for shows with non-ascii characters
flexget/plugins/api_tvrage.py
flexget/plugins/api_tvrage.py
from __future__ import unicode_literals, division, absolute_import import logging import datetime from socket import timeout from sqlalchemy import Column, Integer, DateTime, String, Unicode, ForeignKey, select, update from sqlalchemy.orm import relation import tvrage.api from flexget.event import event from flexget....
Python
0
@@ -5946,24 +5946,40 @@ pi.Show(name +.encode('utf-8') )%0A except
5a489a6b90e0b09c19d0384de9d6f07a7b8e9465
change order
schedules_tools/schedule_handlers/jsonstruct.py
schedules_tools/schedule_handlers/jsonstruct.py
import datetime import json from schedules_tools.schedule_handlers import ScheduleHandlerBase class ScheduleHandler_json(ScheduleHandlerBase): provide_export = True def export_schedule(self, out_file, flat=False): json_schedule = dict() json_schedule['name'] = self.schedule.name json...
Python
0.000003
@@ -273,20 +273,20 @@ hedule%5B' -name +slug '%5D = sel @@ -296,20 +296,20 @@ chedule. -name +slug %0A @@ -316,36 +316,36 @@ json_schedule%5B' -slug +name '%5D = self.schedu @@ -339,36 +339,36 @@ = self.schedule. -slug +name %0A json_sc
ffe41990bd0e06c8d2ac2edc640b77fa7229d044
modify some print out information
git-ignore/git_ignore.py
git-ignore/git_ignore.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014 Ciel, http://ciel.im # Distributed under terms of the MIT license. import sys from git_ignore_add import git_ignore_add from git_ignore_save import git_ignore_save from git_ignore_list import git_ignore_list from git_ignore_show import git_ignore_show from g...
Python
0.000019
@@ -1278,19 +1278,23 @@ ignore -fil +templat es%22%0A%09pri @@ -1354,32 +1354,33 @@ ignore template +s %22%0A%09print %22 sh @@ -1427,32 +1427,33 @@ ignore template +s %22%0A%09print %22 wh
4c646128cfcb6d59445890c257447f01ed77a706
Fix python syntax bug in update email fwd's script
core/management/update_email_forwards.py
core/management/update_email_forwards.py
# Virtual alias file syntax: # email, space, email, (space, email, space, email,) newline, (repeat) # Example: # groep@arenbergorkest.be jef@gmail.com jos@hotmail.com # jef@arenbergokest.be jef@gmail.com # Catchall alias email = '@arenbergorkest.be' from email_aliases import aliases c = '' # New content of postfi...
Python
0.000008
@@ -390,14 +390,17 @@ lias -. +%5B' email +'%5D +'@a @@ -432,17 +432,18 @@ in(alias -. +%5B' destinat @@ -446,16 +446,18 @@ inations +'%5D ))%0A%0A%0Afro
c473cb452c7c7ce9bf6fbbce48c62856a5336219
add tagging as a subresource
awsv2_auth.py
awsv2_auth.py
from __future__ import unicode_literals import base64 import hashlib import hmac import time from datetime import datetime from requests.auth import AuthBase try: from urllib.parse import urlparse, urlencode except ImportError: from urlparse import urlparse from urllib import urlencode class AwsV2Auth...
Python
0.000001
@@ -1432,16 +1432,27 @@ ayment', + 'tagging', 'torren @@ -1470,19 +1470,8 @@ id', - 'uploads', %0A @@ -1494,16 +1494,27 @@ + 'uploads', 'versio @@ -1544,16 +1544,44 @@ rsions', +%0A 'websit
3ec923f4052bf7b66e5a694a1377124cc85f399c
Remove another unused test
bills/tests.py
bills/tests.py
from django.test import override_settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.contrib.staticfiles.testing import StaticLiveServerTestCase from preferences.models import Preferences @override_settings(STATICFILES_STORAGE='django.contrib.staticfiles.stor...
Python
0.000001
@@ -1163,193 +1163,4 @@ 00)%0A -%0A def test_by_location_view_selected(self):%0A response = self.client.get(reverse('by_location_selected', args=%5B'dudleyville'%5D))%0A self.assertEqual(response.status_code, 200)%0A
b26fd35482bce82dd0edf97b265d4ef9cf3ed7f8
Correct test configuration action
src/sentry/plugins/bases/notify.py
src/sentry/plugins/bases/notify.py
""" sentry.plugins.bases.notify ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from django import forms from django.utils.translation import ugettext_lazy as _ from sentry.plugins import Plugin from sentry.models ...
Python
0.000001
@@ -3457,19 +3457,19 @@ elf. -post_proces +notify_user s(ev @@ -3490,30 +3490,21 @@ nt, -is_new=True, is_sample +fail_silentty =Fal
affb4658f904db2ae0ad28d8b91603350b8ec8e9
fix student username (#2433)
scripts/import_recup_intervenants.py
scripts/import_recup_intervenants.py
import ipdb # -*- coding: utf-8 -*- #!/usr/bin/env python import os import csv import logging import random from copy import deepcopy from datetime import datetime, timedelta import calebasse.settings import django.core.management django.core.management.setup_environ(calebasse.settings) from django.db import tran...
Python
0
@@ -2770,32 +2770,40 @@ er.first_name%5B0%5D +.lower() , worker.last_na @@ -2800,24 +2800,32 @@ er.last_name +.lower() )%0A pa @@ -3126,57 +3126,16 @@ ame= -%22%25s%25s%22 %25 (worker.first_name%5B0%5D, worker.last_name) +username ,%0A
6a5e113cd78a27abb5eb4c249998fde5dfb41a27
fix visual indentation
carto/exceptions.py
carto/exceptions.py
""" Module for carto-python exceptions definitions .. module:: carto.exceptions :platform: Unix, Windows :synopsis: Module for carto-python exceptions definitions .. moduleauthor:: Daniel Carrion <daniel@carto.com> .. moduleauthor:: Alberto Romeu <alrocar@carto.com> """ class CartoException(Exception): ...
Python
0.000012
@@ -884,28 +884,16 @@ 429 and -%0A 'Retry- @@ -923,16 +923,20 @@ ers and%0A +
140eeff1a5036ed742cedbc265a0875dcdf0b6c7
use RequestException instead of Exception
movies_organizer/utils.py
movies_organizer/utils.py
import os import re import requests import shutil from guessit import guessit from imdbpie import Imdb from movies_organizer.movie import Movie imdb = Imdb() def format_file_name(name): return re.sub('[/:*?\"<>|]', '', name) def print_movie_information(to_dir, movie): with open(os.path.join(to_dir, 'info....
Python
0.000001
@@ -97,16 +97,55 @@ rt Imdb%0A +from requests import RequestException%0A%0A from mov @@ -865,16 +865,23 @@ except +Request Exceptio
cefaf7384d1b3be13756660288bec637b5437ba9
Update the documentation for analyze_netlist_step to make it clearer that inputs, outputs and constants are just logical placeholders for values that will be filled in when the step actually executes.
flows/analysis/build_defs.bzl
flows/analysis/build_defs.bzl
# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
0
@@ -2653,33 +2653,50 @@ doc = %22 -A +Logical names of a dditional file i @@ -2818,17 +2818,25 @@ doc = %22 -N +Logical n ames of @@ -2955,18 +2955,24 @@ = %22 -Additional +Logical names of str
d5f4b9ae2b5faa9493370f7a0c09ef3bf1afc34e
apply timezone and edit date format
kino/skills/weather.py
kino/skills/weather.py
# -*- coding: utf-8 -*- import arrow import forecastio from airkoreaPy import AirKorea from geopy.geocoders import GoogleV3 import slack import utils class Weather(object): def __init__(self, text=None): self.input = text self.config = utils.Config() self.slackbot = slack.SlackerAdapter(...
Python
0.000001
@@ -31,16 +31,40 @@ t arrow%0A +from dateutil import tz%0A import f @@ -1827,9 +1827,9 @@ 0, 2 -4 +1 , 3) @@ -1873,16 +1873,37 @@ %5B'time'%5D +, tzinfo=tz.tzlocal() ).format @@ -1904,17 +1904,17 @@ format(' -d +D %EC%9D%BC HH:mm'
48f5f051c9dae382cf535b5067f4df539a5e01a4
fix buildbucket property parsing
scripts/master/buildbucket/common.py
scripts/master/buildbucket/common.py
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import datetime import json import logging from twisted.python import log as twistedLog LOG_PREFIX = '[buildbucket] ' # Buildbot-related constants. BUILD_...
Python
0.000003
@@ -2496,25 +2496,29 @@ ce(value -%5B +.get( 'build' -%5D +) , basest
e6fe05e6f0f9d8f7c6772b4e4041436a7e18c82b
fix session stats parser script
parse_session_stats.py
parse_session_stats.py
#! /usr/bin/env python # Copyright Arvid Norberg 2008. Use, modification and distribution is # subject to the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import os, sys, time stat = open(sys.argv[1]) line = stat.readline() while not 's...
Python
0
@@ -3565,21 +3565,19 @@ , 'disk -cache +job time',
383fec4ac6014f71a894ec1fd108ad88fb39504d
Implement new data folder locator
scripts/observations/scrape/CPNWH_Downloader.py
scripts/observations/scrape/CPNWH_Downloader.py
"""Use this to directly download CPNWH data. To prevent timeout errors with their server, the data is downloaded from each herbaria separately. """ import argparse import string import requests import PyFloraBook.input_output.data_coordinator as dc # Globals # These are URL queries QUERIES = { "polygon": "&P...
Python
0.000066
@@ -1713,20 +1713,28 @@ ate_raw_ -data +observations _folder(
8be03d5a8508c982f6626a5f756bdf267f3dbe6d
Update echo_bot.py
examples/echo_bot.py
examples/echo_bot.py
""" This bot listens to port 5002 for incoming connections from Facebook. It takes in any messages that the bot receives and echos it back. """ from flask import Flask, request from pymessenger.bot import Bot app = Flask(__name__) ACCESS_TOKEN = "" VERIFY_TOKEN = "" bot = Bot(ACCESS_TOKEN) @app.route("/", methods=[...
Python
0
@@ -1051,16 +1051,17 @@ tachment +s '):%0A @@ -1084,45 +1084,18 @@ -bot.send_attachment_url(recipient_id, +for att in x%5B' @@ -1095,33 +1095,37 @@ in x%5B'message'%5D -%5B +.get( 'attachment'%5D%5B't @@ -1123,19 +1123,12 @@ ment -'%5D%5B'type'%5D, +s'): %0A @@ -1156,54 +1156,62 @@ - ...
6dc06f50696db2f4c6a3e7ffca62d3723187e3a6
Fix typo
gnocchi/storage/swift.py
gnocchi/storage/swift.py
# -*- encoding: utf-8 -*- # # Copyright © 2014 eNovance # # Authors: Julien Danjou <julien@danjou.info> # # 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...
Python
0.999975
@@ -5339,19 +5339,18 @@ from Swi +f t -ch , then p
a6f8eaf554530a9d536ef8724aec5e28b46f59d5
Add rotation attribute for rectangles in annotation file
server/NucleiSegmentation/NucleiSegmentation.py
server/NucleiSegmentation/NucleiSegmentation.py
from ctk_cli import CLIArgumentParser import histomicstk as htk import numpy as np import json import scipy as sp import skimage.io import skimage.measure import logging logging.basicConfig() stainColorMap = { 'hematoxylin': [0.65, 0.70, 0.29], 'eosin': [0.07, 0.99, 0.11], 'dab': [0.27, 0.57...
Python
0
@@ -57,16 +57,48 @@ as htk%0A +import matplotlib.pyplot as plt%0A import n @@ -3303,16 +3303,45 @@ height,%0A + %22rotation%22: 0%0A
01d8bdcd03977029f6c50b6779247ff1f43bd1a0
handler->task_handler
cc/task/__init__.py
cc/task/__init__.py
import os, os.path import sys import skytools from cc import json from cc.job import CCJob from cc.reqs import TaskReplyMessage def get_task_handlers(): """Returns list of handler modules. Returns dict: (module_name -> docstr) """ d = os.path.dirname(__file__) res = {} for fn in os.listdir...
Python
0.999274
@@ -1913,32 +1913,37 @@ handler = task%5B' +task_ handler'%5D,%0A @@ -2403,16 +2403,21 @@ = task%5B' +task_ handler' @@ -3057,8 +3057,9 @@ ncName)%0A +%0A
c9b4e2268cdb4915c6e65a2060ee8fc57164fdf2
Add confirmation email's key
register/models.py
register/models.py
from __future__ import unicode_literals from django.contrib.auth import models as admin_models from django.core.exceptions import ValidationError from django.db import models from register.emails import sendgrid_send from register.utils import reverse status = [ ('A', 'Accepted'), ('P', 'Pending'), ('R', ...
Python
0.000003
@@ -4002,67 +4002,45 @@ ' -placeholder' # TODO: get sendgrid user and create template +c4d4d758-974f-437b-af9a-d8532f96d670' %0A
16ddaa67f4ec1dc2c26c1e0aa011340e727be0fb
Improve time accuracy by allowing direct instantiation of the timestamp
km3pipe/controlhost.py
km3pipe/controlhost.py
# coding=utf-8 # Filename: controlhost.py """ A set of classes and tools wich uses the ControlHost protocol. """ from __future__ import absolute_import import socket import struct import time from .logger import logging __author__ = "Tamas Gal" __copyright__ = "Copyright 2016, Tamas Gal and the KM3NeT collaboration...
Python
0.000008
@@ -2115,24 +2115,47 @@ ix(data=data +, timestamp=time.time() )%0A @@ -5345,32 +5345,48 @@ =None, data=None +, timestamp=None ):%0A if da @@ -5509,36 +5509,123 @@ -self.timestamp = time.time() +if timestamp is None:%0A self.timestamp = time.time()%0A else:%0A self...
624b3a9606c27076562ed522c919e480d72b86f9
Allow passing multiple tokens to write()
edgedb/lang/common/ast/codegen.py
edgedb/lang/common/ast/codegen.py
## # Portions Copyright (c) 2008-2010 MagicStack Inc. # Portions Copyright (c) 2008 Armin Ronacher. # All rights reserved. # # This code is licensed under the PSFL license. ## from .visitor import NodeVisitor class SourceGenerator(NodeVisitor): """This visitor is able to transform a well formed syntax tree into ...
Python
0
@@ -171,16 +171,34 @@ e.%0A##%0A%0A%0A +import itertools%0A%0A from .vi @@ -223,16 +223,17 @@ isitor%0A%0A +%0A class So @@ -813,17 +813,34 @@ e(self, -x +*x, delimiter=None ):%0A @@ -1196,32 +1196,58 @@ f.new_lines = 0%0A + if delimiter:%0A self.res @@ -1258,16 +1258,328 @@ append(x +...
f7611e37ef1e0dfaa568515be365d50b3edbd11c
Fix plugin import for astropy 2.x
ccdproc/conftest.py
ccdproc/conftest.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst # this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. import os try: from astropy.tests.plugins.displa...
Python
0
@@ -729,16 +729,245 @@ SIONS)%0A%0A +try:%0A # This is the way to get plugins in astropy 2.x%0A from astropy.tests.pytest_plugins import *%0Aexcept ImportError:%0A # Otherwise they are installed as separate packages that pytest%0A # automagically finds.%0A pass%0A%0A from .te
f5daf719d9d358522feec212be5b538399faf4fd
Add missing Coore Actions (#116)
Core/automation/lib/python/core/actions.py
Core/automation/lib/python/core/actions.py
import sys from core import osgi __all__ = [] oh1_actions = osgi.find_services("org.openhab.core.scriptengine.action.ActionService", None) or [] oh2_actions = osgi.find_services("org.eclipse.smarthome.model.script.engine.action.ActionService", None) or [] _module = sys.modules[__name__] for s in oh1_actions + oh2_a...
Python
0
@@ -455,8 +455,677 @@ d(name)%0A +%0Atry:%0A from org.openhab.core.model.script.actions import Exec%0A from org.openhab.core.model.script.actions import HTTP%0A from org.openhab.core.model.script.actions import LogAction%0A from org.openhab.core.model.script.actions import Ping%0Aexcept:%0A from org.ecl...
e4f6d81f4aafa26eaed9eec0fc1f7941c8ae2ab5
fix typo
mtools/mlogvis/mlogvis.py
mtools/mlogvis/mlogvis.py
#!/usr/bin/env python from mtools.util.logevent import LogEvent from mtools.util.cmdlinetool import LogFileTool import mtools import os import webbrowser class MLogVisTool(LogFileTool): def __init__(self): LogFileTool.__init__(self, multiple_logfiles=False, stdin_allowed=True) self.argparser.d...
Python
0.999991
@@ -1375,25 +1375,25 @@ f.args%5B'line -- +_ max'%5D)%0A
fe14f35e72bd9dda37246dd774e5ebd19ed96d41
Fix pylint errors in consensus runner
adac/runner.py
adac/runner.py
'''Run with flask as an HTTP server to communicate starting points of CloudK-SVD and Consensus ''' import json import logging import sys import traceback from configparser import ConfigParser from multiprocessing import Process, Value from urllib.parse import urlparse import numpy as np import adac.consensus.iterative ...
Python
0.007624
@@ -729,28 +729,24 @@ at 1 -, 2 -, 3 -, ... -, n where %0A @@ -741,21 +741,16 @@ n where -%0A n is th @@ -764,23 +764,65 @@ h of the +%0A vector +. The numbers are separated by spaces. %0A%0A Ar @@ -4775,32 +4775,33 @@ (%22~~~~~~~~~~~~~~ + CONSENSUS DATA B @@ -4803,13 +4803,8 @@ ATA ...
f340dfe4bad3685541050cb91a9cdce6808ad9a1
remove call log
adbtool/cmd.py
adbtool/cmd.py
#!/usr/bin/env python # encoding=utf-8 import os import sys import shlex import subprocess import math # return (output, isOk) def call(cmd, printOutput=False): print("call %s" % cmd) output = None isOk = True if sys.platform == 'win32': args = cmd else: # linux must split argumen...
Python
0.000001
@@ -156,24 +156,26 @@ =False):%0A + # print(%22call @@ -871,32 +871,34 @@ is None:%0A + # print('can not
6789e3eba87f8165897a520c384e0c8177acc00b
Remove TODO in response to Matt's comment.
src/simulator/system_parameters.py
src/simulator/system_parameters.py
# Copyright 2021 The Private Cardinality Estimation Framework 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 b...
Python
0
@@ -3034,91 +3034,8 @@ s%5D)%0A - # TODO(jiayu): add str for campaign_spend_fractions_generator if necessary%0A
38ac18550bffac2cbadef975e61beab66de48d13
Change particle types between frames
hoomd/pytest/test_simulation.py
hoomd/pytest/test_simulation.py
import hoomd import numpy as np import pytest from copy import deepcopy try: import gsd.hoomd skip_gsd = False except ImportError: skip_gsd = True @pytest.fixture(scope="function") def get_snapshot(device): def make_snapshot(n=10, particle_types=['A']): s = hoomd.snapshot.Snapshot(device.comm)...
Python
0.000001
@@ -1325,16 +1325,160 @@ urn s%0A%0A%0A +def set_types(s, inds, particle_types, particle_type):%0A for i in inds:%0A s.particles.typeid%5Bi%5D = particle_types.index(particle_type)%0A%0A%0A def upda @@ -1497,16 +1497,16 @@ (snap):%0A - if s @@ -2960,16 +2960,153 @@ %5Bkey%5D%0A%0A%0A +def random_inds...
6b2feb22b8096d74a5bb2e6ad1df0cb01a6fe688
Add option to hide over/underflows
km3modules/plot.py
km3modules/plot.py
# coding=utf-8 # Filename: plot.py # pylint: disable=locally-disabled """ A collection of plotting functions and modules. """ from __future__ import division, absolute_import, print_function from datetime import datetime import os import numpy as np import matplotlib # Force matplotlib to not use any Xwindows backen...
Python
0
@@ -791,19 +791,38 @@ ghtgray' +, hide_limits=False ):%0A - %22%22%22C @@ -1207,16 +1207,75 @@ w values +%0A hide_limits: do not show under/overfactors in the plot %0A%0A %22%22 @@ -2012,24 +2012,52 @@ atter_args)%0A + if not hide_limits:%0A under_id @@ -2070,16 +2070,20 @@ %3C vmin%0A + ...
db11ed5061580aa089146d96e5516c1067b11e7e
fix VerilogSerializer_Value.BitLiteral
hwt/serializer/verilog/value.py
hwt/serializer/verilog/value.py
from hwt.bitmask import mask from hwt.hdlObjects.constants import DIRECTION from hwt.hdlObjects.operator import Operator from hwt.hdlObjects.operatorDefs import AllOps from hwt.hdlObjects.types.bits import Bits from hwt.hdlObjects.types.defs import BOOL, BIT from hwt.hdlObjects.value import Value from hwt.serializer.ex...
Python
0.000052
@@ -785,17 +785,17 @@ return %22 -2 +1 'b%25d%22 %25 @@ -845,9 +845,9 @@ rn %22 -2 +1 'bx%22
580c9f576c61c8f3ee8af2c5008663e28535f636
Refactor PatientDetailSerializer
patient/serializers.py
patient/serializers.py
from django.contrib.auth.models import User from .models import Patient from rest_framework import serializers import datetime from next_of_kin.models import NextOfKin from next_of_kin.serializers import NextOfKinSerializer class SimpleUserSerializer(serializers.ModelSerializer): full_name = serializers.Serialize...
Python
0.000001
@@ -1761,33 +1761,33 @@ fields = -( +%5B %0A 'id @@ -1935,17 +1935,17 @@ -) +%5D %0A%0A%0Aclass @@ -2025,132 +2025,8 @@ r()%0A - birth_date = serializers.SerializerMethodField('get_birth_date')%0A age = serializers.SerializerMethodField('get_age')%0A @@ -2333,209 +2333,92 @@...
e410bad282d8129ed3099f1fa1edd09d82aaf77c
bump version [ci skip]
kuyruk/__init__.py
kuyruk/__init__.py
from __future__ import absolute_import import logging from kuyruk.kuyruk import Kuyruk from kuyruk.worker import Worker from kuyruk.task import Task from kuyruk.config import Config __version__ = '0.14.6' try: # not available in python 2.6 from logging import NullHandler except ImportError: class NullHan...
Python
0
@@ -197,17 +197,17 @@ = '0.14. -6 +7 '%0A%0Atry:%0A
8bd4224bd1edfe527894d31056b03b6ca80224b3
fix security context import
kubespawner/objects.py
kubespawner/objects.py
""" Helper methods for generating k8s API objects. """ from kubernetes.client.models.v1_pod import V1Pod from kubernetes.client.models.v1_pod_spec import V1PodSpec from kubernetes.client.models.v1_object_meta import V1ObjectMeta from kubernetes.client.models.v1_pod_security_context import V1PodSecurityContext from kub...
Python
0.00001
@@ -487,26 +487,16 @@ dels.v1_ -container_ security @@ -513,25 +513,16 @@ mport V1 -Container Security
ca82a17a51842e4631ba2e1d30cc76feede8e3eb
add def Overview
achievements/views.py
achievements/views.py
# Create your views here.
Python
0.000003
@@ -1,26 +1,660 @@ -# Create your views here.%0A +from django.http import HttpResponse%0Afrom django.template import RequestContext%0Afrom django.shortcuts import render_to_response%0Afrom django.views.generic import ListView%0Afrom models import Category, Achievement, Trophies%0Aimport settings%0A%0Adef Overview(reque...
05448e3a129ff2fb68295fd0c1bd9727247ae591
I'm idiot
acmratingapp/views.py
acmratingapp/views.py
import os from django.shortcuts import render from django.views import generic from django.conf import settings from django.http import HttpResponse from django.utils.html import strip_tags import requests from bs4 import BeautifulSoup import csv from io import StringIO # Create your views here. class CsvView(generi...
Python
0.999054
@@ -1076,29 +1076,14 @@ ))). -replace(u%22%5Cu00A0%22, '' +strip( ))%0A
c93225961e9e9828cd4010c9aba9a985f32d6f5c
remove include( and require( due to large number of false positives
pef/imports/pefdefs.py
pef/imports/pefdefs.py
# Definitions for pef.py # exploitable functions exploitableFunctions = [ "system(", "exec(", "popen(", "pcntl_exec(", "eval(", "arse_str(", # use arse_str(, because somehow, parse_str causes "IndexError: list index out of range" o_O "parse_url(", "preg_replace(", "create_function("...
Python
0.00002
@@ -162,101 +162,8 @@ r(%22, - # use arse_str(, because somehow, parse_str causes %22IndexError: list index out of range%22 o_O %0A @@ -226,40 +226,8 @@ (%22,%0A - %22include(%22,%0A %22require(%22,%0A @@ -2956,8 +2956,9 @@ *FROM%22%0A%5D +%0A
e669a86ab18331ec5a5f9d568cf9b3363bae7bb4
Make dacapo harness time re private.
penchy/jobs/filters.py
penchy/jobs/filters.py
""" This module provides filters. """ import re from pprint import pprint from penchy.jobs.elements import Filter, SystemFilter class Tamiflex(Filter): pass class HProf(Filter): pass class DacapoHarness(Filter): """ Filters output of a DaCapo Harness. Inputs: - ``stderr``: List of Path...
Python
0
@@ -806,16 +806,17 @@ )%5D%0A%0A +_ TIME_RE @@ -1381,16 +1381,17 @@ Harness. +_ TIME_RE.
aa27510776dec590b4acaa8104ae078664c0d96e
Add WrongInputException, signals that filter rcved invalid input.
penchy/jobs/filters.py
penchy/jobs/filters.py
""" This module provides filters. """ import re from pprint import pprint from penchy.jobs.elements import Filter, SystemFilter class Tamiflex(Filter): pass class HProf(Filter): pass class DacapoHarness(Filter): """ Filters output of a DaCapo Harness. Inputs: - ``stderr``: List of Pat...
Python
0
@@ -125,16 +125,144 @@ ilter%0A%0A%0A +class WrongInputError(Exception):%0A %22%22%22%0A Filter received input it was not expecting and cannot process.%0A %22%22%22%0A pass%0A%0A%0A class Ta
3d283ff2eff893f3dee72cb53199a9a87c5f6e12
Update SensorClasses.py
sensors/SensorClass/SensorClasses.py
sensors/SensorClass/SensorClasses.py
from Adafruit_BNO055 import BNO055 import logging import sys import time # Create and configure the BNO sensor connection. Make sure only ONE of the # below 'bno = ...' lines is uncommented: # Raspberry Pi configuration with serial UART and RST connected to GPIO 18: # BeagleBone Black configuration with default I2...
Python
0
@@ -269,161 +269,8 @@ %0A%0A%0A%0A -# BeagleBone Black configuration with default I2C connection (SCL=P9_19, SDA=P9_20),%0A# and RST connected to pin P9_12:%0A# bno = BNO055.BNO055(rst='P9_12') %0A%0A# @@ -417,28 +417,8 @@ f):%0A - bno.begin()%0A @@ -448,16 +448,45 @@ (rst=18) +%0A bno.begin()%...
812924adac3fa0d9c079ae14f0b3c96b4f51621a
fix typo
lib/cybergis/gs/_geoserver_animate.py
lib/cybergis/gs/_geoserver_animate.py
from base64 import b64encode from optparse import make_option import json import urllib import urllib2 import argparse import time import os import subprocess def make_request(url, params, auth=None, data=None, contentType=None): """ Prepares a request from a url, params, and optionally authentication. """...
Python
0.999991
@@ -4338,39 +4338,27 @@ -AWS_HEADERS = %7B'C +key.c ache --C +_c ontrol -': + = str @@ -4396,17 +4396,56 @@ lidate') -, +%0A AWS_HEADERS = %7B 'Pragma'
4a9d6b50166a61ca54fe10c04a3ce681cf494143
backup defaults to false
src/node/ext/directory/directory.py
src/node/ext/directory/directory.py
import os import shutil from plumber import plumber from node.base import BaseNode from node.parts import ( NodeChildValidate, Adopt, AsAttrAccess, DefaultInit, Reference, Nodify, DictStorage, ) from node.interfaces import IRoot from zope.interface import ( implements, alsoProvides, ...
Python
0.999762
@@ -2101,19 +2101,20 @@ backup= -Tru +Fals e, facto
64ec4e02fe84a729b6a25bcdbdaf7946c1922b5f
Add manage to admin tasks
admin/tasks.py
admin/tasks.py
import os from invoke import task, run from website import settings HERE = os.path.dirname(os.path.abspath(__file__)) @task() def assets(dev=False, watch=False): """Install and build static assets for admin.""" if os.getcwd() != HERE: os.chdir(HERE) npm = 'npm install' if not dev: npm...
Python
0
@@ -114,16 +114,369 @@ le__))%0A%0A +%0A@task()%0Adef manage(*args):%0A %22%22%22Take arguments and run python manage%0A%0A :param args: ex. runserver, migrate%0A %22%22%22%0A if os.getcwd() != HERE:%0A os.chdir(HERE)%0A env = 'DJANGO_SETTINGS_MODULE=%22admin.base.settings%22'%0A arg_str = ' '...
a80fe93110b5d0accbfa77d7dac7afe2df5a4688
update module to v.3 l10n_it
l10n_it/__openerp__.py
l10n_it/__openerp__.py
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 # OpenERP Italian Community (<http://www.openerp-italia.org>) # Servabit srl # Agile Business Group sagl # Domsense srl # Albato...
Python
0
@@ -1985,38 +1985,12 @@ ' -init_xml': %5B%5D,%0A 'update_xml +data ': %5B @@ -2318,12 +2318,8 @@ demo -_xml ': %5B
25f9b34b3721721f792d2c12bd2829dce41add34
build next stage of test gen pipeline
iatidataquality/dqparsetests.py
iatidataquality/dqparsetests.py
import re import sys import itertools from functools import partial import iatidataquality.models as models class TestSyntaxError(Exception): pass comment = re.compile('#') blank = re.compile('^$') def test_functions(): mappings = [] def add(regex): def append_to_mappings(fn): mappings.a...
Python
0
@@ -194,16 +194,98 @@ ('%5E$')%0A%0A +def ignore_line(line):%0A return bool(comment.match(line) or blank.match(line))%0A%0A def test @@ -3235,47 +3235,67 @@ ts)%0A -%0A -for test in tests:%0A +tests = itertools.ifilter(lambda test: not ignore_ line - = +( test @@ -3303,81 +3303,65 @@ name -%0A ...
5d948ab54bee6ce858b92190f885cbfe1c2203d6
print tags in the right order
program_synthesis/algolisp/tools/timer.py
program_synthesis/algolisp/tools/timer.py
import collections import time def _print_tags(tags, counts={}): result = ', '.join([ "%s=%.5f (%d)" % (tag, value, counts.get(tag, 0)) for tag, value in tags.items() ]) print(result) class Timer(object): def __init__(self): self.tags = collections.defaultdict(float) ...
Python
0.000008
@@ -42,16 +42,23 @@ nt_tags( +order, tags, co @@ -253,32 +253,60 @@ __init__(self):%0A + self.tag_order = %5B%5D%0A self.tag @@ -531,16 +531,32 @@ nt_tags( +self.tag_order, self.tag @@ -588,32 +588,104 @@ tag(self, tag):%0A + if tag not in self.tags:%0A self.tag_order.append(ta...
478fa936cd1451405c11fac4ae8f960a4491b5e6
handle all errors, format exceptions that were not caught
ceph_installer/cli/main.py
ceph_installer/cli/main.py
import sys from tambo import Transport import ceph_installer from ceph_installer.cli import log from ceph_installer.cli import dev, task from ceph_installer.cli.decorators import catches class CephInstaller(object): _help = """ A command line utility to install and configure Ceph using an HTTP API as a REST serv...
Python
0
@@ -948,16 +948,33 @@ terrupt, + handle_all=True, logger=
94fcdb090b6b9f12039a42d5ead6b0aada21e18d
add default value for remotecontrol task option
cuckoo/web/controllers/submission/api.py
cuckoo/web/controllers/submission/api.py
# Copyright (C) 2016-2017 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import json from django.http import JsonResponse from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from djang...
Python
0.000001
@@ -1280,24 +1280,62 @@ options%22: %7B%0A + %22enable-injection%22: True,%0A @@ -1442,32 +1442,35 @@ %22 -enable-injection +process-memory-dump %22: True, @@ -1487,33 +1487,28 @@ %22 -process-memory-dump%22: Tru +remotecontrol%22: Fals e,%0A
381f8f11fb942ad672844c1828a624bd2638d8ae
Add config getter
configd/interpolation.py
configd/interpolation.py
""" Interpolator implementations. """ import re from . import abc from .exceptions import InterpolatorError from .utils.compat import string_types, text_type __all__ = [ 'StrInterpolator', ] class StrInterpolator(abc.StrInterpolator): """ A `abc.StrInterpolator` implementation that resolves a string ...
Python
0.000002
@@ -2259,16 +2259,183 @@ config%0A%0A + @property%0A def config(self):%0A %22%22%22%0A Get the config object.%0A :return abc.Config: The config object.%0A %22%22%22%0A return self._config%0A%0A def
d46a5c47c667a3ba17e943687c40678cb639c45b
update GO obo-xml file date
changelog_config.py
changelog_config.py
# coding: utf-8 ''' changelog_config.py Configuration for the change-log script. Provides a mapping for each dataset to its proper parser. Each dataset is independant, and can be commented/uncommented as desired by the user. ''' from collections import OrderedDict import parsers changelog_data = OrderedDict()...
Python
0
@@ -1263,33 +1263,33 @@ st-full/go_20130 -7 +9 -termdb.obo-xml. @@ -1409,9 +1409,9 @@ 0130 -7 +9 -ter
b8916464cedb6aeea877fa87ae29f619383ef3ad
Make __str__ for exceptions less verbose (no remote part) while __repr__ stays unchanged
rpyc/core/vinegar.py
rpyc/core/vinegar.py
""" **Vinegar** ("when things go sour") is a safe serializer for exceptions. The :data`configuration parameters <rpyc.core.protocol.DEFAULT_CONFIG>` control its mode of operation, for instance, whether to allow *old-style* exceptions (that do not derive from ``Exception``), whether to allow the :func:`load` to import ...
Python
0.002543
@@ -6862,16 +6862,97 @@ ption%3E%22%0A + return text%0A def __repr__(self):%0A text = str(self)%0A @@ -7193,65 +7193,8 @@ ext%0A - def __repr__(self):%0A return str(self)%0A
2f01f67f3eaf9ce5fdac0648aad330981693c9d4
Implement FSGROUP support correctly
hesiod.py
hesiod.py
""" Present both functional and object-oriented interfaces for executing lookups in Hesiod, Project Athena's service name resolution protocol. """ from _hesiod import bind, resolve from pwd import struct_passwd from grp import struct_group class HesiodParseError(Exception): pass class Lookup(object): """ ...
Python
0
@@ -873,50 +873,614 @@ -self.multiRecords = (len(self.results) %3E +# An FSGROUP need not contain multiple members.%0A # We are defining an FSGROUP as %22Something for which all%0A # returned records have an integer as the last field%22%0A%0A self.isFSGroup = True%0A for result in self...
77302f755c6c9065d79048c2ff8e3a06cdb35f42
resolve issue in "link", fix #174
chanjo/load/link.py
chanjo/load/link.py
# -*- coding: utf-8 -*- from chanjo.store import Gene, Transcript from .utils import get_or_build_exon def rows(session, row_data): """Handle rows of sambamba output.""" exons = (row(session, data) for data in row_data) return exons def row(session, data): """Link transcripts and genes.""" # st...
Python
0
@@ -96,16 +96,30 @@ ild_exon +, _exon_kwargs %0A%0A%0Adef r @@ -349,16 +349,54 @@ object%0A + exon_filters = _exon_kwargs(data)%0A exon @@ -429,20 +429,28 @@ ession, -data +exon_filters )%0A #