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 |
|---|---|---|---|---|---|---|---|
9664aac88684bfd2b940a8189d95ba7797c6ddd3 | add moveTo method | server.py | server.py | import roomba.create as create
import time
import zerorpc
class RoombaRPC(object):
def __init__(self, port):
self.robot = create.Create(port)
self.robot.toSafeMode()
self.moving = False
self.pause()
def __del__(self):
self.robot.close()
def toSafeMode(self):
... | Python | 0.000001 | @@ -586,16 +586,170 @@
g = True
+%0A%0A def moveTo(self, x, theta):%0A max_x = 20 # max: 500 mm/s%0A max_theta = 40 # max: 2000 mm%0A self.move(x * max_x, theta * max_theta)
%0A
|
9fa51ff158c6628992285d85d808687116473626 | fix bug | server.py | server.py | #-*- coding:utf-8 -*-
from flask import Flask, jsonify, render_template, make_response, request
import os
from news import News
from conf import *
from fetch import Fetch
from cache import Cache
import time
import datetime
app = Flask(__name__, static_url_path='/assets')
def jsonResponse(data=None, type=None, extra_... | Python | 0.000001 | @@ -169,32 +169,8 @@
tch%0A
-from cache import Cache%0A
impo
|
951e580bde2d5e972f5b1c3b59b29bfd980fa3ed | Simplify using dict.get() with a default value | server.py | server.py | import os
import asyncio
import json
from aiohttp import web
import settings
from game import Game
async def handle(request):
ALLOWED_FILES = ["index.html", "style.css"]
name = request.match_info.get('name')
if not name:
name = "index.html"
if name not in ALLOWED_FILES:
return web.Res... | Python | 0.000004 | @@ -169,17 +169,16 @@
e.css%22%5D%0A
-%0A
name
@@ -213,43 +213,11 @@
ame'
-)%0A if not name:%0A name = %22
+, '
inde
@@ -222,17 +222,18 @@
dex.html
-%22
+')
%0A if
@@ -237,20 +237,16 @@
if name
-not
in ALLOW
@@ -267,49 +267,17 @@
-return web.Response(status=404)%0A
try:%0A
+
... |
7967998d95fc676683a9bc140b5c5e8b6037fbf0 | version bump to 1.1.5 | standard_form/__init__.py | standard_form/__init__.py | __version__ = '1.1.4' | Python | 0.000009 | @@ -16,6 +16,7 @@
1.1.
-4'
+5'%0A
|
02c6defb57f78d8d512fefa97c5b515debfebff4 | Update ecs.py | src/main/python/infra_buddy/aws/ecs.py | src/main/python/infra_buddy/aws/ecs.py | import boto3
import pydash
from copy import deepcopy
from infra_buddy.utility import print_utility
from infra_buddy.aws.cloudformation import CloudFormationBuddy
class ECSBuddy(object):
def __init__(self, deploy_ctx):
# type: (DeployContext) -> None
super(ECSBuddy, self).__init__()
self.... | Python | 0.000001 | @@ -2634,16 +2634,18 @@
inition(
+**
new_task
|
fb8c2fb065449a436dd8ffa11b469bb2f22a9ad1 | Add web crawling rule and dataset url regex exp | spider.py | spider.py | from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
class DatasetSpider(CrawlSpider):
name = 'dataset'
allowed_domains = ['data.gc.ca/data/en']
start_urls = ['http://data.gc.ca/data/en/dataset?page=1']
| Python | 0.000002 | @@ -312,9 +312,162 @@
age=1'%5D%0A
+ rules = %5BRule(SgmlLinkExtractor(allow=%5B'/dataset/%5B0-9a-z%5D%7B8%7D-%5B0-9a-z%5D%7B4%7D-%5B0-9a-z%5D%7B4%7D-%5B0-9a-z%5D%7B4%7D-%5B0-9a-z%5D%7B12%7D'%5D),%0A 'parse_dataset')%5D
%0A
|
477bdb98f8a3e8250de80e1c88b4cab85a82e7ab | Implement bi-directional DiagnosticPort_Formatter | stratasys/formatter.py | stratasys/formatter.py | #
# See the LICENSE file
#
class Formatter:
def __init__(self):
pass
def from_source(self, data):
raise Exception("this class cannot be used")
def to_destination(self, data):
raise Exception("this class cannot be used")
class DiagnosticPort_Formatter(Formatter):
def __init__(... | Python | 0.000043 | @@ -19,16 +19,42 @@
E file%0A#
+%0Aimport re%0Aimport binascii
%0A%0Aclass
@@ -358,100 +358,556 @@
-pass%0A%0A def from_source(self, data):%0A formatted = %22%22%0A%0A # TODO - implements m
+self.rx = re.compile('%5E%5B0-9%5D%7B6%7D: ((?:%5B0-9a-f-A-F%5D%7B2%7D ?)+).*?$',re.MULTILINE)%0A%0A ... |
82015f5a920ff765bfbb81d2152493ba41385ba3 | Fix IndexError if no URL is provided | summarize/summarize.py | summarize/summarize.py | #!/usr/bin/env python
import nltk
from nltk.corpus import stopwords
import string
stop_words = stopwords.words('english')
LOWER_BOUND = .20 #The low end of shared words to consider
UPPER_BOUND = .90 #The high end, since anything above this is probably SEO garbage or a duplicate sentence
def is_unimportant(word):
... | Python | 0.000003 | @@ -3115,16 +3115,47 @@
ort sys%0A
+%0A if len(sys.argv) %3E 0:%0A
prin
@@ -3191,8 +3191,83 @@
argv%5B1%5D)
+%0A sys.exit(0)%0A%0A print %22Usage summarize.py %3CURL%3E%22%0A sys.exit(1)%0A
|
0c71b13d1328d09bcdf928aef77bb6a1fd84c5e9 | Version 0.7.1 | supernova/supernova.py | supernova/supernova.py | #!/usr/bin/env python
#
# Copyright 2012 Major Hayden
#
# 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 appli... | Python | 0.000001 | @@ -707,17 +707,17 @@
= '0.7.
-0
+1
'%0A%0A%0Aclas
|
7cc4069899979719ba0399ae5e9e597a88ede774 | enhance celery error handling | swat4tracker/celery.py | swat4tracker/celery.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
import os
from django.conf import settings
import celery
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'swat4tracker.settings')
app = celery.Celery('swat4tracker')
app.config_from_object(settings)
app.autodiscover_tasks(lambda: setti... | Python | 0 | @@ -136,96 +136,797 @@
ery%0A
-%0A%0Aos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'swat4tracker.settings')%0Aapp = celery.
+import raven%0Afrom celery.signals import setup_logging%0Afrom raven.contrib.celery import register_signal, register_logger_signal%0A%0Aos.environ.setdefault('DJANGO_SETTINGS_MODULE', 'swat4tr... |
6bc2bf86634f056f064a6bef2cdc00b3750556c1 | remove import utils file | sync_settings/reloader.py | sync_settings/reloader.py | # -*- coding: utf-8 -*-
# Adapted from @wbond's resource loader.
import sys
import sublime
VERSION = int(sublime.version())
mod_prefix = "sync_settings"
reload_mods = []
if VERSION > 3000:
mod_prefix = "AdvancedNewFile." + mod_prefix
from imp import reload
for mod in sys.modules:
if mod[0:15] ==... | Python | 0.000001 | @@ -601,22 +601,8 @@
i',%0A
- '.utils',%0A
|
fc933fcfc423f847bcc1088175054bcc1129b280 | Use a symlink for dirs directly in sys.path dirs. | syseggrecipe/recipe.py | syseggrecipe/recipe.py | import os
import logging
import pkg_resources
class Recipe(object):
def __init__(self, buildout, name, options):
self.buildout = buildout
self.name = name
self.options = options
options.setdefault('eggs', '')
def install(self):
log = logging.getLogger(self.name)
... | Python | 0 | @@ -1,17 +1,19 @@
import
-os
+glob
%0Aimport
@@ -20,16 +20,26 @@
logging%0A
+import os%0A
import p
@@ -75,16 +75,17 @@
bject):%0A
+%0A
def
@@ -800,16 +800,164 @@
else:%0A
+ if egg in dist.location:%0A # Proper egg instead of a%0A # /usr/lib/python/dis... |
35f21d30cc3719367136f89be3aecf7017098601 | Fix test: train | tests/chainer_tests/functions_tests/activation_tests/test_rrelu.py | tests/chainer_tests/functions_tests/activation_tests/test_rrelu.py | import unittest
import numpy
import chainer
from chainer import backend
from chainer import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
from chainer.testing import condition
@testing.parameterize(*testing.product({
'train': [... | Python | 0.999894 | @@ -3659,22 +3659,12 @@
if
-chainer.config
+self
.tra
|
68034e4d428776ac3fb3fcfa4ee8a53b4f5714a6 | Declare readline dependency (#4171) | var/spack/repos/builtin/packages/gdbm/package.py | var/spack/repos/builtin/packages/gdbm/package.py | ##############################################################################
# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | Python | 0 | @@ -1991,16 +1991,44 @@
528d')%0A%0A
+ depends_on(%22readline%22)%0A%0A
def
|
1d51db531774a51d1262dbba16677b73e9f93b9b | Add data to the fingerprint script. | update_fingerprints.py | update_fingerprints.py | """
A script to obtain the Ashlock Fingerprints of all strategies in the Axelrod
library.
This writes a hash of the source code of each strategy to file: db.csv.
If the source code of a strategy changes **or** a new strategy is introduced
then the fingerprint is regenerated for that strategy.
"""
import inspect
impo... | Python | 0 | @@ -1216,16 +1216,327 @@
o_hash%0A%0A
+def write_data_to_file(fp, filename):%0A %22%22%22%0A Write the fingerprint data to a file.%0A %22%22%22%0A columns = %5B'x', 'y', 'score'%5D%0A%0A with open(filename, 'w') as f:%0A w = csv.writer(f)%0A w.writerow(columns)%0A for key, value in ... |
b18fea6c8314da46b5e7b8fc58f404bb4623e4ef | add new versions (#9477) | var/spack/repos/builtin/packages/ncdu/package.py | var/spack/repos/builtin/packages/ncdu/package.py | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | Python | 0 | @@ -1769,16 +1769,206 @@
ar.gz%22%0A%0A
+ version('1.13', sha256='f4d9285c38292c2de05e444d0ba271cbfe1a705eee37c2b23ea7c448ab37255a')%0A version('1.12', sha256='820e4e4747a2a2ec7a2e9f06d2f5a353516362c22496a10a9834f871b877499a')%0A
vers
|
3a3005510a854588b6633fff50b0b9023a641843 | Fix flaky jdbc test by adding retries to container creation | sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.py | sdks/python/apache_beam/io/external/xlang_jdbcio_it_test.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 us... | Python | 0 | @@ -2589,28 +2589,24 @@
elf.
-postgres = P
+start_p
ostgres
-C
+_c
onta
@@ -2614,51 +2614,17 @@
ner(
-'postgres:latest')%0A self.postgres.start(
+retries=3
)%0A
@@ -3084,28 +3084,207 @@
-self.postgres.stop()
+# Sometimes stopping the container raises ReadTimeout. We can ignore it%0A # here to avoid t... |
f7345dab9794ed0aa217ac316ff324e83918804c | add ret_action in RLEnviron.play_one_episode | tartist/app/rl/base.py | tartist/app/rl/base.py | # -*- coding:utf8 -*-
# File : base.py
# Author : Jiayuan Mao
# Email : maojiayuan@gmail.com
# Date : 3/18/17
#
# This file is part of TensorArtist.
from tartist import random
from tartist.core.utils.cache import cached_property
import numpy as np
import collections
__all__ = [
'RLEnvironBase', 'SimpleRLEnv... | Python | 0 | @@ -1258,16 +1258,35 @@
s=False,
+ ret_actions=False,
restart
@@ -1335,24 +1335,45 @@
states = %5B%5D
+%0A actions = %5B%5D
%0A%0A se
@@ -1538,32 +1538,99 @@
.action(action)%0A
+ if ret_actions:%0A actions.append(action)%0A
if r
@@ -1850,33 +1850,177 @@
te)%0... |
5becd01b1b41e1b12568712b3cc83aa6f5b69c61 | Add back in import of os.path. | backend/mcapi/public.py | backend/mcapi/public.py | from mcapp import app
from decorators import crossdomain, apikey, jsonp
import json
from flask import jsonify, g, request
import rethinkdb as r
from loader.model import user
import dmutil
from utils import make_password_hash
import error
from args import json_as_format_arg
import access
@app.route('/tags')
@jsonp
def... | Python | 0 | @@ -281,16 +281,31 @@
access%0A
+import os.path%0A
%0A%0A@app.r
@@ -4203,16 +4203,24 @@
_name =
+os.path.
dirname(
|
e010175f9514b778e832fea3144c78c31c6ac965 | remove abandoned todo | intelligine/simulation/object/brain/part/move/AntStar/Host.py | intelligine/simulation/object/brain/part/move/AntStar/Host.py | from intelligine.simulation.object.brain.part.move.AntStar.HostFeeler import HostFeeler
from intelligine.synergy.event.move.direction import get_position_with_direction_decal
from synergine_xyz.cst import POSITION
class Host:
def __init__(self, context, object_id):
self._context = context
self._o... | Python | 0 | @@ -694,80 +694,8 @@
n):%0A
- # TODO: Heriter de Host AntStar au lieu de tout repeter ici ...%0A
|
ac16b6b8c6cdbf33512a051818cb26be1272afc9 | fix room payload size | modules/perlimpinpin/templates/payload/room.py | modules/perlimpinpin/templates/payload/room.py | from templatize import templatize
import perlimpinpin.payload.room as room
from perlimpinpin.payload.room.transaction import Command, Event
class CodeGenerator:
"""
Generate code for AVR
Attributes:
transactions -- transactions for which files are generated
messages -- all transaction messages
"""
... | Python | 0.000001 | @@ -2430,17 +2430,17 @@
lsize =
-2
+1
+%25u, %5C%5C%5C
|
541a2b49ac80800912a4bd867cbddc56d245fa25 | configure logging (#6873) | batch/batch/__main__.py | batch/batch/__main__.py | from aiohttp import web
from .batch import app
web.run_app(app, host='0.0.0.0', port=5000)
| Python | 0 | @@ -21,31 +21,83 @@
web%0A
-from .batch import app%0A
+%0Afrom hailtop import gear%0A%0Afrom .batch import app%0A%0Agear.configure_logging()
%0Aweb
|
b60cf66cf49d5676a2b5192350854d7268b80c0a | Add function for treatment of REQUIRED_PATHS (copied from cpachecker.py); overwriting the function from superclass | benchexec/tools/klee.py | benchexec/tools/klee.py | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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
... | Python | 0.000001 | @@ -786,16 +786,26 @@
ec.model
+%0Aimport os
%0A%0Aclass
@@ -1092,16 +1092,245 @@
lee')%0A%0A%0A
+ def program_files(self, executable):%0A installDir = os.path.join(os.path.dirname(executable), os.path.pardir)%0A return util.flatten(util.expand_filename_pattern(path, installDir) for path in self.RE... |
a7d15651fcf6ff75c1330a8d568f0d77d521ef8f | update refit auto-test | nipype/interfaces/afni/tests/test_auto_Refit.py | nipype/interfaces/afni/tests/test_auto_Refit.py | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..utils import Refit
def test_Refit_inputs():
input_map = dict(args=dict(argstr='%s',
),
deoblique=dict(argstr='-deoblique',
),
environ=dict(nohash=True,
usedefault=True,
),
ignore_except... | Python | 0 | @@ -199,41 +199,296 @@
-deoblique=dict(argstr='-deoblique
+atrcopy=dict(argstr='-atrcopy %25s %25s',%0A ),%0A atrfloat=dict(argstr='-atrfloat %25s %25s',%0A ),%0A atrint=dict(argstr='-atrint %25s %25s',%0A ),%0A atrstring=dict(argstr='-atrstring %25s %25s',%0A ),%0A deoblique=dict(argstr='... |
61b922718696352cdca2b4cb2b8d8aad6660fb12 | Eliminate trailing whitespace. | benchmarks/benchmark.py | benchmarks/benchmark.py | import os
import os.path as p
import subprocess as sub
import time
import numpy as np
import matplotlib.pyplot as plt
self_path = p.dirname(p.abspath(__file__))
root_path = p.dirname(self_path)
import sys
sys.path.append(p.join(root_path, 'test') )
import output_preservation_test as opt
grid_points = np.array([10,... | Python | 0.954475 | @@ -1752,32 +1752,24 @@
, mim_exec)%0A
-
%0A plt
@@ -2613,32 +2613,24 @@
, mim_exec)%0A
-
%0A mim
@@ -2843,24 +2843,16 @@
m_exec)%0A
-
%0A
|
fc569f99501f5a7a33c861730132657abfcb642c | Update decompression.py | utils/decompression.py | utils/decompression.py | from os.path import splitext
from os.path import getsize
from utils.make_list import byteList
def decompress(compressed, path):
"""
Purpose: Decompress file
Description: Read the file to decompress, remove the fist couple of byte.
Then, decompress each byte using the ASCII list and convert it into
... | Python | 0.000001 | @@ -289,20 +289,25 @@
CII list
- and
+. Finally
convert
@@ -323,44 +323,30 @@
-2
+1
bytes
-. ??? . And finally
+ and
write
-the
+each
dec
@@ -1412,17 +1412,16 @@
compress
-e
a file%0A
|
733f6c4e5f84b20309acf010f22740432ac3a32b | disable false pytype error | jax/traceback_util.py | jax/traceback_util.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 | @@ -1899,16 +1899,51 @@
lineno)
+ # pytype: disable=wrong-arg-count
%0A%0A # Co
@@ -2818,16 +2818,51 @@
lineno)
+ # pytype: disable=wrong-arg-count
%0A if
|
92052cb35135e3acbf3196fbc9aecd0d86e0a12e | change required args, better error msg | bin/lcm/setupCluster.py | bin/lcm/setupCluster.py | #!/usr/bin/python
import requests
import json
import time
import argparse
import os
import utilLCM as lcm
def setupArgs():
parser = argparse.ArgumentParser(description='Setup LCM managed DSE cluster, repo, config, and ssh creds')
required = parser.add_argument_group('Required named arguments')
required.add... | Python | 0.000002 | @@ -535,38 +535,40 @@
cluster.')%0A
-parser
+required
.add_argument('-
@@ -572,86 +572,316 @@
('--
-dsever', type=str, default = %225.1.3%22, help='DSE version for LCM config profile
+username', required=True, type=str,%0A help='username LCM uses when ssh-ing to nodes for install/config... |
e0ed1fc9900797e4988ea1cc7aad787666340c8e | Add dry-run flag | status.py | status.py | #!/usr/bin/env python
import argparse
import requests
import json
import os
import twitter
from datetime import datetime
parser = argparse.ArgumentParser(description="Train Status Fetcher")
parser.add_argument("-s", "--station", dest="station", type=str, required=True, help="Station Short Code. Ex: 'SLM'")
parser.add... | Python | 0.000001 | @@ -617,16 +617,118 @@
output')
+%0Aparser.add_argument('--dry-run', dest='dry_run', action='store_true', help='Skip posting to twitter')
%0A%0Aparser
@@ -791,16 +791,31 @@
se=False
+, dry_run=False
)%0A%0Aargs
@@ -4146,16 +4146,41 @@
print
+%22Post Length: %7B%7D%22.format(
len(upda
@@ -4178,24 +4178,25 @@
... |
56e930eb8d853a5e0e7f3b0714f9472a35f0cdef | Remove stale import | widgy/forms.py | widgy/forms.py | from operator import or_
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.db.models import Q
from django.db.models.fields.related import ReverseSingleRelatedObjectDescriptor
from django import forms
from django.contrib.contenttypes.models import ContentType
from django.u... | Python | 0.000002 | @@ -23,64 +23,8 @@
r_%0A%0A
-from django.core.exceptions import ImproperlyConfigured%0A
from
|
350f9dd2a86e0103b4aee0ead65874943ea5257a | comment issue fixed | tfx/components/transform/component.py | tfx/components/transform/component.py | # Lint as: python2, python3
# Copyright 2019 Google LLC. 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 req... | Python | 0 | @@ -4843,35 +4843,8 @@
ns.%0A
- cache_output_path: O%0A
|
3d4ce6889e47d4b637255d8d2ffaa3f60be42844 | Print which tests are being skipped | wolis/utils.py | wolis/utils.py | import os.path
import re
class RunError(StandardError):
pass
def run(cmd, **kwargs):
import subprocess
if 'stdout_io' in kwargs:
# XXX unfinished
stdout_io = kwargs['stdout_io']
del kwargs['stdout_io']
kwargs['stdout'] = subprocess.PIPE
no_check = kwargs.get('n... | Python | 0.000131 | @@ -4119,20 +4119,18 @@
kipping
-test
+%25s
due to
@@ -4161,22 +4161,37 @@
(%25s)' %25
+ (fn.__name__,
spec)
+)
%0A
|
25751d5814e5afa896dcce0823490bdb893b513f | comment out the enabling of local cache. Local cache is disabled by default. | src/ggrc/cache/factory.py | src/ggrc/cache/factory.py | # cache/factory.py
#
# This module creates the cache based on parameters specified
#
# Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
#
# Maintained By: dan@reciprocitylabs.com
#
from .localcache import LocalC... | Python | 0 | @@ -451,62 +451,8 @@
if
-%22local%22 in name :%0A return LocalCache();%0A elif
%22me
|
098788b4070c4448ded7f17c1bda01db84af90f6 | order config parameters by key | odoo/addons/base/models/ir_config_parameter.py | odoo/addons/base/models/ir_config_parameter.py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
"""
Store database-specific configuration parameters
"""
import uuid
import logging
from odoo import api, fields, models
from odoo.tools import config, ormcache, mute_logger, pycompat
_logger = logging.getLogger(__name... | Python | 0 | @@ -866,16 +866,35 @@
= 'key'
+%0A _order = 'key'
%0A%0A ke
|
52af704baddd194b5a25330c36a2d3096fbcb902 | Add missing initialization op | vat_ladder/hyperopt.py | vat_ladder/hyperopt.py | import tensorflow as tf
import os
from src.val import build_graph
from src.train import evaluate_metric
from src import input_data
import numpy as np
import argparse
from src.utils import parse_argstring
from skopt import gp_minimize, dump
def get_params(x=None):
if x is None:
x = [150, 0.67, 100, 0.002, ... | Python | 0.000027 | @@ -2745,16 +2745,88 @@
s sess:%0A
+ init = tf.global_variables_initializer()%0A sess.run(init)%0A
|
f22e4ed6a7175bc78bafd86bf4c124138f28b098 | Version to 1.24.01 | blockbuster/__init__.py | blockbuster/__init__.py | __author__ = 'matt'
__version__ = '1.24.00'
__db_schema_version__ = '1.24.00'
from flask import Flask
app = Flask(__name__)
import blockbuster.bb_routes
print("Running...") | Python | 0 | @@ -34,17 +34,17 @@
'1.24.0
-0
+1
'%0A__db_s
|
f461180a9c1f5d578372baa6cc1e9deac3c27994 | update bmp180 | bmp180/examples/test.py | bmp180/examples/test.py | from tentacle_pi.BMP180 import BMP180
import time
bmp = BMP180(0x77,"/dev/i2c-1")
for x in range(0,5):
print "temperature: %s" % bmp.temperature()
print "pressure: %s" % bmp.pressure()
print "altitude: %s" % bmp.altitude()
print
time.sleep(2)
| Python | 0 | @@ -98,9 +98,11 @@
e(0,
-5
+100
):%0A
@@ -125,25 +125,28 @@
mperature: %25
-s
+0.1f
%22 %25 bmp.temp
@@ -223,25 +223,28 @@
%22altitude: %25
-s
+0.1f
%22 %25 bmp.alti
|
77eab288ae870f35922a44d0f22e479c62dad1dc | Use correct byte count function | test/test_smartfile.py | test/test_smartfile.py | from __future__ import absolute_import
import os
import unittest
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from smartfile import BasicClient
from smartfile.errors import ResponseError
API_KEY = os.environ.get("API_KEY")
API_PASSWORD = os.environ.get("API_PASSWORD")
if A... | Python | 0.00263 | @@ -1088,11 +1088,14 @@
, f.
-len
+tell()
)%0A%0A
|
afeaa0f1506b226138c5b62c51219f1dce6cac99 | add pass after cleanup | test/unit/test_util.py | test/unit/test_util.py | # Copyright (c) 2015-2016 Cisco Systems
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | Python | 0 | @@ -4957,16 +4957,25 @@
sa.pub')
+%0A pass
%0A%0Adef te
|
e21ea2cc61db0ec4b179e83230cf53ad0d15b561 | Add more false-positives to exclude from check | testcases/KernelLog.py | testcases/KernelLog.py | #!/usr/bin/python2
# OpenPOWER Automated Test Project
#
# Contributors Listed Below - COPYRIGHT 2017
# [+] International Business Machines Corp.
#
#
# 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... | Python | 0 | @@ -1538,24 +1538,376 @@
regions.%22,%0A
+ %22Could not find start_pfn for node 25.%22,%0A %22nvidia: loading out-of-tree module taints kernel%22,%0A %22nvidia: module license 'NVIDIA' taints kernel.%22,%0A %22Disabling lock debugging... |
9479d8fc7720335384a03c47051caea39fe639f8 | fix analysi form issue. | testcube/core/forms.py | testcube/core/forms.py | from django import forms
from .models import ResultAnalysis, Issue, TestResult
class AnalysisForm(forms.Form):
reason = forms.IntegerField(label='Reason',
widget=forms.Select(choices=ResultAnalysis.REASON_CHOICES))
issue_id = forms.CharField(label='Issue ID',
... | Python | 0 | @@ -875,32 +875,81 @@
t(id=result_id)%0A
+ self.need_analysis = result.outcome != 0%0A
self.fie
@@ -1049,61 +1049,8 @@
sult
-%0A self.need_analysis = result.outcome != 0
%0A%0A
|
fb4341a100e62fa0ca82ebb81fb489b0fc63a465 | Fix tests for Py3 | tests/burninator_tests.py | tests/burninator_tests.py | from mock import *
from nose.tools import *
from burninator import Burninator
class TestBurninator(object):
def setup(self):
self.burninator = Burninator()
def test_burninate(self):
with patch('__builtin__.print') as mock_print:
self.burninator.burninate()
mock_print... | Python | 0.000001 | @@ -73,16 +73,160 @@
inator%0A%0A
+try:%0A import builtins%0A patch_string = 'builtins.print'%0Aexcept ImportError:%0A import __builtin__%0A patch_string = '__builtin__.print'%0A%0A
%0Aclass T
@@ -359,35 +359,28 @@
h patch(
-'__builtin__.print'
+patch_string
) as moc
|
cd591f950b754429e95ce2ed2cb113ef10538fc7 | add linR-version sync & procedure | federatedml/optim/gradient/linear_gradient.py | federatedml/optim/gradient/linear_gradient.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | Python | 0 | @@ -7103,16 +7103,17 @@
return gradient%0A
+%0A
|
dbee687a18e2784037979d341dc69744e6556a38 | handle list or atomic value in tfidf transform | external/predictor/python/seldon/pipeline/tfidf_transform.py | external/predictor/python/seldon/pipeline/tfidf_transform.py | import seldon.pipeline.pipelines as pl
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.feature_selection import SelectKBest, chi2
import logging
class Tfidf_transform(pl.Feature_transform):
def __init__(self,min_df=10,max_df=0.... | Python | 0 | @@ -769,54 +769,182 @@
-return %22 %22.join(map(str,j%5Bself.input_feature%5D)
+if isinstance(j%5Bself.input_feature%5D, list):%0A return %22 %22.join(map(str,j%5Bself.input_feature%5D))%0A else:%0A return str(j%5Bself.input_feature%5D
)%0A
|
875133d31d39e30d4f3e018e450ab37ec51f5dad | make work with alternate mounts | fedoracommunity/mokshaapps/packages/controllers/downloads.py | fedoracommunity/mokshaapps/packages/controllers/downloads.py | import logging
from tg import expose, tmpl_context
from tw.api import Widget
from tw.forms import SingleSelectField
from webhelpers.rails.number import number_to_human_size
from moksha.lib.base import Controller
from moksha.lib.helpers import Category, MokshaApp, defaultdict
from moksha.api.connectors import get_conn... | Python | 0 | @@ -533,21 +533,8 @@
sha.
-csrf_rewrite_
url(
|
910699eac10482a22a9de7151b8de7de0e00f104 | Remove import | vixDiskLib/__init__.py | vixDiskLib/__init__.py |
__version__ = "0.2"
from vixDiskLib import * # IGNORE:F0401 | Python | 0 | @@ -1,61 +1 @@
%0A
-__version__ = %220.2%22%0A%0Afrom vixDiskLib import * # IGNORE:F0401
|
aa326b5acaee3dad5b178092e36b35114df3cbde | Fix scandir for Python 3.5 | froide/foirequest/management/commands/migrate_attachments.py | froide/foirequest/management/commands/migrate_attachments.py | from collections import Counter
import os
import shutil
import re
import json
from django.core.management.base import BaseCommand
from django.utils import translation
from django.conf import settings
from froide.foirequest.models import FoiAttachment
from froide.foirequest.models.attachment import upload_to
from froi... | Python | 0.000283 | @@ -1605,24 +1605,29 @@
andir(folder
+.path
):%0A
|
0d7fb483706eca39c44fe3748d93d5d9deea3872 | put pragma no cover on django ext | zappa/ext/django.py | zappa/ext/django.py | import sys
# add the Lambda root path into the sys.path
sys.path.append('/var/task')
from django.core.handlers.wsgi import WSGIHandler
from django.core.wsgi import get_wsgi_application
import os
def get_django_wsgi(settings_module):
os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_module)
import dja... | Python | 0 | @@ -228,16 +228,35 @@
module):
+ # pragma: no cover
%0A os.
|
c1fcac98d69eca82e7791a432a5983e4e6775487 | Update kernel API. | pyslvs_ui/synthesis/dimensional_synthesis/dialogs/thread.py | pyslvs_ui/synthesis/dimensional_synthesis/dialogs/thread.py | # -*- coding: utf-8 -*-
"""Thread of dimensional synthesis."""
__author__ = "Yuan Chang"
__copyright__ = "Copyright (C) 2016-2021"
__license__ = "AGPL"
__email__ = "pyslvs@gmail.com"
from typing import cast, Dict, List, Any
from time import process_time
from platform import system, release, machine
from numpy.distut... | Python | 0 | @@ -435,21 +435,22 @@
import F
-Match
+Planar
, FConfi
@@ -1069,13 +1069,14 @@
= F
-Match
+Planar
(cas
|
3ae67a03018db45f821935d8fa36bb7cd106dcc9 | add user endpoint | zchat/zchat/urls.py | zchat/zchat/urls.py | """zchat URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-base... | Python | 0.000002 | @@ -707,16 +707,70 @@
t admin%0A
+from django.contrib.auth.hashers import make_password%0A
from dja
@@ -862,16 +862,119 @@
viewsets
+, status%0Afrom rest_framework.generics import CreateAPIView%0Afrom rest_framework.response import Response
%0Afrom re
@@ -1322,123 +1322,981 @@
ass
-UserViewSet(viewsets.ReadOnlyMo... |
76bdf455c0f06f5bc9daae480474924a91ceff5d | Fix thinko: creds has no prefix attribute, layout does | wal_e/worker/upload.py | wal_e/worker/upload.py | import socket
import tempfile
import time
import boto.exception
import wal_e.log_help as log_help
from wal_e import storage
from wal_e.pipeline import get_upload_pipeline
from wal_e.blobstore import get_blobstore
from wal_e.piper import PIPE
from wal_e.retries import retry, retry_with_count
from wal_e.worker.worker_u... | Python | 0 | @@ -1902,21 +1902,22 @@
': self.
-creds
+layout
.prefix,
|
e38f994d707a6c26c014b57278391d067c071879 | Use an innerjoin to optimize the RSS view | warehouse/rss/views.py | warehouse/rss/views.py | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | Python | 0 | @@ -608,16 +608,27 @@
inedload
+, load_only
%0A%0Afrom w
@@ -1995,16 +1995,84 @@
roject)%0A
+ .options(load_only(%22created%22, %22normalized_name%22))%0A
@@ -2117,17 +2117,32 @@
releases
-)
+, innerjoin=True
)%0A
@@ -2157,39 +2157,37 @@
-.order_by(Project.created.desc(
+ ... |
6fbc027a8fc25ac69ddca755e1fbac3aebd845cb | reformat code | tests/inside_worker_test/burial_ground_sql_test.py | tests/inside_worker_test/burial_ground_sql_test.py | from contextlib import contextmanager, closing
import pytest
import sqlalchemy
from sqlalchemy.sql.schema import Table as DbTable
from tests.conftest import area_polyfile_string
from tests.inside_worker_test.conftest import slow
from tests.inside_worker_test.declarative_schema import osm_models
@slow
def test_osmax... | Python | 0.999729 | @@ -2153,16 +2153,17 @@
engine)%0A
+%0A
retu
|
ef2813a0683e15dcedfe747f7dd2e55dc76cc832 | Improve load env config log output | tools/ci/python_packages/tiny_test_fw/EnvConfig.py | tools/ci/python_packages/tiny_test_fw/EnvConfig.py | # Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | Python | 0 | @@ -1395,16 +1395,31 @@
ile.%0A%22%22%22
+%0Aimport logging
%0A%0Aimport
@@ -2143,16 +2143,157 @@
dict()%0A
+ except KeyError:%0A logging.error('No config env %22%7B%7D%22 in config file %22%7B%7D%22'.format(env_name, config_file))%0A raise%0A
|
2acfe55b746a72088e5aaad31e6ed264857895c6 | fix expat dependency (#26221) | var/spack/repos/builtin/packages/exempi/package.py | var/spack/repos/builtin/packages/exempi/package.py | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Exempi(AutotoolsPackage):
"""exempi is a port of Adobe XMP SDK to work on UNIX and to be b... | Python | 0 | @@ -800,16 +800,40 @@
config')
+%0A depends_on('expat')
%0A%0A co
@@ -850,24 +850,433 @@
gcc@:4.5')%0A%0A
+ def patch(self):%0A # fix make check: Fix undefined reference to %60boost::unit_test::unit_test_main%60:%0A # BOOST_TEST_DYN_LINK only works with shlib and when boost is linked after src... |
08f7020e0ab9906962fcef43c369fae7c6f00c0e | add v2.0.6 (#23397) | var/spack/repos/builtin/packages/opari2/package.py | var/spack/repos/builtin/packages/opari2/package.py | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Opari2(AutotoolsPackage):
"""OPARI2 is a source-to-source instrumentation tool for OpenMP ... | Python | 0 | @@ -943,16 +943,211 @@
ar.gz%22%0A%0A
+ version('2.0.6', sha256='55972289ce66080bb48622110c3189a36e88a12917635f049b37685b9d3bbcb0', url='https://perftools.pages.jsc.fz-juelich.de/cicd/opari2/tags/opari2-2.0.6/opari2-2.0.6.tar.gz')%0A
vers
|
2dc4221308bd60254ce937a7501382fbdd07f3b5 | Fix test name so it actually runs | tests/game_board_tests.py | tests/game_board_tests.py | from nose.tools import *
from tictactoe.game_board import GameBoard
def game_board_is_empty_on_creation_test():
board = GameBoard()
current_state = board.game_state
assert_equal(["", "", "", "", "", "", "", "", ""], current_state)
def game_board_registers_initial_move_test():
board = GameBoard()
b... | Python | 0.000004 | @@ -2005,21 +2005,16 @@
ner())%0A%0A
- %0A
def game
@@ -2069,16 +2069,21 @@
e_is_won
+_test
():%0A
|
a82ecc8b6a544d88e23feee7496ce4ddfa8cae5d | Update version number | jobfunnel/__init__.py | jobfunnel/__init__.py | __version__ = '2.1.3'
| Python | 0.000002 | @@ -16,7 +16,7 @@
2.1.
-3
+4
'%0A
|
7dea728044ab0477670b0690c202ea8270dbbfb4 | Fix java tests | tests/lambdajava/tests.py | tests/lambdajava/tests.py | import os
import unittest
import boto3
from gordon.utils_tests import BaseIntegrationTest, BaseBuildTest
from gordon.utils import valid_cloudformation_name
from gordon import utils
@unittest.skipIf(os.environ.get('TRAVIS') == 'true', "Test not yet supported on travis")
class IntegrationTest(BaseIntegrationTest):
... | Python | 0.000114 | @@ -196,80 +196,30 @@
skip
-If(os.environ.get('TRAVIS') == 'true', %22Test not yet supported on travis
+(%22Temporarily disabled
%22)%0Ac
@@ -1090,80 +1090,30 @@
skip
-If(os.environ.get('TRAVIS') == 'true', %22Test not yet supported on travis
+(%22Temporarily disabled
%22)%0Ac
|
730d786d03119f74b1ddddd0ce1d17d210cb0ac2 | test api: set status codes for create recording | webrecorder/test/api/v1.py | webrecorder/test/api/v1.py | from bottle import get, post, request, run
from random import randint
import re
# GET /recordings
@get('/api/v1/recordings')
def recordings_index():
user = request.query.user
collection = request.query.collection
return { "recordings": [{"id": "a-la-recherche", "title": "À la recherche",
"created_at": "201... | Python | 0 | @@ -31,16 +31,26 @@
request,
+ response,
run%0A%0Afr
@@ -712,16 +712,40 @@
id(id):%0A
+%09%09response.status = 200%0A
%09%09return
@@ -906,32 +906,56 @@
ze%22: 0%7D%7D%0A%09else:%0A
+%09%09response.status = 400%0A
%09%09return %7B%22stat
|
f759c138177a0243fe999116301a02b5aad86fcf | Fix failing support test [nocheck] (#5995) | h2o-py/tests/testdir_algos/rulefit/pyunit_titanic_rulefit.py | h2o-py/tests/testdir_algos/rulefit/pyunit_titanic_rulefit.py | import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.rulefit import H2ORuleFitEstimator
import math
def titanic():
df = h2o.import_file(pyunit_utils.locate("smalldata/gbm_test/titanic.csv"),
col_types={'pclass': "enum", 'survived': "enum"})... | Python | 0 | @@ -1,16 +1,48 @@
+from __future__ import division%0A
import sys%0Asys.p
@@ -1711,32 +1711,36 @@
%0A assert
+abs(
rfit.rule_import
@@ -1752,34 +1752,33 @@
)%5B'support'%5D%5B0%5D
-==
+-
count / train.n
@@ -1777,24 +1777,32 @@
train.nrows
+) %3C 1e-6
%0A %0A as
@@ -2879,24 +2879,28 @@
%0A ass... |
4833b61294782ff80042745051fa57e81981c390 | fix les bugs | sara_flexbe_states/src/sara_flexbe_states/get_box_center.py | sara_flexbe_states/src/sara_flexbe_states/get_box_center.py | #!/usr/bin/env python
# encoding=utf8
from flexbe_core import EventState, Logger
from flexbe_core.proxy import ProxySubscriberCached
from tf.transformations import quaternion_from_euler, quaternion_matrix, quaternion_from_matrix
from geometry_msgs.msg import Quaternion
import rostopic
import inspect
from rospy.rostime... | Python | 0.000003 | @@ -881,16 +881,18 @@
e_to_box
+es
/boundin
@@ -1872,32 +1872,78 @@
(self._topic)%0A%0A%0A
+ Logger.loginfo('getting message')%0A
for
@@ -1972,16 +1972,16 @@
gBoxes:%0A
-
%0A
@@ -2053,19 +2053,19 @@
if
-int
+str
(box.Cla
@@ -2071,19 +2071,19 @@
ass) ==
-int
+str
(self.Cl
... |
cb881ed6409f0f768f721af549ad55dc471b5e01 | Add httponly to session cookie. | frontends/etiquette_flask/backend/sessions.py | frontends/etiquette_flask/backend/sessions.py | import flask; from flask import request
import functools
import werkzeug.wrappers
import werkzeug.datastructures
from voussoirkit import cacheclass
import etiquette
SESSION_MAX_AGE = 86400
REQUEST_TYPES = (flask.Request, werkzeug.wrappers.Request, werkzeug.local.LocalProxy)
RESPONSE_TYPES = (flask.Response, werkzeu... | Python | 0 | @@ -3653,16 +3653,51 @@
AX_AGE,%0A
+ httponly=True,%0A
|
89a937702a9f58a0d53051dd581a6844d720609f | test for None-age, not not-ness | Tools/pynche/TypeinViewer.py | Tools/pynche/TypeinViewer.py | from Tkinter import *
import Pmw
import string
class TypeinWidget(Pmw.MegaWidget):
def __init__(self, parent=None, **kw):
options = (('color', (128, 128, 128), self.__set_color),
('delegate', None, None),
)
self.defineoptions(kw, options)
Pmw.MegaWidget.__init__(self, parent)
interiorarg = (self.int... | Python | 0.996788 | @@ -1912,24 +1912,39 @@
%09if
+(
val
+ is not None)
and
+(
val %3E= 0
and
@@ -1939,21 +1939,23 @@
val %3E= 0
+)
and
+(
val %3C 25
@@ -1955,16 +1955,17 @@
al %3C 256
+)
:%0A%09 r
@@ -2282,16 +2282,17 @@
e'%5D%0A%09if
+(
None not
@@ -2299,21 +2299,23 @@
in rgbs
+)
and
+(
-1 not i
@@ -2322,16 +... |
99372911a8e9aeba0f6e3089e5319dbfe9e5b2b1 | Gridify this widget | Tools/pynche/TypeinViewer.py | Tools/pynche/TypeinViewer.py | from Tkinter import *
import string
import re
class TypeinViewer:
def __init__(self, switchboard, parent=None):
# non-gui ivars
self.__sb = switchboard
self.__hexp = BooleanVar()
self.__uwtyping = BooleanVar()
# create the gui
self.__frame = Frame(parent, relief=GROO... | Python | 0.999995 | @@ -300,16 +300,19 @@
e(parent
+) #
, relief
@@ -360,23 +360,41 @@
ame.
-pack(side=RIGHT
+grid(row=3, column=1, sticky='NS'
)%0A
|
6ba648fb78ef227b6288a35246bd30eaf027bb14 | Add test for including directories in source paths | tests/sources_tests.py | tests/sources_tests.py | import os
import subprocess
import json
from nose.tools import istest, assert_equal, assert_raises
from whack.sources import PackageSourceFetcher, PackageSourceNotFound, PackageSource
from whack.tempdir import create_temporary_dir
from whack.files import read_file, write_files, plain_file
@istest
def can_fetch_pack... | Python | 0.000001 | @@ -2308,32 +2308,803 @@
)%0A%0A%0A
+@istest%0Adef writing_package_source_includes_directories_specified_in_description():%0A with create_temporary_dir() as package_source_dir:%0A whack_description = %7B%0A %22sourcePaths%22: %5B%22names%22%5D%0A %7D%0A write_files(packag... |
f268e841194b941ac74bee34f59dfa49c5d99c21 | remove raw unicode strings as they aren't supported in py3 | tests/source_type_test.py | tests/source_type_test.py | # -*- coding: utf-8 -*-
"""Tests for the source type objects."""
import unittest
from artifacts import errors
from artifacts import source_type
class SourceTypeTest(unittest.TestCase):
"""Class to test the artifact source type."""
class ArtifactSourceTypeTest(unittest.TestCase):
"""Class to test the artifacts... | Python | 0.000004 | @@ -1238,17 +1238,16 @@
(keys=%5Bu
-r
'HKEY_LO
@@ -1254,24 +1254,25 @@
CAL_MACHINE%5C
+%5C
test'%5D)%0A%0A%0Acl
@@ -1542,17 +1542,16 @@
'key': u
-r
'HKEY_LO
@@ -1562,16 +1562,17 @@
MACHINE%5C
+%5C
test', '
|
52d421fa5632e45e00bcfa1c6888df1b39dad027 | Fix time.clock unit test | tests/stdlib/test_time.py | tests/stdlib/test_time.py | from unittest import expectedFailure
from ..utils import TranspileTestCase
class TimeModuleTests(TranspileTestCase):
#######################################################
# _STRUCT_TM_ITEMS
@expectedFailure
def test__STRUCT_TM_ITEMS(self):
self.assertCodeExecution("""
import ti... | Python | 0 | @@ -1,12 +1,22 @@
+import os%0A
from unittes
@@ -2819,16 +2819,210 @@
%3C 0.01s%0A
+ sleepy_time = 1%0A diff_offset = sleepy_time if os.name == 'nt' else 0%0A # On Windows, time.clock includes the time spent in time.sleep%0A # however on Unix it does not.%0A
@@ -3130,17 +3130,29 ... |
0c26c73f4cf05c56ba1784abf3509ca4d88a7a7b | Fix Codacy issue | test/test_retrieve_dns.py | test/test_retrieve_dns.py | import os
import tempfile
import unittest
import mock
import xml.dom.minidom
import bin.retrieve_dns
class SimpleTestCase(unittest.TestCase):
"""Test fixture for simple test cases."""
def test_verify_valid_dns(self):
valid_dns = ("/C=UK/O=eScience/OU=CLRC/L=RAL/CN=apel-test.esc.rl.ac.uk",
... | Python | 0 | @@ -4980,24 +4980,16 @@
string)%0A
-
%0A
|
2ab95b7dd52a3ad43da3f759ac08e0f705aade99 | Set minion test to use default opts | tests/unit/minion_test.py | tests/unit/minion_test.py | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Mike Place <mp@saltstack.com>`
'''
# Import python libs
from __future__ import absolute_import
import copy
import os
# Import Salt Testing libs
from salttesting import TestCase, skipIf
from salttesting.helpers import ensure_in_syspath
from salttesting.mock import N... | Python | 0 | @@ -2367,70 +2367,39 @@
s =
-%7B'cachedir': '',%0A 'extension_modules': ''%7D
+salt.config.DEFAULT_MINION_OPTS
%0A
@@ -3406,120 +3406,39 @@
s =
-%7B'cachedir': '',%0A 'extension_modules': '',%0A 'minion_jid_queue_hwm': 100%7D
+salt.config.DEFAULT_MINIO... |
5c22244ee834db213052513474898317ce867f4f | Fix duplicate tests | tests/unit/testpyspark.py | tests/unit/testpyspark.py | from mypy.test.data import DataDrivenTestCase, DataSuite
from mypy.test.testcheck import TypeCheckSuite
class PySparkCoreSuite(TypeCheckSuite):
TypeCheckSuite.files = [
"context.test",
"ml-classification.test",
"ml-evaluation.test",
"ml-feature.test",
"ml-param.test",
... | Python | 0.000343 | @@ -103,52 +103,8 @@
e%0A%0A%0A
-class PySparkCoreSuite(TypeCheckSuite):%0A
Type
@@ -363,16 +363,20 @@
%22
+sql-
udf.test
@@ -388,36 +388,4 @@
%5D%0A
- required_out_section = True%0A
|
fdd256baa671898a38d3c5f98c64b581858645db | Rename group | gmond/python_modules/network/multi_traffic.py | gmond/python_modules/network/multi_traffic.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import threading
import time
import re
import copy
descriptors = list()
Desc_Skel = {}
_Worker_Thread = None
_Lock = threading.Lock() # synchronization lock
Debug = False
def dprint(f, *v):
if Debug:
print >>sys.stderr, "DEBUG: "+f % v... | Python | 0.000003 | @@ -3172,25 +3172,25 @@
: '
-N
+n
etwork
- I
+_i
nterface
Tra
@@ -3185,18 +3185,18 @@
nterface
- T
+_t
raffic',
|
561ffb4b5ea32383447ff1af29b849f1435d4337 | update init arguments | tests/test_OTF_vasp.py | tests/test_OTF_vasp.py | import pytest
import os
import sys
import numpy as np
from flare.otf import OTF
from flare.gp import GaussianProcess
from flare.struc import Structure
from flare.dft_interface.vasp_util import *
# ------------------------------------------------------
# test otf runs
# ----------------------------... | Python | 0 | @@ -974,20 +974,11 @@
OTF(
-vasp_input,
+dt=
dt,
@@ -996,111 +996,211 @@
teps
-, gp, dft_loc,%0A std_tolerance_factor, init_atoms=%5B0%5D,%0A calculate_energy=True,
+=number_of_steps,%0A gp=gp, calculate_energy=True,%0A std_tolerance_factor=std_tolerance_factor,%... |
2ab605a455960523bf56bb305e254db3ebc5d00c | Fix deprecation warning with new sphinx versions (#1105) | tests/test_builders.py | tests/test_builders.py | import os
import pytest
import sphinx
from sphinx import addnodes
from sphinx.builders.html import SingleFileHTMLBuilder, DirectoryHTMLBuilder
from .util import build_all
def test_basic():
for (app, status, warning) in build_all('test-basic'):
assert app.env.get_doctree('index').traverse(addnodes.toctre... | Python | 0 | @@ -64,84 +64,296 @@
des%0A
-from sphinx.builders.html import SingleFileHTMLBuilder, DirectoryHTMLBuilder
+try:%0A # Available from Sphinx 2.0%0A from sphinx.builders.dirhtml import DirectoryHTMLBuilder%0A from sphinx.builders.singlehtml import SingleFileHTMLBuilder%0Aexcept ImportError:%0A from sphinx.bui... |
681e40f2a2ec1127fc378f4ebca990f177cb78ff | Fix #560 | werkzeug/posixemulation.py | werkzeug/posixemulation.py | # -*- coding: utf-8 -*-
r"""
werkzeug.posixemulation
~~~~~~~~~~~~~~~~~~~~~~~
Provides a POSIX emulation for some features that are relevant to
web applications. The main purpose is to simplify support for
systems such as Windows NT that are not 100% POSIX compatible.
Currently this only imple... | Python | 0 | @@ -776,16 +776,48 @@
random%0A
+from ._compat import to_unicode%0A
%0A%0Acan_re
@@ -1164,57 +1164,8 @@
t):%0A
- if not isinstance(src, unicode):%0A
@@ -1178,16 +1178,19 @@
src =
+to_
unicode(
@@ -1239,63 +1239,17 @@
-if not isinstance(dst, unicode):%0A
dst =
+to_
... |
d915efcd0df748d0872b2b2e905e94e65841ee9c | Switch test to pytest. | tests/test_commands.py | tests/test_commands.py | # -*- coding: utf-8 -*-
import unittest
from nikola.plugins.command.version import CommandVersion
class CommandVersionCallTest(unittest.TestCase):
def test_version(self):
"""Test `nikola version`."""
CommandVersion().execute()
| Python | 0 | @@ -22,25 +22,8 @@
*-%0A%0A
-import unittest%0A%0A
from
@@ -82,61 +82,8 @@
n%0A%0A%0A
-class CommandVersionCallTest(unittest.TestCase):%0A
def
@@ -99,19 +99,11 @@
ion(
-self
):%0A
-
@@ -131,20 +131,16 @@
on%60.%22%22%22%0A
-
Comm
|
b3c5707f90590af9ff63a76ba4b8101bd590d147 | Document tests for copy feature | tests/test_copy_ref.py | tests/test_copy_ref.py | #!/usr/bin/env python
import nose.tools as nose
import yv_suggest.copy_ref as yvs
import context_managers as ctx
from mock import patch, mock_open, Mock
with open('tests/files/psa.23.html') as html_file:
TEST_REF_HTML = html_file.read()
def before_each():
yvs.urllib2.urlopen = Mock()
yvs.urllib2.urlope... | Python | 0 | @@ -462,24 +462,76 @@
_chapter():%0A
+ '''should copy reference content for chapter'''%0A
with ope
@@ -564,32 +564,32 @@
) as text_file:%0A
-
with ctx
@@ -823,24 +823,74 @@
py_verse():%0A
+ '''should copy reference content for verse'''%0A
with ope
@@ -1192,24 +1192,80 @@
se_range():%0A
+ ... |
6f7179dce9e6c47b7fcabf9b53160e1ec55573f4 | Fix older Roborock models (#47412) | homeassistant/components/xiaomi_miio/const.py | homeassistant/components/xiaomi_miio/const.py | """Constants for the Xiaomi Miio component."""
DOMAIN = "xiaomi_miio"
CONF_FLOW_TYPE = "config_flow_device"
CONF_GATEWAY = "gateway"
CONF_DEVICE = "device"
CONF_MODEL = "model"
CONF_MAC = "mac"
KEY_COORDINATOR = "coordinator"
# Fam Models
MODEL_AIRPURIFIER_V1 = "zhimi.airpurifier.v1"
MODEL_AIRPURIFIER_V2 = "zhimi.ai... | Python | 0.000011 | @@ -2229,16 +2229,35 @@
.vacuum%22
+, %22rockrobo.vacuum%22
%5D%0A%0AMODEL
|
b6e443855e158b4559d66292012fb1abaaa3951f | Store Texoid metadata in cache; #443 | judge/utils/texoid.py | judge/utils/texoid.py | import hashlib
import json
import logging
import urllib2
from contextlib import closing
from urllib import urlencode
import json
from django.conf import settings
from judge.utils.file_cache import HashFileCache
logger = logging.getLogger('judge.texoid')
TEXOID_ENABLED = hasattr(settings, 'TEXOID_URL')
class Texoi... | Python | 0 | @@ -8,28 +8,16 @@
hashlib%0A
-import json%0A
import l
@@ -23,16 +23,16 @@
logging%0A
+
import u
@@ -111,16 +111,53 @@
t json%0A%0A
+from django.core.cache import caches%0A
from dja
@@ -581,16 +581,100 @@
False))
+%0A self.meta_cache = caches%5Bgetattr(settings, 'TEXOID_META_CACHE', 'default')%5D
%0A%0A ... |
d1252fde02f21cbf24e8fbf59d72083c40b2c0a2 | make payload nullable | justeventme/models.py | justeventme/models.py | # -*- coding: utf-8 -*-
from django.db import models
from django.db.models.base import ModelBase
from django.contrib.postgres.fields import HStoreField
class ReadModel(models.Model):
"""
The read model is an abstract class for creating read-only models
that present the state of the system to the outside.
... | Python | 0.000059 | @@ -1342,16 +1342,37 @@
reField(
+null=True, blank=True
)%0A%0A d
|
404fdc10f8dde075edbed371a7298528dbd213ca | Add one more auth test | tests/test_handlers.py | tests/test_handlers.py | """Tests for handlers."""
import pytest
import uuid
from requests import codes
from flask import abort
from boilerplateapp.helpers.decorators import login_exempt
from tests.utils import make_headers
@pytest.mark.usefixtures('dbmodels', 'dbtransaction')
class TestBeforeHandlers:
"""Tests for before_request hand... | Python | 0 | @@ -2181,24 +2181,881 @@
g format.%22%0A%0A
+ def test_login_fail_other_user(self, app, client, user_factory):%0A %22%22%22Can't login with a login token that contains a valid auth token but another user id.%22%22%22%0A user = user_factory.get()%0A other_user = user_factory.get()%0A user... |
9382892df9448c1a238b712613cf9034d4a50ae8 | Remove unused import | wsgiservice/application.py | wsgiservice/application.py | """Components responsible for building the WSGI application."""
import inspect
import logging
import webob
import wsgiservice
import wsgiservice.resource
logger = logging.getLogger(__name__)
class Application(object):
"""WSGI application wrapping a set of WsgiService resources. This class
can be used as a WS... | Python | 0.000001 | @@ -61,23 +61,8 @@
%22%22%22%0A
-import inspect%0A
impo
@@ -4769,16 +4769,17 @@
pass
+
# d wasn
@@ -4789,28 +4789,16 @@
a class%0A
-
%0A
@@ -4811,20 +4811,16 @@
n False%0A
-
%0A res
|
3a2e52a8da5f9f7a8e80e564b04dcf671ce06102 | Remove dummy.mc at the end of all tests | tests/test_magncurv.py | tests/test_magncurv.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import unittest
import tempfile
import femagtools
import os
mcvPars =[dict(
name="TKS_NO_20"
,desc="PowerCore NO 20 ;ThyssenKrupp Steel Eur"
,cversion=0
,ctype=1
,recalc=1
,curve=[{"bi":[0.0,0.09029103,0.17855673,0.26691416,0.35827994],
... | Python | 0 | @@ -1464,16 +1464,46 @@
ut), 27)
+%0A os.remove('dummy.mc')
%0A%0Aif __n
|
aa21bc8b6517b5eadb3b8e92bcd072de2fd1b98b | Remove sqlite3 from testing docs | tests/test_manifest.py | tests/test_manifest.py | """ Test cases for Manifest object """
import os
import unittest
from furtive.manifest import Manifest
class TestManifest(unittest.TestCase):
def test_manifest_create(self):
""" Ensure a manifest can be generated from a directory """
manifest = Manifest('tests/fixtures/test-data', '.test_manife... | Python | 0.000001 | @@ -1361,23 +1361,16 @@
m a
-sqlite3 databas
+yaml fil
e %22%22
|
8fb83238406ae3ce4d0dc3d0bd870db9042de710 | fix tests | tests/test_optimize.py | tests/test_optimize.py | """Test optimization routines."""
import pytest
import numpy as np
from scipy import linalg
import tensortools as tt
deterministic_tol = 1e-3
def _get_data(rank, order, nonneg):
"""Sets random seed and creates low rank tensor.
Parameters
----------
rank : int
Rank of the synthetic tensor.
... | Python | 0.000001 | @@ -85,16 +85,32 @@
linalg%0A
+import itertools
%0Aimport
@@ -132,443 +132,497 @@
tt%0A%0A
-deterministic_tol = 1e-3%0A%0A%0Adef _get_data(rank, order, nonneg):%0A %22%22%22Sets random seed and creates low rank tensor.%0A%0A Parameters%0A ----------%0A rank : int%0A Rank of the synthetic tensor.... |
37ac1f69fee8be18f165383c211bba24aa79692c | Update aws script to cache stmts on S3 | indra/tools/reading/run_reach_on_pmids_aws.py | indra/tools/reading/run_reach_on_pmids_aws.py | """
This script is intended to be run on an Amazon ECS container, so information for
the job either needs to be provided in environment variables (e.g., the
REACH version and path) or loaded from S3 (e.g., the list of PMIDs).
"""
from __future__ import absolute_import, print_function, unicode_literals
from builtins imp... | Python | 0 | @@ -620,16 +620,44 @@
igmech'%0A
+ base_name = sys.argv%5B1%5D%0A
pmid
@@ -689,25 +689,25 @@
+ sys.argv%5B
-1
+2
%5D%0A tmp_di
@@ -715,25 +715,25 @@
= sys.argv%5B
-2
+3
%5D%0A num_co
@@ -751,17 +751,17 @@
ys.argv%5B
-3
+4
%5D)%0A s
@@ -782,25 +782,25 @@
nt(sys.argv%5B
-4
+5
%5D)%0A end_i
... |
ba7cba0a4e9cab4eaa05c2ef968461a086ab5030 | Rename tests to avoid name collision | tests/test_security.py | tests/test_security.py | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.security
~~~~~~~~~~~~~~~~~~~~~~~~~
Checks the sandbox and other security features.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import pytest
from jinja2 import Environment
from jinja2.sandbox import Sandboxe... | Python | 0 | @@ -6508,37 +6508,36 @@
'%0A%0A def test_
-basic
+safe
_format_safety(s
@@ -6715,37 +6715,36 @@
'%0A%0A def test_
-basic
+safe
_format_all_okay
|
59748f35f21f505b65e6cd62ebea4473526b2067 | increase timeout delay | tests/test_selenium.py | tests/test_selenium.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import unittest
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.core.urlresolvers import reverse
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver... | Python | 0.000004 | @@ -673,17 +673,18 @@
delay =
-3
+10
%0A%0A de
@@ -912,9 +912,18 @@
um,
-3
+self.delay
)%0A
|
b939dc2638507b2b594312b67728b109d3884d1d | Include 'ManyToManyField' to 'related_limit_choices_distinct'. | xadmin/plugins/relfield.py | xadmin/plugins/relfield.py | from django.db import models
from django.forms.utils import flatatt
from django.utils.html import escape, format_html
from django.utils.safestring import mark_safe
from django.utils.text import Truncator
from django.utils.translation import ugettext as _
from django import forms
from xadmin.sites import site
from xadmi... | Python | 0.000001 | @@ -3866,32 +3866,33 @@
tance(db_field,
+(
models.ForeignKe
@@ -3892,16 +3892,41 @@
reignKey
+, models.ManyToManyField)
) and%0A
|
13c3fa5522fd9f6cbad42488c74d9fa40ea81404 | bump patch version | tldextract/__init__.py | tldextract/__init__.py | from .tldextract import extract, TLDExtract
__version__ = "1.3"
| Python | 0 | @@ -56,10 +56,12 @@
_ = %221.3
+.1
%22%0A
|
7c69dc5bddc7136c274f039223686a92cffd693a | Fix flake8 line length issue | tomviz/python/setup.py | tomviz/python/setup.py | from setuptools import setup, find_packages
setup(
name='tomviz-pipeline',
version='0.0.1',
description='Tomviz python external pipeline execution infrastructure.',
author='Kitware, Inc.',
author_email='kitware@kitware.com',
url='https://www.tomviz.org/',
license='BSD 3-Clause',
classif... | Python | 0 | @@ -38,16 +38,112 @@
ckages%0A%0A
+jsonpatch_uri %5C%0A = 'jsonpatch@https://github.com/cjh1/python-json-patch/archive/tomviz.zip'%0A%0A
setup(%0A
@@ -949,80 +949,34 @@
': %5B
-'jsonpatch@https://github.com/cjh1/python-json-patch/archive/tomviz.zip'
+%0A jsonpatch_uri
, 'm
|
d05992ee44ee6d55243ec5546e741a2d04447aa0 | Revert "a" | tools/json_verifier.py | tools/json_verifier.py | import sys
import json
if len(sys.argv) <= 1:
exit(1)
status = 0
for file in sys.argv[1:]:
with open(file, encoding="ISO-8859-1") as f:
try:
json.load(f)
except ValueError as exception:
print("JSON error in {}".format(file))
print(exception)
sta... | Python | 0 | @@ -3,16 +3,17 @@
port sys
+%0D
%0Aimport
@@ -16,17 +16,19 @@
ort json
-%0A
+%0D%0A%0D
%0Aif len(
@@ -42,16 +42,17 @@
v) %3C= 1:
+%0D
%0A exi
@@ -55,17 +55,19 @@
exit(1)
-%0A
+%0D%0A%0D
%0Astatus
@@ -69,17 +69,19 @@
atus = 0
-%0A
+%0D%0A%0D
%0Afor fil
@@ -98,16 +98,17 @@
rgv%5B1:%5D:
+%0D
%0A wit
@... |
535954a857e82926e086df82cd5a26207b9cad8e | Improve the error message to explain why GetStringChars/GetStringUTFChars is no acceptable. | tools/licensescheck.py | tools/licensescheck.py | #!/usr/bin/python
import os, sys, re
# Path to eng checkout root directory. To use this as a git pre-commit hook,
# create a symlink to this file in .git/hooks with the name pre-commit
basepath = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) + os.sep
ascommithook = False
prunelist = ('hsqldb19b3',
... | Python | 0.000002 | @@ -3113,16 +3113,171 @@
TFChars.
+ These methods return invalid UTF-8 code points for some characters. You should do the encoding in Java and pass the string to native code as a byte array.
%22 %25 (f,
|
598acd5eccce89a7268a4e783302d41f893cc49e | make validation look for a properly formatted footer | tor/core/validation.py | tor/core/validation.py | from tor.strings.urls import ToR_link
from tor_core.helpers import get_parent_post_id
from tor_core.helpers import send_to_modchat
from praw.models import Comment
def _author_check(original_post, claimant_post):
return original_post.author == claimant_post.author
def _footer_check(reply, config, tor_link=ToR_li... | Python | 0 | @@ -647,16 +647,42 @@
ply.body
+ and ' ' in reply.body
%0A els
|
a86dffbe592fb13d029ac90791f583263e2c9a7a | add changed_callback for stresstest | torequests/crawlers.py | torequests/crawlers.py | #! coding:utf-8
from __future__ import print_function
from .utils import PY35_PLUS, curlparse, ttime, timepass, slice_by_size, Counts
import time
if PY35_PLUS:
from .dummy import Requests
else:
from .main import tPool as Requests
class StressTest(object):
def __init__(self, curl='', n=100, interval=0, num... | Python | 0 | @@ -126,16 +126,21 @@
, Counts
+, md5
%0Aimport
@@ -260,24 +260,71 @@
st(object):%0A
+ '''changed_callback may be os._exit(0)'''%0A%0A
def __in
@@ -383,195 +383,486 @@
nk=1
-000, parser=None,%0A logger_function=None, **kwargs):%0A self.count = Counts()%0A self.req = Requests(n... |
097f785f712636e17d8599eeccb02f81cfeb5f91 | bump version to 2.0.0 | torment/information.py | torment/information.py | # Copyright 2015 Alex Brandt
#
# 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 | @@ -809,11 +809,11 @@
= '
-1.0.1
+2.0.0
'%0A
|
487593f91d2998010c593f5a12eb259e5536a2a0 | Use user.id instead of SimpleLazyObject to ensure we have a user | tracking/middleware.py | tracking/middleware.py | import re
import logging
import warnings
from django.db import IntegrityError
from django.utils import timezone
from django.utils.encoding import smart_text
from tracking.models import Visitor, Pageview
from tracking.utils import get_ip_address, total_seconds
from tracking.settings import (
TRACK_AJAX_REQUESTS,
... | Python | 0 | @@ -2391,15 +2391,21 @@
user
+_id
= user
+.id
%0A%0A
|
bcf10d94532b490e0b361d2ccd17e8b53efda2c1 | Add comment r=@leplatrem | kinto2xml/verifier.py | kinto2xml/verifier.py | """Parse and normalize two XML files and then generate a diff of both."""
import argparse
import json
import logging
import os
import requests
import subprocess
import six
import sys
import tempfile
import xmltodict
logger = logging.getLogger('xml-verifier')
RECORD_SORT_FIELDS = (
'@blockID', '@id', '@issuerName'... | Python | 0 | @@ -2343,16 +2343,137 @@
_dict(d)
+%0A%0A # Ignore differences in the lastupdate blocklist tag%0A # parameter. So that if they differs we ignore it.
%0A
@@ -2622,16 +2622,17 @@
updated%0A
+%0A
@@ -2857,20 +2857,75 @@
#
-process diff
+Print the diff command to stderr if we kept the ... |
451dc3e4c94a9bd13cfbd1ef0e126c259105c8f9 | Fix file encoding for Python 2 | luminoth/tools/dataset/readers/object_detection/csv_reader.py | luminoth/tools/dataset/readers/object_detection/csv_reader.py | import csv
import os
import six
import tensorflow as tf
from PIL import Image
from luminoth.tools.dataset.readers import InvalidDataDirectory
from luminoth.tools.dataset.readers.object_detection import (
ObjectDetectionReader
)
from luminoth.utils.config import is_basestring
from luminoth.utils.dataset import rea... | Python | 0.999464 | @@ -1,12 +1,36 @@
+# -*- coding: utf-8 -*-%0A
import csv%0Ai
|
b383b0ba5e1bd50fe326ec34c17701ec173d845e | return None if no maxima found | kneed/knee_locator.py | kneed/knee_locator.py | import numpy as np
from scipy import interpolate
from scipy.signal import argrelextrema
import matplotlib.pyplot as plt
class KneeLocator(object):
def __init__(self, x, y, S=1.0, invert=False, direction='increasing'):
"""
x = x values
y = y values
S = Sensitivity parameter, origin... | Python | 0.999977 | @@ -2512,32 +2512,314 @@
d_knee(self, ):%0A
+ if len(self.xmx_idx) == 0:%0A print(%22No local maxima found in the distance curve%5Cn%22%0A %22The line is probably not polynomial, try plotting%5Cn%22%0A %22the distance curve with plt.plot(knee.xd, knee.yd)%22)%0A ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.