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
e3618bb948943655ca66db7d46e9e01c05395119
Remove schema checking for functional samples (and samples from Selenium)
bzt/modules/functional.py
bzt/modules/functional.py
""" Copyright 2016 BlazeMeter 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, software...
Python
0
@@ -4655,286 +4655,8 @@ s):%0A - for key in self.REPORT_ITEM_KEYS:%0A if key not in row:%0A self.log.debug(%22Unexpected test record: %25s%22, row)%0A self.log.warning(%22Test record doesn't conform to schema, skipping, %25s%22, key)%0A ...
8decbeb6a3928668581d0f671ae87a21f7d2c6b7
add in sentinel support
update_school_data.py
update_school_data.py
import governorhub import logging import redis import os import loggly.handlers from datetime import datetime from similar_schools import update_similar_schools from dfe_data import update_dfe_data logging.basicConfig(level=logging.INFO) # Turn off requests INFO level logging requests_log = logging.getLogger("reques...
Python
0
@@ -516,16 +516,185 @@ ', None) +%0ASENTINEL_HOST = os.environ.get('SENTINEL_HOST', None)%0ASENTINEL_PORT = os.environ.get('SENTINEL_PORT', 26379)%0ASENTINEL_MASTER = os.environ.get('SENTINEL_MASTER', 'base') %0A%0ALOGGLY @@ -1931,16 +1931,46 @@ ests():%0A + if SENTINEL_HOST is None:%0A client @@ -2048,16 +204...
e50c68ab74d06af35aa7ddcdd648bf259a9bb6aa
Update sync_auth0 command
project/api/management/commands/sync_auth0.py
project/api/management/commands/sync_auth0.py
# Standard Libary import logging # Third-Party from auth0.v3.management import Auth0 from auth0.v3.management.rest import Auth0Error # Django from django.conf import settings from django.core.management.base import BaseCommand # First-Party from api.models import User from api.utils import get_auth0_token log = log...
Python
0.000002
@@ -1081,16 +1081,127 @@ user):%0A + if user.person.email != user.email:%0A user.email = user.person.email%0A user.save()%0A @@ -1215,24 +1215,25 @@ user.email%0A +%0A try: @@ -1418,32 +1418,70 @@ bhs_id = None%0A + barberscore_id = str(user.id)%0A ...
0ca27c0a609228abd7585c8314fe4a9d3756ba76
Fix import on updater
project/api/management/commands/update_bhs.py
project/api/management/commands/update_bhs.py
# Standard Libary import datetime import logging import django_rq # Django from django.core.management.base import BaseCommand from django.core.management.base import CommandError from django.utils import timezone # First-Party from api.models import Role from api.models import Member from api.models import Officer f...
Python
0
@@ -227,36 +227,8 @@ rty%0A -from api.models import Role%0A from @@ -402,16 +402,44 @@ SMJoin%0A +from api.models import Role%0A from bhs
9348b7df383e7a9fa970b7ad0692f7be280f6b79
fix scoping issue with exception handling
scrapi/util.py
scrapi/util.py
from datetime import datetime import six import pytz import time import logging logger = logging.getLogger() xrange = six.moves.xrange def timestamp(): return pytz.utc.localize(datetime.utcnow()).isoformat() def copy_to_unicode(element): """ used to transform the lxml version of unicode to a standard...
Python
0
@@ -1457,24 +1457,39 @@ **kwargs):%0A + exc = None%0A for _ in @@ -1583,24 +1583,44 @@ ption as e:%0A + exc = e%0A @@ -1674,16 +1674,18 @@ if e +xc :%0A @@ -1693,9 +1693,11 @@ raise e +xc %0A
8d55631551f04c817fdd5e7cc316d557f6c9ec2d
Remove settings.cppstd
conanfile.py
conanfile.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from conans import ConanFile, tools, AutoToolsBuildEnvironment, CMake from conans.model.version import Version from conans.errors import ConanInvalidConfiguration class LibpqxxRecipe(ConanFile): name = "libpqxx" version = "6.4.4" settings = "os", "c...
Python
0
@@ -347,18 +347,8 @@ rch%22 -, %22cppstd%22 %0A
616f93b30a5a02f62af9afe4d77700ef9f76b775
Add sphinx-tabs to be able to show Java/Python/examples in tabs instead of sequentially.
doc/docbook/conf.py
doc/docbook/conf.py
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
Python
0
@@ -1592,16 +1592,40 @@ phinx%22,%0A + %22sphinx_tabs.tabs%22,%0A %5D%0A%0A# Add
496649b736e6f3c6bc1cd7928a13df190bd4052e
Add GEOMObject.consumer shortcut for getting the first (and often only) consumer.
bsd/geom.py
bsd/geom.py
#+ # Copyright 2015 iXsystems, Inc. # All rights reserved # # Redistribution and use in source and binary forms, with or without # modification, are permitted providing that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and t...
Python
0
@@ -2729,24 +2729,174 @@ eturn None%0A%0A + @property%0A def consumer(self):%0A try:%0A return six.next(self.consumers)%0A except StopIteration:%0A return None%0A%0A @propert
a3ac67a4174e01b893aa1c3ae72c251ee59fcec8
format code
doc/generate-doc.py
doc/generate-doc.py
import logging import os import glob from entrypoint2 import entrypoint from easyprocess import EasyProcess commands = [ "python3 -m entrypoint2.examples.hello 1", "python3 -m entrypoint2.examples.hello 1 --two 1", "python3 -m entrypoint2.examples.hello 1 -t 1", "python3 -m entrypoint2.examples.hello...
Python
0.000061
@@ -4,23 +4,20 @@ ort +g lo -gging +b %0Aimport os%0Ai @@ -16,18 +16,23 @@ ort -os +logging %0Aimport glob @@ -31,20 +31,18 @@ ort -glob +os %0A%0Afrom e ntry @@ -41,73 +41,73 @@ om e -ntrypoint2 import entrypoint%0A%0Afrom easyprocess import EasyProcess +asyprocess import EasyProcess%0A%0Afrom entrypoi...
ec0a860fed28e862c49adab4b0c051d73d7ec375
Use implicit string concatenation so messages don't have extra whitespace in the middle.
spotseeker_server/test/search/limit.py
spotseeker_server/test/search/limit.py
""" Copyright 2012, 2013 UW Information Technology, University of Washington 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.000001
@@ -1545,16 +1545,17 @@ +( %22400 is @@ -1583,17 +1583,17 @@ 0 spots -%5C +%22 %0A @@ -1597,16 +1597,18 @@ + %22 are requ @@ -1621,32 +1621,33 @@ without a limit%22 +) %0A )%0A%0A @@ -2058,32 +2058,33 @@ ts,%0A +( %22Spots requested @@ -2101,17 +2101,17 @@ rn...
3638b7d793f755feb9b09b2b8c772e162cc41fac
allow for none
build_cv.py
build_cv.py
import os import sys import argparse import logging import yaml import jinja2 sys.path.append(os.path.dirname(os.path.realpath(__file__))) import filters class BuildCV(object): """ Build markdown and tex files of CV from YAML using jinja templates """ def __init__(self, yaml_config_file, md_templat...
Python
0.000853
@@ -453,32 +453,78 @@ = tex_out_file%0A + if self.tex_out_file is not None:%0A if not o @@ -566,32 +566,36 @@ tex_out_file)):%0A + os.m @@ -666,32 +666,77 @@ e = md_out_file%0A + if self.md_out_file is not None:%0A if not o @@ -777,32 +777,36 @@ .md_out_file...
b4e97efee571c51d686668de480a23abf3da4f7a
Move color selection of rows outside the addstr() method
utop/views/content.py
utop/views/content.py
from utop import model from utop.model import Model from utop.view import View class Content(View): """ Draw the content of utop. This is the list of users with the other selected columns. """ def draw(self): """ Draw the whole pane. """ self.window.erase() self.draw_headers()...
Python
0
@@ -845,16 +845,61 @@ idth'%5D%0A%0A + color = model.COLOR_DEFAULT%0A%0A @@ -966,50 +966,17 @@ - self.addstr(i, j, value%5B:width-2%5D, color -= + = mode @@ -991,36 +991,10 @@ CYAN -)%0A else:%0A +%0A%0A @@ -1038,16 +1038,29 @@ width-2%5D +, color=color )%...
fa6d1de535790047fa6262bb0129638cff560d39
Fix typo in Python 3 implementation. - Also, make defensive change to get_consensus_duplex() for safety. - Use the length of each family instead of one to form the arrays.
consensus.py
consensus.py
#!/usr/bin/env python import os import sys import errno import ctypes import argparse PY3 = sys.version_info.major >= 3 # Locate the library file. LIBFILE = 'libconsensus.so' script_dir = os.path.dirname(os.path.realpath(__file__)) library_path = os.path.join(script_dir, LIBFILE) if not os.path.isfile(library_path): ...
Python
0
@@ -3569,25 +3569,25 @@ ength=n_seqs -1 +2 )%0A if quals @@ -3744,33 +3744,33 @@ 2, length=n_seqs -1 +2 )%0A else:%0A qu @@ -4793,21 +4793,26 @@ umerate( -align +str_pylist ):%0A i
a92a611875f065a49f90897e8f113081d7882e4b
Optimize OpCompositeConstruct -> OpConstantComposite
constprop.py
constprop.py
"""Change instructions having only constant operands to a constant. This pass tends to leave dead instructions, so dead_code_elim should be run after.""" import ir def optimize_OpCompositeExtract(module, inst): result_inst = inst.operands[0].inst for index in inst.operands[1:]: result_inst = result_i...
Python
0
@@ -160,16 +160,264 @@ rt ir%0A%0A%0A +def optimize_OpCompositeConstruct(module, inst):%0A new_inst = ir.Instruction(module, 'OpConstantComposite', module.new_id(),%0A inst.type_id, inst.operands%5B:%5D)%0A module.add_global_inst(new_inst)%0A return new_inst%0A%0A%0A def opti @@ ...
208f90497c7a6867f9aeece84b1161926ca1627b
Simplify nethack protocol to a single method.
nethud/nh_client.py
nethud/nh_client.py
""" An example client. Run simpleserv.py first before running this. """ import json from twisted.internet import reactor, protocol # a client protocol class EchoClient(protocol.Protocol): """Once connected, send a message, then print the result.""" def connectionMade(self): data = '{"register": {"...
Python
0.000001
@@ -294,216 +294,42 @@ -data = '%7B%22register%22: %7B%22email%22: %22Qalthos@gmail.com%22, ' + %5C%0A '%22username%22: %22Qalthos%22,' + %5C%0A '%22password%22: %22password%22%7D%7D'%0A #~ data = '%7B%22auth%22: %7B%22 +self.send_message('auth', user...
4ef1f5897359ffd95eb6c7930c0ec9dc6d732d7f
Clean crypto_util
v0ltlib/utils/crypto_utils.py
v0ltlib/utils/crypto_utils.py
import hashlib import base64 import itertools from v0ltlib.utils.v0lt_utils import red, fail def b64(s): return base64.b64decode(s) def ceasar(string, offset=0): upper_bound = 128 - 32 if offset != 0: encrypted = '' for each in string: p = 32 + ((ord(each) + ...
Python
0
@@ -98,55 +98,117 @@ %0D%0A%0D%0A -%0D%0Adef b64(s):%0D%0A return base64.b64decode(s)%0D%0A +'''%0D%0ASome basic functions used in easy crypto challenge%0D%0A%0D%0ATODO: Make ceasar with yield, stuff like this%0D%0A''' %0D%0A%0D%0A @@ -1640,184 +1640,8 @@ %0D%0A%0D%0A -def sha1(s):%0D%0A return hashlib.sha1(s)...
c6c6d1bd2069795ba73605c114a02629b7b0f47d
delete invalid codechef token
modules/sites/init.py
modules/sites/init.py
""" Copyright (c) 2015-2019 Raj Patel(raj454raj@gmail.com), StopStalk 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 ...
Python
0.000001
@@ -3031,16 +3031,163 @@ us_code%0A + if url.__contains__(%22codechef.com%22) and response.status_code == 401:%0A current.REDIS_CLIENT.del(%22codechef_access_token%22)%0A
25e8ea38498768ce1f5116699442fe5adb35942c
add youtube to default plugins list commented out
cardinal.py
cardinal.py
#!/usr/bin/env python # Copyright (c) 2013 John Maguire <john@leftforliving.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 #...
Python
0
@@ -1527,16 +1527,32 @@ astfm',%0A +# 'youtube',%0A )%0ADEFAUL
7560429fca2822ff9353d4c57c9190c4a487883e
Fix issue with clicking on errors in build panel
run_project.py
run_project.py
# # Sublime Text plugin to support Corona Editor # # Copyright (c) 2013 Corona Labs Inc. A mobile development software company. All rights reserved. # # MIT License - see https://raw.github.com/coronalabs/CoronaSDK-SublimeText/master/LICENSE import sublime import sublime_plugin try: from . import _corona_utils # P...
Python
0
@@ -3406,16 +3406,38 @@ ex%22: %22%5E( +?:ERROR: %7CWARNING: )*( /%5B%5E:%5D*): @@ -3459,17 +3459,16 @@ ?)(.*)$%22 - %7D)%0A e @@ -3553,16 +3553,37 @@ : %22(?i)%5E +(?:ERROR: %7CWARNING: ) %5B%5EC-Z%5D*(
de475b8d10d219d1ff1dc4da98e737c085b3e1ee
Fix VersatileImageField.formfield default kwargs
versatileimagefield/fields.py
versatileimagefield/fields.py
from __future__ import unicode_literals import os from django.conf import settings from django.db.models import SubfieldBase from django.db.models.fields import CharField from django.db.models.fields.files import ImageField from django.utils.six import add_metaclass from django.utils.translation import ugettext_lazy ...
Python
0.000003
@@ -5784,21 +5784,23 @@ -kwarg +default s.update @@ -5800,23 +5800,21 @@ .update( -default +kwarg s)%0A
e595c0e667d01df9c6412e918fa0a30ee1251046
Add option to disable chdir
runipy/main.py
runipy/main.py
from __future__ import print_function import argparse from sys import stderr, stdout, stdin, exit import os.path import logging import codecs from runipy.notebook_runner import NotebookRunner, NotebookError from IPython.nbformat.current import read, write from IPython.config import Config from IPython.nbconvert.exp...
Python
0.000001
@@ -1826,24 +1826,159 @@ put_file)')%0A + parser.add_argument('--no-chdir', action='store_true',%0A help=%22do not change directory to notebook's at kernel startup%22)%0A args = p @@ -2838,16 +2838,66 @@ _file)%0A%0A + if args.no_chdir:%0A working_dir = None%0A%0A logg
b39bb2b82f11fe0f7f1344a467913587c556e7b6
Use UTF-8 to save non-ASCII documents
runipy/main.py
runipy/main.py
import argparse from sys import stderr import logging from runipy.notebook_runner import NotebookRunner, NotebookError from IPython.nbconvert.exporters.html import HTMLExporter def main(): # TODO: options: # - output: # - save HTML report (nbconvert) print 'ko' log_format = '%(asctime)s %(mes...
Python
0.000006
@@ -47,16 +47,30 @@ logging +%0Aimport codecs %0A%0Afrom r @@ -2327,16 +2327,23 @@ +codecs. open(arg @@ -2353,16 +2353,34 @@ tml, 'w' +, encoding='utf-8' ).write(
d359677e9de71b1dbcd8d7e4b2e548c981d36556
Support bind IPv6 addresses in StreamServer
ryu/lib/hub.py
ryu/lib/hub.py
#!/usr/bin/env python # # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the...
Python
0.000003
@@ -1156,16 +1156,34 @@ ort ssl%0A + import socket%0A impo @@ -2576,16 +2576,206 @@ efault'%0A +%0A if ':' in listen_info%5B0%5D:%0A self.server = eventlet.listen(listen_info,%0A family=socket.AF_INET6)%0A else:%0A ...
fec4929e90dd78e20000b9c41b297c55823f8ac6
Move classifier_tags in test fixtures (#12340)
datadog_checks_dev/tests/tooling/manifest_validator/input_constants.py
datadog_checks_dev/tests/tooling/manifest_validator/input_constants.py
# (C) Datadog, Inc. 2021-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from datadog_checks.dev.tooling.datastructures import JSONDict # This file contains the constants used for V2 manifest validator testing ORACLE_METADATA_CSV_EXAMPLE = [(0, {"metric_name": "oracle.session...
Python
0
@@ -383,268 +383,8 @@ e%22,%0A - %22classifier_tags%22: %5B%0A %22Category::Marketplace%22,%0A %22Category::Cloud%22,%0A %22Category::Log Collection%22,%0A %22Supported OS::Windows%22,%0A %22Supported OS::Mac OS%22,%0A %22Offering::Integration%22,%0A %22Offering::UI ...
83203ed98e512765b75ca604a3480a82d513d99f
Fix line too long __init__.py
num2words/__init__.py
num2words/__init__.py
# -*- coding: utf-8 -*- # Copyright (c) 2003, Taro Ogawa. All Rights Reserved. # Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved. # 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 Fo...
Python
0.999721
@@ -1357,17 +1357,8 @@ _SV, - lang_TE, %0A @@ -1364,24 +1364,33 @@ + lang_TE, lang_TH, la
1dfa5a0d29e844195621ce7502b6f6f5fa2f1f66
Fix minor error
karma/api/profile.py
karma/api/profile.py
#!/usr/bin/env from flask import request import json from flask.ext.restful import Resource from karma.models import User from karma.api.models.post import Post from karma.api import post from karma import db def create_response(user, recursing=False): from karma.api import charity, post if recursing: ...
Python
0.000054
@@ -2869,19 +2869,29 @@ sponse(x -), +%5B1%5D), sorted_ users)%7D%0A
9457027f6a930c2348412097b69cec1caf50a2f1
switch to using covtype
py/testdir_multi_jvm/test_GBM_with_cancels.py
py/testdir_multi_jvm/test_GBM_with_cancels.py
import unittest, time, sys, random sys.path.extend(['.','..','py']) import h2o, h2o_cmd,h2o_hosts, h2o_browse as h2b, h2o_import as h2i, h2o_hosts, h2o_jobs, h2o_gbm DELETE_KEYS = True # FIX need to get exec workin DO_CLASSIFICATION = False class Basic(unittest.TestCase): def tearDown(self): h2o.check_san...
Python
0.000001
@@ -908,32 +908,34 @@ nse?%0A + # (%22manyfiles-nfl @@ -975,16 +975,18 @@ + # (%22manyf @@ -1089,34 +1089,32 @@ 78),%0A - # (%22standard%22, %22c
de4842fd3c587e74dcaa7ea4df036e1e7ab93b1a
Update compass.py
plyer/platforms/ios/compass.py
plyer/platforms/ios/compass.py
''' iOS Compass --------------------- ''' from plyer.facades import Compass from pyobjus import autoclass Hardware = autoclass('org.renpy.Ios.Hardware') class IosCompass(Compass): def __init__(self): super(IosCompass, self).__init__() self.bridge = autoclass('bridge').alloc().init() sel...
Python
0.000001
@@ -105,56 +105,8 @@ ss%0A%0A -Hardware = autoclass('org.renpy.Ios.Hardware')%0A%0A %0Acla
986a5815d890f6b52747319b477fca17742b19bf
fix ConnectionWithTrace not using its timeout parameter
python-api/scalaris_userdevguide_jsontrace.py
python-api/scalaris_userdevguide_jsontrace.py
#!/usr/bin/python # Copyright 2011 Zuse Institute Berlin # # 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 ...
Python
0.000001
@@ -882,32 +882,15 @@ t = -scalaris.DEFAULT_TIMEOUT +timeout )%0A%0A
0cbf164badeeef519f3e514b763e3d9ffa4468c0
Add ~/.cbcrc config merge. Remove old comments. Remove TemporaryDirectory module.
cbc/meta.py
cbc/meta.py
'''I refuse to write the same thing over and over again in meta.yaml. And yeah, conda supports Jinja2, but ugh... No. ''' import os import conda_build.metadata import conda_build.environ import yaml import shutil from glob import glob from configparser import SafeConfigParser, ExtendedInterpolation from col...
Python
0
@@ -264,20 +264,16 @@ import -Safe ConfigPa @@ -301,16 +301,16 @@ lation%0D%0A + from col @@ -1005,16 +1005,28 @@ bc_cgi', + 'settings', 'enviro @@ -1040,26 +1040,16 @@ %0D%0A - %0D%0A @@ -1408,24 +1408,155 @@ lf.fields)%0D%0A + %0D%0A if self.env.configrc is not None:%0D...
a2ea05ee144dbcab22d17897df3ba01467b47497
test of meanvT for cold population for power-law rotation curves
nose/test_diskdf.py
nose/test_diskdf.py
# Tests of the diskdf module: distribution functions from Dehnen (1999) import numpy from galpy.df import dehnendf, shudf # Tests for cold population, flat rotation curve: <vt> =~ v_c def test_dehnendf_cold_flat_vt(): df= dehnendf(profileParams=(0.3333333333333333,1.0, 0.01), beta=0.,correct=False...
Python
0
@@ -727,8 +727,1323 @@ rn None%0A +%0A# Tests for cold population, power-law rotation curve: %3Cvt%3E =~ v_c%0Adef test_dehnendf_cold_powerrise_vt():%0A # Rising rotation curve%0A beta= 0.2%0A df= dehnendf(profileParams=(0.3333333333333333,1.0, 0.01),%0A beta=beta,correct=False)%0A assert n...
881e693d16d12109c3ececffda61336b020c172a
Test sqlite and mongoquery variations.
portable_mds/tests/conftest.py
portable_mds/tests/conftest.py
import os import tempfile import shutil import tzlocal import pytest from ..mongoquery.mds import MDS @pytest.fixture(params=[1], scope='function') def mds_all(request): '''Provide a function level scoped FileStore instance talking to temporary database on localhost:27017 with both v0 and v1. ''' ver...
Python
0
@@ -66,14 +66,27 @@ est%0A -from . +import portable_mds .mon @@ -100,20 +100,122 @@ .mds - +%0A import -MDS%0A +portable_mds.sqlite.mds%0A%0Avariations = %5Bportable_mds.mongoquery.mds,%0A portable_mds.sqlite.mds%5D %0A%0A@p @@ -239,11 +239,18 @@ ams= -%5B1%5D +variations , sc @@ -432,32 +432,8 @@...
1f92f860818aaaa48c2ee52468d282338fa7dddd
Migrate mapping for background task to ES7
portality/models/background.py
portality/models/background.py
from portality.core import app from portality.lib import dataobj, dates, es_data_mapping from portality import dao class BackgroundJob(dataobj.DataObj, dao.DomainObject): """ # ~~BackgroundJob:Model~~ """ __type__ = "background_job" def __init__(self, **kwargs): # FIXME: hack, to deal wit...
Python
0
@@ -5239,14 +5239,12 @@ %22: %22 -string +text %22,%0A @@ -5267,22 +5267,13 @@ x%22: -%22not_analyzed%22 +False ,%0A @@ -5277,24 +5277,26 @@ %0A + # %22include_in @@ -5303,24 +5303,102 @@ _all%22: False + # Removed in es6 fixme: do we need to look at copy_to for the mapping? %0A %7...
d5ebea31d7c207c0828c6b13d70bf031e007d080
Fix virtualenv-inside-venv on osx. Resolves #419
pre_commit/languages/python.py
pre_commit/languages/python.py
from __future__ import unicode_literals import contextlib import distutils.spawn import os import sys from pre_commit.envcontext import envcontext from pre_commit.envcontext import UNSET from pre_commit.envcontext import Var from pre_commit.languages import helpers from pre_commit.util import clean_path_on_failure fr...
Python
0.000001
@@ -2034,16 +2034,100 @@ sion)%5D)%0A + else:%0A venv_cmd.extend(%5B'-p', os.path.realpath(sys.executable)%5D)%0A
2b482a960c5910a9a9a5f9649154580fa1ac9aa6
Fix bug with uninvoiced times.
prickle/controllers/invoice.py
prickle/controllers/invoice.py
# Copyright 2010-2011 Dusty Phillips # This file is part of Prickle. # Prickle is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of # the License, or (at your option) any later version....
Python
0
@@ -4691,16 +4691,29 @@ objects( +number__ne=-1 )%0A
d9f66df9a50e1241d6c4766edaa342f2dcb0cbc2
fix print align bug
km3modules/common.py
km3modules/common.py
# coding=utf-8 # Filename: common.py # pylint: disable=locally-disabled """ A collection of commonly used modules. """ from __future__ import division, absolute_import, print_function import numpy as np from km3pipe import Module from km3pipe.tools import peak_memory_usage, zenith, azimuth from km3pipe.dataclasses i...
Python
0.000001
@@ -1005,59 +1005,8 @@ b.%0A%0A - If no argument is specified, dump everything.%0A%0A @@ -1061,32 +1061,47 @@ tring), optional + %5Bdefault=None%5D %0A Keys to @@ -1111,14 +1111,40 @@ int. + If None, print all keys. %0A -a +fu ll: @@ -1370,17 +1370,18 @@ self. -a +fu ll = sel @@ -1387,17...
91871cd60d20895399dd0ce04b93b1777abcbfdf
Change template path and static path.
docs/source/conf.py
docs/source/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # lookit-api documentation build configuration file, created by # sphinx-quickstart on Wed Sep 6 09:57:34 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this #...
Python
0
@@ -748,17 +748,16 @@ ('.'))%0A%0A -%0A # -- Gen @@ -1199,17 +1199,17 @@ ath = %5B' -n +_ template @@ -1308,18 +1308,16 @@ ring:%0A#%0A -# source_s @@ -1344,30 +1344,109 @@ d'%5D%0A -source_suffix = '.rst' +%0Afrom recommonmark.parser import CommonMarkParser%0A%0Asource_parsers = %7B%0A '.md': CommonMarkPars...
d805789611436a3dbe6a5223282e3c65300c3df7
Update conf.py
docs/source/conf.py
docs/source/conf.py
# -*- coding: utf-8 -*- # # docfly documentation build configuration file, created by # sphinx-quickstart on Mon Jul 17 14:40:39 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
Python
0.000001
@@ -3142,16 +3142,18 @@ lse,%0A + # %22light_ @@ -3165,32 +3165,34 @@ ariables%22: %7B%0A + # %22color-bran @@ -3211,24 +3211,26 @@ %22white%22,%0A + # %22color- @@ -3261,15 +3261,19 @@ %0A + # %7D,%0A + # %22da @@ -3292,24 +3292,26 @@ bles%22: %7B%0A + # %22color- @@ -333...
c52a9351dd321cfb62afaddcca9b13ce8d440a03
update version on docs/source/conf.py
docs/source/conf.py
docs/source/conf.py
# Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or mo...
Python
0
@@ -749,17 +749,17 @@ t = %22201 -3 +9 The Fon @@ -849,17 +849,17 @@ on = %220. -6 +7 %22%0A# The @@ -918,11 +918,11 @@ %220. -6.0 +7.1 %22%0A%0A%0A
6e33cdd178ae696e5b355e868aa8a67016427408
update version on docs/source/conf.py
docs/source/conf.py
docs/source/conf.py
# Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or mo...
Python
0
@@ -917,17 +917,17 @@ = %220.7.3 -1 +2 %22%0A%0A%0A# -- @@ -6644,17 +6644,17 @@ 'v0.7.3 -1 +2 '%0A #
d789c4c1a5ef3f2d2003a18aa58cbafe86d5c85e
update funmath
src/funmath.py
src/funmath.py
import sys from math import factorial def calculateFactorial(num): x = range(0, num) f = [factorial(x) for x in range(num)] l = [len(str(factorial(x))) for x in range(num)] for i in range(num): print({i},"-", {f[i]}, "-", {l[i]} ) def main(x): try: calculateFactorial((x)) exce...
Python
0
@@ -30,16 +30,38 @@ actorial +%0Afrom math import sqrt %0A%0Adef ca @@ -281,56 +281,782 @@ def -main(x):%0A try:%0A calculateFactorial((x) +calculateFactorialinloop(num):%0A for i in range(num):%0A print(%7Bi%7D, %22=%22, factorial(i), %22=%22, len(str(factorial(i))))%0A%0Adef calculateFibonacci...
25e060157e11d68a6fcfe826af437f7ff105d161
bump version
cmsplugin_text_ng/__init__.py
cmsplugin_text_ng/__init__.py
__version__ = '0.4'
Python
0
@@ -14,7 +14,7 @@ '0. -4 +5 '%0A
84a21b5ee1868454f53c33e28d3da18bd499d8a2
update comments
trypython/stdlib/secrets01.py
trypython/stdlib/secrets01.py
# coding: utf-8 """ secretsモジュールについてのサンプルです。 """ import secrets import string from trypython.common.commoncls import SampleBase from trypython.common.commonfunc import pr class Sample(SampleBase): def exec(self): # # secretsモジュールは、3.6から追加された標準モジュール # 文字通りセキュアな値を管理することを目的としている # ...
Python
0
@@ -345,32 +345,145 @@ %E5%88%A9%E7%94%A8%E3%81%A7%E3%81%8D%E3%82%8B%0A #%0A + # %E5%8F%82%E8%80%83URL:%0A # https://www.blog.pythonlibrary.org/2017/02/16/pythons-new-secrets-module/%0A #%0A pr('gene
6ac942d7ea79d3e36ef08414be8560888e41c736
Change the numerics used by usermode +s The current ones cause issues with some clients as they are the same as the ones used by the Charybdis quiet lists.
txircd/modules/rfc/umode_s.py
txircd/modules/rfc/umode_s.py
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IMode, IModuleData, Mode, ModuleData from txircd.utils import ircLower, ModeType, timestamp from zope.interface import implements from weakref import WeakSet irc.RPL_LISTMODE = "728" # Made up, based on freen...
Python
0
@@ -288,10 +288,10 @@ = %227 -2 8 +6 %22 # @@ -301,41 +301,8 @@ e up -, based on freenode's quiet lists %0Airc @@ -328,10 +328,10 @@ = %227 -29 +87 %22 # @@ -341,41 +341,8 @@ e up -, based on freenode's quiet lists %0Airc
3c2d42a10508b4600437920e92fed0aab5c164c8
Write deeply imported files
typpete/src/import_handler.py
typpete/src/import_handler.py
import ast import astunparse import os from typpete.src.context import Context from typpete.src.stubs.stubs_paths import libraries from typpete.src.stubs.stubs_handler import STUB_ASTS class ImportHandler: """Handler for importing other modules during the type inference""" cached_asts = {} cached_modules ...
Python
0
@@ -4020,16 +4020,34 @@ r module +.replace('/', '.') not in @@ -4279,32 +4279,50 @@ d_modules%5Bmodule +.replace('/', '.') %5D%0A mo
f436e8f4fe774e73f59e0cda93be08dad9c1ce7d
convert &amp; to &, this sucks
util/get_text_from_nwschat.py
util/get_text_from_nwschat.py
''' Hit the NWSChat quasi web service to get the text IEM may have missed :( https://nwschat.weather.gov/vtec/json-text.php? year=2014&wfo=DDC&phenomena=SV&eventid=0020&significance=W ''' import urllib2 import sys import json year = sys.argv[1] wfo = sys.argv[2] phenomena = sys.argv[3] sig...
Python
0.999862
@@ -462,16 +462,38 @@ eplace(%22 +&amp;%22, %22&%22).replace(%22 %5Cn%22, %22%5Cr
64b85415f540efd64132c263c6de240bfc3b0bd8
Fix unused import error.
analytics/migrations/0015_clear_duplicate_counts.py
analytics/migrations/0015_clear_duplicate_counts.py
# -*- coding: utf-8 -*- from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from django.db.models import Count, Sum, Q def clear_duplicate_counts(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None: ...
Python
0
@@ -221,11 +221,8 @@ Sum -, Q %0A%0Ade
2a5f53239be8b48bbfad951be41b97cd033641b0
add short report for Manalyze submodule
analyzers/FileInfo/submodules/submodule_manalyze.py
analyzers/FileInfo/submodules/submodule_manalyze.py
import subprocess import json import os from .submodule_base import SubmoduleBaseclass class ManalyzeSubmodule(SubmoduleBaseclass): """Manalyze submodule implements the static analysis tool by @JusticeRage (https://github.com/JusticeRage/Manalyze)""" def __init__(self, **kwargs): SubmoduleBasecl...
Python
0
@@ -3814,61 +3814,1367 @@ ion( -'Manalyze raw output', json.dumps(results, indent=4)) +%0A 'Clamav',%0A %7B%0A 'level': results.get('Plugins', %7B%7D).get('clamav', %7B%7D).get('level', None),%0A 'summary': results.get('Plugins', %7B%7D).get('clamav', %7B%7D).get('su...
70b9de8e589776ba90c000addfa24dffe5915b33
Set version to v3.0.0a32
spacy/about.py
spacy/about.py
# fmt: off __title__ = "spacy-nightly" __version__ = "3.0.0a31" __release__ = True __download_url__ = "https://github.com/explosion/spacy-models/releases/download" __compatibility__ = "https://raw.githubusercontent.com/explosion/spacy-models/master/compatibility.json" __projects__ = "https://github.com/explosion/projec...
Python
0.000027
@@ -58,9 +58,9 @@ .0a3 -1 +2 %22%0A__
d90398643933999d734a09bc3637a8723d5de2c3
Increment version
spacy/about.py
spacy/about.py
# inspired from: # https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/ # https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py __title__ = 'spacy-nightly' __version__ = '2.0.0a15' __summary__ = 'Industrial-strength Natural Language Processing (NLP) with Python and Cython...
Python
0.000002
@@ -223,9 +223,9 @@ .0a1 -5 +6 '%0A__ @@ -445,12 +445,11 @@ _ = -Fals +Tru e%0A%0A_
9da597780ee7115effb9662c5d36d1b6553c1cfb
Fix typo
file_transfer/baltrad_to_s3.py
file_transfer/baltrad_to_s3.py
""" Baltrad to S3 porting """ import sys from creds import URL, LOGIN, PASSWORD import datamover as dm def main(): """Run data transfer from Baltrad to S3""" # ------------------ # DATA TRANSFER # ------------------ # Setup the connection of the Baltrad and S3 btos = dm.BaltradToS3(URL, L...
Python
0.999999
@@ -586,17 +586,16 @@ Connect -o to S3 c
aeed55bf942fbe68f1a04b525cfa4fe1531f1bb2
Add a task to update NFIRS counts.
firecares/firestation/slack.py
firecares/firestation/slack.py
import logging from django.conf import settings from django.http import HttpResponseForbidden, HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt from django.views.generic import View from django.utils.decorators import method_decorator from firecares.tasks.cache import clear_cache as clea...
Python
0
@@ -8,17 +8,16 @@ logging%0A -%0A from dja @@ -378,16 +378,71 @@ message%0A +from firecares.tasks.update import update_nfirs_counts%0A from fir @@ -709,16 +709,39 @@ equests' +, 'update_nfirs_counts' %5D%0A%0A @ @@ -998,16 +998,26 @@ sg = %22%22%22 +%0A * clear_ca @@ -1019,16 +1019,17 @@ ar_cache +* ...
46a222127bcfc30f89f8f43bac45c00fb677adf9
Add Interfaces column to plugins output. (#1667)
flexget/plugins/cli/plugins.py
flexget/plugins/cli/plugins.py
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging from colorclass.toggles import disable_all_colors from flexget import options from flexget.event import event from flexget.plugin import get_plugins from fl...
Python
0
@@ -574,16 +574,30 @@ eyword', + 'Interfaces', 'Phases @@ -608,16 +608,16 @@ Flags'%5D%0A - tabl @@ -788,32 +788,33 @@ continue%0A +%0A flags = @@ -1070,16 +1070,17 @@ opers')%0A +%0A @@ -1357,16 +1357,16 @@ in.name%0A - @@ -1388,24 +1388,54 @@ nd(%5Bname, ', + '.join(p...
7b43d2d9a6d9dc01432e991f83c101f598bb6f14
Add a note about the date serializers
flexget/utils/serialization.py
flexget/utils/serialization.py
import datetime from abc import ABC, abstractmethod from flexget.utils import json DATE_FMT = '%Y-%m-%d' ISO8601_FMT = '%Y-%m-%dT%H:%M:%SZ' def serialize(value): """ Convert an object to JSON serializable format. :param value: Object to serialize. :return: JSON serializable representation of this ob...
Python
0
@@ -1747,24 +1747,25 @@ se.%0A %22%22%22%0A +%0A @abstrac @@ -2970,24 +2970,203 @@ ds(data))%0A%0A%0A +# These two date serializer classes do not follow convention, since the builtin types do not subclass Serializable.%0A# Their use is hard coded into the 'serialize' function above.%0A class DateSe
bd5c215c1c481f3811753412bca6b509bb00591a
Improve the way that import middlewares
me_api/app.py
me_api/app.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from flask import Flask from .middleware.me import me from .cache import cache def _register_module(app, module): if module == 'douban': from .middleware import douban app.register_blueprint(...
Python
0.000058
@@ -123,22 +123,69 @@ t Flask%0A -%0A from +werkzeug.utils import import_string%0A%0Afrom me_api .middlew @@ -206,16 +206,22 @@ me%0Afrom +me_api .cache i @@ -238,147 +238,64 @@ e%0A%0A%0A -def _register_module(app, module):%0A if module == 'douban':%0A from .middleware import douban%0A app.reg...
e45ed77257f19d0330c235928c24ea2401885733
remove useless blank line
NTHU_Course/settings/default.py
NTHU_Course/settings/default.py
""" Django settings for NTHU_Course project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ......
Python
0.999998
@@ -325,17 +325,16 @@ port os%0A -%0A BASE_DIR
bbe83e43feef903d3ac4485280f7b6f01a50b369
Fix bug: closes a batch if the data ends and the batch size is not reach
megalist_dataflow/utils/group_by_execution_dofn.py
megalist_dataflow/utils/group_by_execution_dofn.py
# Copyright 2020 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.000001
@@ -598,16 +598,58 @@ rt DoFn%0A +from apache_beam.transforms import window%0A %0A%0Aclass @@ -911,16 +911,23 @@ _init__( +%0A self,%0A @@ -1208,16 +1208,81 @@ cution'%5D +%0A%0A # Finish a batch if the Execution changes from last element %0A if @@ -1516,16 +1516,16 @@ h_size:%0A - yi @@ -...
4e880cde9a91e3398ebde9e97ad01a2351ed3ba4
Add NONE as valid docker network mode
marathon/models/container.py
marathon/models/container.py
from ..exceptions import InvalidChoiceError from .base import MarathonObject class MarathonContainer(MarathonObject): """Marathon health check. See https://mesosphere.github.io/marathon/docs/native-docker.html :param docker: docker field (e.g., {"image": "mygroup/myimage"})' :type docker: :class:`m...
Python
0.000002
@@ -1643,16 +1643,24 @@ , 'HOST' +, 'NONE' %5D%0A %22%22
57a461569abd524f58649e636c67e89ffa0cb8c4
Update header metadata, refactor import order, add logger
spyns/ising.py
spyns/ising.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 31 15:39:03 2017 @author: ssilayi """ import numpy as np import math from random import * class Ising: coords = [] def __init__(self,n): self.n = n self.s = [[[1 for x in range(n)] for y in range(n)] for z in rang...
Python
0
@@ -1,27 +1,4 @@ -#!/usr/bin/env python3%0A # -* @@ -21,122 +21,460 @@ -*-%0A -%22%22%22%0ACreated on Thu Aug 31 15:39:03 2017%0A%0A@author: ssilayi%0A%22%22%22%0A%0Aimport numpy as np%0Aimport math%0Afrom random import * +# Copyright (c) Mason DataMaterials Group.%0A# Distributed under the terms of the MIT License.%...
66e2a87c3b4c647991a8ae84d9dc9738d8f1b6cc
version bump
matplotlib2tikz/__about__.py
matplotlib2tikz/__about__.py
# -*- coding: utf-8 -*- # __author__ = u'Nico Schlömer' __email__ = 'nico.schloemer@gmail.com' __copyright__ = 'Copyright (c) 2010-2017, %s <%s>' % (__author__, __email__) __credits__ = [] __license__ = 'License :: OSI Approved :: MIT License' __version__ = '0.6.5' __maintainer__ = u'Nico Schlömer' __status__ = 'Develo...
Python
0.000001
@@ -256,17 +256,17 @@ = '0.6. -5 +6 '%0A__main
af6f4868f4329fec75e43fe0cdcd1a7665c5238a
Remove comment on attaching cloud debugger
contentcuration/manage.py
contentcuration/manage.py
#!/usr/bin/env python import os import sys # Attach Python Cloud Debugger if __name__ == "__main__": #import warnings #warnings.filterwarnings('ignore', message=r'Module .*? is being added to sys\.path', append=True) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "contentcuration.settings") from dj...
Python
0
@@ -42,39 +42,8 @@ s%0A%0A%0A -# Attach Python Cloud Debugger%0A if _
e156b7de7a8044f3e184aa491c39ba21771266c4
Fix to stop looping when fetching json data in a loop
modules/pipefetchdata.py
modules/pipefetchdata.py
# pipefetchdata.py # import urllib2 from xml.etree import cElementTree as ElementTree try: import json json.loads # test access to the attributes of the right json module except (ImportError, AttributeError): import simplejson as json from pipe2py import util def pipe_fetchdata(context, _INPUT, conf, *...
Python
0.000006
@@ -2768,24 +2768,25 @@ for item +d in d:%0A @@ -2824,24 +2824,25 @@ atch or item +d == match:%0A @@ -2892,16 +2892,17 @@ e(d%5Bitem +d %5D, list) @@ -2964,16 +2964,17 @@ n d%5Bitem +d %5D:%0A @@ -3056,32 +3056,32 @@ else:%0A - @@ -3113,16 +3113,17 @@ %5Bd%5Bitem ...
e2f0ae49064b69d2ba33408f8f4d0c762df4e100
Version bump
mollie/api/version.py
mollie/api/version.py
# In this file the version of the package is defined. # Don't change the syntax of the definition unless you know what you're doing, because this file is # processed by python imports and by regular expressions. The version is defined as a string in the # regular semantic versioning scheme (major,minor,patch). VERSIO...
Python
0.000001
@@ -326,7 +326,7 @@ 2.9. -0 +1 %22%0A
256c321398daaad749905a466ba1a7dcd75711aa
Update to exception handling
ecnet/error_utils.py
ecnet/error_utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # ecnet/error_utils.py # v.1.3.0.dev1 # Developed in 2018 by Travis Kessler <Travis_Kessler@student.uml.edu> # # This program contains functions for error calculations # import numpy as np from math import sqrt # Calculates the root-mean-square error between two arg...
Python
0
@@ -495,37 +495,48 @@ ))%0A%09%09except:%0A%09%09%09 -print +raise ValueError (%22Error in calcu @@ -575,39 +575,16 @@ rmat.%22)%0A -%09%09%09raise%0A%09%09%09sys.exit()%0A %09%09%09%0A# Ca @@ -801,37 +801,48 @@ ))%0A%09%09except:%0A%09%09%09 -print +raise ValueError (%22Error in calcu @@ -894,39 +894,16 @@ orma...
1d9adbabf9268384b5e6d701b7a5079dec622dd1
compactify the code
tools/time_convert.py
tools/time_convert.py
#!/usr/bin/python -O import sys import json import lib.ts as TS all_data = sys.stdin.readlines()[0] res = [] for data in all_data.split('_'): parts = data.strip().split(' ') res.append((TS.to_utc(parts[0], parts[1]), TS.duration_parse(parts[2]) )) print json.dumps(res)
Python
1
@@ -18,19 +18,8 @@ -O%0A -import sys%0A impo @@ -62,32 +62,19 @@ a = -sys.stdin.readlines()%5B0%5D +raw_input() %0A%0Are @@ -191,17 +191,16 @@ rts%5B1%5D), - TS.dura @@ -219,17 +219,16 @@ arts%5B2%5D) - ))%0A%0Aprin
5b3b4f99d099bbe6488cfcfd8e2a560cf061a57b
calculate mean for each genotype
video_analysis/align_graph.py
video_analysis/align_graph.py
import numpy as np import pandas import os import pdb #pdb.set_trace() for rootsubdir, rootdirs, rootfiles in os.walk('.') : for myrootdir in rootdirs: #for each directory found, iterate round... myfileList = [] # make list of files for subdir, dirs, files in os.walk(myrootdir): for file in file...
Python
0.999889
@@ -66,16 +66,29 @@ trace()%0A +dircount = 0%0A for root @@ -139,33 +139,45 @@ :%0A%09%09 -for myrootdir in +mean_mat = np.zeros((193,len( rootdirs :%0A%09%09 @@ -172,17 +172,22 @@ rootdirs -: +)))%0A%09%09 %0A%09%09#for @@ -225,17 +225,45 @@ ound...%0A +%09%09for myrootdir in rootdirs: %0A - %09%09%09%09my...
5ea6bd85cade750cf011b8cd707cbecaa00958dd
add compaction test for #3919
schema_test.py
schema_test.py
from cql import ProgrammingError from dtest import Tester from tools import * import time class TestSchema(Tester): @since('#3919') def drop_column_compact_test(self): cursor = self.prepare() cursor.execute("USE ks") cursor.execute("CREATE TABLE cf (key int PRIMARY KEY, c1 int, c2 int)...
Python
0
@@ -615,16 +615,1388 @@ _column_ +compaction_test(self):%0A cursor = self.prepare()%0A cursor.execute(%22USE ks%22)%0A cursor.execute(%22CREATE TABLE cf (key int PRIMARY KEY, c1 int, c2 int)%22)%0A%0A # insert some data.%0A cursor.execute(%22INSERT INTO cf (key, c1, c2) VALUES (0, 1,...
3f05a7d7df3e563c8e4dc701750c758b79db0217
remove unused imports, and dead code
lambda_dd_metrics.py
lambda_dd_metrics.py
#!/usr/bin/env python ''' Simple interface for reporting metrics to DataDog. ''' from __future__ import print_function import logging import os import time class DataDogMetrics(object): ''' Datadog supports printing to stdout to report metrics. This only gives us counts and gauges: https://www.dat...
Python
0.000001
@@ -117,33 +117,8 @@ ion%0A -import logging%0Aimport os%0A impo @@ -639,203 +639,8 @@ fix%0A -%0A logging.basicConfig()%0A self.logger = logging.getLogger()%0A log_level = logging.getLevelName(os.environ.get('LOG_LEVEL', 'WARNING'))%0A self.logger.setLevel(log_level)%0A%0A
f8b821a207eb9d5b967c8bf884d25f9640a6c3b7
NOT DONE
pppkk.py
pppkk.py
#this text game will help you determine which phone is best for you by answering 3 questions. So from this the program will use the input to calculate the phone that is best for he/she. import random def main(): Name= raw_input("Your name:") phone= raw_input ("Your current phone:") sp= smartphone() ...
Python
0.999998
@@ -209,20 +209,17 @@ main():%0A - +%09 Name= ra @@ -240,20 +240,17 @@ name:%22)%0A - +%09 phone= r @@ -257,17 +257,16 @@ aw_input - (%22Your c @@ -285,119 +285,88 @@ :%22)%0A - sp= smartph +%09afford= m one +y ()%0A - p= output(Name,phone,sp)%0A print p%0A%0A%0Adef cal(a,b,c,d):%0A return...
dcf7b873f67db0870ea3fce25ef30c4a9859c136
Add ability to pull database object from RequestHandler
storm/model.py
storm/model.py
from storm.db import Database from storm.error import StormError from tornado import gen from storm.collection import Collection class Model(object): TYPE_MONGO_DB = 'mongodb' TYPE_MYSQL = 'mysql' db = None def __init__(self): self._type = type(self).__name__.lower() self._changes = []...
Python
0
@@ -1,16 +1,31 @@ +import inspect%0A from storm.db im @@ -97,16 +97,55 @@ ort gen%0A +from tornado.web import RequestHandler%0A from sto @@ -266,16 +266,46 @@ b = None +%0A check_for_handler = False %0A%0A de @@ -1324,24 +1324,716 @@ key = 'id'%0A%0A + @staticmethod%0A def get_db():%0A if Model...
8b672bdf35c595d49cf2f4a701ff3f7e2c6b9781
add doctest main method, and love for the tests (100% coverage /o/)
sqliteshelf.py
sqliteshelf.py
""" >>> class Test: ... def __init__(self): ... self.foo = "bar" by default, things are stored in a "shelf" table >>> d = SQLiteShelf("test.sdb") you can put multiple shelves into a single SQLite database >>> e = SQLiteShelf("test.sdb", "othertable") both are empty to start with >>> print d {} >>> print...
Python
0
@@ -1,80 +1,8 @@ %22%22%22%0A -%3E%3E%3E class Test:%0A... def __init__(self):%0A... self.foo = %22bar%22%0A%0A by d @@ -424,16 +424,35 @@ d%0ATrue%0A +%3E%3E%3E print len(d)%0A1%0A %3E%3E%3E del @@ -458,16 +458,16 @@ d%5B'a'%5D%0A - %3E%3E%3E prin @@ -482,16 +482,31 @@ d%0AFalse +%0A%3E%3E%3E del ...
948b9987afa95d7a69bd61f3d8f9fea822323b01
Implement equality check for DraftText nodes
wagtaildraftail/draft_text.py
wagtaildraftail/draft_text.py
from __future__ import absolute_import, unicode_literals import json from draftjs_exporter.html import HTML from wagtail.wagtailcore.rich_text import RichText from wagtaildraftail.settings import get_exporter_config class DraftText(RichText): def __init__(self, value, **kwargs): super(DraftText, self)....
Python
0
@@ -64,16 +64,69 @@ t json%0A%0A +from django.utils.functional import cached_property%0A%0A from dra @@ -505,24 +505,45 @@ source%0A%0A + @cached_property%0A def __html__ @@ -538,16 +538,13 @@ def -_ _html -__ (sel @@ -608,8 +608,140 @@ ource))%0A +%0A def __html__(self):%0A return self._htm...
fa06c892c163054e3420e756acaa0b3af7863b88
add import test for OpenCV
setup.py
setup.py
import os from setuptools import setup, find_packages from calibtools import __version__ as version def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = 'calibtools', version = version, description = 'Camera calibration tools for Python', long_descript...
Python
0.000001
@@ -3,16 +3,28 @@ port os%0A +import sys%0A%0A from set @@ -107,16 +107,214 @@ ersion%0A%0A +try:%0A import cv2%0A HAVE_OPENCV=True%0Aexcept ImportError:%0A HAVE_OPENCV=False%0A%0Aif not HAVE_OPENCV:%0A sys.stderr.write(%22OpenCV's Python binding is required for calibtools%5Cn%22)%0A sys.exit(1)%0A%0A...
c501320b249eeea8b4350fb227be4790bd7642cd
version 1.1.3
setup.py
setup.py
#!/usr/bin/env python import os from distutils.core import setup def read(fname): with open(os.path.join(os.path.dirname(__file__), fname)) as fp: return fp.read() setup(name="gw2api", version="1.1.2", description="Guild Wars 2 API", author="Paul Hooijenga", author_email="paulhooi...
Python
0.000002
@@ -212,17 +212,17 @@ on=%221.1. -2 +3 %22,%0A
dcca2dcdba9698c4a354cdb3de68c37a07ba0b1e
Create 0.2 release
setup.py
setup.py
""" mbed CMSIS-DAP debugger Copyright (c) 2012-2013 ARM Limited 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
@@ -672,17 +672,17 @@ sion=%220. -1 +2 %22,%0A d
cca77827bcd80064bbcf47d362e367c8fe8dbcbb
Bump version 1.0.10
setup.py
setup.py
# -*- encoding: utf-8 -*- import os, sys from setuptools import setup from setuptools import find_packages # Make the open function accept encodings in python < 3.x if sys.version_info[0] < 3: import codecs open = codecs.open # pylint: disable=redefined-builtin # Utility function to read the README file. # U...
Python
0
@@ -1435,17 +1435,18 @@ on=%221.0. -9 +10 %22,%0A a
920d1946c6188b822d4d0f318741fdc784dbf0b9
change version #
setup.py
setup.py
#!/usr/bin/env python try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except(IOError, ImportError): long_description = open('README.md').read() from setuptools import setup setup(name='tracestack', version='0.2.3', description='Instantly search your Python error me...
Python
0
@@ -249,25 +249,25 @@ ersion='0.2. -3 +4 ',%0A des @@ -547,9 +547,9 @@ 0.2. -3 +4 ',%0A
a6c28c06523db2bdec94c426c9e345fc163a0bb9
Update URLs to reflect new structure
setup.py
setup.py
__version__ = '1.0a3' from setuptools import setup, find_packages import sys, os import textwrap setup( name="SchevoGtk", version=__version__, description="Schevo tools for PyGTK", long_description=textwrap.dedent(""" Provides integration between Schevo_ and PyGTK_. .. _Schevo: http://sch...
Python
0
@@ -1092,13 +1092,8 @@ org/ -trac/ wiki
bca8bdf14a5343ce29b51e29fc20bff22e701f31
add subline
mppsolar/mpp_info_pub.py
mppsolar/mpp_info_pub.py
#!/usr/bin/python # # # mpp_info_pub.py # # script to query MPP Solar PIP-4048MS inverter/charger # - inverter connected to computer via serial # (USB to Serial converter used for testing) # - posts results to MQTT broker # - uses mpputils.py / mppcommands.py to abstract PIP communications # import paho.mqtt.publi...
Python
0.000093
@@ -2613,16 +2613,19 @@ at(_line +%5Bi%5D )%7D%0A
15f63ad1656c96aa05367efcaee45d30e74fbf6d
make pylint required for running tests so it installs on circle automatically
setup.py
setup.py
from setuptools import setup setup( name='docker_iptables', scripts=['docker_iptables.py'], version='0.0.1', tests_require=['mock'], test_suite="tests", )
Python
0
@@ -134,16 +134,26 @@ equire=%5B +'pylint', 'mock'%5D,
ad53baaa9af1e18068c0e4924c123ffa6cd5dde0
Bump version number
setup.py
setup.py
#! /usr/bin/env python3 import os from setuptools import setup def get_long_description(file_name: str) -> str: """Gets the long description from the specified file's name. :param file_name: The file's name :type file_name: str :return: The content of the file :rtype: str """ return open...
Python
0.000002
@@ -462,17 +462,17 @@ on='1.2. -1 +2 ',%0A
f9a22d87bfb67084c1ffcfb622569b9c32fc9cca
Update sphinx pin
setup.py
setup.py
from pathlib import Path from setuptools import setup, find_packages if __name__ == "__main__": base_dir = Path(__file__).parent src_dir = base_dir / 'src' about = {} with (src_dir / "vivarium" / "__about__.py").open() as f: exec(f.read(), about) with (base_dir / "README.rst").open() a...
Python
0
@@ -753,16 +753,21 @@ 'sphinx +%3E=4.0 ',%0A
d1fc96d56e0efcf89a4269d4c0db90ecc7e89ba7
Add `south_migrations` to packages in setup.py
setup.py
setup.py
import os from distutils.core import setup setup( name = "django-watson", version = "1.1.6", description = "Full-text multi-table search application for Django. Easy to install and use, with good performance.", long_description = open(os.path.join(os.path.dirname(__file__), "README.markdown")).read(),...
Python
0
@@ -581,24 +581,59 @@ igrations%22,%0A + %22watson.south_migrations%22,%0A %22wat
78444e100a1cf932a550a6e667a30f8034622c19
Allow passing compiler directives to Cython using setup.py cythoning.
setup.py
setup.py
#!/usr/bin/env python # Copyright 2013 Ryan Volz # This file is part of echolect. # Echolect is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ...
Python
0
@@ -877,16 +877,77 @@ sultSet%0A + from Cython.Compiler.Options import parse_directive_list%0A except I @@ -2595,16 +2595,96 @@ rce.'),%0A + ('directive=', 'X', 'Overrides a compiler directive.'),%0A @@ -2751,16 +2751,17 @@ ce files +. ')%5D%0A @@ -2829,32 +2829,64 @@ nnota...
0e6e323c1f5952827382148662ec38bf0a076459
Bump to 0.7.2 dev
setup.py
setup.py
#!/usr/bin/env python # Copyright (c) The PyAMF Project. # See LICENSE.txt for details. # import ordering is important import setupinfo from setuptools import setup, find_packages version = (0, 7, 2) name = "PyAMF" description = "AMF support for Python" long_description = setupinfo.read('README.rst') url = "http:/...
Python
0
@@ -195,16 +195,23 @@ (0, 7, 2 +, 'dev' )%0A%0Aname
aa8ca0d4e7a88d6d5f67289c36652c182092f81e
Update setup.py to work for new packages
setup.py
setup.py
import re import sys from os.path import join from distutils.core import setup, Extension import numpy if sys.version_info[:2] < (2, 5): raise Exception('numba requires Python 2.5 or greater.') kwds = {} kwds['long_description'] = open('README').read() setup( name = "numba", author = "Travis Oliphant",...
Python
0
@@ -885,16 +885,52 @@ %5B%22numba%22 +, %22numba.pymothoa%22, %22numba.minivect%22 %5D,%0A e @@ -1117,12 +1117,11 @@ = '0.1' - %0A)%0A
c93de3b854772e6792c2af5f132b762d9cedfb11
Add missing dependency
setup.py
setup.py
from setuptools import setup, find_packages def get_readme(name="README.md"): with open(name) as f: return f.read() requirements = ["redis", "PyQt5", "msgpack", "msgpack-numpy"] setup( name="qredis", version="0.5.1", description="Qt based Redis GUI", long_description=get_readme(), ...
Python
0.000234
@@ -149,16 +149,24 @@ %22redis%22, + %22qtpy%22, %22PyQt5%22 @@ -986,16 +986,65 @@ : 3.8%22,%0A + %22Programming Language :: Python :: 3.9%22,%0A %5D,%0A
d03bf67ad8fec7b8c96b4f0c238cd423e2f577c0
read version from landsat folder
setup.py
setup.py
#!/usr/bin/env python # Landsat Util # License: CC0 1.0 Universal try: from setuptools import setup except ImportError: from distutils.core import setup def readme(): with open("README.rst") as f: return f.read() test_requirements = [ 'nose==1.3.3' ] setup( name="landsat", version='0...
Python
0
@@ -157,16 +157,49 @@ setup%0A%0A +from landsat import __version__%0A%0A %0Adef rea @@ -348,15 +348,19 @@ ion= -'0.4.5' +__version__ ,%0A
7a707cc66380482ef6fb5da93e42b898f7983dcc
add nosetests
setup.py
setup.py
from setuptools import setup, find_packages import sys, os version = '0.0' setup(name='acc', version=version, description="An implementation of Accounting Pattern by Martin Fowler", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classif...
Python
0.000053
@@ -783,20 +783,55 @@ %0A %22%22%22,%0A + setup_requires=%5B'nose%3E=1.0'%5D%0A )%0A
035dc6c0815089e728b5ee78738c4795367b1d94
switch to pyannote.core 1.0 and pyannote.database 0.12
setup.py
setup.py
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2016-2017 CNRS # 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 limita...
Python
0.000001
@@ -1403,14 +1403,13 @@ %3E= -0.13.2 +1.0.4 ',%0A @@ -1440,17 +1440,17 @@ e %3E= 0.1 -1 +2 '%0A %5D,
f4b640783135ec93eb0bf0403c4be042144a0303
add dependencies to `install_requires`.
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from os.path import dirname, join as join_path from setuptools import setup, find_packages def _read(file_name): sock = open(file_name) text = sock.read() sock.close() return text setup( name = 'pyramid_weblayer', version = '0.8.5', desc...
Python
0
@@ -1521,19 +1521,74 @@ ' -transaction +pyramid_basemodel',%0A 'transaction',%0A 'zope.interface '%0A
ba9bfad2d015b615e89e74957f6f3cc6567b27e8
Use kfac_jax@HEAD due to API changes in the latest version of JAX.
setup.py
setup.py
# Copyright 2020 DeepMind Technologies Limited and 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 applic...
Python
0.000002
@@ -902,14 +902,113 @@ -'kfac_ +# TODO(b/230487443) - use released version of kfac.%0A 'kfac_jax @ git+https://github.com/deepmind/kfac- jax'
8df792393f0efec6df074318a0f65cddf8eb2335
change version to 0.0.11
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages from pip.req import parse_requirements setup( name='rqbacktest', version='0.0.10', description='Python Distribution Utilities', packages=find_packages(exclude=[]), author='ricequant', author_email='public@ricequant.com', u...
Python
0.00001
@@ -150,17 +150,17 @@ n='0.0.1 -0 +1 ',%0A d
b48ec701926fe449540fb9f794da5c11808b825b
change my email address
setup.py
setup.py
import GnuPGInterface import distutils.core long_description = """ GnuPGInterface is a Python module to interface with GnuPG. It concentrates on interacting with GnuPG via filehandles, providing access to control GnuPG via versatile and extensible means. This module is based on GnuPG::Interface, a Perl module by the ...
Python
0.000874
@@ -657,29 +657,23 @@ bin@ -users.sourceforge.net +neverending.org ',%0A%09
cbc94311219ca7edea6f86fcc429dd7f6e4bc894
Remove old trove classifiers for Python 3.3 and 3.4
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup readme = open('README.rst').read() history = open('HISTORY.rst').read().replace('.. :changelog:', '') requirements = [ 'multidict>=2.0', 'pyquery', 'aiodns' ] test_requirements = [ 'py...
Python
0.999795
@@ -1116,106 +1116,8 @@ 3',%0A - 'Programming Language :: Python :: 3.3',%0A 'Programming Language :: Python :: 3.4',%0A
accee2d3992a3f17ac826268a357094371691d50
Remove unused import in setup.py
setup.py
setup.py
from __future__ import print_function # Preliminary checks that cannot be done by setuptools # like... the setuptools dependency itself! try: import setuptools except ImportError: print() print("*****************************************************") print("* Setuptools must be installed before running...
Python
0
@@ -1077,42 +1077,8 @@ mand -%0Afrom subprocess import check_call %0A%0Aim @@ -1116,18 +1116,8 @@ os%0A -import re%0A impo
347279a0e82769eac6430806f7adb9c907155465
add qimvn to setup.py
setup.py
setup.py
## Copyright (c) 2012, 2013 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. import os from distutils.core import setup packages = [ "qisys", "qisys.actions", "qisrc", "qisrc.actions", "qibuild", "q...
Python
0
@@ -656,16 +656,40 @@ chain%22,%0A + %22python/bin/qimvn%22,%0A %5D%0A%0Apacka
8312ac22c444b895bab9f2a3707e4d4a7ccc40b2
Remove sphinx pinning since 1.7.6 has been released.
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='synapse', version='0.1.0a1', description='Synapse Distributed Key-Value Hypergraph Analysis Framework', author='Invisigoth Kenshoto', author_email='invisigoth.kenshoto@gmail.com', url='https://github.com/vertexproje...
Python
0
@@ -720,33 +720,8 @@ 0',%0A - 'sphinx==1.7.0',%0A
13a7002c7cbedc00889cb457b92b4086f94ab479
Version 0.2
setup.py
setup.py
import ez_setup import os ez_setup.use_setuptools() from setuptools import setup, find_packages README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() setup( name = "goscalecms", version = "0.1", packages = find_packages(), author = "Evgeny Demchenko", author_email = "little_pe...
Python
0.000001
@@ -215,17 +215,17 @@ on = %220. -1 +2 %22,%0A p
9ebc0daaa86cb268f395670f6b38cd3fdc0dbc4e
Add packages to setup to run tests
setup.py
setup.py
from distutils.core import setup setup( name='datetime_utils', version='0.1', packages=[ 'datetime_utils', ], url='https://github.com/annpaul89/datetime_utils', description='Python functions for common operations on datetime instances', install_requires=[ 'pytz>=2016.4', ...
Python
0
@@ -2,22 +2,18 @@ rom -distutils.core +setuptools imp @@ -76,16 +76,35 @@ ='0.1',%0A + license='MIT',%0A pack @@ -194,24 +194,87 @@ ime_utils',%0A + author='Ann Paul',%0A author_email='ann.mpaul@gmail.com',%0A descript @@ -386,17 +386,558 @@ =201 -6.4',%0A %5D +4.10',%0A %5D,%0A class...