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
9c7acc7e0c4973a85b4e703d2e05312d4d727cd6
Reorder __all__
pyservice/__init__.py
pyservice/__init__.py
from pyservice.client import Client from pyservice.service import Service __all__ = ["Client", "Service"]
Python
0.000349
@@ -29,16 +29,92 @@ Client%0A +from pyservice.layer import Layer%0Afrom pyservice.operation import Operation%0A from pys @@ -164,16 +164,38 @@ Client%22, + %22Layer%22, %22Operation%22, %22Servic
3a8065d711c226fba8075dca5bacd6de7440b8a6
Fix internal python function YilmIndexVector that was missing a required input attribute
pyshtools/__init__.py
pyshtools/__init__.py
""" pyshtools ========= pyshtools is an archive of scientific routines that can be used to perform spherical harmonic transforms and reconstructions, rotations of data expressed in spherical harmonics, and multitaper spectral analyses on the sphere. This module makes use of Python-wrapped Fortran 95 routines. For f...
Python
0.00013
@@ -1018,16 +1018,18 @@ xVector( +i, l,m):%0A
26b14aa13f28859585080115f66bb7a995b37d59
change error output
test.py
test.py
import os import json from HPACK import decode TESTCASE = [ 'hpack-test-case/haskell-http2-naive/', # 'hpack-test-case/haskell-http2-naive-huffman/', # 'hpack-test-case/haskell-http2-static/', # 'hpack-test-case/haskell-http2-static-huffman/', # 'hpack-test-case/haskell-http2-linear/', # 'hpack-tes...
Python
0.000014
@@ -895,21 +895,21 @@ -i f +or header -s != + in dat @@ -938,16 +938,171 @@ ders'%5D:%0A + if header not in headers:%0A print header%0A print headers%5Bheader.keys()%5B0%5D%5D%0A @@ -1168,16 +1168,20 @@ seqno))%0A + ...
f207c786a04fe7a9f6bb6526250dcb7684eb03f4
support coarse_solver=None
pyamg/multilevel.py
pyamg/multilevel.py
"""Generic AMG solver""" __docformat__ = "restructuredtext en" import scipy import numpy from numpy import ones, zeros, zeros_like, array, asarray, empty, asanyarray, ravel from scipy.sparse import csc_matrix from scipy.sparse.linalg import spsolve, splu #from pyamg import relaxation from pyamg.relaxation import * f...
Python
0.00518
@@ -5738,25 +5738,119 @@ -12)%5B0%5D%0A - +%0A elif solver is None: %0A # Identity%0A def solve(self,A,b):%0A return b %0A els
7aa281b56fa6fb4fc4c0625a13f303a085334d36
Build a set of categories to avoid duplication
pytest_exceptional.py
pytest_exceptional.py
# -*- coding: utf-8 -*- import pytest from _pytest._code.code import TerminalRepr class PytestException(Exception): pass class ExceptionRepr(TerminalRepr): def __init__(self, excinfo, longrepr): self.excinfo = excinfo self.longrepr = longrepr def toterminal(self, tw): try: ...
Python
0.999999
@@ -1389,24 +1389,78 @@ lreporter):%0A + categories = %7Bcls.__teststatus__%5B0%5D%0A for cls @@ -1498,48 +1498,37 @@ __() -:%0A +%7D%0A%0A +for cat -, _, _ = cls.__teststatus__ + in categories: %0A
53e0a7b7ac81fab6527796e2fa33a456d0650863
Reduce maximum false positive rate to 5%.
test.py
test.py
import unittest from sqlalchemy.orm import sessionmaker from sqlalchemy import create_engine from sklearn import cross_validation import model import main class TestClassifier(unittest.TestCase): def test_classifications(self): false_positives = 0 false_negatives = 0 correct = 0 wr...
Python
0.999222
@@ -1948,17 +1948,18 @@ es) %3E 0. -1 +05 :%0A
aab9734ad3b08015f9d2ecb203a4d03026e7fd08
Fix for multiple robots
pybotvac/account.py
pybotvac/account.py
"""Account access and data handling for beehive endpoint.""" import binascii import os import shutil import requests try: from urllib.parse import urljoin except ImportError: from urlparse import urljoin from .robot import Robot class Account: """ Class with data and methods for interacting with a ...
Python
0.000003
@@ -2848,19 +2848,27 @@ lf._maps +.update = +( %7Brobot%5B' @@ -2890,16 +2890,17 @@ .json()%7D +) %0A%0A @s
80ab1b72022893fc4d4a1ee1234814c6a060e3a6
add function to check if traffic is exceeded
pycroft/lib/user.py
pycroft/lib/user.py
# -*- coding: utf-8 -*- # Copyright (c) 2012 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. """ pycroft.lib.user ~~~~~~~~~~~~~~ This module contains. :copyright: (c) 2012 by AG D...
Python
0.000001
@@ -393,16 +393,59 @@ nt_user%0A +from sqlalchemy.sql.expression import func%0A from pyc @@ -489,16 +489,67 @@ _helper%0A +from pycroft.model.accounting import TrafficVolume%0A from pyc @@ -658,16 +658,16 @@ ice, Ip%0A - from pyc @@ -705,16 +705,66 @@ ogEntry%0A +from pycroft.model.properties import TrafficGroup...
47d1ad8ed082c43f1ff3bd157db077d1e494186a
Add to_json method for departures
bvggrabber/api/__init__.py
bvggrabber/api/__init__.py
# -*- coding: utf-8 -*- from datetime import datetime from dateutil.parser import parse fullformat = lambda dt: dt.strftime('%Y-%m-%d %H:%M') hourformat = lambda dt: dt.strftime('%H:%M') class QueryApi(): def __init__(self): pass def call(self): raise NotImplementedError("The inheriting cl...
Python
0.000001
@@ -17,16 +17,29 @@ f-8 -*-%0A +import json%0A%0A from dat @@ -212,16 +212,22 @@ ueryApi( +object ):%0A%0A @@ -431,16 +431,22 @@ parture( +object ):%0A%0A @@ -539,16 +539,41 @@ d = end%0A + self.line = line%0A @@ -1120,33 +1120,8 @@ g!%22) -%0A self.line = line %0A%0A @@ -1404...
62a56739a1b16e867f4cd8ac2fd0a966fa99a023
fix a bug
test.py
test.py
from text2index import VOC_DICT_FILE from preprocess.data import QAs from train import CCA_FILE from preprocess.feats import FEATURE_OPTS, data2feats from collections import defaultdict from CCA import find_answer import argparse import pickle as pkl import logging import numpy as np logging.basicConfig(format='%(asc...
Python
0.000016
@@ -2109,100 +2109,8 @@ q_v) -%0A # initial with a negative index%0A q_a_map_correct%5Bquestion_indx%5D = -1 %0A%0A @@ -2950,16 +2950,20 @@ if +len( q_a_map_ @@ -2988,14 +2988,14 @@ ndx%5D +) == --1 +0 :%0A
9ab98969dd3f87f1183ec6dd8e911dc192fa86c4
Fix bug where TensorBoard may crash if it cannot resolve host ip address
tensorboard.py
tensorboard.py
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -5378,16 +5378,83 @@ 0.0.0%22:%0A + try:%0A host = socket.gethostbyname(socket.gethostname())%0A prin @@ -5552,16 +5552,55 @@ .port))%0A + except socket.gaierror:%0A pass%0A else:%0A
3f24d82c43cfeda05fd969f442dfb024313ea34d
add encoding
reahl-component/reahl/component_dev/test_dbutils.py
reahl-component/reahl/component_dev/test_dbutils.py
# Copyright 2016, 2017, 2018 Reahl Software Services (Pty) Ltd. All rights reserved. # # This file is part of Reahl. # # Reahl 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; version 3 of th...
Python
0.024575
@@ -78,16 +78,41 @@ served.%0A +#-*- encoding: utf-8 -*-%0A #%0A# T
0f70a86e5ba665af43dc5066948e0a4a5c2f6b4e
add a --single option
test.py
test.py
#!/usr/bin/env python3 from __future__ import print_function import argparse import datetime import os import sys import nose import pyro import multigrid.mg_test as mg_test import multigrid.mg_test_vc_dirichlet as mg_test_vc_dirichlet import multigrid.mg_test_vc_periodic as mg_test_vc_periodic import multigrid.mg_...
Python
0.000089
@@ -577,16 +577,97 @@ ptions%0A%0A + def __str__(self):%0A return %22%7B%7D-%7B%7D%22.format(self.solver, self.problem)%0A%0A %0Adef do_ @@ -723,16 +723,30 @@ n=True, +%0A reset_fa @@ -754,16 +754,29 @@ ls=False +, single=None ):%0A%0A @@ -1674,24 +1674,169 @@ e%22, opts))%0A%0A + ...
724c1b71d5ca299dd23ff51d5f568c08a77f2cf5
Update _version.py
tibanna/_version.py
tibanna/_version.py
"""Version information.""" # The following line *must* be the last in the module, exactly as formatted: __version__ = "0.10.0"
Python
0.000002
@@ -118,11 +118,11 @@ = %220.10. -0 +1 %22%0A
1e6da6444c22fdc6465511f7df12d0f8367a8380
Correct number of pieces, also when len(message) divides size
graypy/handler.py
graypy/handler.py
import logging import json import zlib import traceback import struct import random import socket from logging.handlers import DatagramHandler WAN_CHUNK, LAN_CHUNK = 1420, 8154 class GELFHandler(DatagramHandler): """Graylog Extended Log Format handler :param host: The host of the graylog server. :param...
Python
0.00002
@@ -91,16 +91,28 @@ socket%0A +import math%0A from log @@ -1652,16 +1652,29 @@ ck('B', +int(math.ceil (len(mes @@ -1683,19 +1683,20 @@ ge) +* 1.0 / - size) - + 1 +) )%0A
9092e4d5d41efd347b24efb54403d65451759d3d
make sure the example works under all supported python's vms
examples/test_threaded.py
examples/test_threaded.py
# -*- coding: utf-8 - # # This file is part of socketpool. # See the NOTICE for more information. import socket import threading try: from queue import * except ImportError: from Queue import * try: import SocketServer as socketserver except ImportError: import socketserver import time from socketp...
Python
0
@@ -106,16 +106,27 @@ socket%0A +import sys%0A import t @@ -397,16 +397,167 @@ nector%0A%0A +PY3 = sys.version_info%5B0%5D == 3%0A%0Aif sys.version_info%5B0%5D == 3:%0A def s2b(s):%0A return s.encode('latin1')%0Aelse:%0A def s2b(s):%0A return s%0A%0A class Ec @@ -2083,13 +2083,11 @@ put( -byte...
c4d354c271e405a48fab9cdaeb41b2d5bc177be0
Add changes from Mikhail Terekhov <terekhov@emc.com>.
src/interfaces/python/setup.py
src/interfaces/python/setup.py
#!/usr/bin/env python # Setup script for the PyGreSQL version 3 # created 2000/04 Mark Alexander <mwa@gate.net> # tweaked 2000/05 Jeremy Hylton <jeremy@cnri.reston.va.us> # win32 support 2001/01 Gerhard Haering <gerhard@bigfoot.de> # requires distutils; standard in Python 1.6, otherwise download from # http://www.pyt...
Python
0
@@ -753,16 +753,58 @@ t setup%0A +from distutils.extension import Extension%0A import s @@ -1486,20 +1486,17 @@ reSQL%22,%0A - +%09 version @@ -1504,20 +1504,17 @@ %223.1%22,%0A - +%09 descript @@ -1551,20 +1551,17 @@ faces%22,%0A - +%09 author = @@ -1582,20 +1582,17 @@ Cain%22,%0A - +%09 a...
cea2a30d3f08af18efa318c1e0f7faedcf2d477a
update default metadata
isolates/template.py
isolates/template.py
metadata = { "sample_name": "", "group_name": "", "file_names": "", "sequencing_platform": "", "sequencing_type": "", "pre_assembled": "", "sample_type": "", "organism": "", "strain": "", "subtype": {}, "country": "", "region": "", "city": "", "zip_code": "", ...
Python
0.000001
@@ -683,33 +683,8 @@ : %5B%0A - %22pre_assembled%22,%0A @@ -741,55 +741,8 @@ e%22,%0A - %22country%22,%0A %22isolation_source%22,%0A @@ -815,16 +815,85 @@ : %22no%22,%0A + %22country%22: %22unknown%22,%0A %22isolation_source%22: %22unknown%22,%0A @@ -1013,36 +...
67665cd632abaad56f4d0c0ef65f51040f85b35a
Fix vector dimensions analysis
devito/dle/backends/common.py
devito/dle/backends/common.py
# Types used by all DLE backends import abc from collections import OrderedDict, defaultdict from time import time from devito.dse import as_symbol, terminals from devito.logger import dle from devito.nodes import Iteration, SEQUENTIAL, PARALLEL, VECTOR from devito.tools import as_tuple from devito.visitors import Fi...
Python
0
@@ -324,16 +324,36 @@ ections, + IsPerfectIteration, NestedT @@ -6016,24 +6016,66 @@ if +IsPerfectIteration().visit(tree%5B-1%5D) and ( is_FP or is_ @@ -6087,16 +6087,17 @@ or is_US +) :%0A
9a5284d6aae3084b743c4392ba5322ec01af7484
update Calderdale import script for latest data (closes #964)
polling_stations/apps/data_collection/management/commands/import_calderdale.py
polling_stations/apps/data_collection/management/commands/import_calderdale.py
from django.contrib.gis.geos import Point from django.db import connection from pollingstations.models import PollingDistrict from data_collection.management.commands import BaseShpStationsShpDistrictsImporter from data_finder.helpers import geocode_point_only, PostcodeError class Command(BaseShpStationsShpDistrictsI...
Python
0
@@ -402,35 +402,35 @@ -08/Version -1/p +2/P olling -_d + D istricts.shp @@ -483,17 +483,17 @@ ion -1 +2 /polling _dis @@ -488,25 +488,24 @@ /polling -_district +-station s.shp'%0A @@ -559,44 +559,31 @@ def -district_record_to_dict +parse_string (self, -record +text ):%0A @@ -593,240 +593,123 @@ -...
fa28e2c26181fd82a47162e5cb8004c97f2b42dc
increment version
grizli/version.py
grizli/version.py
# git describe --tags __version__ = "0.4.0-3-g057a694"
Python
0.000004
@@ -40,16 +40,16 @@ 4.0- -3-g057a694 +8-g2808abe %22%0A
7f7d601b6cce70169d6110e7c8670659582193da
remove unused import
calebasse/agenda/models.py
calebasse/agenda/models.py
# -*- coding: utf-8 -*- from datetime import datetime from dateutil import rrule from django.utils.translation import ugettext_lazy as _ from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.db import models from calebasse.agenda import managers from ...
Python
0.000001
@@ -311,75 +311,8 @@ gers -%0Afrom calebasse.ressources.models import ServiceLinkedAbstractModel %0A%0A__
ab89e3c9d060af2a4746a93efd8641de431c71ae
change email counts in tests
callisto_core/tests/reporting/test_matching.py
callisto_core/tests/reporting/test_matching.py
import json from callisto_core.tests.utils.api import CustomNotificationApi from callisto_core.utils.api import MatchingApi from mock import call, patch from django.contrib.auth import get_user_model from django.core.management import call_command from django.test import TestCase, override_settings from django.utils ...
Python
0.000001
@@ -4535,32 +4535,88 @@ user1, 'test1')%0A + self.assertEqual(api_logging.call_count, 0)%0A self @@ -5018,62 +5018,9 @@ # -1 email%0A # 3 emails (+1 user, +1 authority) +0 %0A @@ -5058,32 +5058,44 @@ .user2, 'test1') + # 3 emails %0A sel @@ -5137,9 +5137,9 @@ ...
fee766f9dd6edfbb24e300063c3133f01b71af97
Update fetcher
fetcher.py
fetcher.py
#!/usr/bin/python3 import requests import json from sqlalchemy import create_engine, ForeignKey from sqlalchemy import Column, Date, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import IntegrityError #Globals engine = create_engine...
Python
0
@@ -721,16 +721,219 @@ price)%0A%0A +def build_list():%0A game_list = dict()%0A URL = %22http://api.steampowered.com/ISteamApps/GetAppList/v2%22%0A response = requests.get(URL)%0A game_list = json.loads(response.text)%0A return game_list%0A%0A def fetc @@ -1643,16 +1643,73 @@ me_obj)%0A + else:...
12ec60b1974db666153f038c6bb55ce11fc101de
Update __init__.py
build/lib/selfies/__init__.py
build/lib/selfies/__init__.py
#!/usr/bin/env python __author__ = 'Mario Krenn' __version__ = 'v0.1.2' from .selfies_fcts import encoder, decoder
Python
0.000072
@@ -67,11 +67,11 @@ 'v0. -1.2 +2.0 '%0A%0Af
64ca8c9c3151a8ed53eec1636e2486670ee95aa6
Change blacklist session.merge to add
fetcher.py
fetcher.py
#!/usr/bin/python3 ''' Description: Fetches a list of all the Steam ID's and checks the current pricing of each game ''' import time import requests import json import datetime from sqlalchemy import create_engine, ForeignKey from sqlalchemy import Column, Date, DateTime, Integer, String from sqlalchemy.ext.declarativ...
Python
0
@@ -4386,13 +4386,11 @@ ion. -merge +add (bla
d9365f726b5972ca39bac56efb48a452521811be
add more info to dbinfo
dbinfo.py
dbinfo.py
import numpy as np import os package_dir, package_filename = os.path.split(__file__) isotropic1024coarse = {'name' : 'isotropic1024coarse'} for coord in ['x', 'y', 'z']: isotropic1024coarse[coord + 'nodes'] = (np.pi/512)*np.array(range(1024), dtype = np.float32) isotropic1024coarse['n' + coord] = 1024 ...
Python
0
@@ -1001,16 +1001,64 @@ 6 / 1024 +%0Amhd1024%5B'nu'%5D = 1.1e-4%0Amhd1024%5B'eta'%5D = 1.1e-4 %0A%0Achanne
169644696d699b1e85abe4cc1dd6c676c037f62f
version bump
pygmsh/__about__.py
pygmsh/__about__.py
__version__ = "6.0.3" __author__ = "Nico Schlömer" __author_email__ = "nico.schloemer@gmail.com" __copyright__ = f"Copyright (c) 2013-2020, {__author__} <{__author_email__}>" __website__ = "https://github.com/nschloe/pygmsh" __license__ = "License :: OSI Approved :: MIT License" __status__ = "Development Status :: 5 - ...
Python
0.000001
@@ -12,17 +12,17 @@ = %226.0. -3 +4 %22%0A__auth
e5c9ae46318887de9a82c6da904e1b388f272c3e
add the `use_backend/default_backend` getting method missed before
pyhaproxy/config.py
pyhaproxy/config.py
#!/usr/bin/env python # -*- coding: utf-8 -*- class Configuration(object): """Represents a whole haproxy config file Attributes: pegtree (TreeNode): the original parsing pegtree """ def __init__(self, pegtree): self.pegtree = pegtree self.defaults = [] self.backends = ...
Python
0
@@ -2245,16 +2245,92 @@ group%0A%0A + def usebackends(self):%0A return self.config_block%5B'usebackends'%5D%0A%0A %0Aclass G
1286fae9e2f514f5ebb13333233fe798bfe384ef
add error to connectiongone error
opennsa/error.py
opennsa/error.py
""" Various errors (exceptions) for OpenNSA. Author: Henrik Thostrup Jensen <htj@nordu.net> Copyright: NORDUnet (2011-2012) """ # NSI Error codes: # # PAYLOAD_ERROR 00100 # MISSING_PARAMETER 00101 # UNSUPPORTED_PARAMETER 00102 # NOT_IMPLEMENTED 00103 # VERSION_NOT_SUPPORTED...
Python
0
@@ -1851,16 +1851,21 @@ tionGone +Error (Connect @@ -2791,16 +2791,21 @@ tionGone +Error ,%0A '0
9add22fa229155ebff4884b93c0645c32d6223ba
Update resourcegroup.py
azurecloudify/resourcegroup.py
azurecloudify/resourcegroup.py
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
Python
0.000001
@@ -4560,28 +4560,24 @@ %0A%0Adef _get_ -all_ resource_gro @@ -4578,17 +4578,21 @@ ce_group -s +_name (resourc
4fd584646a9f9cfaba91d63231a0d867c40fb8b2
Bump version
nullsmtp/nullsmtp.py
nullsmtp/nullsmtp.py
#!/usr/bin/env python3 """ NullSMTP module that allows to run a mock email server that just logs all incoming emails to a file instead of actually trying to send them. Helps for developing applications that utilize email, without spamming customers' emails and not having overhead from some GUI program. """ import argpa...
Python
0
@@ -484,17 +484,17 @@ = '0.3. -0 +1 '%0A__lice
fda70bfff7ec9d25f7c08c92d570dfc52754734c
Fix typo in description scting.
applyCrfPjSparkTest.py
applyCrfPjSparkTest.py
#!/usr/bin/env python """This program will use Apache Spark to read a keyed JSON Lines file (such as adjudicated_modeled_live_eyehair_100.kjsonl), convert it to a pair RDD, process it with CRF++, and print detected attributes as pair RDD keyed JSON files, formatted to Karma's liking. The keys in the input file will be...
Python
0.000102
@@ -631,17 +631,16 @@ ptionall -l y give d
f6d584e7d5f7b8e778bbbd30a4025fd51c32fff0
add ordering to Appointment model
appointments/models.py
appointments/models.py
from __future__ import unicode_literals import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ try: from django.utils.timezone import now except ImportError: # Django < 1.4 now = datetime.datetime.now class Timeline(models.Model): "A series of milestones wh...
Python
0
@@ -2624,24 +2624,70 @@ oformat())%0A%0A + class Meta:%0A ordering = %5B'-date'%5D%0A%0A %0Aclass Notif
691093e38598959f98b319f7c57852496a26ba90
Fix project name in urlconf
apps/careers/models.py
apps/careers/models.py
import watson from cms.apps.pages.models import ContentBase from cms.models import HtmlField, SearchMetaBase from django.db import models class Careers(ContentBase): # The heading that the admin places this content under. classifier = "apps" # The urlconf used to power this content's views. urlconf ...
Python
0.000021
@@ -320,16 +320,26 @@ = %22 -phixflow +%7B%7B project_name %7D%7D .app
56efc8fe371f9bbd7a39740908f5ca7a97010ad9
insert query modification
tof_server/views.py
tof_server/views.py
"""This module provides views for application.""" from tof_server import app, versioning, mysql from flask import jsonify, make_response import string, random @app.route('/') def index(): """Server information""" return jsonify({ 'server-version' : versioning.SERVER_VERSION, 'client-versions' :...
Python
0.000001
@@ -777,12 +777,10 @@ ES ( -' %25s -' )%22%0A
28768a5826d83bd9cccb56d0d31dc1e83b671f65
Add command to output.
pykeg/core/tests.py
pykeg/core/tests.py
# Copyright 2014 Bevbot LLC, All Rights Reserved # # This file is part of the Pykeg package of the Kegbot project. # For more information on Pykeg or Kegbot, see http://kegbot.org/ # # Pykeg is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # ...
Python
0.000002
@@ -1377,16 +1377,64 @@ r as e:%0A + print 'command: %7B%7D'.format(command)%0A
9c40827c8c973e41253c681a62236d64d8190f38
version 1.2.0
ceph_installer/__init__.py
ceph_installer/__init__.py
__version__ = '1.1.0'
Python
0.000001
@@ -12,13 +12,13 @@ __ = '1. -1 +2 .0'%0A
71bac0bf51a75094e2f8e4edaa94a4840e0a3572
Include Chapter class in __init__.py (#304)
pylatex/__init__.py
pylatex/__init__.py
""" A library for creating Latex files. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from .basic import HugeText, NewPage, LineBreak, NewLine, HFill, LargeText, \ MediumText, SmallText, FootnoteText, TextColor from .document import Document from .frames import Md...
Python
0
@@ -427,16 +427,25 @@ n import + Chapter, Section
fd5f7781ceb696ab90ddd733424695361fb02233
Fix typo, 'unitest.main()' -> 'unittest.main()'.
test/events.py
test/events.py
import unittest from rdflib import events class AddedEvent(events.Event): pass class RemovedEvent(events.Event): pass def subscribe_to(source, target): target.subscribe(AddedEvent, source._add_handler) target.subscribe(RemovedEvent, source._remove_handler) def subscribe_all(caches): for cache in caches...
Python
0.999999
@@ -1544,16 +1544,17 @@ unit +t est.main
718efabd2af075fa30cc84000e4d4594418cf42d
Tweak genini.
test/genini.py
test/genini.py
#!/usr/bin/env python # Copyright (c) 2005 The Regents of The University of Michigan # 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 copyrigh...
Python
0
@@ -1599,30 +1599,116 @@ sys%0A -%0Asys.path.append( +from os.path import join as joinpath, realpath%0A%0Amypath = sys.path%5B0%5D%0Asys.path.append(joinpath(mypath, '..') +) %0Asys @@ -1716,24 +1716,41 @@ path.append( +joinpath(mypath, '../configs/ @@ -1757,16 +1757,17 @@ kernel') +) %0Asys.pat @@ -1775,16 +1...
46bdf7225012c33835b41a721eece41d7256ec86
Fix removed django.conf.urls.defaults import.
questionnaire/urls.py
questionnaire/urls.py
# vim: set fileencoding=utf-8 from django.conf.urls.defaults import * from views import * urlpatterns = patterns('', url(r'^$', questionnaire, name='questionnaire_noargs'), url(r'^csv/(?P<qid>\d+)/$', export_csv, name='export_csv'), url(r'^(?P<runcode>[^/]+)/progress/$', ...
Python
0
@@ -49,17 +49,8 @@ urls -.defaults imp
cdb5023d841158f7040ee263a2eb85f11b5c5836
fix brokens tests for mds
tests/functional/tests/mds/test_mds.py
tests/functional/tests/mds/test_mds.py
import pytest import json class TestMDSs(object): @pytest.mark.no_docker def test_mds_is_installed(self, node, host): assert host.package("ceph-mds").is_installed def test_mds_service_is_running(self, node, host): service_name = "ceph-mds@{hostname}".format( hostname=node["var...
Python
0
@@ -1227,75 +1227,8 @@ e%22%5D%0A - hostname = node%5B%22groups%22%5D%5B%22mons%22%5D%5B0%5D%5B%22inventory_hostname%22%5D%0A
d139aba5ef1ddbb87bf28171e3322c41819f2b06
Bump version 0.3.7
pymesos/__init__.py
pymesos/__init__.py
from .interface import Scheduler, Executor, OperatorMaster from .scheduler import MesosSchedulerDriver from .executor import MesosExecutorDriver from .operator_v1 import MesosOperatorMasterDriver, MesosOperatorAgentDriver from .utils import encode_data, decode_data __VERSION__ = '0.3.6' __all__ = ( 'Scheduler', ...
Python
0.000001
@@ -283,9 +283,9 @@ 0.3. -6 +7 '%0A%0A_
2d633ee1bd9c2b2234db51a0cbb23bcffce3079b
Allow analyze_db tool to read Datums without shape
tools/analyze_db.py
tools/analyze_db.py
#!/usr/bin/env python2 # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. import argparse from collections import Counter import logging import operator import os.path import sys import time import lmdb # Add path for DIGITS package sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath...
Python
0
@@ -208,19 +208,172 @@ me%0A%0A -import lmdb +# Find the best implementation available%0Atry:%0A from cStringIO import StringIO%0Aexcept ImportError:%0A from StringIO import StringIO%0A%0Aimport lmdb%0Aimport PIL.Image %0A%0A# @@ -2931,72 +2931,1049 @@ -shape = '%25sx%25sx%25s' %25 (datum.width, datum.he...
2d3d8bfb2b697e5746b5668127939669471b5933
update circular-dependencies script
contrib/devtools/circular-dependencies.py
contrib/devtools/circular-dependencies.py
#!/usr/bin/env python3 import sys import re MAPPING = { 'core_read.cpp': 'core_io.cpp', 'core_write.cpp': 'core_io.cpp', } # Directories with header-based modules, where the assumption that .cpp files # define functions and variables declared in corresponding .h files is # incorrect. HEADER_MODULE_PATHS = [ ...
Python
0
@@ -20,29 +20,255 @@ on3%0A -%0Aimport sys%0Aimport re +# Copyright (c) 2018-2020 The Bitcoin Core developers%0A# Distributed under the MIT software license, see the accompanying%0A# file COPYING or http://www.opensource.org/licenses/mit-license.php.%0A%0Aimport sys%0Aimport re%0Afrom typing import Dict, List, Set %0...
4a1351c546967701327adc17a704ccedfb15abdd
Update version to 1.3-20 (#5615)
var/spack/repos/builtin/packages/r-boot/package.py
var/spack/repos/builtin/packages/r-boot/package.py
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0
@@ -1610,16 +1610,98 @@ tar.gz%22%0A + list_url = homepage%0A%0A version('1.3-20', 'bb879fb4204a4f94ab82c98dd1ad5eca') %0A ver
859b9972d37e742d2d6187c694f2e757fbd00897
Update version to 2.1.14 (#5856)
var/spack/repos/builtin/packages/r-yaml/package.py
var/spack/repos/builtin/packages/r-yaml/package.py
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0
@@ -1562,16 +1562,75 @@ homepage +%0A%0A version('2.1.14', '2de63248e6a122c368f8e4537426e35c') %0A ver
bb7e9380504d62abb293753e6f67d489766d001f
Use new Model _meta API (Fix #370)
guardian/utils.py
guardian/utils.py
""" django-guardian helper functions. Functions defined within this module should be considered as django-guardian's internal functionality. They are **not** guaranteed to be stable - which means they actual input parameters/output type may change in future releases. """ from __future__ import unicode_literals import ...
Python
0
@@ -5189,23 +5189,193 @@ bj)%0A +%0A -for attr in +if django.VERSION %3E= (1, 8):%0A fields = (f for f in obj._meta.get_fields()%0A if (f.one_to_many or f.one_to_one) and f.auto_created)%0A else:%0A fields = obj @@ -5406,16 +5406,40 @@ bjects() +%0A%0A for attr in fields ...
ef2865af43a26f09e81eec0935fd232c92328e56
remove n-sch from the watch list
tools/check_logs.py
tools/check_logs.py
#!/usr/bin/env python # Copyright 2013 Red Hat, Inc. # 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 # ...
Python
0.000001
@@ -1274,21 +1274,8 @@ t',%0A - 'n-sch',%0A
cafda2ccd8933d3e4b7a5605c95a2328d296b610
Bump version
guild/__init__.py
guild/__init__.py
# Copyright 2017 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 writing, ...
Python
0
@@ -694,17 +694,17 @@ .3.0.dev -2 +4 %22%0A%0A__req
af2dea3bb8ad7e272d2363f802b2f23f7023028a
Make a pref test more robust.
chrome/test/functional/prefs.py
chrome/test/functional/prefs.py
#!/usr/bin/python # Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import shutil import sys import pyauto_functional # Must be imported before pyauto import pyauto class Pre...
Python
0.000694
@@ -4262,16 +4262,36 @@ w_dl_dir +, ignore_errors=True ) # cle
30a4ea3b4a8f74abbf6ce2f75f84a68d3cf60482
add validate command
pyprika/commands.py
pyprika/commands.py
from .kit import registry from .pprint import pprint_recipe from abc import ABCMeta, abstractmethod, abstractproperty from argparse import ArgumentParser import os import sys import re def _suggest(matches, cutoff=5, conjunct=' or ', sep=', ', ellipsis='...'): assert len(matches) > 1 suggestions = matches[:cutoff]...
Python
0.000015
@@ -53,16 +53,69 @@ _recipe%0A +from .exceptions import LoadError%0Afrom . import load%0A from abc @@ -2248,16 +2248,583 @@ show')%0A%0A +class Validate(Command):%0A name = 'validate'%0A help = 'validate an input recipe'%0A%0A def execute(self, ns):%0A exit_code = 0%0A for f in ns.filenames:%0A try:%0A...
d7b618c11e3866b1980bf013c50ae8abdea13e5c
update time set_timer method
time.py
time.py
#Pyjsdl - Copyright (C) 2013 James Garnon <http://gatc.ca/> #Released under the MIT License <http://opensource.org/licenses/MIT> from pyjsdl import env from pyjsdl.pyjsobj import performanceNowInit try: from __pyjamas__ import JS except ImportError: pass __docformat__ = 'restructuredtext' class Clock(object...
Python
0.000001
@@ -3300,24 +3300,36 @@ ventid, time +, once=False ):%0A %22 @@ -3449,18 +3449,97 @@ -Disable by +Optional argument once set no timer repeat, defaults to False.%0A Disable timer with tim @@ -3545,16 +3545,17 @@ me of 0. + %0A @@ -3660,32 +3660,58 @@ tTimer(eventid)%0A + repeat ...
9cd217e0e39fb53ca002b18904921351dd52e234
Fix GetOverlappedResult WriteFile tests per MSDN docs
tests/test_kernel32/test_overlapped.py
tests/test_kernel32/test_overlapped.py
import os import shutil import tempfile from six import text_type from pywincffi.dev.testutil import TestCase from pywincffi.core import dist from pywincffi.kernel32 import ( CreateFile, WriteFile, CloseHandle, CreateEvent, GetOverlappedResult) from pywincffi.wintypes import OVERLAPPED class TestOverlappedWri...
Python
0
@@ -1471,24 +1471,25 @@ PENDING%0A +%0A num_byte @@ -1484,124 +1484,605 @@ -num_bytes_written = WriteFile(handle, file_contents, lpOverlapped=ovr)%0A self.assertEqual(num_bytes_written, 0 +# HOWEVER, https://msdn.microsoft.com/en-us/library/aa365683 states:%0A # %22Further, the WriteFile...
49d4031fb6ac08060b0d427bd8ac3345422c7b13
Update license year
tests/thrift/test_multiple_services.py
tests/thrift/test_multiple_services.py
# Copyright (c) 2015 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
Python
0.000001
@@ -16,9 +16,9 @@ 201 -5 +6 Ube
1a44c03aa82541f38ca91e92f6f568c26a86fc56
use wait_for_contact_in_publish()
tests/twisted/avahi/test-muc-invite.py
tests/twisted/avahi/test-muc-invite.py
""" Test receiving and sending muc invitations """ import avahi import dbus from saluttest import exec_test from avahitest import AvahiAnnouncer, AvahiListener from avahitest import get_host_name from xmppstream import setup_stream_listener, connect_to_stream from servicetest import (make_channel_proxy, assertEquals...
Python
0
@@ -103,16 +103,79 @@ ec_test%0A +from saluttest import (exec_test, wait_for_contact_in_publish)%0A from ava @@ -218,16 +218,16 @@ istener%0A - from ava @@ -774,28 +774,8 @@ = 2 -%0AHT_CONTACT_LIST = 3 %0A%0ANS @@ -1294,24 +1294,16 @@ t)%0A%0A -publish_ handle = @@ -1307,518 +1307,63 @@ e = -conn.Request...
a5ff46da6c0d5941a979566c5d0f97cd5f375c99
Add key type selection
tools/wmsTxtView.py
tools/wmsTxtView.py
#!/bin/env python # # Description: # This tool displays the status of the glideinWMS pool # in a text format # # Arguments: # [-pool collector_node] Entries|Sites|Gatekeepers # # Author: # Igor Sfiligoi (May 9th 2007) # import string import sys sys.path.append("../factory") sys.path.append("../frontend") sys.p...
Python
0.000001
@@ -468,20 +468,25 @@ xt_type= -None +'Entries' %0A%0A# pars @@ -1027,19 +1027,295 @@ -key=glidein +if txt_type=='Entries':%0A key=glidein%0A elif txt_type=='Sites':%0A key=glidein_el%5B'attrs'%5D%5B'GLIDEIN_Site'%5D%0A elif txt_type=='Gatekeeper':%0A key=glidein_el%5B'attrs'%5D%5B'GL...
3566bb6f5f7a2fb48c485fbad7b9961aa061acba
Update wp2pelican script to extract date and author taken from wordpress xml file.
tools/wp2pelican.py
tools/wp2pelican.py
#! /usr/bin/env python from BeautifulSoup import BeautifulStoneSoup from codecs import open import os import argparse def wp2html(xml): xmlfile = open(xml, encoding='utf-8').read() soup = BeautifulStoneSoup(xmlfile) items = soup.rss.channel.findAll('item') for item in items: if item.fetch('wp...
Python
0
@@ -519,32 +519,162 @@ %5B0%5D.contents%5B0%5D%0A + date = item.fetch('wp:post_date')%5B0%5D.contents%5B0%5D%0A author = item.fetch('dc:creator')%5B0%5D.contents%5B0%5D.title()%0A yiel @@ -700,16 +700,30 @@ filename +, date, author )%0A%0Aif __ @@ -1071,16 +1071,30 @@ filename +, ...
da389d740e0a13ca4ac8ba4132976fe2ca8cff53
fix err check
test/functional/feature_asset_burn.py
test/functional/feature_asset_burn.py
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import SyscoinTestFramework from test_framework.util import assert_equ...
Python
0.000001
@@ -1286,41 +1286,30 @@ or(- -20, 'Failed to read from asset DB +4, 'Insufficient funds ', s
0d6a5273e8ee6700b81f7ea00b085e1aec264e2b
Make sure that the catch-all urlpattern in projects is at the bottom of urlpatterns in urls.py
urls.py
urls.py
from django.conf import settings from django.conf.urls.defaults import patterns, include from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^browserid/', include('django_browserid.urls')), (r'', include('projects.urls')), (r'', i...
Python
0.000022
@@ -264,32 +264,39 @@ urls')),%0A (r' +%5Eevents ', include('proj @@ -295,14 +295,12 @@ de(' -projec +even ts.u @@ -306,32 +306,39 @@ urls')),%0A (r' +%5Etopics ', include('inno @@ -333,24 +333,22 @@ nclude(' -innovate +topics .urls')) @@ -372,13 +372,16 @@ de(' -users +innovate .url @@ -385,39 +385,32 ...
1b494d4d4b462ca2f68b072ebb078c0f2b00dc71
fix urls
urls.py
urls.py
# -*- encoding: utf-8 -*- from django.conf.urls.defaults import * url_prefix = 'tiny_mce/images/' urlpatterns = patterns('tinymce_images.view', #url(r'download/$', tiny_views.download), #url(r'^$', tiny_views.all), url(r'^new_folder/(?P<name>\w+)/(?P<path>[a-zA-Z0-9_/]*)$', 'new_folder', {}, 'new_...
Python
0.005145
@@ -854,31 +854,132 @@ %0D%0A%0D%0A - url(r'%5Econnector/$' +)%0D%0A%0D%0Aurlpatterns = patterns(%22%22,%0D%0A url(r'%5E%25s' %25 url_prefix, include(urlpatterns)),%0D%0A url(r'%5E%25sconnector/$' %25 url_prefix ,%0D%0A @@ -1204,92 +1204,8 @@ ),%0D%0A -)%0D%0A%0D%0Aurlpatterns = patterns(%22%22,%0D%0A u...
c9095b738fd4257ae5bdbb2ae38d3e7f41f51b64
remove unnecessary assignment in bdb
test/functional/test_framework/bdb.py
test/functional/test_framework/bdb.py
#!/usr/bin/env python3 # Copyright (c) 2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Utilities for working directly with the wallet's BDB database file This is specific to the configuration o...
Python
0.000016
@@ -1854,43 +1854,8 @@ gno%0A - page_info%5B'entries'%5D = entries%0A
ce7bddf80dc58e1fa7e4fefe7890c9c23e549c29
Add datetime function to convert date into a numerical format.
students/psbriant/final_project/clean_data.py
students/psbriant/final_project/clean_data.py
""" Name: Paul Briant Date: 12/11/16 Class: Introduction to Python Assignment: Final Project Description: Code for Final Project """ import pandas import matplotlib.pyplot as plt from datetime import datetime def clean(data): """ Take in data and return cleaned version. """ # Remove Date Values colu...
Python
0.000007
@@ -459,31 +459,121 @@ es)%0A +%0A -print(data.columns) +# Modify date format%0A first_date = data.Date.values%5B0%5D%0A print(datetime.strptime(first_date, %22%25b_%25Y%22))%0A %0A
683fc1917c485bf836670967a4e4963496f9c993
add prefer_protocol to dnscache
aquests/client/adns.py
aquests/client/adns.py
from ..protocols.dns import asyndns import time import threading class DNSCache: maintern_interval = 17 def __init__ (self, prefer_protocol, logger = None): self.logger = logger self.prefer_protocol = prefer_protocol self.__last_maintern = time.time () self.__lock = threading.RLock () self.cache = {} sel...
Python
0.000001
@@ -2631,33 +2631,16 @@ servers, - prefer_protocol, logger) @@ -2693,16 +2693,33 @@ SCache ( +prefer_protocol, logger)%0A
9017e170f6d689bc0aae7c9d0c3ed3ea72f7eac5
update all other commands to new method
arkserver/arkserver.py
arkserver/arkserver.py
import discord from discord.ext import commands from .utils import checks from __main__ import send_cmd_help import os import asyncio from subprocess import PIPE, run def out(command): result = run(command, stdout=PIPE, stderr=PIPE, universal_newlines=True, shell=True) return result.stdout class arkserver: """Ark ...
Python
0.000001
@@ -759,32 +759,35 @@ erver%22%22%22%0A%09%09o -s.system +utput = out (%22arkmanager @@ -823,26 +823,27 @@ ay(%22 -Server restarted.%22 +%7B0%7D%22.format(output) )%0A%0A%09 @@ -1017,32 +1017,35 @@ boots%22%22%22%0A%09%09o -s.system +utput = out (%22arkmanager @@ -1094,31 +1094,27 @@ ay(%22 -Attempting to update...
ae8e4b163b1d88cd7865a58f887f65cadc013304
Add the gen_report flag
tensorflow_model_analysis/tools/build_docs.py
tensorflow_model_analysis/tools/build_docs.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
@@ -1780,16 +1780,182 @@ yaml')%0A%0A +flags.DEFINE_bool('gen_report', False,%0A ('Generate an API report containing the health of the'%0A 'docstrings of the public API.'))%0A%0A FLAGS = @@ -5883,16 +5883,51 @@ map=%7B%7D,%0A + gen_report=FLAGS.gen_report,%0A ca
24ae6dd09358108c474e2e8e90c705968479d504
Remove unnessesary thread wrapper
pusherclient/__init__.py
pusherclient/__init__.py
from .channel import Channel from .connection import Connection import hashlib import hmac import logging try: import thread except: import _thread as thread try: import simplejson as json except: import json VERSION = "0.2.0" class Pusher(object): host = "ws.pusherapp.com" client_id = 'Py...
Python
0
@@ -104,68 +104,8 @@ ng%0A%0A -try:%0A import thread%0Aexcept:%0A import _thread as thread%0A %0Atry @@ -716,32 +716,8 @@ -thread.start_new_thread( self @@ -732,15 +732,14 @@ ion. -run, () +start( )%0A%0A
88e0ec5ff58f7dabb531749472a410498c8e7827
Use itertools.repeat over slower alternatives.
py_skiplist/iterators.py
py_skiplist/iterators.py
from itertools import dropwhile, count, cycle import random def geometric(p): return (next(dropwhile(lambda _: random.randint(1, int(1. / p)) == 1, count())) for _ in cycle([1])) def uniform(n): """ Simple deterministic distribution for testing internal of the skiplist """ return (n for _ in cyc...
Python
0
@@ -33,21 +33,22 @@ count, -cycle +repeat %0Aimport @@ -171,49 +171,22 @@ in -cycle(%5B1%5D))%0A%0A%0Adef uniform(n):%0A %22%22%22%0A +repeat(1))%0A%0A%0A# Sim @@ -236,16 +236,17 @@ internal +s of the @@ -257,48 +257,24 @@ list -%0A %22%22%22%0A return (n for _ in cycle(%5B1%5D)) +. %0Aunifor...
da7f7c352ab2a6b2879e7b9d229c0b78a73d64e8
Bump version
pyathenajdbc/__init__.py
pyathenajdbc/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals import datetime __version__ = '1.0.4' __athena_driver_version__ = '1.0.0' # Globals https://www.python.org/dev/peps/pep-0249/#globals apilevel = '2.0' threadsafety = 3 paramstyle = 'pyformat' ATHENA_JAR = 'Athe...
Python
0
@@ -134,17 +134,17 @@ = '1.0. -4 +5 '%0A__athe
c201cfbf12286da220f0b656bbef256132554a66
switch nose to pytest remocing class implementation
test/scripts/test_sequana_taxonomy.py
test/scripts/test_sequana_taxonomy.py
from sequana.scripts import taxonomy from nose.plugins.attrib import attr from sequana import sequana_data class TestPipeline(object): @classmethod def setup_class(klass): klass.prog = "sequana_taxonomy" klass.params = {'prog': klass.prog} def setUp(self): try: ...
Python
0
@@ -39,265 +39,121 @@ rom -nose.plugins.attrib import attr%0Afrom sequana import sequana_data%0A%0A%0A%0Aclass TestPipeline(object):%0A%0A @classmethod%0A def setup_class(klass):%0A klass.prog = %22sequana_taxonomy%22%0A klass.params = %7B'prog': klass.prog%7D%0A %0A%0A def setUp(self):%0A ...
ba22bc23bf5d145e543a2f1b08fc0d6ea9247710
Fix chunk alignment
pybeam/beam_construct.py
pybeam/beam_construct.py
# # Copyright (c) 2013 Matwey V. Kornilov <matwey.kornilov@gmail.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 # in the Software without restriction, including without limitation the rights # to use, ...
Python
0.000002
@@ -1153,48 +1153,8 @@ *%0A%0A -def align4(n):%0A%09return n + ((n+4) %25 4)%0A%0A chun @@ -1838,16 +1838,38 @@ size%22),%0A +%09SeqOfOne(%22payload%22,%0A%09 %09Switch( @@ -1913,10 +1913,12 @@ ,%0A%09%09 +%09 %7B%0A +%09 %09%09%22A @@ -1938,16 +1938,17 @@ atom,%0A%09%09 +%09 %22ExpT%22 : @@ -1960,16 +1960,17...
ac4e2f23014c6aa2e3f27cd2556dd06e5188d5e2
Update tree package __init__ to match other subpackages.
pyconll/tree/__init__.py
pyconll/tree/__init__.py
""" Defines the modules for interfacing with CoNLL sentences as trees. This is a utility module which when provided a Sentence constructs the appropriate or corresponding tree structure. """
Python
0
@@ -9,183 +9,296 @@ nes -the modules for interfacing with CoNLL sentences as trees. This%0Ais a utility module which when provided a Sentence constructs the appropriate%0Aor corresponding tree structure.%0A%22%22%22 +a tree data structure for internal use within pyconll. This module's%0Alogic is not intended to be us...
6c58e510712734793968fc44d214e7cd9efcbdde
Use ugettext_lazy everywhere
treemenus/models.py
treemenus/models.py
from itertools import chain from django.db import models from django.utils.translation import ugettext_lazy from django.utils.translation import ugettext as _ from django.utils.safestring import mark_safe class MenuItem(models.Model): parent = models.ForeignKey('self', verbose_name=ugettext_lazy('parent'), null...
Python
0.000014
@@ -106,59 +106,8 @@ azy%0A -from django.utils.translation import ugettext as _%0A from @@ -5592,17 +5592,29 @@ _name = -_ +ugettext_lazy ('menu') @@ -5644,17 +5644,29 @@ lural = -_ +ugettext_lazy ('menus'
2a402751f03da41aa9da4bed5add89e4746b5de9
Bump version
messente/verigator/__init__.py
messente/verigator/__init__.py
__version__ = "0.0.1"
Python
0
@@ -12,11 +12,11 @@ = %22 +1. 0.0 -.1 %22%0A
f06aed0c80364fbdb4064668ff0b47af71e1e39f
Remove errant FIXME comments
socorro/unittest/cron/jobs/test_verify_processed.py
socorro/unittest/cron/jobs/test_verify_processed.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import contextlib import datetime from unittest import mock from moto import mock_s3_deprecated import pytest from soc...
Python
0
@@ -5702,43 +5702,8 @@ 2%5D%0A%0A - # FIXME(willkg): verify the db%0A @@ -6019,43 +6019,8 @@ cs%0A%0A - # FIXME(willkg): Verify the db%0A
4a54d1d5e25d62ec1e26b0bd32eb48597e551cda
Considero el caso de python2 y un string no unicode
pydatajson/ckan_utils.py
pydatajson/ckan_utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import re import sys from datetime import time from dateutil import parser, tz from .helpers import title_to_name def append_attribute_to_extra(package, dataset, attribute, serialize=False): value = dataset.get(attribute) if value: if serialize...
Python
0.998327
@@ -2707,16 +2707,47 @@ %3C (3, 0) + and not isinstance(label, str) :%0A
ce1e8fd531e8b0bb5255f0d472db343a986663cd
return binary traits the way we expect them
pydigree/architecture.py
pydigree/architecture.py
#!/usr/bin/env python class Architecture(object): """ Architecture is a static class that relates genotypes to phenotypes. Main Effects ------ For main (i.e non-epistatic) effects, you supply a tuple of (chromosome, position) to indicate location. You also supply a dictionary of genotype/...
Python
0.017595
@@ -4448,32 +4448,37 @@ return +1 if liabilitysum %3E= @@ -4501,16 +4501,23 @@ hreshold + else 0 %0A
93bfbbb5ef729dd78087e8846cbe924b21b6e87e
Simplify plugin info declaration
pyexcel_text/__init__.py
pyexcel_text/__init__.py
""" pyexcel_text ~~~~~~~~~~~~~~~~~~~ Provide text output :copyright: (c) 2014-2016 by C. W. :license: New BSD """ __TEXT_META__ = { 'plugin_type': 'renderer', 'submodule': '_text', 'file_types': [ 'html', 'simple', 'plain', 'grid', 'pipe', ...
Python
0.000001
@@ -133,54 +133,128 @@ %22%22%22%0A -__TEXT_META__ = %7B%0A 'plugin_type': ' +from pyexcel.internal.common import PyexcelPluginList%0A%0A%0A__pyexcel_plugins__ = PyexcelPluginList(__name__).add_a_ renderer ',%0A @@ -245,32 +245,30 @@ d_a_renderer -', +( %0A -' submodule': @@ -264,19 +264,17 @@ ubmodule ...
74238ea3307d46ba282cb9ee4767930b0d873cbc
Add another containers job
tripleoci/config.py
tripleoci/config.py
import logging import os logging.basicConfig( format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') log = logging.getLogger('watchcat') log.setLevel(logging.DEBUG) DIR = os.path.dirname(os.path.realpath(__file__)) # https://github.com/openstack-infra/project-config/blob/master/ # gerritbot/channels.yaml ...
Python
0.000015
@@ -3611,32 +3611,84 @@ iners-oooq-nv%22,%0A + %22gate-tripleo-ci-centos-7-ovb-containers-oooq%22,%0A %22gate-triple
8462860066e25f31ce969d35b0791847c73b9bac
Add the staging project option.
test/unit/pipeline/test_qipipeline.py
test/unit/pipeline/test_qipipeline.py
import os import shutil import distutils from nose.tools import (assert_equal, assert_is_not_none, assert_true) from qiutil.ast_config import read_config from qiutil.which import which from qipipe.pipeline import qipipeline as qip import qixnat from ... import (ROOT, PROJECT) from ...helpers.logging import logger from ...
Python
0
@@ -3971,29 +3971,23 @@ st, -collection=collection +project=PROJECT ,%0A @@ -3999,24 +3999,47 @@ + collection=collection, registratio @@ -4057,16 +4057,36 @@ ='mock', +%0A modelin
44b2342a6ad0d0b154e9ffd64765517bfde76d77
Fix settings.
pymatgen/util/testing.py
pymatgen/util/testing.py
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Common test support for pymatgen test scripts. This single module should provide all the common functionality for pymatgen tests in a single location, so that test scripts can just import it and work right...
Python
0
@@ -389,16 +389,26 @@ rt open%0A +import os%0A from pat @@ -916,24 +916,118 @@ structures%22%0A + try:%0A TEST_FILES_DIR = Path(os.environ%5B%22PMG_TEST_FILES%22%5D)%0A except KeyError:%0A TEST_FIL
cf2bee90b0302b8d5e10b7efb444308ea8bd4749
Check flush method in TerminalReporter
pytest_testdox/plugin.py
pytest_testdox/plugin.py
import sys import pytest from _pytest.terminal import TerminalReporter from . import constants, models, wrappers def pytest_addoption(parser): group = parser.getgroup('terminal reporting', 'reporting', after='general') group.addoption( '--testdox', action='store_true', dest='testdox'...
Python
0
@@ -4130,16 +4130,92 @@ id, %22%22)%0A +%0A # To support Pytest %3C 6.0.0%0A if hasattr(self, 'flush'):%0A
0bf6a78d7c0ac49b195227f880e1eeac95ff249c
Allow live/dry-run migration to be continued
corehq/apps/domain_migration_flags/api.py
corehq/apps/domain_migration_flags/api.py
import logging from collections import defaultdict from datetime import datetime from django.db.models import Q from corehq.apps.domain_migration_flags.exceptions import ( DomainMigrationProgressError, ) from corehq.toggles import DATA_MIGRATION from corehq.util.quickcache import quickcache from .models import ...
Python
0
@@ -546,32 +546,42 @@ ug=slug)%0A if +(%0A progress.migrati @@ -620,16 +620,86 @@ _STARTED +%0A or progress.migration_status == MigrationStatus.DRY_RUN%0A ) :%0A
f84da456028c5148f8c18041924a2f264ea6484b
set production s3 to use the cloudfront cdn
crate_project/settings/production/base.py
crate_project/settings/production/base.py
from ..base import * SITE_ID = 3 EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" SERVER_EMAIL = "server@crate.io" DEFAULT_FROM_EMAIL = "donald@crate.io" CONTACT_EMAIL = "donald@crate.io" MIDDLEWARE_CLASSES += ["privatebeta.middleware.PrivateBetaMiddleware"] DEFAULT_FILE_STORAGE = "storages.backends.s...
Python
0
@@ -444,16 +444,60 @@ ction%22%0A%0A +AWS_S3_CUSTOM_DOMAIN = %22packages.crate.io%22%0A%0A PRIVATE_
7f0f1f9eddb10eb4bde1173bc02272b1ae3bd7b7
Add celerybeat tasks to test_project settings
test_project/test_project/settings.py
test_project/test_project/settings.py
# Django settings for test_project project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.db', } } TIME_ZONE = 'Etc/UTC' LANGUAGE_CODE = 'en-u...
Python
0
@@ -1468,16 +1468,230 @@ YS_EAGER = True%0A +%0Afrom datetime import timedelta%0A%0ACELERYBEAT_SCHEDULE = %7B%0A 'cleanup': %7B%0A 'task': 'useful.tasks.call_management_command',%0A 'schedule': timedelta(seconds=10),%0A 'args': ('validate', ),%0A %7D,%0A%7D%0A
00b8bd07875e3d747c2399b5e00f0884499691c9
Make sure to get the correct internal WB url for file objects
api/nodes/utils.py
api/nodes/utils.py
# -*- coding: utf-8 -*- from modularodm import Q from rest_framework.exceptions import PermissionDenied, NotFound from rest_framework.status import is_server_error import requests from website.files.models import OsfStorageFile from website.files.models import OsfStorageFolder from website.util import waterbutler_api_...
Python
0
@@ -1248,16 +1248,32 @@ r, path, + _internal=True, meta=Tr
882c215c847289140104862987faa0818b6fe4f9
fix html.py __str__ and __unicode__ bug
uliweb/core/html.py
uliweb/core/html.py
from __future__ import with_statement import cgi import StringIO __noescape_attrs__ = ['href', 'src'] def u_str(v, encoding='utf-8'): if isinstance(v, str): pass elif isinstance(v, unicode): v = v.encode(encoding) else: v = str(v) return v def _create_kwargs(args, nocreate_if_...
Python
0.000642
@@ -276,16 +276,143 @@ turn v%0A%0A +def str_u(v, encoding='utf-8'):%0A if isinstance(v, unicode):%0A return v%0A else:%0A return unicode(v, encoding)%0A%0A def _cre @@ -2244,32 +2244,38 @@ %0A return +u_str( self._document.g @@ -2283,24 +2283,18 @@ tvalue() -.encode( +, self._en @@ -...
db597e5a74ff53a35ccacc042fad038f6f192b01
delete action for local dest
deploy.py
deploy.py
import os.path import StringIO import sh import sys import urlparse import paramiko def debug_dest( files ): for f in files: print f.name if hasattr( f, 'mode' ): print 'Mode: ', f.mode print '-' * len( f.name ) print f.read() print def debug_pipe( files ): ...
Python
0
@@ -719,32 +719,66 @@ edirs( dpath )%0A%0A + if f.mode != 'D':%0A prin @@ -834,16 +834,20 @@ + open( df @@ -870,24 +870,158 @@ f.read() )%0A + print 'Done'%0A else:%0A print 'Removing %25s...' %25 ( dfn ),%0A os.remove...
b1dfdc73e3d5b743b7fd876bc24ec44d0c3db640
remove more prints
file_has_rationale_yes.py
file_has_rationale_yes.py
#!/usr/bin/env python from __future__ import unicode_literals """ Copyright (C) 2012 Legoktm 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 r...
Python
0
@@ -3118,39 +3118,16 @@ strip()%0A - print name%0A @@ -3214,35 +3214,8 @@ Rs:%0A - print name%0A
86ba34ec48ed67b9119f6fc30c972632f9a84f26
Fix user endpoint for anonymous users
api/serializers.py
api/serializers.py
from rest_framework import serializers from share import models from share.models import ChangeSet from share.serializers import PersonSerializer class RawDataSerializer(serializers.ModelSerializer): class Meta: model = models.RawData fields = ('source', 'provider_doc_id', 'data', 'sha256', 'date...
Python
0.999709
@@ -1,12 +1,65 @@ +from django.contrib.auth.models import AnonymousUser%0A from rest_fr @@ -150,55 +150,8 @@ Set%0A -from share.serializers import PersonSerializer%0A %0A%0Acl @@ -1336,27 +1336,99 @@ -return obj.is_robot +if not isinstance(obj, AnonymousUser):%0A return obj.is_robot%0A return...
755a4bc9e21050e2dd78c3f556d133cc5bd616fd
Revert "Added fold change to mutants api, removed added date from mutants api."
api/serializers.py
api/serializers.py
from rest_framework import serializers from interaction.models import ResidueFragmentInteraction from mutation.models import MutationRaw from protein.models import Protein, ProteinConformation, ProteinFamily, Species, ProteinSource, ProteinSegment from residue.models import Residue, ResidueNumberingScheme, ResidueGene...
Python
0
@@ -4414,39 +4414,8 @@ e',%0A - 'exp_fold_change',%0A @@ -4593,10 +4593,24 @@ agonist' +, 'added_date' )%0A
205a7bb0b846c1d955cce894e71cc96a40ef3813
add event.assigned_to, remove award.person links
api/serializers.py
api/serializers.py
from rest_framework import serializers from workshops.models import ( Badge, Airport, Person, Event, TodoItem, Tag, Host, Task, Award, ) class PersonUsernameSerializer(serializers.ModelSerializer): name = serializers.CharField(source='get_full_name') user = serializers.Cha...
Python
0.000001
@@ -3069,113 +3069,8 @@ r):%0A - person = serializers.HyperlinkedRelatedField(%0A read_only=True, view_name='api:person-detail')%0A @@ -3343,26 +3343,16 @@ elds = ( -'person', 'badge', @@ -5684,32 +5684,142 @@ item_set',%0A ) +%0A assigned_to = serializers.HyperlinkedRelatedField(%0A r...
58627c2f6b50a51fd6d64a46b64df8c9c26816d8
Remove unused deps
testcases/cloud_user/images/load_hvm_image.py
testcases/cloud_user/images/load_hvm_image.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Software License Agreement (BSD License) # # Copyright (c) 2009-2011, Eucalyptus Systems, Inc. # All rights reserved. # # Redistribution and use of this software in source and binary forms, with or # without modification, are permitted provided that the following conditions #...
Python
0.000001
@@ -1516,46 +1516,8 @@ Case -, EutesterTestUnit, EutesterTestResult %0Afro
e507c164e91ad44f4c9be356afb2e6e650bd8d2c
OGC not OCG URN
datatypes/validators/ogc_urn_validator.py
datatypes/validators/ogc_urn_validator.py
from voluptuous import Match from datatypes.core import SingleValueValidator ocg_urn_schema = Match(pattern='urn:ogc:def:crs:EPSG:\d{4,5}') class OgcUrn(SingleValueValidator): def define_schema(self): return ocg_urn_schema def define_error_message(self): return "Value must be a correctly f...
Python
0.998588
@@ -76,12 +76,11 @@ or%0A%0A -%0Aocg +ogc _urn @@ -136,17 +136,16 @@ 4,5%7D')%0A%0A -%0A class Og @@ -221,10 +221,10 @@ rn o -c g +c _urn @@ -260,32 +260,32 @@ _message(self):%0A - return %22 @@ -328,8 +328,9 @@ OGC URN%22 +%0A
dc41024679edfa93534c80f02433040cb48cb8be
Bump patch version
uplink/__about__.py
uplink/__about__.py
""" This module is the single source of truth for any package metadata that is used both in distribution (i.e., setup.py) and within the codebase. """ __version__ = "0.5.2"
Python
0
@@ -167,7 +167,7 @@ 0.5. -2 +3 %22%0A
8c20deac927bbc9e27d1890d13b457be0a36255c
Add ConsoleCommand
halng/commands.py
halng/commands.py
import logging import os from brain import Brain from cmdparse import Command log = logging.getLogger("hal") class InitCommand(Command): def __init__(self): Command.__init__(self, "init", summary="Initialize a new brain") self.add_option("", "--force", action="store_true") self.add_opt...
Python
0.000002
@@ -17,16 +17,43 @@ mport os +%0Aimport readline%0Aimport sys %0A%0Afrom b @@ -1582,8 +1582,424 @@ trip())%0A +%0Aclass ConsoleCommand(Command):%0A def __init__(self):%0A Command.__init__(self, %22console%22, summary=%22Speak with Hal.%22)%0A%0A def run(self, options, args):%0A b = Brain(%22hal.b...
c9ade752f4d6eefbd9e6795d4d16876f63d3f1e0
remove plotting from test
tests/em/tdem/test_TDEM_crosscheck.py
tests/em/tdem/test_TDEM_crosscheck.py
import unittest from SimPEG import * from SimPEG import EM import matplotlib.pyplot as plt TOL = 1e-5 FLR = 1e-20 np.random.seed(seed=25) # set a seed so that the same conductivity model is used for all runs def setUp_TDEM(prbtype='b', rxcomp='bz'): cs = 5. ncx = 20 ncy = 15 npad = 20 hx = [(cs,...
Python
0.000001
@@ -1717,58 +1717,8 @@ 1)%0A%0A - plt.plot(d1)%0A plt.plot(d2)%0A plt.show()%0A%0A
4654f891d0195dffa88b5a96bbbbf1058fce4f83
Fix for timeout delay between rounds.
gauntlet.py
gauntlet.py
__author__ = 'Jody Shumaker' from utility.mouse import * from utility.screen import * from utility.logconfig import * import argparse import os.path from loa import * script_dir = os.path.dirname(os.path.realpath(__file__)) parser = argparse.ArgumentParser(description='Click for gauntlet. Works for top left only, st...
Python
0
@@ -1407,71 +1407,67 @@ -while round_count %3C rounds:%0A starttime = time.time() +starttime = time.time()%0A while round_count %3C rounds: %0A @@ -2084,34 +2084,24 @@ - timeout = starttime + @@ -2100,16 +2100,17 @@ rttime + += 130.1%0A @@ -2141,26 +2141,16 @@ -...
8042d63d98f033520219911da3edffc61ff76c81
Fix get_list and create methods.
flask_jsonapi/resource.py
flask_jsonapi/resource.py
import http import marshmallow from flask import logging from flask import request from flask import views, helpers from flask_jsonapi import decorators from flask_jsonapi import exceptions from flask_jsonapi import response logger = logging.getLogger(__name__) class Resource(views.MethodView): @classmethod ...
Python
0.00002
@@ -1701,48 +1701,107 @@ -pass%0A%0A def create(self):%0A pass +raise NotImplementedError%0A%0A def create(self, *args, **kwargs):%0A raise NotImplementedError %0A%0A