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
ca8dec97321fdf2ceee459b95c3d885edebca15b
Bump DeletionWatcher up to 20 minutes
deletionwatcher.py
deletionwatcher.py
import json import requests import time import websocket from bs4 import BeautifulSoup from threading import Thread from metasmoke import Metasmoke from globalvars import GlobalVars from datahandling import is_false_positive, is_ignored_post, get_post_site_id_link class DeletionWatcher: @classmethod def updat...
Python
0
@@ -2776,9 +2776,10 @@ rl, -6 +12 00)%0A
2bcfccb3b4b0d6f79fd62d84e98495392b86795a
Remove print statements
mail/views.py
mail/views.py
from django import http from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from django.contrib import messages from django.conf import settings from django.contrib.auth.decorators impo...
Python
0.001543
@@ -936,39 +936,8 @@ IN)) -%0A print (expression.pattern) %0A%0A @@ -1067,49 +1067,8 @@ l')%0A - print(%22Old url: %7B%7D%22.format(url))%0A @@ -1407,57 +1407,8 @@ n'%5D%0A - print(%22New url: %7B%7D%22.format(new_url))%0A @@ -1484,16 +1484,16 @@ url'):%5D%0A + @@ -1519...
38c0e0235a4c28a8b6627d1160efe318d95015bf
Revert "Simplifiquem la forma de mirar si l'attach es valid"
mailticket.py
mailticket.py
import email import hashlib import base64 import re from email.header import decode_header from email.utils import parseaddr from email.utils import parsedate_tz, mktime_tz import datetime import settings import logging logger = logging.getLogger(__name__) class MailTicket: """ Classe que encapsula un...
Python
0
@@ -4309,16 +4309,46 @@ rt_body) + and (not part.is_multipart()) and sel @@ -4573,69 +4573,8 @@ ):%0D%0A - if attachment.is_multipart():%0D%0A return False%0D%0A %0D%0A
cceb88b877b71f5c4659959055a4cd92847f0426
Tweak startup/shutdown log entries to be more visible and informative
__main__.py
__main__.py
#!/usr/bin/env python3 # Run script for CrabBot # A mess of config args and terminal polling code # # See -h or read the argparse setup for argument details import argparse import datetime import logging import os import readline # Only for better terminal input support, eg. history import sys from tempfile import ge...
Python
0
@@ -844,16 +844,44 @@ ng.info( +%22________%5Cn%22 +%0A %22Startin @@ -882,21 +882,21 @@ tarting -crabb +CrabB ot at %22 @@ -925,17 +925,209 @@ e.now()) -) + + %22%5Cn%22%0A %22--------%22) # Make it clear in the log when a new run starts%0A # TODO? Might want a...
a492e805fa51940d746a1d251232bc4f13417165
fix waftools/man.py to install manpages again.
waftools/man.py
waftools/man.py
import Common, Object, Utils, Node, Params import sys, os import gzip from misc import copyobj def gzip_func(task): env = task.m_env infile = task.m_inputs[0].abspath(env) outfile = task.m_outputs[0].abspath(env) input = open(infile, 'r') output = gzip.GzipFile(outfile, mode='w') output.write(...
Python
0
@@ -588,22 +588,21 @@ st(self. -source +files )%0A
89c1b58da23cfe16e8e195c61313b818a6d5f890
Add persist.py
darwin/persist.py
darwin/persist.py
import joblib from .version import __version__, VERSION class PersistenceMixin(object): """ Mixin that adds joblib persistence load and save function to any class. """ @classmethod def from_file(cls, objdump_path): ''' Parameters ---------- objdump_path: str ...
Python
0.000001
@@ -84,17 +84,16 @@ bject):%0A -%0A %22%22%22%0A @@ -1081,23 +1081,22 @@ return -learner +object %0A @@ -1732,15 +1732,24 @@ _ = -Learner +PersistenceMixin .fro @@ -1833,23 +1833,22 @@ ave the -learner +object to a fi @@ -1851,16 +1851,17 @@ a file.%0A +%0A @@ -1967,23 +1967,22 @@ av...
dd369472eeb5199e19d4aa5bfb0adeb839dcaf97
move X axis label
buildtimetrend/trend.py
buildtimetrend/trend.py
# vim: set expandtab sw=4 ts=4: # # Generates a trend (graph) from the buildtimes in buildtimes.xml # # Copyright (C) 2014 Dieter Adriaenssens <ruleant@users.sourceforge.net> # # This file is part of buildtime-trend # <https://github.com/ruleant/buildtime-trend/> # # This program is free software: you can redistribute ...
Python
0.000002
@@ -3918,17 +3918,18 @@ oords(1. -1 +05 , -0.05)
735a52b8ad4ebf7b6b8bb47e14667cd9004e624b
add some mappings
algo/lru.py
algo/lru.py
class Node: def __init__(self, val): self.next = None self.prev = None self.value = val class DoublyLinkedList: def __init__(self): self.head = None def insert(self, val): node = Node(val) head = self.head if self.head == None: self.head...
Python
0.000011
@@ -1,12 +1,30 @@ +mapping = %7B%7D%0A %0A class Node:%0A @@ -254,16 +254,52 @@ de(val)%0A + mapping%5Bval%5D = node %0A
6bb58e13b657c1546f4f5d1afa70d48a9187f168
Update server.py
gprs/server.py
gprs/server.py
from socket import * from modules import decode_packet import sys from modules import params Parser = params.Parser() argv = Parser.createParser() ip_and_port = argv.parse_args(sys.argv[1:]) #host = ip_and_port.ip #port = int(ip_and_port.port) host = "0.0.0.0" port = 5300 addr = (host, port) print(host,port) tcp_socke...
Python
0.000001
@@ -267,9 +267,9 @@ = 5 -3 +1 00%0Aa
9e5b42fa14b50d91840a67646ed6779d8f5c22ae
Make ``cursor_kinds`` private
bears/c_languages/ClangComplexityBear.py
bears/c_languages/ClangComplexityBear.py
from clang.cindex import Index, CursorKind from coalib.bears.LocalBear import LocalBear from coalib.results.Result import Result from coalib.results.SourceRange import SourceRange from bears.c_languages.ClangBear import clang_available, ClangBear class ClangComplexityBear(LocalBear): """ Calculates cyclomati...
Python
0
@@ -669,24 +669,25 @@ ilable)%0A +_ decisive_cur @@ -1228,16 +1228,17 @@ in self. +_ decisive
22952f57c33070f83c4e9c38b2a96543ed983f4e
Make ndb_persistence execute Context's complete event
furious/extras/appengine/ndb_persistence.py
furious/extras/appengine/ndb_persistence.py
# # Copyright 2014 WebFilings, 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.000009
@@ -2380,16 +2380,61 @@ ete!!%22)%0A +%0A context.exec_event_handler('complete')%0A%0A retu
d428f6df195c0293340089b884b934fa16ef7ff6
Use local timezone if available. Fixes #3
wanikani/cli.py
wanikani/cli.py
import argparse import logging import os from wanikani.core import WaniKani, Radical, Kanji, Vocabulary CONFIG_PATH = os.path.join(os.path.expanduser('~'), '.wanikani') logger = logging.getLogger(__name__) def config(): if os.path.exists(CONFIG_PATH): logger.debug('Loading config from %s', CONFIG_PATH)...
Python
0.000001
@@ -35,16 +35,252 @@ ort os%0A%0A +# If the tzlocal package is installed, then we will help the user out%0A# and print things out in the local timezone%0ALOCAL_TIMEZONE = None%0Atry:%0A import tzlocal%0A LOCAL_TIMEZONE = tzlocal.get_localzone()%0Aexcept ImportError:%0A pass%0A%0A from wan @@ -2448,16 +2448,1...
b53bee8978c6fe407fce7769e16ac4991e36fcda
Return unknown status if geolocation API is unavailable
client/plugins/geolocation.py
client/plugins/geolocation.py
#!/usr/bin/env python3 import pickle import json import os import re import requests import subprocess import sys from qlmdm import top_dir, var_dir from qlmdm.client import get_setting cache_file = os.path.join(var_dir, 'geolocation.cache') os.chdir(top_dir) def unknown(): print(json.dumps('unknown')) sy...
Python
0.000002
@@ -2918,16 +2918,25 @@ pi_key)%0A +try:%0A response @@ -2978,22 +2978,28 @@ ps(data) -)%0Atry: +, timeout=5) %0A res
c256cf15bd6996b394c36b49fc9b7566abeb55f5
Fix struct.unpack format for Python 3
demo/python/cmd.py
demo/python/cmd.py
#!/usr/bin/env python ## It emulates the program "cmd" which is distributed with ## the comedilib software ## Copyright (C) May 2003 Luc Lefebvre <luc.lefebvre@mcgill.ca> ## Mar 2012 W. Trevor King <wking@drexel.edu> ## ## This program is free software; you can redistribute it and/or ## modify it under ...
Python
0.999997
@@ -4332,16 +4332,17 @@ n(data)/ +/ 2 # 2 by
85775847e93b35ac19e09962bc2b10f9be666e33
Update analysis.py with new finallist.py method
analysis.py
analysis.py
import random import linecache from unidecode import unidecode # ACTUALLY: pick a random line in links-sorted, and translate the numbers from there # Get a random node, and pull that line from the links doc––want this to be an option # Pull from links because some titles don't have link lines lineno = random.randint(...
Python
0
@@ -57,16 +57,224 @@ decode%0A%0A +# Process links into list%0Afinallist = %5BNone%5D * 5716809%0Awith open('links-simple-sorted.txt', 'r') as src:%0A%09for line in src:%0A%09%09%5BoNode, dNode%5D = line.split(':')%0A%09%09finallist%5Bint(oNode)%5D = dNode.rstrip('%5Cn')%5B1:%5D%0A%0A # ACTUAL @@ -413,10 +413,10 @@ ...
6a3f0ade1d8fe16eeda6d339220b7ef877b402e5
Add no-break options
LFI.TESTER.py
LFI.TESTER.py
''' @KaiyiZhang Github ''' import sys import urllib2 import getopt import time target = '' depth = 6 file = 'etc/passwd' html = '' prefix = '' url = '' keyword='root' def usage(): print "LFI.Tester.py Help:" print "Usage: LFI.TESTER.py -t [-d] [-f] [-k]" print " -t,--target The test url" print " -d,--depth ...
Python
0.998376
@@ -158,15 +158,31 @@ word -= + = 'root' +%0Aforce = False %0A%0Ade @@ -605,16 +605,17 @@ t:d:f:k: +n %22,%5B%22help @@ -653,16 +653,27 @@ eyword=%22 +,%22no-break%22 %5D)%0A%09%09for @@ -1142,17 +1142,66 @@ keyword%0A +%09%09%09if opt in(%22-n%22,%22--no-break%22):%0A%09%09%09%09force = True %0A - except g ...
68c0c054e5b9874f8a6423c35fb83c9de351b9e0
fix doc build
examples/plot_benktander.py
examples/plot_benktander.py
""" ==================================================================== Benktander: Relationship between Chainladder and BornhuetterFerguson ==================================================================== This example demonstrates the relationship between the Chainladder and BornhuetterFerguson methods by way fo...
Python
0
@@ -823,55 +823,8 @@ onal -%0Amedmal_prem.rename('development', %5B'premium'%5D) %0A%0A#
15307ebe2c19c1a3983b0894152ba81fdde34619
Add comment on dist of first function
exp/descriptivestats.py
exp/descriptivestats.py
import pandas import numpy import matplotlib.pyplot as plt def univariate_stats(): num_examples = 1000 z = pandas.Series(numpy.random.randn(num_examples)) # Minimum print(z.min()) # Maximum print(z.max()) # Mean print(z.mean()) # Median print(z.median()) # Variance pri...
Python
0
@@ -70,32 +70,94 @@ ariate_stats():%0A + # Generate 1000 random numbers from a normal distribution%0A num_examples
7ff6a0dc3a4f6f1ed47f999340f25fe3d5546bd4
fix command order in shell help test
tests/ps_schedstatistics/tests/01-run.py
tests/ps_schedstatistics/tests/01-run.py
#!/usr/bin/env python3 # Copyright (C) 2017 Inria # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import sys from testrunner import run PS_EXPECTED = ( (r'\tpid | name | state...
Python
0.000001
@@ -1850,71 +1850,8 @@ -')%0A - child.expect_exact('reboot Reboot the node')%0A @@ -1961,16 +1961,79 @@ eads.')%0A + child.expect_exact('reboot Reboot the node')%0A %0A%0Adef _c
323dbf3bfac8cbfefb90d0b94be0eef245d38f4b
make test short
malss/test.py
malss/test.py
# -*- coding: utf-8 -*- from sklearn.datasets.samples_generator import make_classification,\ make_regression from malss import MALSS import pandas as pd from nose.plugins.attrib import attr import numpy as np def test_classification_2classes_small(): X, y = make_classification(n_samples=1000, ...
Python
0.000443
@@ -2017,32 +2017,34 @@ ', n_jobs=3)%0A + # cls.execute()%0A @@ -2139,24 +2139,26 @@ ms) == 4%0A + # assert cls.
f2805104cd079a937c6efe03414fe9d0dc4ab3d1
Work around Galaxy inability to handle optional select parameter with dynamic option
__init__.py
__init__.py
#!/usr/bin/env python ### # Part of the Adaptive Divergence through Direction of Selection workflow. # Copyright (C) 2011 Tim te Beek <tim.te.beek@nbic.nl> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software...
Python
0
@@ -5498,16 +5498,50 @@ ainder:%0A + print '%5Cn'.join(args)%0A
9af7c8bfc22a250ce848d50ca26877e177f767c1
Fix execution on Monday
management.py
management.py
from logging import _nameToLevel as nameToLevel from argparse import ArgumentParser from Common.emailer import Emailer from DesksReminder.reminders import HelpDeskTechReminder, HelpDeskLabReminder, HelpDeskOtherReminder, \ UrgentDeskReminder, AccountsDeskReminder from HelpDesk.synchr...
Python
0.000047
@@ -1501,17 +1501,17 @@ oday == -2 +0 :%0A
ecd2821a99dee895f3ab7c5dbcc6d86983268560
Update src url for dev in views
__init__.py
__init__.py
from flask import Flask, request, redirect, url_for from twilio.rest import TwilioRestClient from PIL import Image, ImageDraw, ImageFont import time app = Flask(__name__, static_folder='static', static_url_path='') client = TwilioRestClient( account='ACb01b4d6edfb1b41a8b80f5fed2c19d1a', token='97e6b9c0074b27...
Python
0
@@ -1461,22 +1461,23 @@ p:// -12dcb913.ngrok +dev.thevariable .com
be0bb9e8dc4deeff2771a2583647cc4125ceb506
Fix incorrect merge.
__init__.py
__init__.py
# Copyright (C) 2005-2007 Jelmer Vernooij <jelmer@samba.org> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This pr...
Python
0.000001
@@ -3221,51 +3221,8 @@ %22)%0A%0A -check_bzrlib_version(required_bzr_version)%0A chec
49ba0e32d8d27b997f80d5420ff6b05ae1cc4461
move stuff around in init
__init__.py
__init__.py
# -*- coding: utf-8 -*- from flask import (Flask, request, render_template, redirect, url_for, jsonify) import json from ming import (create_datastore, Session, collection, Field, Document, schema) from bson.objectid import ObjectId app...
Python
0.000001
@@ -314,70 +314,8 @@ Id%0A%0A -app = Flask(__name__)%0Aapp.config%5B'STATIC_FOLDER'%5D = 'static'%0A%0A from @@ -859,16 +859,78 @@ icles)%0A%0A +app = Flask(__name__)%0Aapp.config%5B'STATIC_FOLDER'%5D = 'static'%0A%0A @app.rou @@ -1182,17 +1182,16 @@ s += -( b.bibtex @@ -1199,17 +1199,16 @@ + '%3Cbr%3E' -) ...
598bb39414825ff8ab561babb470b85f06c58020
Update __init__.py
__init__.py
__init__.py
from mlpack import linear_regression from mlpack import logistic_regression """ MlPack ====== Provides 1. A Variety of Machine learning packages 2. Good and Easy hand written programs with good documentation 3. Linear Regression, Logistic Regression Available subpackages --------------------- 1. Linear Regr...
Python
0
@@ -1,27 +1,45 @@ from mlpack +.linear_regression import linear_r @@ -59,16 +59,36 @@ m mlpack +.logistic_regression import
b8d0344f0ca5c906e43d4071bc27a8d2acf114d1
bump version
webmpris/__init__.py
webmpris/__init__.py
__version__ = '1.0' __description__ = 'REST API to control media players via MPRIS2 interfaces' requires = [ 'pympris' ] README = """webmpris is a REST API to control media players via MPRIS2 interfaces. Supported intefaces: org.mpris.MediaPlayer2 via /players/<id>/Root org.mpris.MediaPlayer2.Player ...
Python
0
@@ -14,9 +14,9 @@ '1. -0 +1 '%0A__
9acf7857167bb87438c7c0bebca1a7eda93ac23b
Make saml2idp compatible with Django 1.9
saml2idp/registry.py
saml2idp/registry.py
# -*- coding: utf-8 -*- from __future__ import absolute_import """ Registers and loads Processor classes from settings. """ # Python imports import logging # Django imports from django.utils.importlib import import_module from django.core.exceptions import ImproperlyConfigured # Local imports from . import exceptions f...
Python
0
@@ -121,75 +121,29 @@ %22%22%22%0A -# Python imports%0Aimport logging%0A# Django imports%0Afrom django.utils. +import logging%0A%0Afrom impo @@ -169,16 +169,17 @@ _module%0A +%0A from dja @@ -230,23 +230,8 @@ red%0A -# Local imports %0Afro @@ -289,23 +289,8 @@ ta%0A%0A -# Setup logging %0Alog @@ -324,16 +324,1...
4b335fbd082c34f631f903574bedb355f330fa63
Update gamess.py for python 2.6 format
src/parser/gamess_us.py
src/parser/gamess_us.py
# __ # /__ _. ._ _ _ _ _ _ # \_| (_| | | | (/_ _> _> |_| _> # from src.parser_handler import get_dict_ele import re def parse_basis_data_gamess_us(data, name, des, elts, debug=False): """Parse the basis data raw html of gamess-us to get a nice tuple Return (name, description, [[ele, data_e...
Python
0.000001
@@ -3294,16 +3294,17 @@ mon = %22%7B +0 :%3E3%7D%22.fo @@ -3346,16 +3346,17 @@ on += %22%7B +0 :%3E15.7f%7D @@ -3410,32 +3410,33 @@ _s = common + %22%7B +0 :%3E23.7f%7D%22.format @@ -3532,16 +3532,17 @@ mon + %22%7B +0 :%3E23.7f%7D
b8cd1b6869651cd0cbe2cbeebc59c641f13e0e5b
Add todo for scopes permissions
polyaxon/scopes/permissions/scopes.py
polyaxon/scopes/permissions/scopes.py
from scopes.authentication.ephemeral import is_ephemeral_user from scopes.authentication.internal import is_internal_user from scopes.permissions.base import PolyaxonPermission class ScopesPermission(PolyaxonPermission): """ Scopes based Permissions, depends on the authentication backend. """ ENTITY =...
Python
0
@@ -720,32 +720,155 @@ return True%0A%0A + # TODO Add internal/ephemeral here%0A # (if that type of auth is allowed, then we should not check he scope)%0A%0A if reque
ebacfc3ffe1cd1c9c58908c1f9dd78fe9eca9acd
fix for lambton not needed
ca_on_lambton/people.py
ca_on_lambton/people.py
from pupa.scrape import Scraper from utils import lxmlize, CanadianLegislator as Legislator import re COUNCIL_PAGE = 'http://www.lambtononline.ca/home/government/accessingcountycouncil/countycouncillors/Pages/default.aspx' SGC = { 'St. Clair' : '3538003', 'Dawn-Euphemia' : '3538007', 'Brooke-Alvinst...
Python
0
@@ -224,393 +224,8 @@ x'%0A%0A -SGC = %7B%0A 'St. Clair' : '3538003',%0A 'Dawn-Euphemia' : '3538007',%0A 'Brooke-Alvinston' : '3538015',%0A 'Enniskillen' : '3538016',%0A 'Oil Springs' : '3538018',%0A 'Petrolia' : '3538019',%0A 'Sarnia' : '3538030',%0A 'Point Edward' : ...
a8d701c75e4e0b880a7d3fedb6464aa875958f70
Version 0.99.3
__init__.py
__init__.py
# Copyright (c) 2003-2005 Jimmy Retzlaff, 2008 Konstantin Yegupov # # 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,...
Python
0
@@ -1641,17 +1641,17 @@ = '0.99. -2 +3 '%0D%0A%0D%0Atry
c202a3a945453a4955f0acbf369227f8c9cee148
Rename link in init
__init__.py
__init__.py
import os from .dataset import * __path__ = [os.path.join(os.path.dirname(__file__), 'dataset')]
Python
0
@@ -10,23 +10,25 @@ %0A%0Afrom . -dataset +batchflow import @@ -86,15 +86,17 @@ ), ' -dataset +batchflow ')%5D%0A
4a4731eda22170a77bb24dd3c7fc8ff4cafecf9d
bump version to 2.7b1
__init__.py
__init__.py
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ __revision__ = "$Id$" # Distutils version # # Updated automatically by the Python release process. # #--start constants-- __version__ = "2.7a4" #-...
Python
0
@@ -311,10 +311,10 @@ %222.7 -a4 +b1 %22%0A#-
1ae0b75fb909b3fa1bd42702d4ab2a943a8f7155
Version bump for 3.5.0b1.
__init__.py
__init__.py
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ # Distutils version # # Updated automatically by the Python release process. # #--start constants-- __version__ = "3.5.0a4" #--end constants--
Python
0
@@ -290,10 +290,10 @@ .5.0 -a4 +b1 %22%0A#-
bc43827ee733af9c37ca3b97b471ec1d2cde294b
Add unsubcribed handler to server.
echidna/server.py
echidna/server.py
import json from cyclone.web import Application, RequestHandler, HTTPError from cyclone.websocket import WebSocketHandler from echidna.cards.memory_store import InMemoryCardStore class EchidnaServer(Application): def __init__(self, root, **settings): self.store = InMemoryCardStore() handlers = [...
Python
0
@@ -2971,24 +2971,255 @@ e, cards))%0A%0A + def handle_unsubscribed(self, msg):%0A channel_name = msg.get(%22channel%22)%0A if not isinstance(channel_name, unicode):%0A return%0A d = self.store.unsubscribe(channel_name, self.client)%0A return d%0A%0A def hand
9940212f5d0cf4860d0dc092dc55031218de490b
Fix test return type
gym/monitoring/tests/test_monitor.py
gym/monitoring/tests/test_monitor.py
import glob import os import gym from gym import error, spaces from gym import monitoring from gym.monitoring import monitor from gym.monitoring.tests import helpers class FakeEnv(gym.Env): def _render(self, close=True): raise RuntimeError('Raising') def test_monitor_filename(): with helpers.tempdir(...
Python
0.000032
@@ -3233,20 +3233,17 @@ return -None +0 %0A%0A de @@ -3280,20 +3280,17 @@ return -None +0 , 0, Fal
9d1317231a1c5d62fddf130c78e3942a08651d42
Fix for numpy linspace but where count must be an integer
geophys_utils/_transect_utils.py
geophys_utils/_transect_utils.py
#!/usr/bin/env python #=============================================================================== # Copyright 2017 Geoscience Australia # # 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...
Python
0.000019
@@ -4739,16 +4739,20 @@ count = +int( (utm_lin @@ -4780,32 +4780,33 @@ // sample_metres +) %0A # print
86eb16da4a6c3579eb514fa5ca73def7be8afd84
Add noqa codestyle
geotrek/api/v2/views/__init__.py
geotrek/api/v2/views/__init__.py
from rest_framework import response, permissions from rest_framework.views import APIView from django.conf import settings from django.contrib.gis.geos import Polygon from .authent import StructureViewSet # noqa from .common import TargetPortalViewSet, ThemeViewSet, SourceViewSet, ReservationSystemViewSet, LabelViewS...
Python
0
@@ -768,32 +768,40 @@ t, RouteViewSet, + # noqa %0A @@ -855,32 +855,40 @@ PracticeViewSet, + # noqa %0A @@ -1699,16 +1699,24 @@ ViewSet, + # noqa %0A
ad73ef8e4433645cd72bc92439c4d07c5d1f6455
Add test for radian ticks
astropy/visualization/tests/test_units.py
astropy/visualization/tests/test_units.py
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import io import pytest from astropy.utils.compat.optional_deps import HAS_PLT if HAS_PLT: import matplotlib.pyplot as plt from astropy import units as u from astropy.coordinates import Angle from astropy.visualization.units...
Python
0
@@ -210,16 +210,35 @@ t as plt +%0Aimport numpy as np %0A%0Afrom a @@ -3521,28 +3521,379 @@ hist(%5B%5D * u.mmag, bins=100)%0A +%0A%0A@pytest.mark.skipif('not HAS_PLT')%0Adef test_radian_formatter():%0A with quantity_support():%0A fig, ax = plt.subplots()%0A ax.plot(%5B1, 2, 3%5D, %5B1, 2, 3%5D * u....
30baad1c058a3e929c88b7e10799031e0a0b4bf6
Fix a typo in rebaseeditor comment
git_upstream/lib/rebaseeditor.py
git_upstream/lib/rebaseeditor.py
# # Copyright (c) 2012, 2013, 2014 Hewlett-Packard Development Company, L.P. # # 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 requi...
Python
0.008335
@@ -790,17 +790,17 @@ tor%22%0A%0A# -i +e nsure na
dded8beb4a075dfc44938d5355727cc4058ba80b
Fix typo
athenet/data_loader/data_loader_buffer.py
athenet/data_loader/data_loader_buffer.py
"""Buffer for storing large network data.""" import numpy as np import theano class Buffer(object): """Buffer storing data from contiguous subsequence of minibatches. Content of a buffer is a 4-dimensional floating-point tensor. """ def __init__(self, data_loader=None): """Create data Buffe...
Python
0.999999
@@ -1355,17 +1355,17 @@ o be use -s +d in data
edc8761296ad65330e51e98a6cc602dc2e9033b6
def __unicode__ for Document
deputies/models.py
deputies/models.py
# lachambre.be to json sausage machine # Copyright (C) 2011 Laurent Peuch <cortex@worlddomination.be> # # 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 # Li...
Python
0.999998
@@ -3732,24 +3732,112 @@ ique=True)%0A%0A + def __unicode__(self):%0A return %22%25s - %25s%22 %25 (self.lachambre_id, self.title)%0A%0A%0A class Writte
e94e7ae0f52ca0f566127ac824a7471751f16924
version 0.5.3.1
api/info.py
api/info.py
from collections import OrderedDict from rest_framework import viewsets, mixins, response, reverse NAME = 'vsemionov.notes.api' VERSION = '0.5.3' class InfoViewSet(mixins.ListModelMixin, viewsets.GenericViewSet): view_name = 'Info' @staticmethod def _get_user_url(request): ret...
Python
0.000003
@@ -139,16 +139,18 @@ = '0.5.3 +.1 '%0A%0A%0Aclas
d6d70ed4e27b0e43536ea0e55321189a19bd146f
add graphene debug middleware
web/settings.py
web/settings.py
""" Django settings for doublefault project. Generated by 'django-admin startproject' using Django 1.11.3. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ impor...
Python
0.000002
@@ -1193,16 +1193,98 @@ .schema' +,%0A 'MIDDLEWARE': %5B%0A 'graphene_django.debug.DjangoDebugMiddleware',%0A %5D %0A%7D%0A%0AMIDD
76f59a0be5fd8321d71fe5a7deb223daac2a5181
version 0.5.17
api/info.py
api/info.py
from collections import OrderedDict from rest_framework import viewsets, mixins, response, reverse NAME = 'vsemionov.boomerang.api' VERSION = '0.5.16' class ApiInfoViewSet(mixins.ListModelMixin, viewsets.GenericViewSet): view_name = 'Api Info' @staticmethod def _get_user_url(request):...
Python
0.000001
@@ -147,9 +147,9 @@ .5.1 -6 +7 '%0A%0A%0A
a962f1e0aced277e673eddc6b70e316bba482f24
fix typo
api/mail.py
api/mail.py
from flask import Flask, render_template from api import app from api.models import User, Invites, Reset from flask_mail import Mail from flask_mail import Message app.config.update( MAIL_SERVER = 'smtp.yandex.com', MAIL_PORT = 465, MAIL_USE_SSL = True , MAIL_USERNAME = 'cross-apps@yandex.com', ...
Python
0.998939
@@ -1414,14 +1414,8 @@ ail_ -reset_ temp
f9a1da6e60bfbd9c9e5be769f1223d628cec6481
set the module version
base_external_referentials/__openerp__.py
base_external_referentials/__openerp__.py
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009 Akretion (<http://www.akretion.com>). All Rights Reserved # authors: Raphaël Valyi, Sharoon Thomas # # This program is free software: you...
Python
0
@@ -1081,16 +1081,18 @@ sion': ' +6. 1.0',%0A
6eeb2b4f79c2f735552cf7c061b48425d3299e51
Use argparse.
validate_equajson.py
validate_equajson.py
#! /usr/bin/env python3 import json import jsonschema import sys import os def main(equajson_path, schema_path): global filepath filepath = equajson_path with open(schema_path) as schema_file: try: equajson_schema = json.load(schema_file) except: s...
Python
0.000001
@@ -67,16 +67,32 @@ mport os +%0Aimport argparse %0A%0Adef ma @@ -1103,199 +1103,365 @@ -num_args = len(sys.argv) - 1%0A if num_args != 2:%0A sys.stderr.write(%22Usage: python %22+sys.argv%5B0%5D+%22 equajson.json schema.json%22+'%5Cn') +parser = argparse.ArgumentParser(description='validate equajson ...
72fd62dca8e87e67833698dd7e38b879c54d6e27
use env. variable for sender
api/mail.py
api/mail.py
from flask import Flask, render_template from api import app from api.models import User, Invite, Reset, ComponentUser from flask_mail import Mail from flask_mail import Message import os app.config.update( MAIL_SERVER = str(os.environ['MAIL_SERVER']), MAIL_PORT = str(os.environ['MAIL_PORT']), MAIL_USE_SS...
Python
0.999982
@@ -1476,39 +1476,48 @@ -'cross-apps@yandex.com' +str(os.environ%5B'MAIL_USERNAME'%5D) ,%0A @@ -2851,39 +2851,48 @@ -'cross-apps@yandex.com' +str(os.environ%5B'MAIL_USERNAME'%5D) ,%0A @@ -3788,31 +3788,40 @@ -'cross-apps@yandex.com' +str(os.environ%5B'MAIL_USERNAME'%5D) ,%0A
3de4e87af5502feb1186cb1a11b56df018ae6e19
Fix comment typo
bears/python/requirements/PySafetyBear.py
bears/python/requirements/PySafetyBear.py
import os from collections import namedtuple import pkg_resources import re from safety import safety from coalib.bears.LocalBear import LocalBear from dependency_management.requirements.PipRequirement import PipRequirement from coalib.results.Result import Result from coalib.settings.Setting import path from coalib....
Python
0
@@ -4684,17 +4684,16 @@ nts pars -e able fro
5ecd20d86a0fe2586cbac4daadd34bb13443f94d
set central prototype executable
central/CentralProto.py
central/CentralProto.py
#!/usr/bin/python # -*- coding: utf-8 -*- import time from app.nrf24 import NRF24 from app.cipher import XTEA from app.message import MessageType # RF Communication constants NETWORK = 0xC05A SERVER_ID = 0x01 # Hardware constants CE_PIN = 25 # Timing constants PERIOD_REFRESH_KEY_SECS = 120.0 CODE = '123456' #TODO...
Python
0.000001
e6cb1617e588d6b276fe01c401f2c1b34cf88d5f
fix stuff
api/read.py
api/read.py
import datetime from django.http import JsonResponse from dateutil.parser import parse from django.contrib.auth.decorators import login_required from api.models import ( Applicant, Client, Disabilities, EmploymentEducation, Enrollment, HealthAndDV, IncomeBenefits, Services ) def get_applicants(request): appli...
Python
0.000002
@@ -1181,33 +1181,8 @@ lse) -%0A%3C%3C%3C%3C%3C%3C%3C Updated upstream %0A%0Ade
ae7b583cab8d38b04ce57571f50221b4a2e429f6
Update base.py
webhook/base.py
webhook/base.py
""" Base webhook implementation """ import json from django.http import HttpResponse from django.views.generic import View from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt class WebhookBase(View): """ Simple Webhook base class to handle the most stand...
Python
0.000001
@@ -705,16 +705,21 @@ lf, data +=None ):%0A
46b860e93d8a9e8dda3499b7306e30ebcd0e0174
handle session stopped
webnotes/app.py
webnotes/app.py
import sys, os import json sys.path.insert(0, '.') sys.path.insert(0, 'app') sys.path.insert(0, 'lib') from werkzeug.wrappers import Request, Response from werkzeug.local import LocalManager from webnotes.middlewares import StaticDataMiddleware from werkzeug.exceptions import HTTPException from werkzeug.contrib.profi...
Python
0
@@ -528,16 +528,438 @@ ocal%5D)%0A%0A +def handle_session_stopped():%0A%09res = Response(%22%22%22%3Chtml%3E%0A%09%09%09%09%09%09%09%3Cbody style=%22background-color: #EEE;%22%3E%0A%09%09%09%09%09%09%09%09%09%3Ch3 style=%22width: 900px; background-color: #FFF; border: 2px solid #AAA; padding: 20px; font-family: Arial;...
5344220edcf1f22391a3ba0452e92d79f55a85a7
add method wait() to block until every backends answered
weboob/bcall.py
weboob/bcall.py
# -*- coding: utf-8 -*- # Copyright(C) 2010 Romain Bignon, Christophe Benz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the ho...
Python
0
@@ -5959,16 +5959,170 @@ thread%0A%0A + def wait(self):%0A self.finish_event.wait()%0A%0A with self.mutex:%0A if self.errors:%0A raise CallErrors(self.errors)%0A%0A def
e38fa3f55b0e60a1d6c7fa0cf194e6f3bd4b899d
add histogram util
corehq/util/datadog/gauges.py
corehq/util/datadog/gauges.py
from functools import wraps from celery.task import periodic_task from corehq.util.datadog import statsd, datadog_logger from corehq.util.soft_assert import soft_assert def datadog_gauge_task(name, fn, run_every, enforce_prefix='commcare'): """ helper for easily registering datadog gauges to run periodically ...
Python
0.000786
@@ -739,24 +739,332 @@ ic_task()%0A%0A%0A +def datadog_histogram(name, value, enforce_prefix='commcare', tags=None):%0A %22%22%22%0A Usage: Used to track the statistical distribution of a set of values over a statsd flush period.%0A Actually submits as multiple metrics:%0A %22%22%22%0A _datadog_record(s...
3643f0ce1b7ea7982e8081ae29e726c73471cc4b
update description
vcspull/__about__.py
vcspull/__about__.py
__title__ = 'vcspull' __package_name__ = 'vcspull' __description__ = 'vcs project manager' __version__ = '1.0.0' __author__ = 'Tony Narlock' __email__ = 'tony@git-pull.com' __license__ = 'BSD' __copyright__ = 'Copyright 2013-2016 Tony Narlock'
Python
0.000001
@@ -67,27 +67,30 @@ = ' -vcs project manager +synchronize your repos '%0A__
42561d709a2ecfee71103dfbb55116cec1128b71
fix redirect after upload
website/apps/home/views/UploadView.py
website/apps/home/views/UploadView.py
#!/bin/env python2 # -*- coding: utf-8 -*- # # This file is part of the VecNet Zika modeling interface. # For copyright and licensing information about this package, see the # NOTICE.txt and LICENSE.txt files in its top-level directory; they are # available at https://github.com/vecnet/zika # # This Source Code Form is...
Python
0
@@ -1439,69 +1439,309 @@ -return HttpResponseRedirect(reverse('home.display_simulations +# Redirect to appropriate page whether uploading simulation or historical%0A if is_historical!='on':%0A return HttpResponseRedirect(reverse('home.display_simulations'))%0A else...
c9a915692b30458717ead2f83fce77ce295e5ed9
add recipe_folder member (#10527)
conans/pylint_plugin.py
conans/pylint_plugin.py
"""Pylint plugin for ConanFile""" import astroid from astroid import MANAGER def register(linter): """Declare package as plugin This function needs to be declared so astroid treats current file as a plugin. """ pass def transform_conanfile(node): """Transform definition of ConanFile class s...
Python
0
@@ -1290,16 +1290,52 @@ class%5D,%0A + %22recipe_folder%22: str_class,%0A %7D%0A%0A
4b5ae262bab0bc0c83555d39400049f20aaca9cd
Add CONVERSATION_LABEL_MAX_LENGTH constant
chatterbot/constants.py
chatterbot/constants.py
""" ChatterBot constants """ ''' The maximum length of characters that the text of a statement can contain. This should be enforced on a per-model basis by the data model for each storage adapter. ''' STATEMENT_TEXT_MAX_LENGTH = 400 # The maximum length of characters that the name of a tag can contain TAG_NAME_MAX_LE...
Python
0.999974
@@ -228,16 +228,253 @@ = 400%0A%0A +'''%0AThe maximum length of characters that the text label of a conversation can contain.%0AThe number 32 was chosen because that is the length of the string representation%0Aof a UUID4 with no hyphens.%0A'''%0ACONVERSATION_LABEL_MAX_LENGTH = 32%0A%0A # The ma
7a1e57fa5c6d2c6330a73e8fab95c5ef6fa0ea35
Fix indentation
tomviz/python/SetNegativeVoxelsToZero.py
tomviz/python/SetNegativeVoxelsToZero.py
def transform_scalars(dataset): """Set negative voxels to zero""" from tomviz import utils import numpy as np data = utils.get_array(dataset) data[data<0] = 0 #set negative voxels to zero # set the result as the new scalars. utils.set_array(dataset, data)
Python
0.017244
@@ -63,20 +63,16 @@ zero%22%22%22%0A - %0A fro @@ -204,18 +204,16 @@ to zero%0A - %0A # s @@ -280,13 +280,8 @@ t, data) -%0A
3d285c492aa267d2c27fad32a25546fc3db0c04d
Update protocol.py
gu/protocol.py
gu/protocol.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ description 参照 twisted/asyncio重新设计下api """ __author__ = 'wangfei' __date__ = '2015/03/06' import gevent.monkey gevent.monkey.patch_socket() import logging import gevent import gevent.queue import gevent.pywsgi import geventwebsocket.handler from .util import sho...
Python
0.000001
@@ -1,26 +1,4 @@ -#!/usr/bin/env python%0A # -*
e504ef393f9f11d243fed88b2e4acc1566ea912c
Delete unread messages
scripts/read.py
scripts/read.py
import time import cache import vkapi from log import datetime_format def main(a, args): dialogs = a.messages.getDialogs(unread=1)['items'] messages = {} users = [] chats = [] for msg in dialogs: def cb(req, resp): messages[req['peer_id']] = resp['items'][::-1] a.messa...
Python
0.000015
@@ -701,16 +701,30 @@ .sync()%0A + mids = %5B%5D%0A if d @@ -723,32 +723,32 @@ if dialogs:%0A - print('- @@ -1416,32 +1416,104 @@ print()%0A + if 'chat_id' not in m:%0A mids.append(i%5B'id'%5D)%0A print('- @@ -1549,16 +1549,23 @@ %0A if +'t' in a...
46e2997cb51e45dc58f5a97cea6642ba64d03188
Fix 9.0 version
purchase_all_shipments/__openerp__.py
purchase_all_shipments/__openerp__.py
# Author: Leonardo Pistone # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any la...
Python
0
@@ -796,9 +796,9 @@ ': ' -8 +9 .0.1
05bfbd0dbe50866a2c26a4018d4a2786af9b06fe
Fix decoding when the object is a bytestring.
template_help/templatetags/template_help.py
template_help/templatetags/template_help.py
import datetime from decimal import Decimal from django.http import HttpRequest from django import template from django.template.defaultfilters import mark_safe, force_escape, pluralize from django.db.models.query import QuerySet from django.forms import BaseForm, Field from django.db.models import Model from django.co...
Python
0.000304
@@ -2835,19 +2835,102 @@ (o, -(basestring +str):%0A return force_escape(unicode(o, 'utf-8'))%0A elif isinstance(o, (unicode , in
35ed2dae541e7a0f3624c063f738f1617f502af0
Correct service usage in IE Binding. Fixes #7749
py/selenium/webdriver/ie/webdriver.py
py/selenium/webdriver/ie/webdriver.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
@@ -4639,24 +4639,28 @@ service is +not None:%0A @@ -4671,26 +4671,48 @@ se -rvice = S +lf.iedriver = s ervice -() %0A + else:%0A @@ -4752,16 +4752,20 @@ + executab @@ -4781,24 +4781,28 @@ + port=self.po @@ -4797,32 +4797,36 @@ port=self.port,%0A + ...
5aca45a68a229f43a25dd97d2c680716c9baabf5
add travis env to sgen
scripts/sgen.py
scripts/sgen.py
#!/usr/bin/python # Generate original static file to another with new prefix # ./sgen index.html old_prefix static_index.html new_prefix import sys from os import walk, path # File lists # The two file lists should be aligned. files = [] for (dirpath, dirname, filenames) in walk("../static"): for f in filename...
Python
0
@@ -169,16 +169,25 @@ lk, path +, environ %0A%0A# File @@ -234,16 +234,51 @@ igned.%0A%0A +root = environ%5B'TRAVIS_BUILD_DIR'%5D%0A files = @@ -322,19 +322,25 @@ in walk( -%22.. + root + %22 /static%22 @@ -477,19 +477,24 @@ refix = -%22.. +root + %22 /docs%22%0At @@ -564,11 +564,17 @@ ace( -%22.. + root + %...
62184bf35db9fe4bf397211d46f1dee43096f9fb
Clarify method with a docstring
guild/plugins/tensorflow_util.py
guild/plugins/tensorflow_util.py
# Copyright 2017-2019 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
0.000066
@@ -4334,32 +4334,72 @@ (_global_step):%0A + %22%22%22Overridden by subclasses.%22%22%22%0A return %7B
24cebbd351875103067162733cf682320df29cf6
Update VMfileconvert_V2.py
pyecog/light_code/VMfileconvert_V2.py
pyecog/light_code/VMfileconvert_V2.py
import glob, os, numpy import stfio def main(): searchpath = os.getcwd() exportdirectory = searchpath+'/ConvertedFiles/' # Make export directory if not os.path.exists(exportdirectory): os.makedirs(exportdirectory) # Walk through and find abf files pattern = '*.a...
Python
0
@@ -15,17 +15,109 @@ s, numpy -%0A +, sys%0Atry:%0A import stfio%0Aexcept:%0A sys.path.append('C:%5CPython27%5CLib%5Csite-packages')%0A import s
52cbd272ec08a382b4f16dca1579a3ef72365069
use numpy mean
examples/train_multi_gpu.py
examples/train_multi_gpu.py
''' Created on Feb 6, 2017 @author: julien ''' import numpy from os.path import join import tempfile from keras.metrics import categorical_accuracy from examples.ga.dataset import get_reuters_dataset from minos.experiment.experiment import Experiment, ExperimentParameters from minos.experiment.training import Traini...
Python
0.000225
@@ -2362,16 +2362,29 @@ _true = +numpy.argmax( test_bat @@ -2411,16 +2411,17 @@ st_size%5D +) %0A @@ -2430,16 +2430,29 @@ _pred = +numpy.argmax( model.pr @@ -2498,98 +2498,8 @@ ze%5D) -%0A print('Predictions (true, pred) %25r' %25 list(zip(y_true.tolist(), y_pred.tolist())) )%0A @@ -2532,51 +2...
a49ddd64758b23565870439bda36fafd5e1dac39
Put survey back otherwise
gwells/urls.py
gwells/urls.py
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distri...
Python
0
@@ -2745,24 +2745,112 @@ te_admin'),%0A + url(r'%5E'+ app_root_slash +'admin/survey', SurveyView.as_view(), name='survey'),%0A url(
393bde7e7f3902f734e8c01f265b216f2d3eef26
remove leftover
models/dulsine_commons.py
models/dulsine_commons.py
# -*- coding: utf-8 -*- # vim: set ts=4 # Common enumerations used in some places CIVILITES = ( ('M.', 'Monsieur'), ('Mme', 'Madame'), ('Mlle', 'Mademoiselle') ) CIRCUITS = ( ('O', 'ouvert'), ('F', 'ferme'), ('N', 'pas de circuit') ) TYPES_ACTEURS = ( ('P', 'Professionn...
Python
0.000017
@@ -492,44 +492,105 @@ OME_ -SECOURS = (%0A (0, 'N.D.'),%0A (1, +CI = 0%0ADIPLOME_PSE2 = 1%0ADIPLOME_PSE1 = 2%0ADIPLOME_PSC1 = 3%0A%0ADIPLOME_SECOURS = (%0A (DIPLOME_CI, 'CI @@ -594,24 +594,35 @@ 'CI'),%0A ( +DIPLOME_PSE 2, 'PSE2'),%0A @@ -626,17 +626,28 @@ ),%0A ( -3 +DIPLOME_PSE1 , 'PSE1' @@ -...
f9a99102a7053e444021926d08750f04a662fd9f
remove unnecessary print statements
pyspecdata/load_files/open_subpath.py
pyspecdata/load_files/open_subpath.py
from ..core import * from ..datadir import dirformat import os.path from zipfile import ZipFile def open_subpath(file_reference,*subpath,**kwargs): """ Parameters ---------- file_reference: str or tuple If a string, then it's the name of a directory. If it's a tuple, then, it has three ...
Python
0.999982
@@ -696,64 +696,8 @@ ly:%0A - print %22testing%22,(file_reference,) + subpath%0A
ba370231fe80280dec806c7c2515061e8607b360
Add SCA into mbio
Correlation/__init__.py
Correlation/__init__.py
__author__ = 'Wenzhi Mao' __all__ = [] def _Startup(): from mbio import _ABSpath global _path__ _path__ = _ABSpath() from os import path Clist = ['mi.c', 'omes.c'] for c in Clist: if not path.exists(_path__+'/'+c.replace('.c', '_c.so')): from mbio import _make ...
Python
0.99929
@@ -470,16 +470,81 @@ d(OMES.__all__)%0A +%0Afrom . import SCA%0Afrom .SCA import *%0A__all__.extend(SCA.__all__)
2277c82efdc456e5873987eabac88810b2cece5b
Fix pep8 whitespace violation.
lms/djangoapps/courseware/features/video.py
lms/djangoapps/courseware/features/video.py
#pylint: disable=C0111 from lettuce import world, step from common import * ############### ACTIONS #################### @step('when I view it it does autoplay') def does_autoplay(step): assert(world.css_find('.video')[0]['data-autoplay'] == 'True') @step('the course has a Video component') def view_video(ste...
Python
0.000003
@@ -422,20 +422,16 @@ sename)%0A - %0A # M @@ -716,20 +716,16 @@ _name))%0A - %0A wor
54b0feebb18816a936f4a7f323a77808f9973eb2
Update testes.py
Src/testes.py
Src/testes.py
import jogovelha import sys erroInicializar = False jogo = jogovelha.inicializar() if len(jogo) != 3: erroInicializar = True else: for linha in jogo: if len(linha) != 3: erroInicializar = True else: for elemento in linha: if elemento != ".": ...
Python
0
@@ -297,17 +297,17 @@ nto != %22 -. +X %22:%0A @@ -401,8 +401,9 @@ .exit(0) +%0A
582cc4ebe6f8177c407ce0ef1f5b9e1b23226b80
Version 0.2: support for python3
vlogging/__init__.py
vlogging/__init__.py
# -*- coding: utf-8 -*- from io import BytesIO as StringIO from string import Template import base64 __version__ = "0.1" renderers = [] try: import cv2 import numpy def render_opencv(img, fmt="png"): if not isinstance(img, numpy.ndarray): return None retval, buf = cv2.imenco...
Python
0.000003
@@ -117,9 +117,9 @@ %220. -1 +2 %22%0Are
73ceff96b2f065517a7d67cb0b25361f5bd61388
Delete fixture after running tests
src/gramcore/filters/tests/test_edges.py
src/gramcore/filters/tests/test_edges.py
"""Tests for module gramcore.filters.edges""" import os import numpy from PIL import Image, ImageDraw from nose.tools import assert_equal from skimage import io from gramcore.filters import edges def setup(): """Create image fixture The background color is set by default to black (value == 0). .. not...
Python
0
@@ -752,17 +752,16 @@ %22%22%22%0A -# os.remov @@ -1442,17 +1442,16 @@ , 50)%0A%0A%0A -%0A def test
f949f2fe0e0c66b850700ae56925598ced8fc260
Disable Sentry logging
app/main.py
app/main.py
import newrelic.agent newrelic.agent.initialize() from os import path from raven.contrib.tornado import AsyncSentryClient import tornado.ioloop import tornado.locale import tornado.web import tornado.httpserver import tornado.options import os import yaml import logging import string import datetime, time from ma...
Python
0
@@ -1096,18 +1096,16 @@ GROUP')%0A -# APP_SENT @@ -1108,32 +1108,39 @@ SENTRY = + None # os.getenv('SENT
bd8caf6ab48bb1fbefdced7f33edabbdf017894a
Change of names
Demo/sockets/echosvr.py
Demo/sockets/echosvr.py
#! /usr/local/python # Python implementation of an 'echo' tcp server: echo all data it receives. # # This is the simplest possible server, sevicing a single request only. import sys from socket import * # The standard echo port isn't very useful, it requires root permissions! # ECHO_PORT = 7 ECHO_PORT = 50000 + 7 BU...
Python
0.001373
@@ -493,16 +493,22 @@ %09conn, ( +remote host, re @@ -553,16 +553,22 @@ ed by', +remote host, re
ef08f120adce7a130756d3c0505125d3acf9b8ad
Test pulse clipping fix Osx #1. (#3144)
qiskit/pulse/commands/sample_pulse.py
qiskit/pulse/commands/sample_pulse.py
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
Python
0
@@ -1810,33 +1810,33 @@ lon: float = 1e- -6 +5 ):%0A %22%22%22If @@ -3090,16 +3090,29 @@ oat = 1, +%0A style: @@ -3186,16 +3186,29 @@ = None, +%0A interp_
89502d8b8b5e81ba57a16d71c895e0192eae6182
Update for pandas 17
hetio/stats.py
hetio/stats.py
import pandas import matplotlib import matplotlib.backends.backend_pdf import seaborn def get_degrees_for_metanode(graph, metanode): """ Return a dataframe that reports the degree of each metaedge for each node of kind metanode. """ metanode_to_nodes = graph.get_metanode_to_nodes() nodes = meta...
Python
0
@@ -618,16 +618,23 @@ df.sort +_values (%5B'node_ @@ -2418,24 +2418,31 @@ e(rows).sort +_values ('metanode') @@ -2987,16 +2987,23 @@ ws).sort +_values ('metaed
4ffc6c6d361f16feed9673373bd768323dc888bf
Add gpu_snapshot object
hoomd/state.py
hoomd/state.py
from collections import defaultdict from . import _hoomd from .data import boxdim from hoomd.snapshot import Snapshot from hoomd.local_access import LocalSnapshot def _create_domain_decomposition(device, box): """ Create a default domain decomposition. This method is a quick hack to get basic MPI simulation...
Python
0.000002
@@ -6846,8 +6846,258 @@ t(self)%0A +%0A @property%0A def gpu_snapshot(self):%0A if self._simulation.device.mode != 'gpu':%0A raise RuntimeError(%0A %22Cannot access gpu_snapshot with a non GPU device.%22)%0A else:%0A return LocalSnapshotGPU(self)%0A
49839733a7f26070e8d666d91fae177711154e1d
Change histogram_proto to use a custom logger.
tracing/tracing/proto/histogram_proto.py
tracing/tracing/proto/histogram_proto.py
# Copyright 2020 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 __future__ import absolute_import import logging try: # Note: from tracing.proto import histogram_pb2 would make more sense here, # but unfortunatel...
Python
0.000001
@@ -199,23 +199,8 @@ ort%0A -import logging%0A try: @@ -810,243 +810,137 @@ -logging.warning(%0A 'Failed to import histogram_pb2: %25s', repr(e))%0A from . import histogram_pb2 # pylint:disable=relative-import%0A logging.warning(%0A 'Retried and successfully imported histogram_pb2: %25s', hi...
2b5baf83b52a32c2424d043f987c0ad70bc564d1
add a log
vmthunder/compute.py
vmthunder/compute.py
#!/usr/bin/env python import time import threading from vmthunder.drivers import fcg from vmthunder.session import Session from vmthunder.instance import Instance from vmthunder.singleton import singleton from vmthunder.openstack.common import log as logging from vmthunder.drivers import volt LOG = loggi...
Python
0.000002
@@ -3431,32 +3431,91 @@ finally:%0D%0A + print %22--------release lock-----------------%22%0D%0A self
ed45058149d919d059ff4080a83f613f18269935
Disable sqlite loader if sqlite3 isn't available for some reason.
trigger/netdevices/loaders/filesystem.py
trigger/netdevices/loaders/filesystem.py
""" Built-in Loader objects for loading `~trigger.netdevices.NetDevice` metadata from the filesystem. """ __author__ = 'Jathan McCollum' __maintainer__ = 'Jathan McCollum' __email__ = 'jathan.mccollum@teamaol.com' __copyright__ = 'Copyright 2013, AOL Inc.' __version__ = '1.0' import itertools import os from trigger.c...
Python
0
@@ -578,23 +578,8 @@ son%0A -import sqlite3%0A impo @@ -611,16 +611,117 @@ as ET%0A%0A +try:%0A import sqlite3%0A SQLITE_AVAILABLE = True%0Aexcept ImportError:%0A SQLITE_AVAILABLE = False%0A %0Aclass J @@ -3369,36 +3369,48 @@ is_usable = -True +SQLITE_AVAILABLE %0A%0A def get_da
527ceabcdbded592c02ee2dce18a19ffce0248c2
Remove unnecesary comment
trunk/bdp_fe/src/bdp_fe/jobconf/views.py
trunk/bdp_fe/src/bdp_fe/jobconf/views.py
""" Module bdp_fe.jobconf.views """ import logging from django import forms from django.contrib import auth, messages from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.http import HttpResponseNotFound from django.shortcuts import get_object_or_404, red...
Python
0
@@ -1234,43 +1234,8 @@ _id) - ## Django URL regexp enforces this %0A
9371b1484e7843e479c5c54997d339d46cf4aedd
add logging
fastapp/plugins/__init__.py
fastapp/plugins/__init__.py
import os import logging logger = logging.getLogger(__name__) class Singleton(type): def __init__(cls, name, bases, dict): super(Singleton, cls).__init__(name, bases, dict) cls.instance = None def __call__(cls,*args,**kw): if cls.instance is None: logger.info("Create singleton instance for %s" % cls) c...
Python
0.000001
@@ -1124,24 +1124,33 @@ in %25s for %25s + starting %22 %25 (plugin, @@ -1332,16 +1332,171 @@ me%5D = e%0A +%09%09logger.info(%22Handling plugin %25s for %25s ended%22 %25 (plugin, func))%0A%09logger.info(%22Loaded %25s with success, %25s with errors%22 %25 (len(r_success), len(r_failed)))%0A %09return
279bebc53c2f589db943c91f31240a38ad059d72
optimize username loginfield for mobile devices
features/gestalten/forms.py
features/gestalten/forms.py
import allauth from crispy_forms import bootstrap, layout import django from django import forms from django.contrib.auth import models as auth_models from django.contrib.sites import models as sites_models from features.groups import models as groups from utils import forms as utils_forms from features.gestalten impo...
Python
0
@@ -2311,16 +2311,37 @@ (attrs=%7B +%0A 'autofoc @@ -2356,12 +2356,208 @@ tofocus' +,%0A 'autocomplete': 'username',%0A 'autocorrect': 'off',%0A 'autocapitalize': 'none',%0A 'spellcheck': 'false'%0A %7D))...
64804965e031f365937ef8fe70dc749c4532053d
fix abstract scraper, can't use lxml's url parsing because we need a custom user agent
tx_highered/scripts/initial_wikipedia.py
tx_highered/scripts/initial_wikipedia.py
#! /usr/bin/env python import datetime import requests from lxml.html import parse, tostring from tx_highered.models import Institution def get_wiki_title(name): endpoint = "http://en.wikipedia.org/w/api.php" params = dict(action="opensearch", search=name, limit=1, namespace=0, ...
Python
0.000001
@@ -20,23 +20,112 @@ hon%0A -import datetime +try:%0A from django.utils.timezone import now%0Aexcept ImportError:%0A from datetime.datetime import now %0A%0Aim @@ -160,21 +160,35 @@ import -parse +document_fromstring , tostri @@ -643,111 +643,226 @@ -doc = parse(url) # won't handle https +r = request...
624577c1a783ce7f06019ec6d96774f5c1b76432
fix anonymous bug
wechat-forwarding.py
wechat-forwarding.py
#!/usr/bin/env python3 # -*-encoding:utf-8-*- import os, json, requests, html from xml.etree import ElementTree as ETree import itchat from itchat.content import * sending_type = {'Picture': 'img', 'Video': 'vid'} data_path = 'data' nickname = '' as_chat_bot = True bot = None config = {} if __name__ == '__main__': ...
Python
0.000002
@@ -3569,16 +3569,14 @@ with - == +( '//' +) :%0A
e8fb8c1d7dda19c82f45d6b8c3883d5d4314a5ad
Fix encoding issue with Office Module
modules/Office365Brute.py
modules/Office365Brute.py
#! /bin/python # Created by Adam Compton (tatanus) # Part of myBFF from core.webModule import webModule import base64 from lxml import etree import re import random import time import requests from requests import session class Office365Brute(webModule): def __init__(self, config, display, lock): super(Of...
Python
0
@@ -215,16 +215,28 @@ session%0A +import sys%0A%0A %0A%0Aclass @@ -1461,37 +1461,16 @@ nt.find( -%0A '%7Bhttp:/ @@ -4301,16 +4301,100 @@ cool!%22)%0A + resp2 = resp1.text.encode('raw_unicode_escape').decode('ascii')%0A @@ -4420,22 +4420,17 @@ str(resp -1.text +2 ...
db3f71f537a85396d777ba28d3ad6c8156137c24
Change pg key
src/python/pagerduty.py
src/python/pagerduty.py
import json import urllib2 PD_URL = "https://events.pagerduty.com/generic/2010-04-15/create_event.json" TIMEOUT = 10 def request(action, json_str): obj = json.loads(json_str) description = "%s %s is %s ( %s )" % ( obj.get('host', 'unknown host'), obj.get('service', 'unknown service'),...
Python
0.000001
@@ -1121,40 +1121,13 @@ ': ' -113852fbf4d34663b87b7321e9eba1e1 +fixme ',%0A
8c959354b59fb25f63ca73ecdcbd0f59197cabc9
Add --random option.
scanless/cli/main.py
scanless/cli/main.py
#!/usr/bin/env python # # scanless - public port scan scrapper # https://github.com/vesche/scanless # import argparse import sys from scanless.scanners import * SCAN_LIST = '''Scanner Name | Website ---------------|------------------------------ yougetsignal | http://www.yougetsignal.com viewdns | http:...
Python
0.000001
@@ -123,16 +123,42 @@ port sys +%0Afrom random import choice %0A%0Afrom s @@ -1779,16 +1779,132 @@ ignal')%0A + parser.add_argument('-r', '--random', help='use a random scanner',%0A action='store_true')%0A pars @@ -2411,16 +2411,99 @@ ower()%0A%0A + if args%5B'random'%5D:%0A ...
abce4c9958d55e9d46e06c81b670a3fcc56f47ab
Rename render to wptexturize, delegate render to wptexturize. We will add wpautop soon.
wpmarkup/__init__.py
wpmarkup/__init__.py
#!/usr/bin/env python import re """ A simple WordPress markup. """ class Markup: # TODOl: add the l10n support # translators: opening tokeny quote opening_quote = '&#8220;' #translators: closing tokeny quote closing_quote = '&#8221;' cockney = [ "'tain't","'twere","'twas","'tis...
Python
0
@@ -1989,32 +1989,117 @@ e%3E'%0A %22%22%22%0A + return Markup.wptexturize(raw)%0A%0A%0A @staticmethod%0A def wptexturize(raw):%0A no_textu
3999e9812a766066dcccf6a4d07174144cb9f72d
Add Minecraft Wiki link to version item
wurstmineberg.45s.py
wurstmineberg.45s.py
#!/usr/local/bin/python3 import requests people = requests.get('https://api.wurstmineberg.de/v2/people.json').json() status = requests.get('https://api.wurstmineberg.de/v2/world/wurstmineberg/status.json').json() print(len(status['list'])) print('---') print('Version: {}|color=gray'.format(status['version'])) for w...
Python
0
@@ -267,18 +267,63 @@ rsion: %7B -%7D%7C +ver%7D%7Chref=http://minecraft.gamepedia.com/%7Bver%7D color=gr @@ -333,16 +333,20 @@ .format( +ver= status%5B'
4b2627ea786031ea7b1e622fc5cb665a017b3f63
fix InlineFieldList for WTForms v3
flask_admin/model/fields.py
flask_admin/model/fields.py
import itertools from wtforms.validators import ValidationError from wtforms.fields import FieldList, FormField, SelectFieldBase try: from wtforms.fields import _unset_value as unset_value except ImportError: from wtforms.utils import unset_value from flask_admin._compat import iteritems from .widgets import...
Python
0
@@ -1314,16 +1314,36 @@ et_value +, extra_filters=None ):%0A @@ -1388,16 +1388,29 @@ process( +%0A formdata @@ -1411,24 +1411,53 @@ rmdata, data +, extra_filters=extra_filters )%0A%0A #
eb97762538126cb4a451ed23a025490360d01bf1
fixed on supress_exc=True
flask_vgavro_utils/utils.py
flask_vgavro_utils/utils.py
import subprocess import logging from datetime import datetime from werkzeug.local import LocalProxy from werkzeug.utils import import_string from flask import g from marshmallow.utils import UTC class classproperty(property): """ A decorator that behaves like @property except that operates on classes ra...
Python
0.998596
@@ -1152,21 +1152,8 @@ key -, supress_exc ):%0A @@ -1325,71 +1325,8 @@ xc:%0A - if supress_exc:%0A return exc%0A @@ -1393,18 +1393,54 @@ bject: %7B -%7D' +!r%7D'%0A .format( @@ -1447,16 +1447,21 @@ key, obj +, exc ))%0A e @@ -1621,71 +...
d792201bc311a15e5df48259008331b771c59aca
Fix CSS problem when Flexx is enbedded in page-app
flexx/ui/layouts/_layout.py
flexx/ui/layouts/_layout.py
""" Layout widgets """ from . import Widget class Layout(Widget): """ Abstract class for widgets that organize their child widgets. Panel widgets are layouts that do not take the natural size of their content into account, making them more efficient and suited for high-level layout. Other layout...
Python
0.000059
@@ -497,16 +497,18 @@ +/* overflow @@ -516,16 +516,18 @@ hidden; +*/ %0A %7D%0A