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
a3715ffe1d54d33abefad6266c64814d5e3c75ac
Integrate LLVM at llvm/llvm-project@c6013f71a455
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "43d6991c2a4cc2ac374e68c029634f2b59ffdfdf" LLVM_SHA256 = "6be97e134eab943941bbb06ad0c714070dc24cb4418a104813c1e9a2ca6655f7" tfrt_http_archive( ...
Python
0.000001
@@ -162,133 +162,133 @@ = %22 -43d6991c2a4cc2ac374e68c029634f2b59ffdfdf%22%0A LLVM_SHA256 = %226be97e134eab943941bbb06ad0c714070dc24cb4418a104813c1e9a2ca6655f7 +c6013f71a4555f6d9ef9c60e6bc4376ad63f1c47%22%0A LLVM_SHA256 = %22644a1f9db6e55ba28fba1e03fe6c2d28514d47e1e02210b4b281868d7a7af70c %22%0A%0A
172d54bff691a5fd6d2e150206f0b81c047f8f1f
Remove unused import
chainer/links/normalization/batch_renormalization.py
chainer/links/normalization/batch_renormalization.py
import numpy from chainer.backends import cuda from chainer import configuration from chainer.functions.normalization import batch_normalization from chainer.functions.normalization import batch_renormalization from chainer.links.normalization.batch_normalization import BatchNormalization class BatchRenormalization(...
Python
0.000001
@@ -1,18 +1,4 @@ -import numpy%0A%0A from
5eabb16de7c41a115ccac4192c81a41487b676d0
Fix ambiguous definitions between `//third_party/mkl:build_with_mkl` and `//tensorflow:linux_x86_64` for `--config=mkl` build.
third_party/mkl/build_defs.bzl
third_party/mkl/build_defs.bzl
"""Starlark macros for MKL. if_mkl is a conditional to check if we are building with MKL. if_mkl_ml is a conditional to check if we are building with MKL-ML. if_mkl_ml_only is a conditional to check for MKL-ML-only (no MKL-DNN) mode. if_mkl_lnx_x64 is a conditional to check for MKL if_enable_mkl is a conditional to ch...
Python
0.999997
@@ -1355,76 +1355,8 @@ t(%7B%0A - %22@org_tensorflow//third_party/mkl:build_with_mkl%22: if_true,%0A @@ -3733,94 +3733,8 @@ t(%7B%0A - %22@org_tensorflow//third_party/mkl:build_with_mkl%22: %5B%22@mkl_dnn_v1//:mkl_dnn%22%5D,%0A
f1099e777d2e14fa1429f72352dfd90fc08250e6
Fix newlines to match formatting in the rest of project.
pentagon/filters.py
pentagon/filters.py
import re def register_filters(): """Register a function with decorator""" registry = {} def registrar(func): registry[func.__name__] = func return func registrar.all = registry return registrar filter = register_filters() def get_jinja_filters(): """Return all registered custom jinja filters""" ret...
Python
0
@@ -5,17 +5,16 @@ rt re%0A%0A%0A -%0A def regi @@ -232,17 +232,16 @@ ers()%0A%0A%0A -%0A def get_
5ab35ab7d19a108d48ecbb2dbd04c926939c081c
Fix amount of days in an year
jarbas/chamber_of_deputies/twitter.py
jarbas/chamber_of_deputies/twitter.py
from datetime import datetime, timedelta from random import choice import twitter from django.db.models import Subquery from django.conf import settings from jarbas.chamber_of_deputies.models import Reimbursement, SocialMedia, Tweet class Twitter: """Twitter target. Maintains the logic for posting suspicious ...
Python
0.999999
@@ -1028,10 +1028,10 @@ ys=3 -5 6 +5 * 2
b8fc01fd052e61b8a37a47dc4f2b4f92dc42225f
use aggregation format for ops in match_expression when for_project is True
cubes/backends/mongo2/mapper.py
cubes/backends/mongo2/mapper.py
# -*- coding: utf-8 -*- """Logical to Physical Mapper for MongoDB""" import collections import copy from cubes.common import get_logger from cubes.errors import * from cubes.mapper import Mapper from bson.objectid import ObjectId __all__ = ( "MongoCollectionMapper" ) DEFAULT_KEY_FIELD = "_id" MONGO_TYPES = { ...
Python
0.999998
@@ -1532,16 +1532,92 @@ value %7D%0A + elif for_project:%0A return %7B op : %5B field_name, value %5D %7D%0A
f359b1feb5567dd3627eba0c03701177355c48a4
Improve coverage in dakota.methods.base module
dakota/tests/test_dakota_base.py
dakota/tests/test_dakota_base.py
#!/usr/bin/env python # # Tests for dakota.methods.base module. # # Call with: # $ nosetests -sv # # Mark Piper (mark.piper@colorado.edu) from nose.tools import raises, assert_true, assert_is_none from dakota.methods.base import DakotaBase from . import start_dir, data_dir # Helpers --------------------------------...
Python
0
@@ -486,16 +486,65 @@ __(self) +%0A self.variable_descriptors = %5B'x0', 'x1'%5D %0A%0A de @@ -569,28 +569,60 @@ f):%0A -pass +return DakotaBase.method_block(self) %0A%0A# Fixtures @@ -1367,17 +1367,27 @@ ert_ -is_none(s +true(type(s) is str )%0A%0A%0A
bf919994661b12771c88034824f095be25479edd
Fix dimensionality in network simulator
network_simulator.py
network_simulator.py
import numpy as np from scipy import stats def exp_cosh(H, beta=1.0): return 0.5 * np.exp(beta * H) / np.cosh(beta * H) def kinetic_ising_model(S, J): """ Returns probabilities of S[t+1,:] being one. :param S: numpy.ndarray (T,N) Binary data where an entry is either 1 ('spike') or -1 ('silence'...
Python
0.00051
@@ -993,20 +993,20 @@ gamma%5B -N, : +:, N %5D = 1%0A @@ -1027,12 +1027,12 @@ ist%5B -N, : +:, N %5D =
52ba0bccca023eb480eecfe9a5448eb97c1656d5
correct id
corehq/apps/userreports/management/commands/rebuild_tables_by_domain.py
corehq/apps/userreports/management/commands/rebuild_tables_by_domain.py
from django.core.management.base import BaseCommand, CommandError from corehq.apps.userreports import tasks from corehq.apps.userreports.models import DataSourceConfiguration, StaticDataSourceConfiguration class Command(BaseCommand): help = "Rebuild all user configurable reporting tables in domain" args = 'do...
Python
0.990875
@@ -771,19 +771,13 @@ s(table. -config _id)%0A
c9e395685de15c6cc4c13449ded3b334958a7049
remove check_urls
neurodocker/utils.py
neurodocker/utils.py
"""Package utility functions.""" def _count_key_occurence_list_of_tuples(list_of_tuples, key): """Return the number of times `key` occurs as a key in `list_of_tuples`.""" return sum(1 for i, _ in list_of_tuples if i == key) # TODO: move this function to neurodocker.generate.py def _string_vals_to_bool(dicti...
Python
0
@@ -2270,57 +2270,8 @@ er,%0A - 'check_urls': namespace.check_urls,%0A
4424e1a9ee4710fa0bfc37a2b34b66ce2dad34ad
Enable --cache-dir for cros unit tests.
cros/commands/init_unittest.py
cros/commands/init_unittest.py
#!/usr/bin/python # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This module tests the init module.""" import glob import imp import mox import os import sys sys.path.insert(0, os.path.abspat...
Python
0.000001
@@ -736,19 +736,35 @@ lf, args +, base_args=None ):%0A - part @@ -959,16 +959,28 @@ tParser( +caching=True )%0A su @@ -1108,16 +1108,98 @@ bparser) +%0A%0A args = base_args if base_args else %5B%5D%0A args += %5Bself.COMMAND%5D + self.args %0A opt @@ -1224,38 +1224,16 @@ se_args( -%5Bself.COMMAN...
e82c7c5f41c10ce61c7788bd082916bc99993e76
remove redundant __init__
corehq/pillows/base.py
corehq/pillows/base.py
from pillowtop.listener import AliasedElasticPillow from dimagi.utils.decorators.memoized import memoized from django.conf import settings VALUE_TAG = '#value' def map_types(item, mapping, override_root_keys=None): if isinstance(item, dict): return convert_property_dict(item, mapping, override_root_keys=...
Python
0.001175
@@ -2889,92 +2889,8 @@ %7D%0A%0A - def __init__(self, **kwargs):%0A super(HQPillow, self).__init__(**kwargs)%0A%0A
51ce4614661203c46a184b0c8bbbd523c268d36d
Improve print format
chainer/training/extensions/print_report.py
chainer/training/extensions/print_report.py
import sys from chainer.training import extension from chainer.training.extensions import log_report as log_report_module class PrintReport(extension.Extension): """Trainer extension to print the accumulated results. This extension uses the log accumulated by a :class:`LogReport` extension to print spe...
Python
0.029833
@@ -1058,19 +1058,21 @@ idth +s = +%5B max(10, max( @@ -1071,18 +1071,15 @@ 10, -max( len(s) +) for @@ -1095,50 +1095,9 @@ ries -))%0A self._entry_width = entry_width +%5D %0A%0A @@ -1115,58 +1115,53 @@ r = +' '.join (('%7B: -%5E: %25d%7D - ' %25 -entry_width) * len(entries) + '%5Cn' +w ...
f4f78fcfb716aed3ec5c0a3b802533912c9e3cba
Update settings.py
dosenbach_lab/settings.py
dosenbach_lab/settings.py
""" Django settings for dosenbach_lab project. Generated by 'django-admin startproject' using Django 1.10. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ impor...
Python
0.000001
@@ -815,17 +815,16 @@ = False%0A -%0A if DEBUG @@ -873,18 +873,16 @@ = True%0A -%0A%0A ALLOWED_
ae836d8fe85a02e158ad4980b98b0bb5ccea05aa
Rename test helpers
test/selenium/src/lib/test_helpers.py
test/selenium/src/lib/test_helpers.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: jernej@reciprocitylabs.com # Maintained By: jernej@reciprocitylabs.com """ Utility classes for page objects used in tests. Details: Most of the te...
Python
0.000004
@@ -633,22 +633,16 @@ m_string -_after (text):%0A @@ -702,23 +702,16 @@ m_string -_before (text):%0A @@ -1319,38 +1319,32 @@ nd_random_string -_after (modal_create_ne @@ -1399,38 +1399,32 @@ nd_random_string -_after (%0A modal_ @@ -1486,38 +1486,32 @@ nd_random_string -_after (%0A modal_ @@ -156...
a823c29b9f4d269a73f2eb60c493de70f6cc2de0
Change name to make consistent with plugin example.
rplugin/python3/cmake.py
rplugin/python3/cmake.py
import neovim from pathlib import Path import subprocess import os @neovim.plugin class Main(object): def __init__(self, vim): self.vim = vim self.old_cmake_files = [ Path("CMakeCache.txt"), Path("cmake_install.cmake") ] self.old_cmake_dir = Path("CMakeFiles") self.cmake_proj = Path...
Python
0
@@ -2022,17 +2022,17 @@ def -C +c MakeComp
fe2e2825021ffd64d1c96608b8e789785d935e04
put correct type in row descriptions
cql/decoders.py
cql/decoders.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not ...
Python
0
@@ -1309,32 +1309,112 @@ unmarshal_noop)%0A + validator = schema.value_types.get(name, schema.default_value_type)%0A desc @@ -1446,22 +1446,21 @@ (name), -compar +valid ator, No @@ -1949,43 +1949,8 @@ shal -lers.get(validator, unmarshal_noop) (col
23e7d285c864b2a538c46c49c80cd2025b780c88
Rename mode to split
chainercv/datasets/camvid/camvid_dataset.py
chainercv/datasets/camvid/camvid_dataset.py
import glob import os import shutil import numpy as np import chainer from chainer.dataset import download from chainercv import utils from chainercv.utils import read_image root = 'pfnet/chainercv/camvid' url = 'https://github.com/alexgkendall/SegNet-Tutorial/archive/master.zip' def get_camvid(): data_root = ...
Python
0.000001
@@ -1310,20 +1310,21 @@ -mode +split (%7B'trai @@ -1446,20 +1446,21 @@ 'auto', -mode +split ='train' @@ -1473,20 +1473,21 @@ if -mode +split not in @@ -1571,20 +1571,21 @@ se pick -mode +split from %5C' @@ -1753,12 +1753,13 @@ mat( -mode +split ))%0A
835fce14239c1b501a0038cec286702d538bd1d6
dnt read input as utf-8
new_extractor_run.py
new_extractor_run.py
#!/usr/bin/env python import json import codecs import sys import os import fnmatch from optparse import OptionParser from initExtractors import ProcessExtractor from initClassifiers import ProcessClassifier from initILP import ProcessILP def load_json_file(file_name): rules = json.load(codecs.open(file_name, 'r'...
Python
0.999618
@@ -402,25 +402,16 @@ ile, 'r' -, 'utf-8' ) as f:%0A @@ -1587,24 +1587,45 @@ 'hair-color' +, 'name', 'eye-color' %5D%0A proper
eae0cff48f4f81ee6f4f91bab23eedcd68263d50
Use py.test's tmpdir fixture
tests/storage/dav/_radicale.py
tests/storage/dav/_radicale.py
# -*- coding: utf-8 -*- ''' vdirsyncer.tests.storage.dav._radicale ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Using the Radicale CalDAV/CardDAV server to test the CalDAV and CardDAV storages. Done by using Werkzeug's test client for WSGI apps. While this is pretty fast, Radicale has so much global state such tha...
Python
0
@@ -511,24 +511,8 @@ rse%0A -import tempfile%0A impo @@ -528,20 +528,22 @@ %0Aimport -mock +pytest %0A%0Afrom w @@ -2870,187 +2870,8 @@ ()%0A%0A - # This one is particularly useful with radicale's debugging logs and%0A # pytest-capturelog, however, it is very verbose.%0A #import radicale.log%0A #radic...
dbff3d940b2f0873d05e487d6dea88714a71c055
Add logging
sacad/rate_watcher.py
sacad/rate_watcher.py
""" This module provides a class with a context manager to help avoid overloading web servers. """ import collections import logging import os import sqlite3 import threading import time import urllib.parse import lockfile MIN_WAIT_TIME_S = 0.01 SUSPICIOUS_LOCK_AGE_S = 120 class WaitNeeded(Exception): """ Exce...
Python
0.000002
@@ -3156,16 +3156,240 @@ _AGE_S:%0A + logging.getLogger().warning(%22Breaking suspicious lock '%25s' created %25.2f seconds ago%22 %25 (plock.lock_file,%0A lock_age))%0A
280aff07f5fcea3aae2be27078648b4660da33b2
Fix tests when html5lib is provided
dashboard/dashboard/__init__.py
dashboard/dashboard/__init__.py
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys _CATAPULT_PATH = os.path.abspath( os.path.join(os.path.dirname(__file__), '..', '..')) # Directories in catapult/third_party requi...
Python
0.001579
@@ -406,24 +406,47 @@ 'graphy',%0A + 'html5lib-python',%0A 'httplib
ae1f3f182a2095b0f1607a8e8e0653cdb5b5f2e2
Remove use of f-string in setup.py #3650 (#3662)
runtime/Python3/setup.py
runtime/Python3/setup.py
from setuptools import setup v = '4.10.1' setup( name='antlr4-python3-runtime', version=v, packages=['antlr4', 'antlr4.atn', 'antlr4.dfa', 'antlr4.tree', 'antlr4.error', 'antlr4.xpath'], package_dir={'': 'src'}, install_requires=[ "typing ; python_version<'3.5'", ], url='http://www...
Python
0
@@ -535,19 +535,17 @@ ion= -f 'ANTLR -%7Bv%7D +%25s run @@ -562,11 +562,15 @@ ython 3' + %25 v %0A)%0A
45d9b9716e57e979ac35619c2508093a775b555d
add comment in sql
PearPyPac/DB.py
PearPyPac/DB.py
# -*- coding: utf-8 -*- import MySQLdb import configparser class PearMySQL(object): def __init__(self): """ initialize """ self.conf = None self.connector = None self.cursor = None def setConfig(self, conf_path): """ set configure """ self.conf = configparser...
Python
0
@@ -1307,32 +1307,52 @@ cursor.close()%0A%0A + # fetch request%0A def queryFet @@ -1513,16 +1513,54 @@ esults%0A%0A + # insert, update & delete request%0A def
7a6f26eac021392abbd6b1f711421f708f69e971
Enable file based sessions
cutepaste/settings/default.py
cutepaste/settings/default.py
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = "^8xp_q0jhh8uhg_yn824n(n&nbwqwnl-w))#n)62#*qdmyn9$!" DEBUG = True ALLOWED_HOSTS = ["*"] INSTALLED_APPS = [ "django.contrib.staticfiles", "django_extensions", "compressor", "cutepaste.files", ] MIDDLEWARE ...
Python
0.000001
@@ -411,32 +411,92 @@ monMiddleware%22,%0A + %22django.contrib.sessions.middleware.SessionMiddleware%22,%0A %22django.midd @@ -1326,18 +1326,25 @@ %22/data/ -db +cutepaste .sqlite3 @@ -1784,83 +1784,62 @@ %0A%5D%0A%0A -# Internationalization%0A# https://docs.djangoproject.com/en/1.9/topics/i18n/ +SESSION_E...
42758d9c709b9842242904c59e9be116958f0357
Handle non-ascii characters better.
d1_client_cli/src/d1_client_cli/print_level.py
d1_client_cli/src/d1_client_cli/print_level.py
def print_level(level, msg): for l in str(msg).split('\n'): print('{0: <8s}{1}'.format(level, l)) def print_debug(msg): print_level('DEBUG', msg) def print_error(msg): print_level('ERROR', msg) def print_warn(msg): print_level('WARN', msg) def print_info(msg): print_level('', msg)
Python
0.00006
@@ -28,20 +28,97 @@ :%0A -for l in str +''' Print the information in as Unicode safe manner as possible.%0A '''%0A for l in unicode (msg @@ -125,16 +125,17 @@ ).split( +u '%5Cn'):%0A @@ -141,14 +141,26 @@ -print( +msg = u'%25s%25s' %25 (u '%7B0: @@ -168,11 +168,8 @@ %3C8s%7D -%7B1%7D '.fo @@ -182,12 +...
1917557f0a7f63184beedcad7276d717278561fc
convert timestamp to string in contrib
sake/contributions.py
sake/contributions.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import lib.git, lib.args, lib.json, lib.time def commit ( message, duration, authors = None ) : authors = lib.args.listify( authors ) with lib.json.proxy( "contributions.json", mode = "w", default = [] ) as ...
Python
0.999247
@@ -437,16 +437,21 @@ stamp%22 : + str( lib.tim @@ -465,16 +465,18 @@ econds() + ) %0A%0A%09%09%7D )%0A
ff427c96500945f2256a71f9576f91e20a1299f8
Support joining sdkconfig.ci files that don't end in a newline
tools/find_build_apps/cmake.py
tools/find_build_apps/cmake.py
import os import sys import subprocess import logging import shutil import re from .common import BuildSystem, BuildItem, BuildError BUILD_SYSTEM_CMAKE = "cmake" IDF_PY = "idf.py" # While ESP-IDF component CMakeLists files can be identified by the presence of 'idf_component_register' string, # there is no equivalent ...
Python
0
@@ -3279,24 +3279,125 @@ ne in f_in:%0A + if not line.endswith(%22%5Cn%22):%0A line += %22%5Cn%22%0A
a7ce91698f010ca98aa51d24bcab1e40e8fe62e4
Fix long broken XLS unit test.
tests/test_convert/test_xls.py
tests/test_convert/test_xls.py
import datetime import unittest import xlrd from xlrd.xldate import xldate_from_date_tuple as xldate, xldate_from_time_tuple as xltime, xldate_from_datetime_tuple as xldatetime from csvkit.exceptions import XLSDataError from csvkit.convert import xls class TestXLS(unittest.TestCase): def test_empty_column(self):...
Python
0
@@ -3318,39 +3318,21 @@ -self.assertRaises(XLSDataError, +column_type = xls @@ -3353,18 +3353,17 @@ umn_type -, +( %5Bxlrd.bi @@ -3433,16 +3433,80 @@ _EMPTY%5D) +%0A self.assertEquals(column_type, xlrd.biffh.XL_CELL_TEXT) %0A%0A d
f14ef6d8544f06db6a44621fd6ef79064227842e
Add utf8mb4 to MySQL CREATE DATABASE statement
daiquiri/core/management/commands/sqlcreate.py
daiquiri/core/management/commands/sqlcreate.py
import socket from django.conf import settings from django.core.management.base import BaseCommand class Command(BaseCommand): requires_system_checks = False can_import_settings = True def add_arguments(self, parser): parser.add_argument('--schema', help='Show commands for a science schema.') ...
Python
0.000004
@@ -2199,32 +2199,81 @@ %60%25(TEST_NAME)s%60 + CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;%0AGRANT ALL PRIV @@ -3519,24 +3519,73 @@ E %60%25(NAME)s%60 + CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ;%0AGRANT ALL
90565382e164e6075f581b42bd62d37d8fa0e0e5
Update address lookup smoketest
cla_public/apps/checker/tests/smoketests.py
cla_public/apps/checker/tests/smoketests.py
import os import unittest import urlparse from bs4 import BeautifulSoup from flask import url_for, _request_ctx_stack import postcodeinfo from cla_public import app from cla_public.apps.checker import api from cla_public.libs import laalaa, zendesk class SmokeTests(unittest.TestCase): def setUp(self): ...
Python
0
@@ -66,16 +66,86 @@ fulSoup%0A +from cla_common.address_lookup.ordnance_survey import OsAddressLookup%0A from fla @@ -185,28 +185,8 @@ tack -%0Aimport postcodeinfo %0A%0Afr @@ -881,23 +881,23 @@ can_ -access_geo +lookup_post code -r (sel @@ -909,17 +909,19 @@ %22 -l +%22%22L ookup a @@ -938,102 +938,26...
6c0397c369ab9d6b9a4f6cbab27b490ef26ee728
Fix TestConstVariables.py
packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py
packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py
"""Check that compiler-generated constant values work correctly""" from __future__ import print_function import os, time import lldb from lldbsuite.test.lldbtest import * import lldbsuite.test.lldbutil as lldbutil class ConstVariableTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @expectedFa...
Python
0
@@ -724,16 +724,88 @@ =%22icc%22)%0A + @expectedFailureAll(archs=%5B'mips', 'mipsel', 'mips64', 'mips64el'%5D)%0A @exp
cf6774afe6aa7af88b4287a4587b861003875bfb
Add binary mode for writing
weboob/applications/boobill/boobill.py
weboob/applications/boobill/boobill.py
# -*- coding: utf-8 -*- # Copyright(C) 2012-2013 Florent Fourcot # # This file is part of weboob. # # weboob 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 yo...
Python
0
@@ -7102,32 +7102,33 @@ th open(dest, 'w +b ') as f:%0A @@ -7819,16 +7819,17 @@ dest, 'w +b ') as f:
68adf95fc12a6cb8fcbec58d53fceb0d2d5763ee
Update HHCellFile.py
doc/source/code/HHCellFile.py
doc/source/code/HHCellFile.py
from matplotlib import pyplot import random from datetime import datetime import pickle from neuron import h, gui class Cell(object): def __init__(self): self.synlist = [] self.createSections() self.buildTopology() self.defineGeometry() self.defineBiophysics() self....
Python
0
@@ -1498,154 +1498,383 @@ 18.8 -%0A self.soma.diam = 18.8%0A self.soma.Ra = 123.0%0A%0A self.dend.L = 200.0%0A self.dend.diam = 1.0%0A self.dend.Ra = 100.0 + %09# length of the entire section in microns%0A self.soma.diam = 18.8 %09# Soma's diameter in microns%0A self.so...
cc23be08c857138e280027aeea1c9b0203efc2af
Fix comment tree-related code, continuing issue #24 - core refactoring
lib/tree.py
lib/tree.py
class TreeNode(object): def __init__(self, dep_, pos_, orth_, idx, n_lefts, n_rights): """Constructs a TreeNode. A TreeNode is a mirror object of a SpaCy token (spacy.token) however intended to be Pickable for caching purposes. This allows iterations where new rules for information extraction ...
Python
0
@@ -7849,30 +7849,29 @@ list.%0A%0A -Return +Yield s:%0A
8724a598b7d08d9cd6cb77541625a80b53e96882
Simplify `map_indexed` by building it from `starmap()` and `zip_with_iterable()`. @jcafhe
rx/core/operators/map.py
rx/core/operators/map.py
from typing import Callable, Any from rx.internal.basic import identity from rx.core import Observable from rx.core.typing import Mapper, MapperIndexed, Observer, Disposable, Scheduler # pylint: disable=redefined-builtin def _map(mapper: Mapper = None) -> Callable[[Observable], Observable]: _mapper = mapper or ...
Python
0.000065
@@ -66,16 +66,88 @@ dentity%0A +from rx.internal.utils import infinite%0A%0Afrom rx import operators as ops%0A from rx. @@ -168,16 +168,22 @@ servable +, pipe %0Afrom rx @@ -1653,1164 +1653,103 @@ -def map_indexed(source: Observable) -%3E Observable:%0A %22%22%22Partially applied indexed map operator.%...
fa4454c023e996e4c7fc108478af98e56d3c2c95
fields should be tuples, not strings
localtv/subsite/admin/edit_attributes/forms.py
localtv/subsite/admin/edit_attributes/forms.py
from django import forms from localtv import models class FeedNameForm(forms.ModelForm): class Meta: model = models.Feed fields = ('name') class FeedAutoCategoriesForm(forms.ModelForm): class Meta: model = models.Feed fields = ('auto_categories') def __init__(self, *arg...
Python
0.999997
@@ -153,16 +153,17 @@ ('name' +, )%0A%0A%0Aclas @@ -284,16 +284,17 @@ egories' +, )%0A%0A d @@ -656,16 +656,17 @@ authors' +, )%0A%0A d
3d38848287b168cfbe3c9fe5297e7f322027634d
Delete excess code in the latest test scenario.
tests/test_parsePoaXml_test.py
tests/test_parsePoaXml_test.py
import unittest import os import re os.sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import parsePoaXml import generatePoaXml # Import test settings last in order to override the regular settings import poa_test_settings as settings def override_settings(): # For now need to ov...
Python
0
@@ -268,334 +268,8 @@ gs%0A%0A -def override_settings():%0A # For now need to override settings to use test data%0A%0A generatePoaXml.settings = settings%0A%0Adef create_test_directories():%0A try:%0A os.mkdir(settings.TEST_TEMP_DIR)%0A except OSError:%0A pass%0A%0A try:%0A os.mkdir...
2369cb9f3f94a979d48cd645b38c8b1ea0827ef9
Set version as 1.16.0
phono3py/version.py
phono3py/version.py
# Copyright (C) 2013 Atsushi Togo # All rights reserved. # # This file is part of phonopy. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notic...
Python
0.000143
@@ -1597,14 +1597,9 @@ %221.1 -5.1-beta +6.0 %22%0A
489327dda676e41f78c8f64f9a1ae6353327b79d
Fix test settings.
test_project/test_project/settings.py
test_project/test_project/settings.py
""" Django settings for test_project project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, .....
Python
0
@@ -2308,17 +2308,17 @@ SSORS + -( +%5B %0A 'mo @@ -2367,17 +2367,17 @@ tions',%0A -) +%5D %0A%0AROOT_U
cd46a099b0af34125fcbd7ce1de1ae20ad002264
Test minor modification
tools/ivwpy/regression/test.py
tools/ivwpy/regression/test.py
#********************************************************************************* # # Inviwo - Interactive Visualization Workshop # # Copyright (c) 2013-2015 Inviwo Foundation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the f...
Python
0.000001
@@ -1758,16 +1758,67 @@ fig = %7B%7D +%0A%09%09self.workspaces = glob.glob(self.path +%22/*.inv%22) %0A%0A%09%09conf @@ -2100,60 +2100,29 @@ :%0A%09%09 -paths = glob.glob(self.path +%22/*.inv%22)%0A%09%09return path +return self.workspace s%0A%0A%09
93281f1dd9ab6849aea17eb81de493586aa0a176
Update checkpoint_converter.py to use tf.compat.v1.train.NewCheckpointReader (#442)
scripts/checkpoint_converter.py
scripts/checkpoint_converter.py
#!/usr/bin/env python3 # Copyright 2018 Google 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 # # Unless required...
Python
0
@@ -1417,16 +1417,26 @@ er = tf. +compat.v1. train.Ne
2c85ba795b9b3334f217fa9978634a4708efbe7d
Make new directory when extracting.
create_caffe_splits.py
create_caffe_splits.py
#!/usr/bin/env python import glob import numpy as np from scipy.io import loadmat # Read .mat file containing training, testing, and validation sets. setid = loadmat('data/setid.mat') # The .mat file is 1-indexed, so we subtract one to match Caffe's convention. idx_train = setid['trnid'][0] - 1 idx_test = setid['tsti...
Python
0
@@ -786,17 +786,16 @@ ed(777)%0A -%0A idx_test @@ -916,36 +916,254 @@ ain))%5D%0A%0A -write_set_file('data +CAFFE_HOME = os.getenv('CAFFE_HOME', '')%0Aif CAFFE_HOME == '':%0A raise Exception('CAFFE_HOME must be set to the location of your Caffe installation.')%0A%0Aos.mkdir(CAFFE_HOME + '/data/oxford102')%0Awrite...
02d266b6e34b84d4cca5bcfc05d78490a1d10dec
Print import error when plugin import fails (#6748)
saleor/plugins/checks.py
saleor/plugins/checks.py
from typing import TYPE_CHECKING, List from django.conf import settings from django.core.checks import Error, register from django.utils.module_loading import import_string if TYPE_CHECKING: from .base_plugin import BasePlugin @register() def check_plugins(app_configs, **kwargs): """Confirm a correct import...
Python
0
@@ -1183,32 +1183,37 @@ cept ImportError + as e :%0A errors @@ -1230,47 +1230,35 @@ ror( -%22Plugin with path: %25s doesn't exist%22 %25 +f%22Failed to import plugin %7B plug @@ -1264,16 +1264,23 @@ gin_path +%7D: %7Be%7D%22 ))%0A%0A
10a19a075f13a035d1cf37f3f1d9c66a049d7f67
Add highstate and sls last data files for last run on minion
salt/modules/state.py
salt/modules/state.py
''' Control the state system on the minion ''' # Import Python libs import copy import os # Import Salt libs import salt.state from salt._compat import string_types __outputter__ = { 'highstate': 'highstate', 'sls': 'highstate', 'top': 'highstate', ...
Python
0
@@ -122,16 +122,36 @@ t.state%0A +import salt.payload%0A from sal @@ -1929,35 +1929,34 @@ te(opts)%0A ret -urn + = st_.call_highst @@ -1957,24 +1957,185 @@ highstate()%0A + serial = salt.payload.Serial(__opts__)%0A with open(os.path.join(__opts__%5B'cachedir'%5D, 'highstate.p')) as fp_:%0A serial....
7ccf28f42896367862612a3fd5ffbcb0cf53f671
fix bug
requestspool/http.py
requestspool/http.py
#!/usr/bin/python # -*- coding: utf-8 -*- """ Copyright (c) 2014 windpro Author : windpro E-mail : windprog@gmail.com Date : 14/12/26 Desc : 发起http请求的相关方法和http信息 """ import requests from wsgiref.util import is_hop_by_hop from . import config from . import httpinfo from .interface import BaseHttpInfo ...
Python
0.000001
@@ -554,16 +554,8 @@ EBUG - or True :%0A
fde10378c47ed3d7e047ac3fc650b35ed3e52273
Check for argparse io failure
wiggelen/scripts.py
wiggelen/scripts.py
""" Command line interface for working with wiggle tracks. Copyright (c) 2012 Leiden University Medical Center <humgen@lumc.nl> Copyright (c) 2012 Martijn Vermaat <m.vermaat.hg@lumc.nl> Copyright (c) 2012 Jeroen Laros <j.f.j.laros@lumc.nl> Licensed under the MIT license, see the LICENSE file. """ import sys import...
Python
0.000001
@@ -2945,24 +2945,37 @@ le track')%0A%0A + try:%0A args = p @@ -2992,16 +2992,70 @@ e_args() +%0A except IOError as e:%0A parser.error(str(e)) %0A%0A if
dd896a3baabb7f6eb9cc24845b5842dd5a25c6d0
Bump version to 0.1.2.
design/__init__.py
design/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '0.1.1'
Python
0
@@ -59,11 +59,11 @@ = '0.1. -1 +2 '%0A
5cea6dd973a2bf82130a34f363bd9c65d3e840e7
Remove conference homepages
scripts/populate_conferences.py
scripts/populate_conferences.py
#!/usr/bin/env python # encoding: utf-8 import os import sys from modularodm import Q from modularodm.exceptions import ModularOdmException from framework.auth.core import User from website import settings from website.app import init_app from website.conferences.model import Conference def main(): init_app(s...
Python
0
@@ -2409,55 +2409,12 @@ l': -'http://spspmeeting.org/2015/General-Info.aspx' +None ,%0A @@ -2689,66 +2689,12 @@ l': -'http://www.psychologicalscience.org/index.php/convention' +None ,%0A @@ -2988,47 +2988,12 @@ l': -'http://icps.psychologicalscience.org/' +None ,%0A
659dd39b0ea7b001594a5330e75d2c25980eb501
Change the success/failure messages to more generic charactersets
winnaker/helpers.py
winnaker/helpers.py
# -*- coding: utf-8 -*- from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import StaleElementReferenceException from selenium.common.exceptions import TimeoutException from ...
Python
0.001143
@@ -3238,72 +3238,64 @@ -%E2%95%94%E2%95%90%E2%95%97%E2%95%94%E2%95%90%E2%95%97%E2%95%94%E2%95%90%E2%95%97%E2%95%94%E2%95%90%E2%95%97%E2%95%94%E2%95%90%E2%95%97%E2%95%94%E2%95%A6%E2%95%97%0A %E2%95%A0%E2%95%90%E2%95%9D%E2%95%A0%E2%95%90%E2%95%A3%E2%95%9A%E2%95%90%E2%95%97%E2%95%9A%E2%95%90%E2%95%97%E2%95%91%E2...
a0675652d296620a3e0beeadf0ff8bdb6c6fdf05
comment call to train tracker
webserver/opentrain/analysis/logic.py
webserver/opentrain/analysis/logic.py
import models import json import reports.models import common.ot_utils from django.conf import settings def analyze_raw_reports(clean=True): if clean: delete_all_reports() COUNT = 100 offset = 0 while True: cont = analyze_raw_reports_subset(offset,COUNT) offset += COUNT ...
Python
0
@@ -2724,24 +2724,25 @@ rt(rr):%0A +# import algor @@ -2759,16 +2759,22 @@ _tracker + # TMP %0A ite @@ -2839,24 +2839,25 @@ (items)%0A +# for report i @@ -2862,29 +2862,36 @@ in reports: + # TMP %0A +# algorith @@ -2920,24 +2920,29 @@ port(report) + #TMP %0A %0A %0A#
c15db53c4accf690f88392bca5aaa42ade97ea5e
Add trailing slash to app's website URL when generating previously shortened URLs
cuenco/views.py
cuenco/views.py
import md5 from cuenco import app, db from cuenco.models import WebLink from flask import request, url_for, render_template, redirect, jsonify from urlparse import urlparse from sqlalchemy import func from datetime import datetime #base-62 encode a number def encode(num): if num < 1: raise Exception("encode: Numb...
Python
0.000001
@@ -1957,16 +1957,22 @@ _URL%22%5D + + %22/%22 + str(exi
d281c90304fdc63c081f809896d0ab4dfaddcbc9
Test explicit starting and stopping in test script
scripts/try_keyboard_monitor.py
scripts/try_keyboard_monitor.py
#!/usr/bin/python2 # Copyright (c) 2010, 2011, Sebastian Wiesner <lunaryorn@googlemail.com> # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the abov...
Python
0
@@ -1657,16 +1657,25 @@ ComboBox +, QAction )%0A%0Afrom @@ -1862,16 +1862,217 @@ indow)%0A%0A + start_action = QAction('Start', window)%0A stop_action = QAction('Stop', window)%0A toolbar = window.addToolBar('Monitor')%0A toolbar.addAction(start_action)%0A toolbar.addAction(stop_action)%0A%0A ce...
4679a78c3fd18a58b320db8e22902687a3992957
remove python 3 compatibility line
tests/Observatory/test_Observatory.py
tests/Observatory/test_Observatory.py
import unittest from tests.TestSupport.Info import resource_path import EXOSIMS import EXOSIMS.Prototypes.Observatory import EXOSIMS.Observatory import pkgutil, os, json, sys, copy from EXOSIMS.util.get_module import get_module import numpy as np from astropy.time import Time import astropy.units as u from tests.TestSu...
Python
0.000009
@@ -357,131 +357,8 @@ ms%0A%0A -# Python 3 compatibility:%0Aif sys.version_info%5B0%5D %3E 2:%0A from io import StringIO%0Aelse:%0A from StringIO import StringIO%0A%0A %0Acla
23134f90a21b1b3dc801b65c1af4306e20c02cf8
Fix typo
cupy/sorting/search.py
cupy/sorting/search.py
from cupy import elementwise from cupy import reduction def argmax(a, axis=None, dtype=None, out=None, keepdims=False): """Returns the indices of the maximum along an axis. Args: a (cupy.ndarray): Array to take argmax. axis (int): Along which axis to find the maximum. ``a`` is flattened by ...
Python
0.999999
@@ -1822,17 +1822,16 @@ %60%60where -r (conditi
a97c41f568ca2f3b66e748c4da3c5b283036bdaf
save iteratively
examples/asdEvol/netParams.py
examples/asdEvol/netParams.py
from netpyne import specs, sim try: from __main__ import cfg except: from simConfig import cfg # Network parameters netParams = specs.NetParams() # -------------------------------------------------------- # Simple network # -------------------------------------------------------- # Population parameters netParams...
Python
0
@@ -1399,7 +1399,5 @@ exc' -%0A%09%0A +%7D
bee5a8b61a9ce0d1ecd4c45155181ebd2d669081
Add argument to pack() so caller can receive identifier rewrites. (#609)
cwltool/pack.py
cwltool/pack.py
from __future__ import absolute_import import copy import re from typing import Any, Callable, Dict, List, Set, Text, Union, cast from schema_salad.ref_resolver import Loader, SubLoader from six.moves import urllib from ruamel.yaml.comments import CommentedSeq, CommentedMap from .process import shortname, uniquename ...
Python
0
@@ -3198,24 +3198,42 @@ ri, metadata +, rewrite_out=None ):%0A # typ @@ -3303,24 +3303,42 @@ , Dict%5BText, + Text%5D, Dict%5BText, Text%5D) -%3E D @@ -4202,24 +4202,56 @@ : Set%5BText%5D%0A + if rewrite_out is None:%0A rewrite @@ -4280,16 +4280,56 @@ t, Text%5D +%0A else:%0A rewrite = ...
3ae086aff4ac24792c026e49775dc8feca2aa4eb
Add filename sanitiser
salt/utils/general.py
salt/utils/general.py
# -*- coding: utf-8 -*- # # Copyright 2016 SUSE LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
Python
0.00081
@@ -1064,16 +1064,282 @@ value)%0A%0A + @staticmethod%0A def filename(value):%0A '''%0A Remove everything that would affect paths in the filename%0A%0A :param value:%0A :return:%0A '''%0A return re.sub('%5B%5Ea-zA-Z0-9.-_ %5D', '', os.path.basename(InputSanitizer.trim(va...
f9f0bcde2350361040fb58e061138b7666a7fb60
Set bolt=None by default and use kernel_version
cycli/driver.py
cycli/driver.py
from datetime import datetime from cycli.table import pretty_table from py2neo import Graph, Unauthorized, remote from py2neo.packages.httpstream import SocketError, http class AuthError(Exception): pass class ConnectionError(Exception): pass def duration_in_ms(start, end): return int(round((end - sta...
Python
0.000001
@@ -842,11 +842,11 @@ olt= -Tru +Non e):%0A @@ -1244,21 +1244,27 @@ f.graph. -neo4j +dbms.kernel _version
448840aeccd20dc5cdbb9dfba9194da0c778db96
Implement AgentManager() methods
piper/db/rethink.py
piper/db/rethink.py
import logbook import rethinkdb as rdb from piper.db import core as db class RethinkManager: def __init__(self, db): self.db = db self.conn = db.conn self.table = rdb.table(self.table_name) self.log = logbook.Logger(self.__class__.__name__) class AgentManager(RethinkManager, db...
Python
0.000002
@@ -367,24 +367,28 @@ def get(self +, id ):%0A r @@ -391,33 +391,203 @@ r -aise NotImplementedError( +eturn self.table.get(id).run(self.conn)%0A%0A def add(self, data):%0A return self.table.insert(data).run(self.conn)%0A%0A def update(self, data):%0A self.table.replace(data).run(self.co...
bcfe1bafd8e28d5be0cc551930d0d43149282e71
Fix url
noveltorpedo/urls.py
noveltorpedo/urls.py
from django.conf.urls import include, url from . import views app_name = 'noveltorpedo' urlpatterns = [ url(r'^$', include('haystack.urls')), ]
Python
0.999531
@@ -114,9 +114,8 @@ (r'%5E -$ ', i
98cc648ca2931d9070de8448cb557ec9a54e8ce6
Increase IPMI attempts to try to get around Flakey IPMI.
teuthology/orchestra/remote.py
teuthology/orchestra/remote.py
from . import run import time class Remote(object): """ A connection to a remote host. This is a higher-level wrapper around Paramiko's `SSHClient`. """ # for unit tests to hook into _runner = staticmethod(run.run) def __init__(self, name, ssh, shortname=None, console=None): self...
Python
0
@@ -4145,17 +4145,17 @@ ttempts= -3 +6 ):%0A
291fbcd47401cd8ba0d87bdcd817f60f70d41b15
Fix suppression counts - ints were concatenated, not summed up Review URL: http://codereview.chromium.org/243091
tools/valgrind/tsan_analyze.py
tools/valgrind/tsan_analyze.py
#!/usr/bin/python # Copyright (c) 2006-2008 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. # tsan_analyze.py ''' Given a ThreadSanitizer output file, parses errors and uniques them.''' import gdb_helper import logging ...
Python
0.003567
@@ -3661,24 +3661,51 @@ ch.groups()%0A + count = int(count)%0A if s
24e69191f47801b0dd191e7529bf627829791771
Drop Py2 and six on salt/utils/pkg/rpm.py
salt/utils/pkg/rpm.py
salt/utils/pkg/rpm.py
# -*- coding: utf-8 -*- """ Common functions for working with RPM packages """ # Import python libs from __future__ import absolute_import, print_function, unicode_literals import collections import datetime import logging import platform import subprocess import salt.utils.path import salt.utils.stringutils # Impo...
Python
0
@@ -1,28 +1,4 @@ -# -*- coding: utf-8 -*-%0A %22%22%22%0A @@ -52,104 +52,8 @@ %22%22%22%0A -%0A# Import python libs%0Afrom __future__ import absolute_import, print_function, unicode_literals%0A%0A impo @@ -191,58 +191,8 @@ ls%0A%0A -# Import 3rd-party libs%0Afrom salt.ext import six%0A%0A log @@ -2623,17 +2623,16...
494a02e260195350e0aae0bb7a0a303bb2fa3843
fix problem, when last group is missing
smart_selects/form_fields.py
smart_selects/form_fields.py
from smart_selects.widgets import ChainedSelect from django.forms.models import ModelChoiceField from django.forms import ChoiceField from django.db.models import get_model class ChainedModelChoiceField(ModelChoiceField): def __init__(self, app_name, model_name, chain_field, model_field, show_all, auto_choose, ma...
Python
0.000005
@@ -2079,21 +2079,50 @@ -final +group_indexes = %7B%7D%0A choices = %5B(%22%22, @@ -2154,18 +2154,16 @@ ------%22) -, %5D%0A @@ -2168,20 +2168,24 @@ -group = None +i = len(choices) %0A @@ -2232,44 +2232,22 @@ -if not group or group%5B0%5D != unicode( +order_field = geta @@ ...
04ae99eca03a974f2a62e3a235c2605efd9d22ff
Add a comment explaining the except
salt/utils/process.py
salt/utils/process.py
# -*- coding: utf-8 -*- # Import python libs import logging import os import signal import time import sys import multiprocessing import signal # Import salt libs import salt.utils log = logging.getLogger(__name__) HAS_PSUTIL = False try: import psutil HAS_PSUTIL = True except ImportError: pass def set...
Python
0
@@ -5650,24 +5650,111 @@ rocess(pid)%0A + # OSError is raised if a signal handler is called (SIGTERM) during os.wait%0A
a45299dacc880619dee89a2479424bb7f775c074
remove print
ooiservices/app/main/routes.py
ooiservices/app/main/routes.py
#!/usr/bin/env python ''' API v1.0 List ''' __author__ = 'M@Campbell' from flask import jsonify, request, current_app, url_for, make_response from ooiservices.app.main import api from ooiservices.app import db, cache from authentication import auth from ooiservices.app.models import PlatformDeployment, InstrumentDepl...
Python
0.000793
@@ -3584,25 +3584,24 @@ L%22+%22001%22 -%0A print re @@ -3596,34 +3596,8 @@ -print reference_designator %0A
4ee2986eb12ff06e6e31c362ac2fa873eb3429b9
use os.makedirs to create the full STATIC_PATH/directory if needed
djangobwr/management/commands/bower_install.py
djangobwr/management/commands/bower_install.py
import os import json import tempfile import shutil from subprocess import call from django.core.management.base import BaseCommand from django.conf import settings from djangobwr.finders import AppDirectoriesFinderBower class Command(BaseCommand): def handle(self, *args, **options): temp_dir = tempfil...
Python
0
@@ -1065,121 +1065,8 @@ ))%0A%0A - if not os.path.exists(settings.STATIC_ROOT):%0A os.mkdir(settings.STATIC_ROOT)%0A%0A @@ -1200,12 +1200,15 @@ os.m -k +ake dir +s (os. @@ -1251,16 +1251,17 @@ ctory))%0A +%0A
de4fd6535f5d80a932e2281fb28459ff88975831
Drop Py2 and six on salt/utils/atomicfile.py
salt/utils/atomicfile.py
salt/utils/atomicfile.py
# -*- coding: utf-8 -*- """ A module written originally by Armin Ronacher to manage file transfers in an atomic way """ # Import python libs from __future__ import absolute_import, print_function, unicode_literals import errno import os import random import shutil import sys import tempfile import time # Import salt...
Python
0
@@ -1,28 +1,4 @@ -# -*- coding: utf-8 -*-%0A %22%22%22%0A @@ -93,104 +93,8 @@ %22%22%22%0A -%0A# Import python libs%0Afrom __future__ import absolute_import, print_function, unicode_literals%0A%0A impo @@ -184,27 +184,8 @@ me%0A%0A -# Import salt libs%0A impo @@ -210,33 +210,8 @@ dacl -%0Afrom salt.ext import six...
64566a37ef45f92da289f01e3df11bcd63e06277
Define some client internal keywords which are expected(and skip errors on them)
salt/client/mixins.py
salt/client/mixins.py
# coding: utf-8 ''' A collection of mixins useful for the various *Client interfaces ''' from __future__ import print_function from __future__ import absolute_import import datetime import logging import multiprocessing import salt.utils import salt.utils.event from salt.utils.event import tagify from salt.utils.doc i...
Python
0
@@ -379,16 +379,120 @@ ame__)%0A%0A +CLIENT_INTERNAL_KEYWORDS = frozenset(%5B%0A 'client',%0A 'cmd',%0A 'eauth',%0A 'fun',%0A 'match'%0A%5D)%0A%0A %0Aclass S @@ -1229,32 +1229,77 @@ _call(l_fun, low +, expected_extra_kws=CLIENT_INTERNAL_KEYWORDS )%0A ret =
29f0d9937070d1946be1349541ee9d98e8116e9a
Fix embed vector length, and change initialization to 1./2d
thinc/neural/_classes/embed.py
thinc/neural/_classes/embed.py
from .model import Model class Embed(Model): name = 'embed' @property def describe_params(self): init = self.ops.xavier_uniform_init yield 'W-%s' % self.name, (self.nr_out, self.vector_length), init @property def shape(self): if self.output_shape is None or self.input...
Python
0.000006
@@ -595,25 +595,24 @@ (self.vector -s _length,) if @@ -623,17 +623,16 @@ f.vector -s _length @@ -1337,24 +1337,60 @@ cate(shape)%0A + scale = 1. / (2 * shape%5B0%5D)%0A para @@ -1428,16 +1428,20 @@ rm(- -0.1, 0.1 +scale, scale , sh
500253425b2ea0dd79359378f8c6fc41e191d52c
Integrate LLVM at llvm/llvm-project@a617ff0ba001
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "163bb6d64e5f1220777c3ec2a8b58c0666a74d91" LLVM_SHA256 = "f36211d9e34dcdd364bdef02efeadacca7e21c3e1b2ee73a2e60286bcd67db7e" tf_http_archive( ...
Python
0.000001
@@ -160,48 +160,48 @@ = %22 -163bb6d64e5f1220777c3ec2a8b58c0666a74d91 +a617ff0ba0017b1df010d480eceb13066ecd122e %22%0A @@ -221,72 +221,72 @@ = %22 -f36211d9e34dcdd364bdef02efeadacca7e21c3e1b2ee73a2e60286bcd67db7e +019068664d4e73d1d3b4bdd56237d1e19251858eafc88d108428f9df98b6d074 %22%0A%0A
3414a8320153c8ae850c5382c35bd2b6c1a0b9a6
Integrate LLVM at llvm/llvm-project@f2b94bd7eaa8
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "bc432c96349c1b0a381b824f11b057ff0de0b571" LLVM_SHA256 = "a49bb4d643f35f63d72ccea0d3fe09cf374908a2400197ce5391f60596be0701" tfrt_http_archive( ...
Python
0.000002
@@ -162,133 +162,133 @@ = %22 -bc432c96349c1b0a381b824f11b057ff0de0b571%22%0A LLVM_SHA256 = %22a49bb4d643f35f63d72ccea0d3fe09cf374908a2400197ce5391f60596be0701 +f2b94bd7eaa83d853dc7568fac87b1f8bf4ddec6%22%0A LLVM_SHA256 = %22ac53a2a6516f84031d9a61d35700b0e6ba799292cfb54cfc17ed48958de8ff49 %22%0A%0A
7b92eaec3eefc4c839fee3323fb7a970a5b72f64
Integrate LLVM at llvm/llvm-project@4be3fc35aa8b
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "8e82bc840de5b2264875a5f0967845867833ccfb" LLVM_SHA256 = "683e8d615013efe0abafd3098c05e7f348d829fd0adfcdcf441236780bdff074" tfrt_http_archive( ...
Python
0.000001
@@ -162,133 +162,133 @@ = %22 -8e82bc840de5b2264875a5f0967845867833ccfb%22%0A LLVM_SHA256 = %22683e8d615013efe0abafd3098c05e7f348d829fd0adfcdcf441236780bdff074 +4be3fc35aa8b27494968e9a52eb0afa0672d98e7%22%0A LLVM_SHA256 = %22fdc350e798d8870496bd8aa4e6de6b76ae2423f1d0a4e88ff238ad9542683c00 %22%0A%0A
2db334e452e2ee2d5f0cbc516dc6cb04b61e598d
Check for `GNdr` grammeme in `gender-match` label
yargy/labels.py
yargy/labels.py
GENDERS = ("masc", "femn", "neut", "Ms-f") def gram_label(token, value, stack): return value in token.grammemes def gram_not_label(token, value, stack): return not value in token.grammemes def gender_match_label(token, index, stack, genders=GENDERS): results = ((g in t.grammemes for g in genders) for t i...
Python
0.000001
@@ -34,18 +34,26 @@ , %22Ms-f%22 +, %22GNdr%22 )%0A - %0Adef gra @@ -378,32 +378,49 @@ , case_token_msf +, case_token_gndr = next(results) @@ -469,16 +469,38 @@ oken_msf +, candidate_token_gndr = next( @@ -643,16 +643,16 @@ s%5B:2%5D):%0A - @@ -667,24 +667,102 @@ return True%0A + elif case_t...
b4b4c09cd33cc66aef5390799b37597c654909f8
Print content if verbose
pipe2py/modules/pipexpathfetchpage.py
pipe2py/modules/pipexpathfetchpage.py
# pipexpathfetchpage.py # vim: sw=4:ts=4:expandtab import urllib2 import re from html5lib import parse from lxml import etree from pipe2py import util from pipe2py.lib.dotdict import DotDict def pipe_xpathfetchpage(context=None, _INPUT=None, conf=None, **kwargs): """XPath Fetch Page module _INPUT -- not us...
Python
0.999999
@@ -1489,16 +1489,231 @@ tin1')%0A%0A + if context and context.verbose:%0A print '............Content .................'%0A print content%0A print '...............EOF...................'%0A%0A
34af76fd69a62988ce3b76754541e21aba6d5bf3
Handle spaces in paths in StripChromeSymbols.py
xperf/scripts/StripChromeSymbols.py
xperf/scripts/StripChromeSymbols.py
""" This script exists to work around severe performane problems when WPA or other Windows Performance Toolkit programs try to load the symbols for the Chrome web browser. Some combination of the enormous size of the symbols or the enhanced debug information generated by /Zo causes WPA to take about twenty minutes to p...
Python
0.000001
@@ -3227,30 +3227,19 @@ %5B%5D%0A%0A -for line in os.popen(%22 +command = ' xper @@ -3243,18 +3243,20 @@ perf -i +%22 %25s +%22 -tle -t @@ -3276,17 +3276,17 @@ e -dbgid -%22 +' %25 trace @@ -3289,16 +3289,59 @@ racename +%0Aprint command%0Afor line in os.popen(command ).readli @@ -5233,17 +5233,17 @@ mmand...
cf637ddc34e903c868fcf6eee58654dd59553013
fix list path bug
kvmagent/kvmagent/kvmagent.py
kvmagent/kvmagent/kvmagent.py
''' @author: frank ''' from zstacklib.utils import plugin from zstacklib.utils import http from zstacklib.utils import log from zstacklib.utils import jsonobject from zstacklib.utils import daemon from zstacklib.utils import linux import os.path import traceback import pprint import functools import sys import string ...
Python
0.000001
@@ -3807,131 +3807,45 @@ pwd' -)%0A sub_paths = shell.call('ls %25s' %25 path)%0A for f in sub_paths:%0A s.append(%22%25s/%25s%22 %25 (pwd, f))%0A return s%0A%0A +, True, path).strip()%0A sub_paths = she @@ -3856,19 +3856,16 @@ all('ls --f %25s' %25 pa @@ -3871,134 +3871,21 @@ ath) -%0A ...
0a722c29be0c3bb5c84a3579717e6042e365fdad
Bump version to 3.1.2-dev
indico/__init__.py
indico/__init__.py
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.util.mimetypes import register_custom_mimetypes __version__ = '3.1.1' PREFERRED_PYTHON_VERSI...
Python
0
@@ -288,17 +288,21 @@ = '3.1. -1 +2-dev '%0APREFER
7d7cde3f6d77291ecb6ac4fa4a941b1fad60a03b
Fix setup.py
src/pymfony/component/system/setup.py
src/pymfony/component/system/setup.py
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of the pymfony package. # # (c) Alexandre Quercia <alquerci@email.com> # # For the full copyright and license information, please view the LICENSE # file that was distributed with this source code. from __future__ import absolute_import; import os; from dis...
Python
0
@@ -573,16 +573,143 @@ ystem',%0A + 'pymfony.component.system.py2',%0A 'pymfony.component.system.py2.minor6',%0A 'pymfony.component.system.py3',%0A %5D;%0A%0A
dbcb69100795d8ac00dd3ceb91b06b94e2596c7f
upgrade spectrum simu
lase/drivers/spectrum_simu.py
lase/drivers/spectrum_simu.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from .base_simu import BaseSimu class SpectrumSimu(BaseSimu): def __init__(self): n = 4096 super(SpectrumSimu, self).__init__(n) self.waveform_size = n self.spectrum = np.zeros(self.sampling.n, dtype=np.float32) ...
Python
0
@@ -1671,8 +1671,132 @@ pass%0A +%0A def get_peak_values(self):%0A return 0%0A%0A def set_address_range(self, address_low, address_high):%0A pass%0A%0A
7f267e8c6b3b068dba8f32e59e13e26413fd51cc
Update dump utilities to allow writing to CSV
dump/dump.py
dump/dump.py
#! /usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import logging import functools from datetime import datetime import json import codecs import time import os.path logger = logging.getLogger('data') ''' The decorators named 'dump_*' take a "harvest" function that yields record...
Python
0
@@ -1309,24 +1309,471 @@ t',%0A )%0A%0A%0A +def dump_csv(dest_basename, column_names, delimiter=','):%0A ''' Iterate over a generator function to dump the text lines it yields to a file. '''%0A return functools.partial(%0A _wrap_harvest_func_with_dump_func,%0A dump_func=functools.partial(%0A ...
4db1bcf44bb2f3cc9621d9a58739029721a31f14
add wildcards to bundled libzmq glob
zmq/__init__.py
zmq/__init__.py
"""Python bindings for 0MQ.""" #----------------------------------------------------------------------------- # Copyright (C) 2010-2012 Brian Granger, Min Ragan-Kelley # # This file is part of pyzmq # # Distributed under the terms of the New BSD License. The full license is in # the file COPYING.BSD, distributed ...
Python
0
@@ -771,11 +771,13 @@ bzmq +* .%25s +* ' %25
4adc6d32692e6d2e2e70b81a8f7ec5865ed687a3
Make pep8 happy
letsencrypt/plugins/manual.py
letsencrypt/plugins/manual.py
"""Manual plugin.""" import os import logging import pipes import shutil import signal import socket import subprocess import sys import tempfile import time import zope.component import zope.interface from acme import challenges from letsencrypt import errors from letsencrypt import interfaces from letsencrypt.plug...
Python
0.00001
@@ -6085,24 +6085,28 @@ + self.IP_DISC
294640c686b17a8df71e485c23fe0e3c5b0ce644
Add tmpfile during downloading.
command_pull.py
command_pull.py
#!/usr/bin/python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai import os import sys import logging import urllib2 import fnmatch import colorama import progressbar import global_mod as gm from apiclient import errors from command_base import DriveServiceCommand lg = logging.getLogger("PULL") lg.setLevel(logging....
Python
0
@@ -3725,24 +3725,121 @@ ive_size))%0A%0A + print %22%25s downloading ...%22 %25 pfile%5B'title'%5D%0A tmpfile = %22%25s.part%22 %25 pfile%5B'title'%5D%0A size @@ -3902,30 +3902,23 @@ th open( +tm pfile -%5B'title'%5D , 'w') a @@ -3998,49 +3998,8 @@ ts=%5B -pfile%5B'title'%5D,%0A ...
921e7ce1d767c224323340df4b3d4f16242a3fad
add error message if -d and -p are both unused when running dynStruct.py
dynStruct.py
dynStruct.py
#!/usr/bin/python3 import argparse import pickle import json import _dynStruct def get_args(): parser = argparse.ArgumentParser(description='Dynstruct analize tool') parser.add_argument('-d', type=str, dest='dynamo_file', help='output file from dynStruct dynamoRio client') parser.a...
Python
0.000002
@@ -1628,16 +1628,243 @@ _args()%0A +%0A if not args.previous_file and not args.dynamo_file:%0A print(%22This tool is useless without data, use -d or -p option to give%5C%0A data extract by the gatherer or serialized data from a previous run%22)%0A exit(0)%0A %0A @@ -2575,257 +2575,8 @@ s...
a44ec4543fc6951cd45ba3c1696e428e36a9c161
Make sure the target of Say isn't in Unicode, otherwise Twisted complains
commands/say.py
commands/say.py
from CommandTemplate import CommandTemplate from IrcMessage import IrcMessage class Command(CommandTemplate): triggers = ['say', 'do', 'notice'] helptext = "Makes the bot say the provided text in the provided channel (format 'say [channel/user] text')" adminOnly = True showInCommandList = False def execute(sel...
Python
0.000013
@@ -1051,55 +1051,331 @@ %0A%09%09%09 -message.bot.sendMessage(message.messageParts%5B0%5D +target = message.messageParts%5B0%5D%0A%09%09%09#Make absolutely sure the target isn't unicode, because Twisted doesn't like that%0A%09%09%09try:%0A%09%09%09%09target = target.encode('utf-8')%0A%09%09%09except (UnicodeEncodeErr...
eb351d2d6fc45d249a2c47cab94b414a59c9a62f
Create email_lib.py
email_lib.py
email_lib.py
# -*- coding: utf-8 -*- from email.mime.text import MIMEText from smtplib import SMTP import os #sender_email = os.environ.get('MAIL_USER', None) #sender_pass = os.environ.get('MAIL_PASS', None) #server_email = os.environ.get('MAIL_SERVER', None) #port_email = os.environ.get('MAIL_PORT', None) #SSL_email = os...
Python
0.000015
@@ -22,86 +22,318 @@ *-%0D%0A -from email.mime.text import MIMEText%0D%0Afrom smtplib import SMTP%0D%0Aimport os%0D%0A%0D%0A# +%0D%0A##This file contains functions to interact with the customer with email in the main.py file##%0D%0A%0D%0Afrom email.mime.text import MIMEText%0D%0Afrom smtplib import SMTP%0D%0Aimport os...
a95c19a5a62dc71ccd0dcffcc49746f9e4e25bfc
Add informational logging for bots when they are in 'sleeping mode'
intelmq/lib/bot.py
intelmq/lib/bot.py
import re import sys import json import time import ConfigParser from intelmq.lib.message import Event from intelmq.lib.pipeline import Pipeline from intelmq.lib.utils import decode, log SYSTEM_CONF_FILE = "/opt/intelmq/etc/system.conf" PIPELINE_CONF_FILE = "/opt/intelmq/etc/pipeline.conf" RUNTIME_CONF_FI...
Python
0.000014
@@ -2185,24 +2185,142 @@ .process()%0D%0A + self.logger.info(%22Bot stops processing. Sleeps for 'rate_limit' = %25ds%22 %25 self.parameters.rate_limit)%0D%0A
947a4959af8f29c5d3968fb208d8787f5e66b451
Remove another unnecessary wildcard import.
invoicing/views.py
invoicing/views.py
""" SynLogistics: Invoicing and subscription views. """ # # Copyright (C) by Wilco Baan Hofman <wilco@baanhofman.nl> 2011 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either versi...
Python
0
@@ -1248,17 +1248,23 @@ import -* +Decimal %0Afrom da
e56cb535bb35679f71d66528e3a02dab64e0de73
add more CSS formatting for tables
encodings.py
encodings.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from collections import defaultdict from textwrap import TextWrapper from optparse import OptionParser from platform import python_version, node from time import strftime parser = OptionParser() parser.add_option('-w', '--wrap', dest='wrap', action='store_true', help...
Python
0
@@ -2429,16 +2429,94 @@ nowrap; + text-align: left; vertical-align: top; %7D%0A td %7B vertical-align: text-top; %7D%0A %3C
42c2389c88fc52e186079df1c426af429537ed0e
Update blender plugin version to the next release number
io_EDM/__init__.py
io_EDM/__init__.py
bl_info = { 'name': "Import: .EDM model files", 'description': "Importing of .EDM model files", 'author': "Nicholas Devenish", 'version': (0,0,1), 'blender': (2, 78, 0), 'location': "File > Import/Export > .EDM Files", 'category': 'Import-Export', } try: import bpy def register(): from .io_oper...
Python
0
@@ -147,11 +147,11 @@ (0, -0,1 +3,0 ),%0A
d70cbbad8dae1f5b23fc68bb3f806a86166c1f7d
Add a nice way to get xtrace output from tests
module/testing.py
module/testing.py
# Copyright 2014 Tycho Andersen # # 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
@@ -1104,16 +1104,124 @@ g. %22%22%22%0A%0A + # Set this to true if you'd like to get xtrace output to stdout of each%0A # test.%0A xtrace = False%0A%0A def @@ -1588,16 +1588,174 @@ mmand()) +%0A%0A if self.xtrace:%0A subprocess.Popen(%5B'xtrace', '-n'%5D)%0A # xtrace's def...
a2d9b2e9aa0e1b3cdfd3db20d3b62eab74be5408
comment only
evaluator.py
evaluator.py
from utility_stats import * from null_filter import * class Evaluator(): """ This is for help with debugging bad moves. """ def __init__(self, calculator, state): self.state = state self.calculator = calculator calculator.set_rules(self.get_rules()) self.utility_stats = ...
Python
0
@@ -87,19 +87,18 @@ This is -for +to help wi
fd6039e920643e09cbc60a8ddcfb7bf51a05dbbf
test commit
exercise1.py
exercise1.py
#!/usr/bin/env python """ Assignment 1, Exercise 1, INF1340, Fall, 2014. Grade to gpa conversion This module prints the amount of money that Lakshmi has remaining after the stock transactions """ __author__ = 'Susan Sim' __email__ = "ses@drsusansim.org" __copyright__ = "2015 Susan Sim" __license__ = "MIT License" ...
Python
0.000001
@@ -313,16 +313,30 @@ cense%22%0A%0A +# Test commit%0A %0Amoney =
5882fbdba87a26d3cdb7ae3f29d8af2140d83d2d
Use new cab URLs.
djangosnippets/urls.py
djangosnippets/urls.py
from django.conf.urls.defaults import url, patterns, include from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.shortcuts import render from haystack.views import SearchView, search_view_factory from cab import feeds from cab.forms import AdvancedS...
Python
0
@@ -204,1150 +204,438 @@ er%0A%0A -from haystack.views import SearchView, search_view_factory%0A%0Afrom cab import feeds%0Afrom cab.forms import AdvancedSearchForm, RegisterForm%0Afrom registration.backends.default.views import RegistrationView%0A%0Aadmin.autodiscover()%0A%0A%0Aclass CabRegistrationView(RegistrationVi...
0ad39c6a0415d997a433ddc828c180154e9c257d
Print 404 to chan
modules/syscmd.py
modules/syscmd.py
import urllib.request import os import re ## Get HTML for given url def getHtml( self, url, useragent): try: if useragent == True: user_agent = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)" headers = { 'User-Agent' : user_agent } req = urllib.request.Request(url, None, headers) else:...
Python
0.999991
@@ -438,38 +438,33 @@ ml)%0A%09except -Exception as e +HTTPError :%0A%09%09self.sen @@ -489,16 +489,40 @@ at(e) )%0A +%09except Exception as e:%0A %09%09if sel
dafcba4edccbb785cfe9d870110686cf11390c03
fix bug in process stats
ga_optimization_ternary/database.py
ga_optimization_ternary/database.py
#!/usr/bin/env python from __future__ import division ''' Created on Mar 14, 2012 ''' __author__ = "Anubhav Jain" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Anubhav Jain" __email__ = "ajain@lbl.gov" __date__ = "Mar 14, 2012" import pymongo from collections import d...
Python
0.000001
@@ -2764,18 +2764,21 @@ -if +while gen%5B'n_
d8cfd9218ce6b9b341020c934c9102d4c776ebc7
Allow empty --exclude
mut/index/main.py
mut/index/main.py
''' Usage: mut-index <root> -o <output> -u <url> [-g -s --exclude <paths>] mut-index upload [-b <bucket> -p <prefix> --no-backup] <root> -o <output> -u <url> [-g -s --exclude <paths>] -h, --help List CLI prototype, arguments, and options. <root> Path to the directory contain...
Python
0.000002
@@ -1026,16 +1026,28 @@ ignore. + %5Bdefault: %5D %0A'''%0Afro @@ -1467,13 +1467,9 @@ ions -.get( +%5B '--e @@ -1479,13 +1479,9 @@ ude' -, '') +%5D .spl @@ -1487,16 +1487,24 @@ lit(',') + if path %5D%0A ou
10d7e64b33089597c1f3977e6611304ec783aaf0
add matching pattern to pdb code in list
fetch-pdb.py
fetch-pdb.py
#!/usr/bin/python3 import urllib.request def downloading(filename): with open(filename) as pdb_list: for structure in pdb_list: pdb_url = base_url + structure[:4] out_file_name = structure[:4] + '.pdb' with urllib.request.urlopen(pdb_url) as response, open(out_file_name,...
Python
0
@@ -16,14 +16,12 @@ on3%0A -import +from url @@ -31,16 +31,61 @@ .request + import urlopen%0Afrom re import match, compile %0A%0Adef do @@ -105,16 +105,17 @@ ename):%0A +%0A with @@ -135,32 +135,33 @@ e) as pdb_list:%0A +%0A for stru @@ -179,16 +179,67 @@ b_list:%0A +%0A if match(pdbPat...