text stringlengths 0 1.05M | meta dict |
|---|---|
"""
This module contains some useful functions for Strings, XML or Lists.
"""
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import bz2
import collections
import fnmatch
import glob
import logging
import os
import ... | {
"repo_name": "martin-neuhaeusser/benchexec",
"path": "benchexec/util.py",
"copies": "2",
"size": "20192",
"license": "apache-2.0",
"hash": 6393949023426351000,
"line_mean": 33.8739205527,
"line_max": 127,
"alpha_frac": 0.6471870048,
"autogenerated": false,
"ratio": 3.9693335954393554,
"config_... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import argparse
import bz2
import collections
from decimal import Decimal, InvalidOperation
import math
import gzip
import io
import itertools
import logging
import os.path
import re
import signal
import subproce... | {
"repo_name": "ahealy19/F-IDE-2016",
"path": "benchexec/tablegenerator/__init__.py",
"copies": "1",
"size": "63415",
"license": "apache-2.0",
"hash": -6924076079713733000,
"line_mean": 39.3660089115,
"line_max": 192,
"alpha_frac": 0.6163210597,
"autogenerated": false,
"ratio": 4.109318299637118,
... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import argparse
import bz2
import collections
import copy
from decimal import Decimal, InvalidOperation
import math
import gzip
import io
import itertools
import logging
import os.path
import re
import signal
imp... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/tablegenerator/__init__.py",
"copies": "2",
"size": "76950",
"license": "apache-2.0",
"hash": 6747026186457718000,
"line_mean": 41.1875,
"line_max": 218,
"alpha_frac": 0.6193632229,
"autogenerated": false,
"ratio": 4.109259852611342,
"c... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import argparse
import logging
import os
import sys
sys.dont_write_bytecode = True # prevent creation of .pyc files
from benchexec import model
COLOR_RED = "\033[31;1m"
COLOR_GREEN = "\033[32;1m"
COLOR_OR... | {
"repo_name": "ahealy19/F-IDE-2016",
"path": "benchexec/test_tool_info.py",
"copies": "1",
"size": "7700",
"license": "apache-2.0",
"hash": 7467464758944062000,
"line_mean": 38.5670103093,
"line_max": 129,
"alpha_frac": 0.6442157374,
"autogenerated": false,
"ratio": 3.956701030927835,
"config_t... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import bz2
import collections
import io
import os
import threading
import time
import sys
from xml.dom import minidom
from xml.etree import ElementTree as ET
import zipfile
import benchexec
from benchexec.model ... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/outputhandler.py",
"copies": "2",
"size": "33373",
"license": "apache-2.0",
"hash": 2937202431632957400,
"line_mean": 40.4571428571,
"line_max": 128,
"alpha_frac": 0.590567225,
"autogenerated": false,
"ratio": 3.924850052922498,
"config... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import os
import time
import sys
from xml.etree import ElementTree
from benchexec import result
from benchexec import util
MEMLIMIT = "memlimit"
TIMELIMIT = "timelimit"
CORELIMIT = "cpuCores"
SO... | {
"repo_name": "ahealy19/F-IDE-2016",
"path": "benchexec/model.py",
"copies": "1",
"size": "38810",
"license": "apache-2.0",
"hash": -5740211753009780000,
"line_mean": 43.3542857143,
"line_max": 146,
"alpha_frac": 0.6039422829,
"autogenerated": false,
"ratio": 4.386797784559738,
"config_test": t... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import sys
import unittest
sys.dont_write_bytecode = True # prevent creation of .pyc files
from benchexec.util import ProcessExitCode
from benchexec.model import Run
from benchexec.result import *... | {
"repo_name": "martin-neuhaeusser/benchexec",
"path": "benchexec/test_analyze_run_result.py",
"copies": "2",
"size": "7650",
"license": "apache-2.0",
"hash": 12921565279748404,
"line_mean": 45.3636363636,
"line_max": 127,
"alpha_frac": 0.6677124183,
"autogenerated": false,
"ratio": 3.693867696764... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import sys
# CONSTANTS
# categorization of a run result
CATEGORY_CORRECT = 'correct'
"""run result given by tool was correct"""
CATEGORY_WRONG = 'wrong'
"""run result given by tool was wrong"""
CA... | {
"repo_name": "ahealy19/F-IDE-2016",
"path": "benchexec/result.py",
"copies": "1",
"size": "13659",
"license": "apache-2.0",
"hash": -121762239132829300,
"line_mean": 40.5167173252,
"line_max": 107,
"alpha_frac": 0.6386265466,
"autogenerated": false,
"ratio": 3.8726963425007086,
"config_test": ... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import sys
# CONSTANTS
# categorization of a run result
# 'correct' and 'wrong' refer to whether the tool's result matches the expected result.
# 'confirmed' and 'unconfirmed' refer to whether the too... | {
"repo_name": "martin-neuhaeusser/benchexec",
"path": "benchexec/result.py",
"copies": "2",
"size": "15117",
"license": "apache-2.0",
"hash": 7167848725145293000,
"line_mean": 41.7033898305,
"line_max": 110,
"alpha_frac": 0.640669445,
"autogenerated": false,
"ratio": 3.841677255400254,
"config_... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from benchexec import util
class FileWriter(object):
"""
The class FileWriter is a wrapper for writing content into a file.
"""
def __init__(self, filename, content):
"""
... | {
"repo_name": "ahealy19/F-IDE-2016",
"path": "benchexec/filewriter.py",
"copies": "3",
"size": "2336",
"license": "apache-2.0",
"hash": 5185378147349829000,
"line_mean": 30.5675675676,
"line_max": 82,
"alpha_frac": 0.6421232877,
"autogenerated": false,
"ratio": 4.317929759704251,
"config_test":... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import re
from math import floor, log10
from benchexec.tablegenerator import util
__all__ = ['Column, ColumnType, ColumnMeasureType']
DEFAULT_TIME_PRECISION = 3
DEFAULT_TOOLTIP_PRECISION = 2
REGEX_SIGNIFICANT... | {
"repo_name": "martin-neuhaeusser/benchexec",
"path": "benchexec/tablegenerator/columns.py",
"copies": "2",
"size": "12717",
"license": "apache-2.0",
"hash": -5242907971659719000,
"line_mean": 39.7596153846,
"line_max": 149,
"alpha_frac": 0.6467720374,
"autogenerated": false,
"ratio": 3.909314478... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
import re
import math
from benchexec.tablegenerator import util
__all__ = ['Column, ColumnType, ColumnMeasureType']
DEFAULT_TIME_PRECISION = 3
DEFAULT_TOOLTIP_PRECISION = 2
REGEX_SIGNIFICANT_DIGITS = re.compi... | {
"repo_name": "ahealy19/F-IDE-2016",
"path": "benchexec/tablegenerator/columns.py",
"copies": "1",
"size": "10070",
"license": "apache-2.0",
"hash": 767311820008861300,
"line_mean": 36.5746268657,
"line_max": 141,
"alpha_frac": 0.6603773585,
"autogenerated": false,
"ratio": 3.8318112633181127,
... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import argparse
import collections
import errno
import logging
import multiprocessing
import os
import resource
import signal
import subprocess
import sys
import thread... | {
"repo_name": "martin-neuhaeusser/benchexec",
"path": "benchexec/runexecutor.py",
"copies": "1",
"size": "60817",
"license": "apache-2.0",
"hash": -4961905790556915000,
"line_mean": 46.9629337539,
"line_max": 216,
"alpha_frac": 0.6034990217,
"autogenerated": false,
"ratio": 4.388900916504294,
"... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import argparse
import errno
import logging
import multiprocessing
import os
import resource
import signal
import subprocess
import sys
import threading
import time
imp... | {
"repo_name": "ahealy19/F-IDE-2016",
"path": "benchexec/runexecutor.py",
"copies": "1",
"size": "51422",
"license": "apache-2.0",
"hash": 3222787992730551000,
"line_mean": 45.5778985507,
"line_max": 216,
"alpha_frac": 0.6007739878,
"autogenerated": false,
"ratio": 4.377458074401975,
"config_tes... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import argparse
import logging
import os
import sys
import tempfile
import threading
sys.dont_write_bytecode = True # prevent creation of .pyc files
from benchexec.cgr... | {
"repo_name": "ahealy19/F-IDE-2016",
"path": "benchexec/check_cgroups.py",
"copies": "3",
"size": "5442",
"license": "apache-2.0",
"hash": -4729658089513025000,
"line_mean": 38.4347826087,
"line_max": 121,
"alpha_frac": 0.6492098493,
"autogenerated": false,
"ratio": 4.055141579731743,
"config_t... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import collections
import logging
import os
import subprocess
import signal
import re
from benchexec.util import find_executable
from decimal import Decimal
DOMAIN_PAC... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/intel_cpu_energy.py",
"copies": "2",
"size": "4296",
"license": "apache-2.0",
"hash": -6243316331099480000,
"line_mean": 36.0344827586,
"line_max": 122,
"alpha_frac": 0.6554934823,
"autogenerated": false,
"ratio": 4.4288659793814436,
"c... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import errno
import logging
import os
import signal
import subprocess
import sys
import threading
sys.dont_write_bytecode = True # prevent creation of .pyc files
from ... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/baseexecutor.py",
"copies": "2",
"size": "7573",
"license": "apache-2.0",
"hash": 3429147762423658500,
"line_mean": 40.3825136612,
"line_max": 104,
"alpha_frac": 0.6103261587,
"autogenerated": false,
"ratio": 4.237828763290431,
"config_... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import logging
import os
import shutil
import signal
import tempfile
import time
from benchexec import util
__all__ = [
'find_my_cgroups',
'find... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/cgroups.py",
"copies": "2",
"size": "16013",
"license": "apache-2.0",
"hash": 335705685144707900,
"line_mean": 37.6787439614,
"line_max": 109,
"alpha_frac": 0.6195591082,
"autogenerated": false,
"ratio": 4.008260325406758,
"config_test"... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import logging
import os
import threading
from benchexec.cgroups import MEMORY
from benchexec import util
from ctypes import cdll
_libc = cdll.LoadLibrary('libc.so.6'... | {
"repo_name": "ahealy19/F-IDE-2016",
"path": "benchexec/oomhandler.py",
"copies": "1",
"size": "6100",
"license": "apache-2.0",
"hash": -8593001814791627000,
"line_mean": 43.5255474453,
"line_max": 158,
"alpha_frac": 0.6321311475,
"autogenerated": false,
"ratio": 4.116059379217274,
"config_test... |
"""This module contians the tool benchexec for executing a whole benchmark (suite).
To use it, instantiate the "benchexec.benchexec.BenchExec"
and either call "instance.start()" or "benchexec.benchexec.main(instance)".
"""
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicod... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/benchexec.py",
"copies": "2",
"size": "15414",
"license": "apache-2.0",
"hash": 808412782824415700,
"line_mean": 41.8166666667,
"line_max": 161,
"alpha_frac": 0.5772025431,
"autogenerated": false,
"ratio": 4.760345892526251,
"config_tes... |
"""This module contains function declarations for several functions of libc (based on ctypes),
and constants relevant for these functions.
"""
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import ctypes as _ctypes... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/libc.py",
"copies": "2",
"size": "4748",
"license": "apache-2.0",
"hash": -6108765407461120000,
"line_mean": 32.9142857143,
"line_max": 118,
"alpha_frac": 0.6933445661,
"autogenerated": false,
"ratio": 3.0203562340966923,
"config_test":... |
"""Utility functions for implementing a container using Linux namespaces
and for appropriately configuring such a container."""
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import contextlib
import ctypes
import ... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/container.py",
"copies": "2",
"size": "15238",
"license": "apache-2.0",
"hash": 7638633059939580000,
"line_mean": 37.6751269036,
"line_max": 106,
"alpha_frac": 0.6729885812,
"autogenerated": false,
"ratio": 3.57867543447628,
"config_tes... |
import os
import logging
import re
import subprocess
import benchexec.result as result
import benchexec.tools.template
import benchexec.util as util
class Tool(benchexec.tools.template.BaseTool):
"""
Tool info for witness2test
(https://github.com/diffblue/cprover-sv-comp/pull/14).
"""
REQUIRED_P... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/tools/fshell-witness2test.py",
"copies": "2",
"size": "5186",
"license": "apache-2.0",
"hash": 2920847701378361000,
"line_mean": 42.5798319328,
"line_max": 112,
"alpha_frac": 0.6401851138,
"autogenerated": false,
"ratio": 4.54115586690017... |
# prepare for Python 3
from __future__ import absolute_import, division, print_function, unicode_literals
# THIS MODULE HAS TO WORK WITH PYTHON 2.7!
import logging
import os
import threading
from benchexec import container
from benchexec import util
_CHECK_INTERVAL_SECONDS = 60
_DURATION_WARNING_THRESHOLD = 1
cla... | {
"repo_name": "IljaZakharov/benchexec",
"path": "benchexec/filehierarchylimit.py",
"copies": "2",
"size": "4031",
"license": "apache-2.0",
"hash": 7474286232804610000,
"line_mean": 38.5196078431,
"line_max": 92,
"alpha_frac": 0.6060530886,
"autogenerated": false,
"ratio": 4.1728778467908905,
"c... |
# Benchmark2.py
#
# NREL 5MW Wind Turbine Analysis
# Using parameters specified by the NREL report for the 5MW tower, perform
# aerodynamic, structural and cost analysis on the turbine to verify that the
# numbers are reasonable.
#
# Author: Lewis Li (lewisli@stanford.edu)
# Original Date: November 1st 2015
import o... | {
"repo_name": "lewisli/wind-turbine-mdo",
"path": "Benchmark2.py",
"copies": "1",
"size": "26127",
"license": "mit",
"hash": -7088484219086288000,
"line_mean": 38.1709145427,
"line_max": 181,
"alpha_frac": 0.6953343285,
"autogenerated": false,
"ratio": 2.535617236024845,
"config_test": false,
... |
""" Benchmark Admin """
# Duplicate code
# pylint: disable=R0801
from django.contrib import admin
from app.logic.benchmark.models.BenchmarkDefinitionModel import BenchmarkDefinitionEntry
from app.logic.benchmark.models.BenchmarkDefinitionWorkerPassModel import BenchmarkDefinitionWorkerPassEntry
from app.logic.benchma... | {
"repo_name": "imvu/bluesteel",
"path": "app/logic/benchmark/admin.py",
"copies": "1",
"size": "1631",
"license": "mit",
"hash": -7357250118676192000,
"line_mean": 45.6,
"line_max": 108,
"alpha_frac": 0.840588596,
"autogenerated": false,
"ratio": 4.456284153005464,
"config_test": false,
"has_... |
""" Benchmark against functools.lru_cache.
Benchmark script from http://bugs.python.org/file28400/lru_cache_bench.py
with a few modifications.
Not available for Py < 3.3.
"""
from __future__ import print_function
import sys
if sys.version_info[:2] >= (3, 3):
import functools
import fastcache
... | {
"repo_name": "pbrady/fastcache",
"path": "fastcache/benchmark.py",
"copies": "1",
"size": "3690",
"license": "mit",
"hash": -16140334719918444,
"line_mean": 35.1764705882,
"line_max": 79,
"alpha_frac": 0.472899729,
"autogenerated": false,
"ratio": 3.5412667946257197,
"config_test": false,
"h... |
# Benchmark all examples
import subprocess
import sys
import os
import platform
EXAMPLES = [
"bloom",
"computecloth",
"computecullandlod",
"computenbody",
"computeparticles",
"computeshader",
"debugmarker",
"deferred",
"deferredmultisampling",
"deferredshadows",
"displacement",
"distancefieldfonts",
"dyna... | {
"repo_name": "SaschaWillems/vulkan_slim",
"path": "bin/benchmark-all.py",
"copies": "3",
"size": "1683",
"license": "mit",
"hash": 7585819191657020000,
"line_mean": 19.0357142857,
"line_max": 98,
"alpha_frac": 0.6910279263,
"autogenerated": false,
"ratio": 2.768092105263158,
"config_test": fal... |
"""Benchmark batching="auto" on high number of fast tasks
The goal of this script is to study the behavior of the batch_size='auto'
and in particular the impact of the default value of the
joblib.parallel.MIN_IDEAL_BATCH_DURATION constant.
"""
# Author: Olivier Grisel
# License: BSD 3 clause
import numpy as np
impor... | {
"repo_name": "tomMoral/joblib",
"path": "benchmarks/bench_auto_batching.py",
"copies": "6",
"size": "4331",
"license": "bsd-3-clause",
"hash": 2592323741500057600,
"line_mean": 38.018018018,
"line_max": 79,
"alpha_frac": 0.6501962595,
"autogenerated": false,
"ratio": 3.799122807017544,
"config... |
# Benchmark Builder script
import sys, os, subprocess, datetime, argparse
now = datetime.datetime.now()
nowf = now.strftime("%Y-%m-%dT%H:%M:%SZ")
# User input
parser = argparse.ArgumentParser()
parser.add_argument("userkey", help="AWS key name.", action="store")
parser.add_argument("numnodes", help="AWS number of nod... | {
"repo_name": "akarmas/mrgeo",
"path": "scripts/examples/benchmarkBuilder.py",
"copies": "2",
"size": "9301",
"license": "apache-2.0",
"hash": 7051368696385589000,
"line_mean": 74.0080645161,
"line_max": 314,
"alpha_frac": 0.7107837867,
"autogenerated": false,
"ratio": 3.2726952850105557,
"conf... |
"""Benchmark curvilinear interpolation algorithm"""
# pylint: disable=missing-docstring, invalid-name
import netCDF4
import bench
import util
from obsoper.interpolate import Curvilinear
class BenchmarkCurvilinear(bench.Suite):
def setUp(self):
for path in ["sample_class4.nc",
"sample_... | {
"repo_name": "met-office-ocean/obsoper",
"path": "benchmarks/bench_curvilinear.py",
"copies": "1",
"size": "2078",
"license": "bsd-3-clause",
"hash": 421111050621549500,
"line_mean": 36.1071428571,
"line_max": 72,
"alpha_frac": 0.6381135707,
"autogenerated": false,
"ratio": 3.522033898305085,
... |
""" Benchmark Definition Controller file """
# Disable warning for max 7 params on a function.
# I need to refactor save_benchmark_definition to take an object instead.
# pylint: disable=R0913
from django.core.paginator import Paginator
from app.logic.benchmark.models.BenchmarkDefinitionModel import BenchmarkDefiniti... | {
"repo_name": "imvu/bluesteel",
"path": "app/logic/benchmark/controllers/BenchmarkDefinitionController.py",
"copies": "1",
"size": "12479",
"license": "mit",
"hash": 5401076693845186000,
"line_mean": 39.1254019293,
"line_max": 118,
"alpha_frac": 0.6614312044,
"autogenerated": false,
"ratio": 4.37... |
""" BenchmarkDefinition model """
import datetime
from django.db import models
from django.db.models import signals
from django.dispatch.dispatcher import receiver
from app.logic.commandrepo.models.CommandSetModel import CommandSetEntry
class BenchmarkDefinitionEntry(models.Model):
""" Benchmark Definition """
... | {
"repo_name": "imvu/bluesteel",
"path": "app/logic/benchmark/models/BenchmarkDefinitionModel.py",
"copies": "1",
"size": "5656",
"license": "mit",
"hash": -6049105000788033000,
"line_mean": 39.4,
"line_max": 104,
"alpha_frac": 0.5836280057,
"autogenerated": false,
"ratio": 3.6632124352331608,
"... |
""" BenchmarkDefinitionWorkerPass model """
from django.db import models
class BenchmarkDefinitionWorkerPassEntry(models.Model):
""" Benchmark Definition Worker Pass"""
definition = models.ForeignKey('benchmark.BenchmarkDefinitionEntry', related_name="worker_pass_definition")
worker = models.ForeignKey('b... | {
"repo_name": "imvu/bluesteel",
"path": "app/logic/benchmark/models/BenchmarkDefinitionWorkerPassModel.py",
"copies": "1",
"size": "1275",
"license": "mit",
"hash": -4670136296001087000,
"line_mean": 37.6363636364,
"line_max": 111,
"alpha_frac": 0.6352941176,
"autogenerated": false,
"ratio": 4.19... |
""" Benchmark different hashlib hash functions using timeit """
import timeit
try:
import hashlib
digest = {
"MD5": hashlib.md5,
"SHA": hashlib.sha1,
"SHA224": hashlib.sha224,
"SHA256": hashlib.sha256,
"SHA384": hashlib.sha384,
"SHA512": hashlib.sha512
}
exc... | {
"repo_name": "blackPantherOS/packagemanagement",
"path": "smartpm/sandbox/hashtime.py",
"copies": "2",
"size": "1272",
"license": "apache-2.0",
"hash": 1486800291920403700,
"line_mean": 26.652173913,
"line_max": 81,
"alpha_frac": 0.5951257862,
"autogenerated": false,
"ratio": 3.0576923076923075,... |
"Benchmark diskcache.DjangoCache"
import collections as co
import os
import pickle
import random
import shutil
import time
from threading import Thread
from utils import Complex, display
PROCS = 8
OPS = int(1e5)
RANGE = int(1.1e3)
WARMUP = int(1e3)
USE_STRINGS = True
def setup():
os.environ.setdefault("DJANGO_... | {
"repo_name": "kogan/django-lrucache-backend",
"path": "benchmarking/benchmark.py",
"copies": "1",
"size": "4109",
"license": "mit",
"hash": -1185341950565978400,
"line_mean": 23.3136094675,
"line_max": 98,
"alpha_frac": 0.5716719396,
"autogenerated": false,
"ratio": 3.898481973434535,
"config_... |
"""Benchmark disk IO performance.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import io
import logging
import os
import shutil
import tempfile
import enum
import six
from six.moves import configparser
from ... | {
"repo_name": "bretttegart/treadmill",
"path": "lib/python/treadmill/diskbenchmark.py",
"copies": "1",
"size": "8401",
"license": "apache-2.0",
"hash": -144162710141216000,
"line_mean": 29.0035714286,
"line_max": 68,
"alpha_frac": 0.6064754196,
"autogenerated": false,
"ratio": 3.6959964804223495,... |
# benchmark_distributions.py
# Contact: Jacob Schreiber ( jmschreiber91@gmail.com )
"""
Benchmark the distribution module, printing out the time it takes to do
log probability and training calculations.
"""
from pomegranate import *
import random
import numpy
import time
numpy.random.seed(0)
random.seed(0)
def prin... | {
"repo_name": "jmschrei/pomegranate",
"path": "benchmarks/benchmark_distributions.py",
"copies": "1",
"size": "4917",
"license": "mit",
"hash": 5561874364033284000,
"line_mean": 38.336,
"line_max": 99,
"alpha_frac": 0.5731136872,
"autogenerated": false,
"ratio": 3.6776364996260282,
"config_test... |
"""Benchmark evaluating eventlet's performance at speaking to itself over a localhost socket."""
from __future__ import print_function
import time
import benchmarks
from eventlet.support import six
BYTES = 1000
SIZE = 1
CONCURRENCY = 50
TRIES = 5
def reader(sock):
expect = BYTES
while expect > 0:
... | {
"repo_name": "collinstocks/eventlet",
"path": "benchmarks/localhost_socket.py",
"copies": "4",
"size": "3590",
"license": "mit",
"hash": -8248571403390540000,
"line_mean": 29.6837606838,
"line_max": 98,
"alpha_frac": 0.6245125348,
"autogenerated": false,
"ratio": 3.6262626262626263,
"config_te... |
"""Benchmark evaluating eventlet's performance at speaking to itself over a localhost socket."""
from __future__ import print_function
import time
import benchmarks
import six
BYTES = 1000
SIZE = 1
CONCURRENCY = 50
TRIES = 5
def reader(sock):
expect = BYTES
while expect > 0:
d = sock.recv(min(expe... | {
"repo_name": "cloudera/hue",
"path": "desktop/core/ext-py/eventlet-0.24.1/benchmarks/localhost_socket.py",
"copies": "5",
"size": "3568",
"license": "apache-2.0",
"hash": -8298522812534775000,
"line_mean": 29.4957264957,
"line_max": 98,
"alpha_frac": 0.6230381166,
"autogenerated": false,
"ratio"... |
"""Benchmark evaluating eventlet's performance at speaking to itself over a localhost socket."""
import time
import benchmarks
BYTES=1000
SIZE=1
CONCURRENCY=50
def reader(sock):
expect = BYTES
while expect > 0:
d = sock.recv(min(expect, SIZE))
expect -= len(d)
def writer(addr, so... | {
"repo_name": "tavisrudd/eventlet",
"path": "benchmarks/localhost_socket.py",
"copies": "1",
"size": "3338",
"license": "mit",
"hash": -7911557223252496000,
"line_mean": 32.39,
"line_max": 116,
"alpha_frac": 0.6243259437,
"autogenerated": false,
"ratio": 3.6441048034934496,
"config_test": false... |
"""Benchmark evaluating eventlet's performance at speaking to itself over a localhost socket."""
import time
import benchmarks
BYTES=1000
SIZE=1
CONCURRENCY=50
TRIES=5
def reader(sock):
expect = BYTES
while expect > 0:
d = sock.recv(min(expect, SIZE))
expect -= len(d)
def writer(... | {
"repo_name": "Cue/eventlet",
"path": "benchmarks/localhost_socket.py",
"copies": "3",
"size": "3475",
"license": "mit",
"hash": 3991528254122879500,
"line_mean": 32.1047619048,
"line_max": 116,
"alpha_frac": 0.6207194245,
"autogenerated": false,
"ratio": 3.6349372384937237,
"config_test": fals... |
""" BenchmarkExecution Branch Controller tests """
from django.test import TestCase
from django.contrib.auth.models import User
from django.contrib.auth.models import AnonymousUser
from django.utils import timezone
from app.logic.benchmark.controllers.BenchmarkExecutionController import BenchmarkExecutionController
fr... | {
"repo_name": "imvu/bluesteel",
"path": "app/logic/benchmark/tests/tests_controller_BenchmarkExecutionController_branch.py",
"copies": "1",
"size": "44016",
"license": "mit",
"hash": -1862445406481468000,
"line_mean": 52.3527272727,
"line_max": 238,
"alpha_frac": 0.6594420211,
"autogenerated": fals... |
""" Benchmark Execution Controller file """
from __future__ import print_function
from datetime import timedelta
import json
from django.db.models import Q, F, Count
from django.core.paginator import Paginator
from django.utils import timezone
from django.conf import settings
import arrow
import pytz
from app.logic.... | {
"repo_name": "imvu/bluesteel",
"path": "app/logic/benchmark/controllers/BenchmarkExecutionController.py",
"copies": "1",
"size": "18586",
"license": "mit",
"hash": -5077178374199172000,
"line_mean": 39.7587719298,
"line_max": 120,
"alpha_frac": 0.6148176046,
"autogenerated": false,
"ratio": 4.47... |
""" BenchmarkExecution model """
import json
from django.db import models
from django.db.models import signals
from django.dispatch.dispatcher import receiver
from app.logic.commandrepo.models.CommandModel import CommandEntry
from app.logic.commandrepo.models.CommandSetModel import CommandSetEntry
from app.logic.comma... | {
"repo_name": "imvu/bluesteel",
"path": "app/logic/benchmark/models/BenchmarkExecutionModel.py",
"copies": "1",
"size": "4409",
"license": "mit",
"hash": 1889796229003547400,
"line_mean": 37.3391304348,
"line_max": 114,
"alpha_frac": 0.6357450669,
"autogenerated": false,
"ratio": 4.04495412844036... |
""" BenchmarkExecution Model tests """
from django.test import TestCase
from django.utils import timezone
from django.contrib.auth.models import User
from app.logic.benchmark.models.BenchmarkExecutionModel import BenchmarkExecutionEntry
from app.logic.benchmark.models.BenchmarkDefinitionModel import BenchmarkDefinitio... | {
"repo_name": "imvu/bluesteel",
"path": "app/logic/benchmark/tests/tests_model_BenchmarkExecutionModel.py",
"copies": "1",
"size": "9046",
"license": "mit",
"hash": 279898753476223900,
"line_mean": 37.1687763713,
"line_max": 107,
"alpha_frac": 0.6486845014,
"autogenerated": false,
"ratio": 3.9347... |
""" BenchmarkExecution Views tests """
from django.test import TestCase
from django.test import Client
from django.utils import timezone
from django.contrib.auth.models import User
from app.logic.benchmark.models.BenchmarkDefinitionModel import BenchmarkDefinitionEntry
from app.logic.benchmark.models.BenchmarkDefiniti... | {
"repo_name": "imvu/bluesteel",
"path": "app/presenter/tests/tests_views_json_ViewBenchmark.py",
"copies": "1",
"size": "8405",
"license": "mit",
"hash": 4644651382795215000,
"line_mean": 37.3789954338,
"line_max": 138,
"alpha_frac": 0.648066627,
"autogenerated": false,
"ratio": 4.052555448408872... |
""" Benchmark Fluctuation Controller file """
import sys
from app.logic.benchmark.models.BenchmarkExecutionModel import BenchmarkExecutionEntry
from app.logic.benchmark.models.BenchmarkFluctuationOverrideModel import BenchmarkFluctuationOverrideEntry
from app.logic.benchmark.models.BenchmarkFluctuationWaiverModel impo... | {
"repo_name": "imvu/bluesteel",
"path": "app/logic/benchmark/controllers/BenchmarkFluctuationController.py",
"copies": "1",
"size": "11627",
"license": "mit",
"hash": -8850540354803930000,
"line_mean": 40.2304964539,
"line_max": 115,
"alpha_frac": 0.619076288,
"autogenerated": false,
"ratio": 4.1... |
""" Benchmark Fluctuation Controller tests """
from django.test import TestCase
from django.contrib.auth.models import User
from django.contrib.auth.models import AnonymousUser
from django.utils import timezone
from app.logic.benchmark.controllers.BenchmarkFluctuationController import BenchmarkFluctuationController
fr... | {
"repo_name": "imvu/bluesteel",
"path": "app/logic/benchmark/tests/tests_controller_BenchmarkFluctuationController.py",
"copies": "1",
"size": "71520",
"license": "mit",
"hash": -7524777074362553000,
"line_mean": 84.8583433373,
"line_max": 254,
"alpha_frac": 0.6883529083,
"autogenerated": false,
... |
"""Benchmark for bottleneck0.
Bottleneck in which the actions are specifying a desired velocity in a segment
of space. The autonomous penetration rate in this example is 10%.
- **Action Dimension**: (?, )
- **Observation Dimension**: (?, )
- **Horizon**: 1000 steps
"""
from flow.core.params import SumoParams, EnvPar... | {
"repo_name": "cathywu/flow",
"path": "flow/benchmarks/bottleneck0.py",
"copies": "1",
"size": "4178",
"license": "mit",
"hash": 4500385623840146000,
"line_mean": 27.2297297297,
"line_max": 79,
"alpha_frac": 0.663714696,
"autogenerated": false,
"ratio": 3.3290836653386453,
"config_test": false,... |
"""Benchmark for bottleneck1.
Bottleneck in which the actions are specifying a desired velocity in a segment
of space. The autonomous penetration rate in this example is 25%.
Human lane changing is enabled.
- **Action Dimension**: (?, )
- **Observation Dimension**: (?, )
- **Horizon**: 1000 steps
"""
from flow.core.... | {
"repo_name": "cathywu/flow",
"path": "flow/benchmarks/bottleneck1.py",
"copies": "1",
"size": "4212",
"license": "mit",
"hash": 111388371292658750,
"line_mean": 27.4594594595,
"line_max": 79,
"alpha_frac": 0.6652421652,
"autogenerated": false,
"ratio": 3.334916864608076,
"config_test": false,
... |
"""Benchmark for bottleneck2.
Bottleneck in which the actions are specifying a desired velocity in a segment
of space for a large bottleneck.
The autonomous penetration rate in this example is 10%.
- **Action Dimension**: (40, )
- **Observation Dimension**: (281, )
- **Horizon**: 1000 steps
"""
from flow.core.params... | {
"repo_name": "cathywu/flow",
"path": "flow/benchmarks/bottleneck2.py",
"copies": "1",
"size": "4222",
"license": "mit",
"hash": 4155710831055518000,
"line_mean": 27.527027027,
"line_max": 79,
"alpha_frac": 0.6655613453,
"autogenerated": false,
"ratio": 3.327029156816391,
"config_test": false,
... |
# Benchmark for checking if numexpr leaks memory when evaluating
# expressions that changes continously. It also serves for computing
# the latency of numexpr when working with small arrays.
import sys
from time import time
import numpy as np
import numexpr as ne
N = 1000*10
M = 1000
print "Number of iterations %s.... | {
"repo_name": "jsalvatier/numexpr",
"path": "bench/varying-expr.py",
"copies": "2",
"size": "1161",
"license": "mit",
"hash": 2025097495983203300,
"line_mean": 28.7692307692,
"line_max": 74,
"alpha_frac": 0.6192937123,
"autogenerated": false,
"ratio": 2.9922680412371134,
"config_test": false,
... |
"""Benchmark for figureeight0.
Trains a fraction of vehicles in a ring road structure to regulate the flow of
vehicles through an intersection. In this example, the last vehicle in the
network is an autonomous vehicle.
- **Action Dimension**: (1, )
- **Observation Dimension**: (28, )
- **Horizon**: 1500 steps
"""
fr... | {
"repo_name": "cathywu/flow",
"path": "flow/benchmarks/figureeight0.py",
"copies": "1",
"size": "2590",
"license": "mit",
"hash": -2623758389024370700,
"line_mean": 28.7701149425,
"line_max": 79,
"alpha_frac": 0.6884169884,
"autogenerated": false,
"ratio": 3.668555240793201,
"config_test": fals... |
"""Benchmark for figureeight2.
Trains a fraction of vehicles in a ring road structure to regulate the flow of
vehicles through an intersection. In this example, every vehicle in the
network is an autonomous vehicle.
- **Action Dimension**: (14, )
- **Observation Dimension**: (28, )
- **Horizon**: 1500 steps
"""
from... | {
"repo_name": "cathywu/flow",
"path": "flow/benchmarks/figureeight2.py",
"copies": "1",
"size": "2284",
"license": "mit",
"hash": -2708554434303208400,
"line_mean": 29.0526315789,
"line_max": 79,
"alpha_frac": 0.6970227671,
"autogenerated": false,
"ratio": 3.738134206219313,
"config_test": fals... |
"""Benchmark for grid0.
- **Action Dimension**: (9, )
- **Observation Dimension**: (339, )
- **Horizon**: 400 steps
"""
from flow.core.params import SumoParams, EnvParams, InitialConfig, NetParams, \
InFlows, SumoCarFollowingParams
from flow.core.params import VehicleParams
from flow.controllers import SimCarFoll... | {
"repo_name": "cathywu/flow",
"path": "flow/benchmarks/grid0.py",
"copies": "1",
"size": "4063",
"license": "mit",
"hash": -4611598614013480000,
"line_mean": 30.496124031,
"line_max": 79,
"alpha_frac": 0.6340142752,
"autogenerated": false,
"ratio": 3.4845626072041167,
"config_test": false,
"h... |
"""Benchmark for grid1.
- **Action Dimension**: (25, )
- **Observation Dimension**: (915, )
- **Horizon**: 400 steps
"""
from flow.core.params import SumoParams, EnvParams, InitialConfig, NetParams, \
InFlows, SumoCarFollowingParams
from flow.core.params import VehicleParams
from flow.controllers import SimCarFol... | {
"repo_name": "cathywu/flow",
"path": "flow/benchmarks/grid1.py",
"copies": "1",
"size": "4064",
"license": "mit",
"hash": -7458460614910723000,
"line_mean": 30.503875969,
"line_max": 79,
"alpha_frac": 0.6341043307,
"autogenerated": false,
"ratio": 3.485420240137221,
"config_test": false,
"ha... |
"""Benchmark for Key comparison."""
import cProfile
import os
import pstats
import sys
from ndb import key
from ndb import utils
# Hack: replace os.environ with a plain dict. This is to make the
# benchmark more similar to the production environment, where
# os.environ is also a plain dict. In the environment wher... | {
"repo_name": "bslatkin/8-bits",
"path": "appengine-ndb/keybench.py",
"copies": "1",
"size": "1724",
"license": "apache-2.0",
"hash": -1228156334761466000,
"line_mean": 23.6285714286,
"line_max": 68,
"alpha_frac": 0.6403712297,
"autogenerated": false,
"ratio": 3.198515769944341,
"config_test": ... |
"""Benchmark for keys_only fetch() -- see also dbench,py."""
import cProfile
import os
import pstats
import sys
from google.appengine.ext import testbed
from ndb import utils
utils.DEBUG = False
from ndb import eventloop
from ndb import model
from ndb import tasklets
# Hack: replace os.environ with a plain dict. ... | {
"repo_name": "bslatkin/8-bits",
"path": "appengine-ndb/kobench.py",
"copies": "1",
"size": "1649",
"license": "apache-2.0",
"hash": 3769903653338431500,
"line_mean": 20.4155844156,
"line_max": 72,
"alpha_frac": 0.6743480898,
"autogenerated": false,
"ratio": 3.239685658153242,
"config_test": fa... |
"""Benchmark for keys_only fetch() using *OLD* db -- see also kobench.py."""
import cProfile
import os
import pstats
import sys
from google.appengine.ext import testbed
from google.appengine.ext import db
from ndb import utils
utils.DEBUG = False
from ndb import eventloop
from ndb import model
from ndb import taskl... | {
"repo_name": "bslatkin/8-bits",
"path": "appengine-ndb/dbench.py",
"copies": "1",
"size": "1686",
"license": "apache-2.0",
"hash": 559287931721907400,
"line_mean": 20.6153846154,
"line_max": 76,
"alpha_frac": 0.6761565836,
"autogenerated": false,
"ratio": 3.2298850574712645,
"config_test": fal... |
"""Benchmark for merge0.
Trains a small percentage of autonomous vehicles to dissipate shockwaves caused
by merges in an open network. The autonomous penetration rate in this example
is 10%.
- **Action Dimension**: (5, )
- **Observation Dimension**: (25, )
- **Horizon**: 750 steps
"""
from copy import deepcopy
from ... | {
"repo_name": "cathywu/flow",
"path": "flow/benchmarks/merge0.py",
"copies": "1",
"size": "3470",
"license": "mit",
"hash": -1728904240552008400,
"line_mean": 27.6776859504,
"line_max": 79,
"alpha_frac": 0.6913544669,
"autogenerated": false,
"ratio": 3.3494208494208495,
"config_test": false,
... |
"""Benchmark for merge1.
Trains a small percentage of autonomous vehicles to dissipate shockwaves caused
by merges in an open network. The autonomous penetration rate in this example
is 25%.
- **Action Dimension**: (13, )
- **Observation Dimension**: (65, )
- **Horizon**: 750 steps
"""
from copy import deepcopy
from... | {
"repo_name": "cathywu/flow",
"path": "flow/benchmarks/merge1.py",
"copies": "1",
"size": "3473",
"license": "mit",
"hash": -2793366369860732400,
"line_mean": 27.7024793388,
"line_max": 79,
"alpha_frac": 0.6916210769,
"autogenerated": false,
"ratio": 3.3523166023166024,
"config_test": false,
... |
"""Benchmark for merge2.
Trains a small percentage of autonomous vehicles to dissipate shockwaves caused
by merges in an open network. The autonomous penetration rate in this example
is 33.3%.
- **Action Dimension**: (17, )
- **Observation Dimension**: (85, )
- **Horizon**: 750 steps
"""
from copy import deepcopy
fr... | {
"repo_name": "cathywu/flow",
"path": "flow/benchmarks/merge2.py",
"copies": "1",
"size": "3476",
"license": "mit",
"hash": 6265778038208073000,
"line_mean": 27.7272727273,
"line_max": 79,
"alpha_frac": 0.6915995397,
"autogenerated": false,
"ratio": 3.348747591522158,
"config_test": false,
"h... |
"""Benchmark for put_multi().
Run this using 'make x CUSTOM=putbench FLAGS=-n'.
Use FLAGS=-o to get the corresponding profile for the old db package.
"""
import cProfile
import os
import pstats
import sys
import time
# Pay no attention to the testbed behind the curtain.
from google.appengine.ext import testbed
tb = ... | {
"repo_name": "bslatkin/8-bits",
"path": "appengine-ndb/putbench.py",
"copies": "1",
"size": "2432",
"license": "apache-2.0",
"hash": 4307067792021099500,
"line_mean": 23.32,
"line_max": 70,
"alpha_frac": 0.6702302632,
"autogenerated": false,
"ratio": 2.9731051344743276,
"config_test": false,
... |
# Benchmark for read of raster data to ndarray
import timeit
import rasterio
from osgeo import gdal
# GDAL
s = """
src = gdal.Open('rasterio/tests/data/RGB.byte.tif')
arr = src.GetRasterBand(1).ReadAsArray()
src = None
"""
n = 100
t = timeit.timeit(s, setup='from osgeo import gdal', number=n)
print("GDAL:")
print(... | {
"repo_name": "snorfalorpagus/rasterio",
"path": "benchmarks/ndarray.py",
"copies": "2",
"size": "1588",
"license": "bsd-3-clause",
"hash": 778602339042537900,
"line_mean": 20.7534246575,
"line_max": 85,
"alpha_frac": 0.6675062972,
"autogenerated": false,
"ratio": 2.5571658615136874,
"config_te... |
# Benchmark for read of raster data to ndarray
import timeit
import rasterio
from osgeo import gdal
# GDAL
s = """
src = gdal.Open('tests/data/RGB.byte.tif')
arr = src.GetRasterBand(1).ReadAsArray()
src = None
"""
n = 1000
t = timeit.timeit(s, setup='from osgeo import gdal', number=n)
print("GDAL:")
print("%f usec... | {
"repo_name": "kapadia/rasterio",
"path": "benchmarks/ndarray.py",
"copies": "6",
"size": "1285",
"license": "bsd-3-clause",
"hash": -7488057872732498000,
"line_mean": 20.4166666667,
"line_max": 85,
"alpha_frac": 0.6653696498,
"autogenerated": false,
"ratio": 2.554671968190855,
"config_test": f... |
"""Benchmark for SQLAlchemy.
An adaptation of Robert Brewers' ZooMark speed tests. """
import datetime
import sys
import time
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.testing import fixtures, engines, profiling
from sqlalchemy import testing
ITERATIONS = 1
dbapi_session = engines.Replaya... | {
"repo_name": "rclmenezes/sqlalchemy",
"path": "test/aaa_profiling/test_zoomark_orm.py",
"copies": "1",
"size": "13389",
"license": "mit",
"hash": -5695838063073792000,
"line_mean": 35.782967033,
"line_max": 90,
"alpha_frac": 0.5378295616,
"autogenerated": false,
"ratio": 3.636338946224878,
"co... |
"""Benchmark for task creation and execution."""
import cProfile
import os
import pstats
import sys
from ndb import eventloop
from ndb import tasklets
from ndb import utils
# Hack: replace os.environ with a plain dict. This is to make the
# benchmark more similar to the production environment, where
# os.environ is... | {
"repo_name": "bslatkin/8-bits",
"path": "appengine-ndb/bench.py",
"copies": "1",
"size": "1621",
"license": "apache-2.0",
"hash": 7003022757900916000,
"line_mean": 24.7301587302,
"line_max": 68,
"alpha_frac": 0.6767427514,
"autogenerated": false,
"ratio": 3.229083665338645,
"config_test": fals... |
"""Benchmark from Laurent Vaucher.
Source: https://github.com/slowfrog/hexiom : hexiom2.py, level36.txt
(Main function tweaked by Armin Rigo.)
"""
from __future__ import division, print_function
import sys, time, StringIO
##################################
class Dir(object):
def __init__(self, x, y):
se... | {
"repo_name": "kmod/icbd",
"path": "icbd/compiler/benchmarks/pypy/hexiom2.py",
"copies": "1",
"size": "16285",
"license": "mit",
"hash": 2466986440667387000,
"line_mean": 28.880733945,
"line_max": 98,
"alpha_frac": 0.4687749463,
"autogenerated": false,
"ratio": 3.720584875485492,
"config_test":... |
""" Benchmark functions for fftpack.pseudo_diffs module
"""
from __future__ import division, absolute_import, print_function
from numpy import arange, sin, cos, pi, exp, tanh, sign
try:
from scipy.fftpack import diff, fft, ifft, tilbert, hilbert, shift, fftfreq
except ImportError:
pass
from .common import Be... | {
"repo_name": "vhaasteren/scipy",
"path": "benchmarks/benchmarks/fftpack_pseudo_diffs.py",
"copies": "46",
"size": "2298",
"license": "bsd-3-clause",
"hash": 2515884691133271600,
"line_mean": 21.5294117647,
"line_max": 79,
"alpha_frac": 0.5161009574,
"autogenerated": false,
"ratio": 2.84054388133... |
""" Benchmark functions for fftpack.pseudo_diffs module
"""
from numpy import arange, sin, cos, pi, exp, tanh, sign
from .common import Benchmark, safe_import
with safe_import():
from scipy.fftpack import diff, fft, ifft, tilbert, hilbert, shift, fftfreq
def direct_diff(x, k=1, period=None):
fx = fft(x)
... | {
"repo_name": "endolith/scipy",
"path": "benchmarks/benchmarks/fftpack_pseudo_diffs.py",
"copies": "13",
"size": "2237",
"license": "bsd-3-clause",
"hash": -4905151107289101000,
"line_mean": 22.0618556701,
"line_max": 79,
"alpha_frac": 0.5073759499,
"autogenerated": false,
"ratio": 2.820933165195... |
""" Benchmark functions for fftpack.pseudo_diffs module
"""
from numpy import arange, sin, cos, pi, exp, tanh, sign
try:
from scipy.fftpack import diff, fft, ifft, tilbert, hilbert, shift, fftfreq
except ImportError:
pass
from .common import Benchmark
def direct_diff(x, k=1, period=None):
fx = fft(x)
... | {
"repo_name": "e-q/scipy",
"path": "benchmarks/benchmarks/fftpack_pseudo_diffs.py",
"copies": "8",
"size": "2239",
"license": "bsd-3-clause",
"hash": 7690831835454578000,
"line_mean": 21.39,
"line_max": 79,
"alpha_frac": 0.5069227334,
"autogenerated": false,
"ratio": 2.8234552332912988,
"config... |
""" Benchmark functions for linalg.decomp module
"""
from __future__ import division, print_function, absolute_import
import sys
from numpy import linalg as nl
from scipy import linalg as sl
from numpy.testing import measure, rand, assert_, Tester
def random(size):
return rand(*size)
def bench_eigvals():
... | {
"repo_name": "dch312/scipy",
"path": "scipy/linalg/benchmarks/bench_decom.py",
"copies": "3",
"size": "2530",
"license": "bsd-3-clause",
"hash": -2543217820571673000,
"line_mean": 27.4269662921,
"line_max": 71,
"alpha_frac": 0.4948616601,
"autogenerated": false,
"ratio": 3.6142857142857143,
"c... |
# benchmark_hmm.py
# Contact: Jacob Schreiber ( jmschreiber91@gmail.com )
"""
Benchmark the HMM module, including multithreading.
"""
from pomegranate import *
import numpy as np
import time
import random
np.random.seed(0)
random.seed(0)
def global_alignment( match_distributions, insert_distribution ):
"""Create a... | {
"repo_name": "jmschrei/pomegranate",
"path": "benchmarks/benchmark_hmm.py",
"copies": "1",
"size": "6038",
"license": "mit",
"hash": 5157204128452080000,
"line_mean": 38.2077922078,
"line_max": 148,
"alpha_frac": 0.7091752236,
"autogenerated": false,
"ratio": 3.0356963298139767,
"config_test":... |
###benchmarking megahit
##20170516
#Tierney
###TODO:
#integrate with jacob's assembly measurement scripts
#maybe plot number of unaligned reads?
#determine which diabimmune data we should run through this
import sys
import subprocess
from ftplib import FTP
import numpy as np
#dependences: BLAT for pairwise alignmen... | {
"repo_name": "kosticlab/aether",
"path": "benchmarking/benchmarking.py",
"copies": "1",
"size": "5645",
"license": "mit",
"hash": -2968476446965122600,
"line_mean": 37.6643835616,
"line_max": 189,
"alpha_frac": 0.6685562445,
"autogenerated": false,
"ratio": 3.2331042382588775,
"config_test": f... |
"""Benchmarking module for AlignmentFile functionality"""
import os
import pytest
from TestUtils import BAM_DATADIR, force_str, flatten_nested_list
from AlignmentFileFetchTestUtils import *
def test_build_fetch_from_bam_with_samtoolsshell(benchmark):
result = benchmark(build_fetch_with_samtoolsshell,
... | {
"repo_name": "kyleabeauchamp/pysam",
"path": "tests/AlignmentFileFetch_bench.py",
"copies": "2",
"size": "3469",
"license": "mit",
"hash": 7848359163646103000,
"line_mean": 34.3979591837,
"line_max": 81,
"alpha_frac": 0.6658979533,
"autogenerated": false,
"ratio": 3.2695570216776626,
"config_t... |
"""Benchmarking of different solvers for the case of imperfect correlations.
"""
from __future__ import division, absolute_import
import numpy as np
import seaborn as sb
import pandas as pd
from joblib import Parallel, delayed
from bcn.bias import guess_func
from bcn.data import DataSimulated, estimate_partial_signa... | {
"repo_name": "a378ec99/bcn",
"path": "bcn/examples/benchmarking.py",
"copies": "1",
"size": "5226",
"license": "mit",
"hash": 126733966594655060,
"line_mean": 44.0603448276,
"line_max": 208,
"alpha_frac": 0.6213164945,
"autogenerated": false,
"ratio": 4.010744435917115,
"config_test": false,
... |
"""Benchmarking spawn() performance.
"""
import sys
import os
import random
from time import time
def init():
global N, counter
N = 10000
counter = 0
init()
def incr(sleep, **kwargs):
global counter
counter += 1
sleep(0)
def noop(p):
pass
def test(spawn, sleep, kwargs):
start = ... | {
"repo_name": "ubuntuvim/GoAgent",
"path": "local/gevent-1.0rc2/greentest/bench_spawn.py",
"copies": "2",
"size": "4545",
"license": "mit",
"hash": -7648584799781093000,
"line_mean": 25.4244186047,
"line_max": 103,
"alpha_frac": 0.5914191419,
"autogenerated": false,
"ratio": 3.630191693290735,
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Benchmarking Suite documentation build configuration file, created by
# sphinx-quickstart on Thu Jul 6 16:59:30 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present... | {
"repo_name": "benchmarking-suite/benchsuite-docs",
"path": "src/conf.py",
"copies": "1",
"size": "6724",
"license": "apache-2.0",
"hash": 3006868952170268000,
"line_mean": 30.8672985782,
"line_max": 115,
"alpha_frac": 0.6860499703,
"autogenerated": false,
"ratio": 3.8291571753986333,
"config_t... |
# Benchmarking tests
import time
import chess
import guerilla.data_handler as dh
from guerilla.players import Guerilla
def minimax_search_bench(max_depth=3, num_rep=1, verbose=True):
"""
Times how long searches of different depths takes.
Input:
max_depth [Int]
Each search depth up to ... | {
"repo_name": "StephAO/guerilla",
"path": "tests/benchmark.py",
"copies": "1",
"size": "5313",
"license": "mit",
"hash": -578201493300484200,
"line_mean": 35.1428571429,
"line_max": 117,
"alpha_frac": 0.5740636175,
"autogenerated": false,
"ratio": 3.3373115577889445,
"config_test": true,
"has... |
"""benchmarking through py.test"""
from __future__ import print_function, division
import py
from py.__.test.item import Item
from py.__.test.terminal.terminal import TerminalSession
from math import ceil as _ceil, floor as _floor, log10
import timeit
from inspect import getsource
from sympy.core.compatibility imp... | {
"repo_name": "AunShiLord/sympy",
"path": "sympy/utilities/benchmarking.py",
"copies": "2",
"size": "6345",
"license": "bsd-3-clause",
"hash": 8888806675296030000,
"line_mean": 27.2,
"line_max": 90,
"alpha_frac": 0.5030732861,
"autogenerated": false,
"ratio": 3.883108935128519,
"config_test": t... |
"""benchmarking through py.test"""
import py
from py.__.test.item import Item
from py.__.test.terminal.terminal import TerminalSession
from math import ceil, floor, log10
from time import time
import timeit
from inspect import getsource
# from IPython.Magic.magic_timeit
#units = ["s", "ms", "\xc2\xb5s", "ns"]
unit... | {
"repo_name": "jbaayen/sympy",
"path": "sympy/utilities/benchmarking.py",
"copies": "5",
"size": "6378",
"license": "bsd-3-clause",
"hash": -5000045723702952000,
"line_mean": 26.3733905579,
"line_max": 90,
"alpha_frac": 0.5012543117,
"autogenerated": false,
"ratio": 3.835237522549609,
"config_t... |
"""Benchmarking tools."""
import datetime
class TimerError(Exception):
"""Base exceptions for ``timer()``."""
class TimerNotStarted(TimerError):
"""Raise when the start time is accessed but the timer was not started."""
class TimerNotStopped(TimerError):
"""Raise when the timer is still running but ... | {
"repo_name": "geowurster/mr-python",
"path": "tinymr/bench.py",
"copies": "2",
"size": "3851",
"license": "bsd-3-clause",
"hash": 5842171390912651000,
"line_mean": 22.6257668712,
"line_max": 79,
"alpha_frac": 0.5390807582,
"autogenerated": false,
"ratio": 4.431530494821634,
"config_test": fals... |
"""Benchmarking utilities."""
import functools
import logging
from statistics import mean
from time import time
DELIM_LENGTH = 15
logging.basicConfig(filename='benchmark.log', level=logging.INFO)
def timeit(_func=None, *, fname=None, n=1, delim=False):
"""Time function duration."""
def decorator_timeit(fu... | {
"repo_name": "WMD-group/SMACT",
"path": "smact/benchmarking/utilities.py",
"copies": "1",
"size": "1060",
"license": "mit",
"hash": 4935904814444402000,
"line_mean": 23.6511627907,
"line_max": 89,
"alpha_frac": 0.5716981132,
"autogenerated": false,
"ratio": 4.0458015267175576,
"config_test": f... |
""" Benchmark linalg.sqrtm for various blocksizes.
"""
from __future__ import division, print_function, absolute_import
import time
import numpy as np
from numpy.testing import assert_allclose
import scipy.linalg
def bench_sqrtm():
np.random.seed(1234)
print()
print(' Matrix Squa... | {
"repo_name": "RobertABT/heightmap",
"path": "build/scipy/scipy/linalg/benchmarks/bench_sqrtm.py",
"copies": "18",
"size": "2108",
"license": "mit",
"hash": 3705560293805776400,
"line_mean": 35.9824561404,
"line_max": 79,
"alpha_frac": 0.5028462998,
"autogenerated": false,
"ratio": 4.061657032755... |
""" Benchmark linalg.sqrtm for various blocksizes.
"""
from __future__ import division, print_function, absolute_import
import time
import numpy as np
from numpy.testing import assert_allclose, Tester
import scipy.linalg
def bench_sqrtm():
np.random.seed(1234)
print()
print(' Mat... | {
"repo_name": "witcxc/scipy",
"path": "scipy/linalg/benchmarks/bench_sqrtm.py",
"copies": "3",
"size": "2166",
"license": "bsd-3-clause",
"hash": -1225999886909850600,
"line_mean": 34.5081967213,
"line_max": 79,
"alpha_frac": 0.5018467221,
"autogenerated": false,
"ratio": 4.026022304832714,
"co... |
""" Benchmark module: can also compare multiple functions
"""
import gc
from inspect import (
signature,
getsourcelines
)
from operator import itemgetter
from time import perf_counter
from SpeedIT.ProjectErr import Err
from SpeedIT.Utils import (
format_time,
get_table_rst_formatted_lines
)
def _helper_... | {
"repo_name": "peter1000/SpeedIT",
"path": "SpeedIT/BenchmarkIT.py",
"copies": "1",
"size": "30785",
"license": "bsd-3-clause",
"hash": -4677289485123984000,
"line_mean": 51,
"line_max": 556,
"alpha_frac": 0.578839657,
"autogenerated": false,
"ratio": 3.7044524669073406,
"config_test": false,
... |
"""Benchmark multiple channels vs a single channel for dictionary recovery.
This script plots the results saved by the script 1D_vs_multi_run.py, which
should be run beforehand.
"""
import os
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.colors as mco... | {
"repo_name": "alphacsc/alphacsc",
"path": "benchmarks/1D_vs_multi_plot.py",
"copies": "1",
"size": "4169",
"license": "bsd-3-clause",
"hash": -6437065096968314000,
"line_mean": 38.3301886792,
"line_max": 78,
"alpha_frac": 0.5382585752,
"autogenerated": false,
"ratio": 3.7728506787330316,
"conf... |
"""Benchmark multiple channels vs a single channel for dictionary recovery.
This script requires `pandas` which can be installed with `pip install pandas`.
This script performs the computations and save the results in a pickled file
`figures/rank1_snr.pkl` which can be plotted using `1D_vs_multi_plot.py`.
"""
import ... | {
"repo_name": "alphacsc/alphacsc",
"path": "benchmarks/1D_vs_multi_run.py",
"copies": "1",
"size": "6933",
"license": "bsd-3-clause",
"hash": 5829621867133650000,
"line_mean": 34.3724489796,
"line_max": 79,
"alpha_frac": 0.5786816674,
"autogenerated": false,
"ratio": 3.4682341170585294,
"config... |
"""BenchmarkPipeline class and tfRecord utility functions."""
import argparse
import logging
from typing import Optional, Tuple
import cv2
from modules import analysis_util
from modules import defaults
from modules import icon_finder
from modules import util
from modules.correctness_metrics import CorrectnessMetrics
... | {
"repo_name": "googleinterns/acuiti",
"path": "modules/benchmark_pipeline.py",
"copies": "1",
"size": "15739",
"license": "apache-2.0",
"hash": -1021742002494151200,
"line_mean": 42.8412256267,
"line_max": 91,
"alpha_frac": 0.6370798653,
"autogenerated": false,
"ratio": 4.092303692147686,
"conf... |
"""Benchmark problems for nonlinear least squares."""
from __future__ import division
import inspect
import sys
from collections import OrderedDict
import numpy as np
from numpy.polynomial.chebyshev import Chebyshev
from scipy.integrate import odeint
class LSQBenchmarkProblem(object):
"""Template class for non... | {
"repo_name": "DailyActie/Surrogate-Model",
"path": "01-codes/scipy-master/benchmarks/benchmarks/lsq_problems.py",
"copies": "1",
"size": "17573",
"license": "mit",
"hash": -1891383472841312500,
"line_mean": 34.7902240326,
"line_max": 80,
"alpha_frac": 0.4887611677,
"autogenerated": false,
"ratio... |
"""Benchmark problems for nonlinear least squares."""
import inspect
import sys
import numpy as np
from numpy.polynomial.chebyshev import Chebyshev
from scipy.integrate import odeint
class LSQBenchmarkProblem:
"""Template class for nonlinear least squares benchmark problems.
The optimized variable is n-dime... | {
"repo_name": "WarrenWeckesser/scipy",
"path": "benchmarks/benchmarks/lsq_problems.py",
"copies": "12",
"size": "17304",
"license": "bsd-3-clause",
"hash": -2472350069894132700,
"line_mean": 34.5318275154,
"line_max": 80,
"alpha_frac": 0.4832408692,
"autogenerated": false,
"ratio": 2.595080983803... |
'''benchmark pysam BAM/SAM access with the samtools commandline tools.
samtools functions are called via the pysam interface to avoid the over-head
of starting additional processes.
'''
import pysam
import timeit
iterations = 10
def runBenchmark( test,
pysam_way,
samtools_way =... | {
"repo_name": "pkaleta/pysam",
"path": "tests/pysam_bench.py",
"copies": "9",
"size": "1328",
"license": "mit",
"hash": 1455874031279334400,
"line_mean": 20.0793650794,
"line_max": 100,
"alpha_frac": 0.6310240964,
"autogenerated": false,
"ratio": 2.749482401656315,
"config_test": false,
"has_... |
# benchmark.py Simple benchmark for umqtt.simple
# Assumes simple.py (from micropython-lib) is copied to ESP8266
# Outcome with mosquitto running on a Raspberry Pi on wired network,
# Wemos D1 Mini running on WiFi: echo received in max 154 ms min 27 ms
import ubinascii
from simple import MQTTClient
from machine import... | {
"repo_name": "peterhinch/micropython-samples",
"path": "ESP8266/benchmark.py",
"copies": "1",
"size": "1796",
"license": "mit",
"hash": -7214463072645463000,
"line_mean": 25.8059701493,
"line_max": 85,
"alpha_frac": 0.5684855234,
"autogenerated": false,
"ratio": 3.3822975517890774,
"config_tes... |
# benchmark reads and writes, with and without compression.
# tests all four supported file formats.
from numpy.random.mtrand import uniform
import netCDF4
from timeit import Timer
import os, sys
# create an n1dim by n2dim by n3dim random array.
n1dim = 30
n2dim = 15
n3dim = 73
n4dim = 144
ntrials = 10
sys.stdout.writ... | {
"repo_name": "Unidata/netcdf4-python",
"path": "examples/bench_diskless.py",
"copies": "1",
"size": "2750",
"license": "mit",
"hash": -4938954008820328000,
"line_mean": 40.0447761194,
"line_max": 111,
"alpha_frac": 0.6916363636,
"autogenerated": false,
"ratio": 2.9380341880341883,
"config_test... |
# Benchmark result processing;
import sys
import argparse
import inspect
import json
import time
import cProfile
import gc
import coverage
from collections import OrderedDict
from elasticmagic import (
Document, Field,
SearchQuery,
MatchAll,
)
from elasticmagic.result import SearchResult
from elasticm... | {
"repo_name": "anti-social/elasticmagic",
"path": "benchmark/run.py",
"copies": "2",
"size": "6939",
"license": "apache-2.0",
"hash": -2415052925797995500,
"line_mean": 26.10546875,
"line_max": 77,
"alpha_frac": 0.5018014123,
"autogenerated": false,
"ratio": 3.7650569723277267,
"config_test": f... |
"""benchmarks/big_table.py
Benchmarks blox to see how quickly it can build a large 10x1000 HTML table
Copyright (C) 2015 Timothy Edmund Crosley
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 wit... | {
"repo_name": "timothycrosley/blox",
"path": "benchmarks/big_table.py",
"copies": "1",
"size": "3642",
"license": "mit",
"hash": -3966708976802569000,
"line_mean": 29.35,
"line_max": 112,
"alpha_frac": 0.6466227348,
"autogenerated": false,
"ratio": 4.138636363636364,
"config_test": false,
"ha... |
"""Benchmark script for ImageNet models on ARM CPU.
see README.md for the usage and results of this script.
"""
import argparse
import numpy as np
import tvm
from tvm.contrib.util import tempdir
import tvm.contrib.graph_runtime as runtime
import nnvm.compiler
import nnvm.testing
from util import get_network, print_p... | {
"repo_name": "mlperf/training_results_v0.6",
"path": "Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/apps/benchmark/arm_cpu_imagenet_bench.py",
"copies": "1",
"size": "3583",
"license": "apache-2.0",
"hash": 4979517006558398000,
"line_mean": 38.3736263736,
"line_max": 102,
"alpha_frac"... |
"""Benchmark script for ImageNet models on GPU.
see README.md for the usage and results of this script.
"""
import argparse
import numpy as np
import tvm
from tvm.contrib.util import tempdir
import tvm.contrib.graph_runtime as runtime
import nnvm.compiler
import nnvm.testing
from util import get_network
if __name_... | {
"repo_name": "mlperf/training_results_v0.6",
"path": "Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/apps/benchmark/gpu_imagenet_bench.py",
"copies": "1",
"size": "2685",
"license": "apache-2.0",
"hash": -9104013513577022000,
"line_mean": 41.619047619,
"line_max": 106,
"alpha_frac": 0.... |
"""Benchmark script for ImageNet models on mobile GPU.
see README.md for the usage and results of this script.
"""
import argparse
import numpy as np
import tvm
from tvm.contrib.util import tempdir
import tvm.contrib.graph_runtime as runtime
import nnvm.compiler
import nnvm.testing
from util import get_network, prin... | {
"repo_name": "mlperf/training_results_v0.6",
"path": "Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/apps/benchmark/mobile_gpu_imagenet_bench.py",
"copies": "1",
"size": "3617",
"license": "apache-2.0",
"hash": 2528582930998582000,
"line_mean": 39.1888888889,
"line_max": 102,
"alpha_fr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.