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
e8c180e65dda3422ab472a6580183c715ef325c3
Update error message of UnsupportedOperationException.
easyium/decorator.py
easyium/decorator.py
__author__ = 'karl.gong' from .exceptions import UnsupportedOperationException def SupportedBy(*web_driver_types): def handle_func(func): def handle_args(*args, **kwargs): wd_types = [] for wd_type in web_driver_types: if isinstance(wd_type, list): ...
Python
0
@@ -604,22 +604,17 @@ %22 -This o +O peration is @@ -609,16 +609,21 @@ peration + %5B%25s%5D is not @@ -654,16 +654,32 @@ %5B%25s%5D.%22 %25 + (func.__name__, current @@ -695,16 +695,17 @@ er_type) +) %0A%0A
0e474bee9188cc5a25bc139b9ad0cc5f92f40116
Fix comment
view/problem.py
view/problem.py
'''Problem view module''' import config import model.problem import model.scoring import view.proset import re import os import stat import fcntl import json import binascii import git import asyncio from model.user import UserLevel from .interface import * from . import APIHandler async def get_problem(user, uid):...
Python
0
@@ -5311,13 +5311,13 @@ ject +) : %7B%7D -) %0A%0A
3e8b3dc25d82d4d70d5c8068b12bc814723b7b08
Make the spam stop
matchmaker/__init__.py
matchmaker/__init__.py
import logging from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import slacker_log_handler as slh app = Flask(__name__, static_folder='static') app.config.from_object('matchmaker.default_settings') app.config.from_envvar('CASINO_SETTINGS', silent=True) if not app.debug: handler = slh.SlackerLog...
Python
0.003773
@@ -521,67 +521,8 @@ ler) -%0A app.logger.error(%22Casino Matchmaker Webapp restarted%22) %0A%0Adb
7c896c1ca578e9f14e66c4daeb7df763c6da5302
Add documentation to ultrametric merge
viridis/tree.py
viridis/tree.py
# built-ins import itertools as it # libraries import numpy as np import networkx as nx # local modules def lowest_common_ancestor(t, u, v): au = t.ancestors(u) av = t.ancestors(v) common = set(au) & set(av) short = au if len(au) < len(av) else av for s in short: if s in common: ...
Python
0
@@ -723,16 +723,545 @@ w=0.0):%0A + %22%22%22Merge two nodes u, v and return the ID of the new node.%0A%0A Parameters%0A ----------%0A u, v : int%0A The nodes being merged.%0A w : float%0A The weight of the merge.%0A%0A Returns%0A -------%0A ...
b5c2bc906194e9be69d1895b6290bc918e5a040b
Increment version
wasabi/about.py
wasabi/about.py
__title__ = "wasabi" __version__ = "0.4.2" __summary__ = "A lightweight console printing and formatting toolkit" __uri__ = "https://ines.io" __author__ = "Ines Montani" __email__ = "ines@explosion.ai" __license__ = "MIT"
Python
0.000002
@@ -35,11 +35,11 @@ %220. -4.2 +5.0 %22%0A__
eef40940bc1b73608fd9a78f5e35cfad908f6a62
Fix display question (2)
webapp/views.py
webapp/views.py
from django.shortcuts import render, redirect from django.contrib.auth import authenticate, login from .forms import * from meas_models.models import * def custom_login(request): username = request.POST['username'] password = request.POST['password'] user = authenticate(username=username, password=passwo...
Python
0
@@ -1617,20 +1617,44 @@ ion_set. -all( +filter(keypoint__isnull=True )%0A%0A r
bb1e548b104a86aa9c622a628c6596a32045d6b8
Change tickets URL
website/urls.py
website/urls.py
## # Copyright (C) 2013 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen. # # Inboxen 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, o...
Python
0
@@ -5231,16 +5231,21 @@ .url(r'%5E +help/ tickets/
750dd5437314908985d5241a3b5483037adfd73f
change set comp in case python 2.6
yamlcfg/util.py
yamlcfg/util.py
#!/usr/bin/env python ''' yamlcfg.util Cross module utilities ''' import os def normalize(var, type=None, **kwargs): if var is None: return None if type is None: return var if type is basestring: return str(type) elif type is int: return int(type) elif type is hex: ...
Python
0.000018
@@ -836,9 +836,9 @@ in -%7B +%5B x.lo @@ -865,9 +865,9 @@ _ext -%7D +%5D %0A
87d17ab64f883e17cd0655a7b9f7d8670f119e56
Handle EOF during the exit prompt
zk_shell/cli.py
zk_shell/cli.py
""" entry point for CLI wrapper """ from __future__ import print_function import argparse from collections import namedtuple import logging import signal import sys from . import __version__ from .shell import Shell try: raw_input except NameError: raw_input = input class CLIParams( namedtuple("C...
Python
0
@@ -4009,16 +4009,48 @@ e True:%0A + wants_exit = False%0A%0A @@ -4050,32 +4050,32 @@ try:%0A - @@ -4205,16 +4205,103 @@ errupt:%0A + wants_exit = True%0A%0A if wants_exit:%0A try:%0A @@ -4359,16 +4359,20 @@ ...
6b5991eb57d6157406301278e56e2dd230482cd7
revert last change
composer/2022_airflow_summit/data_analytics_process_test.py
composer/2022_airflow_summit/data_analytics_process_test.py
# 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
@@ -5583,9 +5583,8 @@ rows %3E 0 -%0A
0302b7fb35343580d67f4e9809d313aad090df8a
Set build button to stay colored until build is complete
jekyll_helper/JekyllHelperWindow.py
jekyll_helper/JekyllHelperWindow.py
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2015 <Christopher Wells> <cwellsny@nycap.rr.com> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # i...
Python
0
@@ -5116,32 +5116,82 @@ ec_fn=os.setsid) +.wait()%0A print(%22Sucessfully built website%22) %0A return;
7ccaeeb5ed87bb0d2e4b1533f07178b849868a99
Disable -Wall on Android again.
Source/config.gyp
Source/config.gyp
# # Copyright (C) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and th...
Python
0.000001
@@ -3376,24 +3376,42 @@ %5B'OS!=%22win%22 + and OS!=%22android%22 ', %7B%0A
f142ab4c266dd66866b088753685b519d5848ec1
Remove support for multiple mirror playbacks
lg_mirror/src/lg_mirror/playback.py
lg_mirror/src/lg_mirror/playback.py
import json import md5 import rospy import threading from lg_common import ManagedApplication, ManagedWindow from lg_common.helpers import load_director_message from lg_common.msg import ApplicationState, WindowGeometry from lg_mirror import MirrorException from lg_mirror.utils import get_mirror_port, viewport_to_multi...
Python
0
@@ -594,59 +594,8 @@ !',%0A - 'taginject', 'tags=%22title=%7Bw_name%7D%22',%0A '!',%0A @@ -1058,86 +1058,8 @@ urn -'%7Bname%7D : %7Bcmd%7D'.format(%0A name=self.instance_name,%0A cmd= PLAY @@ -1066,26 +1066,16 @@ BACK_CMD -%0A ) %0A%0A de @@ -1221,47 +1221,8 @@ rt,%0A ...
86969c0aef27f28dd9f03544767d6280d4dde1a9
Use `to_list()` when iterating over a depset.
apple/internal/partials/macos_additional_contents.bzl
apple/internal/partials/macos_additional_contents.bzl
# Copyright 2018 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
Python
0.000204
@@ -1972,16 +1972,26 @@ et.files +.to_list() :%0A
07750d05ad92aade63accb2629f21180282c4be0
Fix location of dashboard and license in setup script
lib/pegasus/python/pegasus-setup.py
lib/pegasus/python/pegasus-setup.py
""" Installation script for Pegasus Python library Author: Dan Gunter <dkgunter@lbl.gov> """ try: from setuptools import setup except: from distutils.core import setup from glob import glob import os import sys VERSION = os.environ.get('PEGASUS_VERSION','trunk') # Main function # ------------- setup(name = ...
Python
0
@@ -174,49 +174,16 @@ tup%0A -from glob import glob%0Aimport os%0Aimport sy +import o s%0A%0AV @@ -238,41 +238,8 @@ ')%0A%0A -# Main function%0A# -------------%0A%0A setu @@ -299,16 +299,27 @@ ages = %5B +%0A %22Pegasus @@ -376,19 +376,8 @@ sus. -monitoring. dash @@ -546,16 +546,23 @@ s.tools%22 +%0A...
97541065756f27314bfaf1564b51c88599617390
fix entities
mapreduce/filter/mapper_entities.py
mapreduce/filter/mapper_entities.py
#!/usr/bin/env python import sys from zipfile import ZipFile import nltk # NAMES corpus from nltk.corpus import names NAME_SET = set() for f in names.fileids(): NAME_SET = NAME_SET.union(names.words(f)) # wget http://download.geonames.org/export/dump/cities15000.zip GEONAMES_FILE = 'cities15000.zip' # Prepare ...
Python
0.033481
@@ -1491,16 +1491,80 @@ -------%0A + cur_ngrams = list(ngrams)%0A cur_ngrams.append(orig_ngram)%0A for @@ -1569,24 +1569,28 @@ r ngram1 in +cur_ ngrams:%0A
89947fdc595274960a50ca81bcd76a7ec0d53243
Make PySoot optional.
cle/backends/soot.py
cle/backends/soot.py
import zipfile import archinfo from archinfo.arch_soot import SootMethodDescriptor, SootAddressDescriptor from pysoot.lifter import Lifter from . import Backend from . import register_backend from ..errors import CLEError import logging _l = logging.getLogger("cle.backends.soot") class Soot(Backend): def __i...
Python
0
@@ -101,16 +101,44 @@ criptor%0A +%0Atry:%0A import pysoot%0A from pys @@ -161,16 +161,54 @@ t Lifter +%0Aexcept ImportError:%0A pysoot = None %0A%0Afrom . @@ -364,24 +364,24 @@ (Backend):%0A%0A - def __in @@ -478,24 +478,211 @@ **kwargs):%0A%0A + if not pysoot:%0A raise ImportErr...
b70d06ac546b0c9736818600f52a3341f1e5fffc
Fix import
coastguard/config.py
coastguard/config.py
import ConfigParser from lib.HostFilter import HostFilter import os def load_config(configfile): """ Load config from ini formatted text file :param configfile: str. path to file :return: dict. configuration attributes """ parser = ConfigParser.SafeConfigParser() parser.read(configfile) ...
Python
0.000002
@@ -22,21 +22,21 @@ rom lib. -HostF +hostf ilter im
e893ac40de2dda19196c7de7d9f7767b20b23884
Use a better function (lambda) name
headers/cpp/functions.py
headers/cpp/functions.py
#!/usr/bin/env python # # Copyright 2007 Neal Norwitz # Portions Copyright 2007 Google 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...
Python
0.999999
@@ -806,21 +806,22 @@ ns.%0A -condi +IsFunc tion = l @@ -906,13 +906,14 @@ :%5D, -condi +IsFunc tion
808550f590defc5c148175d30dad16b1f99af875
use low level client instead of reource for boto3 lambda connection
hephaestus/transports.py
hephaestus/transports.py
from __future__ import absolute_import, division, print_function, unicode_literals import os import sys import importlib import logging import json from .exceptions import * transportLogger = logging.getLogger('hephaestus.transport') class Transport(object): _type = None klass = None def __init__(self...
Python
0
@@ -5311,16 +5311,14 @@ ). -resource +client ('la
572cc860dcd1e1790ee655a5a700c3c269bd22eb
Use %02d for month/day
src/py/rpmostreecompose/versioneddir.py
src/py/rpmostreecompose/versioneddir.py
#!/usr/bin/env python # Copyright (C) 2014 Colin Walters <walters@verbum.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any ...
Python
0
@@ -1875,19 +1875,23 @@ ir, -str( +'%2502d' %25 month) -) %0A @@ -2017,17 +2017,21 @@ ir, -str( +'%2502d' %25 day) -) %0A @@ -2719,28 +2719,36 @@ r), -str( +'%2502d' %25 month -) , -str( +'%2502d' %25 day -) , st
19756b4ed4ccc684a69af275b0ff43bc8392e50d
Remove unimplemented methods.
src/python/borg/domains/sat/__init__.py
src/python/borg/domains/sat/__init__.py
"""@author: Bryan Silverthorn <bcs@cargo-cult.org>""" import contextlib import borg from . import features from . import instance from . import solvers class SatisfiabilityTask(object): def __init__(self, path): self.path = path def clean(self): pass @borg.named_domain class Satisfiability(...
Python
0.000003
@@ -812,113 +812,8 @@ ne%0A%0A - def write_answer(self, file_, answer):%0A pass%0A%0A def read_answer(self, file_):%0A pass%0A%0A
17e58978b5e1b787b15cae817e510913333bd23d
comment out failing test
src/python/breadpool/tests/test_pool.py
src/python/breadpool/tests/test_pool.py
# Copyright 2015 Chamila de Alwis # # 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
@@ -1238,32 +1238,34 @@ l.terminate()%0A%0A%0A +# def test_thread_ @@ -1284,24 +1284,26 @@ _timeout():%0A +# thread_p @@ -1366,16 +1366,18 @@ eout=5)%0A +# whil @@ -1447,16 +1447,18 @@ )) %3C 5:%0A +# @@ -1467,25 +1467,28 @@ me.sleep(1)%0A -%0A +#%0A# before_t @@ -1513,28 +1513,30 @@...
723b874eaf4945ffb1a8ac9db55099810271f8b0
add reboot function.
engineering/utils.py
engineering/utils.py
__author__ = 'nash.xiejun'
Python
0
@@ -20,8 +20,72 @@ xiejun'%0A +%0Aimport subprocess%0A%0Adef reboot():%0A subprocess.call(%22reboot%22)%0A
60ee6a5d2ad9e85fefd973c020ef65bd212e687c
Fix management command to send notification about new blog post.
astrobin/management/commands/notify_new_blog_entry.py
astrobin/management/commands/notify_new_blog_entry.py
from django.core.management.base import BaseCommand from django.contrib.auth.models import User from zinnia.models import Entry from astrobin.notifications import push_notification class Command(BaseCommand): help = "Notifies all users about most recent blog entry." def handle(self, *args, **options): ...
Python
0
@@ -90,16 +90,43 @@ t User%0A%0A +import persistent_messages%0A from zin @@ -154,61 +154,8 @@ ry%0A%0A -from astrobin.notifications import push_notification%0A %0Acla @@ -333,38 +333,16 @@ -push_notification(%0A +for u in Use @@ -356,17 +356,17 @@ ts.all() -, +: %0A @@ -374,154 +374,353 ...
fee5170a4b947d7ab3755fcb246f59e29f2842e8
Fix exception-message-attribute warning
atomic_reactor/plugins/exit_remove_worker_metadata.py
atomic_reactor/plugins/exit_remove_worker_metadata.py
""" Copyright (c) 2017 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import absolute_import from atomic_reactor.plugin import ExitPlugin from atomic_reactor.constants import PLUGIN_REMOVE_WORKER...
Python
0.000067
@@ -1299,14 +1299,6 @@ , ex -.message )%0A
01646541cb6639e9b41050c6e5466222071364bc
Add "api" prefix to api urls.
src/web/web/urls.py
src/web/web/urls.py
"""web URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based ...
Python
0.000002
@@ -811,16 +811,20 @@ url(r'%5E +api/ ', inclu
f21362be79974914f476be7bc85e74880e70ebf9
Revert "Put gunicorn in debug mode according to DEBUG"
_conf/gunicorn.py
_conf/gunicorn.py
# -*- coding: utf-8 -*- import multiprocessing import os pythonpath = '/home/sof15/app' bind = '0.0.0.0:8080' workers = multiprocessing.cpu_count() * 2 + 1 # todo: optimize threads = 1 # todo: optimize user = None loglevel = 'debug' errorlog = '-' # stderr debug = os.getenv('DEBUG', False)
Python
0
@@ -43,18 +43,8 @@ sing -%0Aimport os %0A%0Apy @@ -249,40 +249,4 @@ derr -%0A%0Adebug = os.getenv('DEBUG', False)%0A
0a08fe53c8f7a208828779575452f0d543782d33
Update transactions.py
python_paystack/objects/transactions.py
python_paystack/objects/transactions.py
''' transactions.py ''' import math from datetime import datetime import validators from .base import Base from .errors import InvalidEmailError class Transaction(Base): ''' Transactions class ''' reference = None amount = None email = None plan = None transaction_charge = None meta...
Python
0.000001
@@ -28,16 +28,22 @@ ort math +, uuid %0Afrom da @@ -961,452 +961,27 @@ -date = datetime.now()%0A year = date.year%0A month = str(date.month).zfill(2)%0A day = str(date.day).zfill(2)%0A date_stamp = %22%25s%25s%25s%22 %25 (year, month, day)%0A%0A reference_code = %22%25s%25s%22...
1c0980b5e8d442df77424f7d471df9fe293571ca
build elf_loader_nexe with --pnacl-bias
src/untrusted/elf_loader/elf_loader.gyp
src/untrusted/elf_loader/elf_loader.gyp
# -*- gyp -*- # Copyright (c) 2015 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'includes': [ '../../../build/common.gypi', ], 'targets' : [ { 'target_name': 'elf_loader_nexe', 'type': '...
Python
0.00012
@@ -632,24 +632,180 @@ ',%0A %5D,%0A + 'conditions': %5B%0A %5B'target_arch==%22mipsel%22', %7B%0A 'compile_flags': %5B%0A '--pnacl-bias=mips32',%0A %5D,%0A %7D%5D,%0A %5D,%0A %7D,%0A %5D,%0A
01241cfd80351ee151245009573f3548633622d9
SIGKILL is invalid
monk/network/server.py
monk/network/server.py
# -*- coding: utf-8 -*- """ Created on Fri Dec 12 07:01:01 2014 @author: xm """ import monk.core.api as monkapi from Queue import PriorityQueue import time import logging import platform if platform.system() == 'Windows': import win32api else: import signal import tornado.httpserver import tornado.ioloop impo...
Python
0.999996
@@ -3094,69 +3094,8 @@ se:%0A - signal.signal(signal.SIGKILL, self._sig_handler)%0A
42236c0002d78d424bbf28db97a37febce54f8b6
Add script for commandline call
pycqed/analysis_v2/analysis_daemon.py
pycqed/analysis_v2/analysis_daemon.py
import time import traceback import logging import os log = logging.getLogger(__name__) from pycqed.analysis import analysis_toolbox as a_tools a_tools.datadir = 'Q:\\USERS\\nathan\\data\\xld' class AnalysisDaemon: def __init__(self, t_start=None, start=True): self.t_start = t_start self.last_ts ...
Python
0
@@ -49,16 +49,48 @@ port os%0A +import matplotlib.pyplot as plt%0A log = lo @@ -115,16 +115,43 @@ name__)%0A +log.setLevel(logging.INFO)%0A from pyc @@ -201,57 +201,8 @@ ools -%0Aa_tools.datadir = 'Q:%5C%5CUSERS%5C%5Cnathan%5C%5Cdata%5C%5Cxld' %0A%0Acl @@ -363,9 +363,10 @@ l = -5 +10 # @@ -1552,16 +1552,21 ...
fd40aa59d74dce4e4e0e9951a686d902d0788344
Use "--force" for submodule updates
readthedocs/vcs_support/backends/git.py
readthedocs/vcs_support/backends/git.py
import logging import csv import os import re from os.path import exists, join as pjoin from StringIO import StringIO from projects.exceptions import ProjectImportError from vcs_support.backends.github import GithubContributionBackend from vcs_support.base import BaseVCS, VCSVersion log = logging.getLogger(__name__) ...
Python
0.000006
@@ -5396,16 +5396,33 @@ update', +%0A '--init @@ -5437,16 +5437,27 @@ cursive' +, '--force' )%0A%0A
9e1b4ef8417237392b0b29d4d00148bd6164c1f4
Fix svn backend.
readthedocs/vcs_support/backends/svn.py
readthedocs/vcs_support/backends/svn.py
from projects.exceptions import ProjectImportError from vcs_support.base import BaseVCS, VCSVersion class Backend(BaseVCS): supports_tags = False fallback_branch = '/trunk/' def __init__(self, project): super(Backend, self).__init__(project) if self.repo_url[-1] != '/': self.r...
Python
0.000001
@@ -208,16 +208,25 @@ project +, version ):%0A
9126fa0afef42a8c7ecd12d1f0a882da97974fa9
revert root-level imports
mpcontribs/__init__.py
mpcontribs/__init__.py
"""The Materials Project's Community Contribution Framework""" __version__ = '0.1.1' __url__ = 'https://github.com/materialsproject/MPContribs' __author__ = 'Patrick Huck' __email__ = 'phuck@lbl.gov' __copyright__ = 'Copyright 2014-2015, The Materials Project' __maintainer__ = 'Patrick Huck' from mpcontribs.io.archie...
Python
0.000001
@@ -292,206 +292,4 @@ k'%0A%0A -from mpcontribs.io.archieml.mpfile import MPFile%0Afrom mpcontribs.rest.rester import MPContribsRester%0Afrom mpcontribs.io.core.recdict import RecursiveDict%0Afrom mpcontribs.config import mp_level01_titles%0A
ab16ae6ecd1915981ceceeef8fb1c0c1c41b4089
Add proper index route
pyramid_dispatch_protocol/__init__.py
pyramid_dispatch_protocol/__init__.py
# encoding: utf-8 from pyramid.response import Response from collections import deque from collections.abc import Iterable from webob.exc import HTTPNotFound ''' An implementation of web.dispatch.object for pyramid. ''' class Context(object): ''' A psuedo implementation of WebCore's context object to better ...
Python
0.000275
@@ -1158,24 +1158,25 @@ dispatcher%0A%0A +%0A def cont @@ -1235,17 +1235,21 @@ atchdict -%5B +.get( 'control @@ -1257,17 +1257,21 @@ er_path' -%5D +, '') %0A%0A @@ -2092,63 +2092,197 @@ add_ -view(view=controllerInternalView, route_name=route_name +route(route_name+'-index', pattern, **kw)%0A self.a...
c40fcae02b5d8444ae14e73f5d77e07591125716
Remove the cache test and make temporary files deleted
pyscf/pbc/tdscf/test/test_rhf_slow.py
pyscf/pbc/tdscf/test/test_rhf_slow.py
from pyscf.pbc.gto import Cell from pyscf.pbc.scf import RHF from pyscf.pbc.tdscf import TDHF from pyscf.pbc.tdscf.rhf_slow import PhysERI, PhysERI4, PhysERI8, build_matrix, eig, kernel import unittest from numpy import testing import numpy def retrieve_m(model, **kwargs): vind, hdiag = model.gen_vind(model._scf...
Python
0
@@ -1325,16 +1325,189 @@ l_rhf)%0A%0A + @classmethod%0A def tearDownClass(cls):%0A # These are here to remove temporary files%0A del cls.td_model_rhf%0A del cls.model_rhf%0A del cls.cell%0A%0A def @@ -1717,254 +1717,8 @@ x(e) -%0A if eri is PhysERI4:%0A ...
7e6215ababc356a6e5f5789fab106d2322977ac2
enable 'real' wikidata
pywikibot/families/wikidata_family.py
pywikibot/families/wikidata_family.py
# -*- coding: utf-8 -*- __version__ = '$Id$' from pywikibot import family # The wikidata families class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'wikidata' self.langs = { 'wikidata': 'wikidata.org', 'repo': 'wikidata-tes...
Python
0.000005
@@ -450,204 +450,296 @@ code -):%0A # for here an now we just use the test repo%0A # for wikimedia families the method can return wikidata itself%0A return ('repo', 'wikidata') if code == 'client' else (None, None +, transcluded=False):%0A %22%22%22Always return a repository tupe. This enab...
726da12888f47114008977fe228c4f78f920a057
Remove old import line
res_partner_multi_address/__init__.py
res_partner_multi_address/__init__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Dave Lasley <dave@laslabs.com> # Copyright: 2015 LasLabs, Inc [https://laslabs.com] # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
Python
0.000018
@@ -970,40 +970,4 @@ ###%0A -%0Afrom carepoint.db import Carepoint%0A
fe8cceed09ed1f8aadb5a1a6b5a3c85504b2f142
clean compat_drf
rest_framework_extensions/compat_drf.py
rest_framework_extensions/compat_drf.py
""" The `compat` module provides support for backwards compatibility with older versions of Django REST Framework. """ from rest_framework_extensions.utils import get_rest_framework_features def add_trailing_slash_if_needed(regexp_string): # todo: test me if get_rest_framework_features()['router_trailing_slas...
Python
0
@@ -188,522 +188,4 @@ res%0A -%0A%0Adef add_trailing_slash_if_needed(regexp_string):%0A # todo: test me%0A if get_rest_framework_features()%5B'router_trailing_slash'%5D:%0A return regexp_string%5B:-2%5D + '%7Btrailing_slash%7D$'%0A else:%0A return regexp_string%0A%0A%0Adef get_lookup_allowed_sym...
ed738c7962c2b8b144fbee7b382a8f5053b40f3b
Deal with changes made in f9ccf06
lala/plugins/last.py
lala/plugins/last.py
import lala.config from datetime import datetime from lala.util import command, msg, regex lala.config.set_default_options(max_lines="30", datetime_format="%Y-%m-%d %H:%M:%S") class _LogEntryBuffer(list): """A list with a restricted length.""" def __init__(self, maxentries):...
Python
0
@@ -1068,9 +1068,9 @@ ext%5B -1 +0 %5D))%0A
6e3a23edf55e5f153d4390d04c6867696d29ca36
fix CSV export of unicode chars
hack-at-brown-2015/csv_export.py
hack-at-brown-2015/csv_export.py
import csv import webapp2 from registration import Hacker, hacker_keys, personal_info_keys from config import onTeam, isAdmin import logging class CsvExport(webapp2.RequestHandler): def get(self): if not onTeam(): return self.redirect('/') keys = list(hacker_keys) + ['status', 'admit_priority', 'r...
Python
0.000014
@@ -577,10 +577,25 @@ /csv +; charset=utf-8 '%0A - @@ -725,31 +725,8 @@ ():%0A - try:%0A @@ -751,146 +751,89 @@ row( -hacker.asDict(keys))%0A except UnicodeEncodeError:%0A logging.error('could not encode%5Cn')%0A print(hacker +%7Bkey: unicode(val...
9f9184a17b0aa5f58a104cb606cdca157386b32a
fix undefined variable
led_test/led_test.py
led_test/led_test.py
import ConfigParser from time import sleep try: import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) except ImportError: print('GPIO unavailable') class led_test: config = ConfigParser.RawConfigParser() config.read('c...
Python
0.003163
@@ -1343,31 +1343,8 @@ f):%0A -%09%09global run_main_loop%0A %09%09fo @@ -1412,32 +1412,32 @@ ber) -%09 %0A%09%09run_ -mai +butto n_loop - = True +s()%0A%09%09 %0A%09%0A%09 @@ -1742,39 +1742,226 @@ %60)%0A%0A -%0A%09while run_main_loop:%0A#%09%09try:%0A +%09def run_button_loops(self):%0A%09%09global run_main_loo...
52d4d8283eaf7e899398b6539df80551ec3437ae
FIX version
legal/__openerp__.py
legal/__openerp__.py
# -*- coding: utf-8 -*- { 'name': 'Legal', 'version': '8.0.0.5.0', 'description': 'Legal', 'category': 'base.module_category_knowledge_management', 'author': 'ADHOC', 'website': 'www.adhoc.com.ar', 'license': 'AGPL-3', 'depends': ['calendar', 'portal', 'report_aeroo', ...
Python
0
@@ -66,9 +66,9 @@ 0.0. -5 +6 .0',
4017c8ee2f137f4e95cddd43f728a3f4214346e9
fix typo
lgjp_web/__init__.py
lgjp_web/__init__.py
import concurrent.futures import logging import requests import rdflib from rdflib.namespace import XSD, DCTERMS, FOAF, RDFS, SKOS JITI = rdflib.Namespace("http://hkwi.github.com/denshijiti/#") JITIS = rdflib.Namespace("http://hkwi.github.com/denshijiti/terms#") IC = rdflib.Namespace("http://imi.ipa.go.jp/ns/cor...
Python
0.999991
@@ -2394,19 +2394,17 @@ %25s%22 %25 ( -url +L , repr(e
0e02c451f9d6f0c0af29eaef5f212efefc9d7eef
introduce the concept of an 'ultra' role, which is a role not even admins have unless it is explicitly declared
portality/authorise.py
portality/authorise.py
from portality.core import app class Authorise(object): @classmethod def has_role(cls, role, reference): # if we are the super user we can do anything if app.config["SUPER_USER_ROLE"] in reference: return True # if the user's role list contains the role explicitly t...
Python
0
@@ -99,32 +99,118 @@ le, reference):%0A + ultra = False%0A if role.startswith(%22ultra_%22):%0A ultra = True%0A%0A # if we @@ -292,32 +292,46 @@ E%22%5D in reference + and not ultra :%0A re
a53109064cb20cd60efc31f75880a3be2f0bb10b
Handle UVLoop RuntimeError, close and recreate Chrome tab
prerender/prerender.py
prerender/prerender.py
import os import asyncio import logging from multiprocessing import cpu_count from async_timeout import timeout from websockets.exceptions import InvalidHandshake from .chromerdp import ChromeRemoteDebugger logger = logging.getLogger(__name__) PRERENDER_TIMEOUT = int(os.environ.get('PRERENDER_TIMEOUT', 30)) CONCURR...
Python
0
@@ -1787,16 +1787,286 @@ raise%0A + except RuntimeError as e:%0A # https://github.com/MagicStack/uvloop/issues/68%0A if 'unable to perform operation' in str(e):%0A tab.iteration = MAX_ITERATIONS # set to MAX_ITERATIONS to close it in %60_manage_tab%60%0A raise%...
35ed0d75715a000c343de7e04a6c34dd2c14b2b9
Split lines correctly, add leading 0 to patent number if length == 7
test/goldstandard/benchmark_confirm.py
test/goldstandard/benchmark_confirm.py
import sqlite3 as sql import os import sys import logging import benchmark # bmVerify(['final_r7', 'final_r8'], filepath="/home/ysun/disambig/newcode/all/", outdir = "/home/ayu/results_v2/") # Text Files txt_file = 'benchmark_errors.txt' opened_file = open(txt_file, 'U') log_file = 'benchmark_results.log' #...
Python
0.00131
@@ -1149,8 +1149,442 @@ , count%0A +%0A split_lines = line_read.split(', ')%0A%0A # Strip out weird characters/formatting%0A # Need to add leading %220%22 to Patent if not Design/Util/etc..%0A%0A patent_to_match = split_lines%5B0%5D.strip(' %5Ct%5Cn%5Cr')%0A if len(patent_to_match) =...
589e1b3587a555983b764338d86a08596961247c
fix formatting of help text
commands/cmd_hash.py
commands/cmd_hash.py
import hashlib from lib.command import Command class HashCommand(Command): name = 'hash' description = 'Hashes text.' def run(self, message, args): # Remove duplicates available_algorithms = list(set(x.lower() for x in hashlib.algorithms_available)) if not args or len(args) != 2:...
Python
0.00142
@@ -348,19 +348,17 @@ sage, '%3C -pre +b %3E/%7B0%7D %5Ba @@ -379,11 +379,9 @@ t%5D%3C/ -pre +b %3E, w
d6886aaffe4b4cc5d5de264b29d7460e498ca952
Fix coding style
test/unit_test/test_utility_topword.py
test/unit_test/test_utility_topword.py
from lexos.helpers.error_messages import EMPTY_LIST_MESSAGE from lexos.processors.analyze.topword import _z_test_, analyze_all_to_para, \ group_division, analyze_para_to_group, analyze_group_to_group class TestZTest: def test_normal_case(self): assert round(_z_test_(p1=0.1, pt=0.3, n1=100, nt=10000), ...
Python
0.027587
@@ -651,16 +651,17 @@ icant%22%0A%0A +%0A # Create @@ -1340,32 +1340,33 @@ Y_LIST_MESSAGE%0A%0A +%0A # Create test su @@ -2435,16 +2435,17 @@ ESSAGE%0A%0A +%0A # Create
5527b7cd687f6b3b80c3b171d14a4031a01b995e
Add signal handler
common/filter_lex.py
common/filter_lex.py
#!/usr/bin/env python3 import argparse def main(in_lex, vocab, out_lex, oov): d = {} for line in in_lex: key, trans = line.strip().split(None, 1) if key not in d: d[key] = set() d[key].add(trans) for line in vocab: word = line.strip().split()[0] if wor...
Python
0.000001
@@ -32,16 +32,183 @@ rgparse%0A +from signal import signal, SIGPIPE, SIG_DFL %0A#Ignore SIG_PIPE and don't throw exceptions on it... (http://docs.python.org/library/signal.html)%0Asignal(SIGPIPE,SIG_DFL) %0A%0Adef ma
738b470557bfa95f2b0e5823578cd38370ed80aa
Add a note for the failure.
tests/merchandise/music/test_models.py
tests/merchandise/music/test_models.py
import datetime import pytest from components.merchandise.music.models import Album, Edition, Single, Track from components.merchandise.music.factories import (AlbumFactory, EditionFactory, SingleFactory, TrackFactory) from components.people.factories import GroupFactory pytestmark = pytest.mark.django_db class...
Python
0
@@ -957,32 +957,145 @@ _failure(self):%0A + # Test that calling %60regular_edition%60 will not fail loudly if the%0A # proper edition is not found.%0A album =
326f2b509e0886deaebaffa43e6183ded5f37a5c
Test SlaveOkay bit with more mongos ops.
tests/test_mongos_command_read_mode.py
tests/test_mongos_command_read_mode.py
# Copyright 2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
Python
0
@@ -1344,32 +1344,149 @@ ', pipeline=%5B%5D)%0A + self.assertFalse(command.flags & QUERY_FLAGS%5B'SlaveOkay'%5D,%0A 'SlaveOkay set')%0A self @@ -1841,16 +1841,136 @@ t=%5B%7B%7D%5D)%0A + self.assertTrue(command.flags & QUERY_FLAGS%5B'SlaveOkay'%5D,%0A ...
955ea67cbf5e748c7e2daf724627cbe2111c5021
Fix prospector
tests/test_spawner/test_pod_volumes.py
tests/test_spawner/test_pod_volumes.py
from unittest import TestCase from django.test import override_settings from libs.paths.exceptions import VolumeNotFoundError from scheduler.spawners.templates.volumes import get_pod_volumes class TestPodVolumes(TestCase): PERSISTENCE_OUTPUTS = { 'outputs1': { 'mountPath': '/outputs/1', ...
Python
0.000001
@@ -795,37 +795,25 @@ volumes, -volume_mounts +_ = get_pod_v
1af1a7acface58cd8a6df5671d83b0a1a3ad4f3e
Set the tiddlywebwiki binary limit to 1MB.
tiddlywebplugins/tiddlyspace/config.py
tiddlywebplugins/tiddlyspace/config.py
""" Base configuration for TiddlySpace. This provides the basics which may be changed in tidlywebconfig.py. """ from tiddlywebplugins.instancer.util import get_tiddler_locations from tiddlywebplugins.tiddlyspace.instance import store_contents PACKAGE_NAME = 'tiddlywebplugins.tiddlyspace' config = { 'instance_...
Python
0
@@ -995,10 +995,59 @@ mysql',%0A + 'tiddlywebwiki.binary_limit': 1048576, # 1MB%0A %7D%0A
5497bd3fcaa91826637d636fbbb545cd5b199a7d
call download_nacl_irt.py in export_tarball.py to make sure the generated tarballs can be built with NaCl support.
tools/export_tarball/export_tarball.py
tools/export_tarball/export_tarball.py
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ This tool creates a tarball with all the sources, but without .svn directories. It can also remove files which are not strictly re...
Python
0.000006
@@ -534,16 +534,34 @@ port os%0A +import subprocess%0A import s @@ -3392,16 +3392,618 @@ turn 1%0A%0A + nacl_download_path = os.path.join(%0A GetSourceDirectory(), 'build', 'download_nacl_irt.py')%0A nacl_cwd = os.path.join(GetSourceDirectory(), '..')%0A if subprocess.call(%5B'python', nacl_download_path%5D,...
d3591104c0300216bf4c91c23e7befb7d152086a
Update hoomd/pytest/test_dcd.py
hoomd/pytest/test_dcd.py
hoomd/pytest/test_dcd.py
import hoomd import pytest import numpy as np def test_attach(simulation_factory, two_particle_snapshot_factory, tmp_path): d = tmp_path / "sub" d.mkdir() filename = d / "temporary_test_file.dcd" sim = simulation_factory(two_particle_snapshot_factory()) dcd_dump = hoomd.write.DCD(filename, hoomd.t...
Python
0
@@ -378,72 +378,14 @@ sim. -operations._schedule()%0A for i in range(10):%0A sim. run(1 +0 )%0A%0A%0A
17e14c82c84dda4cbe6ad76056c53bbce918da55
use super
host/TL/TransferLayer.py
host/TL/TransferLayer.py
# # ------------------------------------------------------------ # Copyright (c) SILAB , Physics Institute of Bonn University # ------------------------------------------------------------ # # SVN revision information: # $Rev:: $: # $Author:: $: # $Date:: ...
Python
0.000001
@@ -372,16 +372,45 @@ (Base):%0A + '''Transfer Layer%0A ''' %0A def @@ -440,20 +440,42 @@ -Base +super(TransferLayer, self) .__init_ @@ -472,30 +472,24 @@ f).__init__( -self, conf)%0A%0A d
4f86c9ecda68dafff6be02870d5a6bfbee8f1683
Fix alarm.com I/O inside properties (#4307)
homeassistant/components/alarm_control_panel/alarmdotcom.py
homeassistant/components/alarm_control_panel/alarmdotcom.py
""" Interfaces with Alarm.com alarm control panels. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/alarm_control_panel.alarmdotcom/ """ import logging import voluptuous as vol import homeassistant.components.alarm_control_panel as alarm from homeassist...
Python
0
@@ -1383,16 +1383,22 @@ ssword)%5D +, True )%0A%0A%0Aclas @@ -1882,16 +1882,52 @@ password +%0A self._state = STATE_UNKNOWN %0A%0A @p @@ -2015,16 +2015,117 @@ n True%0A%0A + def update(self):%0A %22%22%22Fetch the latest state.%22%22%22%0A self._state = self._alarm.state%0A%0A @pro ...
18f29b2b1a99614b09591df4a60c1670c845aa9b
Add first set of exercises.
students/crobison/session04/dict_lab.py
students/crobison/session04/dict_lab.py
# Charles Robison # 2016.10.18 # Dictionary and Set Lab # Create a dictionary containing “name”, “city”, and “cake” # for “Chris” from “Seattle” who likes “Chocolate”. d = {'name': 'Chris', 'city': 'Seattle', 'cake': 'Chocolate'}
Python
0.000001
@@ -162,17 +162,16 @@ olate%E2%80%9D.%0A -%0A d = %7B'na @@ -225,8 +225,989 @@ late'%7D%0A%0A +#Display the dictionary.%0Ad%0A%0A# Delete the entry for %E2%80%9Ccake%E2%80%9D.%0Adel d%5B'cake'%5D%0A%0A# Display the dictionary.%0Ad%0A%0A# Add an entry for %E2%80%9Cfruit%E2%80%9D with %E2%80%9CMango%E2%80%9D and displ...
0b8a269b238fae877bbbd9a530bf0991c49820fb
Fix small typo in alarmdotcom component (#30758)
homeassistant/components/alarmdotcom/alarm_control_panel.py
homeassistant/components/alarmdotcom/alarm_control_panel.py
"""Interfaces with Alarm.com alarm control panels.""" import logging import re from pyalarmdotcom import Alarmdotcom import voluptuous as vol import homeassistant.components.alarm_control_panel as alarm from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA from homeassistant.components.alarm_contro...
Python
0.000048
@@ -3688,16 +3688,17 @@ arm hom +e command
1314a5b99f64f96deee423e5189381f332c4419c
add fluct_limit to signal dividend
ATRCalculator.py
ATRCalculator.py
class ATRCalculator(object): def __init__(self, atr_period): self.atr_period = atr_period self.tr_list = [] self.last_tick = None self.atr = None def __call__(self, tick): # if not self.last_tick: # => ValueError: 'The truth value of an array with more than one e...
Python
0.000002
@@ -1,8 +1,20 @@ +import log%0A%0A class AT @@ -67,16 +67,33 @@ r_period +, fluct_limit=0.2 ):%0A @@ -203,16 +203,55 @@ r = None +%0A self.fluct_limit = fluct_limit %0A%0A de @@ -438,82 +438,78 @@ -if not self.last_tick is None:%0A HL = tick%5B%22High%22%5D - tick%5B%22Low%22%5D +HL...
f4c8b81fbe2ef29321be5178f50377979bcf0ea7
Set optimization flag to -O0, huge speedup in build time.
climlab/radiation/rrtm/_rrtmg_sw/setup.py
climlab/radiation/rrtm/_rrtmg_sw/setup.py
def configuration(parent_package='', top_path=None): import os from numpy.distutils.misc_util import Configuration from numpy.distutils import fcompiler # Set default compiler flags cppflags = '' f77flags = '' f90flags = '' # figure out which compiler we're going to use compiler = ...
Python
0
@@ -587,16 +587,23 @@ ee-form' +, '-O0' %5D%0A
38a996b6a31a51386356fc9532e15bea61229c50
Remove unused import
muver/wrappers/gatk.py
muver/wrappers/gatk.py
import sys from __init__ import PATHS, quiet_call def run_base_recalibrator(bam, known_sites, ref_fn, recal_table, log_file): ''' Run GATK BaseRecalibrator. ''' quiet_call([ 'java', '-Xmx8g', '-jar', PATHS['gatk'], '-T', 'BaseRecalibrator', '-I', bam, ...
Python
0.000001
@@ -1,18 +1,4 @@ -import sys%0D%0A%0D%0A from
c9b6387702baee3da0a3bca8b302b619e69893f7
Customize a ChunkList just for IFF chunks
steel/chunks/iff.py
steel/chunks/iff.py
import collections import io from steel.fields.numbers import BigEndian from steel import fields from steel.chunks import base __all__ = ['Chunk', 'Form'] class Chunk(base.Chunk): id = fields.String(size=4, encoding='ascii') size = fields.Integer(size=4, endianness=BigEndian) payload = base...
Python
0
@@ -148,16 +148,29 @@ 'Chunk', + 'ChunkList', 'Form'%5D @@ -347,24 +347,245 @@ =size)%0D%0A%0D%0A%0D%0A +class ChunkList(base.ChunkList):%0D%0A def __init__(self, *args, **kwargs):%0D%0A # Just a simple override to default to a list of IFF chunks%0D%0A return super(ChunkList, self).__init__(Chunk, ...
b1717a8c1f0e143ad9cdadb75b137155e8f6c1f2
Change documentation and output line
mythril/analysis/modules/integer.py
mythril/analysis/modules/integer.py
from z3 import * from mythril.analysis import solver from mythril.analysis.ops import * from mythril.analysis.report import Issue from mythril.exceptions import UnsatError import re import copy import logging ''' MODULE DESCRIPTION: Check for integer underflows. For every SUB instruction, check if there's a possible ...
Python
0.000001
@@ -506,32 +506,53 @@ nteger underflow + and integer overflow %0A :param stat @@ -2398,12 +2398,11 @@ ion -will +may res
2c991dd13e0d8b5242e3e46cb4a782074ad46bed
Remove commented code
strapmin/widgets.py
strapmin/widgets.py
from django import forms from django.forms.util import flatatt from django.template.loader import render_to_string from django.utils.encoding import force_text from django.utils.safestring import mark_safe class RichTextEditorWidget(forms.Textarea): #def __init__(self, *args, **kwargs): # kwargs['...
Python
0
@@ -261,93 +261,63 @@ -#def __init__(self, *args, **kwargs) +class Media :%0D%0A -# -kwargs%5B'attrs'%5D = %7B'class': ' +js = ('admin/js/ckeditor/ ckeditor '%7D%0D%0A @@ -316,79 +316,67 @@ itor -'%7D +.js', %0D%0A -# -super(RichTextEditorWidget, self).__init__(*args, **kwargs + 'adm...
3e0e79bbed4b1a8854c90163ea77603beb1f0742
Switch heroku to english
collective_blog/settings/prod_settings.py
collective_blog/settings/prod_settings.py
"""Production settings See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ """ from __future__ import unicode_literals import dj_database_url print('\033[00;32mLoading production settings\033[0;00m') DEBUG = False from .settings import * ADMINS = (('Zelta', 'dev.zelta@gmail.com'), ) MANAGERS =...
Python
0.008871
@@ -133,16 +133,72 @@ iterals%0A +from django.utils.translation import ugettext_lazy as _%0A import d @@ -1911,8 +1911,101 @@ torage'%0A +%0ALANGUAGES = %5B%0A # ('ru', _('Russian')),%0A ('en', _('English')),%0A%5D%0A%0ALANGUAGE_CODE = 'en'%0A
df755edd4c6303394403a69dab44d33964504a70
Fix test breakage in neural tangents due to jax.test_utils refactoring.
neural_tangents/utils/test_utils.py
neural_tangents/utils/test_utils.py
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
0
@@ -635,16 +635,27 @@ classes%0A +import jax%0A from jax @@ -1267,24 +1267,127 @@ return tol%0A + # TODO(schsam): don't use JAX test_utils.%0A jax._src.test_util.default_tolerance = default_tolerance%0A jtu.defaul
f9b42a7140756b0595bbbf078e17b316c5b350dc
allowing host and debug is false
scotland_yard/scotland_yard/settings.py
scotland_yard/scotland_yard/settings.py
""" Django settings for scotland_yard project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import...
Python
0.999957
@@ -584,16 +584,27 @@ OSTS = %5B +'localhost' %5D%0A%0AINSTA
5ee272f27cf98c4c57dd438b231885df50cc18c5
Fix common test.
common/data_refinery_common/test_utils.py
common/data_refinery_common/test_utils.py
from unittest.mock import Mock, patch from django.test import TestCase from data_refinery_common import utils class UtilsTestCase(TestCase): @patch('data_refinery_common.utils.requests.get') def test_get_instance_id_cloud(self, mock_get): """Test that a request is made and the global value is stored"...
Python
0.000025
@@ -911,51 +911,8 @@ k()%0A - mock_get_env_variable.reset_mock()%0A
3ed854140723ee7f0527ba15d9cfe7bba8bbc6e6
Make the perl wrappers work with python 3
contrib/perl/generatePerlAPIWrappers.py
contrib/perl/generatePerlAPIWrappers.py
#!/usr/bin/env python2.7 # # Copyright (C) 2013-2016 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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 Licens...
Python
0.998482
@@ -18,11 +18,8 @@ thon -2.7 %0A#%0A# @@ -1949,17 +1949,17 @@ rint - +( preamble %0A%0Aal @@ -1954,16 +1954,17 @@ preamble +) %0A%0Aall_me @@ -2243,17 +2243,17 @@ print - +( app_obje @@ -2325,24 +2325,25 @@ ethod_route) +) %0A els @@ -2362,17 +2362,17 @@ print - +( object_m @@ -2440,24 +244...
f7d4a3df11a67e3ae679b4c8f25780538c4c3c32
Use the newer PostUpdate instead of PostMedia
core/management/commands/send_tweets.py
core/management/commands/send_tweets.py
import twitter from django.core.management.base import BaseCommand from django.conf import settings from core.models import Tweet class Command(BaseCommand): help = "Send out tweets." def handle(self, *args, **options): for tweet in Tweet.objects.filter(was_sent=False, failed_trails__lte=5): ...
Python
0
@@ -786,13 +786,14 @@ Post -Media +Update (twe @@ -801,16 +801,22 @@ t.text, +media= tweet.me
16bada3156354ef4d41505b37e31be054c949d93
Add descripiton to policies in virtual_interfaces.py
nova/policies/virtual_interfaces.py
nova/policies/virtual_interfaces.py
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
Python
0.000266
@@ -946,36 +946,42 @@ E_ANY),%0A -policy.RuleD +base.create_rule_d efault(%0A @@ -984,21 +984,16 @@ -name= BASE_POL @@ -1006,34 +1006,24 @@ ME,%0A -check_str= base.RULE_AD @@ -1034,16 +1034,279 @@ OR_OWNER +,%0A %22%22%22List Virtual Interfaces.%0A%0AThis works only with the nova-...
3c984a10d0665498f3d1d5f6abf72532cd9d58d5
bump version
infi/conf/__version__.py
infi/conf/__version__.py
__version__ = "0.0.2"
Python
0
@@ -16,7 +16,7 @@ 0.0. -2 +3 %22%0A
4e531c2c0861e3162b0e15a5d31d46db60bdaf74
fix axis label in average_fps
inquiries/average_fps.py
inquiries/average_fps.py
import numpy as np import matplotlib.pyplot as plt import os from srqi.core import inquiry from srqi.core import my_utils import datetime class Average_Fps(inquiry.Inquiry): NAME = u'Average FPS' DAYS_PER_PERIOD = inquiry.Inquiry_Parameter(7,"Days per period","the number \ of days to average over w...
Python
0.000018
@@ -3484,22 +3484,26 @@ 'Period -Number +Start Date ')%0D%0A @@ -3575,16 +3575,23 @@ oss All +Fluoro Events%22)
3dd666f76b06d313e8b089a791ddabbb053d827c
Modify default bash script to cd into output_dir at start
integration/apps/apps.py
integration/apps/apps.py
# Copyright (c) 2015, 2016, 2017, 2018, 2019, 2020, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this...
Python
0
@@ -3140,16 +3140,44 @@ nt('''%5C%0A + cd %7Boutput_dir%7D%0A @@ -3265,16 +3265,58 @@ .format( +output_dir=output_dir,%0A setup=se
7a952d605b629b9c8ef2c96c451ee4db4274d545
Set max celery connections to 1.
suddendev/config.py
suddendev/config.py
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): DEBUG = False TESTING = False CSRF_ENABLED = True SQLALCHEMY_TRACK_MODIFICATIONS = False SECRET_KEY = os.urandom(32) SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] CELERY_BROKER_URL = os.environ['CLO...
Python
0
@@ -913,17 +913,16 @@ IONS = 1 -0 %0A%0Aclass
2927c6bc4c4e0c975a875d7eb5aa736b6abd66cd
bump version
synapse/__init__.py
synapse/__init__.py
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # Copyright 2018-9 New Vector Ltd # # 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...
Python
0
@@ -1177,13 +1177,16 @@ __ = %221. -3. +4.0rc 1%22%0A
b49eba5a6be0dea3367303c0ec5ecc16d76e40eb
update form objects for upgraded django
accounts/forms.py
accounts/forms.py
from django.conf import settings from django import forms from django.template import loader from django.contrib.auth.models import User from django.contrib.auth.forms import PasswordResetForm as BasePasswordResetForm from django.contrib.auth.tokens import default_token_generator from django.utils.http import int...
Python
0
@@ -438,16 +438,116 @@ natives%0D +%0Afrom django.utils.http import urlsafe_base64_encode%0D%0Afrom django.utils.encoding import force_bytes%0D %0A%0D%0Aclass @@ -1552,20 +1552,91 @@ est=None +, extra_email_context=None,%0D%0A html_email_template_name=None ):%0D%0A - @@ -1739,32 +1739,76 @@ ....
2b7015459c7e1e215691235ed43024d45b1e41e8
fix registrationview for django-registration-redux 1.2
accounts/views.py
accounts/views.py
from accounts.forms import NumbasRegistrationForm import registration.views from django.conf import settings from django.views.generic import UpdateView, DetailView from django.contrib.auth.models import User from django.shortcuts import redirect from django.core.urlresolvers import reverse from django.contrib i...
Python
0
@@ -843,32 +843,37 @@ er(self,request, +form, *args,**kwargs): @@ -866,32 +866,63 @@ rgs,**kwargs):%0D%0A + d = form.cleaned_data%0D%0A username @@ -941,22 +941,17 @@ sword = -kwargs +d %5B'userna @@ -956,22 +956,17 @@ name'%5D, -kwargs +d %5B'email' @@ -968,22 +968,17 @@ mail'%5D, -kwargs +d...
c16cfd05bd44a13dffb3657cc10ceca8ddebdab2
Add logging to Alexandria. This will be helpful later to debug the application.
alexandria/app.py
alexandria/app.py
# coding=utf-8 from flask import Flask from flask import jsonify from flask import request import sys import pprint import config import models import configuration_item import drivers # Initialise Flask app = Flask(__name__) app.debug = True @app.route("/drivers", methods = ["GET"]) def api_drivers(): """Retu...
Python
0
@@ -110,16 +110,80 @@ pprint%0A +import logging%0Afrom logging.handlers import RotatingFileHandler%0A import c @@ -188,16 +188,16 @@ config%0A - import m @@ -856,16 +856,62 @@ erver()%0A + app.logger.info(%22Stopping Alexandria...%22)%0A retu @@ -1131,24 +1131,64 @@ reate_ci():%0A + pp = pprint.Prett...
c8b03e89eb5e8f29b73d446c222b2c3aedd7c910
Add helper for plotting a skeleton.
analysis/plots.py
analysis/plots.py
import contextlib import lmj.plot import numpy as np @contextlib.contextmanager def plot(show=True): '''Produce a 2D plotting axes, for use in a with statement.''' ax = lmj.plot.axes() yield ax if show: lmj.plot.show() @contextlib.contextmanager def space(show=True): '''Produce a 3D plot...
Python
0
@@ -1378,16 +1378,942 @@ =0.7)%0A%0A%0A +def skeleton(ax, trial, frame):%0A '''Plot a skeleton based on a frame of the given trial.%0A%0A Parameters%0A ----------%0A ax : Axes%0A trial : Movement%0A frame : int or float%0A '''%0A for segment in (%0A # right leg%0A %5B34, 44, 45, 4...
7aaa5da41d802367fe4ed42c623cfc45467f5532
use describe_parameters paginator (#45632)
lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py
lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py
#!/usr/bin/python # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- modul...
Python
0.000003
@@ -5347,38 +5347,187 @@ eter - = client.describe_parameters( +_paginator = client.get_paginator('describe_parameters')%0A describe_existing_parameter = describe_existing_parameter_paginator.paginate(%0A Filt @@ -5574,16 +5574,37 @@ me'%5D%5D%7D%5D) +.build_full_result()%0A...
36d82ba849a5b80605dcab685f28cdd693d20c90
Use correct endpoint name
lib/pegasus/python/Pegasus/service/monitoring/serializer.py
lib/pegasus/python/Pegasus/service/monitoring/serializer.py
# Copyright 2007-2014 University Of Southern California # # 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 ...
Python
0.99999
@@ -4935,25 +4935,16 @@ r('.get_ -workflow_ job', wf
5a23e9d7f412f040c12b1f48d258b83e9eeea5d3
add crude error checking
mysite/skynet/views.py
mysite/skynet/views.py
from skynet.models import Messages from skynet.serializers import SkynetSerializer from rest_framework import generics from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.reverse import reverse from rest_framework import renderers class SkynetList(generics.Li...
Python
0.000001
@@ -283,16 +283,27 @@ enderers +%0Aimport sys %0A%0Aclass @@ -425,45 +425,26 @@ er%0A%0A -# @api_view(('GET',))%0A# def api_root( + def get(self, requ @@ -466,244 +466,74 @@ e):%0A -# +%0A -return Response(%7B%0A# # 'users': reverse('user-list', request=request, format=format),%0A# '...
68dfaecce5d7162201d4851752df185cc2827d7f
Bump version 0.1.1
prometheus/__init__.py
prometheus/__init__.py
__title__ = 'prometheus' __version__ = '0.1' __author__ = 'Xabier Larrakoetxea' __license__ = 'MIT License' __copyright__ = 'Copyright 2015 Xabier Larrakoetxea'
Python
0.000001
@@ -36,16 +36,18 @@ _ = '0.1 +.1 '%0A__auth
440b4a372cd29bd90c24f2bcd97ae353524a2d52
Add support for RF 2.0.2 and ealier back (I thought supporting older versions gets more complicated but it didn't)
proto/remote/Remote.py
proto/remote/Remote.py
import xmlrpclib import socket import time import sys try: from xml.parsers.expat import ExpatError except ImportError: ExpatError = None # Support for Jython 2.2 from robot.errors import RemoteError class Remote: ROBOT_LIBRARY_SCOPE = 'TEST SUITE' def __init__(self, uri='http://localhost:827...
Python
0
@@ -165,18 +165,31 @@ thon 2.2 -%0A%0A +(.x)%0A%0Atry:%0A from rob @@ -217,16 +217,201 @@ teError%0A +except ImportError:%0A # Support for Robot Framework 2.0.2 and earlier%0A def RemoteError(message, traceback):%0A print '*INFO*', traceback%0A raise AssertionError(message)%0A %0A%0Aclass
17abcab1855c4130ed9029691f85ebcac64ffca0
add spaces around operator
etest/lexers/bash.py
etest/lexers/bash.py
# Copyright (C) 2014 by Alex Brandt <alunduil@alunduil.com> # # etest is freely distributable under the terms of an MIT-style license. # See COPYING or http://www.opensource.org/licenses/mit-license.php. import click import logging import os import ply.lex logger = logging.getLogger(__name__) reserved = ( 'CASE'...
Python
0.998843
@@ -3800,16 +3800,17 @@ ineno += + 1%0A%0A
9e7c7d3e71808edd63d0ae907564c35a852bdd16
normalize before mutating
lib/opentuner/streamjit/sjparameters.py
lib/opentuner/streamjit/sjparameters.py
import deps #fix sys.path import random import opentuner from opentuner.search.manipulator import IntegerParameter, FloatParameter, SwitchParameter, PermutationParameter, ArrayParameter class sjIntegerParameter(IntegerParameter): def __init__(self, name, min, max, value, javaClass = None, **kwargs): self.value = va...
Python
0
@@ -4046,24 +4046,49 @@ ro core.%22%22%22%0A +%09%09self.normalize(config)%0A %09%09nonzeroes @@ -4412,16 +4412,41 @@ res.%22%22%22%0A +%09%09self.normalize(config)%0A %09%09nonzer @@ -4478,37 +4478,8 @@ ig)%0A -%09%09assert len(nonzeroes) %3E= 2%0A %09%09vi
91ffef5145bd13f506c5a57e763d625e1ceaefa3
extract anonymous answers from serialized report
evaluation/models.py
evaluation/models.py
from django.db import models from django.conf import settings import gnupg import hashlib from reports.models import RecordFormItem class EvalRow(models.Model): # TODO: delete, view, export? EDIT = "e" CREATE = "c" SUBMIT = "s" VIEW = "v" ACTIONS = ( (EDIT, 'Edit'), (CREATE, '...
Python
0.999931
@@ -82,16 +82,70 @@ hashlib +%0Afrom django.core.exceptions import ObjectDoesNotExist %0A%0Afrom r @@ -179,16 +179,32 @@ FormItem +, MultipleChoice %0A%0Aclass @@ -1167,16 +1167,924 @@ d.data%0A%0A + @staticmethod%0A def extract_answers(answered_questions):%0A eval_location = %7B%7D%0A for se...
f4bed729b60cbabf42737aea2828c90737ac448a
move #PBS
nexus_obj/ascii_txt.py
nexus_obj/ascii_txt.py
import os def dsk_out(fout,kvecs,mdsk,edsk): """ output fluctuating structure factor dS(k) in energy.pl format Args: fout (str): output filename kvecs (list): a list of 3D vectors mdsk (list): mean <dS(k)>, one value per kvector edsk (list): error, one value per kvector Returns: bool: succes...
Python
0.000001
@@ -1509,16 +1509,27 @@ pn=32:xe +%0A#PBS -j oe %0A%0A. /opt @@ -1595,27 +1595,16 @@ ibxml2%0A%0A -#PBS -j oe%0A cd $%7BPBS
f393b9056169ac86276c867c5b548b91f738b890
fix sklearn_api
ngboost/sklearn_api.py
ngboost/sklearn_api.py
import numpy as np from sklearn.base import ClassifierMixin, RegressorMixin from ngboost.ngboost import NGBoost class NGBRegressor(NGBoost, RegressorMixin): """NGBoost for regression with Sklean API.""" pass class NGBClassifier(NGBoost, ClassifierMixin): """NGBoost for classification with Sklean API. ...
Python
0.000002
@@ -106,16 +106,61 @@ NGBoost%0A +from ngboost.distns import Bernoulli, Normal%0A %0A%0Aclass @@ -256,12 +256,117 @@ -pass +def __init__(self, *args, **kwargs):%0A super(NGBRegressor, self).__init__(Dist=Normal, *args, **kwargs) %0A%0A%0Ac @@ -574,23 +574,141 @@ cation.%0A - %22%22%22 +%0A def...
c8f78f21a2855241c7e1eabfae6e837bd8f8c451
Corrige migración
core/migrations/0012_membership_person.py
core/migrations/0012_membership_person.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-19 17:43 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0011_auto_20161219_1826'), ] operations = ...
Python
0.000003
@@ -452,17 +452,54 @@ default= -1 +'3c8ce552-47ba-42cc-be9a-6625117072ab' , on_del
8ef080b81f4785aad8a301ec9544a8226676c61b
fix typo, add phil help string
Handlers/Phil.py
Handlers/Phil.py
#!/usr/bin/env python # Phil.py # Copyright (C) 2012 Diamond Light Source, Graeme Winter # # This code is distributed under the BSD license, a copy of which is # included in the root directory of this package. # # Phil parameter setting - to get a single place where complex parameters to # set for individual prog...
Python
0.001053
@@ -3384,19 +3384,18 @@ n parall -al e +l (using @@ -3490,50 +3490,171 @@ -njob = Auto%0A .type = int(value_min=1) + .help = %22The number of processors to use per job.%22%0A njob = Auto%0A .type = int(value_min=1)%0A .help = %22The number of sweeps to process simultaneously.%22 %0A
b98d76ff397a10eb6257a1803cebcdae1b0a58d9
Fix cannot find board bug
litex_boards/platforms/trenz_tec0117.py
litex_boards/platforms/trenz_tec0117.py
# # This file is part of LiteX-Boards. # # Copyright (c) 2020 Pepijn de Vos <pepijndevos@gmail.com> # Copyright (c) 2021 Florent Kermarrec <florent@enjoy-digital.fr> # SPDX-License-Identifier: BSD-2-Clause from migen import * from litex.build.generic_platform import * from litex.build.gowin.platform import GowinPlatf...
Python
0
@@ -4466,17 +4466,17 @@ (%22little -b +B ee%22)%0A%0A
44e43041430facccd52c1aea7a6bc34fd7c4aa3e
create world + plot (file text) word (UNTESTED)
master/scripts/planner/map_converter.py
master/scripts/planner/map_converter.py
""" Convert the GUI's map into a grid. """ import utm import numpy as np import math import matplotlib as plt from sys import path path.append("..") import settings def latlong_to_index(point): """ Convert a given geographical point (expressed by latitude and longitude values) in a world's index Keyword...
Python
0.000007
@@ -4509,32 +4509,51 @@ el%0A %22%22%22%0A%0A + return %5B%5D%0A%0A def save(sel
82ba37e543ba393910e4196ed3c2cd96251f39f9
Fix asserting about a stage's dependencies being resolved.
libpb/stacks/base.py
libpb/stacks/base.py
""" The stacks.base module. This module contains the basic Stack and Stage classes. """ import abc import time from libpb import event, job, log __all__ = ["Stack", "Stage"] class Stack(object): """The Stack class, each stack is a distinct series of stages.""" def __init__(self, name): self.failed...
Python
0.000001
@@ -1757,32 +1757,36 @@ +not self.port.depend @@ -1814,16 +1814,136 @@ ss__))%0A%0A + log.debug(%22Stage.work()%22, %22Port '%25s': starting stage %25s%22 %25%0A (self.port.origin, self.name))%0A @@ -2384,20 +2384,16 @@ .error(%22 -Make Stage._f @@ -2763,12 +...
f284768b9d844967c1b8d7c06422fb28a3e88176
update the streamup.com plugin
src/livestreamer/plugins/streamupcom.py
src/livestreamer/plugins/streamupcom.py
import re from livestreamer.compat import urljoin from livestreamer.plugin import Plugin from livestreamer.plugin.api import http, validate from livestreamer.stream import RTMPStream RTMP_URL = "rtmp://{0}/app/{1}" CHANNEL_DETAILS_URI = "https://api.streamup.com/v1/channels/{0}?access_token={1}" REDIRECT_SERVICE_URI ...
Python
0
@@ -180,193 +180,19 @@ ream -%0A%0ARTMP_URL = %22rtmp://%7B0%7D/app/%7B1%7D%22%0ACHANNEL_DETAILS_URI = %22https://api.streamup.com/v1/channels/%7B0%7D?access_token=%7B1%7D%22%0AREDIRECT_SERVICE_URI = %22https://lancer.streamup.com/api/redirect/%7B0%7D%22 +, HLSStream %0A%0A_u @@ -266,25 +266,28 @@ ?%5D+)%22)%0A_ -fl...
7feb26a6478e3a96da57f2825821285c17651545
Add a missing newline
src/ocspdash/web/blueprints/__init__.py
src/ocspdash/web/blueprints/__init__.py
# -*- coding: utf-8 -*- from .api import api from .ui import ui __all__ = [ 'api', 'ui' ]
Python
0.999995
@@ -92,8 +92,9 @@ 'ui'%0A%5D +%0A