hexsha
stringlengths
40
40
size
int64
1
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
239
max_stars_repo_name
stringlengths
5
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
sequencelengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
239
max_issues_repo_name
stringlengths
5
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
sequencelengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
239
max_forks_repo_name
stringlengths
5
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
sequencelengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.03M
avg_line_length
float64
1
958k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
7940bb16af575a6587ba7d772122e0356212e8b6
2,989
py
Python
lab2/text_recognizer/networks/line_cnn_sliding_window.py
raminzahedi/fsdl-text-recognizer-project
b683173e5e19fbbdb3c6ab42990406e2a0c73e81
[ "MIT" ]
null
null
null
lab2/text_recognizer/networks/line_cnn_sliding_window.py
raminzahedi/fsdl-text-recognizer-project
b683173e5e19fbbdb3c6ab42990406e2a0c73e81
[ "MIT" ]
null
null
null
lab2/text_recognizer/networks/line_cnn_sliding_window.py
raminzahedi/fsdl-text-recognizer-project
b683173e5e19fbbdb3c6ab42990406e2a0c73e81
[ "MIT" ]
null
null
null
import pathlib from typing import Tuple from boltons.cacheutils import cachedproperty import numpy as np import tensorflow as tf from tensorflow.keras.layers import Activation, Conv2D, Dense, Dropout, Flatten, Input, MaxPooling2D, Permute, Reshape, TimeDistributed, Lambda, ZeroPadding2D from tensorflow.keras.models import Sequential from tensorflow.keras.models import Model as KerasModel from text_recognizer.models.line_model import LineModel from text_recognizer.networks.lenet import lenet from text_recognizer.networks.misc import slide_window def line_cnn_sliding_window( input_shape: Tuple[int, ...], output_shape: Tuple[int, ...], window_width: float=16, window_stride: float=10) -> KerasModel: """ Input is an image with shape (image_height, image_width) Output is of shape (output_length, num_classes) """ image_height, image_width = input_shape output_length, num_classes = output_shape image_input = Input(shape=input_shape) # (image_height, image_width) image_reshaped = Reshape((image_height, image_width, 1))(image_input) # (image_height, image_width, 1) image_patches = Lambda( slide_window, arguments={'window_width': window_width, 'window_stride': window_stride} )(image_reshaped) # (num_windows, image_height, window_width, 1) # Make a LeNet and get rid of the last two layers (softmax and dropout) convnet = lenet((image_height, window_width, 1), (num_classes,)) convnet = KerasModel(inputs=convnet.inputs, outputs=convnet.layers[-2].output) convnet_outputs = TimeDistributed(convnet)(image_patches) # (num_windows, 128) # Now we have to get to (output_length, num_classes) shape. One way to do it is to do another sliding window with # width = floor(num_windows / output_length) # Note that this will likely produce too many items in the output sequence, so take only output_length, # and watch out that width is at least 2 (else we will only be able to predict on the first half of the line) ##### Your code below (Lab 2) convnet_outputs_extra_dim = Lambda(lambda x: tf.expand_dims(x, -1))(convnet_outputs) # (num_windows, 128, 1) num_windows = int((image_width - window_width) / window_stride) + 1 width = int(num_windows / output_length) conved_convnet_outputs = Conv2D(num_classes, (width, 128), (width, 1), activation='softmax')(convnet_outputs_extra_dim) # (image_width / width, 1, num_classes) squeezed_conved_convnet_outputs = Lambda(lambda x: tf.squeeze(x, 2))(conved_convnet_outputs) # (max_length, num_classes) # Since we floor'd the calculation of width, we might have too many items in the sequence. Take only output_length. softmax_output = Lambda(lambda x: x[:, :output_length, :])(squeezed_conved_convnet_outputs) ##### Your code above (Lab 2) model = KerasModel(inputs=image_input, outputs=softmax_output) model.summary() return model
40.391892
158
0.733021
7940bb9d022b8becf1b3bc325752a96df4b493c3
904
py
Python
pm/view/landingpage.py
fvclaus/photomap
4147658193f75b0decd8586ca4ff27619bfc70e1
[ "BSD-3-Clause" ]
null
null
null
pm/view/landingpage.py
fvclaus/photomap
4147658193f75b0decd8586ca4ff27619bfc70e1
[ "BSD-3-Clause" ]
10
2019-12-11T17:21:51.000Z
2022-03-02T06:09:41.000Z
pm/view/landingpage.py
fvclaus/photomap
4147658193f75b0decd8586ca4ff27619bfc70e1
[ "BSD-3-Clause" ]
null
null
null
import datetime from django.http import HttpResponseBadRequest from django.shortcuts import render from django.views.decorators.csrf import csrf_protect, ensure_csrf_cookie from pm.form.registration import RegistrationForm @ensure_csrf_cookie @csrf_protect def view(request): if request.method == "GET": today = datetime.date.today().strftime("%w") next = request.GET.get("next") registration_form = RegistrationForm() return render(request, "index.html", {"day": today, "next": next, "registration_form": registration_form}) else: return HttpResponseBadRequest() def view_album_login(request): """ Renders the album login for guests. """ if request.method == "GET": today = datetime.date.today() return render(request, "album-share-login.html", {"day": today.strftime("%w")}) else: return HttpResponseBadRequest()
32.285714
114
0.702434
7940bca8c2206024000ad8ebb5ff2b3cdec2a2d2
353
py
Python
app/lcars.py
elijaheac/rpi_lcars
47dcd84eb7f631cde8572ffc280247cc89c5a42d
[ "MIT" ]
2
2017-11-24T21:54:56.000Z
2020-06-30T01:08:10.000Z
app/lcars.py
hepteract/rpi_lcars
47dcd84eb7f631cde8572ffc280247cc89c5a42d
[ "MIT" ]
null
null
null
app/lcars.py
hepteract/rpi_lcars
47dcd84eb7f631cde8572ffc280247cc89c5a42d
[ "MIT" ]
null
null
null
from screens.authorize import ScreenAuthorize from ui.ui import UserInterface # global config UI_PLACEMENT_MODE = True RESOLUTION = (800, 480) FPS = 60 DEV_MODE = False if __name__ == "__main__": firstScreen = ScreenAuthorize() ui = UserInterface(firstScreen, RESOLUTION, UI_PLACEMENT_MODE, FPS, DEV_MODE) while (True): ui.tick()
22.0625
81
0.730878
7940bcfd934907f8719c126d82f34970c1a7c515
4,716
py
Python
assets/src/ba_data/python/ba/_enums.py
Dliwk/ballistica
eaff316b3c6203b2465c768c88c473c1478b492a
[ "MIT" ]
6
2021-04-16T14:25:25.000Z
2021-11-18T17:20:19.000Z
assets/src/ba_data/python/ba/_enums.py
Dliwk/ballistica
eaff316b3c6203b2465c768c88c473c1478b492a
[ "MIT" ]
1
2021-08-30T10:09:06.000Z
2021-09-21T10:44:15.000Z
assets/src/ba_data/python/ba/_enums.py
Dliwk/ballistica
eaff316b3c6203b2465c768c88c473c1478b492a
[ "MIT" ]
2
2021-04-20T15:39:27.000Z
2021-07-18T08:45:56.000Z
# Released under the MIT License. See LICENSE for details. """Enums generated by tools/update_python_enums_module in ba-internal.""" from enum import Enum class InputType(Enum): """Types of input a controller can send to the game. Category: Enums """ UP_DOWN = 2 LEFT_RIGHT = 3 JUMP_PRESS = 4 JUMP_RELEASE = 5 PUNCH_PRESS = 6 PUNCH_RELEASE = 7 BOMB_PRESS = 8 BOMB_RELEASE = 9 PICK_UP_PRESS = 10 PICK_UP_RELEASE = 11 RUN = 12 FLY_PRESS = 13 FLY_RELEASE = 14 START_PRESS = 15 START_RELEASE = 16 HOLD_POSITION_PRESS = 17 HOLD_POSITION_RELEASE = 18 LEFT_PRESS = 19 LEFT_RELEASE = 20 RIGHT_PRESS = 21 RIGHT_RELEASE = 22 UP_PRESS = 23 UP_RELEASE = 24 DOWN_PRESS = 25 DOWN_RELEASE = 26 class UIScale(Enum): """The overall scale the UI is being rendered for. Note that this is independent of pixel resolution. For example, a phone and a desktop PC might render the game at similar pixel resolutions but the size they display content at will vary significantly. Category: Enums 'large' is used for devices such as desktop PCs where fine details can be clearly seen. UI elements are generally smaller on the screen and more content can be seen at once. 'medium' is used for devices such as tablets, TVs, or VR headsets. This mode strikes a balance between clean readability and amount of content visible. 'small' is used primarily for phones or other small devices where content needs to be presented as large and clear in order to remain readable from an average distance. """ LARGE = 0 MEDIUM = 1 SMALL = 2 class TimeType(Enum): """Specifies the type of time for various operations to target/use. Category: Enums 'sim' time is the local simulation time for an activity or session. It can proceed at different rates depending on game speed, stops for pauses, etc. 'base' is the baseline time for an activity or session. It proceeds consistently regardless of game speed or pausing, but may stop during occurrences such as network outages. 'real' time is mostly based on clock time, with a few exceptions. It may not advance while the app is backgrounded for instance. (the engine attempts to prevent single large time jumps from occurring) """ SIM = 0 BASE = 1 REAL = 2 class TimeFormat(Enum): """Specifies the format time values are provided in. Category: Enums """ SECONDS = 0 MILLISECONDS = 1 class Permission(Enum): """Permissions that can be requested from the OS. Category: Enums """ STORAGE = 0 class SpecialChar(Enum): """Special characters the game can print. Category: Enums """ DOWN_ARROW = 0 UP_ARROW = 1 LEFT_ARROW = 2 RIGHT_ARROW = 3 TOP_BUTTON = 4 LEFT_BUTTON = 5 RIGHT_BUTTON = 6 BOTTOM_BUTTON = 7 DELETE = 8 SHIFT = 9 BACK = 10 LOGO_FLAT = 11 REWIND_BUTTON = 12 PLAY_PAUSE_BUTTON = 13 FAST_FORWARD_BUTTON = 14 DPAD_CENTER_BUTTON = 15 OUYA_BUTTON_O = 16 OUYA_BUTTON_U = 17 OUYA_BUTTON_Y = 18 OUYA_BUTTON_A = 19 OUYA_LOGO = 20 LOGO = 21 TICKET = 22 GOOGLE_PLAY_GAMES_LOGO = 23 GAME_CENTER_LOGO = 24 DICE_BUTTON1 = 25 DICE_BUTTON2 = 26 DICE_BUTTON3 = 27 DICE_BUTTON4 = 28 GAME_CIRCLE_LOGO = 29 PARTY_ICON = 30 TEST_ACCOUNT = 31 TICKET_BACKING = 32 TROPHY1 = 33 TROPHY2 = 34 TROPHY3 = 35 TROPHY0A = 36 TROPHY0B = 37 TROPHY4 = 38 LOCAL_ACCOUNT = 39 ALIBABA_LOGO = 40 FLAG_UNITED_STATES = 41 FLAG_MEXICO = 42 FLAG_GERMANY = 43 FLAG_BRAZIL = 44 FLAG_RUSSIA = 45 FLAG_CHINA = 46 FLAG_UNITED_KINGDOM = 47 FLAG_CANADA = 48 FLAG_INDIA = 49 FLAG_JAPAN = 50 FLAG_FRANCE = 51 FLAG_INDONESIA = 52 FLAG_ITALY = 53 FLAG_SOUTH_KOREA = 54 FLAG_NETHERLANDS = 55 FEDORA = 56 HAL = 57 CROWN = 58 YIN_YANG = 59 EYE_BALL = 60 SKULL = 61 HEART = 62 DRAGON = 63 HELMET = 64 MUSHROOM = 65 NINJA_STAR = 66 VIKING_HELMET = 67 MOON = 68 SPIDER = 69 FIREBALL = 70 FLAG_UNITED_ARAB_EMIRATES = 71 FLAG_QATAR = 72 FLAG_EGYPT = 73 FLAG_KUWAIT = 74 FLAG_ALGERIA = 75 FLAG_SAUDI_ARABIA = 76 FLAG_MALAYSIA = 77 FLAG_CZECH_REPUBLIC = 78 FLAG_AUSTRALIA = 79 FLAG_SINGAPORE = 80 OCULUS_LOGO = 81 STEAM_LOGO = 82 NVIDIA_LOGO = 83 FLAG_IRAN = 84 FLAG_POLAND = 85 FLAG_ARGENTINA = 86 FLAG_PHILIPPINES = 87 FLAG_CHILE = 88 MIKIROG = 89
23.698492
77
0.653308
7940bd0212e34e3649a65560faf2d75fabbefec2
429
py
Python
tests/utils/test_aggregate.py
trumanw/ScaffoldGraph
a594e5c5effe6c5e45c0061a235ccbeb64e416f9
[ "MIT" ]
null
null
null
tests/utils/test_aggregate.py
trumanw/ScaffoldGraph
a594e5c5effe6c5e45c0061a235ccbeb64e416f9
[ "MIT" ]
null
null
null
tests/utils/test_aggregate.py
trumanw/ScaffoldGraph
a594e5c5effe6c5e45c0061a235ccbeb64e416f9
[ "MIT" ]
1
2021-03-12T15:55:02.000Z
2021-03-12T15:55:02.000Z
""" scaffoldgraph tests.utils.test_aggregate """ import scaffoldgraph as sg from scaffoldgraph.utils import aggregate from .. import mock_sdf, mock_sdf_2 def test_aggregate(sdf_file, sdf_file_2): net_1 = sg.ScaffoldNetwork.from_sdf(sdf_file) net_2 = sg.ScaffoldNetwork.from_sdf(sdf_file_2) network = aggregate([net_1, net_2]) assert network.num_scaffold_nodes == 14 assert network.num_molecule_nodes == 4
25.235294
51
0.7669
7940bdbebd9e1470feb3d25ef1bbd7a5b7059e75
4,344
py
Python
ingestion/src/metadata/ingestion/source/snowflake_usage.py
rongfengliang/OpenMetadata
f91bcc03f63cd193d40a21ce25a398cddb389fa4
[ "Apache-2.0" ]
null
null
null
ingestion/src/metadata/ingestion/source/snowflake_usage.py
rongfengliang/OpenMetadata
f91bcc03f63cd193d40a21ce25a398cddb389fa4
[ "Apache-2.0" ]
null
null
null
ingestion/src/metadata/ingestion/source/snowflake_usage.py
rongfengliang/OpenMetadata
f91bcc03f63cd193d40a21ce25a398cddb389fa4
[ "Apache-2.0" ]
null
null
null
# 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 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 License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from typing import Any, Dict, Iterable, Iterator, Union from metadata.ingestion.api.source import Source, SourceStatus # This import verifies that the dependencies are available. from metadata.ingestion.models.table_queries import TableQuery from metadata.ingestion.ometa.openmetadata_rest import MetadataServerConfig from metadata.ingestion.source.snowflake import SnowflakeConfig from metadata.ingestion.source.sql_alchemy_helper import ( SQLAlchemyHelper, SQLSourceStatus, ) from metadata.utils.helpers import get_start_and_end class SnowflakeUsageSource(Source): # SELECT statement from mysql information_schema to extract table and column metadata SQL_STATEMENT = """ select query_type,query_text,user_name,database_name, schema_name,start_time,end_time from table(information_schema.query_history( end_time_range_start=>to_timestamp_ltz('{start_date}'), end_time_range_end=>to_timestamp_ltz('{end_date}'))); """ # CONFIG KEYS WHERE_CLAUSE_SUFFIX_KEY = "where_clause" CLUSTER_SOURCE = "cluster_source" CLUSTER_KEY = "cluster_key" USE_CATALOG_AS_CLUSTER_NAME = "use_catalog_as_cluster_name" DATABASE_KEY = "database_key" SERVICE_TYPE = "Snowflake" DEFAULT_CLUSTER_SOURCE = "CURRENT_DATABASE()" def __init__(self, config, metadata_config, ctx): super().__init__(ctx) start, end = get_start_and_end(config.duration) self.analysis_date = start print(start) print(end) self.sql_stmt = SnowflakeUsageSource.SQL_STATEMENT.format( start_date=start, end_date=end ) self.alchemy_helper = SQLAlchemyHelper( config, metadata_config, ctx, "Snowflake", self.sql_stmt ) self._extract_iter: Union[None, Iterator] = None self._database = "Snowflake" self.report = SQLSourceStatus() @classmethod def create(cls, config_dict, metadata_config_dict, ctx): config = SnowflakeConfig.parse_obj(config_dict) metadata_config = MetadataServerConfig.parse_obj(metadata_config_dict) return cls(config, metadata_config, ctx) def prepare(self): pass def _get_raw_extract_iter(self) -> Iterable[Dict[str, Any]]: """ Provides iterator of result row from SQLAlchemy helper :return: """ rows = self.alchemy_helper.execute_query() for row in rows: yield row def next_record(self) -> Iterable[TableQuery]: """ Using itertools.groupby and raw level iterator, it groups to table and yields TableMetadata :return: """ for row in self._get_raw_extract_iter(): tq = TableQuery( query=row["query_type"], user_name=row["user_name"], starttime=str(row["start_time"]), endtime=str(row["end_time"]), analysis_date=self.analysis_date, aborted=True if "1969" in str(row["end_time"]) else False, database=row["database_name"], sql=row["query_text"], ) if row["schema_name"] is not None: self.report.scanned(f"{row['database_name']}.{row['schema_name']}") else: self.report.scanned(f"{row['database_name']}") yield tq def get_report(self): return self.report def close(self): self.alchemy_helper.close() def get_status(self) -> SourceStatus: return self.report
38.105263
99
0.679788
7940be595c376bce28bf8957e1d2b3d9c62bb993
941
py
Python
merge_states.py
abr-98/COVID-19_regression_analysis
f902f4771f665ee27c33a9cb7e3e4c83be54493d
[ "MIT" ]
null
null
null
merge_states.py
abr-98/COVID-19_regression_analysis
f902f4771f665ee27c33a9cb7e3e4c83be54493d
[ "MIT" ]
null
null
null
merge_states.py
abr-98/COVID-19_regression_analysis
f902f4771f665ee27c33a9cb7e3e4c83be54493d
[ "MIT" ]
1
2020-06-07T08:50:29.000Z
2020-06-07T08:50:29.000Z
import pandas as pd import numpy as np import os import json def merge(): df=pd.read_csv('covid_19_india.csv', index_col=0) s_names=df['State/UnionTerritory'].unique() df_2=pd.read_csv('total_country_mod.csv') df3=df_2 df3.to_csv('total_state_data.csv',index=False) with open('date_rec_mod.json', 'r') as ip: data = json.load(ip) for name in s_names: print(name) df3=pd.read_csv('total_state_data.csv') i=0 confirmed=[] death=[] rec=[] while i<len(df3): date=df3.iloc[i]['Date'] print(date) if data[date].get(name) is None: confirmed.append(0) death.append(0) rec.append(0) else: confirmed.append(data[date][name]['confirmed']) death.append(data[date][name]['death']) rec.append(data[date][name]['recovered']) i+=1 df3[name+'_con']=confirmed df3[name+'_death']=death df3[name+'_rec']=rec df3.to_csv('total_state_data.csv',index=False) merge()
16.224138
51
0.659936
7940bef0e0c1dfcd9e484ef4afa583ad339018c9
112
py
Python
python_in_out_context_manager/__init__.py
samesense/python_in_out_context_manager
b8263ac7f974f76cc2e91b67a9cf37b1960b98f5
[ "MIT" ]
null
null
null
python_in_out_context_manager/__init__.py
samesense/python_in_out_context_manager
b8263ac7f974f76cc2e91b67a9cf37b1960b98f5
[ "MIT" ]
null
null
null
python_in_out_context_manager/__init__.py
samesense/python_in_out_context_manager
b8263ac7f974f76cc2e91b67a9cf37b1960b98f5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = """Perry Evans""" __email__ = '[email protected]' __version__ = '0.1.0'
18.666667
33
0.625
7940c06bb984814d728645fb9d6c6a7fb9bc4744
12,923
py
Python
Tools/Tools/Scripts/webkitpy/tool/multicommandtool.py
VincentWei/mdolphin-core
48ffdcf587a48a7bb4345ae469a45c5b64ffad0e
[ "Apache-2.0" ]
6
2017-05-31T01:46:45.000Z
2018-06-12T10:53:30.000Z
Tools/Tools/Scripts/webkitpy/tool/multicommandtool.py
FMSoftCN/mdolphin-core
48ffdcf587a48a7bb4345ae469a45c5b64ffad0e
[ "Apache-2.0" ]
null
null
null
Tools/Tools/Scripts/webkitpy/tool/multicommandtool.py
FMSoftCN/mdolphin-core
48ffdcf587a48a7bb4345ae469a45c5b64ffad0e
[ "Apache-2.0" ]
2
2017-07-17T06:02:42.000Z
2018-09-19T10:08:38.000Z
# Copyright (c) 2009 Google Inc. All rights reserved. # Copyright (c) 2009 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # * Neither the name of Google Inc. nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # MultiCommandTool provides a framework for writing svn-like/git-like tools # which are called with the following format: # tool-name [global options] command-name [command options] import sys from optparse import OptionParser, IndentedHelpFormatter, SUPPRESS_USAGE, make_option from webkitpy.tool.grammar import pluralize from webkitpy.common.system.deprecated_logging import log class Command(object): name = None show_in_main_help = False def __init__(self, help_text, argument_names=None, options=None, long_help=None, requires_local_commits=False): self.help_text = help_text self.long_help = long_help self.argument_names = argument_names self.required_arguments = self._parse_required_arguments(argument_names) self.options = options self.requires_local_commits = requires_local_commits self.tool = None # option_parser can be overriden by the tool using set_option_parser # This default parser will be used for standalone_help printing. self.option_parser = HelpPrintingOptionParser(usage=SUPPRESS_USAGE, add_help_option=False, option_list=self.options) # This design is slightly awkward, but we need the # the tool to be able to create and modify the option_parser # before it knows what Command to run. def set_option_parser(self, option_parser): self.option_parser = option_parser self._add_options_to_parser() def _add_options_to_parser(self): options = self.options or [] for option in options: self.option_parser.add_option(option) # The tool calls bind_to_tool on each Command after adding it to its list. def bind_to_tool(self, tool): # Command instances can only be bound to one tool at a time. if self.tool and tool != self.tool: raise Exception("Command already bound to tool!") self.tool = tool @staticmethod def _parse_required_arguments(argument_names): required_args = [] if not argument_names: return required_args split_args = argument_names.split(" ") for argument in split_args: if argument[0] == '[': # For now our parser is rather dumb. Do some minimal validation that # we haven't confused it. if argument[-1] != ']': raise Exception("Failure to parse argument string %s. Argument %s is missing ending ]" % (argument_names, argument)) else: required_args.append(argument) return required_args def name_with_arguments(self): usage_string = self.name if self.options: usage_string += " [options]" if self.argument_names: usage_string += " " + self.argument_names return usage_string def parse_args(self, args): return self.option_parser.parse_args(args) def check_arguments_and_execute(self, options, args, tool=None): if len(args) < len(self.required_arguments): log("%s required, %s provided. Provided: %s Required: %s\nSee '%s help %s' for usage." % ( pluralize("argument", len(self.required_arguments)), pluralize("argument", len(args)), "'%s'" % " ".join(args), " ".join(self.required_arguments), tool.name(), self.name)) return 1 return self.execute(options, args, tool) or 0 def standalone_help(self): help_text = self.name_with_arguments().ljust(len(self.name_with_arguments()) + 3) + self.help_text + "\n\n" if self.long_help: help_text += "%s\n\n" % self.long_help help_text += self.option_parser.format_option_help(IndentedHelpFormatter()) return help_text def execute(self, options, args, tool): raise NotImplementedError, "subclasses must implement" # main() exists so that Commands can be turned into stand-alone scripts. # Other parts of the code will likely require modification to work stand-alone. def main(self, args=sys.argv): (options, args) = self.parse_args(args) # Some commands might require a dummy tool return self.check_arguments_and_execute(options, args) # FIXME: This should just be rolled into Command. help_text and argument_names do not need to be instance variables. class AbstractDeclarativeCommand(Command): help_text = None argument_names = None long_help = None def __init__(self, options=None, **kwargs): Command.__init__(self, self.help_text, self.argument_names, options=options, long_help=self.long_help, **kwargs) class HelpPrintingOptionParser(OptionParser): def __init__(self, epilog_method=None, *args, **kwargs): self.epilog_method = epilog_method OptionParser.__init__(self, *args, **kwargs) def error(self, msg): self.print_usage(sys.stderr) error_message = "%s: error: %s\n" % (self.get_prog_name(), msg) # This method is overriden to add this one line to the output: error_message += "\nType \"%s --help\" to see usage.\n" % self.get_prog_name() self.exit(1, error_message) # We override format_epilog to avoid the default formatting which would paragraph-wrap the epilog # and also to allow us to compute the epilog lazily instead of in the constructor (allowing it to be context sensitive). def format_epilog(self, epilog): if self.epilog_method: return "\n%s\n" % self.epilog_method() return "" class HelpCommand(AbstractDeclarativeCommand): name = "help" help_text = "Display information about this program or its subcommands" argument_names = "[COMMAND]" def __init__(self): options = [ make_option("-a", "--all-commands", action="store_true", dest="show_all_commands", help="Print all available commands"), ] AbstractDeclarativeCommand.__init__(self, options) self.show_all_commands = False # A hack used to pass --all-commands to _help_epilog even though it's called by the OptionParser. def _help_epilog(self): # Only show commands which are relevant to this checkout's SCM system. Might this be confusing to some users? if self.show_all_commands: epilog = "All %prog commands:\n" relevant_commands = self.tool.commands[:] else: epilog = "Common %prog commands:\n" relevant_commands = filter(self.tool.should_show_in_main_help, self.tool.commands) longest_name_length = max(map(lambda command: len(command.name), relevant_commands)) relevant_commands.sort(lambda a, b: cmp(a.name, b.name)) command_help_texts = map(lambda command: " %s %s\n" % (command.name.ljust(longest_name_length), command.help_text), relevant_commands) epilog += "%s\n" % "".join(command_help_texts) epilog += "See '%prog help --all-commands' to list all commands.\n" epilog += "See '%prog help COMMAND' for more information on a specific command.\n" return epilog.replace("%prog", self.tool.name()) # Use of %prog here mimics OptionParser.expand_prog_name(). # FIXME: This is a hack so that we don't show --all-commands as a global option: def _remove_help_options(self): for option in self.options: self.option_parser.remove_option(option.get_opt_string()) def execute(self, options, args, tool): if args: command = self.tool.command_by_name(args[0]) if command: print command.standalone_help() return 0 self.show_all_commands = options.show_all_commands self._remove_help_options() self.option_parser.print_help() return 0 class MultiCommandTool(object): global_options = None def __init__(self, name=None, commands=None): self._name = name or OptionParser(prog=name).get_prog_name() # OptionParser has nice logic for fetching the name. # Allow the unit tests to disable command auto-discovery. self.commands = commands or [cls() for cls in self._find_all_commands() if cls.name] self.help_command = self.command_by_name(HelpCommand.name) # Require a help command, even if the manual test list doesn't include one. if not self.help_command: self.help_command = HelpCommand() self.commands.append(self.help_command) for command in self.commands: command.bind_to_tool(self) @classmethod def _add_all_subclasses(cls, class_to_crawl, seen_classes): for subclass in class_to_crawl.__subclasses__(): if subclass not in seen_classes: seen_classes.add(subclass) cls._add_all_subclasses(subclass, seen_classes) @classmethod def _find_all_commands(cls): commands = set() cls._add_all_subclasses(Command, commands) return sorted(commands) def name(self): return self._name def _create_option_parser(self): usage = "Usage: %prog [options] COMMAND [ARGS]" return HelpPrintingOptionParser(epilog_method=self.help_command._help_epilog, prog=self.name(), usage=usage) @staticmethod def _split_command_name_from_args(args): # Assume the first argument which doesn't start with "-" is the command name. command_index = 0 for arg in args: if arg[0] != "-": break command_index += 1 else: return (None, args[:]) command = args[command_index] return (command, args[:command_index] + args[command_index + 1:]) def command_by_name(self, command_name): for command in self.commands: if command_name == command.name: return command return None def path(self): raise NotImplementedError, "subclasses must implement" def command_completed(self): pass def should_show_in_main_help(self, command): return command.show_in_main_help def should_execute_command(self, command): return True def _add_global_options(self, option_parser): global_options = self.global_options or [] for option in global_options: option_parser.add_option(option) def handle_global_options(self, options): pass def main(self, argv=sys.argv): (command_name, args) = self._split_command_name_from_args(argv[1:]) option_parser = self._create_option_parser() self._add_global_options(option_parser) command = self.command_by_name(command_name) or self.help_command if not command: option_parser.error("%s is not a recognized command" % command_name) command.set_option_parser(option_parser) (options, args) = command.parse_args(args) self.handle_global_options(options) (should_execute, failure_reason) = self.should_execute_command(command) if not should_execute: log(failure_reason) return 0 # FIXME: Should this really be 0? result = command.check_arguments_and_execute(options, args, self) self.command_completed() return result
42.370492
146
0.67879
7940c08048a94a74620253246228043355e2f74f
1,972
py
Python
browser_fetcher/logger.py
PrVrSs/browser-fetcher
8540ca138037077dc2ac45df65111e06f8b2c0f4
[ "Apache-2.0" ]
null
null
null
browser_fetcher/logger.py
PrVrSs/browser-fetcher
8540ca138037077dc2ac45df65111e06f8b2c0f4
[ "Apache-2.0" ]
null
null
null
browser_fetcher/logger.py
PrVrSs/browser-fetcher
8540ca138037077dc2ac45df65111e06f8b2c0f4
[ "Apache-2.0" ]
null
null
null
import logging from logging.config import dictConfig as logging_dict_config import click TRACE_LOG_LEVEL = 5 LOG_LEVELS = { 'critical': logging.CRITICAL, 'error': logging.ERROR, 'warning': logging.WARNING, 'info': logging.INFO, 'debug': logging.DEBUG, 'trace': TRACE_LOG_LEVEL, } LOGGING_CONFIG = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'default': { '()': 'browser_fetcher.logger.BrowserFetcherFormatter', 'fmt': '%(asctime)s %(levelname)s %(message)s', 'datefmt': '%H:%M:%S', }, }, 'handlers': { 'default': { 'formatter': 'default', 'class': 'logging.StreamHandler', 'stream': 'ext://sys.stderr', }, }, 'loggers': { 'browser_fetcher': {'handlers': ['default'], 'level': 'ERROR'}, }, } class BrowserFetcherFormatter(logging.Formatter): level_name_colors = { TRACE_LOG_LEVEL: lambda message: click.style(message, fg='blue'), logging.DEBUG: lambda message: click.style(message, fg='cyan'), logging.INFO: lambda message: click.style(message, fg='green'), logging.WARNING: lambda message: click.style(message, fg='yellow'), logging.ERROR: lambda message: click.style(message, fg='red'), logging.CRITICAL: lambda message: click.style(message, fg='bright_red'), } def formatMessage(self, record): colored = self.level_name_colors[record.levelno] record.__dict__['message'] = colored(record.msg % record.args) record.__dict__['asctime'] = colored(f'[+] {record.asctime}') record.__dict__['levelname'] = colored(f'{record.levelname}') return super().formatMessage(record) def configure_logging(log_level): logging.addLevelName(TRACE_LOG_LEVEL, 'TRACE') logging_dict_config(LOGGING_CONFIG) logging.getLogger('browser_fetcher').setLevel(LOG_LEVELS[log_level])
29
80
0.630832
7940c0e04664f68c39955eb72e112128b8730c55
2,440
py
Python
configs/learning_gem5/part2/run_simple.py
taomiao/gem5
4effe34f94b599add133357473e1b120b54719ab
[ "BSD-3-Clause" ]
135
2016-10-21T03:31:49.000Z
2022-03-25T01:22:20.000Z
configs/learning_gem5/part2/run_simple.py
taomiao/gem5
4effe34f94b599add133357473e1b120b54719ab
[ "BSD-3-Clause" ]
35
2017-03-10T17:57:46.000Z
2022-02-18T17:34:16.000Z
configs/learning_gem5/part2/run_simple.py
taomiao/gem5
4effe34f94b599add133357473e1b120b54719ab
[ "BSD-3-Clause" ]
48
2016-12-08T12:03:13.000Z
2022-02-16T09:16:13.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2017 Jason Lowe-Power # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer; # redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution; # neither the name of the copyright holders nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Authors: Jason Lowe-Power """ Simple config/run script for the HelloObject This is probably the simplest gem5 config file you can possibly create. It creates a Root object and one *very* simple SimObject and simulates the system. Since there are no events, this "simulation" should finish immediately """ from __future__ import print_function from __future__ import absolute_import # import the m5 (gem5) library created when gem5 is built import m5 # import all of the SimObjects from m5.objects import * # set up the root SimObject and start the simulation root = Root(full_system = False) # Create an instantiation of the simobject you created root.hello = SimpleObject() # instantiate all of the objects we've created above m5.instantiate() print("Beginning simulation!") exit_event = m5.simulate() print('Exiting @ tick %i because %s' % (m5.curTick(), exit_event.getCause()))
42.068966
78
0.783197
7940c2e056b552818502f531d6f2924479c05986
42
py
Python
models/__init__.py
gmshashank/Deep_Flow_Prediction
9b4c388b70a458cddac20258242a6a36965524bc
[ "MIT" ]
null
null
null
models/__init__.py
gmshashank/Deep_Flow_Prediction
9b4c388b70a458cddac20258242a6a36965524bc
[ "MIT" ]
null
null
null
models/__init__.py
gmshashank/Deep_Flow_Prediction
9b4c388b70a458cddac20258242a6a36965524bc
[ "MIT" ]
null
null
null
from .unet import Generator, weights_init
21
41
0.833333
7940c302f2268937e491a1f7c49a26a12b36486d
6,896
py
Python
copct-master/baxter_experiments.py
jhomble/electron435
2a94a901679a1ebbdeea01bb9e888d365d536bec
[ "MIT" ]
null
null
null
copct-master/baxter_experiments.py
jhomble/electron435
2a94a901679a1ebbdeea01bb9e888d365d536bec
[ "MIT" ]
null
null
null
copct-master/baxter_experiments.py
jhomble/electron435
2a94a901679a1ebbdeea01bb9e888d365d536bec
[ "MIT" ]
null
null
null
#!/usr/bin/env python import time import copct M = 3 def causes(v): """ Causal relation for the robotic imitation learning domain. v is a sequence of intentions or actions. Each element v[i] is of the form (state, task name, parameter values). Returns the set of all possible causes of v. """ g = set() # set of possible causes arm_ids = ("left","right") clear_ids = ("discard-bin") states, tasks, args = zip(*v) if len(v) == 1: if tasks == ("move arm and grasp",): arm, object_id = args[0] dest_id = arm_ids[int(arm)-1] asm_type = dict(states[0])[object_id] if asm_type not in ("DockCase","DockDrawer"): g.add((states[0], "move unobstructed object",(object_id, dest_id, (), ()))) if tasks == ("put down grasped object",): arm, dest_id, dM, dt = args[0] object_id = dict(states[0])["gripping"][int(arm)-1] g.add((states[0], "move unobstructed object", (object_id, dest_id, dM, dt))) if tasks == ("move unobstructed object",): object_id, dest_id, dM, dt = args[0] if dest_id in arm_ids: g.add((states[0], "move object", args[0])) else: asm_type = dict(states[0])[dest_id] if (asm_type=="DockCase") or (dest_id in clear_ids): g.add((states[0],"move unobstructed object to free spot", (object_id, dest_id))) g.add((states[0],"move object", args[0])) if tasks == ("move object",): object_id, dest_id, dM, dt = args[0] if dest_id not in arm_ids: if (dest_id=="dock-case_6") or (dest_id in clear_ids): g.add((states[0],"move object to free spot", (object_id, dest_id))) if tasks == ("move object to free spot",): object_id, dest_id = args[0] if dest_id=="discard-bin": g.add((states[0],"discard object",(object_id,))) if len(v)==2: if tasks == ("move grasped object","release"): arm, dest_id, dM, dt = args[0] object_id = dict(states[0])["gripping"][int(arm)-1] asm_type = dict(states[0])[object_id] if asm_type not in ("DockCase","DockDrawer"): g.add((states[0], "put down grasped object", args[0])) if tasks == ("move arm and grasp","put down grasped object"): arm_0, object_id = args[0] arm_1, dest_id, dM, dt = args[1] asm_type = dict(states[0])[object_id] if (arm_0==arm_1) and not (asm_type=="DockDrawer"): g.add((states[0],"move unobstructed object",(object_id, dest_id, dM, dt))) if len(v)==3: if tasks == ("move arm and grasp","move grasped object","release"): arm_0, object_id = args[0] arm_1, _, _, dt = args[1] arm_2, = args[2] asm_type = dict(states[0])[object_id] if (arm_0==arm_1) and (arm_1==arm_2) and (asm_type=="DockDrawer"): distance = sum([x**2 for (x,) in dt])**0.5 if distance > 1: g.add((states[0],"open dock drawer",(object_id, states[2]))) else: g.add((states[0],"close dock drawer",(object_id,))) return g def run_experiments(check_irr=True): results = {} # Dock maintenance demos demos = ["demo_%s_%d"%(skill, di) for di in [1,2] for skill in ["remove_red_drive","replace_red_with_green","replace_red_with_spare","swap_red_with_green"]] # Block stacking demos demos += ["demo_il", "demo_ai", "demo_um"] # Cover demos print("Covering demos...") for demo_name in demos: print(demo_name) # import demo and ground truth exec_str = "from baxter_corpus.%s import demo"%demo_name exec(exec_str, globals()) exec_str = "from baxter_corpus.%s_ground_truth import ground_truth"%demo_name exec(exec_str, globals()) # Cover and prune by each parsimony criterion results[demo_name] = {} start_time = time.clock() status, tlcovs, g = copct.explain(causes, demo, M=M) results[demo_name]["run_time"] = time.clock()-start_time results[demo_name]["tlcovs"], results[demo_name]["g"] = tlcovs, g results[demo_name]["tlcovs_mc"] = [u for (u,_,_,_,_) in copct.minCardinalityTLCovers(tlcovs)[0]] results[demo_name]["tlcovs_md"] = [u for (u,_,_,_,_) in copct.maxDepthTLCovers(tlcovs)[0]] results[demo_name]["tlcovs_xd"] = [u for (u,_,_,_,_) in copct.minimaxDepthTLCovers(tlcovs)[0]] results[demo_name]["tlcovs_mp"] = [u for (u,_,_,_,_) in copct.minParametersTLCovers(tlcovs)[0]] results[demo_name]["tlcovs_fsn"] = [u for (u,_,_,_,_) in copct.minForestSizeTLCovers(tlcovs)[0]] results[demo_name]["tlcovs_fsx"] = [u for (u,_,_,_,_) in copct.maxForestSizeTLCovers(tlcovs)[0]] start_time = time.clock() if check_irr: status, tlcovs_irr = copct.irredundantTLCovers(tlcovs, timeout=1000) if status == False: print("IRR timeout") else: tlcovs_irr = tlcovs results[demo_name]["run_time_irr"] = time.clock()-start_time results[demo_name]["tlcovs_irr"] = [u for (u,_,_,_,_) in tlcovs_irr] results[demo_name]["u in tlcovs"] = ground_truth in [u for (u,_,_,_,_) in tlcovs] results[demo_name]["u in tlcovs_mc"] = ground_truth in results[demo_name]["tlcovs_mc"] results[demo_name]["u in tlcovs_md"] = ground_truth in results[demo_name]["tlcovs_md"] results[demo_name]["u in tlcovs_xd"] = ground_truth in results[demo_name]["tlcovs_xd"] results[demo_name]["u in tlcovs_mp"] = ground_truth in results[demo_name]["tlcovs_mp"] results[demo_name]["u in tlcovs_fsn"] = ground_truth in results[demo_name]["tlcovs_fsn"] results[demo_name]["u in tlcovs_fsx"] = ground_truth in results[demo_name]["tlcovs_fsx"] results[demo_name]["u in tlcovs_irr"] = ground_truth in results[demo_name]["tlcovs_irr"] # display results criteria = ["_mc", "_irr", "_md", "_xd", "_mp", "_fsn", "_fsx"] print("Accuracy:") for crit in criteria: correct_demos = [d for d in results if results[d]["u in tlcovs%s"%crit]] print('%s: %f%%'%(crit, 1.0*len(correct_demos)/len(demos))) print("# of covers found:") print(["Demo","Runtime (explain)", "Runtime (irr)"]+criteria) for demo_name in demos: num_tlcovs = [len(results[demo_name]["tlcovs%s"%crit]) for crit in criteria] print([demo_name, results[demo_name]["run_time"], results[demo_name]["run_time_irr"]]+num_tlcovs) return results if __name__ == "__main__": check_irr = raw_input("Run irredundancy checks? May take several minutes. [y/n]") results = run_experiments(check_irr == "y")
51.462687
160
0.595708
7940c341c5192dea1298b72340b3872a94e194e8
544
py
Python
client_service/python/src/client_service_python/scripts/add_two_ints_server.py
vlantonov/ros_samples
f49ca64e00f4d4b6461ba1512c02c9045c5b631a
[ "MIT" ]
null
null
null
client_service/python/src/client_service_python/scripts/add_two_ints_server.py
vlantonov/ros_samples
f49ca64e00f4d4b6461ba1512c02c9045c5b631a
[ "MIT" ]
null
null
null
client_service/python/src/client_service_python/scripts/add_two_ints_server.py
vlantonov/ros_samples
f49ca64e00f4d4b6461ba1512c02c9045c5b631a
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function from client_service_python.srv import AddTwoInts, AddTwoIntsResponse import rospy def handle_add_two_ints(req): print("Returning [%s + %s = %s]" % (req.a, req.b, (req.a + req.b))) return AddTwoIntsResponse(req.a + req.b) def add_two_ints_server(): rospy.init_node("add_two_ints_server") s = rospy.Service("add_two_ints", AddTwoInts, handle_add_two_ints) print("Ready to add two ints.") rospy.spin() if __name__ == "__main__": add_two_ints_server()
23.652174
71
0.715074
7940c3878706863d1d5f750165bbd70a99b3eab3
2,005
py
Python
src/transformers/commands/transformers_cli.py
ashokei/transformers
5e637e6c690e45d13ebf7296e1ea9dcc188d0f07
[ "Apache-2.0" ]
10
2021-05-31T07:18:08.000Z
2022-03-19T09:20:11.000Z
src/transformers/commands/transformers_cli.py
tutussss/transformers
67ff1c314a61a2d5949b3bb48fa3ec7e9b697d7e
[ "Apache-2.0" ]
1
2021-08-03T12:23:01.000Z
2021-08-10T08:35:22.000Z
src/transformers/commands/transformers_cli.py
tutussss/transformers
67ff1c314a61a2d5949b3bb48fa3ec7e9b697d7e
[ "Apache-2.0" ]
3
2021-09-19T08:20:42.000Z
2022-02-19T16:32:40.000Z
#!/usr/bin/env python # Copyright 2020 The HuggingFace Team. 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 applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from argparse import ArgumentParser from transformers.commands.add_new_model import AddNewModelCommand from transformers.commands.convert import ConvertCommand from transformers.commands.download import DownloadCommand from transformers.commands.env import EnvironmentCommand from transformers.commands.lfs import LfsCommands from transformers.commands.run import RunCommand from transformers.commands.serving import ServeCommand from transformers.commands.user import UserCommands def main(): parser = ArgumentParser("Transformers CLI tool", usage="transformers-cli <command> [<args>]") commands_parser = parser.add_subparsers(help="transformers-cli command helpers") # Register commands ConvertCommand.register_subcommand(commands_parser) DownloadCommand.register_subcommand(commands_parser) EnvironmentCommand.register_subcommand(commands_parser) RunCommand.register_subcommand(commands_parser) ServeCommand.register_subcommand(commands_parser) UserCommands.register_subcommand(commands_parser) AddNewModelCommand.register_subcommand(commands_parser) LfsCommands.register_subcommand(commands_parser) # Let's go args = parser.parse_args() if not hasattr(args, "func"): parser.print_help() exit(1) # Run service = args.func(args) service.run() if __name__ == "__main__": main()
35.803571
97
0.784539
7940c48bd8c5f655a27522835e4de9652852c4c2
3,408
py
Python
utils.py
Louiealbp/ContrastiveLearningGoalReaching
4ef3e22cb8276a8c2f4f313e2b27138b9cd361b3
[ "MIT" ]
null
null
null
utils.py
Louiealbp/ContrastiveLearningGoalReaching
4ef3e22cb8276a8c2f4f313e2b27138b9cd361b3
[ "MIT" ]
null
null
null
utils.py
Louiealbp/ContrastiveLearningGoalReaching
4ef3e22cb8276a8c2f4f313e2b27138b9cd361b3
[ "MIT" ]
null
null
null
import numpy as np import torch from collections import deque import os def make_dir(dir_path): try: os.mkdir(dir_path) except OSError: pass return dir_path def preprocess_obs(obs, bits=5): """Preprocessing image, see https://arxiv.org/abs/1807.03039.""" bins = 2**bits assert obs.dtype == torch.float32 if bits < 8: obs = torch.floor(obs / 2**(8 - bits)) obs = obs / bins obs = obs + torch.rand_like(obs) / bins obs = obs - 0.5 return obs def center_translate(imgs, size): n, c, h, w = imgs.shape assert size >= h and size >= w outs = np.zeros((n, c, size, size), dtype=imgs.dtype) h1 = (size - h) // 2 w1 = (size - w) // 2 outs[:, :, h1:h1 + h, w1:w1 + w] = imgs return outs def random_translate(imgs, size, return_random_idxs=False, h1s=None, w1s=None): n, c, h, w = imgs.shape assert size >= h and size >= w outs = np.zeros((n, c, size, size), dtype=imgs.dtype) h1s = np.random.randint(0, size - h + 1, n) if h1s is None else h1s w1s = np.random.randint(0, size - w + 1, n) if w1s is None else w1s for out, img, h1, w1 in zip(outs, imgs, h1s, w1s): out[:, h1:h1 + h, w1:w1 + w] = img if return_random_idxs: # So can do the same to another set of imgs. return outs, dict(h1s=h1s, w1s=w1s) return outs def calculate_reward_func(agent): def reward_func(ag_next, g, third_argument): if agent.args.encoder_type == 'pixel': ag_next = torch.as_tensor(center_translate(ag_next, agent.args.image_size)).float() g = torch.as_tensor(center_translate(g, agent.args.image_size)).float() if agent.args.cuda: ag_next.cuda() g.cuda() if not agent.args.load_reward_curl: ag_next_enc = agent.contrastive_learner.encode(ag_next, ema = True) g_enc = agent.contrastive_learner.encode(g, ema = True) else: ag_next_enc = agent.reward_contrastive.encode(ag_next, ema = True) g_enc = agent.reward_contrastive.encode(g, ema = True) if agent.args.cosine_similarity: distances = (ag_next_enc * g_enc).sum(dim = 1) / (torch.norm(ag_next_enc, dim = 1) * torch.norm(g_enc, dim = 1)) if agent.args.not_sparse_reward: rewards = distances.cpu().numpy() else: rewards = (distances > agent.args.cosine_cutoff).cpu().numpy() else: distances = torch.sqrt(((ag_next_enc - g_enc) **2).sum(dim = 1)) if agent.args.not_sparse_reward: rewards = torch.exp(-distances).cpu().numpy() else: rewards = (distances < 1).cpu().numpy() if agent.args.zero_one_reward: return rewards else: return rewards - 1 else: ag_next = torch.as_tensor(ag_next).float() g = torch.as_tensor(g).float() if agent.args.cuda: ag_next.cuda() g.cuda() distances = torch.sqrt(((ag_next - g) **2).sum(dim = 1)) rewards = (distances < 0.03) .cpu().numpy() if agent.args.zero_one_reward: return rewards else: return rewards - 1 return reward_func
38.727273
128
0.559272
7940c4b7eaa5f7f64c506fc96442c25d4c200f31
205
py
Python
citypay/api/__init__.py
citypay/citypay-pos-python-client
df21205504c5b5bd75b5ac5e2a34fb9430f7e4db
[ "MIT" ]
null
null
null
citypay/api/__init__.py
citypay/citypay-pos-python-client
df21205504c5b5bd75b5ac5e2a34fb9430f7e4db
[ "MIT" ]
null
null
null
citypay/api/__init__.py
citypay/citypay-pos-python-client
df21205504c5b5bd75b5ac5e2a34fb9430f7e4db
[ "MIT" ]
null
null
null
from __future__ import absolute_import # flake8: noqa # import apis into api package from citypay.api.device_module_api import DeviceModuleApi from citypay.api.payment_module_api import PaymentModuleApi
25.625
59
0.853659
7940c585e1dd7533dfc57d5dad917df0a2c635b0
8,984
py
Python
fedml_api/distributed/fedopt/FedOptAggregator.py
xuwanwei/FedML
c049a30d9839c4554e7e14b0c18275e96fea8130
[ "Apache-2.0" ]
1,120
2020-07-22T02:30:52.000Z
2022-03-31T08:10:44.000Z
fedml_api/distributed/fedopt/FedOptAggregator.py
xuwanwei/FedML
c049a30d9839c4554e7e14b0c18275e96fea8130
[ "Apache-2.0" ]
113
2020-07-27T03:48:09.000Z
2022-03-30T03:25:56.000Z
fedml_api/distributed/fedopt/FedOptAggregator.py
xuwanwei/FedML
c049a30d9839c4554e7e14b0c18275e96fea8130
[ "Apache-2.0" ]
381
2020-07-22T06:12:57.000Z
2022-03-30T18:38:35.000Z
import copy import logging import random import time import numpy as np import torch import wandb from .optrepo import OptRepo from .utils import transform_list_to_tensor class FedOptAggregator(object): def __init__(self, train_global, test_global, all_train_data_num, train_data_local_dict, test_data_local_dict, train_data_local_num_dict, worker_num, device, args, model_trainer): self.trainer = model_trainer self.args = args self.train_global = train_global self.test_global = test_global self.val_global = self._generate_validation_set() self.all_train_data_num = all_train_data_num self.train_data_local_dict = train_data_local_dict self.test_data_local_dict = test_data_local_dict self.train_data_local_num_dict = train_data_local_num_dict self.worker_num = worker_num self.device = device self.model_dict = dict() self.sample_num_dict = dict() self.flag_client_model_uploaded_dict = dict() self.opt = self._instantiate_opt() for idx in range(self.worker_num): self.flag_client_model_uploaded_dict[idx] = False def _instantiate_opt(self): return OptRepo.name2cls(self.args.server_optimizer)( filter(lambda p: p.requires_grad, self.get_model_params()), lr=self.args.server_lr, momentum=self.args.server_momentum, ) def get_model_params(self): # return model parameters in type of generator return self.trainer.model.parameters() def get_global_model_params(self): # return model parameters in type of ordered_dict return self.trainer.get_model_params() def set_global_model_params(self, model_parameters): self.trainer.set_model_params(model_parameters) def add_local_trained_result(self, index, model_params, sample_num): logging.info("add_model. index = %d" % index) self.model_dict[index] = model_params self.sample_num_dict[index] = sample_num self.flag_client_model_uploaded_dict[index] = True def check_whether_all_receive(self): for idx in range(self.worker_num): if not self.flag_client_model_uploaded_dict[idx]: return False for idx in range(self.worker_num): self.flag_client_model_uploaded_dict[idx] = False return True def aggregate(self): start_time = time.time() model_list = [] training_num = 0 for idx in range(self.worker_num): if self.args.is_mobile == 1: self.model_dict[idx] = transform_list_to_tensor(self.model_dict[idx]) model_list.append((self.sample_num_dict[idx], self.model_dict[idx])) training_num += self.sample_num_dict[idx] logging.info("len of self.model_dict[idx] = " + str(len(self.model_dict))) # logging.info("################aggregate: %d" % len(model_list)) (num0, averaged_params) = model_list[0] for k in averaged_params.keys(): for i in range(0, len(model_list)): local_sample_number, local_model_params = model_list[i] w = local_sample_number / training_num if i == 0: averaged_params[k] = local_model_params[k] * w else: averaged_params[k] += local_model_params[k] * w # server optimizer # save optimizer state self.opt.zero_grad() opt_state = self.opt.state_dict() # set new aggregated grad self.set_model_global_grads(averaged_params) self.opt = self._instantiate_opt() # load optimizer state self.opt.load_state_dict(opt_state) self.opt.step() end_time = time.time() logging.info("aggregate time cost: %d" % (end_time - start_time)) return self.get_global_model_params() def set_model_global_grads(self, new_state): new_model = copy.deepcopy(self.trainer.model) new_model.load_state_dict(new_state) with torch.no_grad(): for parameter, new_parameter in zip( self.trainer.model.parameters(), new_model.parameters() ): parameter.grad = parameter.data - new_parameter.data # because we go to the opposite direction of the gradient model_state_dict = self.trainer.model.state_dict() new_model_state_dict = new_model.state_dict() for k in dict(self.trainer.model.named_parameters()).keys(): new_model_state_dict[k] = model_state_dict[k] # self.trainer.model.load_state_dict(new_model_state_dict) self.set_global_model_params(new_model_state_dict) def client_sampling(self, round_idx, client_num_in_total, client_num_per_round): if client_num_in_total == client_num_per_round: client_indexes = [client_index for client_index in range(client_num_in_total)] else: num_clients = min(client_num_per_round, client_num_in_total) np.random.seed(round_idx) # make sure for each comparison, we are selecting the same clients each round client_indexes = np.random.choice(range(client_num_in_total), num_clients, replace=False) logging.info("client_indexes = %s" % str(client_indexes)) return client_indexes def _generate_validation_set(self, num_samples=10000): if self.args.dataset.startswith("stackoverflow"): test_data_num = len(self.test_global.dataset) sample_indices = random.sample(range(test_data_num), min(num_samples, test_data_num)) subset = torch.utils.data.Subset(self.test_global.dataset, sample_indices) sample_testset = torch.utils.data.DataLoader(subset, batch_size=self.args.batch_size) return sample_testset else: return self.test_global def test_on_server_for_all_clients(self, round_idx): if self.trainer.test_on_the_server(self.train_data_local_dict, self.test_data_local_dict, self.device, self.args): return if round_idx % self.args.frequency_of_the_test == 0 or round_idx == self.args.comm_round - 1: logging.info("################local_test_on_all_clients : {}".format(round_idx)) train_num_samples = [] train_tot_corrects = [] train_losses = [] test_num_samples = [] test_tot_corrects = [] test_losses = [] for client_idx in range(self.args.client_num_in_total): # train data metrics = self.trainer.test(self.train_data_local_dict[client_idx], self.device, self.args) train_tot_correct, train_num_sample, train_loss = metrics['test_correct'], metrics['test_total'], metrics['test_loss'] train_tot_corrects.append(copy.deepcopy(train_tot_correct)) train_num_samples.append(copy.deepcopy(train_num_sample)) train_losses.append(copy.deepcopy(train_loss)) """ Note: CI environment is CPU-based computing. The training speed for RNN training is to slow in this setting, so we only test a client to make sure there is no programming error. """ if self.args.ci == 1: break # test on training dataset train_acc = sum(train_tot_corrects) / sum(train_num_samples) train_loss = sum(train_losses) / sum(train_num_samples) wandb.log({"Train/Acc": train_acc, "round": round_idx}) wandb.log({"Train/Loss": train_loss, "round": round_idx}) stats = {'training_acc': train_acc, 'training_loss': train_loss} logging.info(stats) # test data test_num_samples = [] test_tot_corrects = [] test_losses = [] if round_idx == self.args.comm_round - 1: metrics = self.trainer.test(self.test_global, self.device, self.args) else: metrics = self.trainer.test(self.val_global, self.device, self.args) test_tot_correct, test_num_sample, test_loss = metrics['test_correct'], metrics['test_total'], metrics[ 'test_loss'] test_tot_corrects.append(copy.deepcopy(test_tot_correct)) test_num_samples.append(copy.deepcopy(test_num_sample)) test_losses.append(copy.deepcopy(test_loss)) # test on test dataset test_acc = sum(test_tot_corrects) / sum(test_num_samples) test_loss = sum(test_losses) / sum(test_num_samples) wandb.log({"Test/Acc": test_acc, "round": round_idx}) wandb.log({"Test/Loss": test_loss, "round": round_idx}) stats = {'test_acc': test_acc, 'test_loss': test_loss} logging.info(stats)
44.256158
148
0.645147
7940c5d443f6a7946a217e06d2a4f26f23236d76
315
py
Python
main.py
arthursgonzaga/GoogleNewsScraping
f07ba1185f24e5ccc1c090604b15a63c2ed0ce49
[ "MIT" ]
null
null
null
main.py
arthursgonzaga/GoogleNewsScraping
f07ba1185f24e5ccc1c090604b15a63c2ed0ce49
[ "MIT" ]
null
null
null
main.py
arthursgonzaga/GoogleNewsScraping
f07ba1185f24e5ccc1c090604b15a63c2ed0ce49
[ "MIT" ]
null
null
null
import pandas as pd from GoogleNews import GoogleNews SEARCHING = 'Dados' googlenews = GoogleNews() googlenews.set_lang('pt') googlenews.search(SEARCHING) print("Searching for... " + SEARCHING) results = googlenews.result() df = pd.DataFrame(results) df.to_csv('exported_results.csv', index=False) print("Done!")
22.5
46
0.761905
7940c7eb238e5dffd2bde01cada8fcef5dafbbf4
9,681
py
Python
jobs/migrations/0011_auto__add_field_job_company_name.py
shipci/pythondotorg
eab6421261174c5f9040a4b50654e54e2ce90c9c
[ "Apache-2.0" ]
null
null
null
jobs/migrations/0011_auto__add_field_job_company_name.py
shipci/pythondotorg
eab6421261174c5f9040a4b50654e54e2ce90c9c
[ "Apache-2.0" ]
null
null
null
jobs/migrations/0011_auto__add_field_job_company_name.py
shipci/pythondotorg
eab6421261174c5f9040a4b50654e54e2ce90c9c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Job.company_name' db.add_column('jobs_job', 'company_name', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True), keep_default=False) def backwards(self, orm): # Deleting field 'Job.company_name' db.delete_column('jobs_job', 'company_name') models = { 'auth.group': { 'Meta': {'object_name': 'Group'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Permission']", 'blank': 'True'}) }, 'auth.permission': { 'Meta': {'unique_together': "(('content_type', 'codename'),)", 'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'object_name': 'Permission'}, 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, 'companies.company': { 'Meta': {'ordering': "('name',)", 'object_name': 'Company'}, '_about_rendered': ('django.db.models.fields.TextField', [], {}), 'about': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), 'about_markup_type': ('django.db.models.fields.CharField', [], {'default': "'restructuredtext'", 'max_length': '30', 'blank': 'True'}), 'contact': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'null': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'logo': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}), 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}) }, 'contenttypes.contenttype': { 'Meta': {'unique_together': "(('app_label', 'model'),)", 'ordering': "('name',)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) }, 'jobs.job': { 'Meta': {'ordering': "('-created',)", 'object_name': 'Job'}, '_description_rendered': ('django.db.models.fields.TextField', [], {}), '_requirements_rendered': ('django.db.models.fields.TextField', [], {}), 'agencies': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'jobs'", 'to': "orm['jobs.JobCategory']"}), 'city': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'company': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'jobs'", 'to': "orm['companies.Company']", 'null': 'True', 'blank': 'True'}), 'company_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 'contact': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}), 'country': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '100'}), 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'db_index': 'True', 'blank': 'True'}), 'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'jobs_job_creator'", 'to': "orm['users.User']", 'null': 'True', 'blank': 'True'}), 'description': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), 'description_markup_type': ('django.db.models.fields.CharField', [], {'default': "'restructuredtext'", 'max_length': '30', 'blank': 'True'}), 'dt_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), 'dt_start': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_featured': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}), 'job_types': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'jobs'", 'to': "orm['jobs.JobType']", 'blank': 'True'}), 'last_modified_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'jobs_job_modified'", 'to': "orm['users.User']", 'null': 'True', 'blank': 'True'}), 'location_slug': ('django.db.models.fields.SlugField', [], {'max_length': '350'}), 'region': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'requirements': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), 'requirements_markup_type': ('django.db.models.fields.CharField', [], {'default': "'restructuredtext'", 'max_length': '30', 'blank': 'True'}), 'status': ('django.db.models.fields.CharField', [], {'default': "'draft'", 'db_index': 'True', 'max_length': '20'}), 'telecommuting': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'updated': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}), 'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}) }, 'jobs.jobcategory': { 'Meta': {'ordering': "('name',)", 'object_name': 'JobCategory'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}) }, 'jobs.jobtype': { 'Meta': {'ordering': "('name',)", 'object_name': 'JobType'}, 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}) }, 'users.user': { 'Meta': {'object_name': 'User'}, '_bio_rendered': ('django.db.models.fields.TextField', [], {}), 'bio': ('markupfield.fields.MarkupField', [], {'rendered_field': 'True', 'blank': 'True'}), 'bio_markup_type': ('django.db.models.fields.CharField', [], {'default': "'markdown'", 'max_length': '30', 'blank': 'True'}), 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'email_privacy': ('django.db.models.fields.IntegerField', [], {'default': '2'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'blank': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), 'search_visibility': ('django.db.models.fields.IntegerField', [], {'default': '1'}), 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Permission']", 'blank': 'True'}), 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) } } complete_apps = ['jobs']
79.352459
184
0.563062
7940c823b9107fad04627ad8f4fb5bc42f9d9b55
2,557
py
Python
yabmp/channel/factory.py
zlpqingmei/yabmp
c91284e2701c9887a42804179eae1874d48082fe
[ "Apache-2.0" ]
36
2015-07-27T01:05:50.000Z
2021-12-05T05:09:15.000Z
yabmp/channel/factory.py
zlpqingmei/yabmp
c91284e2701c9887a42804179eae1874d48082fe
[ "Apache-2.0" ]
9
2015-05-20T05:52:21.000Z
2022-02-11T03:39:55.000Z
yabmp/channel/factory.py
zlpqingmei/yabmp
c91284e2701c9887a42804179eae1874d48082fe
[ "Apache-2.0" ]
20
2015-05-15T01:56:18.000Z
2021-09-29T07:15:46.000Z
# Copyright 2015-2016 Cisco Systems, Inc. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. """Twisted message queue factory reference from https://github.com/pika/pika/blob/master/examples/twisted_service.py """ import logging import pika from twisted.internet import protocol from twisted.internet import reactor from .protocol import PikaProtocol LOG = logging.getLogger(__name__) class PikaFactory(protocol.ReconnectingClientFactory): def __init__(self, url, routing_key): self.parameters = pika.URLParameters(url) self.client = None self.queued_messages = [] self.routing_key = routing_key def startedConnecting(self, connector): LOG.info('Started to connect to AMQP') def buildProtocol(self, addr): self.resetDelay() LOG.info('Connected AMQP') self.client = PikaProtocol(self.parameters) self.client.factory = self self.client.ready.addCallback(self.client.connected) return self.client def clientConnectionLost(self, connector, reason): LOG.info('Lost connection. Reason: %s', reason.getErrorMessage()) protocol.ReconnectingClientFactory.clientConnectionLost(self, connector, reason.getErrorMessage()) def clientConnectionFailed(self, connector, reason): LOG.info('Connection failed. Reason: %s', reason.getErrorMessage()) protocol.ReconnectingClientFactory.clientConnectionFailed(self, connector, reason.getErrorMessage()) def send_message(self, exchange=None, routing_key=None, message=None): if not routing_key: routing_key = self.routing_key self.queued_messages.append((exchange, routing_key, message)) if self.client is not None: self.client.send() def connect(self): try: reactor.connectTCP( host=self.parameters.host, port=self.parameters.port, factory=self) except Exception as e: LOG.error(e)
34.554054
108
0.695346
7940c87da98a967e3f8281f08d5adaa607616b8f
395
py
Python
causal_curve/__init__.py
piaodangdang/causal-curve
954af307c3fd77b9aaff280b59556b1f90a3659a
[ "MIT" ]
1
2020-12-23T02:26:54.000Z
2020-12-23T02:26:54.000Z
causal_curve/__init__.py
piaodangdang/causal-curve
954af307c3fd77b9aaff280b59556b1f90a3659a
[ "MIT" ]
null
null
null
causal_curve/__init__.py
piaodangdang/causal-curve
954af307c3fd77b9aaff280b59556b1f90a3659a
[ "MIT" ]
null
null
null
"""causal_curve module""" import warnings from statsmodels.genmod.generalized_linear_model import DomainWarning from causal_curve.gps import GPS from causal_curve.tmle import TMLE from causal_curve.mediation import Mediation # Suppress statsmodel warning for gamma family GLM warnings.filterwarnings("ignore", category=DomainWarning) warnings.filterwarnings("ignore", category=UserWarning)
26.333333
69
0.840506
7940c9399f802ed2b58ce90ab958d351585bbc27
5,804
py
Python
runway_model.py
genekogan/deeplab-pytorch
c58f66878a1c5012c68a24eabdd15090b9becf4c
[ "MIT" ]
5
2019-05-20T23:15:42.000Z
2021-12-03T19:21:15.000Z
runway_model.py
Erinqi/deeplab-pytorch
c58f66878a1c5012c68a24eabdd15090b9becf4c
[ "MIT" ]
null
null
null
runway_model.py
Erinqi/deeplab-pytorch
c58f66878a1c5012c68a24eabdd15090b9becf4c
[ "MIT" ]
5
2019-05-18T15:23:24.000Z
2022-01-11T10:52:56.000Z
from __future__ import absolute_import, division, print_function import pickle import numpy as np import cv2 import torch import torch.nn as nn import torch.nn.functional as F import yaml from addict import Dict from libs.models import * from libs.utils import DenseCRF from demo import * import runway classes = {0: 'person', 1: 'bicycle', 2: 'car', 3: 'motorcycle', 4: 'airplane', 5: 'bus', 6: 'train', 7: 'truck', 8: 'boat', 9: 'traffic light', 10: 'fire hydrant', 11: 'street sign', 12: 'stop sign', 13: 'parking meter', 14: 'bench', 15: 'bird', 16: 'cat', 17: 'dog', 18: 'horse', 19: 'sheep', 20: 'cow', 21: 'elephant', 22: 'bear', 23: 'zebra', 24: 'giraffe', 25: 'hat', 26: 'backpack', 27: 'umbrella', 28: 'shoe', 29: 'eye glasses', 30: 'handbag', 31: 'tie', 32: 'suitcase', 33: 'frisbee', 34: 'skis', 35: 'snowboard', 36: 'sports ball', 37: 'kite', 38: 'baseball bat', 39: 'baseball glove', 40: 'skateboard', 41: 'surfboard', 42: 'tennis racket', 43: 'bottle', 44: 'plate', 45: 'wine glass', 46: 'cup', 47: 'fork', 48: 'knife', 49: 'spoon', 50: 'bowl', 51: 'banana', 52: 'apple', 53: 'sandwich', 54: 'orange', 55: 'broccoli', 56: 'carrot', 57: 'hot dog', 58: 'pizza', 59: 'donut', 60: 'cake', 61: 'chair', 62: 'couch', 63: 'potted plant', 64: 'bed', 65: 'mirror', 66: 'dining table', 67: 'window', 68: 'desk', 69: 'toilet', 70: 'door', 71: 'tv', 72: 'laptop', 73: 'mouse', 74: 'remote', 75: 'keyboard', 76: 'cell phone', 77: 'microwave', 78: 'oven', 79: 'toaster', 80: 'sink', 81: 'refrigerator', 82: 'blender', 83: 'book', 84: 'clock', 85: 'vase', 86: 'scissors', 87: 'teddy bear', 88: 'hair drier', 89: 'toothbrush', 90: 'hair brush', 91: 'banner', 92: 'blanket', 93: 'branch', 94: 'bridge', 95: 'building-other', 96: 'bush', 97: 'cabinet', 98: 'cage', 99: 'cardboard', 100: 'carpet', 101: 'ceiling-other', 102: 'ceiling-tile', 103: 'cloth', 104: 'clothes', 105: 'clouds', 106: 'counter', 107: 'cupboard', 108: 'curtain', 109: 'desk-stuff', 110: 'dirt', 111: 'door-stuff', 112: 'fence', 113: 'floor-marble', 114: 'floor-other', 115: 'floor-stone', 116: 'floor-tile', 117: 'floor-wood', 118: 'flower', 119: 'fog', 120: 'food-other', 121: 'fruit', 122: 'furniture-other', 123: 'grass', 124: 'gravel', 125: 'ground-other', 126: 'hill', 127: 'house', 128: 'leaves', 129: 'light', 130: 'mat', 131: 'metal', 132: 'mirror-stuff', 133: 'moss', 134: 'mountain', 135: 'mud', 136: 'napkin', 137: 'net', 138: 'paper', 139: 'pavement', 140: 'pillow', 141: 'plant-other', 142: 'plastic', 143: 'platform', 144: 'playingfield', 145: 'railing', 146: 'railroad', 147: 'river', 148: 'road', 149: 'rock', 150: 'roof', 151: 'rug', 152: 'salad', 153: 'sand', 154: 'sea', 155: 'shelf', 156: 'sky-other', 157: 'skyscraper', 158: 'snow', 159: 'solid-other', 160: 'stairs', 161: 'stone', 162: 'straw', 163: 'structural-other', 164: 'table', 165: 'tent', 166: 'textile-other', 167: 'towel', 168: 'tree', 169: 'vegetable', 170: 'wall-brick', 171: 'wall-concrete', 172: 'wall-other', 173: 'wall-panel', 174: 'wall-stone', 175: 'wall-tile', 176: 'wall-wood', 177: 'water-other', 178: 'waterdrops', 179: 'window-blind', 180: 'window-other', 181: 'wood', 182: 'unlabeled'} label_to_id = {v: k for k, v in classes.items()} classes_list = [c for c in classes.values()] def inference2(model, image, raw_image=None, postprocessor=None): _, _, H, W = image.shape # Image -> Probability map logits = model(image) logits = F.interpolate(logits, size=(H, W), mode="bilinear", align_corners=False) probs = F.softmax(logits, dim=1)[0] probs = probs.detach().cpu().numpy() # Refine the prob map with CRF if postprocessor and raw_image is not None: probs = postprocessor(raw_image, probs) labelmap = np.argmax(probs, axis=0) return labelmap def run_model(model, inputs): image = np.array(inputs['image']) image, raw_image = preprocessing(image, model['device'], model['config']) labelmap = inference2(model['model'], image, raw_image, model['postprocessor']) return labelmap @runway.setup(options={'checkpoint': runway.file(extension='.pth')}) def setup(opts): config_path = 'configs/cocostuff164k.yaml' model_path = opts['checkpoint'] cuda = torch.cuda.is_available() crf = False with open(config_path, 'r') as f: CONFIG = Dict(yaml.load(f)) device = get_device(cuda) torch.set_grad_enabled(False) #classes = get_classtable(CONFIG) postprocessor = setup_postprocessor(CONFIG) if crf else None model = eval(CONFIG.MODEL.NAME)(n_classes=CONFIG.DATASET.N_CLASSES) state_dict = torch.load(model_path, map_location=lambda storage, loc: storage) model.load_state_dict(state_dict) model.eval() model.to(device) print("Model:", CONFIG.MODEL.NAME) return Dict({'model': model, 'device': device, 'config': CONFIG, 'postprocessor':postprocessor}) @runway.command('mask_all', inputs={'image': runway.image}, outputs={'image': runway.segmentation(label_to_id=label_to_id)}) def mask_all(model, inputs): labelmap = run_model(model, inputs).astype(np.uint8) return {'image': labelmap } @runway.command('mask_one', inputs={'image': runway.image, 'class': runway.category(choices=classes_list)}, outputs={'image': runway.image}) def mask_one(model, inputs): labelmap = run_model(model, inputs) labelmap = 255.0 * np.array(labelmap==classes_list.index(inputs['class'])) image_out = np.dstack([labelmap] * 3).astype(np.uint8) return {'image': image_out } @runway.command('detect', inputs={'image': runway.image}, outputs={'classes': runway.array(runway.text)}) def detect(model, inputs): labelmap = run_model(model, inputs) labels = [classes_list[l] for l in np.unique(labelmap)] return {'classes': labels } if __name__ == '__main__': runway.run()
56.901961
2,846
0.64938
7940c9790dd7ff87be87b15ac35e2712cc9097c1
40,396
py
Python
tensor2tensor/data_generators/text_encoder.py
Mozen/Transorformer-tensor2tensor
e29b7dded31c6e909a4bd91fd2523517a15d93b3
[ "Apache-2.0" ]
null
null
null
tensor2tensor/data_generators/text_encoder.py
Mozen/Transorformer-tensor2tensor
e29b7dded31c6e909a4bd91fd2523517a15d93b3
[ "Apache-2.0" ]
null
null
null
tensor2tensor/data_generators/text_encoder.py
Mozen/Transorformer-tensor2tensor
e29b7dded31c6e909a4bd91fd2523517a15d93b3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # 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 License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Encoders for text data. * TextEncoder: base class * ByteTextEncoder: for ascii text * TokenTextEncoder: with user-supplied vocabulary file * SubwordTextEncoder: invertible """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections from itertools import chain import math import re import tempfile import time import numpy as np import six from six.moves import range # pylint: disable=redefined-builtin from tensor2tensor.data_generators import tokenizer import tensorflow as tf # Reserved tokens for things like padding and EOS symbols. PAD = "<pad>" EOS = "<EOS>" RESERVED_TOKENS = [PAD, EOS] NUM_RESERVED_TOKENS = len(RESERVED_TOKENS) PAD_ID = RESERVED_TOKENS.index(PAD) # Normally 0 EOS_ID = RESERVED_TOKENS.index(EOS) # Normally 1 if six.PY2: RESERVED_TOKENS_BYTES = RESERVED_TOKENS else: RESERVED_TOKENS_BYTES = [bytes(PAD, "ascii"), bytes(EOS, "ascii")] # Regular expression for unescaping token strings. # '\u' is converted to '_' # '\\' is converted to '\' # '\213;' is converted to unichr(213) _UNESCAPE_REGEX = re.compile(r"\\u|\\\\|\\([0-9]+);") _ESCAPE_CHARS = set(u"\\_u;0123456789") # Unicode utility functions that work with Python 2 and 3 def native_to_unicode(s): return s if is_unicode(s) else to_unicode(s) def unicode_to_native(s): if six.PY2: return s.encode("utf-8") if is_unicode(s) else s else: return s def is_unicode(s): if six.PY2: if isinstance(s, unicode): return True else: if isinstance(s, str): return True return False def to_unicode(s, ignore_errors=False): if is_unicode(s): return s error_mode = "ignore" if ignore_errors else "strict" return s.decode("utf-8", errors=error_mode) def to_unicode_ignore_errors(s): return to_unicode(s, ignore_errors=True) def strip_ids(ids, ids_to_strip): """Strip ids_to_strip from the end ids.""" ids = list(ids) while ids and ids[-1] in ids_to_strip: ids.pop() return ids class TextEncoder(object): """Base class for converting from ints to/from human readable strings.""" def __init__(self, num_reserved_ids=NUM_RESERVED_TOKENS): self._num_reserved_ids = num_reserved_ids @property def num_reserved_ids(self): return self._num_reserved_ids def encode(self, s): """Transform a human-readable string into a sequence of int ids. The ids should be in the range [num_reserved_ids, vocab_size). Ids [0, num_reserved_ids) are reserved. EOS is not appended. Args: s: human-readable string to be converted. Returns: ids: list of integers """ return [int(w) + self._num_reserved_ids for w in s.split()] def decode(self, ids, strip_extraneous=False): """Transform a sequence of int ids into a human-readable string. EOS is not expected in ids. Args: ids: list of integers to be converted. strip_extraneous: bool, whether to strip off extraneous tokens (EOS and PAD). Returns: s: human-readable string. """ if strip_extraneous: ids = strip_ids(ids, list(range(self._num_reserved_ids or 0))) return " ".join(self.decode_list(ids)) def decode_list(self, ids): """Transform a sequence of int ids into a their string versions. This method supports transforming individual input/output ids to their string versions so that sequence to/from text conversions can be visualized in a human readable format. Args: ids: list of integers to be converted. Returns: strs: list of human-readable string. """ decoded_ids = [] for id_ in ids: if 0 <= id_ < self._num_reserved_ids: decoded_ids.append(RESERVED_TOKENS[int(id_)]) else: decoded_ids.append(id_ - self._num_reserved_ids) return [str(d) for d in decoded_ids] @property def vocab_size(self): raise NotImplementedError() class ByteTextEncoder(TextEncoder): """Encodes each byte to an id. For 8-bit strings only.""" def encode(self, s): numres = self._num_reserved_ids if six.PY2: if isinstance(s, unicode): s = s.encode("utf-8") return [ord(c) + numres for c in s] # Python3: explicitly convert to UTF-8 return [c + numres for c in s.encode("utf-8")] def decode(self, ids, strip_extraneous=False): if strip_extraneous: ids = strip_ids(ids, list(range(self._num_reserved_ids or 0))) numres = self._num_reserved_ids decoded_ids = [] int2byte = six.int2byte for id_ in ids: if 0 <= id_ < numres: decoded_ids.append(RESERVED_TOKENS_BYTES[int(id_)]) else: decoded_ids.append(int2byte(id_ - numres)) if six.PY2: return "".join(decoded_ids) # Python3: join byte arrays and then decode string return b"".join(decoded_ids).decode("utf-8", "replace") def decode_list(self, ids): numres = self._num_reserved_ids decoded_ids = [] int2byte = six.int2byte for id_ in ids: if 0 <= id_ < numres: decoded_ids.append(RESERVED_TOKENS_BYTES[int(id_)]) else: decoded_ids.append(int2byte(id_ - numres)) # Python3: join byte arrays and then decode string return decoded_ids @property def vocab_size(self): return 2 ** 8 + self._num_reserved_ids class ClassLabelEncoder(TextEncoder): """Encoder for class labels.""" def __init__(self, class_labels=None, class_labels_fname=None): super(ClassLabelEncoder, self).__init__(num_reserved_ids=0) if class_labels_fname: with tf.gfile.Open(class_labels_fname) as f: class_labels = [label.strip() for label in f.readlines()] assert class_labels self._class_labels = class_labels def encode(self, s): label_str = s return self._class_labels.index(label_str) def decode(self, ids, strip_extraneous=False): del strip_extraneous label_id = ids if isinstance(label_id, list): assert len(label_id) == 1 label_id, = label_id if isinstance(label_id, np.ndarray): label_id = np.squeeze(label_id) return self._class_labels[label_id] def decode_list(self, ids): return [self._class_labels[i] for i in ids] @property def vocab_size(self): return len(self._class_labels) class OneHotClassLabelEncoder(ClassLabelEncoder): """One-hot encoder for class labels.""" def encode(self, label_str, on_value=1, off_value=0): # pylint: disable=arguments-differ e = np.full(self.vocab_size, off_value, dtype=np.int32) e[self._class_labels.index(label_str)] = on_value return e.tolist() def decode(self, ids, strip_extraneous=False): del strip_extraneous label_id = ids if isinstance(label_id, np.ndarray): label_id = np.squeeze(label_id).astype(np.int8).tolist() assert isinstance(label_id, list) assert len(label_id) == self.vocab_size return self._class_labels[label_id.index(1)] @property def vocab_size(self): return len(self._class_labels) class TokenTextEncoder(TextEncoder): """Encoder based on a user-supplied vocabulary (file or list).""" def __init__(self, vocab_filename, reverse=False, vocab_list=None, replace_oov=None, num_reserved_ids=NUM_RESERVED_TOKENS): """Initialize from a file or list, one token per line. Handling of reserved tokens works as follows: - When initializing from a list, we add reserved tokens to the vocab. - When initializing from a file, we do not add reserved tokens to the vocab. - When saving vocab files, we save reserved tokens to the file. Args: vocab_filename: If not None, the full filename to read vocab from. If this is not None, then vocab_list should be None. reverse: Boolean indicating if tokens should be reversed during encoding and decoding. vocab_list: If not None, a list of elements of the vocabulary. If this is not None, then vocab_filename should be None. replace_oov: If not None, every out-of-vocabulary token seen when encoding will be replaced by this string (which must be in vocab). num_reserved_ids: Number of IDs to save for reserved tokens like <EOS>. """ super(TokenTextEncoder, self).__init__(num_reserved_ids=num_reserved_ids) self._reverse = reverse self._replace_oov = replace_oov if vocab_filename: self._init_vocab_from_file(vocab_filename) else: assert vocab_list is not None self._init_vocab_from_list(vocab_list) def encode(self, s): """Converts a space-separated string of tokens to a list of ids.""" sentence = s tokens = sentence.strip().split() if self._replace_oov is not None: tokens = [t if t in self._token_to_id else self._replace_oov for t in tokens] ret = [self._token_to_id[tok] for tok in tokens] return ret[::-1] if self._reverse else ret def decode(self, ids, strip_extraneous=False): return " ".join(self.decode_list(ids)) def decode_list(self, ids): seq = reversed(ids) if self._reverse else ids return [self._safe_id_to_token(i) for i in seq] @property def vocab_size(self): return len(self._id_to_token) def _safe_id_to_token(self, idx): return self._id_to_token.get(idx, "ID_%d" % idx) def _init_vocab_from_file(self, filename): """Load vocab from a file. Args: filename: The file to load vocabulary from. """ with tf.gfile.Open(filename) as f: tokens = [token.strip() for token in f.readlines()] def token_gen(): for token in tokens: yield token self._init_vocab(token_gen(), add_reserved_tokens=False) def _init_vocab_from_list(self, vocab_list): """Initialize tokens from a list of tokens. It is ok if reserved tokens appear in the vocab list. They will be removed. The set of tokens in vocab_list should be unique. Args: vocab_list: A list of tokens. """ def token_gen(): for token in vocab_list: if token not in RESERVED_TOKENS: yield token self._init_vocab(token_gen()) def _init_vocab(self, token_generator, add_reserved_tokens=True): """Initialize vocabulary with tokens from token_generator.""" self._id_to_token = {} non_reserved_start_index = 0 if add_reserved_tokens: self._id_to_token.update(enumerate(RESERVED_TOKENS)) non_reserved_start_index = len(RESERVED_TOKENS) self._id_to_token.update( enumerate(token_generator, start=non_reserved_start_index)) # _token_to_id is the reverse of _id_to_token self._token_to_id = dict((v, k) for k, v in six.iteritems(self._id_to_token)) def store_to_file(self, filename): """Write vocab file to disk. Vocab files have one token per line. The file ends in a newline. Reserved tokens are written to the vocab file as well. Args: filename: Full path of the file to store the vocab to. """ with tf.gfile.Open(filename, "w") as f: for i in range(len(self._id_to_token)): f.write(self._id_to_token[i] + "\n") def _escape_token(token, alphabet): """Escape away underscores and OOV characters and append '_'. This allows the token to be expressed as the concatenation of a list of subtokens from the vocabulary. The underscore acts as a sentinel which allows us to invertibly concatenate multiple such lists. Args: token: A unicode string to be escaped. alphabet: A set of all characters in the vocabulary's alphabet. Returns: escaped_token: An escaped unicode string. Raises: ValueError: If the provided token is not unicode. """ if not isinstance(token, six.text_type): raise ValueError("Expected string type for token, got %s" % type(token)) token = token.replace(u"\\", u"\\\\").replace(u"_", u"\\u") # 没见过的词用 ord()ASCII值 代替? ret = [c if c in alphabet and c != u"\n" else r"\%d;" % ord(c) for c in token] return u"".join(ret) + "_" def _unescape_token(escaped_token): """Inverse of _escape_token(). Args: escaped_token: a unicode string Returns: token: a unicode string """ def match(m): if m.group(1) is None: return u"_" if m.group(0) == u"\\u" else u"\\" try: return six.unichr(int(m.group(1))) except (ValueError, OverflowError) as _: return u"\u3013" # Unicode for undefined character. trimmed = escaped_token[:-1] if escaped_token.endswith("_") else escaped_token return _UNESCAPE_REGEX.sub(match, trimmed) class SubwordTextEncoder(TextEncoder): """Class for invertibly encoding text using a limited vocabulary. Invertibly encodes a native string as a sequence of subtokens from a limited vocabulary. A SubwordTextEncoder is built from a corpus (so it is tailored to the text in the corpus), and stored to a file. See text_encoder_build_subword.py. It can then be loaded and used to encode/decode any text. Encoding has four phases: 1. Tokenize into a list of tokens. Each token is a unicode string of either all alphanumeric characters or all non-alphanumeric characters. We drop tokens consisting of a single space that are between two alphanumeric tokens. 2. Escape each token. This escapes away special and out-of-vocabulary characters, and makes sure that each token ends with an underscore, and has no other underscores. 3. Represent each escaped token as a the concatenation of a list of subtokens from the limited vocabulary. Subtoken selection is done greedily from beginning to end. That is, we construct the list in order, always picking the longest subtoken in our vocabulary that matches a prefix of the remaining portion of the encoded token. 4. Concatenate these lists. This concatenation is invertible due to the fact that the trailing underscores indicate when one list is finished. """ def __init__(self, filename=None): """Initialize and read from a file, if provided. Args: filename: filename from which to read vocab. If None, do not load a vocab """ self._alphabet = set() self.filename = filename if filename is not None: self._load_from_file(filename) super(SubwordTextEncoder, self).__init__() def encode(self, s): """Converts a native string to a list of subtoken ids. Args: s: a native string. Returns: a list of integers in the range [0, vocab_size) """ return self._tokens_to_subtoken_ids( tokenizer.encode(native_to_unicode(s))) def encode_without_tokenizing(self, token_text): """Converts string to list of subtoken ids without calling tokenizer. This treats `token_text` as a single token and directly converts it to subtoken ids. This may be useful when the default tokenizer doesn't do what we want (e.g., when encoding text with tokens composed of lots of nonalphanumeric characters). It is then up to the caller to make sure that raw text is consistently converted into tokens. Only use this if you are sure that `encode` doesn't suit your needs. Args: token_text: A native string representation of a single token. Returns: A list of subword token ids; i.e., integers in the range [0, vocab_size). """ return self._tokens_to_subtoken_ids([native_to_unicode(token_text)]) def decode(self, ids, strip_extraneous=False): """Converts a sequence of subtoken ids to a native string. Args: ids: a list of integers in the range [0, vocab_size) strip_extraneous: bool, whether to strip off extraneous tokens (EOS and PAD). Returns: a native string """ if strip_extraneous: ids = strip_ids(ids, list(range(self._num_reserved_ids or 0))) return unicode_to_native( tokenizer.decode(self._subtoken_ids_to_tokens(ids))) def decode_list(self, ids): return [self._subtoken_id_to_subtoken_string(s) for s in ids] @property def vocab_size(self): """The subtoken vocabulary size.""" return len(self._all_subtoken_strings) def _tokens_to_subtoken_ids(self, tokens): """Converts a list of tokens to a list of subtoken ids. Args: tokens: a list of strings. Returns: a list of integers in the range [0, vocab_size) """ ret = [] for token in tokens: ret.extend(self._token_to_subtoken_ids(token)) return ret def _token_to_subtoken_ids(self, token): """Converts token to a list of subtoken ids. Args: token: a string. Returns: a list of integers in the range [0, vocab_size) """ cache_location = hash(token) % self._cache_size cache_key, cache_value = self._cache[cache_location] if cache_key == token: return cache_value ret = self._escaped_token_to_subtoken_ids( _escape_token(token, self._alphabet)) self._cache[cache_location] = (token, ret) return ret def _subtoken_ids_to_tokens(self, subtokens): """Converts a list of subtoken ids to a list of tokens. Args: subtokens: a list of integers in the range [0, vocab_size) Returns: a list of strings. """ concatenated = "".join( [self._subtoken_id_to_subtoken_string(s) for s in subtokens]) split = concatenated.split("_") ret = [] for t in split: if t: unescaped = _unescape_token(t + "_") if unescaped: ret.append(unescaped) return ret def _subtoken_id_to_subtoken_string(self, subtoken): """Converts a subtoken integer ID to a subtoken string.""" if 0 <= subtoken < self.vocab_size: return self._all_subtoken_strings[subtoken] return u"" def _escaped_token_to_subtoken_strings(self, escaped_token): """Converts an escaped token string to a list of subtoken strings. Args: escaped_token: An escaped token as a unicode string. Returns: A list of subtokens as unicode strings. """ # NOTE: This algorithm is greedy; it won't necessarily produce the "best" # list of subtokens. ret = [] start = 0 token_len = len(escaped_token) while start < token_len: for end in range( min(token_len, start + self._max_subtoken_len), start, -1): # 应该是说先按取整个字符串,如果当前的字符串满足要求就使用,不满足要求居缩小 subtoken = escaped_token[start:end] if subtoken in self._subtoken_string_to_id: ret.append(subtoken) start = end break else: # Did not break # If there is no possible encoding of the escaped token then one of the # characters in the token is not in the alphabet. This should be # impossible and would be indicative of a bug. assert False, "Token substring not found in subtoken vocabulary." return ret def _escaped_token_to_subtoken_ids(self, escaped_token): """Converts an escaped token string to a list of subtoken IDs. Args: escaped_token: An escaped token as a unicode string. Returns: A list of subtoken IDs as integers. """ return [ self._subtoken_string_to_id[subtoken] for subtoken in self._escaped_token_to_subtoken_strings(escaped_token) ] @classmethod def build_from_generator(cls, generator, target_size, max_subtoken_length=None, reserved_tokens=None): """Builds a SubwordTextEncoder from the generated text. Args: generator: yields text. target_size: int, approximate vocabulary size to create. max_subtoken_length: Maximum length of a subtoken. If this is not set, then the runtime and memory use of creating the vocab is quadratic in the length of the longest token. If this is set, then it is instead O(max_subtoken_length * length of longest token). reserved_tokens: List of reserved tokens. The global variable `RESERVED_TOKENS` must be a prefix of `reserved_tokens`. If this argument is `None`, it will use `RESERVED_TOKENS`. Returns: SubwordTextEncoder with `vocab_size` approximately `target_size`. """ # 计算 token 的一个字典,key 是 token value 是 token 的数量 token_counts = collections.defaultdict(int) for item in generator: for tok in tokenizer.encode(native_to_unicode(item)): token_counts[tok] += 1 encoder = cls.build_to_target_size( target_size, token_counts, 1, 1e3, max_subtoken_length=max_subtoken_length, reserved_tokens=reserved_tokens) return encoder @classmethod def build_to_target_size(cls, target_size, token_counts, min_val, max_val, max_subtoken_length=None, reserved_tokens=None, num_iterations=4): """ # 理解这句话: `vocab_size` near `target_size` 使得生成的 vocab 数据接近 target size Builds a SubwordTextEncoder that has `vocab_size` near `target_size`. 使用 二分法递归搜索 Uses simple recursive binary search to find a minimum token count that most closely matches the `target_size`. Args: target_size: Desired vocab_size to approximate. token_counts: A dictionary of token counts, mapping string to int. min_val: An integer; lower bound for the minimum token count. max_val: An integer; upper bound for the minimum token count. max_subtoken_length: Maximum length of a subtoken. If this is not set, then the runtime and memory use of creating the vocab is quadratic in the length of the longest token. If this is set, then it is instead O(max_subtoken_length * length of longest token). reserved_tokens: List of reserved tokens. The global variable `RESERVED_TOKENS` must be a prefix of `reserved_tokens`. If this argument is `None`, it will use `RESERVED_TOKENS`. num_iterations: An integer; how many iterations of refinement. Returns: A SubwordTextEncoder instance. Raises: ValueError: If `min_val` is greater than `max_val`. """ if min_val > max_val: raise ValueError("Lower bound for the minimum token count " "is greater than the upper bound.") if target_size < 1: raise ValueError("Target size must be positive.") if reserved_tokens is None: reserved_tokens = RESERVED_TOKENS def bisect(min_val, max_val): """ Bisection to find the right size.""" present_count = (max_val + min_val) // 2 tf.logging.info("Trying min_count %d" % present_count) subtokenizer = cls() subtokenizer.build_from_token_counts( token_counts, present_count, num_iterations, max_subtoken_length=max_subtoken_length, reserved_tokens=reserved_tokens) # Being within 1% of the target size is ok. is_ok = abs(subtokenizer.vocab_size - target_size) * 100 < target_size # If min_val == max_val, we can't do any better than this. if is_ok or min_val >= max_val or present_count < 2: return subtokenizer if subtokenizer.vocab_size > target_size: other_subtokenizer = bisect(present_count + 1, max_val) else: other_subtokenizer = bisect(min_val, present_count - 1) if other_subtokenizer is None: return subtokenizer if (abs(other_subtokenizer.vocab_size - target_size) < abs(subtokenizer.vocab_size - target_size)): return other_subtokenizer return subtokenizer return bisect(min_val, max_val) def build_from_token_counts(self, token_counts, min_count, num_iterations=4, reserved_tokens=None, max_subtoken_length=None): """Train a SubwordTextEncoder based on a dictionary of word counts. Args: token_counts: a dictionary of Unicode strings to int. min_count: an integer - discard subtokens with lower counts. num_iterations: an integer. how many iterations of refinement. reserved_tokens: List of reserved tokens. The global variable `RESERVED_TOKENS` must be a prefix of `reserved_tokens`. If this argument is `None`, it will use `RESERVED_TOKENS`. max_subtoken_length: Maximum length of a subtoken. If this is not set, then the runtime and memory use of creating the vocab is quadratic in the length of the longest token. If this is set, then it is instead O(max_subtoken_length * length of longest token). Raises: ValueError: if reserved is not 0 or len(RESERVED_TOKENS). In this case, it is not clear what the space is being reserved for, or when it will be filled in. """ if reserved_tokens is None: reserved_tokens = RESERVED_TOKENS else: # There is not complete freedom in replacing RESERVED_TOKENS. for default, proposed in zip(RESERVED_TOKENS, reserved_tokens): if default != proposed: raise ValueError("RESERVED_TOKENS must be a prefix of " "reserved_tokens.") # Initialize the alphabet. Note, this must include reserved tokens or it can # result in encoding failures. # 这个只是提取所有的 key? alphabet_tokens = chain(six.iterkeys(token_counts), [native_to_unicode(t) for t in reserved_tokens]) # 按照 key 进行字母排序? # 生成所有的字母 + self._init_alphabet_from_tokens(alphabet_tokens) # Bootstrap the initial list of subtokens with the characters from the # alphabet plus the escaping characters. # 这里没有看懂? 觉得这个 _alphabet 是一个 character 的 list, 不是 subtoken self._init_subtokens_from_list(list(self._alphabet), reserved_tokens=reserved_tokens) # We build iteratively. On each iteration, we segment all the words, # then count the resulting potential subtokens, keeping the ones # with high enough counts for our new vocabulary. if min_count < 1: min_count = 1 for i in range(num_iterations): tf.logging.info("Iteration {0}".format(i)) # Collect all substrings of the encoded token that break along current # subtoken boundaries. subtoken_counts = collections.defaultdict(int) for token, count in six.iteritems(token_counts): iter_start_time = time.time() # token 这里表示的是一个词, _alphabet 表示的是一个字母表 escaped_token = _escape_token(token, self._alphabet) # 这里面的一些思路没有看明白... 主要是 self._subtoken_string_to_id, 这里明明就是 character 的集合 # 那么导出来的都是 character? subtokens = self._escaped_token_to_subtoken_strings(escaped_token) # 虽然看懂了这部分逻辑,但是还是不懂在做啥 start = 0 for subtoken in subtokens: # last_position: 当前遍历的最后一个点 last_position = len(escaped_token) + 1 # 如果设定了某个 token 的最大长度,则 last_position 则是 当前位置加上最大长度 max_subtoken_length if max_subtoken_length is not None: last_position = min(last_position, start + max_subtoken_length) # for end in range(start + 1, last_position): new_subtoken = escaped_token[start:end] subtoken_counts[new_subtoken] += count start += len(subtoken) iter_time_secs = time.time() - iter_start_time if iter_time_secs > 0.1: tf.logging.info(u"Processing token [{0}] took {1} seconds, consider " "setting Text2TextProblem.max_subtoken_length to a " "smaller value.".format(token, iter_time_secs)) # Array of sets of candidate subtoken strings, by length. len_to_subtoken_strings = [] for subtoken_string, count in six.iteritems(subtoken_counts): lsub = len(subtoken_string) if count >= min_count: while len(len_to_subtoken_strings) <= lsub: len_to_subtoken_strings.append(set()) len_to_subtoken_strings[lsub].add(subtoken_string) # Consider the candidates longest to shortest, so that if we accept # a longer subtoken string, we can decrement the counts of its prefixes. new_subtoken_strings = [] for lsub in range(len(len_to_subtoken_strings) - 1, 0, -1): subtoken_strings = len_to_subtoken_strings[lsub] for subtoken_string in subtoken_strings: count = subtoken_counts[subtoken_string] if count >= min_count: # Exclude alphabet tokens here, as they must be included later, # explicitly, regardless of count. if subtoken_string not in self._alphabet: new_subtoken_strings.append((count, subtoken_string)) for l in range(1, lsub): subtoken_counts[subtoken_string[:l]] -= count # Include the alphabet explicitly to guarantee all strings are encodable. new_subtoken_strings.extend((subtoken_counts.get(a, 0), a) for a in self._alphabet) new_subtoken_strings.sort(reverse=True) # Reinitialize to the candidate vocabulary. new_subtoken_strings = [subtoken for _, subtoken in new_subtoken_strings] if reserved_tokens: escaped_reserved_tokens = [ _escape_token(native_to_unicode(t), self._alphabet) for t in reserved_tokens ] new_subtoken_strings = escaped_reserved_tokens + new_subtoken_strings self._init_subtokens_from_list(new_subtoken_strings) tf.logging.info("vocab_size = %d" % self.vocab_size) @property def all_subtoken_strings(self): return tuple(self._all_subtoken_strings) def dump(self): """Debugging dump of the current subtoken vocabulary.""" subtoken_strings = [(i, s) for s, i in six.iteritems(self._subtoken_string_to_id)] print(u", ".join(u"{0} : '{1}'".format(i, s) for i, s in sorted(subtoken_strings))) def _init_subtokens_from_list(self, subtoken_strings, reserved_tokens=None): """ Initialize token information from a list of subtoken strings. Args: subtoken_strings: a list of subtokens # character? but not? reserved_tokens: List of reserved tokens. We must have `reserved_tokens` as None or the empty list, or else the global variable `RESERVED_TOKENS` must be a prefix of `reserved_tokens`. Raises: ValueError: if reserved is not 0 or len(RESERVED_TOKENS). In this case, it is not clear what the space is being reserved for, or when it will be filled in. """ if reserved_tokens is None: reserved_tokens = [] if reserved_tokens: self._all_subtoken_strings = reserved_tokens + subtoken_strings else: self._all_subtoken_strings = subtoken_strings # we remember the maximum length of any subtoken to avoid having to # check arbitrarily long strings. self._max_subtoken_len = max([len(s) for s in subtoken_strings]) self._subtoken_string_to_id = { s: i + len(reserved_tokens) for i, s in enumerate(subtoken_strings) if s } # Initialize the cache to empty. self._cache_size = 2 ** 20 self._cache = [(None, None)] * self._cache_size def _init_alphabet_from_tokens(self, tokens): """Initialize alphabet from an iterable of token or subtoken strings.""" # Include all characters from all tokens in the alphabet to guarantee that # any token can be encoded. Additionally, include all escaping characters. self._alphabet = {c for token in tokens for c in token} self._alphabet |= _ESCAPE_CHARS def _load_from_file_object(self, f): """Load from a file object. Args: f: File object to load vocabulary from """ subtoken_strings = [] for line in f: s = line.strip() # Some vocab files wrap words in single quotes, but others don't if ((s.startswith("'") and s.endswith("'")) or (s.startswith("\"") and s.endswith("\""))): s = s[1:-1] subtoken_strings.append(native_to_unicode(s)) self._init_subtokens_from_list(subtoken_strings) self._init_alphabet_from_tokens(subtoken_strings) def _load_from_file(self, filename): """Load from a vocab file.""" if not tf.gfile.Exists(filename): raise ValueError("File %s not found" % filename) with tf.gfile.Open(filename) as f: self._load_from_file_object(f) def store_to_file(self, filename, add_single_quotes=True): with tf.gfile.Open(filename, "w") as f: for subtoken_string in self._all_subtoken_strings: if add_single_quotes: f.write("'" + unicode_to_native(subtoken_string) + "'\n") else: f.write(unicode_to_native(subtoken_string) + "\n") class ImageEncoder(object): """Encoder class for saving and loading images.""" def __init__(self, num_reserved_ids=0, height=None, width=None, channels=3): assert num_reserved_ids == 0 self._height = height self._width = width self._channels = channels @property def num_reserved_ids(self): return 0 def encode(self, s): """Transform a string with a filename into a list of RGB integers. Args: s: path to the file with an image. Returns: ids: list of integers """ try: import matplotlib.image as im # pylint: disable=g-import-not-at-top except ImportError as e: tf.logging.warning( "Reading an image requires matplotlib to be installed: %s", e) raise NotImplementedError("Image reading not implemented.") return im.imread(s) def decode(self, ids, strip_extraneous=False): """Transform a sequence of int ids into an image file. Args: ids: list of integers to be converted. strip_extraneous: unused Returns: Path to the temporary file where the image was saved. Raises: ValueError: if the ids are not of the appropriate size. """ del strip_extraneous _, tmp_file_path = tempfile.mkstemp("_decode.png") if self._height is None or self._width is None: size = int(math.sqrt(len(ids) / self._channels)) length = size * size * self._channels else: size = None length = self._height * self._width * self._channels if len(ids) != length: raise ValueError("Length of ids (%d) must be height (%d) x width (%d) x " "channels (%d); %d != %d.\n Ids: %s" % (len(ids), self._height, self._width, self._channels, len(ids), length, " ".join([str(i) for i in ids]))) with tf.Graph().as_default(): raw = tf.constant(ids, dtype=tf.uint8) if size is None: img = tf.reshape(raw, [self._height, self._width, self._channels]) else: img = tf.reshape(raw, [size, size, self._channels]) png = tf.image.encode_png(img) op = tf.write_file(tmp_file_path, png) with tf.Session() as sess: sess.run(op) return tmp_file_path def decode_list(self, ids): """Transform a sequence of int ids into an image file. Args: ids: list of integers to be converted. Returns: Singleton list: path to the temporary file where the image was saved. """ return [self.decode(ids)] @property def vocab_size(self): return 256 class RealEncoder(object): """Encoder class for saving and loading float values.""" def encode(self, s): """Transform a string (space separated float values) into a float array. Args: s: space separated float values. Returns: Array of float values. """ return [float(w) for w in s.split()] def decode(self, ids, strip_extraneous=False): """Transform sequence of float values into string (float values). Args: ids: array of floats to be converted. strip_extraneous: unused Returns: String having space separated float values. Raises: ValueError: if the ids are not of the appropriate size. """ del strip_extraneous return " ".join([str(i) for i in ids])
38.037665
93
0.614863
7940c9b8c0fc7a3e1e67b6fb4618a0a6ee7bc85d
123
py
Python
codes_auto/1359.circular-permutation-in-binary-representation.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
codes_auto/1359.circular-permutation-in-binary-representation.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
codes_auto/1359.circular-permutation-in-binary-representation.py
smartmark-pro/leetcode_record
6504b733d892a705571eb4eac836fb10e94e56db
[ "MIT" ]
null
null
null
# # @lc app=leetcode.cn id=1359 lang=python3 # # [1359] circular-permutation-in-binary-representation # None # @lc code=end
17.571429
54
0.731707
7940ca1830e4fc51366def626a59bb08921f880b
81
py
Python
src/checkin/utils.py
FSU-ACM/Programming-Contest-Suite
459b03992aa3df3d8bc5a04b0b6ee24c3055f51f
[ "MIT" ]
1
2021-12-14T16:30:11.000Z
2021-12-14T16:30:11.000Z
src/checkin/utils.py
FSU-ACM/Programming-Contest-Suite
459b03992aa3df3d8bc5a04b0b6ee24c3055f51f
[ "MIT" ]
18
2021-12-19T01:20:59.000Z
2022-03-22T00:27:15.000Z
src/checkin/utils.py
FSU-ACM/Programming-Contest-Suite
459b03992aa3df3d8bc5a04b0b6ee24c3055f51f
[ "MIT" ]
1
2022-03-04T04:19:51.000Z
2022-03-04T04:19:51.000Z
def checkin_auth(user): return user.profile.is_volunteer() or user.is_superuser
27
56
0.814815
7940cab69bdced061ff816afbf40c8ef43820264
4,668
py
Python
test.py
MattFerraro/radon
795b74fd7d12e7c4a191646e6bdf9e0386c8e95e
[ "Apache-2.0" ]
2
2018-11-08T03:30:55.000Z
2021-09-19T01:40:14.000Z
test.py
MattFerraro/radon
795b74fd7d12e7c4a191646e6bdf9e0386c8e95e
[ "Apache-2.0" ]
null
null
null
test.py
MattFerraro/radon
795b74fd7d12e7c4a191646e6bdf9e0386c8e95e
[ "Apache-2.0" ]
1
2018-12-30T04:07:17.000Z
2018-12-30T04:07:17.000Z
# import numpy as np # import matplotlib.pyplot as plt # # Number of samplepoints # N = 600 # # sample spacing # T = 1.0 / 800.0 # x = np.linspace(0.0, N*T, N) # y = np.sin(50.0 * 2.0 * np.pi * x) + 0.5 * np.sin(80.0 * 2.0 * np.pi * x) # # yf = numpy # # xf = np.linspace(0.0, 1.0/(2.0*T), N/2) # ft = np.fft.rfft(y) # print ft # plt.plot(ft) # # fig, ax = plt.subplots() # # ax.plot(xf, 2.0/N * np.abs(yf[:N/2])) # plt.show() import pylab import numpy import math # see: http://glowingpython.blogspot.com/2011/08/how-to-plot-frequency-spectrum-with.html # and # http://docs.scipy.org/doc/numpy/reference/routines.fft.html # Since our input data is real, the negative frequency components # don't include any new information, and are not interesting to us. # The rfft routines understand this, and rfft takes n real points and # returns n/2+1 complex output points. The corresponding inverse # knows this, and acts accordingly. # # these are the routines we want for real valued data # # note that the scipy version of rfft returns that data differently # # M. Zingale (2013-03-03) def singleFreqSine(npts): # a pure sine with no phase shift will result in pure imaginary # signal f_0 = 0.2 xmax = 10.0/f_0 xx = numpy.linspace(0.0, xmax, npts, endpoint=False) # input frequency f_0 = 0.2 f = numpy.sin(2.0*math.pi*f_0*xx) return xx, f def singleFreqSinePlusShift(npts): # a pure sine with no phase shift will result in pure imaginary # signal f_0 = 0.2 xmax = 10.0/f_0 xx = numpy.linspace(0.0, xmax, npts, endpoint=False) # input frequency f_0 = 0.2 f = numpy.sin(2.0*math.pi*f_0*xx + math.pi/4) return xx, f def twoFreqSine(npts): # a pure sine with no phase shift will result in pure imaginary # signal f_0 = 0.2 f_1 = 0.5 xmax = 10.0/f_0 xx = numpy.linspace(0.0, xmax, npts, endpoint=False) # input frequency f_0 = 0.2 f = 0.5*(numpy.sin(2.0*math.pi*f_0*xx) + numpy.sin(2.0*math.pi*f_1*xx)) return xx, f def singleFreqCosine(npts): # a pure cosine with no phase shift will result in pure real # signal f_0 = 0.2 xmax = 10.0/f_0 xx = numpy.linspace(0.0, xmax, npts, endpoint=False) # input frequency f_0 = 0.2 f = numpy.cos(2.0*math.pi*f_0*xx) return xx, f def plotFFT(xx, f, outfile): pylab.clf() pylab.rc("font", size=9) npts = len(xx) # Forward transform: f(x) -> F(k) fk = numpy.fft.rfft(f) # Normalization -- the '2' here comes from the fact that we are # neglecting the negative portion of the frequency space, since # the FFT of a real function contains redundant information, so # we are only dealing with 1/2 of the frequency space. norm = 2.0/npts fk = fk*norm # element 0 of fk is the DC component -- we don't want to plot that fk_r = fk.real fk_i = fk.imag # the fftfreq returns the postive and negative (and 0) frequencies # the newer versions of numpy (>=1.8) have an rfftfreq() function # that really does what we want. k = numpy.fft.fftfreq(len(xx))[range(0, npts/2+1)] # the last element is negative, because of the symmetry, but should # be positive (see # http://docs.scipy.org/doc/numpy-dev/reference/generated/numpy.fft.rfftfreq.html) k[-1] *= -1 kfreq = k*npts/max(xx) # Inverse transform: F(k) -> f(x) -- without the normalization fkinv = numpy.fft.irfft(fk/norm) pylab.subplot(411) pylab.plot(xx, f) pylab.xlabel("x") pylab.ylabel("f(x)") pylab.subplot(412) pylab.plot(kfreq, fk_r, label=r"Re($\mathcal{F}$)") pylab.plot(kfreq, fk_i, ls=":", label=r"Im($\mathcal{F}$)") pylab.xlabel(r"$\nu_k$") pylab.ylabel("F(k)") pylab.legend(fontsize="small", frameon=False) pylab.subplot(413) pylab.plot(kfreq, numpy.abs(fk)) pylab.xlabel(r"$\nu_k$") pylab.ylabel(r"|F(k)|") pylab.subplot(414) pylab.plot(xx, fkinv.real) pylab.xlabel(r"$\nu_k$") pylab.ylabel(r"inverse F(k)") pylab.tight_layout() pylab.savefig(outfile) #----------------------------------------------------------------------------- def main(): npts = 256 # FFT of sine xx, f = singleFreqSine(npts) plotFFT(xx, f, "fft-sine.png") # FFT of cosine xx, f = singleFreqCosine(npts) plotFFT(xx, f, "fft-cosine.png") # FFT of sine with pi/4 phase xx, f = singleFreqSinePlusShift(npts) plotFFT(xx, f, "fft-sine-phase.png") # FFT of two sines xx, f = twoFreqSine(npts) plotFFT(xx, f, "fft-two-sines.png") if __name__ == '__main__': main()
22.123223
89
0.618895
7940cc446fa241c1fc0c5af5ee43d9c714d9f37b
3,095
py
Python
setup.py
wfarah/psrdada-python
d74aa784a49975c329b983c82dcfd1918dfd7736
[ "Apache-2.0" ]
4
2019-06-26T03:51:30.000Z
2020-09-22T23:26:08.000Z
setup.py
wfarah/psrdada-python
d74aa784a49975c329b983c82dcfd1918dfd7736
[ "Apache-2.0" ]
2
2020-07-31T22:23:12.000Z
2020-10-06T18:45:02.000Z
setup.py
TRASAL/psrdada-python
977cb6c6501998082d6f836f8103c0a8fcf35485
[ "Apache-2.0" ]
3
2020-01-13T19:36:06.000Z
2020-09-22T23:37:28.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup script for the PSRDada python bindings. Build and install the package using distutils. """ # pylint: disable=all from Cython.Build import cythonize from setuptools import setup from distutils.extension import Extension from os import environ, path with open('README.md') as readme_file: README = readme_file.read() with open(path.join('psrdada', '__version__.py')) as version_file: version = {} exec(version_file.read(), version) PROJECT_VERSION = version['__version__'] # Get the header locations from the environment INCLUDE_DIRS = [] if "CPATH" in environ: flags = environ["CPATH"].split(':') for flag in flags: # when usingn spack, there is no -I prefix INCLUDE_DIRS.append(flag) if "CFLAGS" in environ: flags = environ["CFLAGS"].split(' ') for flag in flags: if flag[0:2] == '-I': # when usingn spack, there is no -I prefix INCLUDE_DIRS.append(flag[2:-1]) # keep the original order INCLUDE_DIRS.reverse() # Get the header locations from the environment LIBRARY_DIRS = [] if "LD_LIBRARY_PATH" in environ: flags = environ["LD_LIBRARY_PATH"].split(':') for flag in flags: # when usingn spack, there is no -I prefix LIBRARY_DIRS.append(flag) # keep the original order LIBRARY_DIRS.reverse() EXTENSIONS = [ Extension( "psrdada.ringbuffer", ["psrdada/ringbuffer.pyx"], libraries=["psrdada"], library_dirs=LIBRARY_DIRS, include_dirs=INCLUDE_DIRS ), Extension( "psrdada.reader", ["psrdada/reader.pyx"], libraries=["psrdada"], library_dirs=LIBRARY_DIRS, include_dirs=INCLUDE_DIRS ), Extension( "psrdada.writer", ["psrdada/writer.pyx"], libraries=["psrdada"], library_dirs=LIBRARY_DIRS, include_dirs=INCLUDE_DIRS ), Extension( "psrdada.viewer", ["psrdada/viewer.pyx"], libraries=["psrdada"], library_dirs=LIBRARY_DIRS, include_dirs=INCLUDE_DIRS ), ] setup( name='psrdada', version=PROJECT_VERSION, description="Python3 bindings to the ringbuffer implementation in PSRDada", long_description=README + '\n\n', author="Jisk Attema", author_email='[email protected]', url='https://github.com/NLeSC/psrdada-python', packages=['psrdada',], package_dir={'psrdada': 'psrdada'}, include_package_data=True, license="Apache Software License 2.0", zip_safe=False, keywords='psrdada', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', "Programming Language :: Python :: 2", 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', ], test_suite='tests', ext_modules=cythonize(EXTENSIONS), )
28.136364
79
0.634249
7940cc77c0eab60d114bf6b0fc6027661ca2dfff
1,254
py
Python
pipelines/ner_demo_replace/scripts/create_config.py
dogatekin/projects
4fa445a165de30c7e7877e17dc7fe8bea12b8198
[ "MIT" ]
null
null
null
pipelines/ner_demo_replace/scripts/create_config.py
dogatekin/projects
4fa445a165de30c7e7877e17dc7fe8bea12b8198
[ "MIT" ]
null
null
null
pipelines/ner_demo_replace/scripts/create_config.py
dogatekin/projects
4fa445a165de30c7e7877e17dc7fe8bea12b8198
[ "MIT" ]
null
null
null
import typer from pathlib import Path import spacy def create_config(model_name: str, component_to_replace: str, output_path: Path): nlp = spacy.load(model_name) # replace the component with a new default component nlp.remove_pipe(component_to_replace) nlp.add_pipe(component_to_replace) # create a new config as a copy of the loaded pipeline's config config = nlp.config.copy() # revert most training settings to the current defaults default_config = spacy.blank(nlp.lang).config config["corpora"] = default_config["corpora"] config["training"] = default_config["training"] # set the vectors if the loaded pipeline has vectors if len(nlp.vocab.vectors) > 0: config["paths"]["vectors"] = model_name # source all components from the loaded pipeline and freeze all except the # component to replace config["training"]["frozen_components"] = [] for pipe_name in nlp.component_names: config["components"][pipe_name] = {"source": model_name} if pipe_name != component_to_replace: config["training"]["frozen_components"].append(pipe_name) # save the config config.to_disk(output_path) if __name__ == "__main__": typer.run(create_config)
31.35
81
0.708134
7940cca3a75b3f0d970913bb741f0006a02e36fe
1,232
py
Python
test/board_test.py
hr23232323/gomoku-ML-AI
9766427b4885ffb171072fc4e4106b7b34faff8c
[ "MIT" ]
1
2018-03-22T05:22:58.000Z
2018-03-22T05:22:58.000Z
test/board_test.py
hr23232323/gomoku-ML-AI
9766427b4885ffb171072fc4e4106b7b34faff8c
[ "MIT" ]
null
null
null
test/board_test.py
hr23232323/gomoku-ML-AI
9766427b4885ffb171072fc4e4106b7b34faff8c
[ "MIT" ]
null
null
null
import pytest from board import Board, Stone from .helpers import run_move_seq def won_games(): col_win = [(3, 3), (3, 4), (4, 3), (4, 4), (5, 3), (5, 4), (6, 3), (6, 4), (7, 3)] row_win = [(3, 3), (4, 3), (3, 4), (4, 4), (3, 5), (4, 5), (3, 6), (4, 6), (3, 7)] diag_win = [(0, 0), (14, 14), (1, 1), (10, 10), (2, 2), (9, 5), (3, 3), (8, 7), (4, 4)] anti_diag_win = [(1, 6), (14, 14), (2, 5), (13, 12), (3, 4), (13, 11), (4, 3), (10, 10), (5, 2)] yield run_move_seq(col_win) yield run_move_seq(row_win) yield run_move_seq(diag_win) yield run_move_seq(anti_diag_win) @pytest.mark.parametrize("game", won_games()) def test_winners(game): print(game) assert game.winner == Stone.black def test_take_move(): b = run_move_seq([(1, 1), (1, 1)], 3, 3) assert b.grid[1][1] == -1 def test_take_move_twice_fail(): with pytest.raises(ValueError): run_move_seq([(1, 1), (1, 1), (1, 1)])
24.64
46
0.413961
7940cce4bdd21c7d181288b692e6fc210fcbdac2
17,906
py
Python
geo_png_tiler/mercantile/__init__.py
sasakiassociates/qgis-geo-png-db
bb71daa68e3721074482944d12f6323ce5136fed
[ "MIT" ]
1
2021-10-01T11:44:59.000Z
2021-10-01T11:44:59.000Z
geo_png_tiler/mercantile/__init__.py
sasakiassociates/qgis-geo-png-db
bb71daa68e3721074482944d12f6323ce5136fed
[ "MIT" ]
null
null
null
geo_png_tiler/mercantile/__init__.py
sasakiassociates/qgis-geo-png-db
bb71daa68e3721074482944d12f6323ce5136fed
[ "MIT" ]
null
null
null
"""Web mercator XYZ tile utilities""" from collections import namedtuple import math import sys import warnings if sys.version_info < (3,): from collections import Sequence else: from collections.abc import Sequence __version__ = "1.1.2" __all__ = [ "Bbox", "LngLat", "LngLatBbox", "Tile", "bounding_tile", "bounds", "children", "feature", "lnglat", "parent", "quadkey", "quadkey_to_tile", "simplify", "tile", "tiles", "ul", "xy_bounds", ] Tile = namedtuple("Tile", ["x", "y", "z"]) """An XYZ web mercator tile Attributes ---------- x, y, z : int x and y indexes of the tile and zoom level z. """ LngLat = namedtuple("LngLat", ["lng", "lat"]) """A longitude and latitude pair Attributes ---------- lng, lat : float Longitude and latitude in decimal degrees east or north. """ LngLatBbox = namedtuple("LngLatBbox", ["west", "south", "east", "north"]) """A geographic bounding box Attributes ---------- west, south, east, north : float Bounding values in decimal degrees. """ Bbox = namedtuple("Bbox", ["left", "bottom", "right", "top"]) """A web mercator bounding box Attributes ---------- left, bottom, right, top : float Bounding values in meters. """ class MercantileError(Exception): """Base exception""" class InvalidLatitudeError(MercantileError): """Raised when math errors occur beyond ~85 degrees N or S""" class InvalidZoomError(MercantileError): """Raised when a zoom level is invalid""" class ParentTileError(MercantileError): """Raised when a parent tile cannot be determined""" class QuadKeyError(MercantileError): """Raised when errors occur in computing or parsing quad keys""" class TileArgParsingError(MercantileError): """Raised when errors occur in parsing a function's tile arg(s)""" def _parse_tile_arg(*args): """parse the *tile arg of module functions Parameters ---------- tile : Tile or sequence of int May be be either an instance of Tile or 3 ints, X, Y, Z. Returns ------- Tile Raises ------ TileArgParsingError """ if len(args) == 1: args = args[0] if len(args) == 3: return Tile(*args) else: raise TileArgParsingError( "the tile argument may have 1 or 3 values. Note that zoom is a keyword-only argument" ) def ul(*tile): """Returns the upper left longitude and latitude of a tile Parameters ---------- tile : Tile or sequence of int May be be either an instance of Tile or 3 ints, X, Y, Z. Returns ------- LngLat Examples -------- >>> ul(Tile(x=0, y=0, z=1)) LngLat(lng=-180.0, lat=85.0511287798066) >>> mercantile.ul(1, 1, 1) LngLat(lng=0.0, lat=0.0) """ tile = _parse_tile_arg(*tile) xtile, ytile, zoom = tile n = 2.0 ** zoom lon_deg = xtile / n * 360.0 - 180.0 lat_rad = math.atan(math.sinh(math.pi * (1 - 2 * ytile / n))) lat_deg = math.degrees(lat_rad) return LngLat(lon_deg, lat_deg) def bounds(*tile): """Returns the bounding box of a tile Parameters ---------- tile : Tile or sequence of int May be be either an instance of Tile or 3 ints, X, Y, Z. Returns ------- LngLatBBox """ tile = _parse_tile_arg(*tile) xtile, ytile, zoom = tile a = ul(xtile, ytile, zoom) b = ul(xtile + 1, ytile + 1, zoom) return LngLatBbox(a[0], b[1], b[0], a[1]) def truncate_lnglat(lng, lat): if lng > 180.0: lng = 180.0 elif lng < -180.0: lng = -180.0 if lat > 90.0: lat = 90.0 elif lat < -90.0: lat = -90.0 return lng, lat def xy(lng, lat, truncate=False): """Convert longitude and latitude to web mercator x, y Parameters ---------- lng, lat : float Longitude and latitude in decimal degrees. truncate : bool, optional Whether to truncate or clip inputs to web mercator limits. Returns ------- x, y : float y will be inf at the North Pole (lat >= 90) and -inf at the South Pole (lat <= -90). """ if truncate: lng, lat = truncate_lnglat(lng, lat) x = 6378137.0 * math.radians(lng) if lat <= -90: y = float("-inf") elif lat >= 90: y = float("inf") else: y = 6378137.0 * math.log(math.tan((math.pi * 0.25) + (0.5 * math.radians(lat)))) return x, y def lnglat(x, y, truncate=False): """Convert web mercator x, y to longitude and latitude Parameters ---------- x, y : float web mercator coordinates in meters. truncate : bool, optional Whether to truncate or clip inputs to web mercator limits. Returns ------- LngLat """ R2D = 180 / math.pi A = 6378137.0 lng, lat = ( x * R2D / A, ((math.pi * 0.5) - 2.0 * math.atan(math.exp(-y / A))) * R2D, ) if truncate: lng, lat = truncate_lnglat(lng, lat) return LngLat(lng, lat) def xy_bounds(*tile): """Get the web mercator bounding box of a tile Parameters ---------- tile : Tile or sequence of int May be be either an instance of Tile or 3 ints, X, Y, Z. Returns ------- Bbox """ tile = _parse_tile_arg(*tile) xtile, ytile, zoom = tile left, top = xy(*ul(xtile, ytile, zoom)) right, bottom = xy(*ul(xtile + 1, ytile + 1, zoom)) return Bbox(left, bottom, right, top) def _tile(lng, lat, zoom, truncate=False): if truncate: lng, lat = truncate_lnglat(lng, lat) lat = math.radians(lat) n = 2.0 ** zoom xtile = (lng + 180.0) / 360.0 * n try: ytile = ( (1.0 - math.log(math.tan(lat) + (1.0 / math.cos(lat))) / math.pi) / 2.0 * n ) except ValueError: raise InvalidLatitudeError( "Y can not be computed for latitude {} radians".format(lat) ) else: return xtile, ytile, zoom def tile(lng, lat, zoom, truncate=False): """Get the tile containing a longitude and latitude Parameters ---------- lng, lat : float A longitude and latitude pair in decimal degrees. zoom : int The web mercator zoom level. truncate : bool, optional Whether or not to truncate inputs to limits of web mercator. Returns ------- Tile """ xtile, ytile, zoom = _tile(lng, lat, zoom, truncate=truncate) xtile = int(math.floor(xtile)) ytile = int(math.floor(ytile)) return Tile(xtile, ytile, zoom) def quadkey(*tile): """Get the quadkey of a tile Parameters ---------- tile : Tile or sequence of int May be be either an instance of Tile or 3 ints, X, Y, Z. Returns ------- str """ tile = _parse_tile_arg(*tile) xtile, ytile, zoom = tile qk = [] for z in range(zoom, 0, -1): digit = 0 mask = 1 << (z - 1) if xtile & mask: digit += 1 if ytile & mask: digit += 2 qk.append(str(digit)) return "".join(qk) def quadkey_to_tile(qk): """Get the tile corresponding to a quadkey Parameters ---------- qk : str A quadkey string. Returns ------- Tile """ if len(qk) == 0: return Tile(0, 0, 0) xtile, ytile = 0, 0 for i, digit in enumerate(reversed(qk)): mask = 1 << i if digit == "1": xtile = xtile | mask elif digit == "2": ytile = ytile | mask elif digit == "3": xtile = xtile | mask ytile = ytile | mask elif digit != "0": warnings.warn( "QuadKeyError will not derive from ValueError in mercantile 2.0.", DeprecationWarning, ) raise QuadKeyError("Unexpected quadkey digit: %r", digit) return Tile(xtile, ytile, i + 1) def tiles(west, south, east, north, zooms, truncate=False): """Get the tiles overlapped by a geographic bounding box Parameters ---------- west, south, east, north : sequence of float Bounding values in decimal degrees. zooms : int or sequence of int One or more zoom levels. truncate : bool, optional Whether or not to truncate inputs to web mercator limits. Yields ------ Tile Notes ----- A small epsilon is used on the south and east parameters so that this function yields exactly one tile when given the bounds of that same tile. """ if truncate: west, south = truncate_lnglat(west, south) east, north = truncate_lnglat(east, north) if west > east: bbox_west = (-180.0, south, east, north) bbox_east = (west, south, 180.0, north) bboxes = [bbox_west, bbox_east] else: bboxes = [(west, south, east, north)] for w, s, e, n in bboxes: # Clamp bounding values. w = max(-180.0, w) s = max(-85.051129, s) e = min(180.0, e) n = min(85.051129, n) if not isinstance(zooms, Sequence): zooms = [zooms] epsilon = 1.0e-9 for z in zooms: llx, lly, llz = _tile(w, s, z) if lly % 1 < epsilon / 10: lly = lly - epsilon urx, ury, urz = _tile(e, n, z) if urx % 1 < epsilon / 10: urx = urx - epsilon # Clamp left x and top y at 0. llx = 0 if llx < 0 else llx ury = 0 if ury < 0 else ury llx, urx, lly, ury = map(lambda x: int(math.floor(x)), [llx, urx, lly, ury]) for i in range(llx, min(urx + 1, 2 ** z)): for j in range(ury, min(lly + 1, 2 ** z)): yield Tile(i, j, z) def parent(*tile, **kwargs): """Get the parent of a tile The parent is the tile of one zoom level lower that contains the given "child" tile. Parameters ---------- tile : Tile or sequence of int May be be either an instance of Tile or 3 ints, X, Y, Z. zoom : int, optional Determines the *zoom* level of the returned parent tile. This defaults to one lower than the tile (the immediate parent). Returns ------- Tile Examples -------- >>> parent(Tile(0, 0, 2)) Tile(x=0, y=0, z=1) >>> parent(Tile(0, 0, 2), zoom=0) Tile(x=0, y=0, z=0) """ tile = _parse_tile_arg(*tile) # zoom is a keyword-only argument. zoom = kwargs.get("zoom", None) if zoom is not None and (tile[2] < zoom or zoom != int(zoom)): raise InvalidZoomError( "zoom must be an integer and less than that of the input tile" ) x, y, z = tile if x != int(x) or y != int(y) or z != int(z): raise ParentTileError("the parent of a non-integer tile is undefined") target_zoom = z - 1 if zoom is None else zoom # Algorithm heavily inspired by https://github.com/mapbox/tilebelt. return_tile = tile while return_tile[2] > target_zoom: xtile, ytile, ztile = return_tile if xtile % 2 == 0 and ytile % 2 == 0: return_tile = Tile(xtile // 2, ytile // 2, ztile - 1) elif xtile % 2 == 0: return_tile = Tile(xtile // 2, (ytile - 1) // 2, ztile - 1) elif not xtile % 2 == 0 and ytile % 2 == 0: return_tile = Tile((xtile - 1) // 2, ytile // 2, ztile - 1) else: return_tile = Tile((xtile - 1) // 2, (ytile - 1) // 2, ztile - 1) return return_tile def children(*tile, **kwargs): """Get the children of a tile The children are ordered: top-left, top-right, bottom-right, bottom-left. Parameters ---------- tile : Tile or sequence of int May be be either an instance of Tile or 3 ints, X, Y, Z. zoom : int, optional Returns all children at zoom *zoom*, in depth-first clockwise winding order. If unspecified, returns the immediate (i.e. zoom + 1) children of the tile. Returns ------- list Examples -------- >>> children(Tile(0, 0, 0)) [Tile(x=0, y=0, z=1), Tile(x=0, y=1, z=1), Tile(x=1, y=0, z=1), Tile(x=1, y=1, z=1)] >>> children(Tile(0, 0, 0), zoom=2) [Tile(x=0, y=0, z=2), Tile(x=0, y=1, z=2), Tile(x=0, y=2, z=2), Tile(x=0, y=3, z=2), ...] """ tile = _parse_tile_arg(*tile) # zoom is a keyword-only argument. zoom = kwargs.get("zoom", None) xtile, ytile, ztile = tile if zoom is not None and (ztile > zoom or zoom != int(zoom)): raise InvalidZoomError( "zoom must be an integer and greater than that of the input tile" ) target_zoom = zoom if zoom is not None else ztile + 1 tiles = [tile] while tiles[0][2] < target_zoom: xtile, ytile, ztile = tiles.pop(0) tiles += [ Tile(xtile * 2, ytile * 2, ztile + 1), Tile(xtile * 2 + 1, ytile * 2, ztile + 1), Tile(xtile * 2 + 1, ytile * 2 + 1, ztile + 1), Tile(xtile * 2, ytile * 2 + 1, ztile + 1), ] return tiles def simplify(tiles): """Reduces the size of the tileset as much as possible by merging leaves into parents. Parameters ---------- tiles : Sequence of tiles to merge. Returns ------- list """ def merge(merge_set): """Checks to see if there are 4 tiles in merge_set which can be merged. If there are, this merges them. This returns a list of tiles, as well as a boolean indicating if any were merged. By repeatedly applying merge, a tileset can be simplified. """ upwards_merge = {} for tile in merge_set: tile_parent = parent(tile) if tile_parent not in upwards_merge: upwards_merge[tile_parent] = set() upwards_merge[tile_parent] |= {tile} current_tileset = [] changed = False for supertile, children in upwards_merge.items(): if len(children) == 4: current_tileset += [supertile] changed = True else: current_tileset += list(children) return current_tileset, changed # Check to see if a tile and its parent both already exist. # If so, discard the child (it's covered in the parent) root_set = set() for tile in tiles: x, y, z = tile supers = [parent(tile, zoom=i) for i in range(z + 1)] for supertile in supers: if supertile in root_set: continue root_set |= {tile} # Repeatedly run merge until no further simplification is possible. is_merging = True while is_merging: root_set, is_merging = merge(root_set) return root_set def rshift(val, n): return (val % 0x100000000) >> n def bounding_tile(*bbox, **kwds): """Get the smallest tile containing a geographic bounding box NB: when the bbox spans lines of lng 0 or lat 0, the bounding tile will be Tile(x=0, y=0, z=0). Parameters ---------- bbox : sequence of float west, south, east, north bounding values in decimal degrees. Returns ------- Tile """ if len(bbox) == 2: bbox += bbox w, s, e, n = bbox truncate = bool(kwds.get("truncate")) if truncate: w, s = truncate_lnglat(w, s) e, n = truncate_lnglat(e, n) # Algorithm ported directly from https://github.com/mapbox/tilebelt. try: tmin = tile(w, s, 32, truncate=truncate) tmax = tile(e, n, 32, truncate=truncate) except InvalidLatitudeError: return Tile(0, 0, 0) cell = tmin[:2] + tmax[:2] z = _getBboxZoom(*cell) if z == 0: return Tile(0, 0, 0) x = rshift(cell[0], (32 - z)) y = rshift(cell[1], (32 - z)) return Tile(x, y, z) def _getBboxZoom(*bbox): MAX_ZOOM = 28 for z in range(0, MAX_ZOOM): mask = 1 << (32 - (z + 1)) if (bbox[0] & mask) != (bbox[2] & mask) or (bbox[1] & mask) != (bbox[3] & mask): return z return MAX_ZOOM def feature( tile, fid=None, props=None, projected="geographic", buffer=None, precision=None ): """Get the GeoJSON feature corresponding to a tile Parameters ---------- tile : Tile or sequence of int May be be either an instance of Tile or 3 ints, X, Y, Z. fid : str, optional A feature id. props : dict, optional Optional extra feature properties. projected : str, optional Non-standard web mercator GeoJSON can be created by passing 'mercator'. buffer : float, optional Optional buffer distance for the GeoJSON polygon. precision : int, optional GeoJSON coordinates will be truncated to this number of decimal places. Returns ------- dict """ west, south, east, north = bounds(tile) if projected == "mercator": west, south = xy(west, south, truncate=False) east, north = xy(east, north, truncate=False) if buffer: west -= buffer south -= buffer east += buffer north += buffer if precision and precision >= 0: west, south, east, north = ( round(v, precision) for v in (west, south, east, north) ) bbox = [min(west, east), min(south, north), max(west, east), max(south, north)] geom = { "type": "Polygon", "coordinates": [ [[west, south], [west, north], [east, north], [east, south], [west, south]] ], } xyz = str(tile) feat = { "type": "Feature", "bbox": bbox, "id": xyz, "geometry": geom, "properties": {"title": "XYZ tile %s" % xyz}, } if props: feat["properties"].update(props) if fid is not None: feat["id"] = fid return feat
25.113604
97
0.558584
7940cd0f1d5cff31f5484717798bb05d88006c56
7,916
py
Python
dataporten/tests/test_parsers.py
frafra/django-dataporten
4236017611e08d08bd810be0beae1b994cb5fc67
[ "MIT" ]
4
2019-01-06T17:56:07.000Z
2021-03-21T19:16:35.000Z
dataporten/tests/test_parsers.py
frafra/django-dataporten
4236017611e08d08bd810be0beae1b994cb5fc67
[ "MIT" ]
9
2019-10-21T17:23:53.000Z
2021-06-10T21:06:25.000Z
dataporten/tests/test_parsers.py
frafra/django-dataporten
4236017611e08d08bd810be0beae1b994cb5fc67
[ "MIT" ]
2
2019-04-29T11:48:59.000Z
2020-01-06T09:54:55.000Z
from datetime import datetime from django.test import TestCase from freezegun import freeze_time import pytest from ..parsers import ( Course, Group, group_factory, MainProfile, Membership, OrganisationUnit, Semester, StudyProgram, datetime_from, ) class TestDatetimeFrom(TestCase): def test_basic_correctness(self): dt = datetime_from('2017-08-14T22:00:01Z') self.assertEqual( [dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second], [2017, 8, 14, 22, 0, 1], ) class TestGroupFactory: def test_study_program_factory(self, study_program_json): study_program = next(group_factory(study_program_json)) assert type(study_program) is StudyProgram def test_course_factory(self, course_json): course = next(group_factory(course_json)) assert type(course) is Course def test_main_profile_factory(self, main_profile_json): main_profile = next(group_factory(main_profile_json)) assert type(main_profile) is MainProfile def test_group_factory_given_iterable_argument( self, study_program_json, course_json, ): groups = group_factory(study_program_json, course_json) assert len(list(groups)) == 2 class TestGroup: def test_properties_present(self, study_program_json): group_example = Group(study_program_json) assert group_example.name == 'Fysikk og matematikk - masterstudium (5-årig)' assert group_example.url == 'http://www.ntnu.no/studier/mtfyma' assert group_example.group_type == 'prg' def test_active_membership(self, study_program_json): group_example = Group(study_program_json) assert group_example.membership class TestMembership(): def test_perpetual_membership(self): unending_membership = Membership( { "basic": "member", "displayName": "Student", "active": True, "fsroles": [ "STUDENT" ] } ) assert bool(unending_membership) is True def test_inactive_membership(self): inactive_membership = Membership( { "basic": "member", "displayName": "Student", "active": False, "fsroles": [ "STUDENT" ] } ) assert bool(inactive_membership) is False @freeze_time('2017-08-13') def test_limited_membership(self): limited_membership = Membership( { "notAfter": "2017-08-14T22:00:00Z", "active": True, "subjectRelations": "undervisning", "basic": "member", "fsroles": [ "STUDENT" ], "displayName": "Student" } ) assert bool(limited_membership) is True @freeze_time('2017-08-15') def test_expired_membership(self): limited_membership = Membership( { "notAfter": "2017-08-14T22:00:00Z", "active": True, "subjectRelations": "undervisning", "basic": "member", "fsroles": [ "STUDENT" ], "displayName": "Student" } ) assert bool(limited_membership) is False def test_retrieval_of_json_from_membership_object(self, membership_json): """Original JSON should be stored on the membership object.""" membership = Membership(membership_json) assert membership.json == membership_json def test_string_representation_of_membership(self, membership_json): """The displayName property should be used for str representation.""" # With a displayName attribute membership = Membership(membership_json) assert str(membership) == 'Ansatt' # Without a displayName attribute del membership_json['displayName'] membership = Membership(membership_json) assert str(membership) == 'Ukjent' def test_primary_affiliation_property(self, membership_json): """Membership affiliations should be retrievable.""" membership = Membership(membership_json) assert membership.primary_affiliation == 'employee' assert membership.affiliations == [ 'employee', 'member', 'affiliate', 'student', ] @freeze_time('2017-01-01') class TestCourse: def test_course_code(self, finished_course): assert finished_course.code == 'EXPH0004' def test_finished_course(self, finished_course): assert not finished_course.membership assert finished_course.semester.year == 2014 def test_ongoing_course_with_end_time(self, ongoing_course): assert ongoing_course.membership assert ongoing_course.semester.year == 2017 @pytest.mark.skip(reason='Flaky for some versions. TODO.') def test_ongoing_course_without_end_time(self, non_finished_course): assert non_finished_course.membership assert non_finished_course.semester.year == 2019 def test_split_on_membership(self, finished_course, non_finished_course, ongoing_course): courses = [ finished_course, non_finished_course, ongoing_course, ] active, inactive = Course.split_on_membership(courses) assert finished_course.code in inactive.keys() assert finished_course in inactive.values() assert non_finished_course.code in active.keys() assert non_finished_course in active.values() assert ongoing_course.code in active.keys() assert ongoing_course in active.values() class TestStudyProgram: def test_study_program_basic_properties(self, study_program_json): study_program = StudyProgram(study_program_json) assert study_program.code == 'MTFYMA' class TestMainProfile: def test_main_profile_basic_properties(self, main_profile_json): main_profile = MainProfile(main_profile_json) assert main_profile.code == 'MTFYMA-IM' class TestOrganisationUnit: def test_organisation_unit_basic_properties(self, organisation_unit_json): organisation_unit = OrganisationUnit(organisation_unit_json) assert organisation_unit.uid == 'fc:org:ntnu.no:unit:167500' @freeze_time('2017-08-27') class TestSemester(TestCase): def setUp(self): autumn_semester_date = datetime_from('2016-09-14T22:00:00Z') spring_semester_date = datetime_from('2016-04-04T22:00:00Z') self.autumn_semester = Semester(autumn_semester_date) self.spring_semester = Semester(spring_semester_date) self.present_semester = Semester.now() def test_year_of_semester(self): self.assertEqual(self.autumn_semester.year, 2016) self.assertEqual(self.present_semester.year, 2017) def test_semester_season(self): self.assertEqual(self.autumn_semester.season, Semester.AUTUMN) self.assertEqual(self.spring_semester.season, Semester.SPRING) def test_subtracting_semesters(self): same_semester_diff = self.present_semester - self.present_semester same_season_diff = self.present_semester - self.autumn_semester negative_diff = self.autumn_semester - self.present_semester different_season_diff = self.autumn_semester - self.spring_semester different_season_negative_diff = self.spring_semester - self.present_semester self.assertEqual( [same_semester_diff, same_season_diff, negative_diff, different_season_diff, different_season_negative_diff], [0, 2, -2, 1, -3], )
33.542373
121
0.646412
7940cdfb351f0f45d4bd3a973ea64f8c27cd749e
5,970
py
Python
app/ext/orm/orm_base.py
jonatasoli/fastapi-design-api-example
16e620123d77506e6b4d6cc3947749f46bcd08be
[ "MIT" ]
6
2021-06-21T19:38:07.000Z
2022-01-27T14:53:32.000Z
app/ext/orm/orm_base.py
jonatasoli/fastapi-design-api-example
16e620123d77506e6b4d6cc3947749f46bcd08be
[ "MIT" ]
null
null
null
app/ext/orm/orm_base.py
jonatasoli/fastapi-design-api-example
16e620123d77506e6b4d6cc3947749f46bcd08be
[ "MIT" ]
2
2021-06-27T13:22:07.000Z
2022-02-26T12:21:13.000Z
from abc import ABCMeta from typing import Any, Generic, Type, TypeVar, List from fastapi.encoders import jsonable_encoder from loguru import logger from pydantic import BaseModel, parse_obj_as from sqlalchemy.exc import DataError, DatabaseError, DisconnectionError, IntegrityError from sqlalchemy.sql.expression import select, text from ext.db.base_class import BaseModel ModelType = TypeVar("ModelType", bound=BaseModel) CreateSchemaType = TypeVar("CreateSchemaType", bound=BaseModel) UpdateSchemaType = TypeVar("UpdateSchemaType", bound=BaseModel) class CRUDBase( Generic[ModelType, CreateSchemaType, UpdateSchemaType], metaclass=ABCMeta ): def __init__(self, model: Type[ModelType]): """ CRUD object with default methods to Create, Read, Update (CRU). **Parameters** * `model`: A SQLAlchemy model class * `schema`: A Pydantic model (schema) class """ self.model = model def obj_in_to_db_obj(self, obj_in: Any): obj_in_data = jsonable_encoder(obj_in) return self.model(**obj_in_data) def obj_in_to_db_obj_attrs(self, obj_in: Any, db_obj: Any): obj_data = jsonable_encoder(db_obj) if isinstance(obj_in, dict): update_data = obj_in else: update_data = obj_in.dict(exclude_unset=True) for field in obj_data: if field in update_data: setattr(db_obj, field, update_data[field]) return db_obj async def list(self, query: Any = None, order_by: Any = None): try: async with self.Meta.session() as db: full_query = select(self.model) if query is not None: if not isinstance(query, list): query = [query] full_query = full_query.filter(*query) if order_by is not None: full_query = full_query.order_by(text(order_by)) smtm = await db.execute(full_query) items = smtm.scalars().all() return parse_obj_as(List[self.Meta.response_list_type], items) except (DataError, DatabaseError, DisconnectionError, IntegrityError) as err: logger.error(f"SQLAlchemy error {err}") except Exception as e: logger.error(f"Error in dao {e}") raise e async def _get_query(self, query: Any): try: async with self.Meta.session() as db: if not isinstance(query, list): query = [query] smtm = await db.execute(select(self.model).filter(*query)) return smtm.scalars().first() except (DataError, DatabaseError, DisconnectionError, IntegrityError) as err: logger.error(f"SQLAlchemy error {err}") except Exception as e: logger.error(f"Error in dao {e}") raise e async def _get(self, obj_id: Any): try: query = self.model.id == obj_id return await self._get_query(query) except (DataError, DatabaseError, DisconnectionError, IntegrityError) as err: logger.error(f"SQLAlchemy error {err}") except Exception as e: logger.error(f"Error in dao {e}") raise e async def get(self, obj_id: Any): try: db_obj = await self._get(obj_id) response = None if db_obj: response = self.Meta.response_get_type.from_orm(db_obj) return response except (DataError, DatabaseError, DisconnectionError, IntegrityError) as err: logger.error(f"SQLAlchemy error {err}") except Exception as e: logger.error(f"Error in dao {e}") raise e async def get_query(self, query: Any): try: db_obj = await self._get_query(query) response = None if db_obj: response = self.Meta.response_get_type.from_orm(db_obj) return response except (DataError, DatabaseError, DisconnectionError, IntegrityError) as err: logger.error(f"SQLAlchemy error {err}") except Exception as e: logger.error(f"Error in dao {e}") raise e async def update_or_create(self, query: Any, obj_in: CreateSchemaType) -> ModelType: result = await self.get_query(query) if not result: result = await self.create(obj_in) created = True else: result = await self.update(result.id, obj_in) created = False return result, created async def create(self, obj_in: CreateSchemaType) -> ModelType: try: data_db = self.obj_in_to_db_obj(obj_in=obj_in) async with self.Meta.session() as db: db.add(data_db) await db.commit() response = self.Meta.response_create_type.from_orm(data_db) return response except (DataError, DatabaseError, DisconnectionError, IntegrityError) as err: logger.error(f"SQLAlchemy error {err}") except Exception as e: logger.error(f"Error in dao {e}") raise e async def update(self, obj_id: Any, obj_in: UpdateSchemaType) -> ModelType: try: db_obj = await self._get(obj_id) response = None if db_obj: db_obj = self.obj_in_to_db_obj_attrs(obj_in, db_obj) async with self.Meta.session() as db: db.add(db_obj) await db.commit() response = self.Meta.response_update_type.from_orm(db_obj) return response except (DataError, DatabaseError, DisconnectionError, IntegrityError) as err: logger.error(f"SQLAlchemy error {err}") except Exception as e: logger.error(f"Error in dao {e}") raise e
35.963855
88
0.598827
7940ceaa61885a7365f2470309102778635822ad
369
py
Python
Python/Euler1.py
poc1673/Project-Euler-Exercises
80044be236f56dd29d5db41296e0e3d683085a03
[ "MIT" ]
null
null
null
Python/Euler1.py
poc1673/Project-Euler-Exercises
80044be236f56dd29d5db41296e0e3d683085a03
[ "MIT" ]
null
null
null
Python/Euler1.py
poc1673/Project-Euler-Exercises
80044be236f56dd29d5db41296e0e3d683085a03
[ "MIT" ]
null
null
null
def check_mod(number, mod_val): if ((number % mod_val)==0) : return number else: return 0 def get_mod_sum(max_val,mod_val): return_val = 0 for i in range(1,max_val): return_val = return_val + check_mod( i, mod_val ) return return_val euler_1_results = get_mod_sum(1000,3)+ get_mod_sum(1000,5) - get_mod_sum(1000,15) print(euler_1_results)
24.6
81
0.701897
7940cf9fc374d7add1579145f2b30e5bfe418350
425
py
Python
src/veem/models/address.py
veeminc/Veem-python-sdk
2f7527af0139a3f12e544fe2b51b3021df404f3c
[ "MIT" ]
1
2021-07-05T22:52:46.000Z
2021-07-05T22:52:46.000Z
src/veem/models/address.py
veeminc/Veem-python-sdk
2f7527af0139a3f12e544fe2b51b3021df404f3c
[ "MIT" ]
1
2020-09-15T16:25:39.000Z
2020-09-15T16:25:39.000Z
src/veem/models/address.py
veeminc/Veem-python-sdk
2f7527af0139a3f12e544fe2b51b3021df404f3c
[ "MIT" ]
2
2021-08-11T18:05:08.000Z
2022-02-06T08:20:49.000Z
from veem.models.base import Base class Address(Base): def __init__(self, line1=None, line2=None, city=None, stateProvince=None, postalCode=None, **kwargs): self.line1 = line1 self.line2 = line2 self.city = city self.stateProvince = stateProvince self.postalCode = postalCode
23.611111
42
0.508235
7940d074b28f983c9788f27ee07ef62b4efa333c
2,034
py
Python
eval2.py
myutman/deep-voice-conversion
d707d0ea54d73d2a2df53f2f73b6d23f4afc5231
[ "MIT" ]
null
null
null
eval2.py
myutman/deep-voice-conversion
d707d0ea54d73d2a2df53f2f73b6d23f4afc5231
[ "MIT" ]
null
null
null
eval2.py
myutman/deep-voice-conversion
d707d0ea54d73d2a2df53f2f73b6d23f4afc5231
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # /usr/bin/python2 from __future__ import print_function import tensorflow as tf from models import Net2 import argparse from hparam import hparam as hp from tensorpack.predict.base import OfflinePredictor from tensorpack.predict.config import PredictConfig from tensorpack.tfutils.sessinit import SaverRestore from tensorpack.tfutils.sessinit import ChainInit from data_load import Net2DataFlow def get_eval_input_names(): #return ['x_mfccs', 'y_spec'] return ['x_mfccs', 'y_spec', 'y_mel'] def get_eval_output_names(): return ['net2/eval/summ_loss'] def eval(logdir1, logdir2): # Load graph model = Net2() # dataflow df = Net2DataFlow(hp.test2.data_path, hp.test2.batch_size) ckpt1 = tf.train.latest_checkpoint(logdir1) ckpt2 = tf.train.latest_checkpoint(logdir2) session_inits = [] if ckpt2: session_inits.append(SaverRestore(ckpt2)) if ckpt1: session_inits.append(SaverRestore(ckpt1, ignore=['global_step'])) pred_conf = PredictConfig( model=model, input_names=get_eval_input_names(), output_names=get_eval_output_names(), session_init=ChainInit(session_inits)) predictor = OfflinePredictor(pred_conf) x_mfccs, y_spec, y_mel = next(df().get_data()) summ_loss, = predictor(x_mfccs, y_spec, y_mel) writer = tf.summary.FileWriter(logdir2) writer.add_summary(summ_loss) writer.close() def get_arguments(): parser = argparse.ArgumentParser() parser.add_argument('case1', type=str, help='experiment case name of train1') parser.add_argument('case2', type=str, help='experiment case name of train2') arguments = parser.parse_args() return arguments if __name__ == '__main__': args = get_arguments() hp.set_hparam_yaml(args.case2) logdir_train1 = '{}/{}/train1'.format(hp.logdir_path, args.case1) logdir_train2 = '{}/{}/train2'.format(hp.logdir_path, args.case2) eval(logdir1=logdir_train1, logdir2=logdir_train2) print("Done")
28.25
81
0.717797
7940d0919da910b05d8f8b2568532d402bbece43
3,714
py
Python
src/python/pants/backend/codegen/protobuf/lint/buf/rules.py
bastianwegge/pants
43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/codegen/protobuf/lint/buf/rules.py
bastianwegge/pants
43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2
[ "Apache-2.0" ]
14
2020-09-26T02:01:56.000Z
2022-03-30T10:19:28.000Z
src/python/pants/backend/codegen/protobuf/lint/buf/rules.py
bastianwegge/pants
43f0b90d41622bee0ed22249dbaffb3ff4ad2eb2
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from dataclasses import dataclass from pants.backend.codegen.protobuf.lint.buf.skip_field import SkipBufField from pants.backend.codegen.protobuf.lint.buf.subsystem import BufSubsystem from pants.backend.codegen.protobuf.target_types import ( ProtobufDependenciesField, ProtobufSourceField, ) from pants.core.goals.lint import LintResult, LintResults, LintTargetsRequest from pants.core.util_rules.external_tool import DownloadedExternalTool, ExternalToolRequest from pants.core.util_rules.source_files import SourceFilesRequest from pants.core.util_rules.stripped_source_files import StrippedSourceFiles from pants.engine.fs import Digest, MergeDigests from pants.engine.platform import Platform from pants.engine.process import FallibleProcessResult, Process from pants.engine.rules import Get, MultiGet, collect_rules, rule from pants.engine.target import FieldSet, Target, TransitiveTargets, TransitiveTargetsRequest from pants.engine.unions import UnionRule from pants.util.logging import LogLevel from pants.util.strutil import pluralize @dataclass(frozen=True) class BufFieldSet(FieldSet): required_fields = (ProtobufSourceField,) sources: ProtobufSourceField dependencies: ProtobufDependenciesField @classmethod def opt_out(cls, tgt: Target) -> bool: return tgt.get(SkipBufField).value class BufRequest(LintTargetsRequest): field_set_type = BufFieldSet name = BufSubsystem.options_scope @rule(desc="Lint with Buf", level=LogLevel.DEBUG) async def run_buf(request: BufRequest, buf: BufSubsystem) -> LintResults: if buf.skip: return LintResults([], linter_name=request.name) transitive_targets = await Get( TransitiveTargets, TransitiveTargetsRequest((field_set.address for field_set in request.field_sets)), ) all_stripped_sources_request = Get( StrippedSourceFiles, SourceFilesRequest( tgt[ProtobufSourceField] for tgt in transitive_targets.closure if tgt.has_field(ProtobufSourceField) ), ) target_stripped_sources_request = Get( StrippedSourceFiles, SourceFilesRequest( (field_set.sources for field_set in request.field_sets), for_sources_types=(ProtobufSourceField,), enable_codegen=True, ), ) download_buf_get = Get( DownloadedExternalTool, ExternalToolRequest, buf.get_request(Platform.current) ) target_sources_stripped, all_sources_stripped, downloaded_buf = await MultiGet( target_stripped_sources_request, all_stripped_sources_request, download_buf_get ) input_digest = await Get( Digest, MergeDigests( ( target_sources_stripped.snapshot.digest, all_sources_stripped.snapshot.digest, downloaded_buf.digest, ) ), ) process_result = await Get( FallibleProcessResult, Process( argv=[ downloaded_buf.exe, "lint", *buf.args, "--path", ",".join(target_sources_stripped.snapshot.files), ], input_digest=input_digest, description=f"Run Buf on {pluralize(len(request.field_sets), 'file')}.", level=LogLevel.DEBUG, ), ) result = LintResult.from_fallible_process_result(process_result) return LintResults([result], linter_name=request.name) def rules(): return [*collect_rules(), UnionRule(LintTargetsRequest, BufRequest)]
33.763636
93
0.710285
7940d1244c0eac7ed2ab14c8fd461940d0f0ea00
26,256
py
Python
test/integration/smoke/test_routers.py
K0zka/cloudstack
ed099c3f964e4b18a3c431b59cdb63533ec91d81
[ "Apache-2.0" ]
null
null
null
test/integration/smoke/test_routers.py
K0zka/cloudstack
ed099c3f964e4b18a3c431b59cdb63533ec91d81
[ "Apache-2.0" ]
6
2020-11-16T20:46:02.000Z
2022-02-01T01:06:41.000Z
test/integration/smoke/test_routers.py
pkoistin/czo
43cf1da865c1e4ed6523fb5b2ba315a547fac79f
[ "Apache-2.0" ]
null
null
null
# 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 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 License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. """ BVT tests for routers """ # Import Local Modules from marvin.codes import FAILED from marvin.cloudstackTestCase import cloudstackTestCase from marvin.cloudstackAPI import (stopRouter, restartNetwork, startRouter, rebootRouter) from marvin.lib.utils import (cleanup_resources, get_process_status, get_host_credentials) from marvin.lib.base import (Account, ServiceOffering, VirtualMachine) from marvin.lib.common import (get_domain, get_zone, get_template, list_hosts, list_routers, list_networks, list_zones, list_vlan_ipranges) from nose.plugins.attrib import attr # Import System modules import time _multiprocess_shared_ = True class TestRouterServices(cloudstackTestCase): @classmethod def setUpClass(cls): testClient = super(TestRouterServices, cls).getClsTestClient() cls.apiclient = testClient.getApiClient() cls.services = testClient.getParsedTestDataConfig() # Get Zone, Domain and templates cls.domain = get_domain(cls.apiclient) cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) cls.services['mode'] = cls.zone.networktype template = get_template( cls.apiclient, cls.zone.id, cls.services["ostype"] ) if template == FAILED: cls.fail( "get_template() failed to return template\ with description %s" % cls.services["ostype"]) cls.services["virtual_machine"]["zoneid"] = cls.zone.id # Create an account, network, VM and IP addresses cls.account = Account.create( cls.apiclient, cls.services["account"], domainid=cls.domain.id ) cls.service_offering = ServiceOffering.create( cls.apiclient, cls.services["service_offerings"] ) cls.vm_1 = VirtualMachine.create( cls.apiclient, cls.services["virtual_machine"], templateid=template.id, accountid=cls.account.name, domainid=cls.account.domainid, serviceofferingid=cls.service_offering.id ) cls.cleanup = [ cls.account, cls.service_offering ] return @classmethod def tearDownClass(cls): try: cls.apiclient = super( TestRouterServices, cls ).getClsTestClient().getApiClient() # Clean up, terminate the created templates cleanup_resources(cls.apiclient, cls.cleanup) except Exception as e: raise Exception("Warning: Exception during cleanup : %s" % e) return def setUp(self): self.apiclient = self.testClient.getApiClient() self.hypervisor = self.testClient.getHypervisorInfo() return @attr(tags=["advanced", "basic", "sg", "smoke"], required_hardware="true") def test_01_router_internal_basic(self): """Test router internal basic zone """ # Validate the following # 1. Router only does dhcp # 2. Verify that ports 67 (DHCP) and 53 (DNS) are open on UDP # by checking status of dnsmasq process # Find router associated with user account if self.zone.networktype == "Basic": list_router_response = list_routers( self.apiclient, listall="true" ) else: list_router_response = list_routers( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(list_router_response, list), True, "Check list response returns a valid list" ) router = list_router_response[0] hosts = list_hosts( self.apiclient, zoneid=router.zoneid, type='Routing', state='Up', id=router.hostid ) self.assertEqual( isinstance(hosts, list), True, "Check list host returns a valid list" ) host = hosts[0] self.debug("Router ID: %s, state: %s" % (router.id, router.state)) self.assertEqual( router.state, 'Running', "Check list router response for router state" ) if self.hypervisor.lower() in ('vmware', 'hyperv'): result = get_process_status( self.apiclient.connection.mgtSvr, 22, self.apiclient.connection.user, self.apiclient.connection.passwd, router.linklocalip, "service dnsmasq status", hypervisor=self.hypervisor ) else: try: host.user, host.passwd = get_host_credentials( self.config, host.ipaddress) result = get_process_status( host.ipaddress, 22, host.user, host.passwd, router.linklocalip, "service dnsmasq status" ) except KeyError: self.skipTest( "Marvin configuration has no host credentials to\ check router services") res = str(result) self.debug("Dnsmasq process status: %s" % res) self.assertEqual( res.count("running"), 1, "Check dnsmasq service is running or not" ) return @attr(tags=["advanced", "advancedns"], required_hardware="false") def test_02_router_internal_adv(self): """Test router internal advanced zone """ # Validate the following # 1. Router does dhcp, dns, gateway, LB, PF, FW # 2. verify that dhcp, dns ports are open on UDP # 3. dnsmasq, haproxy processes should be running # Find router associated with user account list_router_response = list_routers( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(list_router_response, list), True, "Check list response returns a valid list" ) router = list_router_response[0] hosts = list_hosts( self.apiclient, zoneid=router.zoneid, type='Routing', state='Up', id=router.hostid ) self.assertEqual( isinstance(hosts, list), True, "Check list response returns a valid list" ) host = hosts[0] self.debug("Router ID: %s, state: %s" % (router.id, router.state)) self.assertEqual( router.state, 'Running', "Check list router response for router state" ) if self.hypervisor.lower() in ('vmware', 'hyperv'): result = get_process_status( self.apiclient.connection.mgtSvr, 22, self.apiclient.connection.user, self.apiclient.connection.passwd, router.linklocalip, "service dnsmasq status", hypervisor=self.hypervisor ) else: try: host.user, host.passwd = get_host_credentials( self.config, host.ipaddress) result = get_process_status( host.ipaddress, 22, host.user, host.passwd, router.linklocalip, "service dnsmasq status" ) except KeyError: self.skipTest( "Marvin configuration has no host credentials\ to check router services") res = str(result) self.debug("Dnsmasq process status: %s" % res) self.assertEqual( res.count("running"), 1, "Check dnsmasq service is running or not" ) if self.hypervisor.lower() in ('vmware', 'hyperv'): result = get_process_status( self.apiclient.connection.mgtSvr, 22, self.apiclient.connection.user, self.apiclient.connection.passwd, router.linklocalip, "service haproxy status", hypervisor=self.hypervisor ) else: try: host.user, host.passwd = get_host_credentials( self.config, host.ipaddress) result = get_process_status( host.ipaddress, 22, host.user, host.passwd, router.linklocalip, "service haproxy status" ) except KeyError: self.skipTest( "Marvin configuration has no host credentials\ to check router services") res = str(result) self.assertEqual( res.count("running"), 1, "Check haproxy service is running or not" ) self.debug("Haproxy process status: %s" % res) return @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="false") def test_03_restart_network_cleanup(self): """Test restart network """ # Validate the following # 1. When cleanup = true, router is destroyed and a new one created # 2. New router should have the same public IP # Find router associated with user account list_router_response = list_routers( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(list_router_response, list), True, "Check list response returns a valid list" ) router = list_router_response[0] # Store old values before restart old_publicip = router.publicip timeout = 10 # Network should be in Implemented or Setup stage before restart while True: networks = list_networks( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(networks, list), True, "Check list response returns a valid list" ) network = networks[0] if network.state in ["Implemented", "Setup"]: break elif timeout == 0: break else: time.sleep(self.services["sleep"]) timeout = timeout - 1 self.debug( "Restarting network with ID: %s, Network state: %s" % ( network.id, network.state )) cmd = restartNetwork.restartNetworkCmd() cmd.id = network.id cmd.cleanup = True self.apiclient.restartNetwork(cmd) # Get router details after restart list_router_response = list_routers( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(list_router_response, list), True, "Check list response returns a valid list" ) router = list_router_response[0] self.assertEqual( router.publicip, old_publicip, "Public IP of the router should remain same after network restart" ) return @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="true") def test_04_restart_network_wo_cleanup(self): """Test restart network without cleanup """ # Validate the following # 1. When cleanup = false, router is restarted and # all services inside the router are restarted # 2. check 'uptime' to see if the actual restart happened timeout = 10 # Network should be in Implemented or Setup stage before restart while True: networks = list_networks( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(networks, list), True, "Check list response returns a valid list" ) network = networks[0] if network.state in ["Implemented", "Setup"]: break elif timeout == 0: break else: time.sleep(self.services["sleep"]) timeout = timeout - 1 self.debug( "Restarting network with ID: %s, Network state: %s" % ( network.id, network.state )) cmd = restartNetwork.restartNetworkCmd() cmd.id = network.id cmd.cleanup = False self.apiclient.restartNetwork(cmd) # Get router details after restart list_router_response = list_routers( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(list_router_response, list), True, "Check list response returns a valid list" ) router = list_router_response[0] hosts = list_hosts( self.apiclient, zoneid=router.zoneid, type='Routing', state='Up', id=router.hostid ) self.assertEqual( isinstance(hosts, list), True, "Check list response returns a valid list" ) host = hosts[0] if self.hypervisor.lower() in ('vmware', 'hyperv'): res = get_process_status( self.apiclient.connection.mgtSvr, 22, self.apiclient.connection.user, self.apiclient.connection.passwd, router.linklocalip, "uptime", hypervisor=self.hypervisor ) else: try: host.user, host.passwd = get_host_credentials( self.config, host.ipaddress) res = get_process_status( host.ipaddress, 22, host.user, host.passwd, router.linklocalip, "uptime" ) except KeyError: self.skipTest( "Marvin configuration has no host credentials\ to check router services") # res = 12:37:14 up 1 min, 0 users, load average: 0.61, 0.22, 0.08 # Split result to check the uptime result = res[0].split() self.debug("Router Uptime: %s" % result) self.assertEqual( str(result[1]), 'up', "Check router is running or not" ) if str(result[3]) == "min,": self.assertEqual( (int(result[2]) < 3), True, "Check uptime is less than 3 mins or not" ) else: self.assertEqual( str(result[3]), 'sec,', "Check uptime is in seconds" ) return @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="false") def test_05_router_basic(self): """Test router basic setup """ # Validate the following: # 1. verify that listRouters returned a 'Running' router # 2. router will have dns same as that seen in listZones # 3. router will have a guestIP and a linkLocalIp" list_router_response = list_routers( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(list_router_response, list), True, "Check list response returns a valid list" ) self.assertNotEqual( len(list_router_response), 0, "Check list router response" ) for router in list_router_response: self.assertEqual( router.state, 'Running', "Check list router response for router state" ) zones = list_zones( self.apiclient, id=router.zoneid ) self.assertEqual( isinstance(zones, list), True, "Check list response returns a valid list" ) zone = zones[0] self.assertEqual( router.dns1, zone.dns1, "Compare DNS1 of router and zone" ) self.assertEqual( router.dns2, zone.dns2, "Compare DNS2 of router and zone" ) self.assertEqual( hasattr(router, 'guestipaddress'), True, "Check whether router has guest IP field" ) self.assertEqual( hasattr(router, 'linklocalip'), True, "Check whether router has link local IP field" ) return @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="false") def test_06_router_advanced(self): """Test router advanced setup """ # Validate the following # 1. verify that listRouters returned a 'Running' router # 2. router will have dns and gateway as in listZones, listVlanIpRanges # 3. router will have guest,public and linklocal IPs list_router_response = list_routers( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(list_router_response, list), True, "Check list response returns a valid list" ) self.assertNotEqual( len(list_router_response), 0, "Check list router response" ) for router in list_router_response: self.assertEqual( router.state, 'Running', "Check list router response for router state" ) zones = list_zones( self.apiclient, id=router.zoneid ) self.assertEqual( isinstance(zones, list), True, "Check list response returns a valid list" ) zone = zones[0] self.assertEqual( router.dns1, zone.dns1, "Compare DNS1 of router and zone" ) self.assertEqual( router.dns2, zone.dns2, "Compare DNS2 of router and zone" ) self.assertEqual( hasattr(router, 'guestipaddress'), True, "Check whether router has guest IP field" ) self.assertEqual( hasattr(router, 'linklocalip'), True, "Check whether router has link local IP field" ) # Fetch corresponding ip ranges information from listVlanIpRanges ipranges_response = list_vlan_ipranges( self.apiclient, zoneid=router.zoneid ) self.assertEqual( isinstance(ipranges_response, list), True, "Check list response returns a valid list" ) iprange = ipranges_response[0] self.assertEqual( router.gateway, iprange.gateway, "Check gateway with that of corresponding IP range" ) return @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="false") def test_07_stop_router(self): """Test stop router """ # Validate the following # 1. listRouter should report the router for the account as stopped list_router_response = list_routers( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(list_router_response, list), True, "Check list response returns a valid list" ) router = list_router_response[0] self.debug("Stopping the router with ID: %s" % router.id) # Stop the router cmd = stopRouter.stopRouterCmd() cmd.id = router.id self.apiclient.stopRouter(cmd) # List routers to check state of router router_response = list_routers( self.apiclient, id=router.id ) self.assertEqual( isinstance(router_response, list), True, "Check list response returns a valid list" ) # List router should have router in stopped state self.assertEqual( router_response[0].state, 'Stopped', "Check list router response for router state" ) return @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="false") def test_08_start_router(self): """Test start router """ # Validate the following # 1. listRouter should report the router for the account as stopped list_router_response = list_routers( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(list_router_response, list), True, "Check list response returns a valid list" ) router = list_router_response[0] self.debug("Starting the router with ID: %s" % router.id) # Start the router cmd = startRouter.startRouterCmd() cmd.id = router.id self.apiclient.startRouter(cmd) # List routers to check state of router router_response = list_routers( self.apiclient, id=router.id ) self.assertEqual( isinstance(router_response, list), True, "Check list response returns a valid list" ) # List router should have router in running state self.assertEqual( router_response[0].state, 'Running', "Check list router response for router state" ) return def verifyRouterResponse(self, router_response, ip): if (router_response) and (isinstance(router_response, list)) and \ (router_response[0].state == "Running") and \ (router_response[0].publicip == ip): return True return False @attr(tags=["advanced", "advancedns", "smoke"], required_hardware="false") def test_09_reboot_router(self): """Test reboot router """ # Validate the following # 1. listRouter should report the router for the account as stopped list_router_response = list_routers( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(list_router_response, list), True, "Check list response returns a valid list" ) router = list_router_response[0] public_ip = router.publicip self.debug("Rebooting the router with ID: %s" % router.id) # Reboot the router cmd = rebootRouter.rebootRouterCmd() cmd.id = router.id self.apiclient.rebootRouter(cmd) # List routers to check state of router retries_cnt = 6 while retries_cnt >= 0: router_response = list_routers( self.apiclient, id=router.id ) if self.verifyRouterResponse(router_response, public_ip): self.debug("Router is running successfully after reboot") return time.sleep(10) retries_cnt = retries_cnt - 1 self.fail( "Router response after reboot is either is invalid\ or in stopped state") return
32.861076
79
0.527994
7940d16244ac84df22dfab08da253baf0342a122
3,447
py
Python
userbot/modules/blacklist.py
LetterIce/OUBnew
6b059ed80976448f0611d73a77e648668518f131
[ "Naumen", "Condor-1.1", "MS-PL" ]
37
2020-02-22T15:37:16.000Z
2022-03-03T13:54:04.000Z
userbot/modules/blacklist.py
LetterIce/OUBnew
6b059ed80976448f0611d73a77e648668518f131
[ "Naumen", "Condor-1.1", "MS-PL" ]
26
2020-03-30T23:03:16.000Z
2021-08-30T10:09:08.000Z
userbot/modules/blacklist.py
LetterIce/OUBnew
6b059ed80976448f0611d73a77e648668518f131
[ "Naumen", "Condor-1.1", "MS-PL" ]
279
2020-02-22T06:38:42.000Z
2022-03-03T13:58:10.000Z
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # port to userbot from uniborg by @keselekpermen69 import asyncio import io import re import userbot.modules.sql_helper.blacklist_sql as sql from telethon import events, utils from telethon.tl import types, functions from userbot import CMD_HELP, bot from userbot.events import register @register(incoming=True, disable_edited=True, disable_errors=True) async def on_new_message(event): # TODO: exempt admins from locks name = event.raw_text snips = sql.get_chat_blacklist(event.chat_id) for snip in snips: pattern = r"( |^|[^\w])" + re.escape(snip) + r"( |$|[^\w])" if re.search(pattern, name, flags=re.IGNORECASE): try: await event.delete() except Exception as e: await event.reply("I do not have DELETE permission in this chat") await sleep(1) await reply.delete() sql.rm_from_blacklist(event.chat_id, snip.lower()) break @register(outgoing=True, pattern="^.addbl(?: |$)(.*)") async def on_add_black_list(addbl): text = addbl.pattern_match.group(1) to_blacklist = list( {trigger.strip() for trigger in text.split("\n") if trigger.strip()} ) for trigger in to_blacklist: sql.add_to_blacklist(addbl.chat_id, trigger.lower()) await addbl.edit( "`Added` **{}** `to the blacklist in the current chat`".format(text) ) @register(outgoing=True, pattern="^.listbl(?: |$)(.*)") async def on_view_blacklist(listbl): all_blacklisted = sql.get_chat_blacklist(listbl.chat_id) OUT_STR = "Blacklists in the Current Chat:\n" if len(all_blacklisted) > 0: for trigger in all_blacklisted: OUT_STR += f"`{trigger}`\n" else: OUT_STR = "`There are no blacklist in current chat.`" if len(OUT_STR) > 4096: with io.BytesIO(str.encode(OUT_STR)) as out_file: out_file.name = "blacklist.text" await listbl.client.send_file( listbl.chat_id, out_file, force_document=True, allow_cache=False, caption="BlackLists in the Current Chat", reply_to=listbl, ) await listbl.delete() else: await listbl.edit(OUT_STR) @register(outgoing=True, pattern="^.rmbl(?: |$)(.*)") async def on_delete_blacklist(rmbl): text = rmbl.pattern_match.group(1) to_unblacklist = list( {trigger.strip() for trigger in text.split("\n") if trigger.strip()} ) successful = 0 for trigger in to_unblacklist: if sql.rm_from_blacklist(rmbl.chat_id, trigger.lower()): successful += 1 if not successful: await rmbl.edit("`Blacklist` **{}** `doesn't exist.`".format(text)) else: await rmbl.edit("`Blacklist` **{}** `was deleted successfully`".format(text)) CMD_HELP.update( { "blacklist": ".listbl\ \nUsage: Lists all active userbot blacklist in a chat.\ \n\n.addbl <keyword>\ \nUsage: Saves the message to the 'blacklist keyword'.\ \nThe bot will delete to the message whenever 'blacklist keyword' is mentioned.\ \n\n.rmbl <keyword>\ \nUsage: Stops the specified blacklist." } )
33.144231
85
0.631274
7940d215729bb1d0d44578f29e286b297a252b4f
3,737
py
Python
autobot/handler/response/replymarkupbuilder.py
andreacioni/AutoBot
6cfcaf3a36adf6ba15c93f517fbc08ac9f93b389
[ "BSD-3-Clause" ]
1
2019-05-16T10:08:35.000Z
2019-05-16T10:08:35.000Z
autobot/handler/response/replymarkupbuilder.py
andreacioni/AutoBot
6cfcaf3a36adf6ba15c93f517fbc08ac9f93b389
[ "BSD-3-Clause" ]
null
null
null
autobot/handler/response/replymarkupbuilder.py
andreacioni/AutoBot
6cfcaf3a36adf6ba15c93f517fbc08ac9f93b389
[ "BSD-3-Clause" ]
2
2018-12-24T23:51:28.000Z
2019-05-16T15:53:56.000Z
import logging from telegram import ReplyKeyboardMarkup, ReplyKeyboardRemove, KeyboardButton from autobot import AutoBotConstants from autobot.configuration import AutoBotConfig class ReplyMarkupBuilder(object): _logger = logging.getLogger(__name__) @classmethod def build_keyboard(cls, config, entry): """Build the keyboard according to the entry's specs. This method returns: - None: keyboard need to be left on the screen (if already displayed) - Instance of ReplyKeyboardMarkup that holds the new keyboard to be displayed - Instance of ReplyKeyboardRemove means that a currently displayed keyboard need to be remove""" button_list = cls._build_keyboard_markup(config, entry) if button_list is not None: if button_list: # If button_list is a not empty array we proceed to build the keyboard keyboard_markup = ReplyKeyboardMarkup(\ button_list, \ entry[AutoBotConfig.RESIZE_KEYBOARD]\ if AutoBotConfig.RESIZE_KEYBOARD in entry else False, \ entry[AutoBotConfig.ONE_TIME_KEYBOARD]\ if AutoBotConfig.ONE_TIME_KEYBOARD in entry else False) else: keyboard_markup = None # Leave the previous keyboard. This is the default behaviour else: keyboard_markup = ReplyKeyboardRemove() # Remove the keyboard if KEYBOARD_OPTIONS = None (null) return keyboard_markup @classmethod def _build_keyboard_markup(cls, config, entry): """This method returns: - None: remove previous defined keyboard, if exists - []: leaving the previous defined keyboard, if exists - [[...],...]: new keyboard""" reply_keyboard = [] # Checking type of KEYBOARD_OPTIONS parameter if entry[AutoBotConfig.KEYBOARD_OPTIONS] is None: reply_keyboard = None elif isinstance(entry[AutoBotConfig.KEYBOARD_OPTIONS], list) or \ isinstance(entry[AutoBotConfig.KEYBOARD_OPTIONS], str): # If "keyboard_options" field is a string we search by "id" # for a keyboard previously defined in another entry if not isinstance(entry[AutoBotConfig.KEYBOARD_OPTIONS], list): ref_id = entry[AutoBotConfig.KEYBOARD_OPTIONS] entry[AutoBotConfig.KEYBOARD_OPTIONS] = config[ref_id][AutoBotConfig.KEYBOARD_OPTIONS] # If KEYBOARD_OPTIONS is a not empty list we proceed to keyboard button building, # otherwise we return an empty array (that, in this context, means leaving a previously # defined keyboard) if entry[AutoBotConfig.KEYBOARD_OPTIONS]: # Then we create the appropriate KeyboardButton istance. # Now we add the '/' to every command found in keyboard for row in entry[AutoBotConfig.KEYBOARD_OPTIONS]: button_list = [] for response_id in row: if config[response_id][AutoBotConfig.HANDLER_TYPE] == 'COMMAND': button_list.append(KeyboardButton('/' + config[response_id][AutoBotConfig.ON])) else: button_list.append(KeyboardButton(config[response_id][AutoBotConfig.ON])) reply_keyboard.append(button_list) else: cls._logger.warning('Invalid KEYBOARD_OPTIONS parameter in entry: %s. Removing previously defined keyboard', entry[AutoBotConfig.ID]) return reply_keyboard
49.171053
145
0.630185
7940d3022948e6b52d6395c21a6e86f12c270f0a
431
py
Python
Python/Algorithms/50.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
2
2021-01-15T17:22:54.000Z
2021-05-16T19:58:02.000Z
Python/Algorithms/50.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
null
null
null
Python/Algorithms/50.py
DimitrisJim/leetcode_solutions
765ea578748f8c9b21243dec9dc8a16163e85c0c
[ "Unlicense" ]
null
null
null
class Solution: def myPow(self, x: float, n: int) -> float: if x == 0: return 0 # flip sign of exponent. pos_exp, n = (True, n) if n > 0 else (False, -n) result = 1 while n > 0: if n & 1: result *= x x *= x n //= 2 # a ** (-b) => 1 / a ** b if pos_exp: return result return 1 / result
22.684211
56
0.38051
7940d3399168414cb842b828d084456674329ec3
1,922
py
Python
bin/thresholder.py
a7mad3akef/ProjectBlog
6cabd7d6d025af6a51fca49915b75987fc0284c5
[ "MIT" ]
1
2018-02-04T22:52:32.000Z
2018-02-04T22:52:32.000Z
bin/thresholder.py
a7mad3akef/ProjectBlog
6cabd7d6d025af6a51fca49915b75987fc0284c5
[ "MIT" ]
null
null
null
bin/thresholder.py
a7mad3akef/ProjectBlog
6cabd7d6d025af6a51fca49915b75987fc0284c5
[ "MIT" ]
null
null
null
#!/home/k0f4/Desktop/Blog-API-with-Django-Rest-Framework/bin/python2 # # The Python Imaging Library # $Id$ # # this demo script illustrates how a 1-bit BitmapImage can be used # as a dynamically updated overlay # try: from tkinter import * except ImportError: from Tkinter import * from PIL import Image, ImageTk import sys # # an image viewer class UI(Frame): def __init__(self, master, im, value=128): Frame.__init__(self, master) self.image = im self.value = value self.canvas = Canvas(self, width=im.size[0], height=im.size[1]) self.backdrop = ImageTk.PhotoImage(im) self.canvas.create_image(0, 0, image=self.backdrop, anchor=NW) self.canvas.pack() scale = Scale(self, orient=HORIZONTAL, from_=0, to=255, resolution=1, command=self.update_scale, length=256) scale.set(value) scale.bind("<ButtonRelease-1>", self.redraw) scale.pack() # uncomment the following line for instant feedback (might # be too slow on some platforms) # self.redraw() def update_scale(self, value): self.value = float(value) self.redraw() def redraw(self, event=None): # create overlay (note the explicit conversion to mode "1") im = self.image.point(lambda v, t=self.value: v >= t, "1") self.overlay = ImageTk.BitmapImage(im, foreground="green") # update canvas self.canvas.delete("overlay") self.canvas.create_image(0, 0, image=self.overlay, anchor=NW, tags="overlay") # -------------------------------------------------------------------- # main if len(sys.argv) != 2: print("Usage: thresholder file") sys.exit(1) root = Tk() im = Image.open(sys.argv[1]) if im.mode != "L": im = im.convert("L") # im.thumbnail((320,200)) UI(root, im).pack() root.mainloop()
24.329114
74
0.596254
7940d3f5e5385c7f8f43c465f9dbda144ca51f8d
2,059
py
Python
utils/models/vgg16.py
pksvision/Video-Dehazing-Pytorch
f318114d27c9b4e36c605027f351b6035fad9140
[ "MIT" ]
null
null
null
utils/models/vgg16.py
pksvision/Video-Dehazing-Pytorch
f318114d27c9b4e36c605027f351b6035fad9140
[ "MIT" ]
null
null
null
utils/models/vgg16.py
pksvision/Video-Dehazing-Pytorch
f318114d27c9b4e36c605027f351b6035fad9140
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F class Vgg16(torch.nn.Module): def __init__(self): super(Vgg16, self).__init__() self.conv1_1 = nn.Conv2d(3, 64, kernel_size=3, stride=1, padding=1) self.conv1_2 = nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=1) self.conv2_1 = nn.Conv2d(64, 128, kernel_size=3, stride=1, padding=1) self.conv2_2 = nn.Conv2d(128, 128, kernel_size=3, stride=1, padding=1) self.conv3_1 = nn.Conv2d(128, 256, kernel_size=3, stride=1, padding=1) self.conv3_2 = nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1) self.conv3_3 = nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1) self.conv4_1 = nn.Conv2d(256, 512, kernel_size=3, stride=1, padding=1) self.conv4_2 = nn.Conv2d(512, 512, kernel_size=3, stride=1, padding=1) self.conv4_3 = nn.Conv2d(512, 512, kernel_size=3, stride=1, padding=1) self.conv5_1 = nn.Conv2d(512, 512, kernel_size=3, stride=1, padding=1) self.conv5_2 = nn.Conv2d(512, 512, kernel_size=3, stride=1, padding=1) self.conv5_3 = nn.Conv2d(512, 512, kernel_size=3, stride=1, padding=1) def forward(self, X): h = F.relu(self.conv1_1(X)) h = F.relu(self.conv1_2(h)) relu1_2 = h h = F.max_pool2d(h, kernel_size=2, stride=2) h = F.relu(self.conv2_1(h)) h = F.relu(self.conv2_2(h)) relu2_2 = h h = F.max_pool2d(h, kernel_size=2, stride=2) h = F.relu(self.conv3_1(h)) h = F.relu(self.conv3_2(h)) h = F.relu(self.conv3_3(h)) relu3_3 = h h = F.max_pool2d(h, kernel_size=2, stride=2) h = F.relu(self.conv4_1(h)) h = F.relu(self.conv4_2(h)) h = F.relu(self.conv4_3(h)) relu4_3 = h h = F.max_pool2d(h, kernel_size=2, stride=2) h = F.relu(self.conv5_1(h)) h = F.relu(self.conv5_2(h)) h = F.relu(self.conv5_3(h)) relu5_3 = h return [relu1_2, relu2_2, relu3_3, relu4_3, relu5_3]
36.767857
78
0.603205
7940d5426e0a4603cd00c882e25f42ffbb5de7a2
402,128
py
Python
results/v200_cuda70_k40c.py
supreethms1809/magma-2.2.0
b713d0b0a7a4724847e3a4050987c5ea9e7a7279
[ "BSD-3-Clause" ]
31
2015-06-19T14:41:12.000Z
2021-02-15T12:47:57.000Z
results/v200_cuda70_k40c.py
supreethms1809/magma-2.2.0
b713d0b0a7a4724847e3a4050987c5ea9e7a7279
[ "BSD-3-Clause" ]
3
2020-01-02T05:21:16.000Z
2020-01-07T20:04:05.000Z
results/v200_cuda70_k40c.py
supreethms1809/magma-2.2.0
b713d0b0a7a4724847e3a4050987c5ea9e7a7279
[ "BSD-3-Clause" ]
17
2015-04-01T14:26:48.000Z
2021-12-27T06:12:15.000Z
import numpy from numpy import array, nan, inf version = '2.0.0' cuda = '7.0' device = 'Kepler K40c' cpu = '2x8 core Sandy Bridge E5-2670' # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/cgeqrf.txt # numactl --interleave=all ../testing/testing_cgeqrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 cgeqrf = array([ [ 10, 10, nan, nan, 0.03, 0.00, nan ], [ 20, 20, nan, nan, 0.21, 0.00, nan ], [ 30, 30, nan, nan, 0.63, 0.00, nan ], [ 40, 40, nan, nan, 1.38, 0.00, nan ], [ 50, 50, nan, nan, 2.33, 0.00, nan ], [ 60, 60, nan, nan, 3.39, 0.00, nan ], [ 70, 70, nan, nan, 1.95, 0.00, nan ], [ 80, 80, nan, nan, 2.80, 0.00, nan ], [ 90, 90, nan, nan, 3.22, 0.00, nan ], [ 100, 100, nan, nan, 4.96, 0.00, nan ], [ 200, 200, nan, nan, 17.26, 0.00, nan ], [ 300, 300, nan, nan, 39.33, 0.00, nan ], [ 400, 400, nan, nan, 62.66, 0.01, nan ], [ 500, 500, nan, nan, 92.62, 0.01, nan ], [ 600, 600, nan, nan, 120.91, 0.01, nan ], [ 700, 700, nan, nan, 154.35, 0.01, nan ], [ 800, 800, nan, nan, 183.25, 0.01, nan ], [ 900, 900, nan, nan, 216.61, 0.02, nan ], [ 1000, 1000, nan, nan, 251.76, 0.02, nan ], [ 2000, 2000, nan, nan, 637.35, 0.07, nan ], [ 3000, 3000, nan, nan, 835.71, 0.17, nan ], [ 4000, 4000, nan, nan, 1139.10, 0.30, nan ], [ 5000, 5000, nan, nan, 1614.96, 0.41, nan ], [ 6000, 6000, nan, nan, 1849.25, 0.62, nan ], [ 7000, 7000, nan, nan, 2001.77, 0.91, nan ], [ 8000, 8000, nan, nan, 2121.95, 1.29, nan ], [ 9000, 9000, nan, nan, 2194.95, 1.77, nan ], [ 10000, 10000, nan, nan, 2253.10, 2.37, nan ], [ 12000, 12000, nan, nan, 2335.09, 3.95, nan ], [ 14000, 14000, nan, nan, 2384.30, 6.14, nan ], [ 16000, 16000, nan, nan, 2407.06, 9.08, nan ], [ 18000, 18000, nan, nan, 2422.32, 12.84, nan ], [ 20000, 20000, nan, nan, 2459.15, 17.35, nan ], ]) # numactl --interleave=all ../testing/testing_cgeqrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 cgeqrf_gpu = array([ [ 10, 10, nan, nan, 0.00, 0.00, nan ], [ 20, 20, nan, nan, 0.04, 0.00, nan ], [ 30, 30, nan, nan, 0.12, 0.00, nan ], [ 40, 40, nan, nan, 0.27, 0.00, nan ], [ 50, 50, nan, nan, 0.50, 0.00, nan ], [ 60, 60, nan, nan, 0.85, 0.00, nan ], [ 70, 70, nan, nan, 1.06, 0.00, nan ], [ 80, 80, nan, nan, 1.55, 0.00, nan ], [ 90, 90, nan, nan, 2.09, 0.00, nan ], [ 100, 100, nan, nan, 5.61, 0.00, nan ], [ 200, 200, nan, nan, 12.84, 0.00, nan ], [ 300, 300, nan, nan, 31.01, 0.00, nan ], [ 400, 400, nan, nan, 51.59, 0.01, nan ], [ 500, 500, nan, nan, 77.84, 0.01, nan ], [ 600, 600, nan, nan, 105.33, 0.01, nan ], [ 700, 700, nan, nan, 137.06, 0.01, nan ], [ 800, 800, nan, nan, 167.70, 0.02, nan ], [ 900, 900, nan, nan, 196.97, 0.02, nan ], [ 1000, 1000, nan, nan, 234.10, 0.02, nan ], [ 2000, 2000, nan, nan, 604.80, 0.07, nan ], [ 3000, 3000, nan, nan, 1014.24, 0.14, nan ], [ 4000, 4000, nan, nan, 1392.96, 0.25, nan ], [ 5000, 5000, nan, nan, 1410.27, 0.47, nan ], [ 6000, 6000, nan, nan, 1696.41, 0.68, nan ], [ 7000, 7000, nan, nan, 1928.78, 0.95, nan ], [ 8000, 8000, nan, nan, 2048.87, 1.33, nan ], [ 9000, 9000, nan, nan, 2133.31, 1.82, nan ], [ 10000, 10000, nan, nan, 2208.32, 2.42, nan ], [ 12000, 12000, nan, nan, 2320.47, 3.97, nan ], [ 14000, 14000, nan, nan, 2378.70, 6.15, nan ], [ 16000, 16000, nan, nan, 2411.01, 9.06, nan ], [ 18000, 18000, nan, nan, 2430.66, 12.80, nan ], [ 20000, 20000, nan, nan, 2474.69, 17.24, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/cgesvd.txt # numactl --interleave=all ../testing/testing_cgesvd -UN -VN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 cgesvd_UN = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.00, nan ], [ nan, 80, 80, nan, 0.00, nan ], [ nan, 90, 90, nan, 0.00, nan ], [ nan, 100, 100, nan, 0.00, nan ], [ nan, 200, 200, nan, 0.01, nan ], [ nan, 300, 300, nan, 0.03, nan ], [ nan, 400, 400, nan, 0.05, nan ], [ nan, 500, 500, nan, 0.08, nan ], [ nan, 600, 600, nan, 0.11, nan ], [ nan, 700, 700, nan, 0.15, nan ], [ nan, 800, 800, nan, 0.19, nan ], [ nan, 900, 900, nan, 0.24, nan ], [ nan, 1000, 1000, nan, 0.29, nan ], [ nan, 2000, 2000, nan, 1.14, nan ], [ nan, 3000, 3000, nan, 2.94, nan ], [ nan, 4000, 4000, nan, 5.85, nan ], [ nan, 5000, 5000, nan, 10.14, nan ], [ nan, 6000, 6000, nan, 16.06, nan ], [ nan, 7000, 7000, nan, 23.87, nan ], [ nan, 8000, 8000, nan, 34.14, nan ], [ nan, 9000, 9000, nan, 46.82, nan ], [ nan, 10000, 10000, nan, 62.64, nan ], [ nan, 300, 100, nan, 0.00, nan ], [ nan, 600, 200, nan, 0.02, nan ], [ nan, 900, 300, nan, 0.04, nan ], [ nan, 1200, 400, nan, 0.07, nan ], [ nan, 1500, 500, nan, 0.10, nan ], [ nan, 1800, 600, nan, 0.14, nan ], [ nan, 2100, 700, nan, 0.19, nan ], [ nan, 2400, 800, nan, 0.25, nan ], [ nan, 2700, 900, nan, 0.33, nan ], [ nan, 3000, 1000, nan, 0.40, nan ], [ nan, 6000, 2000, nan, 1.74, nan ], [ nan, 9000, 3000, nan, 4.66, nan ], [ nan, 12000, 4000, nan, 9.57, nan ], [ nan, 15000, 5000, nan, 17.05, nan ], [ nan, 18000, 6000, nan, 27.53, nan ], [ nan, 21000, 7000, nan, 41.54, nan ], [ nan, 24000, 8000, nan, 60.43, nan ], [ nan, 27000, 9000, nan, 83.63, nan ], [ nan, 100, 300, nan, 0.00, nan ], [ nan, 200, 600, nan, 0.02, nan ], [ nan, 300, 900, nan, 0.04, nan ], [ nan, 400, 1200, nan, 0.07, nan ], [ nan, 500, 1500, nan, 0.11, nan ], [ nan, 600, 1800, nan, 0.16, nan ], [ nan, 700, 2100, nan, 0.21, nan ], [ nan, 800, 2400, nan, 0.27, nan ], [ nan, 900, 2700, nan, 0.33, nan ], [ nan, 1000, 3000, nan, 0.41, nan ], [ nan, 2000, 6000, nan, 1.76, nan ], [ nan, 3000, 9000, nan, 4.72, nan ], [ nan, 4000, 12000, nan, 9.72, nan ], [ nan, 5000, 15000, nan, 17.39, nan ], [ nan, 6000, 18000, nan, 28.11, nan ], [ nan, 7000, 21000, nan, 42.57, nan ], [ nan, 8000, 24000, nan, 61.30, nan ], [ nan, 9000, 27000, nan, 85.19, nan ], [ nan, 10000, 100, nan, 0.03, nan ], [ nan, 20000, 200, nan, 0.08, nan ], [ nan, 30000, 300, nan, 0.27, nan ], [ nan, 40000, 400, nan, 0.51, nan ], [ nan, 50000, 500, nan, 1.11, nan ], [ nan, 60000, 600, nan, 1.19, nan ], [ nan, 70000, 700, nan, 1.62, nan ], [ nan, 80000, 800, nan, 2.20, nan ], [ nan, 90000, 900, nan, 3.32, nan ], [ nan, 100000, 1000, nan, 4.15, nan ], [ nan, 200000, 2000, nan, 24.47, nan ], [ nan, 100, 10000, nan, 0.02, nan ], [ nan, 200, 20000, nan, 0.09, nan ], [ nan, 300, 30000, nan, 0.23, nan ], [ nan, 400, 40000, nan, 0.45, nan ], [ nan, 500, 50000, nan, 0.78, nan ], [ nan, 600, 60000, nan, 1.26, nan ], [ nan, 700, 70000, nan, 1.90, nan ], [ nan, 800, 80000, nan, 2.82, nan ], [ nan, 900, 90000, nan, 3.48, nan ], [ nan, 1000, 100000, nan, 4.47, nan ], [ nan, 2000, 200000, nan, 28.57, nan ], ]) # numactl --interleave=all ../testing/testing_cgesvd -US -VS -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 cgesvd_US = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.01, nan ], [ nan, 70, 70, nan, 0.01, nan ], [ nan, 80, 80, nan, 0.01, nan ], [ nan, 90, 90, nan, 0.01, nan ], [ nan, 100, 100, nan, 0.02, nan ], [ nan, 200, 200, nan, 0.02, nan ], [ nan, 300, 300, nan, 0.05, nan ], [ nan, 400, 400, nan, 0.09, nan ], [ nan, 500, 500, nan, 0.15, nan ], [ nan, 600, 600, nan, 0.21, nan ], [ nan, 700, 700, nan, 0.29, nan ], [ nan, 800, 800, nan, 0.38, nan ], [ nan, 900, 900, nan, 0.49, nan ], [ nan, 1000, 1000, nan, 0.62, nan ], [ nan, 2000, 2000, nan, 3.06, nan ], [ nan, 3000, 3000, nan, 9.19, nan ], [ nan, 4000, 4000, nan, 19.73, nan ], [ nan, 5000, 5000, nan, 38.32, nan ], [ nan, 6000, 6000, nan, 64.95, nan ], [ nan, 7000, 7000, nan, 104.35, nan ], [ nan, 8000, 8000, nan, 152.36, nan ], [ nan, 9000, 9000, nan, 228.85, nan ], [ nan, 10000, 10000, nan, 318.21, nan ], [ nan, 300, 100, nan, 0.03, nan ], [ nan, 600, 200, nan, 0.04, nan ], [ nan, 900, 300, nan, 0.08, nan ], [ nan, 1200, 400, nan, 0.15, nan ], [ nan, 1500, 500, nan, 0.23, nan ], [ nan, 1800, 600, nan, 0.35, nan ], [ nan, 2100, 700, nan, 0.49, nan ], [ nan, 2400, 800, nan, 0.65, nan ], [ nan, 2700, 900, nan, 0.85, nan ], [ nan, 3000, 1000, nan, 1.16, nan ], [ nan, 6000, 2000, nan, 6.55, nan ], [ nan, 9000, 3000, nan, 18.25, nan ], [ nan, 12000, 4000, nan, 32.23, nan ], [ nan, 15000, 5000, nan, 54.41, nan ], [ nan, 18000, 6000, nan, 91.60, nan ], [ nan, 21000, 7000, nan, 142.99, nan ], [ nan, 24000, 8000, nan, 199.30, nan ], [ nan, 27000, 9000, nan, 291.64, nan ], [ nan, 100, 300, nan, 0.02, nan ], [ nan, 200, 600, nan, 0.07, nan ], [ nan, 300, 900, nan, 0.20, nan ], [ nan, 400, 1200, nan, 0.42, nan ], [ nan, 500, 1500, nan, 0.76, nan ], [ nan, 600, 1800, nan, 1.26, nan ], [ nan, 700, 2100, nan, 2.00, nan ], [ nan, 800, 2400, nan, 2.84, nan ], [ nan, 900, 2700, nan, 3.92, nan ], [ nan, 1000, 3000, nan, 5.81, nan ], [ nan, 2000, 6000, nan, 45.92, nan ], [ nan, 3000, 9000, nan, 150.94, nan ], [ nan, 4000, 12000, nan, 344.05, nan ], [ nan, 5000, 15000, nan, 662.96, nan ], [ nan, 6000, 18000, nan, 1134.65, nan ], [ nan, 7000, 21000, nan, 1763.91, nan ], [ nan, 8000, 24000, nan, 2454.96, nan ], [ nan, 9000, 27000, nan, 3673.78, nan ], [ nan, 10000, 100, nan, 0.07, nan ], [ nan, 20000, 200, nan, 0.20, nan ], [ nan, 30000, 300, nan, 0.53, nan ], [ nan, 40000, 400, nan, 1.18, nan ], [ nan, 50000, 500, nan, 1.98, nan ], [ nan, 60000, 600, nan, 3.21, nan ], [ nan, 70000, 700, nan, 4.66, nan ], [ nan, 80000, 800, nan, 6.69, nan ], [ nan, 90000, 900, nan, 9.56, nan ], [ nan, 100000, 1000, nan, 12.59, nan ], [ nan, 200000, 2000, nan, 88.63, nan ], [ nan, 100, 10000, nan, 0.23, nan ], [ nan, 200, 20000, nan, 1.97, nan ], [ nan, 300, 30000, nan, 6.28, nan ], [ nan, 400, 40000, nan, 14.25, nan ], [ nan, 500, 50000, nan, 25.16, nan ], [ nan, 600, 60000, nan, 44.44, nan ], [ nan, 700, 70000, nan, 67.91, nan ], [ nan, 800, 80000, nan, 104.45, nan ], [ nan, 900, 90000, nan, 144.65, nan ], [ nan, 1000, 100000, nan, 191.75, nan ], [ nan, 2000, 200000, nan, 1503.65, nan ], ]) # numactl --interleave=all ../testing/testing_cgesdd -UN -VN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 cgesdd_UN = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.00, nan ], [ nan, 80, 80, nan, 0.00, nan ], [ nan, 90, 90, nan, 0.00, nan ], [ nan, 100, 100, nan, 0.00, nan ], [ nan, 200, 200, nan, 0.01, nan ], [ nan, 300, 300, nan, 0.03, nan ], [ nan, 400, 400, nan, 0.05, nan ], [ nan, 500, 500, nan, 0.08, nan ], [ nan, 600, 600, nan, 0.11, nan ], [ nan, 700, 700, nan, 0.15, nan ], [ nan, 800, 800, nan, 0.19, nan ], [ nan, 900, 900, nan, 0.24, nan ], [ nan, 1000, 1000, nan, 0.29, nan ], [ nan, 2000, 2000, nan, 1.13, nan ], [ nan, 3000, 3000, nan, 2.92, nan ], [ nan, 4000, 4000, nan, 5.83, nan ], [ nan, 5000, 5000, nan, 10.13, nan ], [ nan, 6000, 6000, nan, 16.08, nan ], [ nan, 7000, 7000, nan, 23.89, nan ], [ nan, 8000, 8000, nan, 34.17, nan ], [ nan, 9000, 9000, nan, 46.88, nan ], [ nan, 10000, 10000, nan, 62.73, nan ], [ nan, 300, 100, nan, 0.00, nan ], [ nan, 600, 200, nan, 0.02, nan ], [ nan, 900, 300, nan, 0.04, nan ], [ nan, 1200, 400, nan, 0.07, nan ], [ nan, 1500, 500, nan, 0.10, nan ], [ nan, 1800, 600, nan, 0.14, nan ], [ nan, 2100, 700, nan, 0.19, nan ], [ nan, 2400, 800, nan, 0.24, nan ], [ nan, 2700, 900, nan, 0.32, nan ], [ nan, 3000, 1000, nan, 0.39, nan ], [ nan, 6000, 2000, nan, 1.73, nan ], [ nan, 9000, 3000, nan, 4.65, nan ], [ nan, 12000, 4000, nan, 9.58, nan ], [ nan, 15000, 5000, nan, 17.05, nan ], [ nan, 18000, 6000, nan, 27.46, nan ], [ nan, 21000, 7000, nan, 41.66, nan ], [ nan, 24000, 8000, nan, 74.53, nan ], [ nan, 27000, 9000, nan, 103.25, nan ], [ nan, 100, 300, nan, 0.00, nan ], [ nan, 200, 600, nan, 0.02, nan ], [ nan, 300, 900, nan, 0.04, nan ], [ nan, 400, 1200, nan, 0.08, nan ], [ nan, 500, 1500, nan, 0.12, nan ], [ nan, 600, 1800, nan, 0.17, nan ], [ nan, 700, 2100, nan, 0.22, nan ], [ nan, 800, 2400, nan, 0.29, nan ], [ nan, 900, 2700, nan, 0.37, nan ], [ nan, 1000, 3000, nan, 0.45, nan ], [ nan, 2000, 6000, nan, 2.10, nan ], [ nan, 3000, 9000, nan, 5.90, nan ], [ nan, 4000, 12000, nan, 12.55, nan ], [ nan, 5000, 15000, nan, 22.87, nan ], [ nan, 6000, 18000, nan, 37.76, nan ], [ nan, 7000, 21000, nan, 57.64, nan ], [ nan, 8000, 24000, nan, 82.74, nan ], [ nan, 9000, 27000, nan, 85.03, nan ], [ nan, 10000, 100, nan, 0.02, nan ], [ nan, 20000, 200, nan, 0.08, nan ], [ nan, 30000, 300, nan, 0.19, nan ], [ nan, 40000, 400, nan, 0.51, nan ], [ nan, 50000, 500, nan, 0.79, nan ], [ nan, 60000, 600, nan, 1.16, nan ], [ nan, 70000, 700, nan, 1.62, nan ], [ nan, 80000, 800, nan, 2.21, nan ], [ nan, 90000, 900, nan, 3.36, nan ], [ nan, 100000, 1000, nan, 4.19, nan ], [ nan, 200000, 2000, nan, 24.51, nan ], [ nan, 100, 10000, nan, 0.02, nan ], [ nan, 200, 20000, nan, 0.09, nan ], [ nan, 300, 30000, nan, 0.23, nan ], [ nan, 400, 40000, nan, 0.44, nan ], [ nan, 500, 50000, nan, 0.74, nan ], [ nan, 600, 60000, nan, 1.20, nan ], [ nan, 700, 70000, nan, 1.86, nan ], [ nan, 800, 80000, nan, 2.77, nan ], [ nan, 900, 90000, nan, 3.33, nan ], [ nan, 1000, 100000, nan, 4.32, nan ], [ nan, 2000, 200000, nan, 28.52, nan ], ]) # numactl --interleave=all ../testing/testing_cgesdd -US -VS -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 cgesdd_US = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.00, nan ], [ nan, 80, 80, nan, 0.00, nan ], [ nan, 90, 90, nan, 0.00, nan ], [ nan, 100, 100, nan, 0.00, nan ], [ nan, 200, 200, nan, 0.02, nan ], [ nan, 300, 300, nan, 0.05, nan ], [ nan, 400, 400, nan, 0.08, nan ], [ nan, 500, 500, nan, 0.11, nan ], [ nan, 600, 600, nan, 0.16, nan ], [ nan, 700, 700, nan, 0.21, nan ], [ nan, 800, 800, nan, 0.27, nan ], [ nan, 900, 900, nan, 0.34, nan ], [ nan, 1000, 1000, nan, 0.43, nan ], [ nan, 2000, 2000, nan, 1.69, nan ], [ nan, 3000, 3000, nan, 4.31, nan ], [ nan, 4000, 4000, nan, 8.28, nan ], [ nan, 5000, 5000, nan, 13.79, nan ], [ nan, 6000, 6000, nan, 21.55, nan ], [ nan, 7000, 7000, nan, 31.66, nan ], [ nan, 8000, 8000, nan, 44.57, nan ], [ nan, 9000, 9000, nan, 60.54, nan ], [ nan, 10000, 10000, nan, 80.15, nan ], [ nan, 300, 100, nan, 0.01, nan ], [ nan, 600, 200, nan, 0.03, nan ], [ nan, 900, 300, nan, 0.06, nan ], [ nan, 1200, 400, nan, 0.10, nan ], [ nan, 1500, 500, nan, 0.15, nan ], [ nan, 1800, 600, nan, 0.21, nan ], [ nan, 2100, 700, nan, 0.29, nan ], [ nan, 2400, 800, nan, 0.37, nan ], [ nan, 2700, 900, nan, 0.50, nan ], [ nan, 3000, 1000, nan, 0.62, nan ], [ nan, 6000, 2000, nan, 2.97, nan ], [ nan, 9000, 3000, nan, 8.21, nan ], [ nan, 12000, 4000, nan, 17.17, nan ], [ nan, 15000, 5000, nan, 30.84, nan ], [ nan, 18000, 6000, nan, 50.12, nan ], [ nan, 21000, 7000, nan, 76.50, nan ], [ nan, 24000, 8000, nan, 141.47, nan ], [ nan, 27000, 9000, nan, 153.96, nan ], [ nan, 100, 300, nan, 0.01, nan ], [ nan, 200, 600, nan, 0.03, nan ], [ nan, 300, 900, nan, 0.06, nan ], [ nan, 400, 1200, nan, 0.11, nan ], [ nan, 500, 1500, nan, 0.16, nan ], [ nan, 600, 1800, nan, 0.23, nan ], [ nan, 700, 2100, nan, 0.32, nan ], [ nan, 800, 2400, nan, 0.41, nan ], [ nan, 900, 2700, nan, 0.53, nan ], [ nan, 1000, 3000, nan, 0.65, nan ], [ nan, 2000, 6000, nan, 3.04, nan ], [ nan, 3000, 9000, nan, 8.42, nan ], [ nan, 4000, 12000, nan, 17.51, nan ], [ nan, 5000, 15000, nan, 31.34, nan ], [ nan, 6000, 18000, nan, 68.91, nan ], [ nan, 7000, 21000, nan, 77.48, nan ], [ nan, 8000, 24000, nan, 112.14, nan ], [ nan, 9000, 27000, nan, 155.68, nan ], [ nan, 10000, 100, nan, 0.04, nan ], [ nan, 20000, 200, nan, 0.18, nan ], [ nan, 30000, 300, nan, 0.46, nan ], [ nan, 40000, 400, nan, 1.07, nan ], [ nan, 50000, 500, nan, 1.78, nan ], [ nan, 60000, 600, nan, 2.94, nan ], [ nan, 70000, 700, nan, 4.08, nan ], [ nan, 80000, 800, nan, 5.89, nan ], [ nan, 90000, 900, nan, 8.13, nan ], [ nan, 100000, 1000, nan, 10.32, nan ], [ nan, 200000, 2000, nan, 69.11, nan ], [ nan, 100, 10000, nan, 0.06, nan ], [ nan, 200, 20000, nan, 0.24, nan ], [ nan, 300, 30000, nan, 0.65, nan ], [ nan, 400, 40000, nan, 1.29, nan ], [ nan, 500, 50000, nan, 2.28, nan ], [ nan, 600, 60000, nan, 3.92, nan ], [ nan, 700, 70000, nan, 5.86, nan ], [ nan, 800, 80000, nan, 7.78, nan ], [ nan, 900, 90000, nan, 7.62, nan ], [ nan, 1000, 100000, nan, 9.68, nan ], [ nan, 2000, 200000, nan, 57.84, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/cgetrf.txt # numactl --interleave=all ../testing/testing_cgetrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 cgetrf = array([ [ 10, 10, nan, nan, 0.24, 0.00, nan ], [ 20, 20, nan, nan, 0.75, 0.00, nan ], [ 30, 30, nan, nan, 1.79, 0.00, nan ], [ 40, 40, nan, nan, 3.53, 0.00, nan ], [ 50, 50, nan, nan, 4.87, 0.00, nan ], [ 60, 60, nan, nan, 5.56, 0.00, nan ], [ 70, 70, nan, nan, 1.04, 0.00, nan ], [ 80, 80, nan, nan, 1.50, 0.00, nan ], [ 90, 90, nan, nan, 2.07, 0.00, nan ], [ 100, 100, nan, nan, 2.68, 0.00, nan ], [ 200, 200, nan, nan, 12.27, 0.00, nan ], [ 300, 300, nan, nan, 28.70, 0.00, nan ], [ 400, 400, nan, nan, 47.89, 0.00, nan ], [ 500, 500, nan, nan, 71.91, 0.00, nan ], [ 600, 600, nan, nan, 96.13, 0.01, nan ], [ 700, 700, nan, nan, 123.22, 0.01, nan ], [ 800, 800, nan, nan, 151.84, 0.01, nan ], [ 900, 900, nan, nan, 180.86, 0.01, nan ], [ 1000, 1000, nan, nan, 211.73, 0.01, nan ], [ 2000, 2000, nan, nan, 528.57, 0.04, nan ], [ 3000, 3000, nan, nan, 882.00, 0.08, nan ], [ 4000, 4000, nan, nan, 1134.12, 0.15, nan ], [ 5000, 5000, nan, nan, 1295.05, 0.26, nan ], [ 6000, 6000, nan, nan, 1537.40, 0.37, nan ], [ 7000, 7000, nan, nan, 1710.51, 0.53, nan ], [ 8000, 8000, nan, nan, 1861.76, 0.73, nan ], [ 9000, 9000, nan, nan, 1918.72, 1.01, nan ], [ 10000, 10000, nan, nan, 2032.62, 1.31, nan ], [ 12000, 12000, nan, nan, 2204.18, 2.09, nan ], [ 14000, 14000, nan, nan, 2327.20, 3.14, nan ], [ 16000, 16000, nan, nan, 2409.66, 4.53, nan ], [ 18000, 18000, nan, nan, 2464.08, 6.31, nan ], [ 20000, 20000, nan, nan, 2521.36, 8.46, nan ], ]) # numactl --interleave=all ../testing/testing_cgetrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 cgetrf_gpu = array([ [ 10, 10, nan, nan, 0.01, 0.00, nan ], [ 20, 20, nan, nan, 0.06, 0.00, nan ], [ 30, 30, nan, nan, 0.20, 0.00, nan ], [ 40, 40, nan, nan, 0.45, 0.00, nan ], [ 50, 50, nan, nan, 0.79, 0.00, nan ], [ 60, 60, nan, nan, 1.24, 0.00, nan ], [ 70, 70, nan, nan, 0.45, 0.00, nan ], [ 80, 80, nan, nan, 0.67, 0.00, nan ], [ 90, 90, nan, nan, 0.92, 0.00, nan ], [ 100, 100, nan, nan, 1.22, 0.00, nan ], [ 200, 200, nan, nan, 6.40, 0.00, nan ], [ 300, 300, nan, nan, 16.85, 0.00, nan ], [ 400, 400, nan, nan, 31.71, 0.01, nan ], [ 500, 500, nan, nan, 49.86, 0.01, nan ], [ 600, 600, nan, nan, 70.11, 0.01, nan ], [ 700, 700, nan, nan, 92.57, 0.01, nan ], [ 800, 800, nan, nan, 118.35, 0.01, nan ], [ 900, 900, nan, nan, 143.45, 0.01, nan ], [ 1000, 1000, nan, nan, 176.99, 0.02, nan ], [ 2000, 2000, nan, nan, 474.03, 0.04, nan ], [ 3000, 3000, nan, nan, 821.59, 0.09, nan ], [ 4000, 4000, nan, nan, 1153.80, 0.15, nan ], [ 5000, 5000, nan, nan, 1450.97, 0.23, nan ], [ 6000, 6000, nan, nan, 1739.32, 0.33, nan ], [ 7000, 7000, nan, nan, 1932.86, 0.47, nan ], [ 8000, 8000, nan, nan, 2097.77, 0.65, nan ], [ 9000, 9000, nan, nan, 2053.40, 0.95, nan ], [ 10000, 10000, nan, nan, 2184.81, 1.22, nan ], [ 12000, 12000, nan, nan, 2374.47, 1.94, nan ], [ 14000, 14000, nan, nan, 2499.31, 2.93, nan ], [ 16000, 16000, nan, nan, 2582.38, 4.23, nan ], [ 18000, 18000, nan, nan, 2627.16, 5.92, nan ], [ 20000, 20000, nan, nan, 2676.83, 7.97, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/cheevd.txt # numactl --interleave=all ../testing/testing_cheevd -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_cheevd -JN -N 123 -N 1234 --range 12000:20000:2000 cheevd_JN = array([ [ 10, nan, 0.0000, nan, nan, nan, nan ], [ 20, nan, 0.0001, nan, nan, nan, nan ], [ 30, nan, 0.0001, nan, nan, nan, nan ], [ 40, nan, 0.0001, nan, nan, nan, nan ], [ 50, nan, 0.0002, nan, nan, nan, nan ], [ 60, nan, 0.0003, nan, nan, nan, nan ], [ 70, nan, 0.0005, nan, nan, nan, nan ], [ 80, nan, 0.0007, nan, nan, nan, nan ], [ 90, nan, 0.0009, nan, nan, nan, nan ], [ 100, nan, 0.0012, nan, nan, nan, nan ], [ 200, nan, 0.0048, nan, nan, nan, nan ], [ 300, nan, 0.0094, nan, nan, nan, nan ], [ 400, nan, 0.0156, nan, nan, nan, nan ], [ 500, nan, 0.0229, nan, nan, nan, nan ], [ 600, nan, 0.0324, nan, nan, nan, nan ], [ 700, nan, 0.0442, nan, nan, nan, nan ], [ 800, nan, 0.0572, nan, nan, nan, nan ], [ 900, nan, 0.0739, nan, nan, nan, nan ], [ 1000, nan, 0.0906, nan, nan, nan, nan ], [ 2000, nan, 0.4168, nan, nan, nan, nan ], [ 3000, nan, 1.2620, nan, nan, nan, nan ], [ 4000, nan, 2.2903, nan, nan, nan, nan ], [ 5000, nan, 3.7342, nan, nan, nan, nan ], [ 6000, nan, 5.5810, nan, nan, nan, nan ], [ 7000, nan, 8.0046, nan, nan, nan, nan ], [ 8000, nan, 10.9571, nan, nan, nan, nan ], [ 9000, nan, 14.7192, nan, nan, nan, nan ], [ 10000, nan, 19.1044, nan, nan, nan, nan ], [ 12000, nan, 30.6692, nan, nan, nan, nan ], [ 14000, nan, 45.5317, nan, nan, nan, nan ], [ 16000, nan, 65.0317, nan, nan, nan, nan ], [ 18000, nan, 90.1935, nan, nan, nan, nan ], [ 20000, nan, 118.9253, nan, nan, nan, nan ], ]) # numactl --interleave=all ../testing/testing_cheevd -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_cheevd -JV -N 123 -N 1234 --range 12000:20000:2000 cheevd_JV = array([ [ 10, nan, 0.0001, nan, nan, nan, nan ], [ 20, nan, 0.0002, nan, nan, nan, nan ], [ 30, nan, 0.0002, nan, nan, nan, nan ], [ 40, nan, 0.0004, nan, nan, nan, nan ], [ 50, nan, 0.0005, nan, nan, nan, nan ], [ 60, nan, 0.0006, nan, nan, nan, nan ], [ 70, nan, 0.0009, nan, nan, nan, nan ], [ 80, nan, 0.0011, nan, nan, nan, nan ], [ 90, nan, 0.0014, nan, nan, nan, nan ], [ 100, nan, 0.0017, nan, nan, nan, nan ], [ 200, nan, 0.0092, nan, nan, nan, nan ], [ 300, nan, 0.0148, nan, nan, nan, nan ], [ 400, nan, 0.0242, nan, nan, nan, nan ], [ 500, nan, 0.0347, nan, nan, nan, nan ], [ 600, nan, 0.0421, nan, nan, nan, nan ], [ 700, nan, 0.0556, nan, nan, nan, nan ], [ 800, nan, 0.0705, nan, nan, nan, nan ], [ 900, nan, 0.0886, nan, nan, nan, nan ], [ 1000, nan, 0.1098, nan, nan, nan, nan ], [ 2000, nan, 0.4374, nan, nan, nan, nan ], [ 3000, nan, 1.4212, nan, nan, nan, nan ], [ 4000, nan, 2.6029, nan, nan, nan, nan ], [ 5000, nan, 4.2259, nan, nan, nan, nan ], [ 6000, nan, 6.4208, nan, nan, nan, nan ], [ 7000, nan, 9.2599, nan, nan, nan, nan ], [ 8000, nan, 12.7538, nan, nan, nan, nan ], [ 9000, nan, 17.2134, nan, nan, nan, nan ], [ 10000, nan, 22.4110, nan, nan, nan, nan ], [ 12000, nan, 36.7797, nan, nan, nan, nan ], [ 14000, nan, 54.8882, nan, nan, nan, nan ], [ 16000, nan, 78.0173, nan, nan, nan, nan ], [ 18000, nan, 108.8207, nan, nan, nan, nan ], [ 20000, nan, 143.8242, nan, nan, nan, nan ], ]) # numactl --interleave=all ../testing/testing_cheevd_gpu -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_cheevd_gpu -JN -N 123 -N 1234 --range 12000:20000:2000 cheevd_gpu_JN = array([ [ 10, nan, 0.0002, nan, nan, nan, nan ], [ 20, nan, 0.0002, nan, nan, nan, nan ], [ 30, nan, 0.0002, nan, nan, nan, nan ], [ 40, nan, 0.0003, nan, nan, nan, nan ], [ 50, nan, 0.0003, nan, nan, nan, nan ], [ 60, nan, 0.0004, nan, nan, nan, nan ], [ 70, nan, 0.0007, nan, nan, nan, nan ], [ 80, nan, 0.0009, nan, nan, nan, nan ], [ 90, nan, 0.0011, nan, nan, nan, nan ], [ 100, nan, 0.0014, nan, nan, nan, nan ], [ 200, nan, 0.0049, nan, nan, nan, nan ], [ 300, nan, 0.0095, nan, nan, nan, nan ], [ 400, nan, 0.0159, nan, nan, nan, nan ], [ 500, nan, 0.0230, nan, nan, nan, nan ], [ 600, nan, 0.0317, nan, nan, nan, nan ], [ 700, nan, 0.0431, nan, nan, nan, nan ], [ 800, nan, 0.0546, nan, nan, nan, nan ], [ 900, nan, 0.0697, nan, nan, nan, nan ], [ 1000, nan, 0.0843, nan, nan, nan, nan ], [ 2000, nan, 0.3551, nan, nan, nan, nan ], [ 3000, nan, 1.2662, nan, nan, nan, nan ], [ 4000, nan, 2.2914, nan, nan, nan, nan ], [ 5000, nan, 3.7343, nan, nan, nan, nan ], [ 6000, nan, 5.5809, nan, nan, nan, nan ], [ 7000, nan, 7.9963, nan, nan, nan, nan ], [ 8000, nan, 10.9362, nan, nan, nan, nan ], [ 9000, nan, 14.7066, nan, nan, nan, nan ], [ 10000, nan, 19.0569, nan, nan, nan, nan ], [ 12000, nan, 30.6401, nan, nan, nan, nan ], [ 14000, nan, 45.3730, nan, nan, nan, nan ], [ 16000, nan, 65.0345, nan, nan, nan, nan ], [ 18000, nan, 89.8408, nan, nan, nan, nan ], [ 20000, nan, 118.9498, nan, nan, nan, nan ], ]) # numactl --interleave=all ../testing/testing_cheevd_gpu -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_cheevd_gpu -JV -N 123 -N 1234 --range 12000:20000:2000 cheevd_gpu_JV = array([ [ 10, nan, 0.0004, nan, nan, nan, nan ], [ 20, nan, 0.0004, nan, nan, nan, nan ], [ 30, nan, 0.0005, nan, nan, nan, nan ], [ 40, nan, 0.0007, nan, nan, nan, nan ], [ 50, nan, 0.0008, nan, nan, nan, nan ], [ 60, nan, 0.0010, nan, nan, nan, nan ], [ 70, nan, 0.0013, nan, nan, nan, nan ], [ 80, nan, 0.0015, nan, nan, nan, nan ], [ 90, nan, 0.0019, nan, nan, nan, nan ], [ 100, nan, 0.0023, nan, nan, nan, nan ], [ 200, nan, 0.0104, nan, nan, nan, nan ], [ 300, nan, 0.0174, nan, nan, nan, nan ], [ 400, nan, 0.0289, nan, nan, nan, nan ], [ 500, nan, 0.0409, nan, nan, nan, nan ], [ 600, nan, 0.0516, nan, nan, nan, nan ], [ 700, nan, 0.0696, nan, nan, nan, nan ], [ 800, nan, 0.0879, nan, nan, nan, nan ], [ 900, nan, 0.1108, nan, nan, nan, nan ], [ 1000, nan, 0.1354, nan, nan, nan, nan ], [ 2000, nan, 0.5875, nan, nan, nan, nan ], [ 3000, nan, 1.4799, nan, nan, nan, nan ], [ 4000, nan, 2.6911, nan, nan, nan, nan ], [ 5000, nan, 4.3855, nan, nan, nan, nan ], [ 6000, nan, 6.6081, nan, nan, nan, nan ], [ 7000, nan, 9.4027, nan, nan, nan, nan ], [ 8000, nan, 12.9168, nan, nan, nan, nan ], [ 9000, nan, 17.3143, nan, nan, nan, nan ], [ 10000, nan, 22.7453, nan, nan, nan, nan ], [ 12000, nan, 36.8039, nan, nan, nan, nan ], [ 14000, nan, 55.2819, nan, nan, nan, nan ], [ 16000, nan, 79.4427, nan, nan, nan, nan ], [ 18000, nan, 110.5094, nan, nan, nan, nan ], [ 20000, nan, 148.1804, nan, nan, nan, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/cheevd_2stage.txt # numactl --interleave=all ../testing/testing_cheevdx_2stage -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 cheevdx_2stage_JN = array([ [ 10, 10, 0.00 ], [ 20, 20, 0.00 ], [ 30, 30, 0.00 ], [ 40, 40, 0.00 ], [ 50, 50, 0.00 ], [ 60, 60, 0.00 ], [ 70, 70, 0.00 ], [ 80, 80, 0.00 ], [ 90, 90, 0.00 ], [ 100, 100, 0.00 ], [ 200, 200, 0.00 ], [ 300, 300, 0.02 ], [ 400, 400, 0.04 ], [ 500, 500, 0.06 ], [ 600, 600, 0.09 ], [ 700, 700, 0.11 ], [ 800, 800, 0.13 ], [ 900, 900, 0.16 ], [ 1000, 1000, 0.17 ], [ 2000, 2000, 0.45 ], [ 3000, 3000, 0.81 ], [ 4000, 4000, 1.26 ], [ 5000, 5000, 1.91 ], [ 6000, 6000, 2.46 ], [ 7000, 7000, 3.21 ], [ 8000, 8000, 4.15 ], [ 9000, 9000, 5.31 ], [ 10000, 10000, 6.75 ], [ 12000, 12000, 9.83 ], [ 14000, 14000, 13.76 ], [ 16000, 16000, 18.61 ], [ 18000, 18000, 24.65 ], [ 20000, 20000, 32.06 ], ]) # numactl --interleave=all ../testing/testing_cheevdx_2stage -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 cheevdx_2stage_JV = array([ [ 10, 10, 0.00 ], [ 20, 20, 0.00 ], [ 30, 30, 0.00 ], [ 40, 40, 0.00 ], [ 50, 50, 0.00 ], [ 60, 60, 0.00 ], [ 70, 70, 0.00 ], [ 80, 80, 0.00 ], [ 90, 90, 0.00 ], [ 100, 100, 0.00 ], [ 200, 200, 0.01 ], [ 300, 300, 0.03 ], [ 400, 400, 0.05 ], [ 500, 500, 0.08 ], [ 600, 600, 0.10 ], [ 700, 700, 0.12 ], [ 800, 800, 0.15 ], [ 900, 900, 0.18 ], [ 1000, 1000, 0.21 ], [ 2000, 2000, 0.60 ], [ 3000, 3000, 1.16 ], [ 4000, 4000, 2.03 ], [ 5000, 5000, 3.25 ], [ 6000, 6000, 4.99 ], [ 7000, 7000, 7.15 ], [ 8000, 8000, 9.77 ], [ 9000, 9000, 13.08 ], [ 10000, 10000, 17.55 ], [ 12000, 12000, 28.13 ], [ 14000, 14000, 42.38 ], [ 16000, 16000, 61.25 ], [ 18000, 18000, 86.19 ], [ 20000, 20000, 116.90 ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/chemv.txt # numactl --interleave=all ../testing/testing_chemv -L -N 123 -N 1234 --range 10:90:1 --range 100:900:10 --range 1000:9000:100 --range 10000:20000:2000 chemv_L = array([ [ 10, 0.03, 0.03, 0.03, 0.03, 0.04, 0.02, 0.48, 0.00, 2.13e-07, 2.13e-07, 2.70e-07, nan ], [ 11, 0.04, 0.03, 0.04, 0.03, 0.05, 0.02, 0.58, 0.00, 1.94e-07, 1.85e-07, 1.23e-07, nan ], [ 12, 0.04, 0.03, 0.04, 0.03, 0.06, 0.02, 0.68, 0.00, 1.12e-07, 1.12e-07, 1.12e-07, nan ], [ 13, 0.05, 0.03, 0.05, 0.03, 0.07, 0.02, 0.79, 0.00, 1.64e-07, 2.07e-07, 1.64e-07, nan ], [ 14, 0.06, 0.03, 0.06, 0.03, 0.08, 0.02, 0.91, 0.00, 2.81e-07, 2.46e-07, 2.81e-07, nan ], [ 15, 0.06, 0.03, 0.07, 0.03, 0.09, 0.02, 0.64, 0.00, 1.42e-07, 1.80e-07, 2.84e-07, nan ], [ 16, 0.07, 0.03, 0.08, 0.03, 0.11, 0.02, 1.17, 0.00, 1.69e-07, 1.69e-07, 1.69e-07, nan ], [ 17, 0.07, 0.04, 0.08, 0.03, 0.11, 0.02, 1.17, 0.00, 1.59e-07, 2.51e-07, 1.59e-07, nan ], [ 18, 0.08, 0.03, 0.09, 0.03, 0.12, 0.02, 1.47, 0.00, 2.14e-07, 2.18e-07, 2.18e-07, nan ], [ 19, 0.09, 0.03, 0.10, 0.03, 0.13, 0.02, 1.09, 0.00, 2.04e-07, 2.01e-07, 1.25e-07, nan ], [ 20, 0.10, 0.03, 0.11, 0.03, 0.14, 0.02, 1.80, 0.00, 1.97e-07, 2.13e-07, 1.97e-07, nan ], [ 21, 0.11, 0.03, 0.12, 0.03, 0.16, 0.02, 1.22, 0.00, 2.03e-07, 2.57e-07, 2.57e-07, nan ], [ 22, 0.12, 0.03, 0.13, 0.03, 0.18, 0.02, 1.33, 0.00, 1.94e-07, 2.33e-07, 1.94e-07, nan ], [ 23, 0.13, 0.03, 0.14, 0.03, 0.19, 0.02, 1.58, 0.00, 1.71e-07, 1.67e-07, 2.49e-07, nan ], [ 24, 0.14, 0.03, 0.15, 0.03, 0.21, 0.02, 2.57, 0.00, 1.64e-07, 2.44e-07, 1.87e-07, nan ], [ 25, 0.15, 0.04, 0.17, 0.03, 0.22, 0.02, 1.71, 0.00, 2.56e-07, 2.29e-07, 2.16e-07, nan ], [ 26, 0.18, 0.03, 0.18, 0.03, 0.23, 0.03, 1.85, 0.00, 1.64e-07, 1.55e-07, 1.64e-07, nan ], [ 27, 0.18, 0.03, 0.19, 0.03, 0.26, 0.02, 1.99, 0.00, 2.15e-07, 1.58e-07, 2.23e-07, nan ], [ 28, 0.21, 0.03, 0.21, 0.03, 0.30, 0.02, 2.13, 0.00, 2.15e-07, 2.46e-07, 1.52e-07, nan ], [ 29, 0.22, 0.03, 0.23, 0.03, 0.31, 0.02, 2.28, 0.00, 2.94e-07, 2.71e-07, 2.21e-07, nan ], [ 30, 0.24, 0.03, 0.24, 0.03, 0.34, 0.02, 2.64, 0.00, 2.29e-07, 2.29e-07, 2.62e-07, nan ], [ 31, 0.26, 0.03, 0.26, 0.03, 0.35, 0.02, 1.99, 0.00, 1.54e-07, 2.54e-07, 1.54e-07, nan ], [ 32, 0.27, 0.03, 0.29, 0.03, 0.39, 0.02, 2.77, 0.00, 1.33e-07, 2.46e-07, 1.49e-07, nan ], [ 33, 0.27, 0.03, 0.24, 0.04, 0.37, 0.02, 2.25, 0.00, 2.55e-07, 2.33e-07, 2.08e-07, nan ], [ 34, 0.30, 0.03, 0.26, 0.04, 0.40, 0.02, 3.38, 0.00, 2.80e-07, 2.31e-07, 3.17e-07, nan ], [ 35, 0.33, 0.03, 0.28, 0.04, 0.42, 0.02, 2.52, 0.00, 2.25e-07, 2.44e-07, 2.44e-07, nan ], [ 36, 0.33, 0.03, 0.28, 0.04, 0.43, 0.03, 2.66, 0.00, 3.35e-07, 2.37e-07, 2.37e-07, nan ], [ 37, 0.36, 0.03, 0.31, 0.04, 0.44, 0.03, 2.81, 0.00, 2.31e-07, 3.26e-07, 2.13e-07, nan ], [ 38, 0.36, 0.03, 0.33, 0.04, 0.48, 0.03, 2.96, 0.00, 3.62e-07, 3.17e-07, 3.05e-07, nan ], [ 39, 0.40, 0.03, 0.34, 0.04, 0.49, 0.03, 2.52, 0.01, 2.19e-07, 2.19e-07, 1.96e-07, nan ], [ 40, 0.40, 0.03, 0.36, 0.04, 0.54, 0.02, 4.28, 0.00, 2.90e-07, 3.02e-07, 2.90e-07, nan ], [ 41, 0.42, 0.03, 0.38, 0.04, 0.56, 0.03, 3.65, 0.00, 3.12e-07, 2.83e-07, 2.83e-07, nan ], [ 42, 0.44, 0.03, 0.41, 0.04, 0.56, 0.03, 2.92, 0.01, 2.76e-07, 2.72e-07, 1.87e-07, nan ], [ 43, 0.44, 0.04, 0.41, 0.04, 0.59, 0.03, 3.78, 0.00, 2.81e-07, 2.81e-07, 2.88e-07, nan ], [ 44, 0.44, 0.04, 0.43, 0.04, 0.65, 0.02, 3.95, 0.00, 2.82e-07, 2.68e-07, 1.94e-07, nan ], [ 45, 0.51, 0.03, 0.45, 0.04, 0.64, 0.03, 4.13, 0.00, 3.42e-07, 2.62e-07, 2.12e-07, nan ], [ 46, 0.53, 0.03, 0.47, 0.04, 0.70, 0.03, 3.49, 0.01, 2.52e-07, 2.62e-07, 3.52e-07, nan ], [ 47, 0.52, 0.04, 0.49, 0.04, 0.73, 0.03, 3.64, 0.01, 2.19e-07, 2.47e-07, 2.72e-07, nan ], [ 48, 0.56, 0.03, 0.51, 0.04, 0.76, 0.03, 3.80, 0.01, 2.87e-07, 3.55e-07, 2.87e-07, nan ], [ 49, 0.58, 0.03, 0.54, 0.04, 0.73, 0.03, 3.95, 0.01, 2.81e-07, 2.34e-07, 2.37e-07, nan ], [ 50, 0.61, 0.03, 0.55, 0.04, 0.73, 0.03, 4.11, 0.01, 3.08e-07, 2.75e-07, 2.44e-07, nan ], [ 51, 0.62, 0.03, 0.56, 0.04, 0.82, 0.03, 3.59, 0.01, 3.74e-07, 2.72e-07, 2.70e-07, nan ], [ 52, 0.62, 0.04, 0.58, 0.04, 0.80, 0.03, 4.45, 0.01, 2.75e-07, 2.23e-07, 1.83e-07, nan ], [ 53, 0.64, 0.04, 0.61, 0.04, 0.85, 0.03, 4.62, 0.01, 2.62e-07, 3.62e-07, 3.62e-07, nan ], [ 54, 0.73, 0.03, 0.61, 0.04, 0.92, 0.03, 4.79, 0.01, 3.53e-07, 3.00e-07, 3.16e-07, nan ], [ 55, 0.71, 0.04, 0.66, 0.04, 0.92, 0.03, 4.17, 0.01, 2.54e-07, 3.47e-07, 2.50e-07, nan ], [ 56, 0.74, 0.04, 0.66, 0.04, 0.95, 0.03, 5.15, 0.01, 2.91e-07, 2.07e-07, 2.91e-07, nan ], [ 57, 0.79, 0.03, 0.70, 0.04, 0.99, 0.03, 4.48, 0.01, 2.24e-07, 2.70e-07, 2.70e-07, nan ], [ 58, 0.81, 0.03, 0.71, 0.04, 1.06, 0.03, 3.99, 0.01, 2.71e-07, 2.71e-07, 2.37e-07, nan ], [ 59, 0.86, 0.03, 0.73, 0.04, 1.06, 0.03, 3.99, 0.01, 2.74e-07, 3.77e-07, 4.34e-07, nan ], [ 60, 0.89, 0.03, 0.76, 0.04, 1.10, 0.03, 5.90, 0.01, 2.62e-07, 2.62e-07, 2.72e-07, nan ], [ 61, 0.85, 0.04, 0.78, 0.04, 1.09, 0.03, 6.09, 0.01, 2.50e-07, 2.52e-07, 2.25e-07, nan ], [ 62, 0.90, 0.03, 0.81, 0.04, 1.17, 0.03, 4.40, 0.01, 2.75e-07, 2.54e-07, 2.75e-07, nan ], [ 63, 0.95, 0.03, 0.83, 0.04, 1.21, 0.03, 5.45, 0.01, 2.71e-07, 2.71e-07, 3.03e-07, nan ], [ 64, 1.16, 0.03, 0.91, 0.04, 1.23, 0.03, 5.63, 0.01, 4.00e-07, 3.77e-07, 3.63e-07, nan ], [ 65, 0.94, 0.04, 0.88, 0.04, 1.23, 0.03, 5.80, 0.01, 3.16e-07, 2.42e-07, 2.93e-07, nan ], [ 66, 0.96, 0.04, 0.92, 0.04, 1.28, 0.03, 5.15, 0.01, 4.62e-07, 3.66e-07, 2.89e-07, nan ], [ 67, 1.02, 0.04, 0.94, 0.04, 1.32, 0.03, 6.16, 0.01, 3.42e-07, 3.43e-07, 3.43e-07, nan ], [ 68, 1.02, 0.04, 0.94, 0.04, 1.31, 0.03, 6.34, 0.01, 4.52e-07, 3.55e-07, 2.80e-07, nan ], [ 69, 1.05, 0.04, 1.00, 0.04, 1.31, 0.03, 7.77, 0.01, 2.76e-07, 2.47e-07, 3.36e-07, nan ], [ 70, 1.08, 0.04, 1.02, 0.04, 1.33, 0.03, 5.79, 0.01, 4.39e-07, 4.49e-07, 4.39e-07, nan ], [ 71, 1.08, 0.04, 1.03, 0.04, 1.37, 0.03, 5.76, 0.01, 6.65e-07, 7.60e-07, 7.99e-07, nan ], [ 72, 1.15, 0.04, 1.06, 0.04, 1.41, 0.03, 7.10, 0.01, 3.18e-07, 3.28e-07, 3.18e-07, nan ], [ 73, 1.18, 0.04, 1.09, 0.04, 1.45, 0.03, 6.29, 0.01, 3.77e-07, 3.30e-07, 3.30e-07, nan ], [ 74, 1.14, 0.04, 1.12, 0.04, 1.44, 0.03, 5.51, 0.01, 3.26e-07, 3.14e-07, 3.46e-07, nan ], [ 75, 1.24, 0.04, 1.15, 0.04, 1.54, 0.03, 5.07, 0.01, 3.22e-07, 3.05e-07, 3.26e-07, nan ], [ 76, 1.24, 0.04, 1.18, 0.04, 1.57, 0.03, 6.59, 0.01, 4.14e-07, 3.05e-07, 3.17e-07, nan ], [ 77, 1.27, 0.04, 1.21, 0.04, 1.62, 0.03, 6.99, 0.01, 4.03e-07, 3.99e-07, 3.22e-07, nan ], [ 78, 1.30, 0.04, 1.24, 0.04, 1.60, 0.03, 6.94, 0.01, 3.09e-07, 4.18e-07, 3.28e-07, nan ], [ 79, 1.33, 0.04, 1.27, 0.04, 1.64, 0.03, 7.11, 0.01, 3.05e-07, 3.98e-07, 3.24e-07, nan ], [ 80, 1.30, 0.04, 1.30, 0.04, 1.74, 0.03, 6.43, 0.01, 2.90e-07, 3.81e-07, 3.44e-07, nan ], [ 81, 1.40, 0.04, 1.30, 0.04, 1.72, 0.03, 7.47, 0.01, 3.16e-07, 3.40e-07, 3.16e-07, nan ], [ 82, 1.34, 0.04, 1.38, 0.04, 1.70, 0.03, 6.76, 0.01, 3.75e-07, 3.97e-07, 3.72e-07, nan ], [ 83, 1.40, 0.04, 1.37, 0.04, 1.76, 0.03, 7.13, 0.01, 4.11e-07, 4.11e-07, 4.69e-07, nan ], [ 84, 1.51, 0.04, 1.43, 0.04, 1.65, 0.03, 7.09, 0.01, 3.74e-07, 2.87e-07, 3.27e-07, nan ], [ 85, 1.59, 0.04, 1.47, 0.04, 1.90, 0.03, 8.51, 0.01, 4.23e-07, 2.84e-07, 2.69e-07, nan ], [ 86, 1.58, 0.04, 1.50, 0.04, 1.94, 0.03, 8.42, 0.01, 2.66e-07, 2.74e-07, 3.58e-07, nan ], [ 87, 1.67, 0.04, 1.50, 0.04, 1.93, 0.03, 8.61, 0.01, 3.62e-07, 3.51e-07, 2.77e-07, nan ], [ 88, 1.65, 0.04, 1.54, 0.04, 2.03, 0.03, 6.95, 0.01, 3.47e-07, 4.36e-07, 3.57e-07, nan ], [ 89, 1.47, 0.04, 1.53, 0.04, 2.02, 0.03, 8.19, 0.01, 2.71e-07, 3.53e-07, 3.46e-07, nan ], [ 90, 1.70, 0.04, 1.57, 0.04, 2.06, 0.03, 7.27, 0.01, 5.09e-07, 3.42e-07, 4.24e-07, nan ], [ 100, 1.94, 0.04, 1.94, 0.04, 2.32, 0.04, 10.32, 0.01, 2.41e-07, 2.41e-07, 2.16e-07, nan ], [ 110, 2.39, 0.04, 2.34, 0.04, 2.82, 0.03, 8.95, 0.01, 4.39e-07, 3.47e-07, 3.92e-07, nan ], [ 120, 2.91, 0.04, 2.70, 0.04, 3.16, 0.04, 11.65, 0.01, 4.26e-07, 2.72e-07, 2.84e-07, nan ], [ 130, 2.91, 0.05, 3.19, 0.04, 3.50, 0.04, 11.25, 0.01, 4.84e-07, 5.01e-07, 4.84e-07, nan ], [ 140, 3.52, 0.05, 3.61, 0.04, 4.05, 0.04, 11.27, 0.01, 4.39e-07, 4.36e-07, 5.45e-07, nan ], [ 150, 4.03, 0.05, 3.95, 0.05, 4.33, 0.04, 13.15, 0.01, 5.48e-07, 6.12e-07, 5.31e-07, nan ], [ 160, 4.49, 0.05, 4.93, 0.04, 5.16, 0.04, 14.70, 0.01, 4.98e-07, 4.05e-07, 4.77e-07, nan ], [ 170, 4.94, 0.05, 5.20, 0.04, 5.69, 0.04, 11.12, 0.02, 5.46e-07, 6.35e-07, 5.46e-07, nan ], [ 180, 5.45, 0.05, 5.56, 0.05, 5.80, 0.05, 14.62, 0.02, 5.36e-07, 6.17e-07, 5.24e-07, nan ], [ 190, 5.93, 0.05, 6.07, 0.05, 6.46, 0.05, 14.53, 0.02, 5.68e-07, 4.89e-07, 5.64e-07, nan ], [ 200, 5.98, 0.05, 6.73, 0.05, 6.86, 0.05, 15.37, 0.02, 6.15e-07, 6.88e-07, 5.35e-07, nan ], [ 210, 6.84, 0.05, 7.57, 0.05, 7.23, 0.05, 16.02, 0.02, 5.09e-07, 4.11e-07, 4.36e-07, nan ], [ 220, 7.37, 0.05, 8.30, 0.05, 7.94, 0.05, 17.03, 0.02, 6.33e-07, 5.93e-07, 5.81e-07, nan ], [ 230, 7.73, 0.06, 8.89, 0.05, 8.51, 0.05, 15.81, 0.03, 5.47e-07, 6.77e-07, 5.47e-07, nan ], [ 240, 8.42, 0.06, 9.44, 0.05, 9.09, 0.05, 17.21, 0.03, 5.55e-07, 6.74e-07, 5.55e-07, nan ], [ 250, 8.68, 0.06, 10.09, 0.05, 9.50, 0.05, 15.29, 0.03, 7.32e-07, 6.13e-07, 6.10e-07, nan ], [ 260, 9.09, 0.06, 10.66, 0.05, 9.88, 0.06, 17.55, 0.03, 8.24e-07, 5.98e-07, 8.30e-07, nan ], [ 270, 9.76, 0.06, 11.77, 0.05, 10.65, 0.06, 17.82, 0.03, 6.09e-07, 8.09e-07, 7.15e-07, nan ], [ 280, 10.17, 0.06, 12.13, 0.05, 11.07, 0.06, 19.03, 0.03, 5.69e-07, 6.63e-07, 6.74e-07, nan ], [ 290, 10.91, 0.06, 12.50, 0.05, 11.48, 0.06, 18.30, 0.04, 8.01e-07, 8.44e-07, 7.31e-07, nan ], [ 300, 11.50, 0.06, 13.61, 0.05, 12.09, 0.06, 18.07, 0.04, 8.15e-07, 8.28e-07, 8.28e-07, nan ], [ 310, 12.46, 0.06, 14.86, 0.05, 12.86, 0.06, 18.41, 0.04, 7.50e-07, 7.94e-07, 8.47e-07, nan ], [ 320, 13.70, 0.06, 15.84, 0.05, 13.28, 0.06, 19.18, 0.04, 7.64e-07, 7.64e-07, 6.69e-07, nan ], [ 330, 13.25, 0.07, 15.96, 0.05, 13.90, 0.06, 18.26, 0.05, 7.63e-07, 7.75e-07, 8.53e-07, nan ], [ 340, 14.07, 0.07, 17.16, 0.05, 14.27, 0.07, 19.78, 0.05, 9.91e-07, 8.09e-07, 8.09e-07, nan ], [ 350, 14.23, 0.07, 16.19, 0.06, 15.12, 0.07, 18.59, 0.05, 7.45e-07, 8.27e-07, 7.03e-07, nan ], [ 360, 15.11, 0.07, 18.27, 0.06, 15.54, 0.07, 19.32, 0.05, 9.13e-07, 7.58e-07, 7.82e-07, nan ], [ 370, 15.96, 0.07, 19.63, 0.06, 16.13, 0.07, 19.30, 0.06, 6.91e-07, 7.05e-07, 7.70e-07, nan ], [ 380, 16.60, 0.07, 19.69, 0.06, 16.60, 0.07, 20.35, 0.06, 1.22e-06, 8.04e-07, 8.83e-07, nan ], [ 390, 16.96, 0.07, 21.08, 0.06, 17.19, 0.07, 18.23, 0.07, 1.02e-06, 8.75e-07, 8.75e-07, nan ], [ 400, 12.22, 0.11, 21.38, 0.06, 18.08, 0.07, 20.03, 0.06, 9.92e-07, 8.53e-07, 8.39e-07, nan ], [ 410, 18.26, 0.07, 22.11, 0.06, 18.50, 0.07, 20.44, 0.07, 8.22e-07, 8.93e-07, 8.22e-07, nan ], [ 420, 18.86, 0.08, 23.20, 0.06, 18.62, 0.08, 21.14, 0.07, 6.70e-07, 7.41e-07, 6.89e-07, nan ], [ 430, 19.04, 0.08, 23.95, 0.06, 19.52, 0.08, 19.52, 0.08, 8.70e-07, 9.99e-07, 9.23e-07, nan ], [ 440, 20.50, 0.08, 24.60, 0.06, 20.18, 0.08, 21.03, 0.07, 8.69e-07, 8.09e-07, 8.12e-07, nan ], [ 450, 20.05, 0.08, 24.61, 0.07, 19.82, 0.08, 20.60, 0.08, 8.92e-07, 7.58e-07, 7.53e-07, nan ], [ 460, 21.26, 0.08, 26.58, 0.06, 20.95, 0.08, 21.20, 0.08, 1.01e-06, 8.31e-07, 8.68e-07, nan ], [ 470, 21.87, 0.08, 26.84, 0.07, 21.06, 0.08, 20.60, 0.09, 7.93e-07, 8.60e-07, 8.47e-07, nan ], [ 480, 22.03, 0.08, 28.51, 0.06, 22.03, 0.08, 21.48, 0.09, 8.04e-07, 8.65e-07, 9.26e-07, nan ], [ 490, 22.89, 0.08, 28.76, 0.07, 22.14, 0.09, 21.15, 0.09, 1.07e-06, 9.26e-07, 9.34e-07, nan ], [ 500, 23.90, 0.08, 29.42, 0.07, 22.74, 0.09, 21.57, 0.09, 8.54e-07, 7.55e-07, 7.55e-07, nan ], [ 510, 24.59, 0.08, 30.71, 0.07, 23.98, 0.09, 20.84, 0.10, 9.81e-07, 9.59e-07, 9.81e-07, nan ], [ 520, 24.39, 0.09, 30.95, 0.07, 23.82, 0.09, 21.72, 0.10, 1.00e-06, 9.46e-07, 9.46e-07, nan ], [ 530, 25.90, 0.09, 32.71, 0.07, 23.22, 0.10, 20.64, 0.11, 9.50e-07, 1.05e-06, 1.05e-06, nan ], [ 540, 26.59, 0.09, 32.49, 0.07, 25.16, 0.09, 21.47, 0.11, 1.29e-06, 9.72e-07, 1.24e-06, nan ], [ 550, 26.37, 0.09, 34.62, 0.07, 25.77, 0.09, 21.25, 0.11, 1.32e-06, 1.14e-06, 1.24e-06, nan ], [ 560, 26.78, 0.09, 35.41, 0.07, 25.92, 0.10, 21.10, 0.12, 1.42e-06, 1.32e-06, 1.31e-06, nan ], [ 570, 27.74, 0.09, 35.26, 0.07, 26.59, 0.10, 21.18, 0.12, 1.39e-06, 1.50e-06, 1.28e-06, nan ], [ 580, 27.01, 0.10, 36.51, 0.07, 26.95, 0.10, 21.76, 0.12, 9.60e-07, 8.68e-07, 9.60e-07, nan ], [ 590, 28.49, 0.10, 37.77, 0.07, 27.62, 0.10, 21.18, 0.13, 1.35e-06, 1.45e-06, 1.27e-06, nan ], [ 600, 29.46, 0.10, 39.06, 0.07, 28.29, 0.10, 21.86, 0.13, 1.13e-06, 1.17e-06, 1.12e-06, nan ], [ 610, 29.24, 0.10, 38.75, 0.08, 28.19, 0.11, 21.62, 0.14, 1.10e-06, 1.12e-06, 1.12e-06, nan ], [ 620, 29.93, 0.10, 40.03, 0.08, 29.39, 0.10, 22.03, 0.14, 1.35e-06, 1.21e-06, 1.12e-06, nan ], [ 630, 30.27, 0.11, 39.38, 0.08, 29.21, 0.11, 21.67, 0.15, 8.12e-07, 8.93e-07, 8.93e-07, nan ], [ 640, 32.88, 0.10, 43.19, 0.08, 29.88, 0.11, 22.33, 0.15, 1.17e-06, 1.30e-06, 1.17e-06, nan ], [ 650, 31.37, 0.11, 42.29, 0.08, 29.98, 0.11, 21.05, 0.16, 1.17e-06, 1.07e-06, 1.05e-06, nan ], [ 660, 31.44, 0.11, 43.09, 0.08, 30.39, 0.11, 22.13, 0.16, 1.30e-06, 1.21e-06, 1.32e-06, nan ], [ 670, 32.12, 0.11, 42.89, 0.08, 31.32, 0.11, 21.69, 0.17, 1.48e-06, 1.39e-06, 1.56e-06, nan ], [ 680, 32.00, 0.12, 43.68, 0.08, 31.41, 0.12, 22.18, 0.17, 1.21e-06, 1.27e-06, 1.26e-06, nan ], [ 690, 32.34, 0.12, 45.48, 0.08, 31.77, 0.12, 21.93, 0.17, 1.24e-06, 1.16e-06, 1.24e-06, nan ], [ 700, 33.02, 0.12, 44.65, 0.09, 32.18, 0.12, 21.71, 0.18, 1.35e-06, 1.21e-06, 1.28e-06, nan ], [ 710, 33.97, 0.12, 46.44, 0.09, 32.60, 0.12, 21.73, 0.19, 1.25e-06, 1.22e-06, 1.13e-06, nan ], [ 720, 35.21, 0.12, 48.28, 0.09, 34.11, 0.12, 22.61, 0.18, 1.78e-06, 1.54e-06, 1.53e-06, nan ], [ 730, 35.34, 0.12, 47.91, 0.09, 33.12, 0.13, 21.69, 0.20, 1.78e-06, 1.85e-06, 1.93e-06, nan ], [ 740, 35.41, 0.12, 48.84, 0.09, 34.03, 0.13, 22.18, 0.20, 1.41e-06, 1.33e-06, 1.41e-06, nan ], [ 750, 36.94, 0.12, 50.16, 0.09, 34.96, 0.13, 21.99, 0.21, 1.06e-06, 1.22e-06, 1.17e-06, nan ], [ 760, 37.34, 0.12, 51.37, 0.09, 34.80, 0.13, 21.94, 0.21, 1.54e-06, 1.72e-06, 1.71e-06, nan ], [ 770, 37.68, 0.13, 52.32, 0.09, 35.16, 0.14, 22.20, 0.21, 1.04e-06, 1.04e-06, 1.11e-06, nan ], [ 780, 38.09, 0.13, 53.13, 0.09, 36.14, 0.13, 22.48, 0.22, 1.12e-06, 1.28e-06, 1.18e-06, nan ], [ 790, 38.50, 0.13, 54.36, 0.09, 36.24, 0.14, 22.04, 0.23, 1.52e-06, 1.35e-06, 1.42e-06, nan ], [ 800, 38.91, 0.13, 56.47, 0.09, 36.90, 0.14, 22.79, 0.23, 1.38e-06, 1.30e-06, 1.30e-06, nan ], [ 810, 39.53, 0.13, 55.98, 0.09, 37.26, 0.14, 22.19, 0.24, 1.30e-06, 1.36e-06, 1.23e-06, nan ], [ 820, 40.80, 0.13, 57.22, 0.09, 37.67, 0.14, 22.27, 0.24, 1.16e-06, 1.15e-06, 1.36e-06, nan ], [ 830, 41.50, 0.13, 57.46, 0.10, 38.85, 0.14, 21.83, 0.25, 1.28e-06, 1.11e-06, 1.12e-06, nan ], [ 840, 40.96, 0.14, 58.28, 0.10, 39.01, 0.14, 22.33, 0.25, 1.38e-06, 1.38e-06, 1.45e-06, nan ], [ 850, 41.66, 0.14, 59.82, 0.10, 39.36, 0.15, 22.10, 0.26, 1.01e-06, 1.08e-06, 1.08e-06, nan ], [ 860, 42.35, 0.14, 60.34, 0.10, 40.10, 0.15, 22.36, 0.27, 1.21e-06, 1.07e-06, 1.07e-06, nan ], [ 870, 43.64, 0.14, 61.16, 0.10, 39.88, 0.15, 22.22, 0.27, 1.19e-06, 1.47e-06, 1.12e-06, nan ], [ 880, 44.65, 0.14, 62.72, 0.10, 41.65, 0.15, 22.00, 0.28, 1.32e-06, 1.18e-06, 1.26e-06, nan ], [ 890, 45.05, 0.14, 63.39, 0.10, 41.47, 0.15, 22.20, 0.29, 1.24e-06, 1.15e-06, 1.26e-06, nan ], [ 900, 45.07, 0.14, 64.97, 0.10, 42.14, 0.15, 22.15, 0.29, 1.43e-06, 1.32e-06, 1.38e-06, nan ], [ 1000, 49.49, 0.16, 73.53, 0.11, 46.54, 0.17, 22.64, 0.35, 1.26e-06, 1.39e-06, 1.43e-06, nan ], [ 1100, 54.72, 0.18, 82.13, 0.12, 30.78, 0.31, 22.80, 0.43, 1.62e-06, 1.48e-06, 1.48e-06, nan ], [ 1200, 61.32, 0.19, 92.33, 0.12, 33.81, 0.34, 22.36, 0.52, 1.53e-06, 1.53e-06, 1.43e-06, nan ], [ 1300, 66.01, 0.21, 98.05, 0.14, 35.07, 0.39, 23.54, 0.58, 2.10e-06, 2.18e-06, 2.00e-06, nan ], [ 1400, 72.35, 0.22, 109.91, 0.14, 38.57, 0.41, 23.46, 0.67, 2.37e-06, 2.09e-06, 2.06e-06, nan ], [ 1500, 76.34, 0.24, 117.71, 0.15, 40.76, 0.44, 23.52, 0.77, 2.01e-06, 1.73e-06, 1.81e-06, nan ], [ 1600, 81.34, 0.25, 125.89, 0.16, 42.54, 0.48, 22.21, 0.92, 1.84e-06, 1.98e-06, 1.99e-06, nan ], [ 1700, 86.35, 0.27, 132.23, 0.17, 44.08, 0.52, 19.70, 1.17, 1.90e-06, 2.09e-06, 1.96e-06, nan ], [ 1800, 91.05, 0.28, 138.08, 0.19, 46.66, 0.56, 17.99, 1.44, 2.27e-06, 2.32e-06, 2.11e-06, nan ], [ 1900, 96.29, 0.30, 147.48, 0.20, 49.50, 0.58, 17.34, 1.67, 2.27e-06, 2.08e-06, 1.94e-06, nan ], [ 2000, 100.69, 0.32, 149.74, 0.21, 51.56, 0.62, 17.13, 1.87, 2.41e-06, 2.20e-06, 2.13e-06, nan ], [ 2100, 103.26, 0.34, 155.55, 0.23, 38.66, 0.91, 17.13, 2.06, 2.33e-06, 2.47e-06, 2.34e-06, nan ], [ 2200, 110.70, 0.35, 164.32, 0.24, 40.87, 0.95, 16.86, 2.30, 2.41e-06, 2.62e-06, 2.43e-06, nan ], [ 2300, 114.45, 0.37, 170.13, 0.25, 42.47, 1.00, 17.55, 2.41, 2.65e-06, 2.50e-06, 2.51e-06, nan ], [ 2400, 120.34, 0.38, 179.40, 0.26, 44.12, 1.04, 17.28, 2.67, 2.51e-06, 2.74e-06, 2.62e-06, nan ], [ 2500, 124.76, 0.40, 182.63, 0.27, 45.90, 1.09, 17.29, 2.89, 2.87e-06, 2.60e-06, 2.58e-06, nan ], [ 2600, 130.06, 0.42, 191.85, 0.28, 47.76, 1.13, 17.24, 3.14, 2.64e-06, 2.72e-06, 2.90e-06, nan ], [ 2700, 134.18, 0.43, 195.80, 0.30, 49.24, 1.19, 17.55, 3.32, 2.82e-06, 2.94e-06, 2.77e-06, nan ], [ 2800, 138.53, 0.45, 199.85, 0.31, 50.32, 1.25, 17.70, 3.55, 2.73e-06, 2.55e-06, 2.66e-06, nan ], [ 2900, 142.31, 0.47, 208.37, 0.32, 52.30, 1.29, 18.28, 3.68, 2.62e-06, 2.53e-06, 2.53e-06, nan ], [ 3000, 145.82, 0.49, 215.66, 0.33, 53.84, 1.34, 17.49, 4.12, 3.28e-06, 2.94e-06, 3.06e-06, nan ], [ 3100, 152.03, 0.51, 222.95, 0.34, 43.46, 1.77, 17.07, 4.51, 2.84e-06, 2.84e-06, 2.76e-06, nan ], [ 3200, 155.83, 0.53, 232.90, 0.35, 45.13, 1.82, 17.71, 4.63, 2.50e-06, 2.83e-06, 2.70e-06, nan ], [ 3300, 161.12, 0.54, 228.77, 0.38, 46.44, 1.88, 17.74, 4.91, 3.05e-06, 2.75e-06, 2.67e-06, nan ], [ 3400, 164.29, 0.56, 241.48, 0.38, 47.64, 1.94, 17.81, 5.20, 3.29e-06, 3.45e-06, 2.87e-06, nan ], [ 3500, 167.64, 0.58, 247.57, 0.40, 48.85, 2.01, 17.77, 5.52, 2.75e-06, 2.74e-06, 2.73e-06, nan ], [ 3600, 172.30, 0.60, 246.35, 0.42, 50.13, 2.07, 16.44, 6.31, 2.92e-06, 3.01e-06, 2.92e-06, nan ], [ 3700, 174.47, 0.63, 255.45, 0.43, 51.23, 2.14, 17.86, 6.13, 2.64e-06, 2.66e-06, 2.71e-06, nan ], [ 3800, 180.53, 0.64, 255.65, 0.45, 52.46, 2.20, 17.72, 6.52, 2.87e-06, 3.09e-06, 2.99e-06, nan ], [ 3900, 177.22, 0.69, 252.50, 0.48, 53.72, 2.27, 17.93, 6.79, 3.52e-06, 3.90e-06, 3.58e-06, nan ], [ 4000, 175.40, 0.73, 262.37, 0.49, 54.72, 2.34, 17.59, 7.28, 3.26e-06, 3.19e-06, 3.56e-06, nan ], [ 4100, 179.59, 0.75, 265.28, 0.51, 46.14, 2.92, 17.97, 7.49, 3.35e-06, 3.85e-06, 3.38e-06, nan ], [ 4200, 176.70, 0.80, 259.02, 0.55, 47.23, 2.99, 17.82, 7.92, 3.97e-06, 3.47e-06, 3.72e-06, nan ], [ 4300, 180.89, 0.82, 258.71, 0.57, 48.43, 3.06, 17.94, 8.25, 3.72e-06, 4.09e-06, 4.02e-06, nan ], [ 4400, 184.19, 0.84, 255.64, 0.61, 49.39, 3.14, 18.05, 8.58, 3.89e-06, 4.00e-06, 4.11e-06, nan ], [ 4500, 184.15, 0.88, 254.38, 0.64, 50.42, 3.21, 17.92, 9.04, 3.50e-06, 3.78e-06, 3.92e-06, nan ], [ 4600, 186.46, 0.91, 254.29, 0.67, 51.61, 3.28, 16.77, 10.10, 3.67e-06, 4.01e-06, 3.83e-06, nan ], [ 4700, 186.86, 0.95, 257.27, 0.69, 52.44, 3.37, 17.87, 9.89, 3.25e-06, 3.96e-06, 3.58e-06, nan ], [ 4800, 189.13, 0.97, 260.82, 0.71, 53.61, 3.44, 16.83, 10.96, 3.40e-06, 3.51e-06, 3.21e-06, nan ], [ 4900, 187.07, 1.03, 259.63, 0.74, 54.29, 3.54, 17.88, 10.75, 3.81e-06, 3.63e-06, 3.46e-06, nan ], [ 5000, 188.40, 1.06, 260.84, 0.77, 54.99, 3.64, 17.64, 11.34, 3.82e-06, 3.93e-06, 3.68e-06, nan ], [ 5100, 191.66, 1.09, 257.90, 0.81, 55.91, 3.72, 17.68, 11.78, 4.54e-06, 4.33e-06, 4.23e-06, nan ], [ 5200, 191.47, 1.13, 258.20, 0.84, 48.62, 4.45, 17.26, 12.54, 4.56e-06, 3.60e-06, 3.79e-06, nan ], [ 5300, 191.94, 1.17, 262.04, 0.86, 49.76, 4.52, 17.82, 12.62, 4.35e-06, 4.20e-06, 3.78e-06, nan ], [ 5400, 194.27, 1.20, 259.81, 0.90, 50.70, 4.60, 17.99, 12.97, 4.37e-06, 4.19e-06, 4.00e-06, nan ], [ 5500, 194.28, 1.25, 260.00, 0.93, 51.46, 4.70, 17.94, 13.49, 3.96e-06, 4.21e-06, 3.79e-06, nan ], [ 5600, 198.22, 1.27, 268.37, 0.94, 52.12, 4.82, 17.86, 14.05, 4.30e-06, 4.23e-06, 4.11e-06, nan ], [ 5700, 200.45, 1.30, 262.64, 0.99, 52.79, 4.93, 17.82, 14.59, 4.82e-06, 4.57e-06, 4.38e-06, nan ], [ 5800, 199.09, 1.35, 267.61, 1.01, 53.51, 5.03, 17.96, 14.99, 4.72e-06, 4.16e-06, 4.47e-06, nan ], [ 5900, 203.15, 1.37, 266.56, 1.04, 54.17, 5.14, 18.07, 15.42, 4.44e-06, 4.57e-06, 4.30e-06, nan ], [ 6000, 202.69, 1.42, 269.76, 1.07, 54.76, 5.26, 18.14, 15.88, 3.96e-06, 4.19e-06, 4.37e-06, nan ], [ 6100, 205.20, 1.45, 266.80, 1.12, 56.28, 5.29, 17.88, 16.65, 4.42e-06, 4.36e-06, 4.26e-06, nan ], [ 6200, 207.12, 1.49, 270.98, 1.14, 50.06, 6.14, 17.99, 17.09, 4.30e-06, 3.72e-06, 3.63e-06, nan ], [ 6300, 208.37, 1.52, 271.91, 1.17, 50.13, 6.34, 17.94, 17.71, 4.10e-06, 3.97e-06, 3.92e-06, nan ], [ 6400, 209.85, 1.56, 271.57, 1.21, 51.56, 6.36, 19.63, 16.70, 4.27e-06, 4.06e-06, 4.05e-06, nan ], [ 6500, 212.24, 1.59, 276.25, 1.22, 51.80, 6.53, 18.00, 18.78, 4.34e-06, 4.60e-06, 4.33e-06, nan ], [ 6600, 213.18, 1.64, 274.91, 1.27, 51.85, 6.72, 18.11, 19.25, 4.47e-06, 4.21e-06, 4.24e-06, nan ], [ 6700, 214.71, 1.67, 273.98, 1.31, 52.51, 6.84, 18.11, 19.84, 4.60e-06, 3.92e-06, 4.02e-06, nan ], [ 6800, 212.88, 1.74, 275.89, 1.34, 53.18, 6.96, 18.16, 20.37, 5.02e-06, 4.63e-06, 4.52e-06, nan ], [ 6900, 216.07, 1.76, 277.31, 1.37, 53.74, 7.09, 18.00, 21.17, 4.32e-06, 4.04e-06, 4.02e-06, nan ], [ 7000, 218.19, 1.80, 278.26, 1.41, 54.96, 7.13, 18.11, 21.65, 3.98e-06, 4.41e-06, 4.03e-06, nan ], [ 7100, 216.76, 1.86, 283.29, 1.42, 55.11, 7.32, 18.08, 22.31, 3.96e-06, 4.29e-06, 3.91e-06, nan ], [ 7200, 219.23, 1.89, 282.76, 1.47, 50.10, 8.28, 17.71, 23.42, 4.42e-06, 4.70e-06, 4.28e-06, nan ], [ 7300, 223.14, 1.91, 284.65, 1.50, 50.74, 8.40, 17.67, 24.14, 4.03e-06, 3.88e-06, 4.05e-06, nan ], [ 7400, 222.20, 1.97, 284.49, 1.54, 51.15, 8.57, 17.91, 24.46, 4.23e-06, 4.36e-06, 4.13e-06, nan ], [ 7500, 224.39, 2.01, 282.23, 1.59, 51.94, 8.67, 17.97, 25.05, 5.06e-06, 4.69e-06, 4.76e-06, nan ], [ 7600, 228.22, 2.03, 281.63, 1.64, 52.31, 8.84, 17.87, 25.87, 4.94e-06, 5.63e-06, 4.68e-06, nan ], [ 7700, 225.17, 2.11, 280.73, 1.69, 53.66, 8.84, 16.44, 28.86, 4.60e-06, 4.57e-06, 4.48e-06, nan ], [ 7800, 224.26, 2.17, 283.87, 1.71, 53.24, 9.14, 17.82, 27.32, 4.75e-06, 4.47e-06, 4.67e-06, nan ], [ 7900, 224.83, 2.22, 282.47, 1.77, 54.19, 9.22, 17.83, 28.00, 5.08e-06, 4.45e-06, 4.40e-06, nan ], [ 8000, 226.50, 2.26, 282.77, 1.81, 54.30, 9.43, 17.73, 28.88, 5.85e-06, 5.49e-06, 5.44e-06, nan ], [ 8100, 226.77, 2.32, 284.08, 1.85, 55.60, 9.44, 17.26, 30.41, 5.83e-06, 5.85e-06, 5.67e-06, nan ], [ 8200, 224.83, 2.39, 286.92, 1.88, 49.90, 10.78, 16.65, 32.32, 4.92e-06, 4.59e-06, 5.16e-06, nan ], [ 8300, 227.40, 2.42, 285.61, 1.93, 50.76, 10.86, 17.03, 32.37, 5.43e-06, 5.51e-06, 5.73e-06, nan ], [ 8400, 225.12, 2.51, 286.44, 1.97, 51.50, 10.96, 16.65, 33.90, 4.96e-06, 5.60e-06, 4.89e-06, nan ], [ 8500, 229.40, 2.52, 284.63, 2.03, 52.00, 11.12, 17.78, 32.51, 5.41e-06, 5.41e-06, 5.64e-06, nan ], [ 8600, 227.86, 2.60, 286.32, 2.07, 52.61, 11.25, 17.80, 33.25, 5.15e-06, 4.98e-06, 5.36e-06, nan ], [ 8700, 226.74, 2.67, 289.05, 2.10, 52.73, 11.49, 18.19, 33.30, 5.43e-06, 5.18e-06, 5.32e-06, nan ], [ 8800, 224.33, 2.76, 285.81, 2.17, 53.56, 11.57, 17.92, 34.58, 5.13e-06, 5.60e-06, 5.29e-06, nan ], [ 8900, 227.91, 2.78, 287.04, 2.21, 54.03, 11.73, 17.85, 35.50, 5.01e-06, 4.99e-06, 5.17e-06, nan ], [ 9000, 226.85, 2.86, 283.02, 2.29, 54.48, 11.90, 17.94, 36.13, 5.66e-06, 5.96e-06, 6.03e-06, nan ], [ 10000, 234.22, 3.42, 285.95, 2.80, 54.54, 14.67, 17.67, 45.27, 5.57e-06, 5.37e-06, 5.49e-06, nan ], [ 12000, 238.44, 4.83, 291.02, 3.96, 54.29, 21.22, 17.40, 66.22, 7.29e-06, 6.05e-06, 6.06e-06, nan ], [ 14000, 248.44, 6.31, 293.55, 5.34, 54.85, 28.59, 16.85, 93.08, 6.63e-06, 6.07e-06, 7.14e-06, nan ], [ 16000, 253.09, 8.09, 291.10, 7.04, 54.93, 37.29, 15.65, 130.87, 6.96e-06, 8.01e-06, 7.32e-06, nan ], [ 18000, 252.46, 10.27, 296.09, 8.75, 54.98, 47.15, 16.55, 156.62, 8.14e-06, 8.25e-06, 7.92e-06, nan ], [ 20000, 255.45, 12.53, 294.49, 10.87, 54.14, 59.11, 17.20, 186.02, 8.79e-06, 8.79e-06, 9.47e-06, nan ], ]) # numactl --interleave=all ../testing/testing_chemv -U -N 123 -N 1234 --range 10:90:1 --range 100:900:10 --range 1000:9000:100 --range 10000:20000:2000 chemv_U = array([ [ 10, 0.03, 0.03, 0.03, 0.03, 0.04, 0.02, 0.48, 0.00, 2.13e-07, 1.07e-07, 2.86e-07, nan ], [ 11, 0.04, 0.03, 0.04, 0.03, 0.05, 0.02, 0.58, 0.00, 1.94e-07, 1.23e-07, 1.73e-07, nan ], [ 12, 0.04, 0.03, 0.04, 0.03, 0.06, 0.02, 1.36, 0.00, 1.78e-07, 1.59e-07, 1.78e-07, nan ], [ 13, 0.05, 0.03, 0.05, 0.03, 0.07, 0.02, 0.70, 0.00, 2.07e-07, 1.49e-07, 1.51e-07, nan ], [ 14, 0.05, 0.03, 0.06, 0.03, 0.09, 0.02, 0.91, 0.00, 1.52e-07, 1.52e-07, 2.04e-07, nan ], [ 15, 0.07, 0.03, 0.07, 0.03, 0.10, 0.02, 1.04, 0.00, 1.95e-07, 1.42e-07, 1.80e-07, nan ], [ 16, 0.07, 0.03, 0.08, 0.03, 0.12, 0.02, 1.17, 0.00, 1.33e-07, 2.40e-07, 2.38e-07, nan ], [ 17, 0.08, 0.03, 0.09, 0.03, 0.11, 0.02, 1.17, 0.00, 1.59e-07, 1.62e-07, 1.59e-07, nan ], [ 18, 0.09, 0.03, 0.10, 0.03, 0.13, 0.02, 0.98, 0.00, 2.37e-07, 2.12e-07, 2.37e-07, nan ], [ 19, 0.10, 0.03, 0.11, 0.03, 0.13, 0.02, 0.45, 0.01, 3.17e-07, 2.24e-07, 2.24e-07, nan ], [ 20, 0.12, 0.03, 0.12, 0.03, 0.16, 0.02, 1.80, 0.00, 1.97e-07, 1.55e-07, 2.13e-07, nan ], [ 21, 0.12, 0.03, 0.13, 0.03, 0.16, 0.02, 1.76, 0.00, 2.84e-07, 1.83e-07, 2.75e-07, nan ], [ 22, 0.13, 0.03, 0.14, 0.03, 0.18, 0.02, 1.93, 0.00, 2.60e-07, 3.57e-07, 1.94e-07, nan ], [ 23, 0.15, 0.03, 0.15, 0.03, 0.20, 0.02, 2.36, 0.00, 2.99e-07, 1.85e-07, 2.52e-07, nan ], [ 24, 0.15, 0.03, 0.16, 0.03, 0.21, 0.02, 2.28, 0.00, 2.41e-07, 2.38e-07, 2.40e-07, nan ], [ 25, 0.16, 0.03, 0.17, 0.03, 0.22, 0.02, 2.47, 0.00, 2.36e-07, 2.41e-07, 2.41e-07, nan ], [ 26, 0.17, 0.03, 0.19, 0.03, 0.25, 0.02, 2.67, 0.00, 1.85e-07, 1.64e-07, 1.64e-07, nan ], [ 27, 0.18, 0.03, 0.20, 0.03, 0.26, 0.02, 3.23, 0.00, 2.23e-07, 2.13e-07, 2.55e-07, nan ], [ 28, 0.20, 0.03, 0.21, 0.03, 0.28, 0.02, 2.13, 0.00, 2.46e-07, 2.28e-07, 2.75e-07, nan ], [ 29, 0.22, 0.03, 0.22, 0.03, 0.28, 0.03, 2.47, 0.00, 1.97e-07, 2.71e-07, 1.47e-07, nan ], [ 30, 0.24, 0.03, 0.24, 0.03, 0.33, 0.02, 2.44, 0.00, 2.01e-07, 1.42e-07, 2.29e-07, nan ], [ 31, 0.26, 0.03, 0.26, 0.03, 0.32, 0.03, 2.60, 0.00, 1.95e-07, 2.54e-07, 2.63e-07, nan ], [ 32, 0.26, 0.03, 0.24, 0.04, 0.36, 0.02, 2.77, 0.00, 2.15e-07, 2.46e-07, 1.81e-07, nan ], [ 33, 0.27, 0.03, 0.23, 0.04, 0.35, 0.03, 2.94, 0.00, 2.33e-07, 1.83e-07, 2.38e-07, nan ], [ 34, 0.31, 0.03, 0.24, 0.04, 0.39, 0.03, 2.38, 0.00, 3.37e-07, 2.31e-07, 3.41e-07, nan ], [ 35, 0.32, 0.03, 0.26, 0.04, 0.41, 0.03, 2.52, 0.00, 3.31e-07, 3.45e-07, 3.31e-07, nan ], [ 36, 0.34, 0.03, 0.28, 0.04, 0.44, 0.02, 3.77, 0.00, 3.35e-07, 3.18e-07, 2.37e-07, nan ], [ 37, 0.36, 0.03, 0.29, 0.04, 0.47, 0.02, 2.81, 0.00, 2.31e-07, 3.46e-07, 2.92e-07, nan ], [ 38, 0.35, 0.03, 0.31, 0.04, 0.50, 0.02, 3.15, 0.00, 3.05e-07, 2.37e-07, 3.62e-07, nan ], [ 39, 0.37, 0.03, 0.32, 0.04, 0.50, 0.03, 3.12, 0.00, 3.09e-07, 3.09e-07, 1.97e-07, nan ], [ 40, 0.41, 0.03, 0.35, 0.04, 0.53, 0.03, 4.28, 0.00, 2.13e-07, 2.13e-07, 2.38e-07, nan ], [ 41, 0.41, 0.03, 0.36, 0.04, 0.56, 0.02, 3.65, 0.00, 3.35e-07, 2.83e-07, 2.33e-07, nan ], [ 42, 0.43, 0.03, 0.36, 0.04, 0.58, 0.03, 3.61, 0.00, 3.05e-07, 2.76e-07, 2.81e-07, nan ], [ 43, 0.48, 0.03, 0.40, 0.04, 0.61, 0.03, 3.78, 0.00, 4.70e-07, 3.66e-07, 3.75e-07, nan ], [ 44, 0.50, 0.03, 0.43, 0.04, 0.64, 0.03, 3.95, 0.00, 2.76e-07, 2.68e-07, 3.48e-07, nan ], [ 45, 0.54, 0.03, 0.45, 0.04, 0.67, 0.03, 3.34, 0.01, 2.68e-07, 3.39e-07, 3.06e-07, nan ], [ 46, 0.55, 0.03, 0.46, 0.04, 0.73, 0.02, 4.58, 0.00, 2.78e-07, 2.62e-07, 4.15e-07, nan ], [ 47, 0.55, 0.03, 0.48, 0.04, 0.76, 0.02, 3.64, 0.01, 3.42e-07, 4.08e-07, 2.57e-07, nan ], [ 48, 0.61, 0.03, 0.51, 0.04, 0.80, 0.02, 3.99, 0.00, 3.28e-07, 3.20e-07, 2.51e-07, nan ], [ 49, 0.62, 0.03, 0.54, 0.04, 0.79, 0.03, 3.95, 0.01, 3.90e-07, 3.48e-07, 3.40e-07, nan ], [ 50, 0.63, 0.03, 0.50, 0.04, 0.79, 0.03, 4.11, 0.01, 3.08e-07, 3.15e-07, 3.24e-07, nan ], [ 51, 0.65, 0.03, 0.56, 0.04, 0.82, 0.03, 4.28, 0.01, 2.92e-07, 3.08e-07, 3.08e-07, nan ], [ 52, 0.70, 0.03, 0.60, 0.04, 0.86, 0.03, 5.83, 0.00, 3.10e-07, 3.69e-07, 2.94e-07, nan ], [ 53, 0.70, 0.03, 0.63, 0.04, 0.92, 0.03, 4.62, 0.01, 3.86e-07, 3.60e-07, 3.60e-07, nan ], [ 54, 0.72, 0.03, 0.63, 0.04, 0.92, 0.03, 4.02, 0.01, 3.60e-07, 2.55e-07, 2.30e-07, nan ], [ 55, 0.76, 0.03, 0.64, 0.04, 0.96, 0.03, 4.17, 0.01, 2.94e-07, 2.77e-07, 4.04e-07, nan ], [ 56, 0.74, 0.04, 0.66, 0.04, 0.96, 0.03, 4.32, 0.01, 3.47e-07, 2.81e-07, 3.47e-07, nan ], [ 57, 0.79, 0.03, 0.69, 0.04, 0.99, 0.03, 5.33, 0.01, 2.76e-07, 2.68e-07, 2.76e-07, nan ], [ 58, 0.75, 0.04, 0.71, 0.04, 1.02, 0.03, 5.51, 0.01, 2.94e-07, 2.63e-07, 2.37e-07, nan ], [ 59, 0.79, 0.04, 0.73, 0.04, 1.02, 0.03, 4.79, 0.01, 2.76e-07, 2.67e-07, 2.04e-07, nan ], [ 60, 0.80, 0.04, 0.74, 0.04, 0.95, 0.03, 4.76, 0.01, 2.70e-07, 3.18e-07, 2.29e-07, nan ], [ 61, 0.90, 0.03, 0.76, 0.04, 1.12, 0.03, 5.12, 0.01, 3.26e-07, 3.13e-07, 3.15e-07, nan ], [ 62, 0.85, 0.04, 0.79, 0.04, 1.12, 0.03, 6.29, 0.01, 3.48e-07, 2.75e-07, 3.31e-07, nan ], [ 63, 0.90, 0.04, 0.82, 0.04, 1.16, 0.03, 5.45, 0.01, 3.09e-07, 3.63e-07, 3.09e-07, nan ], [ 64, 1.12, 0.03, 0.93, 0.04, 1.24, 0.03, 4.85, 0.01, 3.37e-07, 4.00e-07, 3.77e-07, nan ], [ 65, 0.94, 0.04, 0.84, 0.04, 1.19, 0.03, 5.58, 0.01, 2.95e-07, 3.71e-07, 3.52e-07, nan ], [ 66, 0.99, 0.04, 0.87, 0.04, 1.19, 0.03, 4.98, 0.01, 3.52e-07, 3.66e-07, 3.52e-07, nan ], [ 67, 0.99, 0.04, 0.90, 0.04, 1.22, 0.03, 6.16, 0.01, 5.09e-07, 3.42e-07, 2.90e-07, nan ], [ 68, 1.02, 0.04, 0.94, 0.04, 1.27, 0.03, 5.47, 0.01, 3.39e-07, 3.39e-07, 3.37e-07, nan ], [ 69, 1.02, 0.04, 0.95, 0.04, 1.30, 0.03, 5.44, 0.01, 5.10e-07, 3.99e-07, 4.46e-07, nan ], [ 70, 1.06, 0.04, 0.93, 0.04, 1.33, 0.03, 4.94, 0.01, 3.49e-07, 4.37e-07, 3.93e-07, nan ], [ 71, 1.14, 0.04, 0.98, 0.04, 1.38, 0.03, 5.08, 0.01, 4.43e-07, 3.27e-07, 3.27e-07, nan ], [ 72, 1.18, 0.04, 1.03, 0.04, 1.41, 0.03, 6.12, 0.01, 3.44e-07, 4.25e-07, 3.35e-07, nan ], [ 73, 1.12, 0.04, 1.06, 0.04, 1.40, 0.03, 6.29, 0.01, 5.23e-07, 3.30e-07, 4.25e-07, nan ], [ 74, 1.24, 0.04, 1.12, 0.04, 1.54, 0.03, 8.93, 0.01, 5.26e-07, 4.16e-07, 4.25e-07, nan ], [ 75, 1.27, 0.04, 1.15, 0.04, 1.53, 0.03, 5.07, 0.01, 3.67e-07, 3.67e-07, 3.67e-07, nan ], [ 76, 1.28, 0.04, 1.15, 0.04, 1.63, 0.03, 6.59, 0.01, 3.62e-07, 4.02e-07, 5.03e-07, nan ], [ 77, 1.39, 0.03, 1.21, 0.04, 1.68, 0.03, 8.11, 0.01, 4.43e-07, 4.23e-07, 4.23e-07, nan ], [ 78, 1.38, 0.04, 1.18, 0.04, 1.42, 0.04, 6.31, 0.01, 4.15e-07, 3.53e-07, 4.03e-07, nan ], [ 79, 1.38, 0.04, 1.24, 0.04, 1.81, 0.03, 5.62, 0.01, 4.13e-07, 3.05e-07, 3.09e-07, nan ], [ 80, 1.38, 0.04, 1.30, 0.04, 1.74, 0.03, 7.54, 0.01, 3.44e-07, 3.84e-07, 3.81e-07, nan ], [ 81, 1.37, 0.04, 1.30, 0.04, 1.72, 0.03, 8.62, 0.01, 3.83e-07, 3.02e-07, 4.71e-07, nan ], [ 82, 1.44, 0.04, 1.31, 0.04, 1.71, 0.03, 9.19, 0.01, 3.79e-07, 3.79e-07, 3.84e-07, nan ], [ 83, 1.44, 0.04, 1.23, 0.05, 1.74, 0.03, 6.92, 0.01, 4.95e-07, 3.68e-07, 4.60e-07, nan ], [ 84, 1.48, 0.04, 1.41, 0.04, 1.85, 0.03, 5.74, 0.01, 3.85e-07, 3.74e-07, 3.74e-07, nan ], [ 85, 1.50, 0.04, 1.43, 0.04, 1.84, 0.03, 8.51, 0.01, 3.81e-07, 3.59e-07, 2.84e-07, nan ], [ 86, 1.55, 0.04, 1.43, 0.04, 1.94, 0.03, 5.49, 0.01, 3.56e-07, 3.59e-07, 3.66e-07, nan ], [ 87, 1.67, 0.04, 1.47, 0.04, 1.93, 0.03, 6.80, 0.01, 5.37e-07, 3.51e-07, 3.57e-07, nan ], [ 88, 1.61, 0.04, 1.54, 0.04, 1.97, 0.03, 7.77, 0.01, 3.47e-07, 2.74e-07, 2.91e-07, nan ], [ 89, 1.70, 0.04, 1.54, 0.04, 2.02, 0.03, 9.32, 0.01, 3.66e-07, 3.83e-07, 4.29e-07, nan ], [ 90, 1.68, 0.04, 1.61, 0.04, 2.06, 0.03, 8.37, 0.01, 5.09e-07, 4.43e-07, 4.32e-07, nan ], [ 100, 2.20, 0.04, 1.98, 0.04, 2.32, 0.04, 6.31, 0.01, 3.89e-07, 3.15e-07, 4.58e-07, nan ], [ 110, 2.66, 0.04, 2.22, 0.04, 2.80, 0.04, 9.80, 0.01, 3.54e-07, 4.16e-07, 4.17e-07, nan ], [ 120, 3.06, 0.04, 2.78, 0.04, 3.24, 0.04, 11.65, 0.01, 4.52e-07, 4.45e-07, 3.83e-07, nan ], [ 130, 3.19, 0.04, 3.05, 0.04, 3.70, 0.04, 11.25, 0.01, 5.25e-07, 4.84e-07, 5.01e-07, nan ], [ 140, 3.44, 0.05, 3.44, 0.05, 4.05, 0.04, 11.46, 0.01, 4.41e-07, 4.61e-07, 4.46e-07, nan ], [ 150, 4.06, 0.04, 3.77, 0.05, 4.57, 0.04, 12.92, 0.01, 5.09e-07, 5.09e-07, 4.10e-07, nan ], [ 160, 4.59, 0.05, 4.82, 0.04, 5.16, 0.04, 14.70, 0.01, 5.33e-07, 4.98e-07, 4.98e-07, nan ], [ 170, 4.97, 0.05, 4.84, 0.05, 5.56, 0.04, 13.04, 0.02, 5.46e-07, 5.40e-07, 5.55e-07, nan ], [ 180, 5.68, 0.05, 5.45, 0.05, 5.96, 0.04, 12.46, 0.02, 6.99e-07, 5.99e-07, 6.99e-07, nan ], [ 190, 6.46, 0.05, 5.96, 0.05, 6.64, 0.04, 15.45, 0.02, 4.90e-07, 5.02e-07, 4.84e-07, nan ], [ 200, 6.35, 0.05, 6.73, 0.05, 7.19, 0.04, 16.10, 0.02, 5.35e-07, 6.52e-07, 5.39e-07, nan ], [ 210, 6.96, 0.05, 7.27, 0.05, 7.57, 0.05, 16.20, 0.02, 6.50e-07, 6.54e-07, 6.58e-07, nan ], [ 220, 7.23, 0.05, 7.94, 0.05, 8.13, 0.05, 17.03, 0.02, 6.28e-07, 6.95e-07, 6.94e-07, nan ], [ 230, 8.01, 0.05, 7.60, 0.06, 8.51, 0.05, 16.39, 0.03, 7.33e-07, 7.99e-07, 7.99e-07, nan ], [ 240, 8.61, 0.05, 8.92, 0.05, 9.09, 0.05, 17.21, 0.03, 6.36e-07, 8.92e-07, 6.76e-07, nan ], [ 250, 9.68, 0.05, 9.63, 0.05, 9.68, 0.05, 17.88, 0.03, 6.57e-07, 6.22e-07, 6.13e-07, nan ], [ 260, 9.39, 0.06, 10.28, 0.05, 9.88, 0.06, 17.55, 0.03, 7.07e-07, 5.88e-07, 5.93e-07, nan ], [ 270, 10.12, 0.06, 10.25, 0.06, 10.47, 0.06, 16.73, 0.04, 7.24e-07, 5.90e-07, 7.15e-07, nan ], [ 280, 10.71, 0.06, 11.70, 0.05, 11.25, 0.06, 17.99, 0.04, 6.68e-07, 6.78e-07, 6.74e-07, nan ], [ 290, 11.63, 0.06, 12.28, 0.06, 11.87, 0.06, 17.73, 0.04, 6.74e-07, 7.39e-07, 7.37e-07, nan ], [ 300, 12.29, 0.06, 12.91, 0.06, 12.24, 0.06, 18.62, 0.04, 7.41e-07, 7.41e-07, 7.19e-07, nan ], [ 310, 13.12, 0.06, 12.86, 0.06, 12.91, 0.06, 19.29, 0.04, 8.25e-07, 7.88e-07, 8.01e-07, nan ], [ 320, 14.21, 0.06, 16.13, 0.05, 13.75, 0.06, 19.18, 0.04, 9.54e-07, 8.59e-07, 9.54e-07, nan ], [ 330, 13.45, 0.07, 15.04, 0.06, 13.90, 0.06, 19.52, 0.04, 6.94e-07, 6.63e-07, 7.41e-07, nan ], [ 340, 13.30, 0.07, 16.03, 0.06, 14.27, 0.07, 19.78, 0.05, 8.09e-07, 8.08e-07, 8.13e-07, nan ], [ 350, 14.90, 0.07, 15.40, 0.06, 15.40, 0.06, 20.14, 0.05, 7.19e-07, 8.04e-07, 8.04e-07, nan ], [ 360, 15.54, 0.07, 17.33, 0.06, 15.76, 0.07, 19.67, 0.05, 9.17e-07, 8.52e-07, 8.73e-07, nan ], [ 370, 15.96, 0.07, 18.38, 0.06, 16.41, 0.07, 19.63, 0.06, 8.49e-07, 8.50e-07, 7.82e-07, nan ], [ 380, 17.56, 0.07, 19.61, 0.06, 17.07, 0.07, 19.30, 0.06, 8.87e-07, 8.14e-07, 9.08e-07, nan ], [ 390, 15.67, 0.08, 17.19, 0.07, 17.43, 0.07, 20.66, 0.06, 8.92e-07, 8.75e-07, 8.64e-07, nan ], [ 400, 12.36, 0.10, 20.41, 0.06, 18.33, 0.07, 20.41, 0.06, 9.56e-07, 8.70e-07, 8.93e-07, nan ], [ 410, 18.26, 0.07, 21.44, 0.06, 18.50, 0.07, 20.74, 0.07, 8.22e-07, 8.21e-07, 8.22e-07, nan ], [ 420, 18.39, 0.08, 21.76, 0.07, 19.16, 0.07, 20.20, 0.07, 9.47e-07, 8.75e-07, 8.75e-07, nan ], [ 430, 19.28, 0.08, 20.62, 0.07, 19.83, 0.07, 20.96, 0.07, 9.25e-07, 9.33e-07, 9.23e-07, nan ], [ 440, 20.43, 0.08, 23.20, 0.07, 20.43, 0.08, 21.03, 0.07, 1.11e-06, 1.05e-06, 1.11e-06, nan ], [ 450, 20.05, 0.08, 23.27, 0.07, 20.85, 0.08, 20.85, 0.08, 9.22e-07, 9.87e-07, 1.10e-06, nan ], [ 460, 20.41, 0.08, 24.56, 0.07, 21.46, 0.08, 21.26, 0.08, 8.93e-07, 9.38e-07, 8.85e-07, nan ], [ 470, 21.68, 0.08, 23.91, 0.07, 21.87, 0.08, 20.43, 0.09, 1.09e-06, 1.04e-06, 1.02e-06, nan ], [ 480, 22.03, 0.08, 29.26, 0.06, 23.08, 0.08, 21.48, 0.09, 8.33e-07, 9.56e-07, 8.94e-07, nan ], [ 490, 22.89, 0.08, 26.32, 0.07, 22.39, 0.09, 21.21, 0.09, 1.00e-06, 1.00e-06, 1.06e-06, nan ], [ 500, 23.84, 0.08, 27.86, 0.07, 23.63, 0.08, 21.35, 0.09, 9.53e-07, 1.15e-06, 1.12e-06, nan ], [ 510, 24.25, 0.09, 26.13, 0.08, 23.98, 0.09, 21.30, 0.10, 8.90e-07, 9.11e-07, 8.57e-07, nan ], [ 520, 24.39, 0.09, 28.98, 0.07, 24.39, 0.09, 21.06, 0.10, 9.99e-07, 8.82e-07, 9.39e-07, nan ], [ 530, 25.34, 0.09, 30.49, 0.07, 25.27, 0.09, 21.05, 0.11, 9.50e-07, 8.56e-07, 9.94e-07, nan ], [ 540, 25.68, 0.09, 31.15, 0.08, 25.68, 0.09, 21.90, 0.11, 1.17e-06, 1.19e-06, 1.19e-06, nan ], [ 550, 25.26, 0.10, 27.29, 0.09, 26.10, 0.09, 21.47, 0.11, 1.22e-06, 1.01e-06, 1.12e-06, nan ], [ 560, 26.25, 0.10, 32.27, 0.08, 26.44, 0.10, 21.67, 0.12, 1.20e-06, 1.32e-06, 1.20e-06, nan ], [ 570, 28.03, 0.09, 33.84, 0.08, 27.46, 0.09, 21.90, 0.12, 1.21e-06, 1.10e-06, 1.18e-06, nan ], [ 580, 27.27, 0.10, 35.04, 0.08, 28.15, 0.10, 21.76, 0.12, 1.16e-06, 1.27e-06, 1.16e-06, nan ], [ 590, 27.68, 0.10, 30.98, 0.09, 27.88, 0.10, 21.85, 0.13, 1.34e-06, 1.45e-06, 1.55e-06, nan ], [ 600, 28.03, 0.10, 35.72, 0.08, 28.83, 0.10, 22.18, 0.13, 1.12e-06, 1.10e-06, 1.19e-06, nan ], [ 610, 29.31, 0.10, 35.06, 0.09, 28.97, 0.10, 21.65, 0.14, 1.18e-06, 1.13e-06, 1.14e-06, nan ], [ 620, 29.39, 0.10, 36.32, 0.08, 29.65, 0.10, 22.18, 0.14, 1.28e-06, 1.28e-06, 1.19e-06, nan ], [ 630, 30.62, 0.10, 34.23, 0.09, 30.34, 0.10, 21.92, 0.15, 1.07e-06, 1.07e-06, 1.16e-06, nan ], [ 640, 31.89, 0.10, 43.32, 0.08, 30.68, 0.11, 21.63, 0.15, 1.15e-06, 1.24e-06, 1.15e-06, nan ], [ 650, 30.82, 0.11, 38.51, 0.09, 31.03, 0.11, 22.13, 0.15, 1.13e-06, 1.05e-06, 1.04e-06, nan ], [ 660, 31.78, 0.11, 39.70, 0.09, 31.78, 0.11, 22.23, 0.16, 1.20e-06, 1.19e-06, 1.21e-06, nan ], [ 670, 31.58, 0.11, 36.03, 0.10, 32.12, 0.11, 22.23, 0.16, 1.28e-06, 1.28e-06, 1.28e-06, nan ], [ 680, 33.08, 0.11, 40.71, 0.09, 32.81, 0.11, 22.34, 0.17, 1.26e-06, 1.35e-06, 1.26e-06, nan ], [ 690, 34.43, 0.11, 42.47, 0.09, 33.22, 0.11, 22.17, 0.17, 1.19e-06, 1.35e-06, 1.16e-06, nan ], [ 700, 34.76, 0.11, 43.13, 0.09, 33.56, 0.12, 22.33, 0.18, 1.52e-06, 1.41e-06, 1.40e-06, nan ], [ 710, 33.97, 0.12, 36.14, 0.11, 34.24, 0.12, 22.33, 0.18, 1.21e-06, 1.39e-06, 1.22e-06, nan ], [ 720, 35.21, 0.12, 44.69, 0.09, 34.93, 0.12, 21.73, 0.19, 1.27e-06, 1.27e-06, 1.28e-06, nan ], [ 730, 36.20, 0.12, 45.83, 0.09, 33.94, 0.13, 22.01, 0.19, 1.43e-06, 1.42e-06, 1.34e-06, nan ], [ 740, 35.96, 0.12, 46.26, 0.09, 34.87, 0.13, 22.40, 0.20, 1.66e-06, 1.52e-06, 1.59e-06, nan ], [ 750, 36.94, 0.12, 40.67, 0.11, 35.22, 0.13, 22.54, 0.20, 1.32e-06, 1.26e-06, 1.30e-06, nan ], [ 760, 38.61, 0.12, 47.25, 0.10, 36.16, 0.13, 21.94, 0.21, 1.29e-06, 1.37e-06, 1.27e-06, nan ], [ 770, 37.12, 0.13, 47.92, 0.10, 36.57, 0.13, 22.30, 0.21, 1.43e-06, 1.43e-06, 1.51e-06, nan ], [ 780, 37.46, 0.13, 49.29, 0.10, 36.39, 0.13, 22.06, 0.22, 1.33e-06, 1.25e-06, 1.41e-06, nan ], [ 790, 39.36, 0.13, 44.26, 0.11, 37.60, 0.13, 22.13, 0.23, 1.28e-06, 1.47e-06, 1.32e-06, nan ], [ 800, 40.44, 0.13, 58.31, 0.09, 38.28, 0.13, 22.60, 0.23, 1.53e-06, 1.37e-06, 1.60e-06, nan ], [ 810, 40.47, 0.13, 52.02, 0.10, 38.42, 0.14, 22.67, 0.23, 1.26e-06, 1.29e-06, 1.21e-06, nan ], [ 820, 41.47, 0.13, 52.32, 0.10, 39.04, 0.14, 22.45, 0.24, 1.36e-06, 1.42e-06, 1.42e-06, nan ], [ 830, 42.73, 0.13, 47.94, 0.12, 39.72, 0.14, 22.44, 0.25, 1.25e-06, 1.35e-06, 1.22e-06, nan ], [ 840, 41.04, 0.14, 54.40, 0.10, 40.06, 0.14, 22.81, 0.25, 1.37e-06, 1.29e-06, 1.32e-06, nan ], [ 850, 42.61, 0.14, 54.70, 0.11, 41.09, 0.14, 21.94, 0.26, 1.32e-06, 1.50e-06, 1.43e-06, nan ], [ 860, 43.61, 0.14, 56.89, 0.10, 41.43, 0.14, 22.02, 0.27, 1.19e-06, 1.16e-06, 1.21e-06, nan ], [ 870, 42.69, 0.14, 45.27, 0.13, 39.94, 0.15, 17.43, 0.35, 1.20e-06, 1.40e-06, 1.33e-06, nan ], [ 880, 43.67, 0.14, 56.96, 0.11, 40.04, 0.15, 21.62, 0.29, 1.39e-06, 1.39e-06, 1.36e-06, nan ], [ 890, 46.06, 0.14, 59.43, 0.11, 42.06, 0.15, 22.20, 0.29, 1.27e-06, 1.24e-06, 1.24e-06, nan ], [ 900, 45.07, 0.14, 60.63, 0.11, 43.56, 0.15, 22.61, 0.29, 1.24e-06, 1.24e-06, 1.37e-06, nan ], [ 1000, 50.99, 0.16, 66.81, 0.12, 48.28, 0.17, 22.77, 0.35, 1.53e-06, 1.32e-06, 1.44e-06, nan ], [ 1100, 54.72, 0.18, 74.06, 0.13, 31.06, 0.31, 22.39, 0.43, 1.35e-06, 1.34e-06, 1.46e-06, nan ], [ 1200, 62.02, 0.19, 81.72, 0.14, 33.93, 0.34, 22.14, 0.52, 2.06e-06, 1.82e-06, 2.04e-06, nan ], [ 1300, 64.44, 0.21, 89.69, 0.15, 35.07, 0.39, 23.54, 0.58, 1.88e-06, 1.78e-06, 1.88e-06, nan ], [ 1400, 72.99, 0.22, 100.67, 0.16, 38.66, 0.41, 23.71, 0.66, 1.92e-06, 1.86e-06, 1.86e-06, nan ], [ 1500, 77.04, 0.23, 106.59, 0.17, 41.05, 0.44, 23.25, 0.78, 2.00e-06, 1.68e-06, 1.72e-06, nan ], [ 1600, 82.99, 0.25, 125.70, 0.16, 42.35, 0.48, 22.73, 0.90, 2.14e-06, 1.91e-06, 1.86e-06, nan ], [ 1700, 87.60, 0.26, 121.17, 0.19, 44.58, 0.52, 21.41, 1.08, 2.16e-06, 1.93e-06, 2.13e-06, nan ], [ 1800, 90.37, 0.29, 128.31, 0.20, 46.98, 0.55, 19.86, 1.31, 1.97e-06, 1.90e-06, 2.03e-06, nan ], [ 1900, 98.00, 0.29, 131.34, 0.22, 49.66, 0.58, 19.24, 1.50, 2.03e-06, 2.07e-06, 2.06e-06, nan ], [ 2000, 100.99, 0.32, 134.45, 0.24, 52.24, 0.61, 17.68, 1.81, 2.38e-06, 2.45e-06, 2.27e-06, nan ], [ 2100, 106.30, 0.33, 135.73, 0.26, 39.32, 0.90, 17.01, 2.08, 2.10e-06, 2.10e-06, 2.16e-06, nan ], [ 2200, 111.31, 0.35, 141.93, 0.27, 40.54, 0.96, 17.00, 2.28, 2.00e-06, 2.33e-06, 1.90e-06, nan ], [ 2300, 116.32, 0.36, 141.19, 0.30, 41.76, 1.01, 16.57, 2.56, 2.33e-06, 2.28e-06, 2.56e-06, nan ], [ 2400, 120.72, 0.38, 179.40, 0.26, 43.99, 1.05, 16.39, 2.81, 2.71e-06, 2.67e-06, 2.75e-06, nan ], [ 2500, 123.58, 0.40, 153.50, 0.33, 46.03, 1.09, 16.65, 3.01, 3.04e-06, 3.15e-06, 2.94e-06, nan ], [ 2600, 129.10, 0.42, 155.45, 0.35, 46.88, 1.15, 16.59, 3.26, 2.45e-06, 2.44e-06, 2.45e-06, nan ], [ 2700, 133.52, 0.44, 159.86, 0.37, 49.45, 1.18, 16.59, 3.52, 2.81e-06, 2.80e-06, 2.90e-06, nan ], [ 2800, 132.40, 0.47, 159.71, 0.39, 49.81, 1.26, 16.68, 3.76, 3.14e-06, 2.89e-06, 3.23e-06, nan ], [ 2900, 145.39, 0.46, 164.53, 0.41, 52.63, 1.28, 16.90, 3.98, 3.03e-06, 2.95e-06, 2.95e-06, nan ], [ 3000, 149.21, 0.48, 171.96, 0.42, 54.61, 1.32, 16.77, 4.30, 2.65e-06, 2.92e-06, 2.77e-06, nan ], [ 3100, 152.03, 0.51, 175.62, 0.44, 43.23, 1.78, 17.39, 4.42, 3.07e-06, 3.39e-06, 3.23e-06, nan ], [ 3200, 156.68, 0.52, 202.81, 0.40, 44.30, 1.85, 17.07, 4.80, 3.16e-06, 3.15e-06, 2.85e-06, nan ], [ 3300, 162.62, 0.54, 184.73, 0.47, 46.24, 1.88, 17.00, 5.13, 3.85e-06, 3.85e-06, 4.00e-06, nan ], [ 3400, 164.64, 0.56, 184.70, 0.50, 47.52, 1.95, 16.97, 5.45, 2.96e-06, 2.87e-06, 2.95e-06, nan ], [ 3500, 170.84, 0.57, 186.75, 0.52, 48.68, 2.01, 17.10, 5.73, 2.93e-06, 2.66e-06, 2.86e-06, nan ], [ 3600, 169.74, 0.61, 190.31, 0.55, 49.91, 2.08, 16.32, 6.36, 3.42e-06, 3.34e-06, 3.80e-06, nan ], [ 3700, 177.29, 0.62, 193.98, 0.56, 51.39, 2.13, 17.12, 6.40, 2.87e-06, 2.78e-06, 3.11e-06, nan ], [ 3800, 179.19, 0.64, 197.52, 0.59, 52.65, 2.19, 17.13, 6.75, 2.70e-06, 2.64e-06, 2.83e-06, nan ], [ 3900, 186.13, 0.65, 196.60, 0.62, 53.84, 2.26, 17.18, 7.08, 3.01e-06, 3.01e-06, 3.20e-06, nan ], [ 4000, 185.84, 0.69, 217.79, 0.59, 54.91, 2.33, 17.54, 7.30, 3.19e-06, 3.50e-06, 3.35e-06, nan ], [ 4100, 185.79, 0.72, 190.82, 0.71, 47.69, 2.82, 17.54, 7.67, 3.16e-06, 3.20e-06, 3.25e-06, nan ], [ 4200, 190.51, 0.74, 196.91, 0.72, 46.90, 3.01, 17.25, 8.19, 2.94e-06, 3.14e-06, 3.05e-06, nan ], [ 4300, 193.16, 0.77, 202.69, 0.73, 48.01, 3.08, 17.38, 8.51, 4.10e-06, 3.99e-06, 3.66e-06, nan ], [ 4400, 200.44, 0.77, 197.34, 0.79, 48.81, 3.17, 17.31, 8.95, 3.93e-06, 4.10e-06, 4.22e-06, nan ], [ 4500, 203.32, 0.80, 203.87, 0.79, 50.34, 3.22, 17.41, 9.31, 3.64e-06, 3.49e-06, 3.36e-06, nan ], [ 4600, 211.19, 0.80, 204.27, 0.83, 51.20, 3.31, 15.79, 10.73, 3.72e-06, 4.14e-06, 3.93e-06, nan ], [ 4700, 208.98, 0.85, 207.46, 0.85, 52.02, 3.40, 17.36, 10.18, 3.53e-06, 3.32e-06, 3.45e-06, nan ], [ 4800, 213.39, 0.86, 231.68, 0.80, 53.27, 3.46, 17.28, 10.67, 3.75e-06, 3.49e-06, 4.00e-06, nan ], [ 4900, 217.34, 0.88, 211.35, 0.91, 54.31, 3.54, 17.43, 11.02, 4.77e-06, 4.12e-06, 4.09e-06, nan ], [ 5000, 217.89, 0.92, 212.16, 0.94, 55.40, 3.61, 17.54, 11.41, 3.91e-06, 4.21e-06, 4.11e-06, nan ], [ 5100, 224.54, 0.93, 214.13, 0.97, 55.88, 3.73, 17.49, 11.90, 3.84e-06, 4.02e-06, 4.12e-06, nan ], [ 5200, 225.88, 0.96, 216.40, 1.00, 48.07, 4.50, 17.31, 12.50, 3.98e-06, 3.85e-06, 3.95e-06, nan ], [ 5300, 225.23, 1.00, 215.94, 1.04, 49.22, 4.57, 17.42, 12.90, 4.05e-06, 4.15e-06, 3.98e-06, nan ], [ 5400, 229.69, 1.02, 220.13, 1.06, 50.30, 4.64, 17.49, 13.34, 4.03e-06, 4.35e-06, 4.22e-06, nan ], [ 5500, 226.23, 1.07, 218.30, 1.11, 50.83, 4.76, 17.49, 13.84, 4.02e-06, 3.92e-06, 3.92e-06, nan ], [ 5600, 235.21, 1.07, 245.52, 1.02, 51.96, 4.83, 17.57, 14.28, 4.29e-06, 4.24e-06, 4.10e-06, nan ], [ 5700, 236.80, 1.10, 227.04, 1.15, 52.89, 4.92, 17.69, 14.70, 4.77e-06, 5.23e-06, 4.91e-06, nan ], [ 5800, 241.20, 1.12, 220.65, 1.22, 53.98, 4.99, 17.51, 15.37, 4.00e-06, 3.68e-06, 3.88e-06, nan ], [ 5900, 244.98, 1.14, 223.90, 1.24, 54.50, 5.11, 17.87, 15.59, 3.98e-06, 4.41e-06, 4.33e-06, nan ], [ 6000, 248.77, 1.16, 226.31, 1.27, 55.54, 5.19, 17.71, 16.27, 4.32e-06, 4.43e-06, 4.41e-06, nan ], [ 6100, 245.26, 1.21, 225.22, 1.32, 55.91, 5.33, 17.79, 16.74, 4.43e-06, 4.31e-06, 4.45e-06, nan ], [ 6200, 251.93, 1.22, 228.87, 1.34, 49.58, 6.20, 17.61, 17.46, 4.39e-06, 4.14e-06, 4.38e-06, nan ], [ 6300, 255.29, 1.24, 223.06, 1.42, 49.94, 6.36, 17.99, 17.66, 4.73e-06, 4.70e-06, 4.44e-06, nan ], [ 6400, 254.91, 1.29, 251.92, 1.30, 50.96, 6.43, 19.16, 17.10, 4.45e-06, 4.46e-06, 4.65e-06, nan ], [ 6500, 256.51, 1.32, 223.59, 1.51, 51.72, 6.54, 17.76, 19.03, 4.66e-06, 4.47e-06, 4.30e-06, nan ], [ 6600, 262.24, 1.33, 229.47, 1.52, 52.71, 6.61, 17.72, 19.67, 4.92e-06, 4.68e-06, 4.92e-06, nan ], [ 6700, 268.03, 1.34, 226.32, 1.59, 53.08, 6.77, 17.92, 20.05, 4.93e-06, 4.88e-06, 4.53e-06, nan ], [ 6800, 264.83, 1.40, 222.46, 1.66, 53.98, 6.86, 17.62, 21.00, 4.60e-06, 4.45e-06, 4.74e-06, nan ], [ 6900, 273.66, 1.39, 228.40, 1.67, 54.07, 7.05, 17.91, 21.28, 4.67e-06, 4.89e-06, 4.82e-06, nan ], [ 7000, 270.04, 1.45, 231.85, 1.69, 55.39, 7.08, 17.64, 22.23, 4.26e-06, 4.55e-06, 4.46e-06, nan ], [ 7100, 274.60, 1.47, 228.16, 1.77, 56.22, 7.17, 17.91, 22.53, 4.55e-06, 4.41e-06, 4.72e-06, nan ], [ 7200, 278.24, 1.49, 262.18, 1.58, 49.93, 8.31, 17.81, 23.29, 4.22e-06, 4.27e-06, 4.23e-06, nan ], [ 7300, 276.34, 1.54, 233.27, 1.83, 50.93, 8.37, 17.48, 24.39, 5.24e-06, 5.12e-06, 5.05e-06, nan ], [ 7400, 278.54, 1.57, 233.55, 1.88, 51.69, 8.48, 17.52, 25.02, 4.60e-06, 4.37e-06, 4.52e-06, nan ], [ 7500, 277.82, 1.62, 236.78, 1.90, 52.17, 8.63, 17.72, 25.39, 5.21e-06, 4.73e-06, 4.96e-06, nan ], [ 7600, 287.78, 1.61, 236.63, 1.95, 52.87, 8.74, 17.58, 26.28, 4.72e-06, 4.69e-06, 5.04e-06, nan ], [ 7700, 286.97, 1.65, 233.36, 2.03, 53.61, 8.85, 16.69, 28.43, 4.32e-06, 4.09e-06, 4.32e-06, nan ], [ 7800, 289.09, 1.68, 235.05, 2.07, 54.32, 8.96, 16.92, 28.77, 4.46e-06, 4.44e-06, 4.60e-06, nan ], [ 7900, 284.54, 1.75, 237.69, 2.10, 54.72, 9.13, 17.60, 28.38, 4.46e-06, 4.52e-06, 4.59e-06, nan ], [ 8000, 285.28, 1.80, 263.84, 1.94, 55.41, 9.24, 17.69, 28.95, 5.27e-06, 4.86e-06, 4.44e-06, nan ], [ 8100, 287.83, 1.82, 240.83, 2.18, 56.06, 9.37, 17.41, 30.16, 4.34e-06, 4.73e-06, 4.32e-06, nan ], [ 8200, 281.69, 1.91, 236.72, 2.27, 51.54, 10.44, 16.13, 33.37, 4.80e-06, 4.50e-06, 4.70e-06, nan ], [ 8300, 283.71, 1.94, 235.15, 2.34, 50.99, 10.81, 16.31, 33.80, 5.24e-06, 4.67e-06, 4.83e-06, nan ], [ 8400, 275.83, 2.05, 238.62, 2.37, 51.84, 10.89, 17.53, 32.21, 5.19e-06, 4.73e-06, 5.06e-06, nan ], [ 8500, 284.49, 2.03, 241.77, 2.39, 52.51, 11.01, 17.66, 32.73, 5.19e-06, 5.32e-06, 5.76e-06, nan ], [ 8600, 277.18, 2.14, 240.07, 2.47, 53.13, 11.14, 17.56, 33.71, 5.26e-06, 5.40e-06, 5.18e-06, nan ], [ 8700, 282.21, 2.15, 238.54, 2.54, 53.54, 11.31, 17.64, 34.34, 5.61e-06, 5.89e-06, 5.39e-06, nan ], [ 8800, 271.06, 2.29, 271.17, 2.29, 54.14, 11.45, 17.79, 34.83, 5.56e-06, 6.12e-06, 5.77e-06, nan ], [ 8900, 273.99, 2.31, 243.10, 2.61, 54.83, 11.56, 17.77, 35.67, 5.21e-06, 5.30e-06, 5.21e-06, nan ], [ 9000, 275.19, 2.36, 239.25, 2.71, 55.31, 11.72, 17.52, 36.99, 5.86e-06, 5.36e-06, 5.32e-06, nan ], [ 10000, 273.06, 2.93, 246.20, 3.25, 54.78, 14.61, 17.44, 45.89, 6.36e-06, 6.46e-06, 6.26e-06, nan ], [ 12000, 272.96, 4.22, 281.82, 4.09, 55.21, 20.87, 17.47, 65.96, 6.27e-06, 6.43e-06, 6.34e-06, nan ], [ 14000, 292.80, 5.36, 251.79, 6.23, 55.43, 28.29, 16.95, 92.53, 6.79e-06, 6.49e-06, 6.86e-06, nan ], [ 16000, 295.56, 6.93, 286.86, 7.14, 55.23, 37.08, 15.47, 132.36, 8.87e-06, 8.64e-06, 9.27e-06, nan ], [ 18000, 286.28, 9.05, 260.26, 9.96, 54.47, 47.59, 16.31, 158.92, 7.91e-06, 8.04e-06, 8.33e-06, nan ], [ 20000, 290.03, 11.03, 292.17, 10.95, 53.57, 59.74, 17.22, 185.87, 9.58e-06, 1.02e-05, 9.49e-06, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/cpotrf.txt # numactl --interleave=all ../testing/testing_cpotrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 cpotrf = array([ [ 10, nan, nan, 0.33, 0.00, nan ], [ 20, nan, nan, 1.19, 0.00, nan ], [ 30, nan, nan, 2.58, 0.00, nan ], [ 40, nan, nan, 4.56, 0.00, nan ], [ 50, nan, nan, 3.01, 0.00, nan ], [ 60, nan, nan, 5.43, 0.00, nan ], [ 70, nan, nan, 6.45, 0.00, nan ], [ 80, nan, nan, 6.88, 0.00, nan ], [ 90, nan, nan, 8.10, 0.00, nan ], [ 100, nan, nan, 8.69, 0.00, nan ], [ 200, nan, nan, 41.02, 0.00, nan ], [ 300, nan, nan, 17.59, 0.00, nan ], [ 400, nan, nan, 33.80, 0.00, nan ], [ 500, nan, nan, 58.03, 0.00, nan ], [ 600, nan, nan, 70.90, 0.00, nan ], [ 700, nan, nan, 99.63, 0.00, nan ], [ 800, nan, nan, 111.37, 0.01, nan ], [ 900, nan, nan, 145.55, 0.01, nan ], [ 1000, nan, nan, 187.16, 0.01, nan ], [ 2000, nan, nan, 573.72, 0.02, nan ], [ 3000, nan, nan, 1011.85, 0.04, nan ], [ 4000, nan, nan, 1318.35, 0.06, nan ], [ 5000, nan, nan, 1545.89, 0.11, nan ], [ 6000, nan, nan, 1759.68, 0.16, nan ], [ 7000, nan, nan, 1899.25, 0.24, nan ], [ 8000, nan, nan, 2032.99, 0.34, nan ], [ 9000, nan, nan, 2145.05, 0.45, nan ], [ 10000, nan, nan, 2229.54, 0.60, nan ], [ 12000, nan, nan, 2387.09, 0.97, nan ], [ 14000, nan, nan, 2504.14, 1.46, nan ], [ 16000, nan, nan, 2598.13, 2.10, nan ], [ 18000, nan, nan, 2649.71, 2.94, nan ], [ 20000, nan, nan, 2710.26, 3.94, nan ], ]) # numactl --interleave=all ../testing/testing_cpotrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 cpotrf_gpu = array([ [ 10, nan, nan, 0.00, 0.00, nan ], [ 20, nan, nan, 0.01, 0.00, nan ], [ 30, nan, nan, 0.03, 0.00, nan ], [ 40, nan, nan, 0.08, 0.00, nan ], [ 50, nan, nan, 0.14, 0.00, nan ], [ 60, nan, nan, 0.24, 0.00, nan ], [ 70, nan, nan, 0.37, 0.00, nan ], [ 80, nan, nan, 0.51, 0.00, nan ], [ 90, nan, nan, 0.75, 0.00, nan ], [ 100, nan, nan, 0.99, 0.00, nan ], [ 200, nan, nan, 17.26, 0.00, nan ], [ 300, nan, nan, 12.99, 0.00, nan ], [ 400, nan, nan, 26.48, 0.00, nan ], [ 500, nan, nan, 45.74, 0.00, nan ], [ 600, nan, nan, 61.09, 0.00, nan ], [ 700, nan, nan, 89.28, 0.01, nan ], [ 800, nan, nan, 105.37, 0.01, nan ], [ 900, nan, nan, 137.82, 0.01, nan ], [ 1000, nan, nan, 174.87, 0.01, nan ], [ 2000, nan, nan, 631.87, 0.02, nan ], [ 3000, nan, nan, 1150.55, 0.03, nan ], [ 4000, nan, nan, 1507.42, 0.06, nan ], [ 5000, nan, nan, 1770.97, 0.09, nan ], [ 6000, nan, nan, 1989.97, 0.14, nan ], [ 7000, nan, nan, 2145.11, 0.21, nan ], [ 8000, nan, nan, 2273.88, 0.30, nan ], [ 9000, nan, nan, 2363.62, 0.41, nan ], [ 10000, nan, nan, 2431.79, 0.55, nan ], [ 12000, nan, nan, 2566.33, 0.90, nan ], [ 14000, nan, nan, 2682.30, 1.36, nan ], [ 16000, nan, nan, 2764.15, 1.98, nan ], [ 18000, nan, nan, 2796.48, 2.78, nan ], [ 20000, nan, nan, 2846.62, 3.75, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/dgeqrf.txt # numactl --interleave=all ../testing/testing_dgeqrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 dgeqrf = array([ [ 10, 10, nan, nan, 0.01, 0.00, nan ], [ 20, 20, nan, nan, 0.05, 0.00, nan ], [ 30, 30, nan, nan, 0.16, 0.00, nan ], [ 40, 40, nan, nan, 0.36, 0.00, nan ], [ 50, 50, nan, nan, 0.64, 0.00, nan ], [ 60, 60, nan, nan, 0.99, 0.00, nan ], [ 70, 70, nan, nan, 0.53, 0.00, nan ], [ 80, 80, nan, nan, 0.78, 0.00, nan ], [ 90, 90, nan, nan, 1.04, 0.00, nan ], [ 100, 100, nan, nan, 1.33, 0.00, nan ], [ 200, 200, nan, nan, 4.94, 0.00, nan ], [ 300, 300, nan, nan, 11.41, 0.00, nan ], [ 400, 400, nan, nan, 18.41, 0.00, nan ], [ 500, 500, nan, nan, 27.28, 0.01, nan ], [ 600, 600, nan, nan, 36.17, 0.01, nan ], [ 700, 700, nan, nan, 46.54, 0.01, nan ], [ 800, 800, nan, nan, 56.05, 0.01, nan ], [ 900, 900, nan, nan, 65.84, 0.01, nan ], [ 1000, 1000, nan, nan, 78.03, 0.02, nan ], [ 2000, 2000, nan, nan, 200.11, 0.05, nan ], [ 3000, 3000, nan, nan, 318.52, 0.11, nan ], [ 4000, 4000, nan, nan, 416.39, 0.21, nan ], [ 5000, 5000, nan, nan, 532.87, 0.31, nan ], [ 6000, 6000, nan, nan, 637.28, 0.45, nan ], [ 7000, 7000, nan, nan, 707.45, 0.65, nan ], [ 8000, 8000, nan, nan, 761.67, 0.90, nan ], [ 9000, 9000, nan, nan, 805.55, 1.21, nan ], [ 10000, 10000, nan, nan, 840.49, 1.59, nan ], [ 12000, 12000, nan, nan, 918.36, 2.51, nan ], [ 14000, 14000, nan, nan, 958.36, 3.82, nan ], [ 16000, 16000, nan, nan, 986.38, 5.54, nan ], [ 18000, 18000, nan, nan, 1006.20, 7.73, nan ], [ 20000, 20000, nan, nan, 1026.70, 10.39, nan ], ]) # numactl --interleave=all ../testing/testing_dgeqrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 dgeqrf_gpu = array([ [ 10, 10, nan, nan, 0.00, 0.00, nan ], [ 20, 20, nan, nan, 0.01, 0.00, nan ], [ 30, 30, nan, nan, 0.03, 0.00, nan ], [ 40, 40, nan, nan, 0.07, 0.00, nan ], [ 50, 50, nan, nan, 0.13, 0.00, nan ], [ 60, 60, nan, nan, 0.23, 0.00, nan ], [ 70, 70, nan, nan, 0.28, 0.00, nan ], [ 80, 80, nan, nan, 0.41, 0.00, nan ], [ 90, 90, nan, nan, 0.57, 0.00, nan ], [ 100, 100, nan, nan, 1.55, 0.00, nan ], [ 200, 200, nan, nan, 3.55, 0.00, nan ], [ 300, 300, nan, nan, 8.66, 0.00, nan ], [ 400, 400, nan, nan, 15.07, 0.01, nan ], [ 500, 500, nan, nan, 23.08, 0.01, nan ], [ 600, 600, nan, nan, 31.25, 0.01, nan ], [ 700, 700, nan, nan, 40.84, 0.01, nan ], [ 800, 800, nan, nan, 51.02, 0.01, nan ], [ 900, 900, nan, nan, 59.29, 0.02, nan ], [ 1000, 1000, nan, nan, 71.68, 0.02, nan ], [ 2000, 2000, nan, nan, 191.68, 0.06, nan ], [ 3000, 3000, nan, nan, 315.89, 0.11, nan ], [ 4000, 4000, nan, nan, 401.12, 0.21, nan ], [ 5000, 5000, nan, nan, 522.65, 0.32, nan ], [ 6000, 6000, nan, nan, 629.81, 0.46, nan ], [ 7000, 7000, nan, nan, 700.79, 0.65, nan ], [ 8000, 8000, nan, nan, 763.90, 0.89, nan ], [ 9000, 9000, nan, nan, 808.15, 1.20, nan ], [ 10000, 10000, nan, nan, 844.01, 1.58, nan ], [ 12000, 12000, nan, nan, 902.83, 2.55, nan ], [ 14000, 14000, nan, nan, 952.47, 3.84, nan ], [ 16000, 16000, nan, nan, 984.75, 5.55, nan ], [ 18000, 18000, nan, nan, 1006.21, 7.73, nan ], [ 20000, 20000, nan, nan, 1031.65, 10.34, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/dgesvd.txt # numactl --interleave=all ../testing/testing_dgesvd -UN -VN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 dgesvd_UN = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.00, nan ], [ nan, 80, 80, nan, 0.00, nan ], [ nan, 90, 90, nan, 0.00, nan ], [ nan, 100, 100, nan, 0.00, nan ], [ nan, 200, 200, nan, 0.01, nan ], [ nan, 300, 300, nan, 0.03, nan ], [ nan, 400, 400, nan, 0.05, nan ], [ nan, 500, 500, nan, 0.07, nan ], [ nan, 600, 600, nan, 0.09, nan ], [ nan, 700, 700, nan, 0.13, nan ], [ nan, 800, 800, nan, 0.15, nan ], [ nan, 900, 900, nan, 0.19, nan ], [ nan, 1000, 1000, nan, 0.23, nan ], [ nan, 2000, 2000, nan, 0.89, nan ], [ nan, 3000, 3000, nan, 2.29, nan ], [ nan, 4000, 4000, nan, 4.62, nan ], [ nan, 5000, 5000, nan, 8.25, nan ], [ nan, 6000, 6000, nan, 13.23, nan ], [ nan, 7000, 7000, nan, 19.88, nan ], [ nan, 8000, 8000, nan, 28.43, nan ], [ nan, 9000, 9000, nan, 39.52, nan ], [ nan, 10000, 10000, nan, 52.77, nan ], [ nan, 300, 100, nan, 0.00, nan ], [ nan, 600, 200, nan, 0.02, nan ], [ nan, 900, 300, nan, 0.03, nan ], [ nan, 1200, 400, nan, 0.06, nan ], [ nan, 1500, 500, nan, 0.08, nan ], [ nan, 1800, 600, nan, 0.11, nan ], [ nan, 2100, 700, nan, 0.15, nan ], [ nan, 2400, 800, nan, 0.18, nan ], [ nan, 2700, 900, nan, 0.24, nan ], [ nan, 3000, 1000, nan, 0.29, nan ], [ nan, 6000, 2000, nan, 1.24, nan ], [ nan, 9000, 3000, nan, 3.30, nan ], [ nan, 12000, 4000, nan, 6.74, nan ], [ nan, 15000, 5000, nan, 12.11, nan ], [ nan, 18000, 6000, nan, 19.56, nan ], [ nan, 21000, 7000, nan, 29.55, nan ], [ nan, 24000, 8000, nan, 43.21, nan ], [ nan, 27000, 9000, nan, 59.53, nan ], [ nan, 100, 300, nan, 0.00, nan ], [ nan, 200, 600, nan, 0.02, nan ], [ nan, 300, 900, nan, 0.04, nan ], [ nan, 400, 1200, nan, 0.06, nan ], [ nan, 500, 1500, nan, 0.09, nan ], [ nan, 600, 1800, nan, 0.12, nan ], [ nan, 700, 2100, nan, 0.17, nan ], [ nan, 800, 2400, nan, 0.20, nan ], [ nan, 900, 2700, nan, 0.26, nan ], [ nan, 1000, 3000, nan, 0.31, nan ], [ nan, 2000, 6000, nan, 1.31, nan ], [ nan, 3000, 9000, nan, 3.46, nan ], [ nan, 4000, 12000, nan, 7.03, nan ], [ nan, 5000, 15000, nan, 12.58, nan ], [ nan, 6000, 18000, nan, 20.59, nan ], [ nan, 7000, 21000, nan, 31.25, nan ], [ nan, 8000, 24000, nan, 44.75, nan ], [ nan, 9000, 27000, nan, 62.03, nan ], [ nan, 10000, 100, nan, 0.01, nan ], [ nan, 20000, 200, nan, 0.06, nan ], [ nan, 30000, 300, nan, 0.15, nan ], [ nan, 40000, 400, nan, 0.38, nan ], [ nan, 50000, 500, nan, 0.62, nan ], [ nan, 60000, 600, nan, 0.93, nan ], [ nan, 70000, 700, nan, 1.30, nan ], [ nan, 80000, 800, nan, 1.74, nan ], [ nan, 90000, 900, nan, 2.46, nan ], [ nan, 100000, 1000, nan, 3.10, nan ], [ nan, 200000, 2000, nan, 18.29, nan ], [ nan, 100, 10000, nan, 0.01, nan ], [ nan, 200, 20000, nan, 0.05, nan ], [ nan, 300, 30000, nan, 0.16, nan ], [ nan, 400, 40000, nan, 0.32, nan ], [ nan, 500, 50000, nan, 0.58, nan ], [ nan, 600, 60000, nan, 0.89, nan ], [ nan, 700, 70000, nan, 1.40, nan ], [ nan, 800, 80000, nan, 1.84, nan ], [ nan, 900, 90000, nan, 2.20, nan ], [ nan, 1000, 100000, nan, 2.85, nan ], [ nan, 2000, 200000, nan, 19.86, nan ], ]) # numactl --interleave=all ../testing/testing_dgesvd -US -VS -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 dgesvd_US = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.01, nan ], [ nan, 60, 60, nan, 0.01, nan ], [ nan, 70, 70, nan, 0.01, nan ], [ nan, 80, 80, nan, 0.01, nan ], [ nan, 90, 90, nan, 0.02, nan ], [ nan, 100, 100, nan, 0.02, nan ], [ nan, 200, 200, nan, 0.08, nan ], [ nan, 300, 300, nan, 0.06, nan ], [ nan, 400, 400, nan, 0.10, nan ], [ nan, 500, 500, nan, 0.15, nan ], [ nan, 600, 600, nan, 0.23, nan ], [ nan, 700, 700, nan, 0.31, nan ], [ nan, 800, 800, nan, 0.40, nan ], [ nan, 900, 900, nan, 0.51, nan ], [ nan, 1000, 1000, nan, 0.64, nan ], [ nan, 2000, 2000, nan, 3.17, nan ], [ nan, 3000, 3000, nan, 8.43, nan ], [ nan, 4000, 4000, nan, 17.26, nan ], [ nan, 5000, 5000, nan, 30.03, nan ], [ nan, 6000, 6000, nan, 48.01, nan ], [ nan, 7000, 7000, nan, 71.13, nan ], [ nan, 8000, 8000, nan, 100.03, nan ], [ nan, 9000, 9000, nan, 138.28, nan ], [ nan, 10000, 10000, nan, 184.97, nan ], [ nan, 300, 100, nan, 0.02, nan ], [ nan, 600, 200, nan, 0.10, nan ], [ nan, 900, 300, nan, 0.08, nan ], [ nan, 1200, 400, nan, 0.14, nan ], [ nan, 1500, 500, nan, 0.23, nan ], [ nan, 1800, 600, nan, 0.35, nan ], [ nan, 2100, 700, nan, 0.47, nan ], [ nan, 2400, 800, nan, 0.63, nan ], [ nan, 2700, 900, nan, 0.81, nan ], [ nan, 3000, 1000, nan, 1.07, nan ], [ nan, 6000, 2000, nan, 5.81, nan ], [ nan, 9000, 3000, nan, 16.38, nan ], [ nan, 12000, 4000, nan, 33.27, nan ], [ nan, 15000, 5000, nan, 48.81, nan ], [ nan, 18000, 6000, nan, 75.32, nan ], [ nan, 21000, 7000, nan, 112.07, nan ], [ nan, 24000, 8000, nan, 156.84, nan ], [ nan, 27000, 9000, nan, 222.43, nan ], [ nan, 100, 300, nan, 0.02, nan ], [ nan, 200, 600, nan, 0.08, nan ], [ nan, 300, 900, nan, 0.09, nan ], [ nan, 400, 1200, nan, 0.16, nan ], [ nan, 500, 1500, nan, 0.26, nan ], [ nan, 600, 1800, nan, 0.40, nan ], [ nan, 700, 2100, nan, 0.55, nan ], [ nan, 800, 2400, nan, 0.70, nan ], [ nan, 900, 2700, nan, 0.90, nan ], [ nan, 1000, 3000, nan, 1.13, nan ], [ nan, 2000, 6000, nan, 6.18, nan ], [ nan, 3000, 9000, nan, 15.90, nan ], [ nan, 4000, 12000, nan, 31.34, nan ], [ nan, 5000, 15000, nan, 53.58, nan ], [ nan, 6000, 18000, nan, 88.90, nan ], [ nan, 7000, 21000, nan, 132.87, nan ], [ nan, 8000, 24000, nan, 187.01, nan ], [ nan, 9000, 27000, nan, 254.09, nan ], [ nan, 10000, 100, nan, 0.06, nan ], [ nan, 20000, 200, nan, 0.28, nan ], [ nan, 30000, 300, nan, 0.48, nan ], [ nan, 40000, 400, nan, 1.01, nan ], [ nan, 50000, 500, nan, 1.84, nan ], [ nan, 60000, 600, nan, 2.61, nan ], [ nan, 70000, 700, nan, 4.08, nan ], [ nan, 80000, 800, nan, 5.43, nan ], [ nan, 90000, 900, nan, 7.95, nan ], [ nan, 100000, 1000, nan, 10.22, nan ], [ nan, 200000, 2000, nan, 70.82, nan ], [ nan, 100, 10000, nan, 0.06, nan ], [ nan, 200, 20000, nan, 0.39, nan ], [ nan, 300, 30000, nan, 0.62, nan ], [ nan, 400, 40000, nan, 1.20, nan ], [ nan, 500, 50000, nan, 3.25, nan ], [ nan, 600, 60000, nan, 4.00, nan ], [ nan, 700, 70000, nan, 5.34, nan ], [ nan, 800, 80000, nan, 7.31, nan ], [ nan, 900, 90000, nan, 8.49, nan ], [ nan, 1000, 100000, nan, 14.48, nan ], [ nan, 2000, 200000, nan, 83.46, nan ], ]) # numactl --interleave=all ../testing/testing_dgesdd -UN -VN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 dgesdd_UN = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.00, nan ], [ nan, 80, 80, nan, 0.00, nan ], [ nan, 90, 90, nan, 0.00, nan ], [ nan, 100, 100, nan, 0.00, nan ], [ nan, 200, 200, nan, 0.01, nan ], [ nan, 300, 300, nan, 0.03, nan ], [ nan, 400, 400, nan, 0.05, nan ], [ nan, 500, 500, nan, 0.07, nan ], [ nan, 600, 600, nan, 0.09, nan ], [ nan, 700, 700, nan, 0.12, nan ], [ nan, 800, 800, nan, 0.15, nan ], [ nan, 900, 900, nan, 0.19, nan ], [ nan, 1000, 1000, nan, 0.23, nan ], [ nan, 2000, 2000, nan, 0.89, nan ], [ nan, 3000, 3000, nan, 2.30, nan ], [ nan, 4000, 4000, nan, 4.65, nan ], [ nan, 5000, 5000, nan, 8.29, nan ], [ nan, 6000, 6000, nan, 13.32, nan ], [ nan, 7000, 7000, nan, 20.01, nan ], [ nan, 8000, 8000, nan, 28.62, nan ], [ nan, 9000, 9000, nan, 39.78, nan ], [ nan, 10000, 10000, nan, 53.14, nan ], [ nan, 300, 100, nan, 0.00, nan ], [ nan, 600, 200, nan, 0.02, nan ], [ nan, 900, 300, nan, 0.03, nan ], [ nan, 1200, 400, nan, 0.06, nan ], [ nan, 1500, 500, nan, 0.08, nan ], [ nan, 1800, 600, nan, 0.12, nan ], [ nan, 2100, 700, nan, 0.16, nan ], [ nan, 2400, 800, nan, 0.20, nan ], [ nan, 2700, 900, nan, 0.26, nan ], [ nan, 3000, 1000, nan, 0.29, nan ], [ nan, 6000, 2000, nan, 1.35, nan ], [ nan, 9000, 3000, nan, 3.65, nan ], [ nan, 12000, 4000, nan, 7.62, nan ], [ nan, 15000, 5000, nan, 13.86, nan ], [ nan, 18000, 6000, nan, 22.81, nan ], [ nan, 21000, 7000, nan, 34.07, nan ], [ nan, 24000, 8000, nan, 49.03, nan ], [ nan, 27000, 9000, nan, 59.73, nan ], [ nan, 100, 300, nan, 0.00, nan ], [ nan, 200, 600, nan, 0.02, nan ], [ nan, 300, 900, nan, 0.04, nan ], [ nan, 400, 1200, nan, 0.06, nan ], [ nan, 500, 1500, nan, 0.09, nan ], [ nan, 600, 1800, nan, 0.12, nan ], [ nan, 700, 2100, nan, 0.17, nan ], [ nan, 800, 2400, nan, 0.20, nan ], [ nan, 900, 2700, nan, 0.26, nan ], [ nan, 1000, 3000, nan, 0.31, nan ], [ nan, 2000, 6000, nan, 1.30, nan ], [ nan, 3000, 9000, nan, 3.45, nan ], [ nan, 4000, 12000, nan, 7.02, nan ], [ nan, 5000, 15000, nan, 12.59, nan ], [ nan, 6000, 18000, nan, 20.60, nan ], [ nan, 7000, 21000, nan, 31.25, nan ], [ nan, 8000, 24000, nan, 44.72, nan ], [ nan, 9000, 27000, nan, 61.98, nan ], [ nan, 10000, 100, nan, 0.01, nan ], [ nan, 20000, 200, nan, 0.06, nan ], [ nan, 30000, 300, nan, 0.15, nan ], [ nan, 40000, 400, nan, 0.38, nan ], [ nan, 50000, 500, nan, 0.61, nan ], [ nan, 60000, 600, nan, 0.93, nan ], [ nan, 70000, 700, nan, 1.33, nan ], [ nan, 80000, 800, nan, 1.78, nan ], [ nan, 90000, 900, nan, 2.42, nan ], [ nan, 100000, 1000, nan, 3.13, nan ], [ nan, 200000, 2000, nan, 18.41, nan ], [ nan, 100, 10000, nan, 0.01, nan ], [ nan, 200, 20000, nan, 0.05, nan ], [ nan, 300, 30000, nan, 0.16, nan ], [ nan, 400, 40000, nan, 0.32, nan ], [ nan, 500, 50000, nan, 0.58, nan ], [ nan, 600, 60000, nan, 0.90, nan ], [ nan, 700, 70000, nan, 1.41, nan ], [ nan, 800, 80000, nan, 1.86, nan ], [ nan, 900, 90000, nan, 2.20, nan ], [ nan, 1000, 100000, nan, 2.85, nan ], [ nan, 2000, 200000, nan, 19.71, nan ], ]) # numactl --interleave=all ../testing/testing_dgesdd -US -VS -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 dgesdd_US = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.00, nan ], [ nan, 80, 80, nan, 0.00, nan ], [ nan, 90, 90, nan, 0.00, nan ], [ nan, 100, 100, nan, 0.01, nan ], [ nan, 200, 200, nan, 0.03, nan ], [ nan, 300, 300, nan, 0.05, nan ], [ nan, 400, 400, nan, 0.09, nan ], [ nan, 500, 500, nan, 0.13, nan ], [ nan, 600, 600, nan, 0.18, nan ], [ nan, 700, 700, nan, 0.24, nan ], [ nan, 800, 800, nan, 0.31, nan ], [ nan, 900, 900, nan, 0.38, nan ], [ nan, 1000, 1000, nan, 0.47, nan ], [ nan, 2000, 2000, nan, 1.88, nan ], [ nan, 3000, 3000, nan, 5.33, nan ], [ nan, 4000, 4000, nan, 9.18, nan ], [ nan, 5000, 5000, nan, 15.73, nan ], [ nan, 6000, 6000, nan, 23.32, nan ], [ nan, 7000, 7000, nan, 33.88, nan ], [ nan, 8000, 8000, nan, 47.62, nan ], [ nan, 9000, 9000, nan, 64.52, nan ], [ nan, 10000, 10000, nan, 84.79, nan ], [ nan, 300, 100, nan, 0.01, nan ], [ nan, 600, 200, nan, 0.03, nan ], [ nan, 900, 300, nan, 0.06, nan ], [ nan, 1200, 400, nan, 0.10, nan ], [ nan, 1500, 500, nan, 0.16, nan ], [ nan, 1800, 600, nan, 0.22, nan ], [ nan, 2100, 700, nan, 0.30, nan ], [ nan, 2400, 800, nan, 0.37, nan ], [ nan, 2700, 900, nan, 0.48, nan ], [ nan, 3000, 1000, nan, 0.62, nan ], [ nan, 6000, 2000, nan, 2.68, nan ], [ nan, 9000, 3000, nan, 6.89, nan ], [ nan, 12000, 4000, nan, 13.83, nan ], [ nan, 15000, 5000, nan, 24.11, nan ], [ nan, 18000, 6000, nan, 39.47, nan ], [ nan, 21000, 7000, nan, 58.52, nan ], [ nan, 24000, 8000, nan, 83.76, nan ], [ nan, 27000, 9000, nan, 114.69, nan ], [ nan, 100, 300, nan, 0.01, nan ], [ nan, 200, 600, nan, 0.03, nan ], [ nan, 300, 900, nan, 0.07, nan ], [ nan, 400, 1200, nan, 0.11, nan ], [ nan, 500, 1500, nan, 0.17, nan ], [ nan, 600, 1800, nan, 0.23, nan ], [ nan, 700, 2100, nan, 0.33, nan ], [ nan, 800, 2400, nan, 0.39, nan ], [ nan, 900, 2700, nan, 0.50, nan ], [ nan, 1000, 3000, nan, 0.65, nan ], [ nan, 2000, 6000, nan, 2.76, nan ], [ nan, 3000, 9000, nan, 7.10, nan ], [ nan, 4000, 12000, nan, 14.07, nan ], [ nan, 5000, 15000, nan, 24.53, nan ], [ nan, 6000, 18000, nan, 40.57, nan ], [ nan, 7000, 21000, nan, 60.37, nan ], [ nan, 8000, 24000, nan, 85.93, nan ], [ nan, 9000, 27000, nan, 117.67, nan ], [ nan, 10000, 100, nan, 0.03, nan ], [ nan, 20000, 200, nan, 0.18, nan ], [ nan, 30000, 300, nan, 0.32, nan ], [ nan, 40000, 400, nan, 0.65, nan ], [ nan, 50000, 500, nan, 1.56, nan ], [ nan, 60000, 600, nan, 1.98, nan ], [ nan, 70000, 700, nan, 2.51, nan ], [ nan, 80000, 800, nan, 3.18, nan ], [ nan, 90000, 900, nan, 4.16, nan ], [ nan, 100000, 1000, nan, 6.71, nan ], [ nan, 200000, 2000, nan, 36.14, nan ], [ nan, 100, 10000, nan, 0.04, nan ], [ nan, 200, 20000, nan, 0.23, nan ], [ nan, 300, 30000, nan, 0.42, nan ], [ nan, 400, 40000, nan, 0.67, nan ], [ nan, 500, 50000, nan, 2.56, nan ], [ nan, 600, 60000, nan, 2.99, nan ], [ nan, 700, 70000, nan, 3.50, nan ], [ nan, 800, 80000, nan, 3.78, nan ], [ nan, 900, 90000, nan, 4.42, nan ], [ nan, 1000, 100000, nan, 9.12, nan ], [ nan, 2000, 200000, nan, 41.81, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/dgetrf.txt # numactl --interleave=all ../testing/testing_dgetrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 dgetrf = array([ [ 10, 10, nan, nan, 0.03, 0.00, nan ], [ 20, 20, nan, nan, 0.18, 0.00, nan ], [ 30, 30, nan, nan, 0.36, 0.00, nan ], [ 40, 40, nan, nan, 0.91, 0.00, nan ], [ 50, 50, nan, nan, 1.42, 0.00, nan ], [ 60, 60, nan, nan, 2.00, 0.00, nan ], [ 70, 70, nan, nan, 1.75, 0.00, nan ], [ 80, 80, nan, nan, 2.43, 0.00, nan ], [ 90, 90, nan, nan, 3.05, 0.00, nan ], [ 100, 100, nan, nan, 3.70, 0.00, nan ], [ 200, 200, nan, nan, 3.47, 0.00, nan ], [ 300, 300, nan, nan, 8.27, 0.00, nan ], [ 400, 400, nan, nan, 14.01, 0.00, nan ], [ 500, 500, nan, nan, 21.65, 0.00, nan ], [ 600, 600, nan, nan, 28.58, 0.01, nan ], [ 700, 700, nan, nan, 37.02, 0.01, nan ], [ 800, 800, nan, nan, 45.15, 0.01, nan ], [ 900, 900, nan, nan, 54.03, 0.01, nan ], [ 1000, 1000, nan, nan, 62.55, 0.01, nan ], [ 2000, 2000, nan, nan, 153.45, 0.03, nan ], [ 3000, 3000, nan, nan, 260.01, 0.07, nan ], [ 4000, 4000, nan, nan, 347.38, 0.12, nan ], [ 5000, 5000, nan, nan, 444.73, 0.19, nan ], [ 6000, 6000, nan, nan, 529.58, 0.27, nan ], [ 7000, 7000, nan, nan, 594.63, 0.38, nan ], [ 8000, 8000, nan, nan, 652.53, 0.52, nan ], [ 9000, 9000, nan, nan, 694.22, 0.70, nan ], [ 10000, 10000, nan, nan, 737.16, 0.90, nan ], [ 12000, 12000, nan, nan, 811.39, 1.42, nan ], [ 14000, 14000, nan, nan, 854.75, 2.14, nan ], [ 16000, 16000, nan, nan, 891.71, 3.06, nan ], [ 18000, 18000, nan, nan, 915.62, 4.25, nan ], [ 20000, 20000, nan, nan, 942.41, 5.66, nan ], ]) # numactl --interleave=all ../testing/testing_dgetrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 dgetrf_gpu = array([ [ 10, 10, nan, nan, 0.00, 0.00, nan ], [ 20, 20, nan, nan, 0.02, 0.00, nan ], [ 30, 30, nan, nan, 0.07, 0.00, nan ], [ 40, 40, nan, nan, 0.16, 0.00, nan ], [ 50, 50, nan, nan, 0.27, 0.00, nan ], [ 60, 60, nan, nan, 0.47, 0.00, nan ], [ 70, 70, nan, nan, 0.59, 0.00, nan ], [ 80, 80, nan, nan, 0.86, 0.00, nan ], [ 90, 90, nan, nan, 1.10, 0.00, nan ], [ 100, 100, nan, nan, 1.43, 0.00, nan ], [ 200, 200, nan, nan, 2.26, 0.00, nan ], [ 300, 300, nan, nan, 5.95, 0.00, nan ], [ 400, 400, nan, nan, 11.38, 0.00, nan ], [ 500, 500, nan, nan, 18.16, 0.00, nan ], [ 600, 600, nan, nan, 26.82, 0.01, nan ], [ 700, 700, nan, nan, 35.30, 0.01, nan ], [ 800, 800, nan, nan, 44.51, 0.01, nan ], [ 900, 900, nan, nan, 54.18, 0.01, nan ], [ 1000, 1000, nan, nan, 63.98, 0.01, nan ], [ 2000, 2000, nan, nan, 178.98, 0.03, nan ], [ 3000, 3000, nan, nan, 315.08, 0.06, nan ], [ 4000, 4000, nan, nan, 407.04, 0.10, nan ], [ 5000, 5000, nan, nan, 526.51, 0.16, nan ], [ 6000, 6000, nan, nan, 640.55, 0.22, nan ], [ 7000, 7000, nan, nan, 718.58, 0.32, nan ], [ 8000, 8000, nan, nan, 779.09, 0.44, nan ], [ 9000, 9000, nan, nan, 815.55, 0.60, nan ], [ 10000, 10000, nan, nan, 861.60, 0.77, nan ], [ 12000, 12000, nan, nan, 932.31, 1.24, nan ], [ 14000, 14000, nan, nan, 972.53, 1.88, nan ], [ 16000, 16000, nan, nan, 1005.85, 2.71, nan ], [ 18000, 18000, nan, nan, 1021.26, 3.81, nan ], [ 20000, 20000, nan, nan, 1041.20, 5.12, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/dpotrf.txt # numactl --interleave=all ../testing/testing_dpotrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 dpotrf = array([ [ 10, nan, nan, 0.08, 0.00, nan ], [ 20, nan, nan, 0.33, 0.00, nan ], [ 30, nan, nan, 0.67, 0.00, nan ], [ 40, nan, nan, 0.82, 0.00, nan ], [ 50, nan, nan, 1.86, 0.00, nan ], [ 60, nan, nan, 2.18, 0.00, nan ], [ 70, nan, nan, 1.82, 0.00, nan ], [ 80, nan, nan, 2.56, 0.00, nan ], [ 90, nan, nan, 2.50, 0.00, nan ], [ 100, nan, nan, 2.66, 0.00, nan ], [ 200, nan, nan, 13.10, 0.00, nan ], [ 300, nan, nan, 5.00, 0.00, nan ], [ 400, nan, nan, 9.81, 0.00, nan ], [ 500, nan, nan, 16.93, 0.00, nan ], [ 600, nan, nan, 20.47, 0.00, nan ], [ 700, nan, nan, 28.69, 0.00, nan ], [ 800, nan, nan, 33.21, 0.01, nan ], [ 900, nan, nan, 42.32, 0.01, nan ], [ 1000, nan, nan, 55.57, 0.01, nan ], [ 2000, nan, nan, 169.70, 0.02, nan ], [ 3000, nan, nan, 296.46, 0.03, nan ], [ 4000, nan, nan, 476.04, 0.04, nan ], [ 5000, nan, nan, 567.42, 0.07, nan ], [ 6000, nan, nan, 661.73, 0.11, nan ], [ 7000, nan, nan, 719.67, 0.16, nan ], [ 8000, nan, nan, 786.40, 0.22, nan ], [ 9000, nan, nan, 827.97, 0.29, nan ], [ 10000, nan, nan, 864.94, 0.39, nan ], [ 12000, nan, nan, 931.65, 0.62, nan ], [ 14000, nan, nan, 982.09, 0.93, nan ], [ 16000, nan, nan, 1024.56, 1.33, nan ], [ 18000, nan, nan, 1045.70, 1.86, nan ], [ 20000, nan, nan, 1072.76, 2.49, nan ], ]) # numactl --interleave=all ../testing/testing_dpotrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 dpotrf_gpu = array([ [ 10, nan, nan, 0.00, 0.00, nan ], [ 20, nan, nan, 0.00, 0.00, nan ], [ 30, nan, nan, 0.01, 0.00, nan ], [ 40, nan, nan, 0.02, 0.00, nan ], [ 50, nan, nan, 0.04, 0.00, nan ], [ 60, nan, nan, 0.06, 0.00, nan ], [ 70, nan, nan, 0.09, 0.00, nan ], [ 80, nan, nan, 0.14, 0.00, nan ], [ 90, nan, nan, 0.19, 0.00, nan ], [ 100, nan, nan, 0.25, 0.00, nan ], [ 200, nan, nan, 5.02, 0.00, nan ], [ 300, nan, nan, 3.66, 0.00, nan ], [ 400, nan, nan, 7.40, 0.00, nan ], [ 500, nan, nan, 13.39, 0.00, nan ], [ 600, nan, nan, 17.87, 0.00, nan ], [ 700, nan, nan, 26.15, 0.00, nan ], [ 800, nan, nan, 31.48, 0.01, nan ], [ 900, nan, nan, 41.97, 0.01, nan ], [ 1000, nan, nan, 54.41, 0.01, nan ], [ 2000, nan, nan, 200.03, 0.01, nan ], [ 3000, nan, nan, 358.55, 0.03, nan ], [ 4000, nan, nan, 585.91, 0.04, nan ], [ 5000, nan, nan, 693.11, 0.06, nan ], [ 6000, nan, nan, 803.28, 0.09, nan ], [ 7000, nan, nan, 864.01, 0.13, nan ], [ 8000, nan, nan, 935.87, 0.18, nan ], [ 9000, nan, nan, 969.98, 0.25, nan ], [ 10000, nan, nan, 998.77, 0.33, nan ], [ 12000, nan, nan, 1053.51, 0.55, nan ], [ 14000, nan, nan, 1095.34, 0.84, nan ], [ 16000, nan, nan, 1128.53, 1.21, nan ], [ 18000, nan, nan, 1139.54, 1.71, nan ], [ 20000, nan, nan, 1159.31, 2.30, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/dsyevd.txt # numactl --interleave=all ../testing/testing_dsyevd -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_dsyevd -JN -N 123 -N 1234 --range 12000:20000:2000 dsyevd_JN = array([ [ 10, nan, 0.0000, nan, nan, nan, nan ], [ 20, nan, 0.0001, nan, nan, nan, nan ], [ 30, nan, 0.0001, nan, nan, nan, nan ], [ 40, nan, 0.0001, nan, nan, nan, nan ], [ 50, nan, 0.0002, nan, nan, nan, nan ], [ 60, nan, 0.0003, nan, nan, nan, nan ], [ 70, nan, 0.0004, nan, nan, nan, nan ], [ 80, nan, 0.0005, nan, nan, nan, nan ], [ 90, nan, 0.0007, nan, nan, nan, nan ], [ 100, nan, 0.0010, nan, nan, nan, nan ], [ 200, nan, 0.0049, nan, nan, nan, nan ], [ 300, nan, 0.0097, nan, nan, nan, nan ], [ 400, nan, 0.0162, nan, nan, nan, nan ], [ 500, nan, 0.0247, nan, nan, nan, nan ], [ 600, nan, 0.0335, nan, nan, nan, nan ], [ 700, nan, 0.0448, nan, nan, nan, nan ], [ 800, nan, 0.0585, nan, nan, nan, nan ], [ 900, nan, 0.0740, nan, nan, nan, nan ], [ 1000, nan, 0.0918, nan, nan, nan, nan ], [ 2000, nan, 0.3935, nan, nan, nan, nan ], [ 3000, nan, 1.3113, nan, nan, nan, nan ], [ 4000, nan, 2.3401, nan, nan, nan, nan ], [ 5000, nan, 3.7926, nan, nan, nan, nan ], [ 6000, nan, 5.7090, nan, nan, nan, nan ], [ 7000, nan, 8.1075, nan, nan, nan, nan ], [ 8000, nan, 11.0877, nan, nan, nan, nan ], [ 9000, nan, 14.7262, nan, nan, nan, nan ], [ 10000, nan, 19.0244, nan, nan, nan, nan ], [ 12000, nan, 30.4198, nan, nan, nan, nan ], [ 14000, nan, 44.7864, nan, nan, nan, nan ], [ 16000, nan, 63.6517, nan, nan, nan, nan ], [ 18000, nan, 87.5615, nan, nan, nan, nan ], [ 20000, nan, 114.6263, nan, nan, nan, nan ], ]) # numactl --interleave=all ../testing/testing_dsyevd -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_dsyevd -JV -N 123 -N 1234 --range 12000:20000:2000 dsyevd_JV = array([ [ 10, nan, 0.0001, nan, nan, nan, nan ], [ 20, nan, 0.0001, nan, nan, nan, nan ], [ 30, nan, 0.0003, nan, nan, nan, nan ], [ 40, nan, 0.0004, nan, nan, nan, nan ], [ 50, nan, 0.0005, nan, nan, nan, nan ], [ 60, nan, 0.0007, nan, nan, nan, nan ], [ 70, nan, 0.0009, nan, nan, nan, nan ], [ 80, nan, 0.0011, nan, nan, nan, nan ], [ 90, nan, 0.0016, nan, nan, nan, nan ], [ 100, nan, 0.0024, nan, nan, nan, nan ], [ 200, nan, 0.0095, nan, nan, nan, nan ], [ 300, nan, 0.0155, nan, nan, nan, nan ], [ 400, nan, 0.0241, nan, nan, nan, nan ], [ 500, nan, 0.0349, nan, nan, nan, nan ], [ 600, nan, 0.0413, nan, nan, nan, nan ], [ 700, nan, 0.0547, nan, nan, nan, nan ], [ 800, nan, 0.0690, nan, nan, nan, nan ], [ 900, nan, 0.0897, nan, nan, nan, nan ], [ 1000, nan, 0.1082, nan, nan, nan, nan ], [ 2000, nan, 0.4302, nan, nan, nan, nan ], [ 3000, nan, 1.4400, nan, nan, nan, nan ], [ 4000, nan, 2.4758, nan, nan, nan, nan ], [ 5000, nan, 3.9899, nan, nan, nan, nan ], [ 6000, nan, 6.0522, nan, nan, nan, nan ], [ 7000, nan, 8.7300, nan, nan, nan, nan ], [ 8000, nan, 12.2179, nan, nan, nan, nan ], [ 9000, nan, 16.2830, nan, nan, nan, nan ], [ 10000, nan, 21.0444, nan, nan, nan, nan ], [ 12000, nan, 33.7725, nan, nan, nan, nan ], [ 14000, nan, 48.9610, nan, nan, nan, nan ], [ 16000, nan, 70.3212, nan, nan, nan, nan ], [ 18000, nan, 97.6670, nan, nan, nan, nan ], [ 20000, nan, 129.6026, nan, nan, nan, nan ], ]) # numactl --interleave=all ../testing/testing_dsyevd_gpu -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_dsyevd_gpu -JN -N 123 -N 1234 --range 12000:20000:2000 dsyevd_gpu_JN = array([ [ 10, nan, 0.0003, nan, nan, nan, nan ], [ 20, nan, 0.0003, nan, nan, nan, nan ], [ 30, nan, 0.0003, nan, nan, nan, nan ], [ 40, nan, 0.0004, nan, nan, nan, nan ], [ 50, nan, 0.0005, nan, nan, nan, nan ], [ 60, nan, 0.0006, nan, nan, nan, nan ], [ 70, nan, 0.0007, nan, nan, nan, nan ], [ 80, nan, 0.0008, nan, nan, nan, nan ], [ 90, nan, 0.0011, nan, nan, nan, nan ], [ 100, nan, 0.0014, nan, nan, nan, nan ], [ 200, nan, 0.0053, nan, nan, nan, nan ], [ 300, nan, 0.0109, nan, nan, nan, nan ], [ 400, nan, 0.0183, nan, nan, nan, nan ], [ 500, nan, 0.0275, nan, nan, nan, nan ], [ 600, nan, 0.0384, nan, nan, nan, nan ], [ 700, nan, 0.0511, nan, nan, nan, nan ], [ 800, nan, 0.0662, nan, nan, nan, nan ], [ 900, nan, 0.0836, nan, nan, nan, nan ], [ 1000, nan, 0.1031, nan, nan, nan, nan ], [ 2000, nan, 0.4390, nan, nan, nan, nan ], [ 3000, nan, 1.3023, nan, nan, nan, nan ], [ 4000, nan, 2.3194, nan, nan, nan, nan ], [ 5000, nan, 3.7612, nan, nan, nan, nan ], [ 6000, nan, 5.6569, nan, nan, nan, nan ], [ 7000, nan, 7.9992, nan, nan, nan, nan ], [ 8000, nan, 10.9571, nan, nan, nan, nan ], [ 9000, nan, 14.5415, nan, nan, nan, nan ], [ 10000, nan, 18.8142, nan, nan, nan, nan ], [ 12000, nan, 30.2485, nan, nan, nan, nan ], [ 14000, nan, 44.3241, nan, nan, nan, nan ], [ 16000, nan, 63.1912, nan, nan, nan, nan ], [ 18000, nan, 86.6927, nan, nan, nan, nan ], [ 20000, nan, 114.4557, nan, nan, nan, nan ], ]) # numactl --interleave=all ../testing/testing_dsyevd_gpu -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_dsyevd_gpu -JV -N 123 -N 1234 --range 12000:20000:2000 dsyevd_gpu_JV = array([ [ 10, nan, 0.0003, nan, nan, nan, nan ], [ 20, nan, 0.0003, nan, nan, nan, nan ], [ 30, nan, 0.0004, nan, nan, nan, nan ], [ 40, nan, 0.0006, nan, nan, nan, nan ], [ 50, nan, 0.0007, nan, nan, nan, nan ], [ 60, nan, 0.0009, nan, nan, nan, nan ], [ 70, nan, 0.0011, nan, nan, nan, nan ], [ 80, nan, 0.0013, nan, nan, nan, nan ], [ 90, nan, 0.0018, nan, nan, nan, nan ], [ 100, nan, 0.0022, nan, nan, nan, nan ], [ 200, nan, 0.0089, nan, nan, nan, nan ], [ 300, nan, 0.0147, nan, nan, nan, nan ], [ 400, nan, 0.0233, nan, nan, nan, nan ], [ 500, nan, 0.0343, nan, nan, nan, nan ], [ 600, nan, 0.0407, nan, nan, nan, nan ], [ 700, nan, 0.0541, nan, nan, nan, nan ], [ 800, nan, 0.0702, nan, nan, nan, nan ], [ 900, nan, 0.1030, nan, nan, nan, nan ], [ 1000, nan, 0.1247, nan, nan, nan, nan ], [ 2000, nan, 0.4084, nan, nan, nan, nan ], [ 3000, nan, 1.3218, nan, nan, nan, nan ], [ 4000, nan, 2.4399, nan, nan, nan, nan ], [ 5000, nan, 3.9356, nan, nan, nan, nan ], [ 6000, nan, 6.0690, nan, nan, nan, nan ], [ 7000, nan, 8.7427, nan, nan, nan, nan ], [ 8000, nan, 12.2263, nan, nan, nan, nan ], [ 9000, nan, 16.3056, nan, nan, nan, nan ], [ 10000, nan, 21.5106, nan, nan, nan, nan ], [ 12000, nan, 34.9720, nan, nan, nan, nan ], [ 14000, nan, 52.3683, nan, nan, nan, nan ], [ 16000, nan, 77.9785, nan, nan, nan, nan ], [ 18000, nan, 105.1761, nan, nan, nan, nan ], [ 20000, nan, 141.3858, nan, nan, nan, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/dsyevd_2stage.txt # numactl --interleave=all ../testing/testing_dsyevdx_2stage -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 dsyevdx_2stage_JN = array([ [ 10, 10, 0.00 ], [ 20, 20, 0.00 ], [ 30, 30, 0.00 ], [ 40, 40, 0.00 ], [ 50, 50, 0.00 ], [ 60, 60, 0.00 ], [ 70, 70, 0.00 ], [ 80, 80, 0.00 ], [ 90, 90, 0.00 ], [ 100, 100, 0.00 ], [ 200, 200, 0.00 ], [ 300, 300, 0.02 ], [ 400, 400, 0.03 ], [ 500, 500, 0.05 ], [ 600, 600, 0.07 ], [ 700, 700, 0.09 ], [ 800, 800, 0.11 ], [ 900, 900, 0.12 ], [ 1000, 1000, 0.14 ], [ 2000, 2000, 0.48 ], [ 3000, 3000, 0.86 ], [ 4000, 4000, 1.27 ], [ 5000, 5000, 1.86 ], [ 6000, 6000, 2.67 ], [ 7000, 7000, 3.50 ], [ 8000, 8000, 4.55 ], [ 9000, 9000, 5.45 ], [ 10000, 10000, 6.73 ], [ 12000, 12000, 9.83 ], [ 14000, 14000, 13.61 ], [ 16000, 16000, 18.00 ], [ 18000, 18000, 23.60 ], [ 20000, 20000, 30.02 ], ]) # numactl --interleave=all ../testing/testing_dsyevdx_2stage -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 dsyevdx_2stage_JV = array([ [ 10, 10, 0.00 ], [ 20, 20, 0.00 ], [ 30, 30, 0.00 ], [ 40, 40, 0.00 ], [ 50, 50, 0.00 ], [ 60, 60, 0.00 ], [ 70, 70, 0.00 ], [ 80, 80, 0.00 ], [ 90, 90, 0.00 ], [ 100, 100, 0.00 ], [ 200, 200, 0.01 ], [ 300, 300, 0.03 ], [ 400, 400, 0.05 ], [ 500, 500, 0.06 ], [ 600, 600, 0.08 ], [ 700, 700, 0.10 ], [ 800, 800, 0.13 ], [ 900, 900, 0.15 ], [ 1000, 1000, 0.18 ], [ 2000, 2000, 0.52 ], [ 3000, 3000, 1.03 ], [ 4000, 4000, 1.78 ], [ 5000, 5000, 2.76 ], [ 6000, 6000, 4.09 ], [ 7000, 7000, 5.84 ], [ 8000, 8000, 8.14 ], [ 9000, 9000, 10.56 ], [ 10000, 10000, 13.82 ], [ 12000, 12000, 22.20 ], [ 14000, 14000, 33.41 ], [ 16000, 16000, 47.43 ], [ 18000, 18000, 66.80 ], [ 20000, 20000, 90.45 ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/dsymv.txt # numactl --interleave=all ../testing/testing_dsymv -L -N 123 -N 1234 --range 10:90:1 --range 100:900:10 --range 1000:9000:100 --range 10000:20000:2000 dsymv_L = array([ [ 10, 0.01, 0.04, 0.01, 0.03, 0.01, 0.02, 0.08, 0.00, 1.78e-16, 8.88e-17, 8.88e-17, nan ], [ 11, 0.01, 0.03, 0.01, 0.03, 0.01, 0.02, 0.14, 0.00, 4.04e-17, 8.07e-17, 8.07e-17, nan ], [ 12, 0.01, 0.03, 0.01, 0.03, 0.02, 0.02, 0.10, 0.00, 1.11e-16, 3.70e-17, 3.70e-17, nan ], [ 13, 0.01, 0.03, 0.01, 0.03, 0.02, 0.02, 0.12, 0.00, 6.83e-17, 6.83e-17, 6.83e-17, nan ], [ 14, 0.01, 0.03, 0.01, 0.03, 0.02, 0.02, 0.22, 0.00, 6.34e-17, 6.34e-17, 6.34e-17, nan ], [ 15, 0.02, 0.03, 0.02, 0.03, 0.02, 0.02, 0.15, 0.00, 1.18e-16, 1.18e-16, 1.18e-16, nan ], [ 16, 0.02, 0.03, 0.02, 0.03, 0.03, 0.02, 0.29, 0.00, 1.11e-16, 1.11e-16, 1.11e-16, nan ], [ 17, 0.02, 0.03, 0.02, 0.03, 0.03, 0.02, 0.29, 0.00, 1.04e-16, 1.04e-16, 1.57e-16, nan ], [ 18, 0.02, 0.03, 0.02, 0.03, 0.03, 0.02, 0.24, 0.00, 9.87e-17, 1.48e-16, 9.87e-17, nan ], [ 19, 0.02, 0.04, 0.02, 0.03, 0.03, 0.02, 0.35, 0.00, 4.67e-17, 4.67e-17, 4.67e-17, nan ], [ 20, 0.02, 0.03, 0.03, 0.03, 0.04, 0.02, 0.44, 0.00, 8.88e-17, 8.88e-17, 8.88e-17, nan ], [ 21, 0.03, 0.03, 0.03, 0.03, 0.04, 0.02, 0.30, 0.00, 8.46e-17, 1.69e-16, 8.46e-17, nan ], [ 22, 0.03, 0.03, 0.03, 0.03, 0.05, 0.02, 0.33, 0.00, 1.61e-16, 1.61e-16, 1.61e-16, nan ], [ 23, 0.03, 0.03, 0.03, 0.03, 0.05, 0.02, 0.36, 0.00, 1.54e-16, 1.54e-16, 1.54e-16, nan ], [ 24, 0.04, 0.03, 0.04, 0.03, 0.05, 0.02, 0.42, 0.00, 1.48e-16, 1.48e-16, 1.48e-16, nan ], [ 25, 0.04, 0.03, 0.04, 0.03, 0.05, 0.02, 0.42, 0.00, 7.11e-17, 7.11e-17, 7.11e-17, nan ], [ 26, 0.04, 0.04, 0.04, 0.03, 0.06, 0.02, 0.49, 0.00, 1.37e-16, 1.37e-16, 1.37e-16, nan ], [ 27, 0.04, 0.03, 0.04, 0.03, 0.07, 0.02, 0.37, 0.00, 1.32e-16, 1.32e-16, 1.32e-16, nan ], [ 28, 0.05, 0.04, 0.05, 0.03, 0.07, 0.02, 0.57, 0.00, 1.90e-16, 1.90e-16, 1.27e-16, nan ], [ 29, 0.05, 0.03, 0.04, 0.04, 0.07, 0.02, 0.56, 0.00, 1.23e-16, 1.23e-16, 1.23e-16, nan ], [ 30, 0.06, 0.03, 0.06, 0.03, 0.08, 0.02, 0.65, 0.00, 1.18e-16, 1.18e-16, 1.18e-16, nan ], [ 31, 0.06, 0.03, 0.06, 0.03, 0.09, 0.02, 0.49, 0.00, 1.15e-16, 1.15e-16, 1.15e-16, nan ], [ 32, 0.07, 0.03, 0.06, 0.03, 0.09, 0.02, 0.68, 0.00, 1.11e-16, 1.11e-16, 1.11e-16, nan ], [ 33, 0.06, 0.04, 0.05, 0.04, 0.09, 0.03, 0.78, 0.00, 1.61e-16, 1.08e-16, 1.08e-16, nan ], [ 34, 0.07, 0.04, 0.06, 0.04, 0.10, 0.02, 0.62, 0.00, 2.09e-16, 2.09e-16, 1.57e-16, nan ], [ 35, 0.08, 0.03, 0.06, 0.04, 0.10, 0.02, 0.88, 0.00, 1.02e-16, 1.52e-16, 1.02e-16, nan ], [ 36, 0.09, 0.03, 0.07, 0.04, 0.12, 0.02, 0.70, 0.00, 1.48e-16, 1.48e-16, 1.48e-16, nan ], [ 37, 0.09, 0.03, 0.07, 0.04, 0.12, 0.02, 0.98, 0.00, 1.44e-16, 9.60e-17, 1.44e-16, nan ], [ 38, 0.09, 0.03, 0.07, 0.04, 0.14, 0.02, 0.73, 0.00, 1.40e-16, 9.35e-17, 1.40e-16, nan ], [ 39, 0.10, 0.03, 0.08, 0.04, 0.11, 0.03, 0.77, 0.00, 1.37e-16, 9.11e-17, 9.11e-17, nan ], [ 40, 0.10, 0.03, 0.08, 0.04, 0.14, 0.02, 1.06, 0.00, 8.88e-17, 1.33e-16, 8.88e-17, nan ], [ 41, 0.11, 0.03, 0.09, 0.04, 0.14, 0.02, 0.85, 0.00, 1.73e-16, 1.73e-16, 1.73e-16, nan ], [ 42, 0.12, 0.03, 0.09, 0.04, 0.15, 0.02, 0.89, 0.00, 2.11e-16, 1.27e-16, 8.46e-17, nan ], [ 43, 0.12, 0.03, 0.10, 0.04, 0.16, 0.02, 0.93, 0.00, 1.65e-16, 1.65e-16, 1.65e-16, nan ], [ 44, 0.12, 0.03, 0.10, 0.04, 0.16, 0.02, 1.38, 0.00, 1.21e-16, 1.61e-16, 1.61e-16, nan ], [ 45, 0.13, 0.03, 0.11, 0.04, 0.17, 0.02, 1.02, 0.00, 1.18e-16, 1.58e-16, 1.18e-16, nan ], [ 46, 0.12, 0.04, 0.11, 0.04, 0.18, 0.02, 1.13, 0.00, 1.54e-16, 1.54e-16, 1.54e-16, nan ], [ 47, 0.14, 0.03, 0.11, 0.04, 0.17, 0.03, 0.90, 0.01, 1.51e-16, 1.51e-16, 1.51e-16, nan ], [ 48, 0.13, 0.04, 0.12, 0.04, 0.20, 0.02, 1.16, 0.00, 2.22e-16, 2.22e-16, 2.22e-16, nan ], [ 49, 0.14, 0.04, 0.12, 0.04, 0.20, 0.03, 1.21, 0.00, 1.45e-16, 2.18e-16, 1.45e-16, nan ], [ 50, 0.16, 0.03, 0.12, 0.04, 0.20, 0.03, 1.02, 0.01, 2.13e-16, 2.13e-16, 1.42e-16, nan ], [ 51, 0.16, 0.03, 0.13, 0.04, 0.20, 0.03, 1.31, 0.00, 2.09e-16, 1.39e-16, 1.39e-16, nan ], [ 52, 0.16, 0.04, 0.13, 0.04, 0.22, 0.03, 1.10, 0.01, 1.37e-16, 1.37e-16, 1.37e-16, nan ], [ 53, 0.16, 0.04, 0.14, 0.04, 0.23, 0.03, 1.14, 0.01, 1.34e-16, 2.01e-16, 1.34e-16, nan ], [ 54, 0.17, 0.03, 0.14, 0.04, 0.24, 0.03, 1.19, 0.01, 1.32e-16, 1.32e-16, 1.32e-16, nan ], [ 55, 0.19, 0.03, 0.15, 0.04, 0.25, 0.02, 0.76, 0.01, 1.29e-16, 1.94e-16, 1.29e-16, nan ], [ 56, 0.19, 0.03, 0.16, 0.04, 0.27, 0.02, 1.58, 0.00, 3.17e-16, 1.90e-16, 1.90e-16, nan ], [ 57, 0.19, 0.04, 0.16, 0.04, 0.26, 0.03, 1.32, 0.01, 1.87e-16, 1.87e-16, 1.87e-16, nan ], [ 58, 0.20, 0.03, 0.17, 0.04, 0.28, 0.02, 1.37, 0.01, 1.23e-16, 1.23e-16, 1.23e-16, nan ], [ 59, 0.20, 0.04, 0.17, 0.04, 0.28, 0.03, 1.41, 0.01, 1.81e-16, 1.81e-16, 1.20e-16, nan ], [ 60, 0.23, 0.03, 0.17, 0.04, 0.29, 0.03, 1.81, 0.00, 1.78e-16, 1.18e-16, 1.18e-16, nan ], [ 61, 0.23, 0.03, 0.18, 0.04, 0.30, 0.03, 1.51, 0.01, 2.33e-16, 1.75e-16, 1.75e-16, nan ], [ 62, 0.22, 0.04, 0.19, 0.04, 0.31, 0.03, 1.56, 0.01, 1.72e-16, 1.72e-16, 1.15e-16, nan ], [ 63, 0.23, 0.04, 0.19, 0.04, 0.32, 0.03, 1.35, 0.01, 1.13e-16, 1.13e-16, 1.13e-16, nan ], [ 64, 0.24, 0.04, 0.21, 0.04, 0.33, 0.03, 1.66, 0.01, 1.67e-16, 1.11e-16, 2.22e-16, nan ], [ 65, 0.21, 0.04, 0.19, 0.04, 0.33, 0.03, 1.71, 0.01, 2.19e-16, 1.64e-16, 1.64e-16, nan ], [ 66, 0.23, 0.04, 0.20, 0.04, 0.33, 0.03, 1.48, 0.01, 2.15e-16, 2.69e-16, 2.15e-16, nan ], [ 67, 0.23, 0.04, 0.22, 0.04, 0.32, 0.03, 1.82, 0.01, 1.59e-16, 1.59e-16, 1.59e-16, nan ], [ 68, 0.25, 0.04, 0.21, 0.04, 0.35, 0.03, 1.57, 0.01, 1.57e-16, 1.57e-16, 1.04e-16, nan ], [ 69, 0.24, 0.04, 0.22, 0.04, 0.37, 0.03, 1.56, 0.01, 1.54e-16, 1.54e-16, 1.54e-16, nan ], [ 70, 0.26, 0.04, 0.24, 0.04, 0.37, 0.03, 1.67, 0.01, 2.03e-16, 2.54e-16, 2.54e-16, nan ], [ 71, 0.27, 0.04, 0.24, 0.04, 0.39, 0.03, 1.72, 0.01, 2.50e-16, 2.00e-16, 2.00e-16, nan ], [ 72, 0.28, 0.04, 0.24, 0.04, 0.40, 0.03, 1.76, 0.01, 1.97e-16, 1.97e-16, 1.48e-16, nan ], [ 73, 0.26, 0.04, 0.25, 0.04, 0.39, 0.03, 1.81, 0.01, 1.95e-16, 1.95e-16, 1.95e-16, nan ], [ 74, 0.28, 0.04, 0.25, 0.04, 0.39, 0.03, 1.61, 0.01, 1.44e-16, 1.92e-16, 1.92e-16, nan ], [ 75, 0.28, 0.04, 0.27, 0.04, 0.40, 0.03, 1.65, 0.01, 2.37e-16, 1.89e-16, 1.89e-16, nan ], [ 76, 0.29, 0.04, 0.27, 0.04, 0.42, 0.03, 1.69, 0.01, 1.40e-16, 2.34e-16, 1.87e-16, nan ], [ 77, 0.29, 0.04, 0.28, 0.04, 0.42, 0.03, 2.02, 0.01, 2.77e-16, 1.85e-16, 1.85e-16, nan ], [ 78, 0.29, 0.04, 0.29, 0.04, 0.43, 0.03, 1.78, 0.01, 2.28e-16, 2.73e-16, 2.28e-16, nan ], [ 79, 0.30, 0.04, 0.29, 0.04, 0.43, 0.03, 1.56, 0.01, 1.80e-16, 2.25e-16, 1.80e-16, nan ], [ 80, 0.33, 0.04, 0.29, 0.04, 0.45, 0.03, 1.87, 0.01, 2.66e-16, 1.78e-16, 1.78e-16, nan ], [ 81, 0.32, 0.04, 0.30, 0.04, 0.48, 0.03, 1.92, 0.01, 2.63e-16, 2.19e-16, 1.75e-16, nan ], [ 82, 0.34, 0.04, 0.30, 0.05, 0.49, 0.03, 1.97, 0.01, 1.73e-16, 1.73e-16, 1.30e-16, nan ], [ 83, 0.35, 0.04, 0.31, 0.05, 0.50, 0.03, 1.72, 0.01, 1.71e-16, 1.71e-16, 1.71e-16, nan ], [ 84, 0.36, 0.04, 0.32, 0.04, 0.53, 0.03, 1.81, 0.01, 2.11e-16, 2.11e-16, 1.69e-16, nan ], [ 85, 0.37, 0.04, 0.33, 0.04, 0.50, 0.03, 2.36, 0.01, 1.67e-16, 1.67e-16, 2.09e-16, nan ], [ 86, 0.39, 0.04, 0.34, 0.04, 0.53, 0.03, 1.85, 0.01, 1.65e-16, 2.07e-16, 1.65e-16, nan ], [ 87, 0.39, 0.04, 0.35, 0.04, 0.55, 0.03, 2.21, 0.01, 2.45e-16, 2.45e-16, 2.45e-16, nan ], [ 88, 0.39, 0.04, 0.35, 0.04, 0.58, 0.03, 2.63, 0.01, 1.61e-16, 1.61e-16, 1.61e-16, nan ], [ 89, 0.39, 0.04, 0.36, 0.05, 0.55, 0.03, 2.04, 0.01, 2.40e-16, 1.60e-16, 1.60e-16, nan ], [ 90, 0.41, 0.04, 0.36, 0.05, 0.59, 0.03, 2.08, 0.01, 2.37e-16, 2.37e-16, 1.58e-16, nan ], [ 100, 0.50, 0.04, 0.43, 0.05, 0.68, 0.03, 2.29, 0.01, 1.78e-16, 2.13e-16, 2.13e-16, nan ], [ 110, 0.61, 0.04, 0.53, 0.05, 0.76, 0.03, 2.44, 0.01, 2.58e-16, 2.58e-16, 3.23e-16, nan ], [ 120, 0.67, 0.04, 0.62, 0.05, 0.91, 0.03, 2.65, 0.01, 2.37e-16, 2.96e-16, 2.37e-16, nan ], [ 130, 0.69, 0.05, 0.71, 0.05, 1.03, 0.03, 3.11, 0.01, 2.19e-16, 2.73e-16, 2.19e-16, nan ], [ 140, 0.84, 0.05, 0.80, 0.05, 1.16, 0.03, 3.01, 0.01, 3.05e-16, 2.54e-16, 3.05e-16, nan ], [ 150, 0.93, 0.05, 0.89, 0.05, 1.38, 0.03, 3.02, 0.02, 2.37e-16, 2.37e-16, 2.84e-16, nan ], [ 160, 1.12, 0.05, 1.08, 0.05, 1.57, 0.03, 3.23, 0.02, 2.22e-16, 1.78e-16, 1.78e-16, nan ], [ 170, 1.26, 0.05, 1.14, 0.05, 1.66, 0.04, 2.00, 0.03, 4.18e-16, 4.18e-16, 4.18e-16, nan ], [ 180, 1.31, 0.05, 1.16, 0.06, 1.76, 0.04, 2.51, 0.03, 2.37e-16, 2.76e-16, 2.37e-16, nan ], [ 190, 1.55, 0.05, 1.37, 0.05, 2.02, 0.04, 2.27, 0.03, 3.74e-16, 3.74e-16, 3.74e-16, nan ], [ 200, 1.43, 0.06, 1.49, 0.05, 2.07, 0.04, 2.11, 0.04, 5.68e-16, 6.39e-16, 5.68e-16, nan ], [ 210, 1.67, 0.05, 1.67, 0.05, 2.40, 0.04, 2.55, 0.03, 4.74e-16, 4.74e-16, 4.74e-16, nan ], [ 220, 1.87, 0.05, 1.80, 0.05, 2.57, 0.04, 2.70, 0.04, 4.52e-16, 3.88e-16, 3.88e-16, nan ], [ 230, 2.01, 0.05, 1.90, 0.06, 2.67, 0.04, 2.72, 0.04, 4.33e-16, 4.33e-16, 3.71e-16, nan ], [ 240, 2.06, 0.06, 2.06, 0.06, 2.82, 0.04, 2.74, 0.04, 3.55e-16, 2.96e-16, 3.55e-16, nan ], [ 250, 2.24, 0.06, 2.20, 0.06, 3.06, 0.04, 3.06, 0.04, 3.41e-16, 3.41e-16, 3.41e-16, nan ], [ 260, 2.30, 0.06, 2.38, 0.06, 3.16, 0.04, 3.01, 0.05, 3.83e-16, 3.28e-16, 3.28e-16, nan ], [ 270, 2.45, 0.06, 2.61, 0.06, 3.34, 0.04, 2.99, 0.05, 4.74e-16, 4.21e-16, 4.21e-16, nan ], [ 280, 2.62, 0.06, 2.67, 0.06, 3.73, 0.04, 3.14, 0.05, 4.57e-16, 4.06e-16, 3.55e-16, nan ], [ 290, 2.72, 0.06, 2.81, 0.06, 3.75, 0.05, 3.39, 0.05, 4.41e-16, 3.43e-16, 4.41e-16, nan ], [ 300, 2.96, 0.06, 3.02, 0.06, 3.61, 0.05, 3.47, 0.05, 6.63e-16, 4.74e-16, 4.74e-16, nan ], [ 310, 3.26, 0.06, 3.21, 0.06, 4.40, 0.04, 3.95, 0.05, 4.13e-16, 4.58e-16, 4.58e-16, nan ], [ 320, 3.37, 0.06, 3.42, 0.06, 4.56, 0.05, 3.37, 0.06, 4.00e-16, 4.00e-16, 3.55e-16, nan ], [ 330, 3.31, 0.07, 3.47, 0.06, 4.56, 0.05, 3.65, 0.06, 6.03e-16, 5.17e-16, 5.17e-16, nan ], [ 340, 3.41, 0.07, 3.62, 0.06, 4.81, 0.05, 3.31, 0.07, 5.02e-16, 4.60e-16, 5.02e-16, nan ], [ 350, 3.62, 0.07, 3.83, 0.06, 5.23, 0.05, 4.17, 0.06, 4.06e-16, 4.06e-16, 4.87e-16, nan ], [ 360, 3.83, 0.07, 4.01, 0.06, 5.09, 0.05, 3.83, 0.07, 6.32e-16, 4.74e-16, 5.53e-16, nan ], [ 370, 4.10, 0.07, 4.16, 0.07, 5.38, 0.05, 3.81, 0.07, 5.38e-16, 5.38e-16, 5.38e-16, nan ], [ 380, 4.32, 0.07, 4.45, 0.07, 5.78, 0.05, 3.92, 0.07, 5.98e-16, 5.98e-16, 6.73e-16, nan ], [ 390, 3.91, 0.08, 4.43, 0.07, 5.64, 0.05, 4.85, 0.06, 6.56e-16, 5.83e-16, 5.10e-16, nan ], [ 400, 2.69, 0.12, 4.79, 0.07, 6.06, 0.05, 5.18, 0.06, 8.53e-16, 7.82e-16, 7.11e-16, nan ], [ 410, 4.43, 0.08, 4.82, 0.07, 6.48, 0.05, 4.82, 0.07, 4.85e-16, 4.85e-16, 4.85e-16, nan ], [ 420, 4.77, 0.07, 4.99, 0.07, 6.53, 0.05, 5.11, 0.07, 6.77e-16, 6.77e-16, 5.41e-16, nan ], [ 430, 4.89, 0.08, 5.29, 0.07, 6.73, 0.06, 5.89, 0.06, 6.61e-16, 7.27e-16, 5.95e-16, nan ], [ 440, 5.10, 0.08, 5.39, 0.07, 7.05, 0.06, 6.36, 0.06, 5.17e-16, 5.17e-16, 5.17e-16, nan ], [ 450, 5.14, 0.08, 5.47, 0.07, 6.98, 0.06, 5.49, 0.07, 5.05e-16, 5.05e-16, 5.05e-16, nan ], [ 460, 5.17, 0.08, 5.67, 0.07, 7.06, 0.06, 5.97, 0.07, 8.65e-16, 8.03e-16, 7.41e-16, nan ], [ 470, 5.32, 0.08, 5.91, 0.07, 7.25, 0.06, 6.15, 0.07, 6.05e-16, 6.05e-16, 6.05e-16, nan ], [ 480, 5.76, 0.08, 6.15, 0.08, 7.69, 0.06, 6.80, 0.07, 6.51e-16, 6.51e-16, 6.51e-16, nan ], [ 490, 5.80, 0.08, 6.25, 0.08, 7.18, 0.07, 6.43, 0.07, 7.54e-16, 7.54e-16, 7.54e-16, nan ], [ 500, 6.11, 0.08, 6.51, 0.08, 7.84, 0.06, 6.18, 0.08, 8.53e-16, 7.96e-16, 8.53e-16, nan ], [ 510, 6.43, 0.08, 6.77, 0.08, 8.25, 0.06, 7.24, 0.07, 8.36e-16, 7.80e-16, 7.80e-16, nan ], [ 520, 6.23, 0.09, 6.87, 0.08, 8.09, 0.07, 6.87, 0.08, 7.65e-16, 6.01e-16, 5.47e-16, nan ], [ 530, 6.54, 0.09, 7.03, 0.08, 8.40, 0.07, 6.86, 0.08, 6.97e-16, 6.44e-16, 6.44e-16, nan ], [ 540, 6.71, 0.09, 7.29, 0.08, 8.48, 0.07, 7.21, 0.08, 6.84e-16, 5.79e-16, 5.26e-16, nan ], [ 550, 6.67, 0.09, 7.39, 0.08, 8.68, 0.07, 7.87, 0.08, 5.17e-16, 5.17e-16, 6.20e-16, nan ], [ 560, 7.14, 0.09, 7.75, 0.08, 8.73, 0.07, 8.16, 0.08, 5.58e-16, 5.58e-16, 6.09e-16, nan ], [ 570, 7.07, 0.09, 7.73, 0.08, 9.04, 0.07, 7.32, 0.09, 8.48e-16, 6.98e-16, 7.98e-16, nan ], [ 580, 6.88, 0.10, 7.92, 0.09, 9.36, 0.07, 7.74, 0.09, 6.86e-16, 6.86e-16, 6.37e-16, nan ], [ 590, 7.19, 0.10, 8.22, 0.08, 9.69, 0.07, 8.10, 0.09, 8.19e-16, 8.19e-16, 7.23e-16, nan ], [ 600, 7.52, 0.10, 8.38, 0.09, 9.85, 0.07, 7.84, 0.09, 7.58e-16, 7.58e-16, 7.58e-16, nan ], [ 610, 7.61, 0.10, 8.29, 0.09, 9.68, 0.08, 7.61, 0.10, 6.52e-16, 5.13e-16, 6.06e-16, nan ], [ 620, 7.55, 0.10, 8.66, 0.09, 10.12, 0.08, 7.19, 0.11, 5.96e-16, 6.42e-16, 5.96e-16, nan ], [ 630, 8.02, 0.10, 8.64, 0.09, 10.49, 0.08, 8.53, 0.09, 6.77e-16, 7.22e-16, 6.77e-16, nan ], [ 640, 8.04, 0.10, 9.01, 0.09, 10.82, 0.08, 8.29, 0.10, 5.77e-16, 6.22e-16, 5.77e-16, nan ], [ 650, 7.98, 0.11, 9.10, 0.09, 10.86, 0.08, 7.91, 0.11, 7.00e-16, 6.12e-16, 6.12e-16, nan ], [ 660, 8.17, 0.11, 9.10, 0.10, 11.16, 0.08, 8.08, 0.11, 7.32e-16, 6.46e-16, 6.46e-16, nan ], [ 670, 8.23, 0.11, 9.38, 0.10, 11.36, 0.08, 8.65, 0.10, 5.51e-16, 5.51e-16, 5.51e-16, nan ], [ 680, 8.50, 0.11, 9.64, 0.10, 11.60, 0.08, 8.75, 0.11, 5.85e-16, 5.85e-16, 6.69e-16, nan ], [ 690, 8.75, 0.11, 9.73, 0.10, 11.90, 0.08, 8.44, 0.11, 6.18e-16, 5.77e-16, 4.94e-16, nan ], [ 700, 9.01, 0.11, 9.99, 0.10, 12.25, 0.08, 8.93, 0.11, 6.50e-16, 6.90e-16, 7.31e-16, nan ], [ 710, 8.86, 0.11, 10.20, 0.10, 12.17, 0.08, 9.54, 0.11, 1.04e-15, 9.61e-16, 8.81e-16, nan ], [ 720, 9.19, 0.11, 10.49, 0.10, 12.34, 0.08, 9.11, 0.11, 9.47e-16, 9.47e-16, 9.47e-16, nan ], [ 730, 9.04, 0.12, 10.46, 0.10, 12.00, 0.09, 8.68, 0.12, 8.57e-16, 7.79e-16, 7.01e-16, nan ], [ 740, 9.39, 0.12, 10.65, 0.10, 12.47, 0.09, 8.91, 0.12, 7.68e-16, 6.91e-16, 6.91e-16, nan ], [ 750, 9.62, 0.12, 10.84, 0.10, 12.40, 0.09, 9.62, 0.12, 7.58e-16, 7.58e-16, 8.34e-16, nan ], [ 760, 9.72, 0.12, 10.93, 0.11, 12.84, 0.09, 9.03, 0.13, 6.73e-16, 5.98e-16, 5.98e-16, nan ], [ 770, 9.82, 0.12, 11.09, 0.11, 13.17, 0.09, 8.72, 0.14, 7.38e-16, 5.91e-16, 6.64e-16, nan ], [ 780, 9.75, 0.12, 11.51, 0.11, 12.97, 0.09, 8.71, 0.14, 1.02e-15, 1.02e-15, 9.47e-16, nan ], [ 790, 9.93, 0.13, 11.57, 0.11, 13.58, 0.09, 8.99, 0.14, 7.91e-16, 7.20e-16, 7.91e-16, nan ], [ 800, 10.34, 0.12, 11.97, 0.11, 14.07, 0.09, 8.96, 0.14, 8.53e-16, 8.53e-16, 7.82e-16, nan ], [ 810, 10.50, 0.13, 12.03, 0.11, 13.57, 0.10, 9.26, 0.14, 9.82e-16, 8.42e-16, 8.42e-16, nan ], [ 820, 10.86, 0.12, 12.47, 0.11, 14.19, 0.09, 8.92, 0.15, 8.32e-16, 8.32e-16, 8.32e-16, nan ], [ 830, 10.88, 0.13, 12.21, 0.11, 14.36, 0.10, 9.01, 0.15, 1.03e-15, 9.59e-16, 8.90e-16, nan ], [ 840, 10.70, 0.13, 12.40, 0.11, 14.56, 0.10, 9.60, 0.15, 7.44e-16, 8.12e-16, 8.80e-16, nan ], [ 850, 10.80, 0.13, 12.80, 0.11, 14.91, 0.10, 9.34, 0.15, 8.69e-16, 9.36e-16, 9.36e-16, nan ], [ 860, 11.23, 0.13, 12.97, 0.11, 15.26, 0.10, 9.62, 0.15, 9.91e-16, 9.25e-16, 1.06e-15, nan ], [ 870, 11.39, 0.13, 13.30, 0.11, 15.03, 0.10, 9.96, 0.15, 9.80e-16, 7.84e-16, 7.84e-16, nan ], [ 880, 11.66, 0.13, 13.49, 0.11, 15.52, 0.10, 9.52, 0.16, 8.40e-16, 9.04e-16, 9.04e-16, nan ], [ 890, 12.03, 0.13, 13.66, 0.12, 15.54, 0.10, 9.84, 0.16, 9.58e-16, 8.94e-16, 9.58e-16, nan ], [ 900, 11.43, 0.14, 13.74, 0.12, 16.04, 0.10, 9.01, 0.18, 1.01e-15, 1.01e-15, 1.01e-15, nan ], [ 1000, 12.90, 0.16, 15.90, 0.13, 17.28, 0.12, 10.06, 0.20, 1.08e-15, 9.66e-16, 1.02e-15, nan ], [ 1100, 14.17, 0.17, 17.82, 0.14, 11.99, 0.20, 9.93, 0.24, 1.09e-15, 9.30e-16, 9.82e-16, nan ], [ 1200, 16.01, 0.18, 20.02, 0.14, 12.82, 0.22, 10.19, 0.28, 9.47e-16, 9.47e-16, 9.00e-16, nan ], [ 1300, 17.07, 0.20, 21.66, 0.16, 13.49, 0.25, 9.48, 0.36, 8.31e-16, 9.62e-16, 1.01e-15, nan ], [ 1400, 18.87, 0.21, 23.91, 0.16, 15.03, 0.26, 10.06, 0.39, 1.14e-15, 1.22e-15, 1.06e-15, nan ], [ 1500, 20.11, 0.22, 25.73, 0.17, 15.91, 0.28, 9.81, 0.46, 1.29e-15, 1.06e-15, 1.21e-15, nan ], [ 1600, 21.09, 0.24, 27.13, 0.19, 16.47, 0.31, 9.72, 0.53, 1.28e-15, 1.28e-15, 1.28e-15, nan ], [ 1700, 22.15, 0.26, 29.05, 0.20, 17.06, 0.34, 10.20, 0.57, 1.20e-15, 1.27e-15, 1.27e-15, nan ], [ 1800, 23.65, 0.27, 30.56, 0.21, 18.01, 0.36, 9.87, 0.66, 1.14e-15, 1.33e-15, 1.26e-15, nan ], [ 1900, 25.81, 0.28, 33.11, 0.22, 19.47, 0.37, 9.98, 0.72, 1.56e-15, 1.56e-15, 1.62e-15, nan ], [ 2000, 26.66, 0.30, 33.91, 0.24, 20.31, 0.39, 10.01, 0.80, 1.53e-15, 1.53e-15, 1.48e-15, nan ], [ 2100, 27.85, 0.32, 35.59, 0.25, 15.35, 0.57, 10.41, 0.85, 1.57e-15, 1.57e-15, 1.52e-15, nan ], [ 2200, 29.18, 0.33, 37.27, 0.26, 16.09, 0.60, 10.38, 0.93, 1.65e-15, 1.86e-15, 1.71e-15, nan ], [ 2300, 30.77, 0.34, 38.64, 0.27, 16.70, 0.63, 10.37, 1.02, 1.58e-15, 1.43e-15, 1.43e-15, nan ], [ 2400, 32.01, 0.36, 40.28, 0.29, 17.54, 0.66, 10.52, 1.10, 1.47e-15, 1.37e-15, 1.47e-15, nan ], [ 2500, 33.26, 0.38, 41.40, 0.30, 18.28, 0.68, 10.55, 1.19, 1.64e-15, 1.59e-15, 1.59e-15, nan ], [ 2600, 33.39, 0.41, 42.94, 0.31, 18.81, 0.72, 10.74, 1.26, 1.62e-15, 1.62e-15, 1.49e-15, nan ], [ 2700, 35.48, 0.41, 44.62, 0.33, 19.66, 0.74, 10.76, 1.36, 1.39e-15, 1.35e-15, 1.52e-15, nan ], [ 2800, 36.39, 0.43, 42.17, 0.37, 20.03, 0.78, 11.81, 1.33, 1.54e-15, 1.54e-15, 1.62e-15, nan ], [ 2900, 37.56, 0.45, 47.02, 0.36, 20.98, 0.80, 10.81, 1.56, 1.72e-15, 1.72e-15, 1.65e-15, nan ], [ 3000, 38.89, 0.46, 48.13, 0.37, 21.53, 0.84, 11.14, 1.62, 1.67e-15, 1.59e-15, 1.59e-15, nan ], [ 3100, 39.55, 0.49, 49.66, 0.39, 17.43, 1.10, 10.67, 1.80, 2.05e-15, 2.05e-15, 2.13e-15, nan ], [ 3200, 40.98, 0.50, 50.96, 0.40, 18.08, 1.13, 11.10, 1.85, 1.85e-15, 1.99e-15, 1.71e-15, nan ], [ 3300, 43.06, 0.51, 52.10, 0.42, 18.56, 1.17, 11.19, 1.95, 2.00e-15, 1.86e-15, 1.86e-15, nan ], [ 3400, 43.56, 0.53, 52.69, 0.44, 19.05, 1.21, 11.67, 1.98, 1.94e-15, 2.14e-15, 2.01e-15, nan ], [ 3500, 44.48, 0.55, 54.44, 0.45, 19.59, 1.25, 10.86, 2.26, 2.01e-15, 2.08e-15, 2.21e-15, nan ], [ 3600, 45.65, 0.57, 55.03, 0.47, 20.18, 1.29, 11.16, 2.32, 2.21e-15, 2.15e-15, 2.15e-15, nan ], [ 3700, 46.26, 0.59, 57.18, 0.48, 20.68, 1.32, 11.55, 2.37, 2.09e-15, 2.09e-15, 2.03e-15, nan ], [ 3800, 47.83, 0.60, 58.59, 0.49, 21.15, 1.37, 11.90, 2.43, 2.21e-15, 1.97e-15, 2.09e-15, nan ], [ 3900, 47.83, 0.64, 58.30, 0.52, 21.66, 1.41, 11.34, 2.68, 2.16e-15, 2.16e-15, 2.10e-15, nan ], [ 4000, 47.27, 0.68, 58.96, 0.54, 22.23, 1.44, 11.73, 2.73, 2.22e-15, 2.22e-15, 2.16e-15, nan ], [ 4100, 47.16, 0.71, 61.03, 0.55, 18.17, 1.85, 11.03, 3.05, 1.94e-15, 2.05e-15, 2.05e-15, nan ], [ 4200, 47.68, 0.74, 61.36, 0.58, 18.89, 1.87, 11.27, 3.13, 1.84e-15, 2.11e-15, 2.11e-15, nan ], [ 4300, 47.78, 0.77, 63.22, 0.59, 19.49, 1.90, 11.43, 3.24, 2.54e-15, 2.59e-15, 2.54e-15, nan ], [ 4400, 48.96, 0.79, 63.70, 0.61, 19.77, 1.96, 11.45, 3.38, 2.22e-15, 2.17e-15, 2.17e-15, nan ], [ 4500, 48.41, 0.84, 63.09, 0.64, 20.29, 2.00, 11.57, 3.50, 2.37e-15, 2.27e-15, 2.27e-15, nan ], [ 4600, 50.03, 0.85, 63.93, 0.66, 20.77, 2.04, 12.17, 3.48, 2.22e-15, 2.13e-15, 2.13e-15, nan ], [ 4700, 49.54, 0.89, 64.87, 0.68, 21.11, 2.09, 11.82, 3.74, 2.90e-15, 2.47e-15, 2.47e-15, nan ], [ 4800, 50.15, 0.92, 65.49, 0.70, 21.45, 2.15, 11.96, 3.85, 2.27e-15, 2.37e-15, 2.46e-15, nan ], [ 4900, 50.04, 0.96, 65.26, 0.74, 21.90, 2.19, 11.67, 4.12, 2.27e-15, 2.23e-15, 2.32e-15, nan ], [ 5000, 50.21, 1.00, 65.18, 0.77, 22.34, 2.24, 11.81, 4.24, 2.32e-15, 2.27e-15, 2.27e-15, nan ], [ 5100, 51.47, 1.01, 65.95, 0.79, 22.68, 2.29, 12.06, 4.31, 2.14e-15, 2.14e-15, 2.10e-15, nan ], [ 5200, 51.42, 1.05, 66.38, 0.81, 19.73, 2.74, 11.80, 4.59, 2.54e-15, 2.54e-15, 2.45e-15, nan ], [ 5300, 50.59, 1.11, 66.50, 0.84, 20.08, 2.80, 11.78, 4.77, 2.15e-15, 1.93e-15, 2.19e-15, nan ], [ 5400, 51.71, 1.13, 66.88, 0.87, 20.29, 2.88, 11.55, 5.05, 2.11e-15, 1.98e-15, 1.94e-15, nan ], [ 5500, 51.90, 1.17, 66.63, 0.91, 20.77, 2.91, 11.85, 5.11, 1.98e-15, 2.23e-15, 2.03e-15, nan ], [ 5600, 53.21, 1.18, 66.80, 0.94, 21.23, 2.95, 11.92, 5.26, 2.19e-15, 2.44e-15, 2.44e-15, nan ], [ 5700, 53.62, 1.21, 67.62, 0.96, 21.44, 3.03, 11.51, 5.65, 2.55e-15, 2.39e-15, 2.47e-15, nan ], [ 5800, 52.81, 1.27, 66.61, 1.01, 21.83, 3.08, 11.57, 5.82, 2.43e-15, 2.35e-15, 2.20e-15, nan ], [ 5900, 53.60, 1.30, 66.89, 1.04, 21.42, 3.25, 11.56, 6.02, 2.54e-15, 2.31e-15, 2.31e-15, nan ], [ 6000, 53.86, 1.34, 67.43, 1.07, 22.57, 3.19, 12.20, 5.90, 2.80e-15, 2.50e-15, 2.58e-15, nan ], [ 6100, 54.13, 1.37, 67.66, 1.10, 22.77, 3.27, 11.63, 6.40, 2.53e-15, 2.16e-15, 2.16e-15, nan ], [ 6200, 55.08, 1.40, 67.27, 1.14, 20.19, 3.81, 11.64, 6.60, 2.49e-15, 2.57e-15, 2.49e-15, nan ], [ 6300, 55.33, 1.43, 67.39, 1.18, 20.63, 3.85, 11.58, 6.86, 2.53e-15, 2.45e-15, 2.67e-15, nan ], [ 6400, 55.14, 1.49, 67.21, 1.22, 20.59, 3.98, 11.68, 7.01, 2.98e-15, 2.70e-15, 2.49e-15, nan ], [ 6500, 56.27, 1.50, 67.28, 1.26, 21.03, 4.02, 11.59, 7.29, 2.59e-15, 2.59e-15, 2.52e-15, nan ], [ 6600, 56.51, 1.54, 68.35, 1.27, 21.40, 4.07, 11.78, 7.40, 2.82e-15, 3.03e-15, 3.17e-15, nan ], [ 6700, 56.93, 1.58, 68.39, 1.31, 21.55, 4.17, 11.48, 7.82, 3.67e-15, 3.46e-15, 3.60e-15, nan ], [ 6800, 56.85, 1.63, 68.36, 1.35, 21.91, 4.22, 11.71, 7.90, 3.21e-15, 3.21e-15, 3.34e-15, nan ], [ 6900, 57.23, 1.66, 68.61, 1.39, 22.17, 4.30, 11.62, 8.20, 3.23e-15, 2.83e-15, 3.03e-15, nan ], [ 7000, 58.03, 1.69, 68.59, 1.43, 22.56, 4.34, 11.81, 8.30, 2.99e-15, 2.79e-15, 2.73e-15, nan ], [ 7100, 57.98, 1.74, 68.87, 1.46, 22.63, 4.46, 11.57, 8.71, 2.82e-15, 3.07e-15, 2.82e-15, nan ], [ 7200, 58.68, 1.77, 68.68, 1.51, 20.52, 5.05, 11.49, 9.02, 3.16e-15, 2.91e-15, 2.97e-15, nan ], [ 7300, 58.92, 1.81, 69.04, 1.54, 20.59, 5.18, 11.55, 9.23, 3.05e-15, 2.87e-15, 2.68e-15, nan ], [ 7400, 59.08, 1.85, 69.41, 1.58, 21.08, 5.20, 11.69, 9.37, 3.13e-15, 3.13e-15, 3.01e-15, nan ], [ 7500, 59.16, 1.90, 68.77, 1.64, 21.31, 5.28, 11.61, 9.69, 2.97e-15, 3.03e-15, 3.27e-15, nan ], [ 7600, 60.42, 1.91, 69.81, 1.66, 21.58, 5.35, 11.72, 9.86, 3.23e-15, 3.35e-15, 3.29e-15, nan ], [ 7700, 60.08, 1.97, 69.68, 1.70, 21.82, 5.44, 11.45, 10.35, 2.78e-15, 2.60e-15, 2.66e-15, nan ], [ 7800, 60.07, 2.03, 69.58, 1.75, 22.09, 5.51, 11.65, 10.45, 2.62e-15, 2.80e-15, 3.09e-15, nan ], [ 7900, 59.19, 2.11, 69.74, 1.79, 21.89, 5.70, 11.58, 10.78, 2.88e-15, 3.28e-15, 3.22e-15, nan ], [ 8000, 59.26, 2.16, 69.09, 1.85, 22.44, 5.70, 11.55, 11.09, 2.90e-15, 3.01e-15, 3.30e-15, nan ], [ 8100, 60.01, 2.19, 70.52, 1.86, 22.68, 5.79, 11.43, 11.48, 3.26e-15, 2.92e-15, 2.92e-15, nan ], [ 8200, 59.56, 2.26, 71.13, 1.89, 20.60, 6.53, 11.45, 11.74, 3.33e-15, 3.11e-15, 3.33e-15, nan ], [ 8300, 60.30, 2.29, 70.92, 1.94, 21.03, 6.55, 11.49, 11.99, 3.51e-15, 3.51e-15, 3.34e-15, nan ], [ 8400, 59.26, 2.38, 70.74, 2.00, 21.17, 6.67, 11.67, 12.09, 2.92e-15, 3.03e-15, 2.87e-15, nan ], [ 8500, 60.85, 2.38, 72.08, 2.00, 21.31, 6.78, 11.53, 12.54, 3.69e-15, 3.42e-15, 3.37e-15, nan ], [ 8600, 60.36, 2.45, 72.34, 2.04, 21.70, 6.82, 11.63, 12.72, 2.86e-15, 3.23e-15, 3.07e-15, nan ], [ 8700, 60.10, 2.52, 73.17, 2.07, 21.82, 6.94, 11.75, 12.89, 3.55e-15, 3.76e-15, 3.66e-15, nan ], [ 8800, 59.12, 2.62, 71.88, 2.16, 21.35, 7.26, 11.65, 13.30, 3.36e-15, 3.36e-15, 3.57e-15, nan ], [ 8900, 60.15, 2.63, 73.73, 2.15, 22.31, 7.10, 11.68, 13.57, 3.37e-15, 3.58e-15, 3.27e-15, nan ], [ 9000, 59.98, 2.70, 71.82, 2.26, 22.37, 7.24, 11.75, 13.79, 4.19e-15, 4.60e-15, 4.50e-15, nan ], [ 10000, 61.97, 3.23, 72.50, 2.76, 22.36, 8.94, 11.82, 16.92, 3.41e-15, 3.59e-15, 3.46e-15, nan ], [ 12000, 63.02, 4.57, 72.94, 3.95, 22.08, 13.04, 12.07, 23.86, 3.87e-15, 3.79e-15, 4.24e-15, nan ], [ 14000, 66.04, 5.94, 74.04, 5.30, 21.91, 17.90, 12.00, 32.66, 4.09e-15, 3.90e-15, 3.90e-15, nan ], [ 16000, 66.91, 7.65, 73.62, 6.96, 22.53, 22.72, 11.50, 44.52, 4.72e-15, 4.89e-15, 4.77e-15, nan ], [ 18000, 66.61, 9.73, 74.82, 8.66, 21.98, 29.49, 11.98, 54.08, 5.41e-15, 5.10e-15, 5.15e-15, nan ], [ 20000, 68.25, 11.72, 74.67, 10.71, 21.32, 37.53, 12.31, 64.99, 5.32e-15, 5.73e-15, 5.87e-15, nan ], ]) # numactl --interleave=all ../testing/testing_dsymv -U -N 123 -N 1234 --range 10:90:1 --range 100:900:10 --range 1000:9000:100 --range 10000:20000:2000 dsymv_U = array([ [ 10, 0.01, 0.03, 0.01, 0.03, 0.01, 0.02, 0.12, 0.00, 8.88e-17, 4.44e-17, 8.88e-17, nan ], [ 11, 0.01, 0.03, 0.01, 0.03, 0.01, 0.02, 0.14, 0.00, 4.04e-17, 8.07e-17, 8.07e-17, nan ], [ 12, 0.01, 0.03, 0.01, 0.03, 0.02, 0.02, 0.16, 0.00, 7.40e-17, 3.70e-17, 3.70e-17, nan ], [ 13, 0.01, 0.03, 0.01, 0.03, 0.02, 0.02, 0.17, 0.00, 6.83e-17, 6.83e-17, 6.83e-17, nan ], [ 14, 0.01, 0.03, 0.02, 0.03, 0.02, 0.02, 0.20, 0.00, 6.34e-17, 6.34e-17, 6.34e-17, nan ], [ 15, 0.02, 0.03, 0.02, 0.03, 0.02, 0.02, 0.15, 0.00, 5.92e-17, 5.92e-17, 1.18e-16, nan ], [ 16, 0.02, 0.03, 0.02, 0.03, 0.03, 0.02, 0.29, 0.00, 1.11e-16, 1.11e-16, 5.55e-17, nan ], [ 17, 0.02, 0.03, 0.02, 0.03, 0.03, 0.02, 0.32, 0.00, 1.57e-16, 2.09e-16, 1.04e-16, nan ], [ 18, 0.02, 0.03, 0.02, 0.03, 0.04, 0.02, 0.32, 0.00, 1.48e-16, 9.87e-17, 9.87e-17, nan ], [ 19, 0.02, 0.03, 0.03, 0.03, 0.04, 0.02, 0.40, 0.00, 9.35e-17, 9.35e-17, 9.35e-17, nan ], [ 20, 0.03, 0.03, 0.03, 0.03, 0.04, 0.02, 0.29, 0.00, 8.88e-17, 8.88e-17, 8.88e-17, nan ], [ 21, 0.03, 0.03, 0.03, 0.03, 0.05, 0.02, 0.48, 0.00, 1.69e-16, 8.46e-17, 8.46e-17, nan ], [ 22, 0.03, 0.03, 0.03, 0.03, 0.05, 0.02, 0.33, 0.00, 1.61e-16, 1.61e-16, 1.61e-16, nan ], [ 23, 0.04, 0.03, 0.04, 0.03, 0.06, 0.02, 0.51, 0.00, 1.54e-16, 7.72e-17, 7.72e-17, nan ], [ 24, 0.04, 0.03, 0.04, 0.03, 0.06, 0.02, 0.56, 0.00, 1.48e-16, 2.22e-16, 1.48e-16, nan ], [ 25, 0.04, 0.03, 0.04, 0.03, 0.06, 0.02, 0.68, 0.00, 1.42e-16, 1.42e-16, 1.42e-16, nan ], [ 26, 0.04, 0.03, 0.05, 0.03, 0.07, 0.02, 0.45, 0.00, 2.05e-16, 1.37e-16, 2.05e-16, nan ], [ 27, 0.05, 0.03, 0.05, 0.03, 0.08, 0.02, 0.49, 0.00, 1.32e-16, 1.32e-16, 1.97e-16, nan ], [ 28, 0.05, 0.03, 0.05, 0.03, 0.08, 0.02, 0.52, 0.00, 1.27e-16, 1.90e-16, 1.27e-16, nan ], [ 29, 0.06, 0.03, 0.06, 0.03, 0.08, 0.02, 0.91, 0.00, 1.23e-16, 1.84e-16, 1.23e-16, nan ], [ 30, 0.06, 0.03, 0.06, 0.03, 0.09, 0.02, 0.65, 0.00, 1.78e-16, 1.18e-16, 1.78e-16, nan ], [ 31, 0.06, 0.03, 0.06, 0.03, 0.09, 0.02, 0.64, 0.00, 1.15e-16, 2.29e-16, 1.72e-16, nan ], [ 32, 0.07, 0.03, 0.07, 0.03, 0.11, 0.02, 0.74, 0.00, 1.67e-16, 1.67e-16, 1.67e-16, nan ], [ 33, 0.07, 0.03, 0.06, 0.04, 0.11, 0.02, 0.72, 0.00, 1.61e-16, 1.08e-16, 1.08e-16, nan ], [ 34, 0.07, 0.03, 0.06, 0.04, 0.11, 0.02, 0.77, 0.00, 2.09e-16, 2.61e-16, 1.57e-16, nan ], [ 35, 0.08, 0.03, 0.06, 0.04, 0.12, 0.02, 0.81, 0.00, 1.52e-16, 1.52e-16, 1.02e-16, nan ], [ 36, 0.09, 0.03, 0.07, 0.04, 0.13, 0.02, 0.86, 0.00, 1.48e-16, 1.97e-16, 9.87e-17, nan ], [ 37, 0.10, 0.03, 0.08, 0.04, 0.13, 0.02, 0.91, 0.00, 1.92e-16, 1.44e-16, 1.92e-16, nan ], [ 38, 0.10, 0.03, 0.08, 0.04, 0.15, 0.02, 1.04, 0.00, 1.87e-16, 1.40e-16, 1.40e-16, nan ], [ 39, 0.11, 0.03, 0.08, 0.04, 0.15, 0.02, 1.01, 0.00, 9.11e-17, 9.11e-17, 1.37e-16, nan ], [ 40, 0.12, 0.03, 0.09, 0.04, 0.16, 0.02, 1.15, 0.00, 1.33e-16, 1.78e-16, 1.78e-16, nan ], [ 41, 0.12, 0.03, 0.09, 0.04, 0.16, 0.02, 1.20, 0.00, 2.60e-16, 1.73e-16, 1.73e-16, nan ], [ 42, 0.13, 0.03, 0.10, 0.04, 0.17, 0.02, 0.89, 0.00, 1.69e-16, 1.27e-16, 1.27e-16, nan ], [ 43, 0.13, 0.03, 0.10, 0.04, 0.18, 0.02, 0.93, 0.00, 1.65e-16, 2.48e-16, 1.65e-16, nan ], [ 44, 0.14, 0.03, 0.11, 0.04, 0.20, 0.02, 1.28, 0.00, 1.61e-16, 1.61e-16, 2.42e-16, nan ], [ 45, 0.14, 0.03, 0.11, 0.04, 0.20, 0.02, 1.34, 0.00, 1.58e-16, 1.58e-16, 1.18e-16, nan ], [ 46, 0.15, 0.03, 0.11, 0.04, 0.21, 0.02, 1.40, 0.00, 1.54e-16, 1.54e-16, 1.54e-16, nan ], [ 47, 0.16, 0.03, 0.12, 0.04, 0.23, 0.02, 1.11, 0.00, 1.51e-16, 1.51e-16, 1.51e-16, nan ], [ 48, 0.17, 0.03, 0.13, 0.04, 0.22, 0.02, 1.16, 0.00, 1.48e-16, 1.48e-16, 1.48e-16, nan ], [ 49, 0.17, 0.03, 0.13, 0.04, 0.23, 0.02, 1.58, 0.00, 2.18e-16, 2.90e-16, 2.18e-16, nan ], [ 50, 0.17, 0.03, 0.13, 0.04, 0.22, 0.02, 1.34, 0.00, 2.13e-16, 2.13e-16, 2.13e-16, nan ], [ 51, 0.18, 0.03, 0.14, 0.04, 0.24, 0.02, 1.31, 0.00, 2.09e-16, 2.09e-16, 2.09e-16, nan ], [ 52, 0.17, 0.03, 0.14, 0.04, 0.25, 0.02, 1.36, 0.00, 2.73e-16, 2.05e-16, 2.05e-16, nan ], [ 53, 0.18, 0.03, 0.15, 0.04, 0.26, 0.02, 1.50, 0.00, 2.01e-16, 2.68e-16, 2.01e-16, nan ], [ 54, 0.19, 0.03, 0.15, 0.04, 0.27, 0.02, 1.56, 0.00, 1.97e-16, 2.63e-16, 1.97e-16, nan ], [ 55, 0.20, 0.03, 0.16, 0.04, 0.28, 0.02, 1.61, 0.00, 1.94e-16, 1.94e-16, 1.29e-16, nan ], [ 56, 0.22, 0.03, 0.17, 0.04, 0.29, 0.02, 1.58, 0.00, 2.54e-16, 2.54e-16, 2.54e-16, nan ], [ 57, 0.23, 0.03, 0.17, 0.04, 0.29, 0.02, 1.63, 0.00, 1.87e-16, 1.87e-16, 1.87e-16, nan ], [ 58, 0.24, 0.03, 0.18, 0.04, 0.31, 0.02, 1.69, 0.00, 2.45e-16, 1.84e-16, 1.84e-16, nan ], [ 59, 0.25, 0.03, 0.19, 0.04, 0.31, 0.02, 1.41, 0.01, 2.41e-16, 2.41e-16, 2.41e-16, nan ], [ 60, 0.25, 0.03, 0.19, 0.04, 0.32, 0.02, 1.81, 0.00, 2.96e-16, 2.96e-16, 2.96e-16, nan ], [ 61, 0.25, 0.03, 0.19, 0.04, 0.33, 0.02, 1.98, 0.00, 1.75e-16, 1.75e-16, 1.75e-16, nan ], [ 62, 0.27, 0.03, 0.20, 0.04, 0.34, 0.02, 1.93, 0.00, 2.29e-16, 1.72e-16, 1.72e-16, nan ], [ 63, 0.28, 0.03, 0.20, 0.04, 0.35, 0.02, 1.61, 0.01, 2.26e-16, 2.26e-16, 2.26e-16, nan ], [ 64, 0.29, 0.03, 0.23, 0.04, 0.36, 0.02, 1.66, 0.01, 2.78e-16, 2.22e-16, 2.22e-16, nan ], [ 65, 0.23, 0.04, 0.21, 0.04, 0.36, 0.02, 1.71, 0.01, 2.73e-16, 2.19e-16, 3.28e-16, nan ], [ 66, 0.25, 0.04, 0.21, 0.04, 0.37, 0.02, 1.77, 0.01, 2.15e-16, 1.61e-16, 2.15e-16, nan ], [ 67, 0.25, 0.04, 0.22, 0.04, 0.38, 0.02, 1.82, 0.01, 1.59e-16, 1.59e-16, 1.59e-16, nan ], [ 68, 0.26, 0.04, 0.23, 0.04, 0.36, 0.03, 1.87, 0.01, 2.09e-16, 2.09e-16, 1.57e-16, nan ], [ 69, 0.26, 0.04, 0.23, 0.04, 0.39, 0.02, 1.93, 0.01, 2.57e-16, 2.57e-16, 2.06e-16, nan ], [ 70, 0.26, 0.04, 0.23, 0.04, 0.40, 0.03, 1.99, 0.01, 3.55e-16, 2.54e-16, 2.54e-16, nan ], [ 71, 0.27, 0.04, 0.24, 0.04, 0.42, 0.02, 2.04, 0.01, 4.00e-16, 2.00e-16, 3.00e-16, nan ], [ 72, 0.29, 0.04, 0.26, 0.04, 0.42, 0.03, 2.10, 0.01, 1.97e-16, 1.97e-16, 1.97e-16, nan ], [ 73, 0.32, 0.03, 0.27, 0.04, 0.43, 0.03, 2.16, 0.01, 2.43e-16, 1.95e-16, 2.43e-16, nan ], [ 74, 0.32, 0.03, 0.28, 0.04, 0.47, 0.02, 1.86, 0.01, 2.88e-16, 2.40e-16, 1.92e-16, nan ], [ 75, 0.33, 0.04, 0.29, 0.04, 0.46, 0.03, 1.91, 0.01, 2.37e-16, 1.89e-16, 1.89e-16, nan ], [ 76, 0.34, 0.03, 0.30, 0.04, 0.49, 0.02, 2.34, 0.01, 1.87e-16, 2.34e-16, 2.34e-16, nan ], [ 77, 0.34, 0.04, 0.30, 0.04, 0.52, 0.02, 2.40, 0.01, 2.77e-16, 2.77e-16, 1.85e-16, nan ], [ 78, 0.34, 0.04, 0.30, 0.04, 0.49, 0.03, 2.07, 0.01, 2.28e-16, 2.28e-16, 2.28e-16, nan ], [ 79, 0.35, 0.04, 0.32, 0.04, 0.52, 0.02, 2.12, 0.01, 3.15e-16, 2.70e-16, 2.70e-16, nan ], [ 80, 0.36, 0.04, 0.32, 0.04, 0.52, 0.03, 2.59, 0.01, 3.55e-16, 3.11e-16, 2.66e-16, nan ], [ 81, 0.37, 0.04, 0.32, 0.04, 0.51, 0.03, 2.23, 0.01, 2.19e-16, 2.19e-16, 2.19e-16, nan ], [ 82, 0.37, 0.04, 0.34, 0.04, 0.55, 0.02, 2.28, 0.01, 2.17e-16, 1.73e-16, 2.17e-16, nan ], [ 83, 0.36, 0.04, 0.34, 0.04, 0.54, 0.03, 2.02, 0.01, 3.00e-16, 2.57e-16, 2.57e-16, nan ], [ 84, 0.38, 0.04, 0.35, 0.04, 0.55, 0.03, 2.40, 0.01, 3.38e-16, 2.54e-16, 2.54e-16, nan ], [ 85, 0.37, 0.04, 0.35, 0.04, 0.56, 0.03, 2.36, 0.01, 2.51e-16, 2.51e-16, 2.51e-16, nan ], [ 86, 0.42, 0.04, 0.36, 0.04, 0.58, 0.03, 2.51, 0.01, 2.48e-16, 2.48e-16, 2.48e-16, nan ], [ 87, 0.39, 0.04, 0.36, 0.04, 0.57, 0.03, 3.06, 0.01, 3.27e-16, 2.45e-16, 2.45e-16, nan ], [ 88, 0.40, 0.04, 0.38, 0.04, 0.60, 0.03, 2.53, 0.01, 3.23e-16, 2.42e-16, 2.42e-16, nan ], [ 89, 0.43, 0.04, 0.39, 0.04, 0.62, 0.03, 2.24, 0.01, 2.40e-16, 2.40e-16, 2.40e-16, nan ], [ 90, 0.44, 0.04, 0.40, 0.04, 0.63, 0.03, 2.75, 0.01, 2.37e-16, 2.37e-16, 2.37e-16, nan ], [ 100, 0.55, 0.04, 0.48, 0.04, 0.72, 0.03, 3.39, 0.01, 2.13e-16, 2.13e-16, 2.13e-16, nan ], [ 110, 0.66, 0.04, 0.56, 0.04, 0.87, 0.03, 3.01, 0.01, 2.58e-16, 2.58e-16, 3.23e-16, nan ], [ 120, 0.79, 0.04, 0.68, 0.04, 1.00, 0.03, 3.21, 0.01, 3.55e-16, 2.96e-16, 3.55e-16, nan ], [ 130, 0.79, 0.04, 0.77, 0.04, 1.17, 0.03, 4.20, 0.01, 3.83e-16, 3.83e-16, 3.28e-16, nan ], [ 140, 0.92, 0.04, 0.84, 0.05, 1.36, 0.03, 3.94, 0.01, 4.06e-16, 4.57e-16, 4.57e-16, nan ], [ 150, 0.98, 0.05, 0.95, 0.05, 1.46, 0.03, 3.80, 0.01, 3.32e-16, 2.84e-16, 3.32e-16, nan ], [ 160, 1.17, 0.04, 1.12, 0.05, 1.72, 0.03, 3.93, 0.01, 5.33e-16, 4.00e-16, 4.00e-16, nan ], [ 170, 1.32, 0.04, 1.14, 0.05, 1.82, 0.03, 2.16, 0.03, 3.34e-16, 3.34e-16, 4.18e-16, nan ], [ 180, 1.45, 0.05, 1.36, 0.05, 1.98, 0.03, 2.51, 0.03, 3.95e-16, 3.16e-16, 2.76e-16, nan ], [ 190, 1.61, 0.05, 1.37, 0.05, 2.21, 0.03, 2.13, 0.03, 2.99e-16, 3.74e-16, 2.99e-16, nan ], [ 200, 1.58, 0.05, 1.49, 0.05, 2.31, 0.03, 2.76, 0.03, 4.26e-16, 4.26e-16, 3.55e-16, nan ], [ 210, 1.78, 0.05, 1.67, 0.05, 2.53, 0.04, 2.95, 0.03, 4.06e-16, 3.38e-16, 4.06e-16, nan ], [ 220, 1.94, 0.05, 1.98, 0.05, 2.79, 0.03, 2.63, 0.04, 5.17e-16, 4.52e-16, 4.52e-16, nan ], [ 230, 2.12, 0.05, 1.80, 0.06, 2.95, 0.04, 2.86, 0.04, 4.94e-16, 6.18e-16, 6.18e-16, nan ], [ 240, 2.19, 0.05, 2.19, 0.05, 3.13, 0.04, 2.89, 0.04, 4.74e-16, 5.33e-16, 4.74e-16, nan ], [ 250, 2.36, 0.05, 2.20, 0.06, 3.37, 0.04, 2.41, 0.05, 4.55e-16, 4.55e-16, 4.55e-16, nan ], [ 260, 2.34, 0.06, 2.19, 0.06, 3.41, 0.04, 3.16, 0.04, 4.37e-16, 4.92e-16, 4.37e-16, nan ], [ 270, 2.47, 0.06, 2.47, 0.06, 3.65, 0.04, 2.87, 0.05, 4.74e-16, 4.74e-16, 5.26e-16, nan ], [ 280, 2.76, 0.06, 2.76, 0.06, 3.93, 0.04, 3.49, 0.05, 5.08e-16, 5.08e-16, 5.08e-16, nan ], [ 290, 3.01, 0.06, 2.90, 0.06, 4.12, 0.04, 3.37, 0.05, 5.88e-16, 5.88e-16, 5.39e-16, nan ], [ 300, 2.96, 0.06, 2.96, 0.06, 4.19, 0.04, 3.68, 0.05, 6.16e-16, 6.63e-16, 6.63e-16, nan ], [ 310, 3.22, 0.06, 3.06, 0.06, 4.57, 0.04, 4.93, 0.04, 4.58e-16, 4.58e-16, 4.58e-16, nan ], [ 320, 3.53, 0.06, 3.61, 0.06, 4.90, 0.04, 4.87, 0.04, 4.88e-16, 4.88e-16, 4.44e-16, nan ], [ 330, 3.47, 0.06, 3.42, 0.06, 4.98, 0.04, 4.47, 0.05, 4.31e-16, 4.31e-16, 5.17e-16, nan ], [ 340, 3.68, 0.06, 3.80, 0.06, 5.17, 0.04, 4.63, 0.05, 5.02e-16, 5.02e-16, 5.02e-16, nan ], [ 350, 3.72, 0.07, 3.62, 0.07, 5.45, 0.05, 5.34, 0.05, 6.50e-16, 5.68e-16, 4.87e-16, nan ], [ 360, 3.88, 0.07, 3.83, 0.07, 5.53, 0.05, 5.40, 0.05, 6.32e-16, 4.74e-16, 4.74e-16, nan ], [ 370, 4.10, 0.07, 4.10, 0.07, 5.82, 0.05, 4.90, 0.06, 5.38e-16, 5.38e-16, 6.15e-16, nan ], [ 380, 4.53, 0.06, 4.67, 0.06, 6.16, 0.05, 5.37, 0.05, 5.98e-16, 5.24e-16, 5.24e-16, nan ], [ 390, 4.24, 0.07, 4.06, 0.08, 6.21, 0.05, 5.87, 0.05, 5.10e-16, 5.10e-16, 5.10e-16, nan ], [ 400, 3.15, 0.10, 4.52, 0.07, 6.41, 0.05, 6.06, 0.05, 5.68e-16, 5.68e-16, 4.97e-16, nan ], [ 410, 4.68, 0.07, 4.82, 0.07, 6.61, 0.05, 5.82, 0.06, 6.93e-16, 7.63e-16, 6.93e-16, nan ], [ 420, 4.98, 0.07, 5.13, 0.07, 6.80, 0.05, 5.98, 0.06, 5.41e-16, 5.41e-16, 5.41e-16, nan ], [ 430, 5.00, 0.07, 5.15, 0.07, 6.62, 0.06, 6.50, 0.06, 7.93e-16, 7.93e-16, 8.59e-16, nan ], [ 440, 5.32, 0.07, 5.39, 0.07, 7.30, 0.05, 6.59, 0.06, 5.81e-16, 5.81e-16, 6.46e-16, nan ], [ 450, 5.21, 0.08, 5.49, 0.07, 7.67, 0.05, 6.26, 0.06, 6.32e-16, 6.32e-16, 6.32e-16, nan ], [ 460, 5.23, 0.08, 5.89, 0.07, 7.57, 0.06, 6.24, 0.07, 6.80e-16, 6.80e-16, 6.80e-16, nan ], [ 470, 5.46, 0.08, 5.82, 0.08, 8.04, 0.06, 6.70, 0.07, 6.05e-16, 6.05e-16, 5.44e-16, nan ], [ 480, 5.92, 0.08, 6.61, 0.07, 8.42, 0.05, 6.80, 0.07, 8.29e-16, 7.70e-16, 7.70e-16, nan ], [ 490, 6.02, 0.08, 6.17, 0.08, 8.31, 0.06, 6.51, 0.07, 9.28e-16, 8.70e-16, 9.86e-16, nan ], [ 500, 6.13, 0.08, 6.18, 0.08, 8.65, 0.06, 6.33, 0.08, 9.09e-16, 8.53e-16, 7.96e-16, nan ], [ 510, 6.60, 0.08, 6.06, 0.09, 9.00, 0.06, 7.05, 0.07, 6.69e-16, 7.24e-16, 6.69e-16, nan ], [ 520, 6.38, 0.08, 6.30, 0.09, 8.88, 0.06, 6.68, 0.08, 6.56e-16, 7.11e-16, 6.01e-16, nan ], [ 530, 6.40, 0.09, 6.40, 0.09, 9.08, 0.06, 6.86, 0.08, 9.12e-16, 8.58e-16, 9.12e-16, nan ], [ 540, 6.71, 0.09, 6.94, 0.08, 9.43, 0.06, 7.21, 0.08, 7.37e-16, 7.37e-16, 8.42e-16, nan ], [ 550, 6.74, 0.09, 6.25, 0.10, 9.45, 0.06, 7.68, 0.08, 7.23e-16, 7.75e-16, 8.27e-16, nan ], [ 560, 6.85, 0.09, 7.30, 0.09, 9.65, 0.07, 7.96, 0.08, 6.60e-16, 7.61e-16, 7.11e-16, nan ], [ 570, 7.15, 0.09, 7.09, 0.09, 10.00, 0.07, 7.48, 0.09, 7.48e-16, 7.48e-16, 6.98e-16, nan ], [ 580, 6.95, 0.10, 7.58, 0.09, 10.39, 0.06, 7.83, 0.09, 7.35e-16, 7.84e-16, 7.35e-16, nan ], [ 590, 7.12, 0.10, 7.93, 0.09, 10.41, 0.07, 8.01, 0.09, 6.74e-16, 6.26e-16, 6.74e-16, nan ], [ 600, 7.34, 0.10, 7.94, 0.09, 10.61, 0.07, 8.09, 0.09, 9.00e-16, 7.58e-16, 7.58e-16, nan ], [ 610, 7.59, 0.10, 8.02, 0.09, 10.67, 0.07, 7.61, 0.10, 7.45e-16, 7.92e-16, 7.45e-16, nan ], [ 620, 7.78, 0.10, 7.86, 0.10, 10.99, 0.07, 8.01, 0.10, 9.17e-16, 9.17e-16, 8.71e-16, nan ], [ 630, 7.96, 0.10, 7.72, 0.10, 11.04, 0.07, 8.75, 0.09, 6.77e-16, 7.22e-16, 6.77e-16, nan ], [ 640, 8.21, 0.10, 8.73, 0.09, 11.40, 0.07, 7.97, 0.10, 7.99e-16, 7.11e-16, 7.55e-16, nan ], [ 650, 7.91, 0.11, 8.64, 0.10, 11.60, 0.07, 7.23, 0.12, 7.00e-16, 7.87e-16, 6.12e-16, nan ], [ 660, 8.15, 0.11, 8.63, 0.10, 11.81, 0.07, 7.92, 0.11, 7.32e-16, 7.32e-16, 6.46e-16, nan ], [ 670, 8.09, 0.11, 8.81, 0.10, 12.17, 0.07, 8.47, 0.11, 8.48e-16, 8.91e-16, 8.48e-16, nan ], [ 680, 8.58, 0.11, 9.27, 0.10, 12.49, 0.07, 8.35, 0.11, 7.52e-16, 7.11e-16, 7.52e-16, nan ], [ 690, 8.83, 0.11, 8.91, 0.11, 12.23, 0.08, 8.15, 0.12, 8.24e-16, 7.41e-16, 7.41e-16, nan ], [ 700, 9.09, 0.11, 9.62, 0.10, 12.59, 0.08, 8.17, 0.12, 8.12e-16, 7.31e-16, 7.31e-16, nan ], [ 710, 8.62, 0.12, 8.40, 0.12, 12.79, 0.08, 9.03, 0.11, 9.61e-16, 9.61e-16, 1.04e-15, nan ], [ 720, 9.03, 0.11, 10.08, 0.10, 13.32, 0.08, 9.27, 0.11, 8.68e-16, 7.89e-16, 8.68e-16, nan ], [ 730, 9.19, 0.12, 10.17, 0.10, 13.05, 0.08, 8.40, 0.13, 7.79e-16, 7.01e-16, 8.57e-16, nan ], [ 740, 9.46, 0.12, 10.36, 0.11, 12.92, 0.08, 8.76, 0.13, 8.45e-16, 9.22e-16, 9.99e-16, nan ], [ 750, 9.47, 0.12, 10.07, 0.11, 13.42, 0.08, 9.09, 0.12, 9.09e-16, 8.34e-16, 8.34e-16, nan ], [ 760, 9.96, 0.12, 10.13, 0.11, 13.33, 0.09, 9.33, 0.12, 8.98e-16, 8.23e-16, 8.98e-16, nan ], [ 770, 9.21, 0.13, 10.31, 0.12, 13.64, 0.09, 8.08, 0.15, 8.12e-16, 8.86e-16, 8.12e-16, nan ], [ 780, 9.83, 0.12, 10.87, 0.11, 13.66, 0.09, 8.40, 0.14, 9.47e-16, 1.02e-15, 1.02e-15, nan ], [ 790, 10.08, 0.12, 11.67, 0.11, 14.36, 0.09, 8.75, 0.14, 8.63e-16, 9.35e-16, 9.35e-16, nan ], [ 800, 10.42, 0.12, 11.34, 0.11, 14.73, 0.09, 8.90, 0.14, 1.28e-15, 1.28e-15, 1.14e-15, nan ], [ 810, 10.60, 0.12, 11.63, 0.11, 14.77, 0.09, 8.87, 0.15, 1.05e-15, 1.12e-15, 1.12e-15, nan ], [ 820, 10.94, 0.12, 11.62, 0.12, 14.94, 0.09, 8.87, 0.15, 1.11e-15, 1.04e-15, 1.11e-15, nan ], [ 830, 11.13, 0.12, 11.81, 0.12, 15.15, 0.09, 9.14, 0.15, 9.59e-16, 8.90e-16, 9.59e-16, nan ], [ 840, 10.87, 0.13, 12.50, 0.11, 15.35, 0.09, 9.36, 0.15, 8.80e-16, 8.80e-16, 8.80e-16, nan ], [ 850, 10.97, 0.13, 12.06, 0.12, 15.25, 0.09, 9.21, 0.16, 9.36e-16, 9.36e-16, 8.69e-16, nan ], [ 860, 11.31, 0.13, 12.99, 0.11, 15.26, 0.10, 9.44, 0.16, 1.26e-15, 1.26e-15, 1.19e-15, nan ], [ 870, 11.47, 0.13, 10.68, 0.14, 15.81, 0.10, 9.65, 0.16, 1.18e-15, 1.31e-15, 1.05e-15, nan ], [ 880, 11.57, 0.13, 13.03, 0.12, 16.14, 0.10, 9.52, 0.16, 8.40e-16, 9.04e-16, 9.04e-16, nan ], [ 890, 11.92, 0.13, 12.39, 0.13, 16.34, 0.10, 9.49, 0.17, 9.58e-16, 1.02e-15, 1.21e-15, nan ], [ 900, 11.75, 0.14, 13.85, 0.12, 16.55, 0.10, 9.01, 0.18, 1.07e-15, 1.01e-15, 1.01e-15, nan ], [ 1000, 13.35, 0.15, 14.60, 0.14, 18.02, 0.11, 9.76, 0.21, 1.08e-15, 1.08e-15, 1.14e-15, nan ], [ 1100, 14.60, 0.17, 15.73, 0.15, 12.30, 0.20, 9.93, 0.24, 1.14e-15, 1.19e-15, 1.19e-15, nan ], [ 1200, 16.29, 0.18, 18.37, 0.16, 13.46, 0.21, 9.71, 0.30, 1.18e-15, 1.28e-15, 1.28e-15, nan ], [ 1300, 17.43, 0.19, 21.66, 0.16, 13.69, 0.25, 9.42, 0.36, 1.27e-15, 1.18e-15, 1.27e-15, nan ], [ 1400, 19.13, 0.21, 23.61, 0.17, 15.08, 0.26, 10.22, 0.38, 1.14e-15, 1.06e-15, 1.06e-15, nan ], [ 1500, 20.20, 0.22, 24.21, 0.19, 16.03, 0.28, 9.90, 0.45, 1.36e-15, 1.29e-15, 1.29e-15, nan ], [ 1600, 21.42, 0.24, 25.49, 0.20, 16.63, 0.31, 9.74, 0.53, 1.35e-15, 1.42e-15, 1.42e-15, nan ], [ 1700, 22.50, 0.26, 26.54, 0.22, 17.31, 0.33, 10.61, 0.55, 1.34e-15, 1.40e-15, 1.40e-15, nan ], [ 1800, 24.11, 0.27, 30.02, 0.22, 18.26, 0.36, 10.51, 0.62, 1.83e-15, 1.89e-15, 1.71e-15, nan ], [ 1900, 25.53, 0.28, 30.48, 0.24, 19.21, 0.38, 11.09, 0.65, 1.62e-15, 1.38e-15, 1.50e-15, nan ], [ 2000, 26.33, 0.30, 30.33, 0.26, 20.37, 0.39, 11.35, 0.71, 1.82e-15, 1.82e-15, 1.65e-15, nan ], [ 2100, 27.50, 0.32, 32.21, 0.27, 15.62, 0.57, 11.52, 0.77, 1.84e-15, 1.79e-15, 1.62e-15, nan ], [ 2200, 29.01, 0.33, 34.11, 0.28, 16.06, 0.60, 11.45, 0.85, 1.76e-15, 1.76e-15, 1.81e-15, nan ], [ 2300, 31.05, 0.34, 36.12, 0.29, 16.91, 0.63, 11.75, 0.90, 1.78e-15, 1.73e-15, 1.78e-15, nan ], [ 2400, 31.84, 0.36, 36.34, 0.32, 17.65, 0.65, 11.40, 1.01, 1.61e-15, 1.52e-15, 1.56e-15, nan ], [ 2500, 32.58, 0.38, 38.74, 0.32, 18.34, 0.68, 11.95, 1.05, 1.91e-15, 1.59e-15, 1.77e-15, nan ], [ 2600, 33.06, 0.41, 39.42, 0.34, 18.68, 0.72, 11.35, 1.19, 1.53e-15, 1.66e-15, 1.62e-15, nan ], [ 2700, 34.90, 0.42, 42.39, 0.34, 19.68, 0.74, 11.70, 1.25, 1.60e-15, 1.56e-15, 1.60e-15, nan ], [ 2800, 35.26, 0.44, 39.02, 0.40, 20.08, 0.78, 11.89, 1.32, 1.79e-15, 1.79e-15, 1.87e-15, nan ], [ 2900, 36.83, 0.46, 42.69, 0.39, 20.98, 0.80, 12.11, 1.39, 1.80e-15, 1.80e-15, 1.80e-15, nan ], [ 3000, 38.79, 0.46, 44.24, 0.41, 21.61, 0.83, 12.23, 1.47, 1.97e-15, 1.89e-15, 1.97e-15, nan ], [ 3100, 39.57, 0.49, 44.93, 0.43, 17.64, 1.09, 12.55, 1.53, 2.13e-15, 2.20e-15, 2.20e-15, nan ], [ 3200, 41.81, 0.49, 42.96, 0.48, 18.12, 1.13, 12.32, 1.66, 1.99e-15, 1.99e-15, 2.06e-15, nan ], [ 3300, 42.21, 0.52, 47.79, 0.46, 18.70, 1.17, 12.36, 1.76, 2.14e-15, 2.07e-15, 2.07e-15, nan ], [ 3400, 42.75, 0.54, 46.82, 0.49, 19.19, 1.20, 11.82, 1.96, 2.34e-15, 2.21e-15, 2.07e-15, nan ], [ 3500, 44.48, 0.55, 49.02, 0.50, 19.62, 1.25, 12.61, 1.94, 2.34e-15, 2.47e-15, 2.40e-15, nan ], [ 3600, 45.33, 0.57, 48.18, 0.54, 20.02, 1.29, 12.59, 2.06, 2.34e-15, 2.21e-15, 2.34e-15, nan ], [ 3700, 45.95, 0.60, 49.07, 0.56, 20.61, 1.33, 12.11, 2.26, 2.52e-15, 2.52e-15, 2.52e-15, nan ], [ 3800, 46.75, 0.62, 50.95, 0.57, 21.27, 1.36, 12.79, 2.26, 2.33e-15, 2.45e-15, 2.57e-15, nan ], [ 3900, 48.99, 0.62, 51.21, 0.59, 21.76, 1.40, 12.26, 2.48, 2.22e-15, 2.16e-15, 2.22e-15, nan ], [ 4000, 48.50, 0.66, 49.61, 0.65, 22.21, 1.44, 12.73, 2.51, 2.56e-15, 2.67e-15, 2.50e-15, nan ], [ 4100, 48.65, 0.69, 50.65, 0.66, 19.35, 1.74, 12.59, 2.67, 2.88e-15, 2.83e-15, 2.77e-15, nan ], [ 4200, 49.70, 0.71, 52.90, 0.67, 19.05, 1.85, 12.52, 2.82, 2.76e-15, 2.65e-15, 2.92e-15, nan ], [ 4300, 50.32, 0.74, 52.70, 0.70, 19.62, 1.88, 12.76, 2.90, 2.27e-15, 2.27e-15, 2.43e-15, nan ], [ 4400, 52.27, 0.74, 52.98, 0.73, 19.88, 1.95, 12.85, 3.01, 2.38e-15, 2.43e-15, 2.58e-15, nan ], [ 4500, 52.88, 0.77, 55.18, 0.73, 20.39, 1.99, 12.84, 3.16, 2.83e-15, 3.03e-15, 2.78e-15, nan ], [ 4600, 54.63, 0.77, 55.26, 0.77, 20.80, 2.04, 12.82, 3.30, 2.52e-15, 2.52e-15, 2.77e-15, nan ], [ 4700, 55.24, 0.80, 54.69, 0.81, 21.24, 2.08, 12.69, 3.48, 2.52e-15, 2.66e-15, 2.71e-15, nan ], [ 4800, 54.87, 0.84, 53.79, 0.86, 21.62, 2.13, 12.95, 3.56, 2.51e-15, 2.42e-15, 2.46e-15, nan ], [ 4900, 55.53, 0.86, 56.64, 0.85, 22.02, 2.18, 12.76, 3.76, 2.51e-15, 2.55e-15, 2.64e-15, nan ], [ 5000, 56.37, 0.89, 56.95, 0.88, 22.48, 2.22, 12.75, 3.92, 2.46e-15, 2.32e-15, 2.64e-15, nan ], [ 5100, 58.46, 0.89, 57.05, 0.91, 22.78, 2.28, 12.70, 4.10, 2.41e-15, 2.36e-15, 2.41e-15, nan ], [ 5200, 57.67, 0.94, 57.92, 0.93, 19.94, 2.71, 12.81, 4.22, 2.62e-15, 2.54e-15, 2.62e-15, nan ], [ 5300, 58.05, 0.97, 59.53, 0.94, 20.26, 2.77, 13.15, 4.27, 2.57e-15, 2.66e-15, 2.62e-15, nan ], [ 5400, 59.53, 0.98, 60.26, 0.97, 20.57, 2.84, 12.97, 4.50, 2.69e-15, 2.44e-15, 2.53e-15, nan ], [ 5500, 57.56, 1.05, 60.46, 1.00, 20.95, 2.89, 12.99, 4.66, 2.40e-15, 2.40e-15, 2.40e-15, nan ], [ 5600, 59.85, 1.05, 55.46, 1.13, 21.25, 2.95, 13.21, 4.75, 2.52e-15, 2.68e-15, 2.60e-15, nan ], [ 5700, 60.81, 1.07, 61.42, 1.06, 21.50, 3.02, 13.28, 4.89, 2.63e-15, 2.63e-15, 2.63e-15, nan ], [ 5800, 61.62, 1.09, 60.57, 1.11, 21.84, 3.08, 13.21, 5.09, 3.14e-15, 2.98e-15, 3.06e-15, nan ], [ 5900, 62.11, 1.12, 60.34, 1.15, 22.25, 3.13, 13.21, 5.27, 3.08e-15, 3.01e-15, 3.01e-15, nan ], [ 6000, 62.73, 1.15, 60.36, 1.19, 22.62, 3.18, 13.42, 5.37, 3.41e-15, 3.26e-15, 3.41e-15, nan ], [ 6100, 63.24, 1.18, 62.70, 1.19, 22.88, 3.25, 13.60, 5.47, 3.28e-15, 2.83e-15, 3.06e-15, nan ], [ 6200, 64.35, 1.19, 62.83, 1.22, 20.34, 3.78, 13.30, 5.78, 3.01e-15, 3.08e-15, 2.86e-15, nan ], [ 6300, 65.18, 1.22, 61.21, 1.30, 20.71, 3.83, 13.54, 5.86, 3.68e-15, 3.75e-15, 3.46e-15, nan ], [ 6400, 65.59, 1.25, 59.16, 1.38, 20.89, 3.92, 13.50, 6.07, 3.98e-15, 3.77e-15, 4.05e-15, nan ], [ 6500, 65.41, 1.29, 62.61, 1.35, 21.09, 4.01, 13.53, 6.25, 3.08e-15, 3.29e-15, 3.50e-15, nan ], [ 6600, 66.11, 1.32, 62.96, 1.38, 21.55, 4.04, 13.66, 6.38, 3.72e-15, 3.58e-15, 3.58e-15, nan ], [ 6700, 68.50, 1.31, 62.19, 1.44, 21.67, 4.14, 13.41, 6.70, 4.00e-15, 4.14e-15, 3.87e-15, nan ], [ 6800, 67.12, 1.38, 62.37, 1.48, 22.04, 4.20, 13.66, 6.77, 3.81e-15, 3.68e-15, 3.61e-15, nan ], [ 6900, 68.81, 1.38, 63.45, 1.50, 22.18, 4.29, 13.62, 6.99, 2.97e-15, 3.10e-15, 3.23e-15, nan ], [ 7000, 68.40, 1.43, 62.55, 1.57, 22.31, 4.39, 13.62, 7.20, 3.51e-15, 4.03e-15, 3.83e-15, nan ], [ 7100, 69.54, 1.45, 62.54, 1.61, 22.80, 4.42, 13.64, 7.39, 3.20e-15, 3.27e-15, 3.07e-15, nan ], [ 7200, 69.41, 1.49, 60.26, 1.72, 20.71, 5.01, 13.62, 7.61, 3.03e-15, 3.28e-15, 3.16e-15, nan ], [ 7300, 70.08, 1.52, 63.34, 1.68, 20.68, 5.15, 13.71, 7.77, 3.55e-15, 3.61e-15, 3.43e-15, nan ], [ 7400, 71.68, 1.53, 62.92, 1.74, 20.87, 5.25, 13.64, 8.03, 3.38e-15, 3.81e-15, 3.56e-15, nan ], [ 7500, 71.12, 1.58, 64.26, 1.75, 21.21, 5.31, 13.76, 8.18, 3.70e-15, 3.58e-15, 3.76e-15, nan ], [ 7600, 72.80, 1.59, 63.72, 1.81, 21.46, 5.38, 14.00, 8.26, 3.47e-15, 3.47e-15, 3.29e-15, nan ], [ 7700, 72.09, 1.65, 65.16, 1.82, 21.67, 5.47, 13.79, 8.60, 3.72e-15, 3.72e-15, 3.54e-15, nan ], [ 7800, 72.82, 1.67, 64.01, 1.90, 22.18, 5.49, 13.49, 9.02, 3.26e-15, 3.44e-15, 3.61e-15, nan ], [ 7900, 71.86, 1.74, 63.66, 1.96, 22.46, 5.56, 13.73, 9.09, 3.45e-15, 3.63e-15, 3.51e-15, nan ], [ 8000, 71.55, 1.79, 60.71, 2.11, 22.27, 5.75, 13.72, 9.33, 3.30e-15, 3.30e-15, 3.41e-15, nan ], [ 8100, 72.31, 1.81, 66.29, 1.98, 22.92, 5.73, 13.65, 9.62, 3.82e-15, 3.87e-15, 3.65e-15, nan ], [ 8200, 70.82, 1.90, 66.22, 2.03, 21.31, 6.31, 13.79, 9.76, 3.49e-15, 3.44e-15, 3.49e-15, nan ], [ 8300, 71.92, 1.92, 66.03, 2.09, 21.07, 6.54, 13.53, 10.18, 3.45e-15, 3.45e-15, 3.62e-15, nan ], [ 8400, 69.83, 2.02, 65.13, 2.17, 21.03, 6.71, 13.98, 10.10, 3.63e-15, 3.57e-15, 3.46e-15, nan ], [ 8500, 71.22, 2.03, 67.03, 2.16, 21.58, 6.70, 13.69, 10.55, 4.01e-15, 4.01e-15, 3.91e-15, nan ], [ 8600, 70.28, 2.10, 66.43, 2.23, 21.30, 6.95, 13.80, 10.72, 3.75e-15, 3.44e-15, 3.49e-15, nan ], [ 8700, 70.97, 2.13, 66.90, 2.26, 21.91, 6.91, 13.83, 10.95, 3.35e-15, 3.45e-15, 3.66e-15, nan ], [ 8800, 69.03, 2.24, 64.27, 2.41, 21.63, 7.16, 14.02, 11.05, 4.19e-15, 4.29e-15, 4.55e-15, nan ], [ 8900, 69.58, 2.28, 67.62, 2.34, 21.89, 7.24, 14.08, 11.26, 3.83e-15, 3.68e-15, 3.93e-15, nan ], [ 9000, 69.48, 2.33, 66.65, 2.43, 22.53, 7.19, 14.07, 11.52, 3.33e-15, 3.44e-15, 3.39e-15, nan ], [ 10000, 69.04, 2.90, 68.06, 2.94, 22.26, 8.99, 14.24, 14.04, 3.87e-15, 3.68e-15, 3.82e-15, nan ], [ 12000, 69.45, 4.15, 65.73, 4.38, 21.81, 13.20, 14.40, 20.00, 5.15e-15, 5.08e-15, 5.15e-15, nan ], [ 14000, 73.33, 5.35, 71.39, 5.49, 22.58, 17.36, 14.79, 26.50, 5.07e-15, 5.26e-15, 4.94e-15, nan ], [ 16000, 74.65, 6.86, 67.95, 7.54, 21.96, 23.31, 14.22, 36.00, 5.12e-15, 4.89e-15, 5.06e-15, nan ], [ 18000, 72.16, 8.98, 73.26, 8.85, 21.83, 29.68, 14.77, 43.87, 6.11e-15, 6.27e-15, 6.72e-15, nan ], [ 20000, 72.64, 11.01, 69.95, 11.44, 20.89, 38.30, 15.25, 52.47, 5.96e-15, 5.68e-15, 5.78e-15, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/log.txt # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/setup.txt # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/sgeqrf.txt # numactl --interleave=all ../testing/testing_sgeqrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 sgeqrf = array([ [ 10, 10, nan, nan, 0.00, 0.00, nan ], [ 20, 20, nan, nan, 0.02, 0.00, nan ], [ 30, 30, nan, nan, 0.06, 0.00, nan ], [ 40, 40, nan, nan, 0.25, 0.00, nan ], [ 50, 50, nan, nan, 0.42, 0.00, nan ], [ 60, 60, nan, nan, 0.69, 0.00, nan ], [ 70, 70, nan, nan, 0.88, 0.00, nan ], [ 80, 80, nan, nan, 0.84, 0.00, nan ], [ 90, 90, nan, nan, 0.99, 0.00, nan ], [ 100, 100, nan, nan, 0.97, 0.00, nan ], [ 200, 200, nan, nan, 4.62, 0.00, nan ], [ 300, 300, nan, nan, 10.57, 0.00, nan ], [ 400, 400, nan, nan, 19.32, 0.00, nan ], [ 500, 500, nan, nan, 29.73, 0.01, nan ], [ 600, 600, nan, nan, 41.45, 0.01, nan ], [ 700, 700, nan, nan, 55.58, 0.01, nan ], [ 800, 800, nan, nan, 67.12, 0.01, nan ], [ 900, 900, nan, nan, 91.96, 0.01, nan ], [ 1000, 1000, nan, nan, 119.32, 0.01, nan ], [ 2000, 2000, nan, nan, 330.72, 0.03, nan ], [ 3000, 3000, nan, nan, 570.95, 0.06, nan ], [ 4000, 4000, nan, nan, 725.82, 0.12, nan ], [ 5000, 5000, nan, nan, 897.94, 0.19, nan ], [ 6000, 6000, nan, nan, 1049.26, 0.27, nan ], [ 7000, 7000, nan, nan, 1111.54, 0.41, nan ], [ 8000, 8000, nan, nan, 1373.64, 0.50, nan ], [ 9000, 9000, nan, nan, 1485.26, 0.65, nan ], [ 10000, 10000, nan, nan, 1581.15, 0.84, nan ], [ 12000, 12000, nan, nan, 1719.35, 1.34, nan ], [ 14000, 14000, nan, nan, 1792.15, 2.04, nan ], [ 16000, 16000, nan, nan, 1886.77, 2.89, nan ], [ 18000, 18000, nan, nan, 1909.49, 4.07, nan ], [ 20000, 20000, nan, nan, 2045.64, 5.21, nan ], ]) # numactl --interleave=all ../testing/testing_sgeqrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 sgeqrf_gpu = array([ [ 10, 10, nan, nan, 0.00, 0.00, nan ], [ 20, 20, nan, nan, 0.01, 0.00, nan ], [ 30, 30, nan, nan, 0.03, 0.00, nan ], [ 40, 40, nan, nan, 0.07, 0.00, nan ], [ 50, 50, nan, nan, 0.13, 0.00, nan ], [ 60, 60, nan, nan, 0.21, 0.00, nan ], [ 70, 70, nan, nan, 0.33, 0.00, nan ], [ 80, 80, nan, nan, 0.49, 0.00, nan ], [ 90, 90, nan, nan, 0.65, 0.00, nan ], [ 100, 100, nan, nan, 0.72, 0.00, nan ], [ 200, 200, nan, nan, 6.29, 0.00, nan ], [ 300, 300, nan, nan, 13.58, 0.00, nan ], [ 400, 400, nan, nan, 23.77, 0.00, nan ], [ 500, 500, nan, nan, 27.62, 0.01, nan ], [ 600, 600, nan, nan, 40.84, 0.01, nan ], [ 700, 700, nan, nan, 51.96, 0.01, nan ], [ 800, 800, nan, nan, 69.73, 0.01, nan ], [ 900, 900, nan, nan, 82.84, 0.01, nan ], [ 1000, 1000, nan, nan, 99.61, 0.01, nan ], [ 2000, 2000, nan, nan, 296.04, 0.04, nan ], [ 3000, 3000, nan, nan, 489.48, 0.07, nan ], [ 4000, 4000, nan, nan, 705.17, 0.12, nan ], [ 5000, 5000, nan, nan, 888.12, 0.19, nan ], [ 6000, 6000, nan, nan, 1021.01, 0.28, nan ], [ 7000, 7000, nan, nan, 1096.15, 0.42, nan ], [ 8000, 8000, nan, nan, 1309.73, 0.52, nan ], [ 9000, 9000, nan, nan, 1423.20, 0.68, nan ], [ 10000, 10000, nan, nan, 1526.76, 0.87, nan ], [ 12000, 12000, nan, nan, 1679.62, 1.37, nan ], [ 14000, 14000, nan, nan, 1768.33, 2.07, nan ], [ 16000, 16000, nan, nan, 1872.85, 2.92, nan ], [ 18000, 18000, nan, nan, 1911.42, 4.07, nan ], [ 20000, 20000, nan, nan, 1996.32, 5.34, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/sgesvd.txt # numactl --interleave=all ../testing/testing_sgesvd -UN -VN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 sgesvd_UN = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.00, nan ], [ nan, 80, 80, nan, 0.00, nan ], [ nan, 90, 90, nan, 0.00, nan ], [ nan, 100, 100, nan, 0.00, nan ], [ nan, 200, 200, nan, 0.01, nan ], [ nan, 300, 300, nan, 0.03, nan ], [ nan, 400, 400, nan, 0.04, nan ], [ nan, 500, 500, nan, 0.06, nan ], [ nan, 600, 600, nan, 0.08, nan ], [ nan, 700, 700, nan, 0.11, nan ], [ nan, 800, 800, nan, 0.14, nan ], [ nan, 900, 900, nan, 0.19, nan ], [ nan, 1000, 1000, nan, 0.22, nan ], [ nan, 2000, 2000, nan, 0.74, nan ], [ nan, 3000, 3000, nan, 1.75, nan ], [ nan, 4000, 4000, nan, 3.30, nan ], [ nan, 5000, 5000, nan, 5.96, nan ], [ nan, 6000, 6000, nan, 9.46, nan ], [ nan, 7000, 7000, nan, 14.05, nan ], [ nan, 8000, 8000, nan, 19.90, nan ], [ nan, 9000, 9000, nan, 27.30, nan ], [ nan, 10000, 10000, nan, 36.58, nan ], [ nan, 300, 100, nan, 0.00, nan ], [ nan, 600, 200, nan, 0.02, nan ], [ nan, 900, 300, nan, 0.03, nan ], [ nan, 1200, 400, nan, 0.05, nan ], [ nan, 1500, 500, nan, 0.07, nan ], [ nan, 1800, 600, nan, 0.10, nan ], [ nan, 2100, 700, nan, 0.13, nan ], [ nan, 2400, 800, nan, 0.17, nan ], [ nan, 2700, 900, nan, 0.22, nan ], [ nan, 3000, 1000, nan, 0.26, nan ], [ nan, 6000, 2000, nan, 1.06, nan ], [ nan, 9000, 3000, nan, 2.61, nan ], [ nan, 12000, 4000, nan, 5.07, nan ], [ nan, 15000, 5000, nan, 8.24, nan ], [ nan, 18000, 6000, nan, 13.18, nan ], [ nan, 21000, 7000, nan, 19.68, nan ], [ nan, 24000, 8000, nan, 28.20, nan ], [ nan, 27000, 9000, nan, 38.52, nan ], [ nan, 100, 300, nan, 0.00, nan ], [ nan, 200, 600, nan, 0.02, nan ], [ nan, 300, 900, nan, 0.04, nan ], [ nan, 400, 1200, nan, 0.06, nan ], [ nan, 500, 1500, nan, 0.08, nan ], [ nan, 600, 1800, nan, 0.11, nan ], [ nan, 700, 2100, nan, 0.15, nan ], [ nan, 800, 2400, nan, 0.18, nan ], [ nan, 900, 2700, nan, 0.23, nan ], [ nan, 1000, 3000, nan, 0.28, nan ], [ nan, 2000, 6000, nan, 1.06, nan ], [ nan, 3000, 9000, nan, 2.64, nan ], [ nan, 4000, 12000, nan, 4.99, nan ], [ nan, 5000, 15000, nan, 9.06, nan ], [ nan, 6000, 18000, nan, 14.39, nan ], [ nan, 7000, 21000, nan, 21.74, nan ], [ nan, 8000, 24000, nan, 30.43, nan ], [ nan, 9000, 27000, nan, 41.90, nan ], [ nan, 10000, 100, nan, 0.01, nan ], [ nan, 20000, 200, nan, 0.04, nan ], [ nan, 30000, 300, nan, 0.09, nan ], [ nan, 40000, 400, nan, 0.21, nan ], [ nan, 50000, 500, nan, 0.33, nan ], [ nan, 60000, 600, nan, 0.49, nan ], [ nan, 70000, 700, nan, 0.69, nan ], [ nan, 80000, 800, nan, 0.94, nan ], [ nan, 90000, 900, nan, 1.32, nan ], [ nan, 100000, 1000, nan, 1.65, nan ], [ nan, 200000, 2000, nan, 9.03, nan ], [ nan, 100, 10000, nan, 0.01, nan ], [ nan, 200, 20000, nan, 0.05, nan ], [ nan, 300, 30000, nan, 0.13, nan ], [ nan, 400, 40000, nan, 0.25, nan ], [ nan, 500, 50000, nan, 0.45, nan ], [ nan, 600, 60000, nan, 0.68, nan ], [ nan, 700, 70000, nan, 1.06, nan ], [ nan, 800, 80000, nan, 1.29, nan ], [ nan, 900, 90000, nan, 1.60, nan ], [ nan, 1000, 100000, nan, 2.00, nan ], [ nan, 2000, 200000, nan, 12.29, nan ], ]) # numactl --interleave=all ../testing/testing_sgesvd -US -VS -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 sgesvd_US = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.01, nan ], [ nan, 70, 70, nan, 0.01, nan ], [ nan, 80, 80, nan, 0.01, nan ], [ nan, 90, 90, nan, 0.02, nan ], [ nan, 100, 100, nan, 0.02, nan ], [ nan, 200, 200, nan, 0.08, nan ], [ nan, 300, 300, nan, 0.05, nan ], [ nan, 400, 400, nan, 0.08, nan ], [ nan, 500, 500, nan, 0.13, nan ], [ nan, 600, 600, nan, 0.18, nan ], [ nan, 700, 700, nan, 0.23, nan ], [ nan, 800, 800, nan, 0.31, nan ], [ nan, 900, 900, nan, 0.41, nan ], [ nan, 1000, 1000, nan, 0.49, nan ], [ nan, 2000, 2000, nan, 2.46, nan ], [ nan, 3000, 3000, nan, 7.44, nan ], [ nan, 4000, 4000, nan, 15.79, nan ], [ nan, 5000, 5000, nan, 29.23, nan ], [ nan, 6000, 6000, nan, 52.14, nan ], [ nan, 7000, 7000, nan, 64.01, nan ], [ nan, 8000, 8000, nan, 91.31, nan ], [ nan, 9000, 9000, nan, 128.34, nan ], [ nan, 10000, 10000, nan, 179.45, nan ], [ nan, 300, 100, nan, 0.03, nan ], [ nan, 600, 200, nan, 0.08, nan ], [ nan, 900, 300, nan, 0.06, nan ], [ nan, 1200, 400, nan, 0.10, nan ], [ nan, 1500, 500, nan, 0.17, nan ], [ nan, 1800, 600, nan, 0.25, nan ], [ nan, 2100, 700, nan, 0.34, nan ], [ nan, 2400, 800, nan, 0.40, nan ], [ nan, 2700, 900, nan, 0.54, nan ], [ nan, 3000, 1000, nan, 0.74, nan ], [ nan, 6000, 2000, nan, 3.26, nan ], [ nan, 9000, 3000, nan, 8.68, nan ], [ nan, 12000, 4000, nan, 17.44, nan ], [ nan, 15000, 5000, nan, 31.24, nan ], [ nan, 18000, 6000, nan, 53.73, nan ], [ nan, 21000, 7000, nan, 82.38, nan ], [ nan, 24000, 8000, nan, 110.54, nan ], [ nan, 27000, 9000, nan, 165.19, nan ], [ nan, 100, 300, nan, 0.02, nan ], [ nan, 200, 600, nan, 0.07, nan ], [ nan, 300, 900, nan, 0.08, nan ], [ nan, 400, 1200, nan, 0.13, nan ], [ nan, 500, 1500, nan, 0.20, nan ], [ nan, 600, 1800, nan, 0.27, nan ], [ nan, 700, 2100, nan, 0.39, nan ], [ nan, 800, 2400, nan, 0.50, nan ], [ nan, 900, 2700, nan, 0.63, nan ], [ nan, 1000, 3000, nan, 0.78, nan ], [ nan, 2000, 6000, nan, 3.81, nan ], [ nan, 3000, 9000, nan, 9.76, nan ], [ nan, 4000, 12000, nan, 20.42, nan ], [ nan, 5000, 15000, nan, 37.34, nan ], [ nan, 6000, 18000, nan, 62.36, nan ], [ nan, 7000, 21000, nan, 97.75, nan ], [ nan, 8000, 24000, nan, 144.67, nan ], [ nan, 9000, 27000, nan, 202.69, nan ], [ nan, 10000, 100, nan, 0.05, nan ], [ nan, 20000, 200, nan, 0.19, nan ], [ nan, 30000, 300, nan, 0.29, nan ], [ nan, 40000, 400, nan, 0.58, nan ], [ nan, 50000, 500, nan, 1.03, nan ], [ nan, 60000, 600, nan, 1.59, nan ], [ nan, 70000, 700, nan, 2.15, nan ], [ nan, 80000, 800, nan, 3.09, nan ], [ nan, 90000, 900, nan, 4.30, nan ], [ nan, 100000, 1000, nan, 5.67, nan ], [ nan, 200000, 2000, nan, 38.28, nan ], [ nan, 100, 10000, nan, 0.07, nan ], [ nan, 200, 20000, nan, 0.35, nan ], [ nan, 300, 30000, nan, 0.56, nan ], [ nan, 400, 40000, nan, 0.89, nan ], [ nan, 500, 50000, nan, 2.49, nan ], [ nan, 600, 60000, nan, 3.38, nan ], [ nan, 700, 70000, nan, 4.27, nan ], [ nan, 800, 80000, nan, 5.83, nan ], [ nan, 900, 90000, nan, 7.41, nan ], [ nan, 1000, 100000, nan, 15.30, nan ], [ nan, 2000, 200000, nan, 107.41, nan ], ]) # numactl --interleave=all ../testing/testing_sgesdd -UN -VN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 sgesdd_UN = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.00, nan ], [ nan, 80, 80, nan, 0.00, nan ], [ nan, 90, 90, nan, 0.00, nan ], [ nan, 100, 100, nan, 0.00, nan ], [ nan, 200, 200, nan, 0.01, nan ], [ nan, 300, 300, nan, 0.03, nan ], [ nan, 400, 400, nan, 0.04, nan ], [ nan, 500, 500, nan, 0.06, nan ], [ nan, 600, 600, nan, 0.08, nan ], [ nan, 700, 700, nan, 0.10, nan ], [ nan, 800, 800, nan, 0.13, nan ], [ nan, 900, 900, nan, 0.17, nan ], [ nan, 1000, 1000, nan, 0.20, nan ], [ nan, 2000, 2000, nan, 0.75, nan ], [ nan, 3000, 3000, nan, 1.75, nan ], [ nan, 4000, 4000, nan, 3.32, nan ], [ nan, 5000, 5000, nan, 5.98, nan ], [ nan, 6000, 6000, nan, 9.49, nan ], [ nan, 7000, 7000, nan, 14.10, nan ], [ nan, 8000, 8000, nan, 19.96, nan ], [ nan, 9000, 9000, nan, 27.30, nan ], [ nan, 10000, 10000, nan, 36.36, nan ], [ nan, 300, 100, nan, 0.00, nan ], [ nan, 600, 200, nan, 0.01, nan ], [ nan, 900, 300, nan, 0.03, nan ], [ nan, 1200, 400, nan, 0.05, nan ], [ nan, 1500, 500, nan, 0.07, nan ], [ nan, 1800, 600, nan, 0.09, nan ], [ nan, 2100, 700, nan, 0.13, nan ], [ nan, 2400, 800, nan, 0.16, nan ], [ nan, 2700, 900, nan, 0.21, nan ], [ nan, 3000, 1000, nan, 0.24, nan ], [ nan, 6000, 2000, nan, 1.02, nan ], [ nan, 9000, 3000, nan, 2.58, nan ], [ nan, 12000, 4000, nan, 5.11, nan ], [ nan, 15000, 5000, nan, 9.16, nan ], [ nan, 18000, 6000, nan, 13.59, nan ], [ nan, 21000, 7000, nan, 21.94, nan ], [ nan, 24000, 8000, nan, 31.62, nan ], [ nan, 27000, 9000, nan, 43.79, nan ], [ nan, 100, 300, nan, 0.00, nan ], [ nan, 200, 600, nan, 0.02, nan ], [ nan, 300, 900, nan, 0.04, nan ], [ nan, 400, 1200, nan, 0.06, nan ], [ nan, 500, 1500, nan, 0.09, nan ], [ nan, 600, 1800, nan, 0.12, nan ], [ nan, 700, 2100, nan, 0.16, nan ], [ nan, 800, 2400, nan, 0.19, nan ], [ nan, 900, 2700, nan, 0.25, nan ], [ nan, 1000, 3000, nan, 0.30, nan ], [ nan, 2000, 6000, nan, 1.21, nan ], [ nan, 3000, 9000, nan, 3.10, nan ], [ nan, 4000, 12000, nan, 5.95, nan ], [ nan, 5000, 15000, nan, 10.80, nan ], [ nan, 6000, 18000, nan, 17.28, nan ], [ nan, 7000, 21000, nan, 26.20, nan ], [ nan, 8000, 24000, nan, 35.64, nan ], [ nan, 9000, 27000, nan, 49.67, nan ], [ nan, 10000, 100, nan, 0.01, nan ], [ nan, 20000, 200, nan, 0.04, nan ], [ nan, 30000, 300, nan, 0.10, nan ], [ nan, 40000, 400, nan, 0.21, nan ], [ nan, 50000, 500, nan, 0.33, nan ], [ nan, 60000, 600, nan, 0.48, nan ], [ nan, 70000, 700, nan, 0.67, nan ], [ nan, 80000, 800, nan, 0.92, nan ], [ nan, 90000, 900, nan, 1.29, nan ], [ nan, 100000, 1000, nan, 1.61, nan ], [ nan, 200000, 2000, nan, 10.96, nan ], [ nan, 100, 10000, nan, 0.01, nan ], [ nan, 200, 20000, nan, 0.06, nan ], [ nan, 300, 30000, nan, 0.17, nan ], [ nan, 400, 40000, nan, 0.33, nan ], [ nan, 500, 50000, nan, 0.61, nan ], [ nan, 600, 60000, nan, 0.93, nan ], [ nan, 700, 70000, nan, 1.46, nan ], [ nan, 800, 80000, nan, 1.75, nan ], [ nan, 900, 90000, nan, 2.36, nan ], [ nan, 1000, 100000, nan, 2.97, nan ], [ nan, 2000, 200000, nan, 18.77, nan ], ]) # numactl --interleave=all ../testing/testing_sgesdd -US -VS -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 sgesdd_US = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.00, nan ], [ nan, 80, 80, nan, 0.00, nan ], [ nan, 90, 90, nan, 0.00, nan ], [ nan, 100, 100, nan, 0.00, nan ], [ nan, 200, 200, nan, 0.02, nan ], [ nan, 300, 300, nan, 0.04, nan ], [ nan, 400, 400, nan, 0.06, nan ], [ nan, 500, 500, nan, 0.09, nan ], [ nan, 600, 600, nan, 0.12, nan ], [ nan, 700, 700, nan, 0.16, nan ], [ nan, 800, 800, nan, 0.21, nan ], [ nan, 900, 900, nan, 0.27, nan ], [ nan, 1000, 1000, nan, 0.34, nan ], [ nan, 2000, 2000, nan, 1.25, nan ], [ nan, 3000, 3000, nan, 2.95, nan ], [ nan, 4000, 4000, nan, 5.38, nan ], [ nan, 5000, 5000, nan, 9.73, nan ], [ nan, 6000, 6000, nan, 14.35, nan ], [ nan, 7000, 7000, nan, 20.93, nan ], [ nan, 8000, 8000, nan, 28.99, nan ], [ nan, 9000, 9000, nan, 38.69, nan ], [ nan, 10000, 10000, nan, 50.61, nan ], [ nan, 300, 100, nan, 0.01, nan ], [ nan, 600, 200, nan, 0.02, nan ], [ nan, 900, 300, nan, 0.04, nan ], [ nan, 1200, 400, nan, 0.07, nan ], [ nan, 1500, 500, nan, 0.10, nan ], [ nan, 1800, 600, nan, 0.14, nan ], [ nan, 2100, 700, nan, 0.20, nan ], [ nan, 2400, 800, nan, 0.25, nan ], [ nan, 2700, 900, nan, 0.32, nan ], [ nan, 3000, 1000, nan, 0.40, nan ], [ nan, 6000, 2000, nan, 1.73, nan ], [ nan, 9000, 3000, nan, 4.16, nan ], [ nan, 12000, 4000, nan, 8.09, nan ], [ nan, 15000, 5000, nan, 14.18, nan ], [ nan, 18000, 6000, nan, 23.02, nan ], [ nan, 21000, 7000, nan, 33.96, nan ], [ nan, 24000, 8000, nan, 47.74, nan ], [ nan, 27000, 9000, nan, 64.54, nan ], [ nan, 100, 300, nan, 0.01, nan ], [ nan, 200, 600, nan, 0.03, nan ], [ nan, 300, 900, nan, 0.05, nan ], [ nan, 400, 1200, nan, 0.08, nan ], [ nan, 500, 1500, nan, 0.12, nan ], [ nan, 600, 1800, nan, 0.17, nan ], [ nan, 700, 2100, nan, 0.23, nan ], [ nan, 800, 2400, nan, 0.28, nan ], [ nan, 900, 2700, nan, 0.36, nan ], [ nan, 1000, 3000, nan, 0.46, nan ], [ nan, 2000, 6000, nan, 1.76, nan ], [ nan, 3000, 9000, nan, 4.37, nan ], [ nan, 4000, 12000, nan, 8.32, nan ], [ nan, 5000, 15000, nan, 14.78, nan ], [ nan, 6000, 18000, nan, 23.99, nan ], [ nan, 7000, 21000, nan, 35.67, nan ], [ nan, 8000, 24000, nan, 49.53, nan ], [ nan, 9000, 27000, nan, 67.04, nan ], [ nan, 10000, 100, nan, 0.02, nan ], [ nan, 20000, 200, nan, 0.10, nan ], [ nan, 30000, 300, nan, 0.18, nan ], [ nan, 40000, 400, nan, 0.35, nan ], [ nan, 50000, 500, nan, 0.75, nan ], [ nan, 60000, 600, nan, 0.98, nan ], [ nan, 70000, 700, nan, 1.28, nan ], [ nan, 80000, 800, nan, 1.61, nan ], [ nan, 90000, 900, nan, 2.16, nan ], [ nan, 100000, 1000, nan, 3.45, nan ], [ nan, 200000, 2000, nan, 17.92, nan ], [ nan, 100, 10000, nan, 0.04, nan ], [ nan, 200, 20000, nan, 0.18, nan ], [ nan, 300, 30000, nan, 0.37, nan ], [ nan, 400, 40000, nan, 0.54, nan ], [ nan, 500, 50000, nan, 1.84, nan ], [ nan, 600, 60000, nan, 2.13, nan ], [ nan, 700, 70000, nan, 2.53, nan ], [ nan, 800, 80000, nan, 2.65, nan ], [ nan, 900, 90000, nan, 3.06, nan ], [ nan, 1000, 100000, nan, 6.52, nan ], [ nan, 2000, 200000, nan, 26.37, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/sgetrf.txt # numactl --interleave=all ../testing/testing_sgetrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 sgetrf = array([ [ 10, 10, nan, nan, 0.03, 0.00, nan ], [ 20, 20, nan, nan, 0.08, 0.00, nan ], [ 30, 30, nan, nan, 0.46, 0.00, nan ], [ 40, 40, nan, nan, 0.69, 0.00, nan ], [ 50, 50, nan, nan, 1.55, 0.00, nan ], [ 60, 60, nan, nan, 2.41, 0.00, nan ], [ 70, 70, nan, nan, 1.89, 0.00, nan ], [ 80, 80, nan, nan, 3.22, 0.00, nan ], [ 90, 90, nan, nan, 3.83, 0.00, nan ], [ 100, 100, nan, nan, 4.70, 0.00, nan ], [ 200, 200, nan, nan, 17.09, 0.00, nan ], [ 300, 300, nan, nan, 10.21, 0.00, nan ], [ 400, 400, nan, nan, 20.55, 0.00, nan ], [ 500, 500, nan, nan, 30.92, 0.00, nan ], [ 600, 600, nan, nan, 41.22, 0.00, nan ], [ 700, 700, nan, nan, 53.89, 0.00, nan ], [ 800, 800, nan, nan, 68.44, 0.00, nan ], [ 900, 900, nan, nan, 82.98, 0.01, nan ], [ 1000, 1000, nan, nan, 98.87, 0.01, nan ], [ 2000, 2000, nan, nan, 259.86, 0.02, nan ], [ 3000, 3000, nan, nan, 434.36, 0.04, nan ], [ 4000, 4000, nan, nan, 611.21, 0.07, nan ], [ 5000, 5000, nan, nan, 747.73, 0.11, nan ], [ 6000, 6000, nan, nan, 918.61, 0.16, nan ], [ 7000, 7000, nan, nan, 1058.44, 0.22, nan ], [ 8000, 8000, nan, nan, 1189.63, 0.29, nan ], [ 9000, 9000, nan, nan, 1290.44, 0.38, nan ], [ 10000, 10000, nan, nan, 1374.99, 0.48, nan ], [ 12000, 12000, nan, nan, 1515.55, 0.76, nan ], [ 14000, 14000, nan, nan, 1622.48, 1.13, nan ], [ 16000, 16000, nan, nan, 1701.52, 1.60, nan ], [ 18000, 18000, nan, nan, 1772.35, 2.19, nan ], [ 20000, 20000, nan, nan, 1955.54, 2.73, nan ], ]) # numactl --interleave=all ../testing/testing_sgetrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 sgetrf_gpu = array([ [ 10, 10, nan, nan, 0.00, 0.00, nan ], [ 20, 20, nan, nan, 0.02, 0.00, nan ], [ 30, 30, nan, nan, 0.07, 0.00, nan ], [ 40, 40, nan, nan, 0.15, 0.00, nan ], [ 50, 50, nan, nan, 0.30, 0.00, nan ], [ 60, 60, nan, nan, 0.49, 0.00, nan ], [ 70, 70, nan, nan, 0.62, 0.00, nan ], [ 80, 80, nan, nan, 1.02, 0.00, nan ], [ 90, 90, nan, nan, 1.28, 0.00, nan ], [ 100, 100, nan, nan, 1.63, 0.00, nan ], [ 200, 200, nan, nan, 7.12, 0.00, nan ], [ 300, 300, nan, nan, 7.40, 0.00, nan ], [ 400, 400, nan, nan, 13.95, 0.00, nan ], [ 500, 500, nan, nan, 23.01, 0.00, nan ], [ 600, 600, nan, nan, 33.22, 0.00, nan ], [ 700, 700, nan, nan, 45.55, 0.01, nan ], [ 800, 800, nan, nan, 57.58, 0.01, nan ], [ 900, 900, nan, nan, 72.55, 0.01, nan ], [ 1000, 1000, nan, nan, 86.70, 0.01, nan ], [ 2000, 2000, nan, nan, 259.14, 0.02, nan ], [ 3000, 3000, nan, nan, 458.04, 0.04, nan ], [ 4000, 4000, nan, nan, 662.44, 0.06, nan ], [ 5000, 5000, nan, nan, 782.17, 0.11, nan ], [ 6000, 6000, nan, nan, 986.56, 0.15, nan ], [ 7000, 7000, nan, nan, 1158.16, 0.20, nan ], [ 8000, 8000, nan, nan, 1310.63, 0.26, nan ], [ 9000, 9000, nan, nan, 1423.20, 0.34, nan ], [ 10000, 10000, nan, nan, 1528.95, 0.44, nan ], [ 12000, 12000, nan, nan, 1678.63, 0.69, nan ], [ 14000, 14000, nan, nan, 1792.04, 1.02, nan ], [ 16000, 16000, nan, nan, 1871.16, 1.46, nan ], [ 18000, 18000, nan, nan, 1942.72, 2.00, nan ], [ 20000, 20000, nan, nan, 2063.41, 2.58, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/spotrf.txt # numactl --interleave=all ../testing/testing_spotrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 spotrf = array([ [ 10, nan, nan, 0.08, 0.00, nan ], [ 20, nan, nan, 0.48, 0.00, nan ], [ 30, nan, nan, 0.97, 0.00, nan ], [ 40, nan, nan, 1.47, 0.00, nan ], [ 50, nan, nan, 2.05, 0.00, nan ], [ 60, nan, nan, 2.62, 0.00, nan ], [ 70, nan, nan, 3.24, 0.00, nan ], [ 80, nan, nan, 3.70, 0.00, nan ], [ 90, nan, nan, 4.11, 0.00, nan ], [ 100, nan, nan, 4.62, 0.00, nan ], [ 200, nan, nan, 14.21, 0.00, nan ], [ 300, nan, nan, 5.86, 0.00, nan ], [ 400, nan, nan, 13.02, 0.00, nan ], [ 500, nan, nan, 23.00, 0.00, nan ], [ 600, nan, nan, 25.45, 0.00, nan ], [ 700, nan, nan, 37.27, 0.00, nan ], [ 800, nan, nan, 41.51, 0.00, nan ], [ 900, nan, nan, 56.13, 0.00, nan ], [ 1000, nan, nan, 73.14, 0.00, nan ], [ 2000, nan, nan, 285.91, 0.01, nan ], [ 3000, nan, nan, 534.96, 0.02, nan ], [ 4000, nan, nan, 801.25, 0.03, nan ], [ 5000, nan, nan, 1001.93, 0.04, nan ], [ 6000, nan, nan, 1189.53, 0.06, nan ], [ 7000, nan, nan, 1338.30, 0.09, nan ], [ 8000, nan, nan, 1485.15, 0.11, nan ], [ 9000, nan, nan, 1590.04, 0.15, nan ], [ 10000, nan, nan, 1685.62, 0.20, nan ], [ 12000, nan, nan, 1844.96, 0.31, nan ], [ 14000, nan, nan, 1985.70, 0.46, nan ], [ 16000, nan, nan, 2093.90, 0.65, nan ], [ 18000, nan, nan, 2175.25, 0.89, nan ], [ 20000, nan, nan, 2261.66, 1.18, nan ], ]) # numactl --interleave=all ../testing/testing_spotrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 spotrf_gpu = array([ [ 10, nan, nan, 0.00, 0.00, nan ], [ 20, nan, nan, 0.00, 0.00, nan ], [ 30, nan, nan, 0.01, 0.00, nan ], [ 40, nan, nan, 0.02, 0.00, nan ], [ 50, nan, nan, 0.03, 0.00, nan ], [ 60, nan, nan, 0.06, 0.00, nan ], [ 70, nan, nan, 0.09, 0.00, nan ], [ 80, nan, nan, 0.14, 0.00, nan ], [ 90, nan, nan, 0.19, 0.00, nan ], [ 100, nan, nan, 0.26, 0.00, nan ], [ 200, nan, nan, 5.24, 0.00, nan ], [ 300, nan, nan, 4.10, 0.00, nan ], [ 400, nan, nan, 9.09, 0.00, nan ], [ 500, nan, nan, 16.56, 0.00, nan ], [ 600, nan, nan, 20.83, 0.00, nan ], [ 700, nan, nan, 31.40, 0.00, nan ], [ 800, nan, nan, 36.79, 0.00, nan ], [ 900, nan, nan, 50.27, 0.00, nan ], [ 1000, nan, nan, 66.30, 0.01, nan ], [ 2000, nan, nan, 300.63, 0.01, nan ], [ 3000, nan, nan, 627.97, 0.01, nan ], [ 4000, nan, nan, 952.86, 0.02, nan ], [ 5000, nan, nan, 1170.66, 0.04, nan ], [ 6000, nan, nan, 1407.59, 0.05, nan ], [ 7000, nan, nan, 1564.87, 0.07, nan ], [ 8000, nan, nan, 1748.87, 0.10, nan ], [ 9000, nan, nan, 1858.51, 0.13, nan ], [ 10000, nan, nan, 1957.65, 0.17, nan ], [ 12000, nan, nan, 2109.81, 0.27, nan ], [ 14000, nan, nan, 2253.65, 0.41, nan ], [ 16000, nan, nan, 2340.03, 0.58, nan ], [ 18000, nan, nan, 2402.42, 0.81, nan ], [ 20000, nan, nan, 2477.84, 1.08, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/ssyevd.txt # numactl --interleave=all ../testing/testing_ssyevd -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_ssyevd -JN -N 123 -N 1234 --range 12000:20000:2000 ssyevd_JN = array([ [ 10, nan, 0.0000, nan, nan, nan, nan ], [ 20, nan, 0.0000, nan, nan, nan, nan ], [ 30, nan, 0.0001, nan, nan, nan, nan ], [ 40, nan, 0.0001, nan, nan, nan, nan ], [ 50, nan, 0.0001, nan, nan, nan, nan ], [ 60, nan, 0.0002, nan, nan, nan, nan ], [ 70, nan, 0.0003, nan, nan, nan, nan ], [ 80, nan, 0.0003, nan, nan, nan, nan ], [ 90, nan, 0.0004, nan, nan, nan, nan ], [ 100, nan, 0.0005, nan, nan, nan, nan ], [ 200, nan, 0.0036, nan, nan, nan, nan ], [ 300, nan, 0.0066, nan, nan, nan, nan ], [ 400, nan, 0.0109, nan, nan, nan, nan ], [ 500, nan, 0.0166, nan, nan, nan, nan ], [ 600, nan, 0.0221, nan, nan, nan, nan ], [ 700, nan, 0.0282, nan, nan, nan, nan ], [ 800, nan, 0.0361, nan, nan, nan, nan ], [ 900, nan, 0.0448, nan, nan, nan, nan ], [ 1000, nan, 0.0547, nan, nan, nan, nan ], [ 2000, nan, 0.2286, nan, nan, nan, nan ], [ 3000, nan, 0.8753, nan, nan, nan, nan ], [ 4000, nan, 1.5114, nan, nan, nan, nan ], [ 5000, nan, 2.4695, nan, nan, nan, nan ], [ 6000, nan, 3.6914, nan, nan, nan, nan ], [ 7000, nan, 5.2513, nan, nan, nan, nan ], [ 8000, nan, 7.1277, nan, nan, nan, nan ], [ 9000, nan, 9.4860, nan, nan, nan, nan ], [ 10000, nan, 12.0984, nan, nan, nan, nan ], [ 12000, nan, 19.1925, nan, nan, nan, nan ], [ 14000, nan, 28.1555, nan, nan, nan, nan ], [ 16000, nan, 39.5701, nan, nan, nan, nan ], [ 18000, nan, 54.4460, nan, nan, nan, nan ], [ 20000, nan, 71.2115, nan, nan, nan, nan ], ]) # numactl --interleave=all ../testing/testing_ssyevd -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_ssyevd -JV -N 123 -N 1234 --range 12000:20000:2000 ssyevd_JV = array([ [ 10, nan, 0.0001, nan, nan, nan, nan ], [ 20, nan, 0.0001, nan, nan, nan, nan ], [ 30, nan, 0.0002, nan, nan, nan, nan ], [ 40, nan, 0.0003, nan, nan, nan, nan ], [ 50, nan, 0.0004, nan, nan, nan, nan ], [ 60, nan, 0.0004, nan, nan, nan, nan ], [ 70, nan, 0.0006, nan, nan, nan, nan ], [ 80, nan, 0.0007, nan, nan, nan, nan ], [ 90, nan, 0.0008, nan, nan, nan, nan ], [ 100, nan, 0.0010, nan, nan, nan, nan ], [ 200, nan, 0.0075, nan, nan, nan, nan ], [ 300, nan, 0.0113, nan, nan, nan, nan ], [ 400, nan, 0.0181, nan, nan, nan, nan ], [ 500, nan, 0.0253, nan, nan, nan, nan ], [ 600, nan, 0.0292, nan, nan, nan, nan ], [ 700, nan, 0.0371, nan, nan, nan, nan ], [ 800, nan, 0.0449, nan, nan, nan, nan ], [ 900, nan, 0.0563, nan, nan, nan, nan ], [ 1000, nan, 0.0668, nan, nan, nan, nan ], [ 2000, nan, 0.2178, nan, nan, nan, nan ], [ 3000, nan, 0.8985, nan, nan, nan, nan ], [ 4000, nan, 1.5710, nan, nan, nan, nan ], [ 5000, nan, 2.5299, nan, nan, nan, nan ], [ 6000, nan, 3.8416, nan, nan, nan, nan ], [ 7000, nan, 5.4748, nan, nan, nan, nan ], [ 8000, nan, 7.3099, nan, nan, nan, nan ], [ 9000, nan, 9.6490, nan, nan, nan, nan ], [ 10000, nan, 12.4513, nan, nan, nan, nan ], [ 12000, nan, 20.1533, nan, nan, nan, nan ], [ 14000, nan, 29.5625, nan, nan, nan, nan ], [ 16000, nan, 41.5526, nan, nan, nan, nan ], [ 18000, nan, 57.5692, nan, nan, nan, nan ], [ 20000, nan, 74.9994, nan, nan, nan, nan ], ]) # numactl --interleave=all ../testing/testing_ssyevd_gpu -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_ssyevd_gpu -JN -N 123 -N 1234 --range 12000:20000:2000 ssyevd_gpu_JN = array([ [ 10, nan, 0.0002, nan, nan, nan, nan ], [ 20, nan, 0.0002, nan, nan, nan, nan ], [ 30, nan, 0.0002, nan, nan, nan, nan ], [ 40, nan, 0.0003, nan, nan, nan, nan ], [ 50, nan, 0.0003, nan, nan, nan, nan ], [ 60, nan, 0.0004, nan, nan, nan, nan ], [ 70, nan, 0.0004, nan, nan, nan, nan ], [ 80, nan, 0.0005, nan, nan, nan, nan ], [ 90, nan, 0.0006, nan, nan, nan, nan ], [ 100, nan, 0.0007, nan, nan, nan, nan ], [ 200, nan, 0.0035, nan, nan, nan, nan ], [ 300, nan, 0.0068, nan, nan, nan, nan ], [ 400, nan, 0.0114, nan, nan, nan, nan ], [ 500, nan, 0.0167, nan, nan, nan, nan ], [ 600, nan, 0.0229, nan, nan, nan, nan ], [ 700, nan, 0.0300, nan, nan, nan, nan ], [ 800, nan, 0.0380, nan, nan, nan, nan ], [ 900, nan, 0.0462, nan, nan, nan, nan ], [ 1000, nan, 0.0571, nan, nan, nan, nan ], [ 2000, nan, 0.2297, nan, nan, nan, nan ], [ 3000, nan, 0.8690, nan, nan, nan, nan ], [ 4000, nan, 1.5042, nan, nan, nan, nan ], [ 5000, nan, 2.4603, nan, nan, nan, nan ], [ 6000, nan, 3.6922, nan, nan, nan, nan ], [ 7000, nan, 5.2239, nan, nan, nan, nan ], [ 8000, nan, 7.1195, nan, nan, nan, nan ], [ 9000, nan, 9.4281, nan, nan, nan, nan ], [ 10000, nan, 12.0485, nan, nan, nan, nan ], [ 12000, nan, 19.1882, nan, nan, nan, nan ], [ 14000, nan, 28.0731, nan, nan, nan, nan ], [ 16000, nan, 39.2928, nan, nan, nan, nan ], [ 18000, nan, 54.2887, nan, nan, nan, nan ], [ 20000, nan, 70.8357, nan, nan, nan, nan ], ]) # numactl --interleave=all ../testing/testing_ssyevd_gpu -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_ssyevd_gpu -JV -N 123 -N 1234 --range 12000:20000:2000 ssyevd_gpu_JV = array([ [ 10, nan, 0.0003, nan, nan, nan, nan ], [ 20, nan, 0.0003, nan, nan, nan, nan ], [ 30, nan, 0.0004, nan, nan, nan, nan ], [ 40, nan, 0.0005, nan, nan, nan, nan ], [ 50, nan, 0.0005, nan, nan, nan, nan ], [ 60, nan, 0.0006, nan, nan, nan, nan ], [ 70, nan, 0.0008, nan, nan, nan, nan ], [ 80, nan, 0.0009, nan, nan, nan, nan ], [ 90, nan, 0.0011, nan, nan, nan, nan ], [ 100, nan, 0.0012, nan, nan, nan, nan ], [ 200, nan, 0.0067, nan, nan, nan, nan ], [ 300, nan, 0.0110, nan, nan, nan, nan ], [ 400, nan, 0.0178, nan, nan, nan, nan ], [ 500, nan, 0.0250, nan, nan, nan, nan ], [ 600, nan, 0.0289, nan, nan, nan, nan ], [ 700, nan, 0.0370, nan, nan, nan, nan ], [ 800, nan, 0.0454, nan, nan, nan, nan ], [ 900, nan, 0.0577, nan, nan, nan, nan ], [ 1000, nan, 0.0684, nan, nan, nan, nan ], [ 2000, nan, 0.2455, nan, nan, nan, nan ], [ 3000, nan, 0.9087, nan, nan, nan, nan ], [ 4000, nan, 1.5867, nan, nan, nan, nan ], [ 5000, nan, 2.5830, nan, nan, nan, nan ], [ 6000, nan, 3.9431, nan, nan, nan, nan ], [ 7000, nan, 5.6448, nan, nan, nan, nan ], [ 8000, nan, 7.7442, nan, nan, nan, nan ], [ 9000, nan, 10.3376, nan, nan, nan, nan ], [ 10000, nan, 13.3178, nan, nan, nan, nan ], [ 12000, nan, 21.3168, nan, nan, nan, nan ], [ 14000, nan, 31.3873, nan, nan, nan, nan ], [ 16000, nan, 44.8046, nan, nan, nan, nan ], [ 18000, nan, 62.8077, nan, nan, nan, nan ], [ 20000, nan, 82.5465, nan, nan, nan, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/ssyevd_2stage.txt # numactl --interleave=all ../testing/testing_ssyevdx_2stage -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 ssyevdx_2stage_JN = array([ [ 10, 10, 0.00 ], [ 20, 20, 0.00 ], [ 30, 30, 0.00 ], [ 40, 40, 0.00 ], [ 50, 50, 0.00 ], [ 60, 60, 0.00 ], [ 70, 70, 0.00 ], [ 80, 80, 0.00 ], [ 90, 90, 0.00 ], [ 100, 100, 0.00 ], [ 200, 200, 0.00 ], [ 300, 300, 0.02 ], [ 400, 400, 0.03 ], [ 500, 500, 0.04 ], [ 600, 600, 0.05 ], [ 700, 700, 0.06 ], [ 800, 800, 0.08 ], [ 900, 900, 0.09 ], [ 1000, 1000, 0.10 ], [ 2000, 2000, 0.29 ], [ 3000, 3000, 0.58 ], [ 4000, 4000, 0.89 ], [ 5000, 5000, 1.27 ], [ 6000, 6000, 1.61 ], [ 7000, 7000, 2.22 ], [ 8000, 8000, 2.73 ], [ 9000, 9000, 3.57 ], [ 10000, 10000, 4.32 ], [ 12000, 12000, 6.14 ], [ 14000, 14000, 8.60 ], [ 16000, 16000, 11.57 ], [ 18000, 18000, 15.06 ], [ 20000, 20000, 19.16 ], ]) # numactl --interleave=all ../testing/testing_ssyevdx_2stage -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 ssyevdx_2stage_JV = array([ [ 10, 10, 0.00 ], [ 20, 20, 0.00 ], [ 30, 30, 0.00 ], [ 40, 40, 0.00 ], [ 50, 50, 0.00 ], [ 60, 60, 0.00 ], [ 70, 70, 0.00 ], [ 80, 80, 0.00 ], [ 90, 90, 0.00 ], [ 100, 100, 0.00 ], [ 200, 200, 0.00 ], [ 300, 300, 0.02 ], [ 400, 400, 0.04 ], [ 500, 500, 0.05 ], [ 600, 600, 0.06 ], [ 700, 700, 0.08 ], [ 800, 800, 0.10 ], [ 900, 900, 0.11 ], [ 1000, 1000, 0.13 ], [ 2000, 2000, 0.38 ], [ 3000, 3000, 0.75 ], [ 4000, 4000, 1.30 ], [ 5000, 5000, 1.99 ], [ 6000, 6000, 2.72 ], [ 7000, 7000, 3.83 ], [ 8000, 8000, 5.36 ], [ 9000, 9000, 6.90 ], [ 10000, 10000, 8.89 ], [ 12000, 12000, 14.34 ], [ 14000, 14000, 20.46 ], [ 16000, 16000, 29.42 ], [ 18000, 18000, 40.68 ], [ 20000, 20000, 54.31 ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/ssymv.txt # numactl --interleave=all ../testing/testing_ssymv -L -N 123 -N 1234 --range 10:90:1 --range 100:900:10 --range 1000:9000:100 --range 10000:20000:2000 ssymv_L = array([ [ 10, 0.01, 0.03, 0.01, 0.03, 0.01, 0.02, 0.12, 0.00, 4.77e-08, 4.77e-08, 4.77e-08, nan ], [ 11, 0.01, 0.03, 0.01, 0.03, 0.02, 0.02, 0.12, 0.00, 4.33e-08, 8.67e-08, 4.33e-08, nan ], [ 12, 0.01, 0.03, 0.01, 0.03, 0.02, 0.02, 0.15, 0.00, 3.97e-08, 1.99e-08, 3.97e-08, nan ], [ 13, 0.01, 0.03, 0.01, 0.03, 0.02, 0.02, 0.17, 0.00, 3.67e-08, 3.67e-08, 7.34e-08, nan ], [ 14, 0.02, 0.03, 0.01, 0.03, 0.02, 0.02, 0.22, 0.00, 6.81e-08, 3.41e-08, 6.81e-08, nan ], [ 15, 0.02, 0.03, 0.02, 0.03, 0.03, 0.02, 0.22, 0.00, 6.36e-08, 6.36e-08, 6.36e-08, nan ], [ 16, 0.02, 0.03, 0.02, 0.03, 0.03, 0.02, 0.29, 0.00, 5.96e-08, 5.96e-08, 5.96e-08, nan ], [ 17, 0.02, 0.03, 0.02, 0.03, 0.03, 0.02, 0.20, 0.00, 1.12e-07, 5.61e-08, 5.61e-08, nan ], [ 18, 0.02, 0.03, 0.02, 0.03, 0.03, 0.02, 0.24, 0.00, 5.30e-08, 5.30e-08, 5.30e-08, nan ], [ 19, 0.03, 0.03, 0.02, 0.03, 0.04, 0.02, 0.40, 0.00, 5.02e-08, 5.02e-08, 5.02e-08, nan ], [ 20, 0.03, 0.03, 0.03, 0.03, 0.04, 0.02, 0.27, 0.00, 7.15e-08, 4.77e-08, 7.15e-08, nan ], [ 21, 0.03, 0.03, 0.03, 0.03, 0.05, 0.02, 0.30, 0.00, 9.08e-08, 1.36e-07, 6.81e-08, nan ], [ 22, 0.04, 0.03, 0.03, 0.03, 0.05, 0.02, 0.53, 0.00, 4.33e-08, 8.67e-08, 4.33e-08, nan ], [ 23, 0.04, 0.03, 0.03, 0.03, 0.06, 0.02, 0.36, 0.00, 8.29e-08, 8.29e-08, 8.29e-08, nan ], [ 24, 0.04, 0.03, 0.04, 0.03, 0.06, 0.02, 0.63, 0.00, 7.95e-08, 7.95e-08, 7.95e-08, nan ], [ 25, 0.04, 0.03, 0.04, 0.03, 0.06, 0.02, 0.68, 0.00, 7.63e-08, 7.63e-08, 3.81e-08, nan ], [ 26, 0.05, 0.03, 0.04, 0.03, 0.07, 0.02, 0.45, 0.00, 7.34e-08, 7.34e-08, 3.67e-08, nan ], [ 27, 0.05, 0.03, 0.05, 0.03, 0.07, 0.02, 0.53, 0.00, 7.06e-08, 7.06e-08, 7.06e-08, nan ], [ 28, 0.06, 0.03, 0.05, 0.03, 0.08, 0.02, 0.76, 0.00, 3.41e-08, 6.81e-08, 6.81e-08, nan ], [ 29, 0.06, 0.03, 0.05, 0.03, 0.08, 0.02, 0.56, 0.00, 9.87e-08, 1.32e-07, 6.58e-08, nan ], [ 30, 0.07, 0.03, 0.06, 0.03, 0.09, 0.02, 0.46, 0.00, 6.36e-08, 6.36e-08, 6.36e-08, nan ], [ 31, 0.07, 0.03, 0.06, 0.03, 0.09, 0.02, 0.69, 0.00, 6.15e-08, 9.23e-08, 9.23e-08, nan ], [ 32, 0.07, 0.03, 0.06, 0.03, 0.11, 0.02, 0.74, 0.00, 5.96e-08, 5.96e-08, 5.96e-08, nan ], [ 33, 0.08, 0.03, 0.07, 0.03, 0.11, 0.02, 0.72, 0.00, 5.78e-08, 5.78e-08, 5.78e-08, nan ], [ 34, 0.09, 0.03, 0.07, 0.03, 0.11, 0.02, 0.83, 0.00, 1.12e-07, 1.12e-07, 1.12e-07, nan ], [ 35, 0.10, 0.03, 0.08, 0.03, 0.11, 0.02, 0.88, 0.00, 5.45e-08, 5.45e-08, 8.17e-08, nan ], [ 36, 0.10, 0.03, 0.08, 0.03, 0.13, 0.02, 0.66, 0.00, 7.95e-08, 5.30e-08, 7.95e-08, nan ], [ 37, 0.11, 0.03, 0.08, 0.03, 0.13, 0.02, 0.69, 0.00, 7.73e-08, 5.15e-08, 7.73e-08, nan ], [ 38, 0.11, 0.03, 0.09, 0.03, 0.14, 0.02, 0.73, 0.00, 7.53e-08, 1.00e-07, 1.00e-07, nan ], [ 39, 0.11, 0.03, 0.09, 0.03, 0.15, 0.02, 0.77, 0.00, 4.89e-08, 4.89e-08, 4.89e-08, nan ], [ 40, 0.12, 0.03, 0.10, 0.03, 0.14, 0.02, 0.81, 0.00, 9.54e-08, 9.54e-08, 9.54e-08, nan ], [ 41, 0.13, 0.03, 0.10, 0.04, 0.15, 0.02, 1.11, 0.00, 6.98e-08, 9.30e-08, 6.98e-08, nan ], [ 42, 0.12, 0.03, 0.11, 0.03, 0.16, 0.02, 0.95, 0.00, 6.81e-08, 4.54e-08, 6.81e-08, nan ], [ 43, 0.14, 0.03, 0.11, 0.03, 0.17, 0.02, 0.93, 0.00, 8.87e-08, 8.87e-08, 8.87e-08, nan ], [ 44, 0.15, 0.03, 0.11, 0.04, 0.18, 0.02, 0.98, 0.00, 1.08e-07, 1.08e-07, 6.50e-08, nan ], [ 45, 0.14, 0.03, 0.12, 0.03, 0.18, 0.02, 1.09, 0.00, 8.48e-08, 6.36e-08, 8.48e-08, nan ], [ 46, 0.16, 0.03, 0.13, 0.03, 0.19, 0.02, 1.07, 0.00, 8.29e-08, 8.29e-08, 8.29e-08, nan ], [ 47, 0.16, 0.03, 0.13, 0.03, 0.21, 0.02, 1.11, 0.00, 1.01e-07, 1.22e-07, 8.12e-08, nan ], [ 48, 0.16, 0.03, 0.14, 0.03, 0.20, 0.02, 1.16, 0.00, 7.95e-08, 7.95e-08, 7.95e-08, nan ], [ 49, 0.17, 0.03, 0.14, 0.03, 0.20, 0.02, 1.21, 0.00, 7.79e-08, 7.79e-08, 7.79e-08, nan ], [ 50, 0.18, 0.03, 0.15, 0.04, 0.21, 0.02, 1.26, 0.00, 1.14e-07, 7.63e-08, 7.63e-08, nan ], [ 51, 0.20, 0.03, 0.16, 0.03, 0.22, 0.02, 1.31, 0.00, 7.48e-08, 1.12e-07, 7.48e-08, nan ], [ 52, 0.19, 0.03, 0.16, 0.03, 0.24, 0.02, 1.10, 0.01, 1.10e-07, 1.10e-07, 1.47e-07, nan ], [ 53, 0.20, 0.03, 0.17, 0.03, 0.23, 0.03, 1.14, 0.01, 1.08e-07, 1.08e-07, 7.20e-08, nan ], [ 54, 0.20, 0.03, 0.17, 0.03, 0.26, 0.02, 1.19, 0.01, 7.06e-08, 1.06e-07, 7.06e-08, nan ], [ 55, 0.22, 0.03, 0.18, 0.03, 0.26, 0.02, 1.23, 0.01, 6.94e-08, 6.94e-08, 6.94e-08, nan ], [ 56, 0.23, 0.03, 0.19, 0.03, 0.27, 0.02, 1.58, 0.00, 6.81e-08, 6.81e-08, 6.81e-08, nan ], [ 57, 0.23, 0.03, 0.19, 0.03, 0.28, 0.02, 1.32, 0.01, 6.69e-08, 6.69e-08, 6.69e-08, nan ], [ 58, 0.23, 0.03, 0.20, 0.04, 0.27, 0.03, 1.37, 0.01, 6.58e-08, 6.58e-08, 6.58e-08, nan ], [ 59, 0.27, 0.03, 0.22, 0.03, 0.29, 0.02, 1.75, 0.00, 6.47e-08, 9.70e-08, 9.70e-08, nan ], [ 60, 0.28, 0.03, 0.21, 0.03, 0.32, 0.02, 1.46, 0.01, 9.54e-08, 9.54e-08, 9.54e-08, nan ], [ 61, 0.29, 0.03, 0.22, 0.03, 0.32, 0.02, 1.22, 0.01, 9.38e-08, 9.38e-08, 1.25e-07, nan ], [ 62, 0.29, 0.03, 0.23, 0.03, 0.32, 0.02, 1.64, 0.00, 9.23e-08, 9.23e-08, 9.23e-08, nan ], [ 63, 0.31, 0.03, 0.24, 0.03, 0.32, 0.03, 1.35, 0.01, 9.08e-08, 9.08e-08, 9.08e-08, nan ], [ 64, 0.33, 0.03, 0.25, 0.03, 0.35, 0.02, 2.05, 0.00, 8.94e-08, 8.94e-08, 8.94e-08, nan ], [ 65, 0.28, 0.03, 0.21, 0.04, 0.34, 0.03, 1.71, 0.01, 1.47e-07, 1.47e-07, 1.47e-07, nan ], [ 66, 0.29, 0.03, 0.22, 0.04, 0.33, 0.03, 2.18, 0.00, 1.44e-07, 1.73e-07, 1.44e-07, nan ], [ 67, 0.29, 0.03, 0.23, 0.04, 0.34, 0.03, 1.82, 0.01, 1.42e-07, 8.54e-08, 8.54e-08, nan ], [ 68, 0.27, 0.04, 0.21, 0.05, 0.31, 0.03, 1.87, 0.01, 1.12e-07, 8.41e-08, 1.40e-07, nan ], [ 69, 0.28, 0.03, 0.24, 0.04, 0.31, 0.03, 1.93, 0.01, 8.29e-08, 8.29e-08, 1.11e-07, nan ], [ 70, 0.32, 0.03, 0.25, 0.04, 0.37, 0.03, 1.67, 0.01, 1.09e-07, 8.17e-08, 8.17e-08, nan ], [ 71, 0.34, 0.03, 0.26, 0.04, 0.38, 0.03, 2.52, 0.00, 1.61e-07, 1.07e-07, 1.07e-07, nan ], [ 72, 0.32, 0.03, 0.26, 0.04, 0.40, 0.03, 2.10, 0.01, 1.06e-07, 1.06e-07, 1.06e-07, nan ], [ 73, 0.35, 0.03, 0.26, 0.04, 0.42, 0.03, 2.16, 0.01, 1.57e-07, 1.05e-07, 1.05e-07, nan ], [ 74, 0.34, 0.03, 0.28, 0.04, 0.41, 0.03, 2.22, 0.01, 7.73e-08, 5.15e-08, 7.73e-08, nan ], [ 75, 0.34, 0.03, 0.28, 0.04, 0.42, 0.03, 2.28, 0.01, 1.02e-07, 7.63e-08, 1.02e-07, nan ], [ 76, 0.38, 0.03, 0.29, 0.04, 0.45, 0.03, 1.96, 0.01, 1.00e-07, 1.00e-07, 7.53e-08, nan ], [ 77, 0.38, 0.03, 0.30, 0.04, 0.45, 0.03, 2.02, 0.01, 7.43e-08, 7.43e-08, 9.91e-08, nan ], [ 78, 0.37, 0.03, 0.30, 0.04, 0.47, 0.03, 2.07, 0.01, 9.78e-08, 9.78e-08, 9.78e-08, nan ], [ 79, 0.41, 0.03, 0.32, 0.04, 0.47, 0.03, 1.77, 0.01, 1.45e-07, 9.66e-08, 9.66e-08, nan ], [ 80, 0.39, 0.03, 0.32, 0.04, 0.48, 0.03, 2.59, 0.01, 9.54e-08, 9.54e-08, 9.54e-08, nan ], [ 81, 0.43, 0.03, 0.33, 0.04, 0.43, 0.03, 2.65, 0.01, 9.42e-08, 9.42e-08, 1.41e-07, nan ], [ 82, 0.44, 0.03, 0.33, 0.04, 0.51, 0.03, 2.28, 0.01, 1.16e-07, 9.30e-08, 9.30e-08, nan ], [ 83, 0.46, 0.03, 0.35, 0.04, 0.52, 0.03, 2.25, 0.01, 9.19e-08, 9.19e-08, 6.89e-08, nan ], [ 84, 0.46, 0.03, 0.36, 0.04, 0.53, 0.03, 2.40, 0.01, 9.08e-08, 1.36e-07, 9.08e-08, nan ], [ 85, 0.46, 0.03, 0.37, 0.04, 0.56, 0.03, 2.36, 0.01, 1.12e-07, 1.12e-07, 1.12e-07, nan ], [ 86, 0.47, 0.03, 0.38, 0.04, 0.58, 0.03, 2.09, 0.01, 1.33e-07, 8.87e-08, 8.87e-08, nan ], [ 87, 0.46, 0.03, 0.38, 0.04, 0.58, 0.03, 2.21, 0.01, 8.77e-08, 1.32e-07, 1.32e-07, nan ], [ 88, 0.51, 0.03, 0.39, 0.04, 0.56, 0.03, 2.63, 0.01, 1.30e-07, 1.30e-07, 1.30e-07, nan ], [ 89, 0.49, 0.03, 0.40, 0.04, 0.62, 0.03, 2.32, 0.01, 8.57e-08, 1.29e-07, 8.57e-08, nan ], [ 90, 0.51, 0.03, 0.41, 0.04, 0.53, 0.03, 2.64, 0.01, 8.48e-08, 8.48e-08, 8.48e-08, nan ], [ 100, 0.68, 0.03, 0.50, 0.04, 0.72, 0.03, 2.49, 0.01, 1.14e-07, 1.14e-07, 1.14e-07, nan ], [ 110, 0.76, 0.03, 0.60, 0.04, 0.84, 0.03, 2.70, 0.01, 1.04e-07, 1.04e-07, 1.04e-07, nan ], [ 120, 0.97, 0.03, 0.71, 0.04, 1.00, 0.03, 4.20, 0.01, 1.27e-07, 1.27e-07, 1.27e-07, nan ], [ 130, 0.95, 0.04, 0.83, 0.04, 1.10, 0.03, 4.76, 0.01, 1.76e-07, 1.76e-07, 1.47e-07, nan ], [ 140, 1.06, 0.04, 0.96, 0.04, 1.24, 0.03, 4.87, 0.01, 1.36e-07, 1.36e-07, 1.36e-07, nan ], [ 150, 1.23, 0.04, 1.05, 0.04, 1.29, 0.04, 5.59, 0.01, 2.03e-07, 1.53e-07, 1.27e-07, nan ], [ 160, 1.36, 0.04, 1.19, 0.04, 1.61, 0.03, 4.70, 0.01, 1.43e-07, 1.43e-07, 1.43e-07, nan ], [ 170, 1.57, 0.04, 1.33, 0.04, 1.71, 0.03, 4.43, 0.01, 1.80e-07, 1.35e-07, 1.80e-07, nan ], [ 180, 1.76, 0.04, 1.45, 0.05, 1.67, 0.04, 5.47, 0.01, 1.48e-07, 1.91e-07, 1.48e-07, nan ], [ 190, 1.91, 0.04, 1.65, 0.04, 2.14, 0.03, 6.09, 0.01, 2.01e-07, 1.61e-07, 1.61e-07, nan ], [ 200, 1.96, 0.04, 1.78, 0.05, 2.23, 0.04, 8.03, 0.01, 2.29e-07, 2.29e-07, 1.91e-07, nan ], [ 210, 2.01, 0.04, 2.01, 0.04, 2.46, 0.04, 7.91, 0.01, 1.82e-07, 1.45e-07, 1.45e-07, nan ], [ 220, 2.37, 0.04, 2.20, 0.04, 2.70, 0.04, 8.16, 0.01, 2.43e-07, 2.43e-07, 2.08e-07, nan ], [ 230, 2.59, 0.04, 2.41, 0.04, 2.95, 0.04, 7.55, 0.01, 2.65e-07, 2.32e-07, 2.32e-07, nan ], [ 240, 2.68, 0.04, 2.58, 0.04, 3.21, 0.04, 8.82, 0.01, 2.86e-07, 2.54e-07, 2.54e-07, nan ], [ 250, 3.06, 0.04, 2.51, 0.05, 3.31, 0.04, 7.41, 0.02, 1.53e-07, 1.53e-07, 1.83e-07, nan ], [ 260, 2.95, 0.05, 2.95, 0.05, 3.39, 0.04, 4.13, 0.03, 2.64e-07, 2.05e-07, 2.64e-07, nan ], [ 270, 3.18, 0.05, 3.18, 0.05, 3.65, 0.04, 3.77, 0.04, 2.54e-07, 2.83e-07, 2.83e-07, nan ], [ 280, 3.27, 0.05, 3.35, 0.05, 3.95, 0.04, 4.37, 0.04, 3.27e-07, 3.00e-07, 3.00e-07, nan ], [ 290, 3.67, 0.05, 3.59, 0.05, 4.02, 0.04, 4.12, 0.04, 3.16e-07, 2.63e-07, 3.16e-07, nan ], [ 300, 4.03, 0.04, 3.92, 0.05, 4.30, 0.04, 4.89, 0.04, 2.54e-07, 2.54e-07, 2.54e-07, nan ], [ 310, 4.19, 0.05, 4.00, 0.05, 4.60, 0.04, 4.28, 0.05, 2.46e-07, 2.46e-07, 2.21e-07, nan ], [ 320, 4.37, 0.05, 4.37, 0.05, 4.90, 0.04, 5.16, 0.04, 2.86e-07, 2.86e-07, 2.38e-07, nan ], [ 330, 4.30, 0.05, 4.56, 0.05, 4.95, 0.04, 4.75, 0.05, 2.54e-07, 2.31e-07, 2.31e-07, nan ], [ 340, 4.38, 0.05, 4.84, 0.05, 5.40, 0.04, 4.63, 0.05, 3.59e-07, 4.04e-07, 3.59e-07, nan ], [ 350, 4.91, 0.05, 5.10, 0.05, 5.73, 0.04, 4.62, 0.05, 2.18e-07, 2.18e-07, 2.18e-07, nan ], [ 360, 5.19, 0.05, 5.29, 0.05, 5.65, 0.05, 5.19, 0.05, 2.54e-07, 2.54e-07, 2.54e-07, nan ], [ 370, 5.51, 0.05, 5.59, 0.05, 6.09, 0.05, 4.98, 0.06, 2.89e-07, 2.47e-07, 2.89e-07, nan ], [ 380, 5.57, 0.05, 5.68, 0.05, 6.29, 0.05, 5.35, 0.05, 2.41e-07, 3.21e-07, 2.81e-07, nan ], [ 390, 5.64, 0.05, 6.24, 0.05, 6.49, 0.05, 6.46, 0.05, 3.13e-07, 2.35e-07, 2.35e-07, nan ], [ 400, 3.61, 0.09, 6.41, 0.05, 6.53, 0.05, 7.12, 0.05, 2.67e-07, 3.05e-07, 2.67e-07, nan ], [ 410, 6.15, 0.05, 6.76, 0.05, 7.03, 0.05, 6.86, 0.05, 2.98e-07, 2.61e-07, 2.61e-07, nan ], [ 420, 6.31, 0.06, 6.93, 0.05, 7.06, 0.05, 7.53, 0.05, 2.54e-07, 2.54e-07, 2.54e-07, nan ], [ 430, 6.76, 0.05, 7.44, 0.05, 7.55, 0.05, 7.26, 0.05, 3.19e-07, 3.55e-07, 3.19e-07, nan ], [ 440, 6.93, 0.06, 7.61, 0.05, 7.90, 0.05, 8.61, 0.05, 2.77e-07, 2.77e-07, 2.43e-07, nan ], [ 450, 6.65, 0.06, 7.81, 0.05, 7.81, 0.05, 6.65, 0.06, 2.71e-07, 2.71e-07, 2.71e-07, nan ], [ 460, 7.17, 0.06, 8.31, 0.05, 8.51, 0.05, 8.16, 0.05, 2.99e-07, 2.99e-07, 2.65e-07, nan ], [ 470, 7.37, 0.06, 8.33, 0.05, 8.36, 0.05, 7.77, 0.06, 3.57e-07, 3.57e-07, 3.57e-07, nan ], [ 480, 7.57, 0.06, 8.88, 0.05, 8.88, 0.05, 8.88, 0.05, 3.50e-07, 3.81e-07, 3.50e-07, nan ], [ 490, 7.62, 0.06, 9.05, 0.05, 9.09, 0.05, 8.44, 0.06, 3.74e-07, 3.43e-07, 3.43e-07, nan ], [ 500, 7.96, 0.06, 9.47, 0.05, 9.14, 0.05, 7.05, 0.07, 3.66e-07, 4.27e-07, 3.97e-07, nan ], [ 510, 8.68, 0.06, 9.85, 0.05, 9.30, 0.06, 6.96, 0.07, 3.29e-07, 3.59e-07, 3.59e-07, nan ], [ 520, 8.48, 0.06, 10.01, 0.05, 9.51, 0.06, 9.84, 0.06, 2.93e-07, 2.93e-07, 2.93e-07, nan ], [ 530, 8.81, 0.06, 10.63, 0.05, 9.37, 0.06, 9.68, 0.06, 3.17e-07, 3.17e-07, 3.17e-07, nan ], [ 540, 9.28, 0.06, 11.04, 0.05, 9.72, 0.06, 10.47, 0.06, 3.67e-07, 3.39e-07, 3.39e-07, nan ], [ 550, 9.31, 0.07, 11.25, 0.05, 9.63, 0.06, 10.59, 0.06, 3.61e-07, 3.61e-07, 3.61e-07, nan ], [ 560, 9.94, 0.06, 11.61, 0.05, 10.29, 0.06, 10.85, 0.06, 3.27e-07, 3.27e-07, 3.00e-07, nan ], [ 570, 9.86, 0.07, 11.62, 0.06, 10.71, 0.06, 10.00, 0.07, 3.75e-07, 3.48e-07, 3.75e-07, nan ], [ 580, 9.49, 0.07, 12.03, 0.06, 10.35, 0.07, 10.39, 0.06, 3.42e-07, 3.42e-07, 3.42e-07, nan ], [ 590, 9.98, 0.07, 12.45, 0.06, 10.71, 0.07, 10.26, 0.07, 4.14e-07, 3.88e-07, 3.62e-07, nan ], [ 600, 10.02, 0.07, 12.87, 0.06, 11.29, 0.06, 10.15, 0.07, 3.81e-07, 3.56e-07, 3.56e-07, nan ], [ 610, 10.49, 0.07, 12.81, 0.06, 10.97, 0.07, 10.22, 0.07, 3.25e-07, 3.50e-07, 3.25e-07, nan ], [ 620, 10.84, 0.07, 13.08, 0.06, 11.33, 0.07, 9.76, 0.08, 3.94e-07, 3.69e-07, 3.94e-07, nan ], [ 630, 11.34, 0.07, 13.50, 0.06, 11.70, 0.07, 10.20, 0.08, 3.63e-07, 2.91e-07, 3.15e-07, nan ], [ 640, 11.25, 0.07, 14.40, 0.06, 12.07, 0.07, 11.55, 0.07, 4.29e-07, 4.05e-07, 4.05e-07, nan ], [ 650, 11.27, 0.08, 14.14, 0.06, 11.91, 0.07, 10.86, 0.08, 3.52e-07, 3.52e-07, 3.05e-07, nan ], [ 660, 11.81, 0.07, 14.76, 0.06, 12.12, 0.07, 11.96, 0.07, 3.93e-07, 3.93e-07, 3.70e-07, nan ], [ 670, 11.82, 0.08, 14.97, 0.06, 12.13, 0.07, 11.68, 0.08, 4.10e-07, 3.42e-07, 3.64e-07, nan ], [ 680, 11.88, 0.08, 15.48, 0.06, 12.86, 0.07, 12.18, 0.08, 4.04e-07, 4.04e-07, 3.59e-07, nan ], [ 690, 12.38, 0.08, 15.87, 0.06, 12.90, 0.07, 11.63, 0.08, 5.31e-07, 5.31e-07, 4.87e-07, nan ], [ 700, 12.74, 0.08, 16.14, 0.06, 13.07, 0.08, 12.11, 0.08, 3.71e-07, 3.49e-07, 3.27e-07, nan ], [ 710, 12.60, 0.08, 16.80, 0.06, 13.27, 0.08, 12.45, 0.08, 3.44e-07, 3.44e-07, 3.44e-07, nan ], [ 720, 13.00, 0.08, 17.01, 0.06, 13.48, 0.08, 13.16, 0.08, 4.24e-07, 4.24e-07, 4.66e-07, nan ], [ 730, 13.01, 0.08, 17.49, 0.06, 14.03, 0.08, 12.72, 0.08, 5.02e-07, 4.60e-07, 4.60e-07, nan ], [ 740, 13.22, 0.08, 17.97, 0.06, 14.02, 0.08, 12.60, 0.09, 4.12e-07, 4.12e-07, 4.12e-07, nan ], [ 750, 13.74, 0.08, 18.82, 0.06, 14.27, 0.08, 12.67, 0.09, 3.66e-07, 3.66e-07, 3.66e-07, nan ], [ 760, 13.94, 0.08, 18.66, 0.06, 14.66, 0.08, 13.01, 0.09, 4.02e-07, 4.02e-07, 4.02e-07, nan ], [ 770, 13.32, 0.09, 18.51, 0.06, 14.48, 0.08, 12.24, 0.10, 6.74e-07, 6.34e-07, 5.94e-07, nan ], [ 780, 13.52, 0.09, 18.72, 0.07, 15.03, 0.08, 12.71, 0.10, 4.30e-07, 3.91e-07, 3.91e-07, nan ], [ 790, 14.36, 0.09, 20.16, 0.06, 15.46, 0.08, 13.58, 0.09, 4.25e-07, 4.25e-07, 3.86e-07, nan ], [ 800, 14.73, 0.09, 20.06, 0.06, 15.45, 0.08, 13.21, 0.10, 4.58e-07, 4.20e-07, 4.58e-07, nan ], [ 810, 14.62, 0.09, 20.49, 0.06, 15.61, 0.08, 13.67, 0.10, 4.90e-07, 3.77e-07, 3.77e-07, nan ], [ 820, 15.14, 0.09, 20.39, 0.07, 16.04, 0.08, 14.33, 0.09, 3.72e-07, 3.72e-07, 3.72e-07, nan ], [ 830, 15.51, 0.09, 20.89, 0.07, 16.44, 0.08, 13.15, 0.10, 4.04e-07, 4.41e-07, 4.04e-07, nan ], [ 840, 15.04, 0.09, 21.09, 0.07, 16.42, 0.09, 14.42, 0.10, 4.00e-07, 4.00e-07, 4.00e-07, nan ], [ 850, 15.56, 0.09, 21.29, 0.07, 17.04, 0.08, 14.45, 0.10, 5.39e-07, 5.03e-07, 5.03e-07, nan ], [ 860, 15.41, 0.10, 22.10, 0.07, 17.02, 0.09, 14.35, 0.10, 5.32e-07, 5.32e-07, 5.32e-07, nan ], [ 870, 16.13, 0.09, 21.92, 0.07, 17.23, 0.09, 14.58, 0.10, 3.86e-07, 4.21e-07, 3.86e-07, nan ], [ 880, 16.14, 0.10, 22.82, 0.07, 17.62, 0.09, 13.87, 0.11, 4.51e-07, 4.16e-07, 4.16e-07, nan ], [ 890, 16.88, 0.09, 22.94, 0.07, 17.79, 0.09, 14.15, 0.11, 4.80e-07, 4.80e-07, 4.80e-07, nan ], [ 900, 15.60, 0.10, 23.14, 0.07, 17.81, 0.09, 13.42, 0.12, 3.73e-07, 4.41e-07, 4.07e-07, nan ], [ 1000, 18.33, 0.11, 27.44, 0.07, 19.62, 0.10, 14.81, 0.14, 6.71e-07, 6.41e-07, 6.10e-07, nan ], [ 1100, 19.39, 0.12, 30.24, 0.08, 21.62, 0.11, 15.14, 0.16, 5.55e-07, 5.83e-07, 5.83e-07, nan ], [ 1200, 21.98, 0.13, 34.74, 0.08, 24.23, 0.12, 16.38, 0.18, 6.61e-07, 6.36e-07, 5.85e-07, nan ], [ 1300, 23.33, 0.14, 37.63, 0.09, 26.42, 0.13, 15.57, 0.22, 5.87e-07, 5.63e-07, 5.40e-07, nan ], [ 1400, 25.95, 0.15, 42.19, 0.09, 29.07, 0.13, 17.45, 0.22, 5.67e-07, 5.67e-07, 5.23e-07, nan ], [ 1500, 27.45, 0.16, 46.41, 0.10, 29.24, 0.15, 16.03, 0.28, 6.51e-07, 5.70e-07, 6.10e-07, nan ], [ 1600, 29.60, 0.17, 50.68, 0.10, 31.60, 0.16, 17.14, 0.30, 6.10e-07, 6.10e-07, 6.48e-07, nan ], [ 1700, 31.26, 0.19, 54.03, 0.11, 33.64, 0.17, 17.58, 0.33, 6.46e-07, 6.10e-07, 5.74e-07, nan ], [ 1800, 33.41, 0.19, 57.86, 0.11, 35.46, 0.18, 16.80, 0.39, 8.14e-07, 8.48e-07, 8.14e-07, nan ], [ 1900, 35.07, 0.21, 60.24, 0.12, 37.83, 0.19, 18.01, 0.40, 7.39e-07, 7.39e-07, 7.07e-07, nan ], [ 2000, 37.05, 0.22, 59.31, 0.13, 36.73, 0.22, 18.70, 0.43, 7.32e-07, 8.54e-07, 8.85e-07, nan ], [ 2100, 37.88, 0.23, 63.48, 0.14, 24.37, 0.36, 17.79, 0.50, 8.43e-07, 7.85e-07, 7.85e-07, nan ], [ 2200, 39.71, 0.24, 66.81, 0.14, 25.21, 0.38, 18.51, 0.52, 7.21e-07, 7.77e-07, 8.05e-07, nan ], [ 2300, 41.84, 0.25, 69.15, 0.15, 26.13, 0.41, 18.97, 0.56, 8.49e-07, 7.70e-07, 7.70e-07, nan ], [ 2400, 43.35, 0.27, 73.02, 0.16, 27.19, 0.42, 20.99, 0.55, 6.36e-07, 6.87e-07, 7.12e-07, nan ], [ 2500, 44.98, 0.28, 76.68, 0.16, 28.05, 0.45, 21.52, 0.58, 9.03e-07, 8.06e-07, 8.06e-07, nan ], [ 2600, 47.27, 0.29, 79.56, 0.17, 28.97, 0.47, 21.64, 0.63, 8.92e-07, 8.45e-07, 8.45e-07, nan ], [ 2700, 48.44, 0.30, 83.35, 0.17, 30.08, 0.48, 21.33, 0.68, 7.69e-07, 7.01e-07, 6.78e-07, nan ], [ 2800, 51.93, 0.30, 88.07, 0.18, 31.43, 0.50, 21.81, 0.72, 9.37e-07, 9.37e-07, 8.72e-07, nan ], [ 2900, 52.12, 0.32, 89.56, 0.19, 32.22, 0.52, 21.57, 0.78, 1.05e-06, 1.05e-06, 1.05e-06, nan ], [ 3000, 53.75, 0.33, 92.33, 0.20, 33.91, 0.53, 21.46, 0.84, 9.36e-07, 8.95e-07, 7.73e-07, nan ], [ 3100, 55.88, 0.34, 97.16, 0.20, 34.21, 0.56, 22.43, 0.86, 9.06e-07, 9.84e-07, 9.45e-07, nan ], [ 3200, 57.71, 0.36, 98.43, 0.21, 35.39, 0.58, 22.56, 0.91, 9.16e-07, 8.77e-07, 9.16e-07, nan ], [ 3300, 59.38, 0.37, 100.86, 0.22, 36.26, 0.60, 23.13, 0.94, 9.62e-07, 9.62e-07, 9.25e-07, nan ], [ 3400, 61.86, 0.37, 103.19, 0.22, 37.42, 0.62, 22.79, 1.01, 1.15e-06, 1.11e-06, 1.15e-06, nan ], [ 3500, 62.68, 0.39, 107.97, 0.23, 38.83, 0.63, 23.72, 1.03, 8.72e-07, 9.42e-07, 8.72e-07, nan ], [ 3600, 64.35, 0.40, 110.74, 0.23, 39.34, 0.66, 23.92, 1.08, 1.19e-06, 1.15e-06, 1.12e-06, nan ], [ 3700, 66.63, 0.41, 109.92, 0.25, 40.28, 0.68, 23.69, 1.16, 8.58e-07, 8.91e-07, 8.91e-07, nan ], [ 3800, 68.61, 0.42, 111.98, 0.26, 41.27, 0.70, 23.66, 1.22, 1.09e-06, 1.03e-06, 1.06e-06, nan ], [ 3900, 68.84, 0.44, 110.21, 0.28, 42.50, 0.72, 23.75, 1.28, 1.41e-06, 1.28e-06, 1.31e-06, nan ], [ 4000, 69.45, 0.46, 111.14, 0.29, 43.43, 0.74, 22.80, 1.40, 1.13e-06, 1.16e-06, 1.10e-06, nan ], [ 4100, 70.66, 0.48, 111.76, 0.30, 31.34, 1.07, 23.47, 1.43, 1.13e-06, 1.10e-06, 1.07e-06, nan ], [ 4200, 72.31, 0.49, 114.91, 0.31, 32.71, 1.08, 23.49, 1.50, 1.13e-06, 1.13e-06, 1.13e-06, nan ], [ 4300, 74.12, 0.50, 112.02, 0.33, 33.75, 1.10, 23.96, 1.54, 1.02e-06, 1.08e-06, 1.05e-06, nan ], [ 4400, 75.94, 0.51, 113.59, 0.34, 34.42, 1.13, 24.76, 1.56, 1.25e-06, 1.22e-06, 1.33e-06, nan ], [ 4500, 77.76, 0.52, 114.11, 0.36, 35.41, 1.14, 24.67, 1.64, 1.17e-06, 1.09e-06, 1.09e-06, nan ], [ 4600, 80.34, 0.53, 114.10, 0.37, 36.06, 1.17, 23.39, 1.81, 1.41e-06, 1.51e-06, 1.49e-06, nan ], [ 4700, 81.22, 0.54, 117.53, 0.38, 36.55, 1.21, 24.15, 1.83, 1.40e-06, 1.22e-06, 1.27e-06, nan ], [ 4800, 82.72, 0.56, 115.20, 0.40, 37.44, 1.23, 23.82, 1.94, 1.22e-06, 1.09e-06, 1.12e-06, nan ], [ 4900, 80.74, 0.59, 114.92, 0.42, 38.18, 1.26, 24.18, 1.99, 1.35e-06, 1.20e-06, 1.15e-06, nan ], [ 5000, 81.46, 0.61, 114.94, 0.44, 38.95, 1.28, 24.09, 2.08, 1.07e-06, 1.07e-06, 1.05e-06, nan ], [ 5100, 81.80, 0.64, 116.70, 0.45, 39.63, 1.31, 24.99, 2.08, 1.20e-06, 1.32e-06, 1.24e-06, nan ], [ 5200, 81.70, 0.66, 116.05, 0.47, 40.07, 1.35, 24.96, 2.17, 1.29e-06, 1.46e-06, 1.34e-06, nan ], [ 5300, 81.07, 0.69, 115.87, 0.48, 40.95, 1.37, 25.50, 2.20, 1.20e-06, 1.27e-06, 1.15e-06, nan ], [ 5400, 81.93, 0.71, 121.72, 0.48, 40.62, 1.44, 25.02, 2.33, 1.54e-06, 1.60e-06, 1.58e-06, nan ], [ 5500, 82.32, 0.74, 111.02, 0.55, 42.41, 1.43, 25.21, 2.40, 1.40e-06, 1.46e-06, 1.35e-06, nan ], [ 5600, 83.08, 0.76, 121.81, 0.51, 42.96, 1.46, 25.48, 2.46, 1.53e-06, 1.31e-06, 1.40e-06, nan ], [ 5700, 83.85, 0.78, 119.93, 0.54, 43.39, 1.50, 25.26, 2.57, 1.46e-06, 1.54e-06, 1.50e-06, nan ], [ 5800, 82.77, 0.81, 121.03, 0.56, 44.25, 1.52, 24.64, 2.73, 1.47e-06, 1.43e-06, 1.35e-06, nan ], [ 5900, 83.78, 0.83, 120.88, 0.58, 44.84, 1.55, 25.27, 2.76, 1.28e-06, 1.24e-06, 1.20e-06, nan ], [ 6000, 84.32, 0.85, 121.64, 0.59, 45.67, 1.58, 25.36, 2.84, 1.30e-06, 1.34e-06, 1.34e-06, nan ], [ 6100, 84.77, 0.88, 124.88, 0.60, 45.95, 1.62, 25.21, 2.95, 1.52e-06, 1.44e-06, 1.44e-06, nan ], [ 6200, 86.79, 0.89, 125.44, 0.61, 36.08, 2.13, 24.87, 3.09, 1.42e-06, 1.30e-06, 1.38e-06, nan ], [ 6300, 87.15, 0.91, 125.61, 0.63, 37.59, 2.11, 24.37, 3.26, 1.98e-06, 1.98e-06, 1.98e-06, nan ], [ 6400, 87.27, 0.94, 125.28, 0.65, 38.29, 2.14, 24.79, 3.30, 1.49e-06, 1.37e-06, 1.41e-06, nan ], [ 6500, 88.13, 0.96, 126.10, 0.67, 38.66, 2.19, 25.06, 3.37, 1.65e-06, 1.50e-06, 1.50e-06, nan ], [ 6600, 88.38, 0.99, 126.63, 0.69, 39.37, 2.21, 25.13, 3.47, 1.66e-06, 1.70e-06, 1.66e-06, nan ], [ 6700, 88.80, 1.01, 126.64, 0.71, 39.44, 2.28, 25.04, 3.59, 1.49e-06, 1.57e-06, 1.60e-06, nan ], [ 6800, 88.61, 1.04, 128.08, 0.72, 40.16, 2.30, 25.38, 3.64, 1.65e-06, 1.69e-06, 1.62e-06, nan ], [ 6900, 88.08, 1.08, 128.69, 0.74, 40.89, 2.33, 25.12, 3.79, 1.59e-06, 1.63e-06, 1.56e-06, nan ], [ 7000, 89.51, 1.10, 131.72, 0.74, 41.53, 2.36, 25.32, 3.87, 1.36e-06, 1.40e-06, 1.33e-06, nan ], [ 7100, 90.20, 1.12, 131.67, 0.77, 41.99, 2.40, 25.03, 4.03, 1.65e-06, 1.55e-06, 1.48e-06, nan ], [ 7200, 91.52, 1.13, 132.28, 0.78, 42.57, 2.44, 25.35, 4.09, 2.14e-06, 2.17e-06, 2.17e-06, nan ], [ 7300, 91.56, 1.16, 132.24, 0.81, 43.05, 2.48, 25.36, 4.20, 1.64e-06, 1.54e-06, 1.47e-06, nan ], [ 7400, 91.05, 1.20, 131.64, 0.83, 43.67, 2.51, 25.72, 4.26, 1.68e-06, 1.68e-06, 1.65e-06, nan ], [ 7500, 92.46, 1.22, 131.60, 0.85, 44.32, 2.54, 25.40, 4.43, 1.73e-06, 1.66e-06, 1.76e-06, nan ], [ 7600, 93.93, 1.23, 130.72, 0.88, 43.45, 2.66, 25.05, 4.61, 1.73e-06, 1.61e-06, 1.57e-06, nan ], [ 7700, 93.01, 1.28, 132.65, 0.89, 44.99, 2.64, 25.44, 4.66, 1.68e-06, 1.68e-06, 1.78e-06, nan ], [ 7800, 94.93, 1.28, 131.72, 0.92, 45.44, 2.68, 25.36, 4.80, 1.50e-06, 1.53e-06, 1.57e-06, nan ], [ 7900, 94.43, 1.32, 132.52, 0.94, 46.06, 2.71, 25.39, 4.92, 1.51e-06, 1.48e-06, 1.45e-06, nan ], [ 8000, 94.07, 1.36, 134.03, 0.96, 46.77, 2.74, 25.81, 4.96, 1.71e-06, 1.86e-06, 1.89e-06, nan ], [ 8100, 95.93, 1.37, 135.74, 0.97, 46.55, 2.82, 24.99, 5.25, 1.48e-06, 1.45e-06, 1.39e-06, nan ], [ 8200, 96.76, 1.39, 134.89, 1.00, 38.45, 3.50, 24.65, 5.46, 1.58e-06, 1.46e-06, 1.55e-06, nan ], [ 8300, 97.66, 1.41, 133.79, 1.03, 39.84, 3.46, 25.37, 5.43, 1.68e-06, 1.65e-06, 1.68e-06, nan ], [ 8400, 97.73, 1.44, 133.90, 1.05, 39.19, 3.60, 25.43, 5.55, 1.71e-06, 1.71e-06, 1.80e-06, nan ], [ 8500, 98.11, 1.47, 134.31, 1.08, 40.18, 3.60, 25.12, 5.75, 1.67e-06, 1.58e-06, 1.58e-06, nan ], [ 8600, 98.82, 1.50, 134.98, 1.10, 41.25, 3.59, 24.53, 6.03, 1.65e-06, 1.67e-06, 1.65e-06, nan ], [ 8700, 98.18, 1.54, 132.35, 1.14, 41.45, 3.65, 25.11, 6.03, 1.99e-06, 1.91e-06, 1.85e-06, nan ], [ 8800, 97.61, 1.59, 133.98, 1.16, 41.94, 3.69, 24.86, 6.23, 2.03e-06, 1.89e-06, 1.75e-06, nan ], [ 8900, 99.10, 1.60, 134.71, 1.18, 41.20, 3.85, 24.50, 6.47, 1.84e-06, 1.73e-06, 1.76e-06, nan ], [ 9000, 100.32, 1.62, 133.35, 1.21, 42.00, 3.86, 24.85, 6.52, 1.65e-06, 1.60e-06, 1.55e-06, nan ], [ 10000, 103.15, 1.94, 134.51, 1.49, 46.59, 4.29, 24.76, 8.08, 1.71e-06, 1.95e-06, 1.76e-06, nan ], [ 12000, 103.38, 2.79, 139.21, 2.07, 45.93, 6.27, 24.42, 11.79, 2.08e-06, 1.87e-06, 1.95e-06, nan ], [ 14000, 111.09, 3.53, 140.81, 2.78, 46.68, 8.40, 24.32, 16.12, 2.58e-06, 2.27e-06, 2.55e-06, nan ], [ 16000, 112.26, 4.56, 139.66, 3.67, 47.13, 10.86, 23.76, 21.55, 2.62e-06, 2.59e-06, 2.59e-06, nan ], [ 18000, 113.15, 5.73, 143.27, 4.52, 46.33, 13.99, 24.10, 26.88, 2.50e-06, 2.50e-06, 2.41e-06, nan ], [ 20000, 116.15, 6.89, 143.68, 5.57, 46.93, 17.05, 24.47, 32.69, 2.69e-06, 2.64e-06, 2.64e-06, nan ], ]) # numactl --interleave=all ../testing/testing_ssymv -U -N 123 -N 1234 --range 10:90:1 --range 100:900:10 --range 1000:9000:100 --range 10000:20000:2000 ssymv_U = array([ [ 10, 0.01, 0.03, 0.01, 0.03, 0.01, 0.02, 0.10, 0.00, 9.54e-08, 9.54e-08, 4.77e-08, nan ], [ 11, 0.01, 0.03, 0.01, 0.03, 0.01, 0.02, 0.09, 0.00, 4.33e-08, 4.33e-08, 4.33e-08, nan ], [ 12, 0.01, 0.03, 0.01, 0.03, 0.02, 0.02, 0.15, 0.00, 1.99e-08, 1.99e-08, 3.97e-08, nan ], [ 13, 0.01, 0.03, 0.01, 0.03, 0.02, 0.02, 0.17, 0.00, 3.67e-08, 3.67e-08, 7.34e-08, nan ], [ 14, 0.02, 0.03, 0.01, 0.03, 0.02, 0.02, 0.22, 0.00, 6.81e-08, 6.81e-08, 6.81e-08, nan ], [ 15, 0.02, 0.03, 0.01, 0.03, 0.03, 0.02, 0.25, 0.00, 9.54e-08, 6.36e-08, 9.54e-08, nan ], [ 16, 0.02, 0.03, 0.02, 0.03, 0.03, 0.02, 0.18, 0.00, 2.98e-08, 2.98e-08, 5.96e-08, nan ], [ 17, 0.02, 0.03, 0.02, 0.04, 0.03, 0.02, 0.29, 0.00, 1.12e-07, 1.12e-07, 1.12e-07, nan ], [ 18, 0.03, 0.03, 0.02, 0.03, 0.03, 0.02, 0.24, 0.00, 5.30e-08, 7.95e-08, 7.95e-08, nan ], [ 19, 0.03, 0.03, 0.03, 0.03, 0.04, 0.02, 0.40, 0.00, 2.51e-08, 5.02e-08, 5.02e-08, nan ], [ 20, 0.03, 0.03, 0.03, 0.03, 0.04, 0.02, 0.44, 0.00, 7.15e-08, 7.15e-08, 7.15e-08, nan ], [ 21, 0.04, 0.03, 0.03, 0.03, 0.05, 0.02, 0.32, 0.00, 9.08e-08, 9.08e-08, 4.54e-08, nan ], [ 22, 0.04, 0.03, 0.04, 0.03, 0.05, 0.02, 0.53, 0.00, 4.33e-08, 8.67e-08, 8.67e-08, nan ], [ 23, 0.04, 0.03, 0.04, 0.03, 0.06, 0.02, 0.36, 0.00, 4.15e-08, 4.15e-08, 8.29e-08, nan ], [ 24, 0.04, 0.03, 0.04, 0.03, 0.07, 0.02, 0.42, 0.00, 7.95e-08, 7.95e-08, 7.95e-08, nan ], [ 25, 0.05, 0.03, 0.05, 0.03, 0.07, 0.02, 0.68, 0.00, 7.63e-08, 7.63e-08, 7.63e-08, nan ], [ 26, 0.05, 0.03, 0.05, 0.03, 0.07, 0.02, 0.49, 0.00, 1.10e-07, 1.10e-07, 1.10e-07, nan ], [ 27, 0.06, 0.03, 0.05, 0.03, 0.07, 0.02, 0.79, 0.00, 1.06e-07, 7.06e-08, 1.06e-07, nan ], [ 28, 0.06, 0.03, 0.05, 0.03, 0.08, 0.02, 0.85, 0.00, 6.81e-08, 6.81e-08, 1.02e-07, nan ], [ 29, 0.06, 0.03, 0.06, 0.03, 0.09, 0.02, 0.56, 0.00, 9.87e-08, 1.32e-07, 6.58e-08, nan ], [ 30, 0.07, 0.03, 0.06, 0.03, 0.09, 0.02, 0.87, 0.00, 9.54e-08, 9.54e-08, 9.54e-08, nan ], [ 31, 0.07, 0.03, 0.07, 0.03, 0.10, 0.02, 1.04, 0.00, 9.23e-08, 9.23e-08, 6.15e-08, nan ], [ 32, 0.08, 0.03, 0.07, 0.03, 0.11, 0.02, 0.68, 0.00, 5.96e-08, 5.96e-08, 8.94e-08, nan ], [ 33, 0.09, 0.03, 0.07, 0.03, 0.10, 0.02, 0.72, 0.00, 8.67e-08, 8.67e-08, 8.67e-08, nan ], [ 34, 0.09, 0.03, 0.08, 0.03, 0.10, 0.02, 0.77, 0.00, 8.41e-08, 1.12e-07, 1.12e-07, nan ], [ 35, 0.09, 0.03, 0.08, 0.03, 0.11, 0.02, 0.88, 0.00, 8.17e-08, 8.17e-08, 5.45e-08, nan ], [ 36, 0.09, 0.03, 0.09, 0.03, 0.12, 0.02, 1.24, 0.00, 7.95e-08, 1.06e-07, 7.95e-08, nan ], [ 37, 0.11, 0.03, 0.09, 0.03, 0.13, 0.02, 0.91, 0.00, 7.73e-08, 7.73e-08, 7.73e-08, nan ], [ 38, 0.10, 0.03, 0.10, 0.03, 0.14, 0.02, 0.73, 0.00, 1.00e-07, 1.00e-07, 1.00e-07, nan ], [ 39, 0.11, 0.03, 0.10, 0.03, 0.14, 0.02, 1.09, 0.00, 7.34e-08, 4.89e-08, 4.89e-08, nan ], [ 40, 0.11, 0.03, 0.11, 0.03, 0.14, 0.02, 1.06, 0.00, 9.54e-08, 7.15e-08, 9.54e-08, nan ], [ 41, 0.13, 0.03, 0.11, 0.03, 0.16, 0.02, 0.85, 0.00, 6.98e-08, 9.30e-08, 9.30e-08, nan ], [ 42, 0.13, 0.03, 0.12, 0.03, 0.16, 0.02, 1.17, 0.00, 9.08e-08, 9.08e-08, 9.08e-08, nan ], [ 43, 0.13, 0.03, 0.12, 0.03, 0.17, 0.02, 0.99, 0.00, 8.87e-08, 8.87e-08, 8.87e-08, nan ], [ 44, 0.14, 0.03, 0.13, 0.03, 0.18, 0.02, 1.28, 0.00, 1.30e-07, 1.30e-07, 1.08e-07, nan ], [ 45, 0.15, 0.03, 0.13, 0.03, 0.19, 0.02, 1.45, 0.00, 1.06e-07, 8.48e-08, 8.48e-08, nan ], [ 46, 0.17, 0.03, 0.14, 0.03, 0.19, 0.02, 1.40, 0.00, 8.29e-08, 8.29e-08, 8.29e-08, nan ], [ 47, 0.18, 0.02, 0.15, 0.03, 0.20, 0.02, 1.11, 0.00, 1.22e-07, 1.22e-07, 1.22e-07, nan ], [ 48, 0.18, 0.03, 0.16, 0.03, 0.21, 0.02, 1.16, 0.00, 7.95e-08, 1.19e-07, 1.19e-07, nan ], [ 49, 0.19, 0.03, 0.16, 0.03, 0.21, 0.02, 1.21, 0.00, 1.56e-07, 1.56e-07, 1.56e-07, nan ], [ 50, 0.20, 0.03, 0.16, 0.03, 0.21, 0.02, 1.26, 0.00, 1.14e-07, 7.63e-08, 1.14e-07, nan ], [ 51, 0.20, 0.03, 0.16, 0.03, 0.23, 0.02, 1.71, 0.00, 1.12e-07, 1.12e-07, 1.12e-07, nan ], [ 52, 0.22, 0.03, 0.18, 0.03, 0.25, 0.02, 1.36, 0.00, 1.10e-07, 7.34e-08, 7.34e-08, nan ], [ 53, 0.21, 0.03, 0.18, 0.03, 0.26, 0.02, 1.50, 0.00, 1.44e-07, 1.44e-07, 1.44e-07, nan ], [ 54, 0.22, 0.03, 0.18, 0.03, 0.26, 0.02, 1.56, 0.00, 1.06e-07, 1.06e-07, 1.06e-07, nan ], [ 55, 0.23, 0.03, 0.19, 0.03, 0.25, 0.03, 1.52, 0.00, 1.39e-07, 1.04e-07, 1.39e-07, nan ], [ 56, 0.23, 0.03, 0.19, 0.03, 0.27, 0.02, 1.58, 0.00, 1.36e-07, 1.36e-07, 1.02e-07, nan ], [ 57, 0.23, 0.03, 0.20, 0.03, 0.28, 0.02, 1.63, 0.00, 6.69e-08, 1.00e-07, 1.00e-07, nan ], [ 58, 0.24, 0.03, 0.21, 0.03, 0.27, 0.03, 1.69, 0.00, 1.32e-07, 9.87e-08, 1.32e-07, nan ], [ 59, 0.26, 0.03, 0.21, 0.03, 0.28, 0.03, 1.86, 0.00, 1.29e-07, 1.29e-07, 9.70e-08, nan ], [ 60, 0.25, 0.03, 0.21, 0.03, 0.30, 0.02, 1.81, 0.00, 1.27e-07, 1.27e-07, 9.54e-08, nan ], [ 61, 0.29, 0.03, 0.22, 0.03, 0.30, 0.03, 1.87, 0.00, 9.38e-08, 9.38e-08, 9.38e-08, nan ], [ 62, 0.30, 0.03, 0.22, 0.04, 0.32, 0.02, 1.93, 0.00, 1.23e-07, 1.23e-07, 1.23e-07, nan ], [ 63, 0.28, 0.03, 0.24, 0.03, 0.31, 0.03, 1.99, 0.00, 1.51e-07, 9.08e-08, 1.21e-07, nan ], [ 64, 0.26, 0.03, 0.25, 0.03, 0.33, 0.03, 2.05, 0.00, 8.94e-08, 8.94e-08, 8.94e-08, nan ], [ 65, 0.27, 0.03, 0.20, 0.04, 0.34, 0.03, 1.71, 0.01, 1.17e-07, 8.80e-08, 1.17e-07, nan ], [ 66, 0.29, 0.03, 0.21, 0.04, 0.34, 0.03, 1.77, 0.01, 1.73e-07, 1.44e-07, 1.16e-07, nan ], [ 67, 0.29, 0.03, 0.22, 0.04, 0.35, 0.03, 2.25, 0.00, 1.14e-07, 1.14e-07, 1.14e-07, nan ], [ 68, 0.30, 0.03, 0.23, 0.04, 0.37, 0.03, 2.32, 0.00, 1.40e-07, 1.12e-07, 1.12e-07, nan ], [ 69, 0.28, 0.03, 0.24, 0.04, 0.37, 0.03, 2.03, 0.00, 1.38e-07, 1.11e-07, 1.11e-07, nan ], [ 70, 0.32, 0.03, 0.24, 0.04, 0.40, 0.03, 2.61, 0.00, 1.09e-07, 1.09e-07, 1.09e-07, nan ], [ 71, 0.32, 0.03, 0.25, 0.04, 0.39, 0.03, 2.04, 0.01, 1.34e-07, 1.61e-07, 1.34e-07, nan ], [ 72, 0.32, 0.03, 0.26, 0.04, 0.40, 0.03, 2.59, 0.00, 1.59e-07, 1.32e-07, 1.32e-07, nan ], [ 73, 0.33, 0.03, 0.26, 0.04, 0.43, 0.03, 2.67, 0.00, 1.57e-07, 1.05e-07, 1.31e-07, nan ], [ 74, 0.36, 0.03, 0.26, 0.04, 0.41, 0.03, 2.22, 0.01, 1.80e-07, 1.03e-07, 1.29e-07, nan ], [ 75, 0.38, 0.03, 0.28, 0.04, 0.47, 0.02, 2.28, 0.01, 1.53e-07, 1.02e-07, 1.02e-07, nan ], [ 76, 0.39, 0.03, 0.29, 0.04, 0.49, 0.02, 2.34, 0.01, 1.00e-07, 1.00e-07, 1.51e-07, nan ], [ 77, 0.40, 0.03, 0.31, 0.04, 0.50, 0.02, 2.40, 0.01, 1.49e-07, 1.49e-07, 1.49e-07, nan ], [ 78, 0.41, 0.03, 0.32, 0.04, 0.50, 0.02, 2.46, 0.01, 1.22e-07, 9.78e-08, 9.78e-08, nan ], [ 79, 0.42, 0.03, 0.31, 0.04, 0.50, 0.03, 2.52, 0.01, 1.45e-07, 1.45e-07, 1.45e-07, nan ], [ 80, 0.42, 0.03, 0.32, 0.04, 0.54, 0.02, 2.59, 0.01, 1.43e-07, 1.43e-07, 1.43e-07, nan ], [ 81, 0.43, 0.03, 0.33, 0.04, 0.53, 0.03, 2.65, 0.01, 1.41e-07, 9.42e-08, 1.18e-07, nan ], [ 82, 0.44, 0.03, 0.34, 0.04, 0.54, 0.03, 2.28, 0.01, 1.63e-07, 1.40e-07, 9.30e-08, nan ], [ 83, 0.46, 0.03, 0.34, 0.04, 0.58, 0.02, 2.34, 0.01, 1.38e-07, 1.38e-07, 1.15e-07, nan ], [ 84, 0.48, 0.03, 0.36, 0.04, 0.55, 0.03, 2.85, 0.01, 1.82e-07, 1.82e-07, 1.82e-07, nan ], [ 85, 0.46, 0.03, 0.36, 0.04, 0.58, 0.03, 2.92, 0.01, 1.35e-07, 1.57e-07, 1.35e-07, nan ], [ 86, 0.47, 0.03, 0.36, 0.04, 0.60, 0.03, 2.99, 0.01, 1.33e-07, 1.33e-07, 1.33e-07, nan ], [ 87, 0.48, 0.03, 0.37, 0.04, 0.59, 0.03, 3.06, 0.01, 1.75e-07, 1.32e-07, 1.32e-07, nan ], [ 88, 0.49, 0.03, 0.38, 0.04, 0.58, 0.03, 2.63, 0.01, 1.30e-07, 1.30e-07, 1.73e-07, nan ], [ 89, 0.50, 0.03, 0.40, 0.04, 0.62, 0.03, 2.69, 0.01, 1.71e-07, 1.71e-07, 1.71e-07, nan ], [ 90, 0.51, 0.03, 0.39, 0.04, 0.63, 0.03, 3.27, 0.01, 1.27e-07, 1.27e-07, 1.27e-07, nan ], [ 100, 0.65, 0.03, 0.49, 0.04, 0.69, 0.03, 3.26, 0.01, 1.14e-07, 1.14e-07, 1.14e-07, nan ], [ 110, 0.74, 0.03, 0.60, 0.04, 0.85, 0.03, 3.41, 0.01, 1.73e-07, 2.08e-07, 1.73e-07, nan ], [ 120, 0.85, 0.03, 0.71, 0.04, 0.97, 0.03, 3.58, 0.01, 1.91e-07, 1.59e-07, 1.91e-07, nan ], [ 130, 0.90, 0.04, 0.79, 0.04, 1.07, 0.03, 4.20, 0.01, 2.35e-07, 1.76e-07, 1.76e-07, nan ], [ 140, 0.99, 0.04, 0.92, 0.04, 1.19, 0.03, 4.48, 0.01, 1.63e-07, 1.91e-07, 1.91e-07, nan ], [ 150, 1.22, 0.04, 1.06, 0.04, 1.37, 0.03, 5.76, 0.01, 1.78e-07, 2.03e-07, 1.78e-07, nan ], [ 160, 1.39, 0.04, 1.17, 0.04, 1.61, 0.03, 5.69, 0.01, 1.91e-07, 1.91e-07, 2.15e-07, nan ], [ 170, 1.49, 0.04, 1.32, 0.04, 1.72, 0.03, 6.42, 0.01, 2.24e-07, 2.24e-07, 1.80e-07, nan ], [ 180, 1.81, 0.04, 1.51, 0.04, 1.97, 0.03, 8.28, 0.01, 1.70e-07, 1.48e-07, 1.48e-07, nan ], [ 190, 1.96, 0.04, 1.65, 0.04, 2.21, 0.03, 6.62, 0.01, 3.21e-07, 2.81e-07, 2.41e-07, nan ], [ 200, 1.87, 0.04, 1.82, 0.04, 2.36, 0.03, 8.03, 0.01, 2.29e-07, 2.29e-07, 2.29e-07, nan ], [ 210, 1.97, 0.05, 1.97, 0.05, 2.40, 0.04, 8.08, 0.01, 2.54e-07, 2.91e-07, 2.54e-07, nan ], [ 220, 2.17, 0.04, 2.17, 0.04, 2.70, 0.04, 8.87, 0.01, 2.77e-07, 2.77e-07, 2.43e-07, nan ], [ 230, 2.41, 0.04, 2.36, 0.05, 2.88, 0.04, 8.91, 0.01, 3.32e-07, 2.65e-07, 2.99e-07, nan ], [ 240, 2.58, 0.04, 2.51, 0.05, 3.13, 0.04, 9.51, 0.01, 2.23e-07, 2.54e-07, 2.54e-07, nan ], [ 250, 2.80, 0.04, 2.79, 0.05, 3.29, 0.04, 8.36, 0.02, 2.14e-07, 2.14e-07, 2.14e-07, nan ], [ 260, 2.83, 0.05, 2.95, 0.05, 3.47, 0.04, 4.13, 0.03, 2.93e-07, 2.93e-07, 2.93e-07, nan ], [ 270, 3.04, 0.05, 3.26, 0.04, 3.84, 0.04, 4.58, 0.03, 2.83e-07, 2.83e-07, 2.83e-07, nan ], [ 280, 3.28, 0.05, 3.35, 0.05, 3.93, 0.04, 4.62, 0.03, 3.00e-07, 2.72e-07, 2.45e-07, nan ], [ 290, 3.50, 0.05, 3.59, 0.05, 4.02, 0.04, 4.14, 0.04, 2.63e-07, 2.37e-07, 2.37e-07, nan ], [ 300, 3.70, 0.05, 3.85, 0.05, 4.30, 0.04, 5.02, 0.04, 3.31e-07, 3.56e-07, 3.05e-07, nan ], [ 310, 4.00, 0.05, 4.11, 0.05, 4.70, 0.04, 4.60, 0.04, 2.71e-07, 2.95e-07, 3.20e-07, nan ], [ 320, 4.29, 0.05, 4.46, 0.05, 4.90, 0.04, 4.90, 0.04, 3.34e-07, 3.10e-07, 3.10e-07, nan ], [ 330, 4.20, 0.05, 4.54, 0.05, 5.21, 0.04, 4.85, 0.05, 2.54e-07, 2.77e-07, 3.01e-07, nan ], [ 340, 4.30, 0.05, 4.84, 0.05, 5.26, 0.04, 5.15, 0.05, 3.59e-07, 2.69e-07, 3.59e-07, nan ], [ 350, 4.46, 0.06, 5.10, 0.05, 5.60, 0.04, 5.03, 0.05, 2.83e-07, 2.62e-07, 2.62e-07, nan ], [ 360, 4.64, 0.06, 5.29, 0.05, 5.65, 0.05, 4.91, 0.05, 2.97e-07, 2.54e-07, 2.97e-07, nan ], [ 370, 5.28, 0.05, 5.62, 0.05, 6.22, 0.04, 5.19, 0.05, 2.89e-07, 2.47e-07, 2.47e-07, nan ], [ 380, 5.17, 0.06, 5.78, 0.05, 6.43, 0.05, 5.08, 0.06, 4.02e-07, 3.21e-07, 3.61e-07, nan ], [ 390, 5.02, 0.06, 6.09, 0.05, 6.49, 0.05, 7.44, 0.04, 3.13e-07, 3.52e-07, 3.13e-07, nan ], [ 400, 3.49, 0.09, 6.44, 0.05, 6.83, 0.05, 8.06, 0.04, 3.43e-07, 2.67e-07, 3.05e-07, nan ], [ 410, 5.79, 0.06, 6.73, 0.05, 7.32, 0.05, 7.85, 0.04, 4.09e-07, 4.09e-07, 4.47e-07, nan ], [ 420, 5.79, 0.06, 6.93, 0.05, 6.80, 0.05, 7.69, 0.05, 3.27e-07, 3.27e-07, 3.27e-07, nan ], [ 430, 6.19, 0.06, 7.40, 0.05, 7.58, 0.05, 7.40, 0.05, 3.55e-07, 3.90e-07, 3.90e-07, nan ], [ 440, 6.56, 0.06, 7.61, 0.05, 7.90, 0.05, 7.43, 0.05, 3.81e-07, 3.47e-07, 3.47e-07, nan ], [ 450, 6.45, 0.06, 8.30, 0.05, 8.26, 0.05, 7.24, 0.06, 3.73e-07, 4.07e-07, 3.73e-07, nan ], [ 460, 6.52, 0.07, 8.31, 0.05, 8.31, 0.05, 7.57, 0.06, 3.32e-07, 3.65e-07, 3.65e-07, nan ], [ 470, 6.83, 0.06, 8.52, 0.05, 8.52, 0.05, 7.25, 0.06, 4.55e-07, 3.57e-07, 3.90e-07, nan ], [ 480, 7.23, 0.06, 9.05, 0.05, 9.27, 0.05, 7.45, 0.06, 3.18e-07, 3.50e-07, 3.18e-07, nan ], [ 490, 7.08, 0.07, 9.05, 0.05, 9.09, 0.05, 6.77, 0.07, 4.36e-07, 4.05e-07, 4.36e-07, nan ], [ 500, 7.84, 0.06, 9.47, 0.05, 9.26, 0.05, 7.25, 0.07, 3.97e-07, 4.27e-07, 3.97e-07, nan ], [ 510, 7.67, 0.07, 9.63, 0.05, 9.30, 0.06, 6.85, 0.08, 4.19e-07, 3.59e-07, 3.59e-07, nan ], [ 520, 7.63, 0.07, 10.42, 0.05, 9.67, 0.06, 10.62, 0.05, 3.52e-07, 3.81e-07, 3.81e-07, nan ], [ 530, 8.14, 0.07, 11.03, 0.05, 9.88, 0.06, 10.45, 0.05, 4.89e-07, 4.89e-07, 4.89e-07, nan ], [ 540, 8.48, 0.07, 11.04, 0.05, 9.88, 0.06, 10.61, 0.06, 3.96e-07, 3.67e-07, 4.24e-07, nan ], [ 550, 7.99, 0.08, 10.64, 0.06, 9.45, 0.06, 9.78, 0.06, 4.44e-07, 4.72e-07, 4.44e-07, nan ], [ 560, 8.73, 0.07, 11.41, 0.06, 10.29, 0.06, 10.10, 0.06, 4.36e-07, 4.09e-07, 3.81e-07, nan ], [ 570, 9.04, 0.07, 12.03, 0.05, 10.50, 0.06, 9.72, 0.07, 3.75e-07, 3.75e-07, 3.21e-07, nan ], [ 580, 9.09, 0.07, 11.83, 0.06, 10.35, 0.07, 9.61, 0.07, 3.95e-07, 3.95e-07, 3.68e-07, nan ], [ 590, 9.29, 0.08, 12.94, 0.05, 10.91, 0.06, 8.63, 0.08, 3.62e-07, 4.14e-07, 3.62e-07, nan ], [ 600, 9.89, 0.07, 13.15, 0.05, 11.41, 0.06, 8.59, 0.08, 3.81e-07, 3.81e-07, 4.58e-07, nan ], [ 610, 9.42, 0.08, 13.08, 0.06, 11.29, 0.07, 7.76, 0.10, 3.75e-07, 3.75e-07, 3.25e-07, nan ], [ 620, 10.25, 0.08, 13.51, 0.06, 11.83, 0.07, 8.37, 0.09, 4.18e-07, 3.45e-07, 3.94e-07, nan ], [ 630, 10.32, 0.08, 13.72, 0.06, 11.83, 0.07, 8.19, 0.10, 3.88e-07, 4.12e-07, 3.88e-07, nan ], [ 640, 10.92, 0.08, 14.40, 0.06, 12.42, 0.07, 11.40, 0.07, 3.58e-07, 4.05e-07, 3.58e-07, nan ], [ 650, 10.32, 0.08, 14.37, 0.06, 12.24, 0.07, 11.91, 0.07, 4.46e-07, 4.46e-07, 4.46e-07, nan ], [ 660, 10.64, 0.08, 14.58, 0.06, 12.84, 0.07, 12.28, 0.07, 3.70e-07, 3.70e-07, 3.70e-07, nan ], [ 670, 10.96, 0.08, 15.21, 0.06, 12.83, 0.07, 11.97, 0.08, 3.64e-07, 3.87e-07, 3.64e-07, nan ], [ 680, 11.33, 0.08, 15.42, 0.06, 13.21, 0.07, 12.03, 0.08, 3.59e-07, 3.59e-07, 3.59e-07, nan ], [ 690, 11.49, 0.08, 16.13, 0.06, 13.60, 0.07, 11.76, 0.08, 3.98e-07, 3.10e-07, 3.54e-07, nan ], [ 700, 11.53, 0.09, 16.08, 0.06, 13.63, 0.07, 11.83, 0.08, 3.71e-07, 3.92e-07, 3.71e-07, nan ], [ 710, 11.32, 0.09, 16.54, 0.06, 13.66, 0.07, 11.23, 0.09, 4.30e-07, 4.73e-07, 5.16e-07, nan ], [ 720, 12.06, 0.09, 17.08, 0.06, 14.23, 0.07, 11.17, 0.09, 3.81e-07, 4.24e-07, 3.81e-07, nan ], [ 730, 12.00, 0.09, 17.83, 0.06, 14.39, 0.07, 11.00, 0.10, 4.18e-07, 4.18e-07, 4.60e-07, nan ], [ 740, 11.79, 0.09, 17.97, 0.06, 14.24, 0.08, 10.75, 0.10, 4.54e-07, 4.12e-07, 4.54e-07, nan ], [ 750, 12.12, 0.09, 18.75, 0.06, 14.81, 0.08, 10.94, 0.10, 4.48e-07, 4.48e-07, 4.48e-07, nan ], [ 760, 12.04, 0.10, 18.38, 0.06, 15.02, 0.08, 10.32, 0.11, 4.42e-07, 4.42e-07, 4.42e-07, nan ], [ 770, 12.36, 0.10, 19.15, 0.06, 15.42, 0.08, 13.21, 0.09, 4.76e-07, 4.36e-07, 4.36e-07, nan ], [ 780, 12.31, 0.10, 19.65, 0.06, 15.63, 0.08, 12.97, 0.09, 5.48e-07, 5.09e-07, 5.09e-07, nan ], [ 790, 12.75, 0.10, 20.48, 0.06, 16.23, 0.08, 14.36, 0.09, 4.64e-07, 4.64e-07, 3.86e-07, nan ], [ 800, 12.83, 0.10, 20.36, 0.06, 16.44, 0.08, 13.75, 0.09, 4.96e-07, 5.72e-07, 5.34e-07, nan ], [ 810, 13.41, 0.10, 20.79, 0.06, 16.60, 0.08, 13.81, 0.10, 5.27e-07, 6.40e-07, 5.65e-07, nan ], [ 820, 13.32, 0.10, 20.69, 0.07, 16.66, 0.08, 14.01, 0.10, 5.58e-07, 5.21e-07, 5.21e-07, nan ], [ 830, 13.68, 0.10, 21.51, 0.06, 17.02, 0.08, 13.27, 0.10, 5.88e-07, 5.52e-07, 5.52e-07, nan ], [ 840, 13.44, 0.11, 22.11, 0.06, 17.03, 0.08, 13.59, 0.10, 7.27e-07, 6.90e-07, 6.90e-07, nan ], [ 850, 13.39, 0.11, 22.23, 0.07, 17.24, 0.08, 12.83, 0.11, 5.03e-07, 4.67e-07, 5.39e-07, nan ], [ 860, 13.86, 0.11, 22.42, 0.07, 17.65, 0.08, 12.75, 0.12, 5.68e-07, 5.68e-07, 5.68e-07, nan ], [ 870, 14.19, 0.11, 23.37, 0.06, 17.61, 0.09, 12.87, 0.12, 5.96e-07, 5.61e-07, 5.61e-07, nan ], [ 880, 14.23, 0.11, 23.48, 0.07, 18.02, 0.09, 12.29, 0.13, 4.86e-07, 4.86e-07, 4.86e-07, nan ], [ 890, 14.56, 0.11, 24.01, 0.07, 18.48, 0.09, 12.18, 0.13, 5.83e-07, 5.83e-07, 5.49e-07, nan ], [ 900, 14.35, 0.11, 24.21, 0.07, 18.43, 0.09, 15.15, 0.11, 5.09e-07, 5.09e-07, 5.09e-07, nan ], [ 1000, 16.40, 0.12, 27.80, 0.07, 20.23, 0.10, 14.11, 0.14, 5.80e-07, 5.80e-07, 5.49e-07, nan ], [ 1100, 17.67, 0.14, 29.19, 0.08, 21.80, 0.11, 15.92, 0.15, 5.83e-07, 5.83e-07, 5.83e-07, nan ], [ 1200, 20.15, 0.14, 34.74, 0.08, 24.42, 0.12, 17.47, 0.16, 5.59e-07, 5.59e-07, 5.85e-07, nan ], [ 1300, 21.96, 0.15, 39.85, 0.08, 26.67, 0.13, 17.07, 0.20, 5.63e-07, 5.87e-07, 6.34e-07, nan ], [ 1400, 24.09, 0.16, 42.74, 0.09, 29.28, 0.13, 16.42, 0.24, 6.54e-07, 6.98e-07, 6.10e-07, nan ], [ 1500, 25.87, 0.17, 47.34, 0.10, 30.46, 0.15, 17.67, 0.25, 7.32e-07, 6.10e-07, 6.51e-07, nan ], [ 1600, 27.83, 0.18, 49.74, 0.10, 32.41, 0.16, 18.83, 0.27, 8.77e-07, 8.01e-07, 8.39e-07, nan ], [ 1700, 29.51, 0.20, 57.76, 0.10, 34.65, 0.17, 19.09, 0.30, 7.90e-07, 7.90e-07, 7.54e-07, nan ], [ 1800, 31.29, 0.21, 60.03, 0.11, 36.45, 0.18, 19.65, 0.33, 9.16e-07, 8.82e-07, 8.82e-07, nan ], [ 1900, 32.97, 0.22, 60.24, 0.12, 38.65, 0.19, 18.61, 0.39, 8.35e-07, 7.71e-07, 8.03e-07, nan ], [ 2000, 34.05, 0.24, 61.15, 0.13, 38.63, 0.21, 21.01, 0.38, 8.85e-07, 9.16e-07, 8.54e-07, nan ], [ 2100, 36.29, 0.24, 60.48, 0.15, 24.79, 0.36, 19.96, 0.44, 1.02e-06, 1.08e-06, 1.02e-06, nan ], [ 2200, 37.68, 0.26, 64.99, 0.15, 26.10, 0.37, 19.68, 0.49, 8.60e-07, 8.60e-07, 8.32e-07, nan ], [ 2300, 40.10, 0.26, 63.79, 0.17, 26.33, 0.40, 20.39, 0.52, 8.49e-07, 9.02e-07, 9.02e-07, nan ], [ 2400, 41.14, 0.28, 70.36, 0.16, 27.51, 0.42, 21.58, 0.53, 8.65e-07, 8.39e-07, 8.65e-07, nan ], [ 2500, 42.54, 0.29, 71.46, 0.17, 28.68, 0.44, 21.56, 0.58, 8.30e-07, 8.79e-07, 8.54e-07, nan ], [ 2600, 44.35, 0.30, 74.35, 0.18, 29.53, 0.46, 22.85, 0.59, 7.98e-07, 7.51e-07, 7.75e-07, nan ], [ 2700, 45.42, 0.32, 76.37, 0.19, 30.57, 0.48, 22.90, 0.64, 9.27e-07, 8.59e-07, 8.36e-07, nan ], [ 2800, 47.99, 0.33, 78.41, 0.20, 31.55, 0.50, 22.83, 0.69, 9.81e-07, 9.81e-07, 9.81e-07, nan ], [ 2900, 48.77, 0.34, 81.68, 0.21, 32.60, 0.52, 23.93, 0.70, 1.05e-06, 1.09e-06, 1.14e-06, nan ], [ 3000, 50.72, 0.36, 82.99, 0.22, 34.03, 0.53, 24.17, 0.75, 1.10e-06, 9.77e-07, 9.36e-07, nan ], [ 3100, 53.12, 0.36, 84.35, 0.23, 34.70, 0.55, 24.80, 0.78, 1.10e-06, 1.14e-06, 1.14e-06, nan ], [ 3200, 54.31, 0.38, 85.33, 0.24, 36.07, 0.57, 24.36, 0.84, 1.07e-06, 1.14e-06, 1.07e-06, nan ], [ 3300, 56.30, 0.39, 91.56, 0.24, 37.06, 0.59, 24.68, 0.88, 1.18e-06, 1.26e-06, 1.18e-06, nan ], [ 3400, 57.40, 0.40, 91.77, 0.25, 37.91, 0.61, 23.82, 0.97, 1.11e-06, 1.18e-06, 1.11e-06, nan ], [ 3500, 59.94, 0.41, 93.87, 0.26, 38.91, 0.63, 23.74, 1.03, 1.15e-06, 1.08e-06, 1.12e-06, nan ], [ 3600, 60.72, 0.43, 97.88, 0.26, 40.01, 0.65, 25.44, 1.02, 1.19e-06, 1.19e-06, 1.29e-06, nan ], [ 3700, 61.96, 0.44, 97.18, 0.28, 41.07, 0.67, 24.52, 1.12, 1.19e-06, 1.19e-06, 1.12e-06, nan ], [ 3800, 63.60, 0.45, 100.63, 0.29, 42.23, 0.68, 24.80, 1.16, 1.41e-06, 1.41e-06, 1.35e-06, nan ], [ 3900, 65.58, 0.46, 98.47, 0.31, 43.35, 0.70, 24.34, 1.25, 1.22e-06, 1.19e-06, 1.28e-06, nan ], [ 4000, 66.40, 0.48, 100.94, 0.32, 44.40, 0.72, 21.00, 1.52, 1.53e-06, 1.28e-06, 1.34e-06, nan ], [ 4100, 66.34, 0.51, 92.13, 0.37, 34.18, 0.98, 24.13, 1.39, 1.40e-06, 1.37e-06, 1.31e-06, nan ], [ 4200, 69.46, 0.51, 101.45, 0.35, 33.32, 1.06, 22.22, 1.59, 1.31e-06, 1.34e-06, 1.34e-06, nan ], [ 4300, 69.95, 0.53, 102.20, 0.36, 33.84, 1.09, 23.09, 1.60, 1.42e-06, 1.50e-06, 1.48e-06, nan ], [ 4400, 72.81, 0.53, 104.40, 0.37, 34.90, 1.11, 23.53, 1.65, 1.28e-06, 1.28e-06, 1.28e-06, nan ], [ 4500, 73.14, 0.55, 105.21, 0.39, 35.60, 1.14, 23.46, 1.73, 1.36e-06, 1.36e-06, 1.41e-06, nan ], [ 4600, 74.01, 0.57, 102.98, 0.41, 36.21, 1.17, 23.79, 1.78, 1.17e-06, 1.25e-06, 1.25e-06, nan ], [ 4700, 76.05, 0.58, 107.01, 0.41, 36.89, 1.20, 23.95, 1.84, 1.45e-06, 1.43e-06, 1.45e-06, nan ], [ 4800, 76.56, 0.60, 105.00, 0.44, 37.57, 1.23, 24.53, 1.88, 1.55e-06, 1.60e-06, 1.55e-06, nan ], [ 4900, 77.84, 0.62, 107.90, 0.45, 38.39, 1.25, 24.69, 1.95, 1.42e-06, 1.49e-06, 1.42e-06, nan ], [ 5000, 79.00, 0.63, 108.29, 0.46, 39.38, 1.27, 23.94, 2.09, 1.37e-06, 1.42e-06, 1.46e-06, nan ], [ 5100, 79.82, 0.65, 111.40, 0.47, 40.02, 1.30, 24.84, 2.09, 1.39e-06, 1.39e-06, 1.39e-06, nan ], [ 5200, 81.84, 0.66, 112.20, 0.48, 40.85, 1.32, 24.73, 2.19, 1.39e-06, 1.39e-06, 1.39e-06, nan ], [ 5300, 82.75, 0.68, 113.31, 0.50, 41.65, 1.35, 24.94, 2.25, 1.57e-06, 1.36e-06, 1.40e-06, nan ], [ 5400, 83.93, 0.69, 114.38, 0.51, 41.99, 1.39, 26.03, 2.24, 1.51e-06, 1.51e-06, 1.60e-06, nan ], [ 5500, 84.74, 0.71, 108.28, 0.56, 43.13, 1.40, 24.22, 2.50, 1.27e-06, 1.31e-06, 1.31e-06, nan ], [ 5600, 86.41, 0.73, 116.16, 0.54, 43.53, 1.44, 24.78, 2.53, 1.48e-06, 1.48e-06, 1.44e-06, nan ], [ 5700, 87.48, 0.74, 118.42, 0.55, 43.97, 1.48, 25.09, 2.59, 1.54e-06, 1.41e-06, 1.50e-06, nan ], [ 5800, 88.31, 0.76, 118.04, 0.57, 44.56, 1.51, 24.76, 2.72, 1.56e-06, 1.56e-06, 1.47e-06, nan ], [ 5900, 89.73, 0.78, 116.26, 0.60, 45.42, 1.53, 25.06, 2.78, 1.45e-06, 1.49e-06, 1.53e-06, nan ], [ 6000, 91.25, 0.79, 115.37, 0.62, 46.10, 1.56, 25.12, 2.87, 1.79e-06, 1.83e-06, 1.79e-06, nan ], [ 6100, 91.44, 0.81, 117.23, 0.63, 46.52, 1.60, 25.42, 2.93, 1.60e-06, 1.56e-06, 1.60e-06, nan ], [ 6200, 93.32, 0.82, 118.48, 0.65, 36.76, 2.09, 25.32, 3.04, 1.73e-06, 1.69e-06, 1.65e-06, nan ], [ 6300, 94.07, 0.84, 119.05, 0.67, 38.21, 2.08, 25.63, 3.10, 1.78e-06, 1.59e-06, 1.67e-06, nan ], [ 6400, 95.97, 0.85, 118.58, 0.69, 38.67, 2.12, 25.90, 3.16, 1.87e-06, 1.95e-06, 1.87e-06, nan ], [ 6500, 94.32, 0.90, 120.36, 0.70, 39.05, 2.16, 25.85, 3.27, 1.73e-06, 1.92e-06, 1.84e-06, nan ], [ 6600, 97.25, 0.90, 120.38, 0.72, 39.77, 2.19, 26.26, 3.32, 1.89e-06, 1.89e-06, 1.89e-06, nan ], [ 6700, 98.80, 0.91, 122.32, 0.73, 40.10, 2.24, 25.99, 3.45, 1.71e-06, 1.60e-06, 1.64e-06, nan ], [ 6800, 98.49, 0.94, 121.58, 0.76, 39.37, 2.35, 26.90, 3.44, 1.72e-06, 1.72e-06, 1.76e-06, nan ], [ 6900, 101.43, 0.94, 122.26, 0.78, 40.98, 2.32, 26.12, 3.65, 1.56e-06, 1.63e-06, 1.63e-06, nan ], [ 7000, 100.54, 0.97, 123.01, 0.80, 42.17, 2.32, 26.21, 3.74, 1.74e-06, 1.74e-06, 1.67e-06, nan ], [ 7100, 103.94, 0.97, 122.55, 0.82, 42.63, 2.37, 25.74, 3.92, 1.82e-06, 1.79e-06, 1.65e-06, nan ], [ 7200, 103.70, 1.00, 125.66, 0.83, 42.65, 2.43, 25.51, 4.06, 1.86e-06, 1.86e-06, 1.83e-06, nan ], [ 7300, 105.65, 1.01, 124.82, 0.85, 43.17, 2.47, 26.50, 4.02, 1.74e-06, 1.81e-06, 1.91e-06, nan ], [ 7400, 104.11, 1.05, 126.18, 0.87, 44.10, 2.48, 26.01, 4.21, 1.78e-06, 1.81e-06, 1.85e-06, nan ], [ 7500, 107.47, 1.05, 126.42, 0.89, 43.80, 2.57, 26.59, 4.23, 1.86e-06, 1.92e-06, 1.82e-06, nan ], [ 7600, 108.39, 1.07, 127.79, 0.90, 45.15, 2.56, 26.66, 4.33, 1.61e-06, 1.57e-06, 1.61e-06, nan ], [ 7700, 107.23, 1.11, 127.68, 0.93, 45.18, 2.62, 26.72, 4.44, 2.03e-06, 1.97e-06, 2.03e-06, nan ], [ 7800, 109.23, 1.11, 125.07, 0.97, 45.84, 2.66, 26.85, 4.53, 1.82e-06, 1.82e-06, 1.88e-06, nan ], [ 7900, 106.97, 1.17, 127.64, 0.98, 46.55, 2.68, 26.89, 4.64, 1.82e-06, 1.92e-06, 1.82e-06, nan ], [ 8000, 107.41, 1.19, 124.06, 1.03, 47.13, 2.72, 26.94, 4.75, 1.95e-06, 1.92e-06, 1.95e-06, nan ], [ 8100, 107.32, 1.22, 129.15, 1.02, 47.45, 2.77, 26.56, 4.94, 1.87e-06, 1.90e-06, 1.96e-06, nan ], [ 8200, 107.08, 1.26, 129.21, 1.04, 41.00, 3.28, 26.50, 5.07, 1.79e-06, 1.79e-06, 1.73e-06, nan ], [ 8300, 106.65, 1.29, 127.81, 1.08, 40.33, 3.42, 25.98, 5.30, 2.35e-06, 2.32e-06, 2.26e-06, nan ], [ 8400, 104.77, 1.35, 128.08, 1.10, 40.74, 3.46, 26.65, 5.30, 1.83e-06, 1.80e-06, 1.80e-06, nan ], [ 8500, 106.42, 1.36, 128.56, 1.12, 41.24, 3.50, 26.93, 5.37, 2.01e-06, 2.13e-06, 2.07e-06, nan ], [ 8600, 104.55, 1.42, 130.22, 1.14, 41.71, 3.55, 27.36, 5.41, 1.73e-06, 1.70e-06, 1.73e-06, nan ], [ 8700, 104.70, 1.45, 129.83, 1.17, 42.03, 3.60, 27.42, 5.52, 1.96e-06, 1.99e-06, 1.91e-06, nan ], [ 8800, 103.13, 1.50, 129.94, 1.19, 41.57, 3.73, 27.05, 5.73, 1.97e-06, 1.91e-06, 1.97e-06, nan ], [ 8900, 103.49, 1.53, 129.56, 1.22, 42.71, 3.71, 27.50, 5.76, 1.92e-06, 1.89e-06, 1.89e-06, nan ], [ 9000, 104.74, 1.55, 129.71, 1.25, 42.53, 3.81, 27.66, 5.86, 2.12e-06, 1.95e-06, 1.98e-06, nan ], [ 10000, 103.25, 1.94, 131.85, 1.52, 47.52, 4.21, 27.63, 7.24, 2.32e-06, 2.34e-06, 2.37e-06, nan ], [ 12000, 104.28, 2.76, 138.14, 2.08, 46.86, 6.15, 28.20, 10.21, 2.20e-06, 2.36e-06, 2.24e-06, nan ], [ 14000, 110.00, 3.56, 140.47, 2.79, 47.26, 8.30, 28.60, 13.71, 2.69e-06, 2.86e-06, 2.93e-06, nan ], [ 16000, 111.32, 4.60, 140.06, 3.66, 46.57, 10.99, 28.70, 17.84, 2.72e-06, 2.69e-06, 2.66e-06, nan ], [ 18000, 108.82, 5.95, 144.85, 4.47, 47.66, 13.60, 29.10, 22.27, 2.63e-06, 2.77e-06, 2.63e-06, nan ], [ 20000, 110.59, 7.23, 146.55, 5.46, 48.07, 16.64, 29.69, 26.94, 2.93e-06, 2.95e-06, 3.03e-06, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/zgeqrf.txt # numactl --interleave=all ../testing/testing_zgeqrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 zgeqrf = array([ [ 10, 10, nan, nan, 0.03, 0.00, nan ], [ 20, 20, nan, nan, 0.20, 0.00, nan ], [ 30, 30, nan, nan, 0.60, 0.00, nan ], [ 40, 40, nan, nan, 0.67, 0.00, nan ], [ 50, 50, nan, nan, 1.19, 0.00, nan ], [ 60, 60, nan, nan, 1.82, 0.00, nan ], [ 70, 70, nan, nan, 1.67, 0.00, nan ], [ 80, 80, nan, nan, 2.33, 0.00, nan ], [ 90, 90, nan, nan, 3.05, 0.00, nan ], [ 100, 100, nan, nan, 4.02, 0.00, nan ], [ 200, 200, nan, nan, 13.25, 0.00, nan ], [ 300, 300, nan, nan, 28.80, 0.01, nan ], [ 400, 400, nan, nan, 45.63, 0.01, nan ], [ 500, 500, nan, nan, 64.89, 0.01, nan ], [ 600, 600, nan, nan, 83.71, 0.01, nan ], [ 700, 700, nan, nan, 104.84, 0.02, nan ], [ 800, 800, nan, nan, 124.62, 0.02, nan ], [ 900, 900, nan, nan, 142.89, 0.03, nan ], [ 1000, 1000, nan, nan, 166.61, 0.03, nan ], [ 2000, 2000, nan, nan, 392.27, 0.11, nan ], [ 3000, 3000, nan, nan, 617.21, 0.23, nan ], [ 4000, 4000, nan, nan, 752.86, 0.45, nan ], [ 5000, 5000, nan, nan, 843.50, 0.79, nan ], [ 6000, 6000, nan, nan, 919.89, 1.25, nan ], [ 7000, 7000, nan, nan, 963.62, 1.90, nan ], [ 8000, 8000, nan, nan, 1001.74, 2.73, nan ], [ 9000, 9000, nan, nan, 1013.66, 3.84, nan ], [ 10000, 10000, nan, nan, 1025.90, 5.20, nan ], [ 12000, 12000, nan, nan, 1060.31, 8.69, nan ], [ 14000, 14000, nan, nan, 1065.46, 13.74, nan ], [ 16000, 16000, nan, nan, 1086.57, 20.11, nan ], [ 18000, 18000, nan, nan, 1052.68, 29.55, nan ], [ 20000, 20000, nan, nan, 1086.37, 39.28, nan ], ]) # numactl --interleave=all ../testing/testing_zgeqrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 zgeqrf_gpu = array([ [ 10, 10, nan, nan, 0.00, 0.00, nan ], [ 20, 20, nan, nan, 0.04, 0.00, nan ], [ 30, 30, nan, nan, 0.12, 0.00, nan ], [ 40, 40, nan, nan, 0.27, 0.00, nan ], [ 50, 50, nan, nan, 0.50, 0.00, nan ], [ 60, 60, nan, nan, 0.81, 0.00, nan ], [ 70, 70, nan, nan, 1.87, 0.00, nan ], [ 80, 80, nan, nan, 2.68, 0.00, nan ], [ 90, 90, nan, nan, 3.38, 0.00, nan ], [ 100, 100, nan, nan, 2.44, 0.00, nan ], [ 200, 200, nan, nan, 10.65, 0.00, nan ], [ 300, 300, nan, nan, 24.62, 0.01, nan ], [ 400, 400, nan, nan, 40.02, 0.01, nan ], [ 500, 500, nan, nan, 58.90, 0.01, nan ], [ 600, 600, nan, nan, 76.82, 0.02, nan ], [ 700, 700, nan, nan, 96.76, 0.02, nan ], [ 800, 800, nan, nan, 116.19, 0.02, nan ], [ 900, 900, nan, nan, 133.96, 0.03, nan ], [ 1000, 1000, nan, nan, 156.90, 0.03, nan ], [ 2000, 2000, nan, nan, 380.77, 0.11, nan ], [ 3000, 3000, nan, nan, 619.00, 0.23, nan ], [ 4000, 4000, nan, nan, 753.39, 0.45, nan ], [ 5000, 5000, nan, nan, 811.99, 0.82, nan ], [ 6000, 6000, nan, nan, 901.27, 1.28, nan ], [ 7000, 7000, nan, nan, 954.28, 1.92, nan ], [ 8000, 8000, nan, nan, 997.31, 2.74, nan ], [ 9000, 9000, nan, nan, 1012.29, 3.84, nan ], [ 10000, 10000, nan, nan, 1028.54, 5.19, nan ], [ 12000, 12000, nan, nan, 1066.20, 8.65, nan ], [ 14000, 14000, nan, nan, 1076.92, 13.59, nan ], [ 16000, 16000, nan, nan, 1099.34, 19.87, nan ], [ 18000, 18000, nan, nan, 1059.24, 29.37, nan ], [ 20000, 20000, nan, nan, 1092.57, 39.06, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/zgesvd.txt # numactl --interleave=all ../testing/testing_zgesvd -UN -VN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 zgesvd_UN = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.00, nan ], [ nan, 80, 80, nan, 0.00, nan ], [ nan, 90, 90, nan, 0.00, nan ], [ nan, 100, 100, nan, 0.00, nan ], [ nan, 200, 200, nan, 0.02, nan ], [ nan, 300, 300, nan, 0.04, nan ], [ nan, 400, 400, nan, 0.07, nan ], [ nan, 500, 500, nan, 0.10, nan ], [ nan, 600, 600, nan, 0.14, nan ], [ nan, 700, 700, nan, 0.19, nan ], [ nan, 800, 800, nan, 0.24, nan ], [ nan, 900, 900, nan, 0.31, nan ], [ nan, 1000, 1000, nan, 0.38, nan ], [ nan, 2000, 2000, nan, 1.65, nan ], [ nan, 3000, 3000, nan, 4.43, nan ], [ nan, 4000, 4000, nan, 9.16, nan ], [ nan, 5000, 5000, nan, 16.45, nan ], [ nan, 6000, 6000, nan, 26.95, nan ], [ nan, 7000, 7000, nan, 40.59, nan ], [ nan, 8000, 8000, nan, 59.34, nan ], [ nan, 9000, 9000, nan, 81.91, nan ], [ nan, 10000, 10000, nan, 113.08, nan ], [ nan, 300, 100, nan, 0.00, nan ], [ nan, 600, 200, nan, 0.02, nan ], [ nan, 900, 300, nan, 0.05, nan ], [ nan, 1200, 400, nan, 0.09, nan ], [ nan, 1500, 500, nan, 0.14, nan ], [ nan, 1800, 600, nan, 0.19, nan ], [ nan, 2100, 700, nan, 0.26, nan ], [ nan, 2400, 800, nan, 0.33, nan ], [ nan, 2700, 900, nan, 0.45, nan ], [ nan, 3000, 1000, nan, 0.55, nan ], [ nan, 6000, 2000, nan, 2.72, nan ], [ nan, 9000, 3000, nan, 7.58, nan ], [ nan, 12000, 4000, nan, 16.04, nan ], [ nan, 15000, 5000, nan, 29.34, nan ], [ nan, 18000, 6000, nan, 48.41, nan ], [ nan, 21000, 7000, nan, 74.00, nan ], [ nan, 24000, 8000, nan, 109.63, nan ], [ nan, 27000, 9000, nan, 152.19, nan ], [ nan, 100, 300, nan, 0.00, nan ], [ nan, 200, 600, nan, 0.03, nan ], [ nan, 300, 900, nan, 0.06, nan ], [ nan, 400, 1200, nan, 0.09, nan ], [ nan, 500, 1500, nan, 0.14, nan ], [ nan, 600, 1800, nan, 0.20, nan ], [ nan, 700, 2100, nan, 0.27, nan ], [ nan, 800, 2400, nan, 0.35, nan ], [ nan, 900, 2700, nan, 0.44, nan ], [ nan, 1000, 3000, nan, 0.54, nan ], [ nan, 2000, 6000, nan, 2.65, nan ], [ nan, 3000, 9000, nan, 7.45, nan ], [ nan, 4000, 12000, nan, 15.92, nan ], [ nan, 5000, 15000, nan, 29.27, nan ], [ nan, 6000, 18000, nan, 48.93, nan ], [ nan, 7000, 21000, nan, 75.28, nan ], [ nan, 8000, 24000, nan, 111.25, nan ], [ nan, 9000, 27000, nan, 154.86, nan ], [ nan, 10000, 100, nan, 0.04, nan ], [ nan, 20000, 200, nan, 0.14, nan ], [ nan, 30000, 300, nan, 0.34, nan ], [ nan, 40000, 400, nan, 0.92, nan ], [ nan, 50000, 500, nan, 1.51, nan ], [ nan, 60000, 600, nan, 2.24, nan ], [ nan, 70000, 700, nan, 3.17, nan ], [ nan, 80000, 800, nan, 4.32, nan ], [ nan, 90000, 900, nan, 6.39, nan ], [ nan, 100000, 1000, nan, 8.07, nan ], [ nan, 200000, 2000, nan, 46.25, nan ], [ nan, 100, 10000, nan, 0.03, nan ], [ nan, 200, 20000, nan, 0.14, nan ], [ nan, 300, 30000, nan, 0.37, nan ], [ nan, 400, 40000, nan, 0.76, nan ], [ nan, 500, 50000, nan, 1.42, nan ], [ nan, 600, 60000, nan, 2.40, nan ], [ nan, 700, 70000, nan, 3.65, nan ], [ nan, 800, 80000, nan, 5.71, nan ], [ nan, 900, 90000, nan, 6.29, nan ], [ nan, 1000, 100000, nan, 8.23, nan ], [ nan, 2000, 200000, nan, 52.39, nan ], ]) # numactl --interleave=all ../testing/testing_zgesvd -US -VS -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 zgesvd_US = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.01, nan ], [ nan, 60, 60, nan, 0.01, nan ], [ nan, 70, 70, nan, 0.01, nan ], [ nan, 80, 80, nan, 0.01, nan ], [ nan, 90, 90, nan, 0.02, nan ], [ nan, 100, 100, nan, 0.02, nan ], [ nan, 200, 200, nan, 0.03, nan ], [ nan, 300, 300, nan, 0.08, nan ], [ nan, 400, 400, nan, 0.13, nan ], [ nan, 500, 500, nan, 0.21, nan ], [ nan, 600, 600, nan, 0.30, nan ], [ nan, 700, 700, nan, 0.44, nan ], [ nan, 800, 800, nan, 0.56, nan ], [ nan, 900, 900, nan, 0.73, nan ], [ nan, 1000, 1000, nan, 0.91, nan ], [ nan, 2000, 2000, nan, 4.42, nan ], [ nan, 3000, 3000, nan, 11.70, nan ], [ nan, 4000, 4000, nan, 23.44, nan ], [ nan, 5000, 5000, nan, 42.13, nan ], [ nan, 6000, 6000, nan, 67.29, nan ], [ nan, 7000, 7000, nan, 102.72, nan ], [ nan, 8000, 8000, nan, 144.77, nan ], [ nan, 9000, 9000, nan, 204.11, nan ], [ nan, 10000, 10000, nan, 269.33, nan ], [ nan, 300, 100, nan, 0.03, nan ], [ nan, 600, 200, nan, 0.05, nan ], [ nan, 900, 300, nan, 0.11, nan ], [ nan, 1200, 400, nan, 0.20, nan ], [ nan, 1500, 500, nan, 0.32, nan ], [ nan, 1800, 600, nan, 0.47, nan ], [ nan, 2100, 700, nan, 0.69, nan ], [ nan, 2400, 800, nan, 0.92, nan ], [ nan, 2700, 900, nan, 1.21, nan ], [ nan, 3000, 1000, nan, 1.56, nan ], [ nan, 6000, 2000, nan, 8.36, nan ], [ nan, 9000, 3000, nan, 24.47, nan ], [ nan, 12000, 4000, nan, 50.80, nan ], [ nan, 15000, 5000, nan, 95.80, nan ], [ nan, 18000, 6000, nan, 155.11, nan ], [ nan, 21000, 7000, nan, 247.36, nan ], [ nan, 24000, 8000, nan, 349.44, nan ], [ nan, 27000, 9000, nan, 505.15, nan ], [ nan, 100, 300, nan, 0.02, nan ], [ nan, 200, 600, nan, 0.09, nan ], [ nan, 300, 900, nan, 0.26, nan ], [ nan, 400, 1200, nan, 0.55, nan ], [ nan, 500, 1500, nan, 1.01, nan ], [ nan, 600, 1800, nan, 1.68, nan ], [ nan, 700, 2100, nan, 2.80, nan ], [ nan, 800, 2400, nan, 4.25, nan ], [ nan, 900, 2700, nan, 6.30, nan ], [ nan, 1000, 3000, nan, 8.68, nan ], [ nan, 2000, 6000, nan, 67.62, nan ], [ nan, 3000, 9000, nan, 218.64, nan ], [ nan, 4000, 12000, nan, 522.39, nan ], [ nan, 5000, 15000, nan, 978.86, nan ], [ nan, 6000, 18000, nan, 1689.01, nan ], [ nan, 7000, 21000, nan, 2645.05, nan ], [ nan, 8000, 24000, nan, 3888.23, nan ], [ nan, 9000, 27000, nan, 5567.58, nan ], [ nan, 10000, 100, nan, 0.12, nan ], [ nan, 20000, 200, nan, 0.37, nan ], [ nan, 30000, 300, nan, 0.93, nan ], [ nan, 40000, 400, nan, 2.19, nan ], [ nan, 50000, 500, nan, 3.85, nan ], [ nan, 60000, 600, nan, 6.07, nan ], [ nan, 70000, 700, nan, 9.08, nan ], [ nan, 80000, 800, nan, 12.51, nan ], [ nan, 90000, 900, nan, 18.42, nan ], [ nan, 100000, 1000, nan, 23.63, nan ], [ nan, 200000, 2000, nan, 162.04, nan ], [ nan, 100, 10000, nan, 0.30, nan ], [ nan, 200, 20000, nan, 3.03, nan ], [ nan, 300, 30000, nan, 9.53, nan ], [ nan, 400, 40000, nan, 20.84, nan ], [ nan, 500, 50000, nan, 41.41, nan ], [ nan, 600, 60000, nan, 67.98, nan ], [ nan, 700, 70000, nan, 103.39, nan ], [ nan, 800, 80000, nan, 160.38, nan ], [ nan, 900, 90000, nan, 226.14, nan ], [ nan, 1000, 100000, nan, 298.09, nan ], [ nan, 2000, 200000, nan, 2272.09, nan ], ]) # numactl --interleave=all ../testing/testing_zgesdd -UN -VN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 zgesdd_UN = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.00, nan ], [ nan, 80, 80, nan, 0.00, nan ], [ nan, 90, 90, nan, 0.00, nan ], [ nan, 100, 100, nan, 0.00, nan ], [ nan, 200, 200, nan, 0.02, nan ], [ nan, 300, 300, nan, 0.04, nan ], [ nan, 400, 400, nan, 0.07, nan ], [ nan, 500, 500, nan, 0.11, nan ], [ nan, 600, 600, nan, 0.15, nan ], [ nan, 700, 700, nan, 0.20, nan ], [ nan, 800, 800, nan, 0.25, nan ], [ nan, 900, 900, nan, 0.32, nan ], [ nan, 1000, 1000, nan, 0.39, nan ], [ nan, 2000, 2000, nan, 1.68, nan ], [ nan, 3000, 3000, nan, 4.49, nan ], [ nan, 4000, 4000, nan, 9.27, nan ], [ nan, 5000, 5000, nan, 16.59, nan ], [ nan, 6000, 6000, nan, 27.14, nan ], [ nan, 7000, 7000, nan, 40.88, nan ], [ nan, 8000, 8000, nan, 59.86, nan ], [ nan, 9000, 9000, nan, 82.61, nan ], [ nan, 10000, 10000, nan, 113.91, nan ], [ nan, 300, 100, nan, 0.00, nan ], [ nan, 600, 200, nan, 0.03, nan ], [ nan, 900, 300, nan, 0.05, nan ], [ nan, 1200, 400, nan, 0.10, nan ], [ nan, 1500, 500, nan, 0.14, nan ], [ nan, 1800, 600, nan, 0.21, nan ], [ nan, 2100, 700, nan, 0.29, nan ], [ nan, 2400, 800, nan, 0.38, nan ], [ nan, 2700, 900, nan, 0.51, nan ], [ nan, 3000, 1000, nan, 0.65, nan ], [ nan, 6000, 2000, nan, 3.16, nan ], [ nan, 9000, 3000, nan, 9.35, nan ], [ nan, 12000, 4000, nan, 19.92, nan ], [ nan, 15000, 5000, nan, 36.61, nan ], [ nan, 18000, 6000, nan, 59.62, nan ], [ nan, 21000, 7000, nan, 92.49, nan ], [ nan, 24000, 8000, nan, 117.98, nan ], [ nan, 27000, 9000, nan, 187.83, nan ], [ nan, 100, 300, nan, 0.01, nan ], [ nan, 200, 600, nan, 0.03, nan ], [ nan, 300, 900, nan, 0.06, nan ], [ nan, 400, 1200, nan, 0.10, nan ], [ nan, 500, 1500, nan, 0.15, nan ], [ nan, 600, 1800, nan, 0.22, nan ], [ nan, 700, 2100, nan, 0.30, nan ], [ nan, 800, 2400, nan, 0.40, nan ], [ nan, 900, 2700, nan, 0.52, nan ], [ nan, 1000, 3000, nan, 0.65, nan ], [ nan, 2000, 6000, nan, 3.49, nan ], [ nan, 3000, 9000, nan, 10.22, nan ], [ nan, 4000, 12000, nan, 22.45, nan ], [ nan, 5000, 15000, nan, 42.14, nan ], [ nan, 6000, 18000, nan, 70.81, nan ], [ nan, 7000, 21000, nan, 110.01, nan ], [ nan, 8000, 24000, nan, 162.02, nan ], [ nan, 9000, 27000, nan, 159.23, nan ], [ nan, 10000, 100, nan, 0.04, nan ], [ nan, 20000, 200, nan, 0.14, nan ], [ nan, 30000, 300, nan, 0.33, nan ], [ nan, 40000, 400, nan, 0.93, nan ], [ nan, 50000, 500, nan, 1.50, nan ], [ nan, 60000, 600, nan, 2.25, nan ], [ nan, 70000, 700, nan, 3.18, nan ], [ nan, 80000, 800, nan, 4.28, nan ], [ nan, 90000, 900, nan, 6.37, nan ], [ nan, 100000, 1000, nan, 8.06, nan ], [ nan, 200000, 2000, nan, 46.19, nan ], [ nan, 100, 10000, nan, 0.03, nan ], [ nan, 200, 20000, nan, 0.14, nan ], [ nan, 300, 30000, nan, 0.37, nan ], [ nan, 400, 40000, nan, 0.77, nan ], [ nan, 500, 50000, nan, 1.42, nan ], [ nan, 600, 60000, nan, 2.36, nan ], [ nan, 700, 70000, nan, 3.63, nan ], [ nan, 800, 80000, nan, 5.75, nan ], [ nan, 900, 90000, nan, 6.28, nan ], [ nan, 1000, 100000, nan, 8.15, nan ], [ nan, 2000, 200000, nan, 52.04, nan ], ]) # numactl --interleave=all ../testing/testing_zgesdd -US -VS -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 -N 300,100 -N 600,200 -N 900,300 -N 1200,400 -N 1500,500 -N 1800,600 -N 2100,700 -N 2400,800 -N 2700,900 -N 3000,1000 -N 6000,2000 -N 9000,3000 -N 12000,4000 -N 15000,5000 -N 18000,6000 -N 21000,7000 -N 24000,8000 -N 27000,9000 -N 100,300 -N 200,600 -N 300,900 -N 400,1200 -N 500,1500 -N 600,1800 -N 700,2100 -N 800,2400 -N 900,2700 -N 1000,3000 -N 2000,6000 -N 3000,9000 -N 4000,12000 -N 5000,15000 -N 6000,18000 -N 7000,21000 -N 8000,24000 -N 9000,27000 -N 10000,100 -N 20000,200 -N 30000,300 -N 40000,400 -N 50000,500 -N 60000,600 -N 70000,700 -N 80000,800 -N 90000,900 -N 100000,1000 -N 200000,2000 -N 100,10000 -N 200,20000 -N 300,30000 -N 400,40000 -N 500,50000 -N 600,60000 -N 700,70000 -N 800,80000 -N 900,90000 -N 1000,100000 -N 2000,200000 zgesdd_US = array([ [ nan, 10, 10, nan, 0.00, nan ], [ nan, 20, 20, nan, 0.00, nan ], [ nan, 30, 30, nan, 0.00, nan ], [ nan, 40, 40, nan, 0.00, nan ], [ nan, 50, 50, nan, 0.00, nan ], [ nan, 60, 60, nan, 0.00, nan ], [ nan, 70, 70, nan, 0.01, nan ], [ nan, 80, 80, nan, 0.01, nan ], [ nan, 90, 90, nan, 0.01, nan ], [ nan, 100, 100, nan, 0.01, nan ], [ nan, 200, 200, nan, 0.04, nan ], [ nan, 300, 300, nan, 0.08, nan ], [ nan, 400, 400, nan, 0.13, nan ], [ nan, 500, 500, nan, 0.19, nan ], [ nan, 600, 600, nan, 0.27, nan ], [ nan, 700, 700, nan, 0.35, nan ], [ nan, 800, 800, nan, 0.42, nan ], [ nan, 900, 900, nan, 0.52, nan ], [ nan, 1000, 1000, nan, 0.65, nan ], [ nan, 2000, 2000, nan, 2.84, nan ], [ nan, 3000, 3000, nan, 7.86, nan ], [ nan, 4000, 4000, nan, 14.50, nan ], [ nan, 5000, 5000, nan, 25.34, nan ], [ nan, 6000, 6000, nan, 40.82, nan ], [ nan, 7000, 7000, nan, 60.47, nan ], [ nan, 8000, 8000, nan, 87.49, nan ], [ nan, 9000, 9000, nan, 114.55, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/zgetrf.txt # numactl --interleave=all ../testing/testing_zgetrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 zgetrf = array([ [ 10, 10, nan, nan, 0.24, 0.00, nan ], [ 20, 20, nan, nan, 0.70, 0.00, nan ], [ 30, 30, nan, nan, 1.65, 0.00, nan ], [ 40, 40, nan, nan, 2.92, 0.00, nan ], [ 50, 50, nan, nan, 2.67, 0.00, nan ], [ 60, 60, nan, nan, 4.04, 0.00, nan ], [ 70, 70, nan, nan, 0.99, 0.00, nan ], [ 80, 80, nan, nan, 1.38, 0.00, nan ], [ 90, 90, nan, nan, 1.86, 0.00, nan ], [ 100, 100, nan, nan, 2.37, 0.00, nan ], [ 200, 200, nan, nan, 10.08, 0.00, nan ], [ 300, 300, nan, nan, 22.19, 0.00, nan ], [ 400, 400, nan, nan, 35.50, 0.00, nan ], [ 500, 500, nan, nan, 51.16, 0.01, nan ], [ 600, 600, nan, nan, 67.19, 0.01, nan ], [ 700, 700, nan, nan, 85.26, 0.01, nan ], [ 800, 800, nan, nan, 104.65, 0.01, nan ], [ 900, 900, nan, nan, 121.40, 0.02, nan ], [ 1000, 1000, nan, nan, 140.36, 0.02, nan ], [ 2000, 2000, nan, nan, 337.28, 0.06, nan ], [ 3000, 3000, nan, nan, 518.22, 0.14, nan ], [ 4000, 4000, nan, nan, 628.86, 0.27, nan ], [ 5000, 5000, nan, nan, 679.77, 0.49, nan ], [ 6000, 6000, nan, nan, 773.23, 0.74, nan ], [ 7000, 7000, nan, nan, 830.05, 1.10, nan ], [ 8000, 8000, nan, nan, 883.49, 1.55, nan ], [ 9000, 9000, nan, nan, 895.76, 2.17, nan ], [ 10000, 10000, nan, nan, 934.98, 2.85, nan ], [ 12000, 12000, nan, nan, 988.22, 4.66, nan ], [ 14000, 14000, nan, nan, 1023.69, 7.15, nan ], [ 16000, 16000, nan, nan, 1051.55, 10.39, nan ], [ 18000, 18000, nan, nan, 1060.84, 14.66, nan ], [ 20000, 20000, nan, nan, 1077.25, 19.80, nan ], ]) # numactl --interleave=all ../testing/testing_zgetrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 zgetrf_gpu = array([ [ 10, 10, nan, nan, 0.01, 0.00, nan ], [ 20, 20, nan, nan, 0.08, 0.00, nan ], [ 30, 30, nan, nan, 0.26, 0.00, nan ], [ 40, 40, nan, nan, 0.58, 0.00, nan ], [ 50, 50, nan, nan, 0.89, 0.00, nan ], [ 60, 60, nan, nan, 1.43, 0.00, nan ], [ 70, 70, nan, nan, 0.51, 0.00, nan ], [ 80, 80, nan, nan, 0.82, 0.00, nan ], [ 90, 90, nan, nan, 1.11, 0.00, nan ], [ 100, 100, nan, nan, 1.45, 0.00, nan ], [ 200, 200, nan, nan, 7.00, 0.00, nan ], [ 300, 300, nan, nan, 17.59, 0.00, nan ], [ 400, 400, nan, nan, 31.04, 0.01, nan ], [ 500, 500, nan, nan, 49.68, 0.01, nan ], [ 600, 600, nan, nan, 67.35, 0.01, nan ], [ 700, 700, nan, nan, 88.73, 0.01, nan ], [ 800, 800, nan, nan, 110.91, 0.01, nan ], [ 900, 900, nan, nan, 134.44, 0.01, nan ], [ 1000, 1000, nan, nan, 163.87, 0.02, nan ], [ 2000, 2000, nan, nan, 412.29, 0.05, nan ], [ 3000, 3000, nan, nan, 635.10, 0.11, nan ], [ 4000, 4000, nan, nan, 755.79, 0.23, nan ], [ 5000, 5000, nan, nan, 796.58, 0.42, nan ], [ 6000, 6000, nan, nan, 888.50, 0.65, nan ], [ 7000, 7000, nan, nan, 942.64, 0.97, nan ], [ 8000, 8000, nan, nan, 995.14, 1.37, nan ], [ 9000, 9000, nan, nan, 1005.68, 1.93, nan ], [ 10000, 10000, nan, nan, 1040.82, 2.56, nan ], [ 12000, 12000, nan, nan, 1082.99, 4.25, nan ], [ 14000, 14000, nan, nan, 1109.47, 6.60, nan ], [ 16000, 16000, nan, nan, 1130.70, 9.66, nan ], [ 18000, 18000, nan, nan, 1130.42, 13.76, nan ], [ 20000, 20000, nan, nan, 1141.78, 18.68, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/zheevd.txt # numactl --interleave=all ../testing/testing_zheevd -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_zheevd -JN -N 123 -N 1234 --range 12000:20000:2000 zheevd_JN = array([ [ 10, nan, 0.0000, nan, nan, nan, nan ], [ 20, nan, 0.0001, nan, nan, nan, nan ], [ 30, nan, 0.0001, nan, nan, nan, nan ], [ 40, nan, 0.0002, nan, nan, nan, nan ], [ 50, nan, 0.0003, nan, nan, nan, nan ], [ 60, nan, 0.0004, nan, nan, nan, nan ], [ 70, nan, 0.0006, nan, nan, nan, nan ], [ 80, nan, 0.0009, nan, nan, nan, nan ], [ 90, nan, 0.0012, nan, nan, nan, nan ], [ 100, nan, 0.0016, nan, nan, nan, nan ], [ 200, nan, 0.0066, nan, nan, nan, nan ], [ 300, nan, 0.0135, nan, nan, nan, nan ], [ 400, nan, 0.0236, nan, nan, nan, nan ], [ 500, nan, 0.0363, nan, nan, nan, nan ], [ 600, nan, 0.0522, nan, nan, nan, nan ], [ 700, nan, 0.0729, nan, nan, nan, nan ], [ 800, nan, 0.0957, nan, nan, nan, nan ], [ 900, nan, 0.1250, nan, nan, nan, nan ], [ 1000, nan, 0.1551, nan, nan, nan, nan ], [ 2000, nan, 0.7983, nan, nan, nan, nan ], [ 3000, nan, 2.0276, nan, nan, nan, nan ], [ 4000, nan, 3.9053, nan, nan, nan, nan ], [ 5000, nan, 6.5959, nan, nan, nan, nan ], [ 6000, nan, 10.3139, nan, nan, nan, nan ], [ 7000, nan, 15.0515, nan, nan, nan, nan ], [ 8000, nan, 21.1750, nan, nan, nan, nan ], [ 9000, nan, 28.9088, nan, nan, nan, nan ], [ 10000, nan, 38.1991, nan, nan, nan, nan ], [ 12000, nan, 60.9986, nan, nan, nan, nan ], [ 14000, nan, 92.8384, nan, nan, nan, nan ], [ 16000, nan, 134.8674, nan, nan, nan, nan ], [ 18000, nan, 189.3054, nan, nan, nan, nan ], [ 20000, nan, 257.6523, nan, nan, nan, nan ], ]) # numactl --interleave=all ../testing/testing_zheevd -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_zheevd -JV -N 123 -N 1234 --range 12000:20000:2000 zheevd_JV = array([ [ 10, nan, 0.0002, nan, nan, nan, nan ], [ 20, nan, 0.0002, nan, nan, nan, nan ], [ 30, nan, 0.0004, nan, nan, nan, nan ], [ 40, nan, 0.0006, nan, nan, nan, nan ], [ 50, nan, 0.0008, nan, nan, nan, nan ], [ 60, nan, 0.0010, nan, nan, nan, nan ], [ 70, nan, 0.0015, nan, nan, nan, nan ], [ 80, nan, 0.0020, nan, nan, nan, nan ], [ 90, nan, 0.0025, nan, nan, nan, nan ], [ 100, nan, 0.0031, nan, nan, nan, nan ], [ 200, nan, 0.0151, nan, nan, nan, nan ], [ 300, nan, 0.0254, nan, nan, nan, nan ], [ 400, nan, 0.0427, nan, nan, nan, nan ], [ 500, nan, 0.0637, nan, nan, nan, nan ], [ 600, nan, 0.0841, nan, nan, nan, nan ], [ 700, nan, 0.1146, nan, nan, nan, nan ], [ 800, nan, 0.1469, nan, nan, nan, nan ], [ 900, nan, 0.1908, nan, nan, nan, nan ], [ 1000, nan, 0.2328, nan, nan, nan, nan ], [ 2000, nan, 1.0885, nan, nan, nan, nan ], [ 3000, nan, 2.4379, nan, nan, nan, nan ], [ 4000, nan, 4.6361, nan, nan, nan, nan ], [ 5000, nan, 7.7226, nan, nan, nan, nan ], [ 6000, nan, 12.1252, nan, nan, nan, nan ], [ 7000, nan, 17.9808, nan, nan, nan, nan ], [ 8000, nan, 25.4648, nan, nan, nan, nan ], [ 9000, nan, 34.8593, nan, nan, nan, nan ], [ 10000, nan, 46.1960, nan, nan, nan, nan ], [ 12000, nan, 74.9908, nan, nan, nan, nan ], [ 14000, nan, 114.6719, nan, nan, nan, nan ], [ 16000, nan, 167.3222, nan, nan, nan, nan ], [ 18000, nan, 240.0484, nan, nan, nan, nan ], [ 20000, nan, 325.0192, nan, nan, nan, nan ], ]) # numactl --interleave=all ../testing/testing_zheevd_gpu -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_zheevd_gpu -JN -N 123 -N 1234 --range 12000:20000:2000 zheevd_gpu_JN = array([ [ 10, nan, 0.0002, nan, nan, nan, nan ], [ 20, nan, 0.0002, nan, nan, nan, nan ], [ 30, nan, 0.0003, nan, nan, nan, nan ], [ 40, nan, 0.0003, nan, nan, nan, nan ], [ 50, nan, 0.0005, nan, nan, nan, nan ], [ 60, nan, 0.0006, nan, nan, nan, nan ], [ 70, nan, 0.0009, nan, nan, nan, nan ], [ 80, nan, 0.0012, nan, nan, nan, nan ], [ 90, nan, 0.0015, nan, nan, nan, nan ], [ 100, nan, 0.0019, nan, nan, nan, nan ], [ 200, nan, 0.0073, nan, nan, nan, nan ], [ 300, nan, 0.0147, nan, nan, nan, nan ], [ 400, nan, 0.0257, nan, nan, nan, nan ], [ 500, nan, 0.0396, nan, nan, nan, nan ], [ 600, nan, 0.0567, nan, nan, nan, nan ], [ 700, nan, 0.0788, nan, nan, nan, nan ], [ 800, nan, 0.1032, nan, nan, nan, nan ], [ 900, nan, 0.1339, nan, nan, nan, nan ], [ 1000, nan, 0.1665, nan, nan, nan, nan ], [ 2000, nan, 0.8288, nan, nan, nan, nan ], [ 3000, nan, 2.0168, nan, nan, nan, nan ], [ 4000, nan, 3.8777, nan, nan, nan, nan ], [ 5000, nan, 6.5738, nan, nan, nan, nan ], [ 6000, nan, 10.2345, nan, nan, nan, nan ], [ 7000, nan, 15.0260, nan, nan, nan, nan ], [ 8000, nan, 21.0258, nan, nan, nan, nan ], [ 9000, nan, 28.6735, nan, nan, nan, nan ], [ 10000, nan, 37.7639, nan, nan, nan, nan ], [ 12000, nan, 60.8922, nan, nan, nan, nan ], [ 14000, nan, 92.3358, nan, nan, nan, nan ], [ 16000, nan, 134.6948, nan, nan, nan, nan ], [ 18000, nan, 188.2464, nan, nan, nan, nan ], [ 20000, nan, nan, nan, nan, nan, nan ], # failed to run ]) # numactl --interleave=all ../testing/testing_zheevd_gpu -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:10000:1000 # numactl --interleave=all ../testing/testing_zheevd_gpu -JV -N 123 -N 1234 --range 12000:20000:2000 zheevd_gpu_JV = array([ [ 10, nan, 0.0004, nan, nan, nan, nan ], [ 20, nan, 0.0005, nan, nan, nan, nan ], [ 30, nan, 0.0006, nan, nan, nan, nan ], [ 40, nan, 0.0008, nan, nan, nan, nan ], [ 50, nan, 0.0010, nan, nan, nan, nan ], [ 60, nan, 0.0013, nan, nan, nan, nan ], [ 70, nan, 0.0017, nan, nan, nan, nan ], [ 80, nan, 0.0022, nan, nan, nan, nan ], [ 90, nan, 0.0026, nan, nan, nan, nan ], [ 100, nan, 0.0032, nan, nan, nan, nan ], [ 200, nan, 0.0139, nan, nan, nan, nan ], [ 300, nan, 0.0217, nan, nan, nan, nan ], [ 400, nan, 0.0347, nan, nan, nan, nan ], [ 500, nan, 0.0518, nan, nan, nan, nan ], [ 600, nan, 0.0695, nan, nan, nan, nan ], [ 700, nan, 0.0948, nan, nan, nan, nan ], [ 800, nan, 0.1221, nan, nan, nan, nan ], [ 900, nan, 0.1565, nan, nan, nan, nan ], [ 1000, nan, 0.1968, nan, nan, nan, nan ], [ 2000, nan, 0.9374, nan, nan, nan, nan ], [ 3000, nan, 2.3136, nan, nan, nan, nan ], [ 4000, nan, 4.4228, nan, nan, nan, nan ], [ 5000, nan, 7.6197, nan, nan, nan, nan ], [ 6000, nan, 11.9714, nan, nan, nan, nan ], [ 7000, nan, 17.6985, nan, nan, nan, nan ], [ 8000, nan, 25.1101, nan, nan, nan, nan ], [ 9000, nan, 34.8214, nan, nan, nan, nan ], [ 10000, nan, 45.9189, nan, nan, nan, nan ], [ 12000, nan, 76.1595, nan, nan, nan, nan ], [ 14000, nan, 117.6711, nan, nan, nan, nan ], [ 16000, nan, 169.1880, nan, nan, nan, nan ], [ 18000, nan, 238.5689, nan, nan, nan, nan ], [ 20000, nan, nan, nan, nan, nan, nan ], # failed to run ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/zheevd_2stage.txt # numactl --interleave=all ../testing/testing_zheevdx_2stage -JN -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 zheevdx_2stage_JN = array([ [ 10, 10, 0.00 ], [ 20, 20, 0.00 ], [ 30, 30, 0.00 ], [ 40, 40, 0.00 ], [ 50, 50, 0.00 ], [ 60, 60, 0.00 ], [ 70, 70, 0.00 ], [ 80, 80, 0.00 ], [ 90, 90, 0.00 ], [ 100, 100, 0.00 ], [ 200, 200, 0.01 ], [ 300, 300, 0.04 ], [ 400, 400, 0.07 ], [ 500, 500, 0.10 ], [ 600, 600, 0.14 ], [ 700, 700, 0.18 ], [ 800, 800, 0.22 ], [ 900, 900, 0.28 ], [ 1000, 1000, 0.31 ], [ 2000, 2000, 0.73 ], [ 3000, 3000, 1.38 ], [ 4000, 4000, 2.21 ], [ 5000, 5000, 3.24 ], [ 6000, 6000, 4.56 ], [ 7000, 7000, 6.06 ], [ 8000, 8000, 7.71 ], [ 9000, 9000, 10.22 ], [ 10000, 10000, 12.83 ], [ 12000, 12000, 19.36 ], [ 14000, 14000, 27.85 ], [ 16000, 16000, 39.63 ], [ 18000, 18000, 54.54 ], [ 20000, 20000, 72.02 ], ]) # numactl --interleave=all ../testing/testing_zheevdx_2stage -JV -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 zheevdx_2stage_JV = array([ [ 10, 10, 0.00 ], [ 20, 20, 0.00 ], [ 30, 30, 0.00 ], [ 40, 40, 0.00 ], [ 50, 50, 0.00 ], [ 60, 60, 0.00 ], [ 70, 70, 0.00 ], [ 80, 80, 0.00 ], [ 90, 90, 0.00 ], [ 100, 100, 0.00 ], [ 200, 200, 0.01 ], [ 300, 300, 0.05 ], [ 400, 400, 0.08 ], [ 500, 500, 0.13 ], [ 600, 600, 0.16 ], [ 700, 700, 0.21 ], [ 800, 800, 0.25 ], [ 900, 900, 0.31 ], [ 1000, 1000, 0.36 ], [ 2000, 2000, 0.99 ], [ 3000, 3000, 2.05 ], [ 4000, 4000, 3.70 ], [ 5000, 5000, 5.96 ], [ 6000, 6000, 9.13 ], [ 7000, 7000, 12.63 ], [ 8000, 8000, 17.80 ], [ 9000, 9000, 24.84 ], [ 10000, 10000, 32.58 ], [ 12000, 12000, 53.73 ], [ 14000, 14000, 85.04 ], [ 16000, 16000, 122.13 ], [ 18000, 18000, 179.24 ], [ 20000, 20000, 185.08 ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/zhemv.txt # numactl --interleave=all ../testing/testing_zhemv -L -N 123 -N 1234 --range 10:90:1 --range 100:900:10 --range 1000:9000:100 --range 10000:20000:2000 zhemv_L = array([ [ 10, 0.02, 0.04, 0.03, 0.03, 0.04, 0.03, 0.30, 0.00, 7.12e-16, 3.55e-16, 7.12e-16, nan ], [ 11, 0.03, 0.04, 0.04, 0.03, 0.05, 0.02, 0.51, 0.00, 2.28e-16, 2.28e-16, 2.42e-16, nan ], [ 12, 0.04, 0.03, 0.04, 0.03, 0.06, 0.02, 0.60, 0.00, 3.99e-16, 4.50e-16, 3.05e-16, nan ], [ 13, 0.04, 0.04, 0.05, 0.03, 0.07, 0.02, 0.53, 0.00, 3.06e-16, 5.47e-16, 2.82e-16, nan ], [ 14, 0.05, 0.04, 0.06, 0.03, 0.08, 0.02, 0.81, 0.00, 2.84e-16, 3.59e-16, 2.84e-16, nan ], [ 15, 0.06, 0.03, 0.06, 0.03, 0.09, 0.02, 0.64, 0.00, 2.65e-16, 2.96e-16, 2.96e-16, nan ], [ 16, 0.07, 0.03, 0.07, 0.03, 0.10, 0.02, 0.72, 0.00, 2.48e-16, 4.46e-16, 2.48e-16, nan ], [ 17, 0.07, 0.03, 0.08, 0.03, 0.11, 0.02, 1.32, 0.00, 4.67e-16, 7.01e-16, 4.31e-16, nan ], [ 18, 0.08, 0.03, 0.09, 0.03, 0.12, 0.02, 1.31, 0.00, 2.21e-16, 4.07e-16, 4.07e-16, nan ], [ 19, 0.09, 0.03, 0.10, 0.03, 0.13, 0.02, 1.09, 0.00, 3.74e-16, 4.18e-16, 3.74e-16, nan ], [ 20, 0.10, 0.04, 0.11, 0.03, 0.15, 0.02, 1.11, 0.00, 4.19e-16, 4.19e-16, 3.97e-16, nan ], [ 21, 0.10, 0.04, 0.12, 0.03, 0.16, 0.02, 1.32, 0.00, 3.49e-16, 4.79e-16, 4.23e-16, nan ], [ 22, 0.11, 0.04, 0.13, 0.03, 0.18, 0.02, 1.33, 0.00, 5.11e-16, 4.84e-16, 5.82e-16, nan ], [ 23, 0.13, 0.03, 0.14, 0.03, 0.19, 0.02, 1.45, 0.00, 2.18e-16, 3.45e-16, 3.45e-16, nan ], [ 24, 0.14, 0.03, 0.15, 0.03, 0.22, 0.02, 1.58, 0.00, 7.55e-16, 3.05e-16, 3.31e-16, nan ], [ 25, 0.16, 0.03, 0.17, 0.03, 0.22, 0.02, 1.71, 0.00, 3.18e-16, 3.55e-16, 3.04e-16, nan ], [ 26, 0.17, 0.03, 0.18, 0.03, 0.24, 0.02, 1.41, 0.00, 4.32e-16, 3.86e-16, 3.42e-16, nan ], [ 27, 0.18, 0.04, 0.20, 0.03, 0.27, 0.02, 1.52, 0.00, 5.62e-16, 3.29e-16, 3.96e-16, nan ], [ 28, 0.20, 0.03, 0.21, 0.03, 0.27, 0.02, 2.31, 0.00, 3.86e-16, 4.57e-16, 4.57e-16, nan ], [ 29, 0.20, 0.04, 0.23, 0.03, 0.29, 0.02, 1.75, 0.00, 3.87e-16, 4.90e-16, 3.87e-16, nan ], [ 30, 0.23, 0.03, 0.24, 0.03, 0.32, 0.02, 1.87, 0.00, 5.30e-16, 4.27e-16, 4.74e-16, nan ], [ 31, 0.22, 0.04, 0.25, 0.03, 0.32, 0.03, 1.99, 0.00, 5.13e-16, 4.73e-16, 2.72e-16, nan ], [ 32, 0.24, 0.04, 0.29, 0.03, 0.34, 0.03, 2.12, 0.00, 2.48e-16, 4.58e-16, 4.00e-16, nan ], [ 33, 0.25, 0.04, 0.21, 0.04, 0.35, 0.03, 1.82, 0.01, 4.44e-16, 4.44e-16, 4.44e-16, nan ], [ 34, 0.25, 0.04, 0.24, 0.04, 0.39, 0.03, 1.93, 0.01, 8.93e-16, 4.67e-16, 8.62e-16, nan ], [ 35, 0.29, 0.03, 0.25, 0.04, 0.41, 0.02, 2.04, 0.01, 4.09e-16, 4.54e-16, 6.11e-16, nan ], [ 36, 0.30, 0.04, 0.26, 0.04, 0.42, 0.03, 2.16, 0.01, 4.41e-16, 4.93e-16, 5.94e-16, nan ], [ 37, 0.31, 0.04, 0.28, 0.04, 0.42, 0.03, 2.28, 0.01, 6.07e-16, 4.29e-16, 3.96e-16, nan ], [ 38, 0.34, 0.04, 0.29, 0.04, 0.46, 0.03, 2.40, 0.01, 3.85e-16, 5.91e-16, 4.18e-16, nan ], [ 39, 0.33, 0.04, 0.31, 0.04, 0.49, 0.03, 2.12, 0.01, 5.76e-16, 3.67e-16, 3.76e-16, nan ], [ 40, 0.38, 0.04, 0.32, 0.04, 0.53, 0.03, 2.23, 0.01, 5.02e-16, 4.78e-16, 4.78e-16, nan ], [ 41, 0.37, 0.04, 0.34, 0.04, 0.56, 0.02, 2.78, 0.01, 5.48e-16, 5.27e-16, 5.48e-16, nan ], [ 42, 0.37, 0.04, 0.36, 0.04, 0.58, 0.03, 2.45, 0.01, 5.67e-16, 6.10e-16, 5.67e-16, nan ], [ 43, 0.40, 0.04, 0.38, 0.04, 0.59, 0.03, 3.06, 0.01, 4.13e-16, 5.54e-16, 4.67e-16, nan ], [ 44, 0.44, 0.04, 0.39, 0.04, 0.62, 0.03, 2.69, 0.01, 6.66e-16, 4.84e-16, 5.11e-16, nan ], [ 45, 0.48, 0.03, 0.41, 0.04, 0.64, 0.03, 2.81, 0.01, 4.47e-16, 4.99e-16, 6.75e-16, nan ], [ 46, 0.47, 0.04, 0.41, 0.04, 0.67, 0.03, 3.49, 0.01, 6.19e-16, 6.18e-16, 4.65e-16, nan ], [ 47, 0.48, 0.04, 0.43, 0.04, 0.70, 0.03, 1.82, 0.01, 6.76e-16, 7.56e-16, 5.07e-16, nan ], [ 48, 0.53, 0.04, 0.44, 0.04, 0.73, 0.03, 3.19, 0.01, 4.68e-16, 5.92e-16, 4.68e-16, nan ], [ 49, 0.55, 0.04, 0.47, 0.04, 0.73, 0.03, 2.44, 0.01, 4.59e-16, 4.37e-16, 3.63e-16, nan ], [ 50, 0.54, 0.04, 0.48, 0.04, 0.73, 0.03, 4.11, 0.01, 4.02e-16, 4.32e-16, 4.49e-16, nan ], [ 51, 0.59, 0.04, 0.50, 0.04, 0.80, 0.03, 2.99, 0.01, 6.23e-16, 6.86e-16, 6.86e-16, nan ], [ 52, 0.60, 0.04, 0.53, 0.04, 0.83, 0.03, 3.22, 0.01, 5.84e-16, 4.44e-16, 4.37e-16, nan ], [ 53, 0.61, 0.04, 0.54, 0.04, 0.86, 0.03, 3.34, 0.01, 5.40e-16, 5.73e-16, 4.50e-16, nan ], [ 54, 0.63, 0.04, 0.56, 0.04, 0.86, 0.03, 3.35, 0.01, 6.71e-16, 5.43e-16, 5.30e-16, nan ], [ 55, 0.65, 0.04, 0.58, 0.04, 0.89, 0.03, 3.48, 0.01, 4.66e-16, 4.66e-16, 4.66e-16, nan ], [ 56, 0.70, 0.04, 0.59, 0.04, 0.92, 0.03, 3.73, 0.01, 5.11e-16, 4.01e-16, 3.92e-16, nan ], [ 57, 0.74, 0.04, 0.62, 0.04, 0.92, 0.03, 2.94, 0.01, 3.94e-16, 3.94e-16, 3.79e-16, nan ], [ 58, 0.77, 0.04, 0.66, 0.04, 1.02, 0.03, 4.63, 0.01, 3.68e-16, 4.42e-16, 3.87e-16, nan ], [ 59, 0.77, 0.04, 0.68, 0.04, 1.06, 0.03, 3.63, 0.01, 4.34e-16, 4.85e-16, 5.55e-16, nan ], [ 60, 0.82, 0.04, 0.66, 0.05, 1.14, 0.03, 3.64, 0.01, 4.27e-16, 4.27e-16, 5.30e-16, nan ], [ 61, 0.85, 0.04, 0.71, 0.04, 1.12, 0.03, 3.76, 0.01, 4.80e-16, 4.70e-16, 5.21e-16, nan ], [ 62, 0.87, 0.04, 0.73, 0.04, 1.13, 0.03, 3.48, 0.01, 5.73e-16, 5.84e-16, 5.13e-16, nan ], [ 63, 0.93, 0.03, 0.75, 0.04, 1.17, 0.03, 4.13, 0.01, 6.77e-16, 5.04e-16, 5.04e-16, nan ], [ 64, 1.08, 0.03, 0.80, 0.04, 1.29, 0.03, 4.14, 0.01, 5.55e-16, 6.68e-16, 4.74e-16, nan ], [ 65, 0.82, 0.04, 0.77, 0.05, 1.23, 0.03, 3.82, 0.01, 4.51e-16, 4.67e-16, 4.51e-16, nan ], [ 66, 0.76, 0.05, 0.77, 0.05, 1.19, 0.03, 4.04, 0.01, 6.46e-16, 5.80e-16, 6.81e-16, nan ], [ 67, 0.85, 0.04, 0.81, 0.05, 1.18, 0.03, 4.53, 0.01, 4.74e-16, 5.30e-16, 4.74e-16, nan ], [ 68, 0.84, 0.04, 0.82, 0.05, 1.27, 0.03, 4.17, 0.01, 6.27e-16, 4.31e-16, 4.67e-16, nan ], [ 69, 0.91, 0.04, 0.85, 0.05, 1.30, 0.03, 4.41, 0.01, 6.26e-16, 6.37e-16, 6.51e-16, nan ], [ 70, 0.93, 0.04, 0.87, 0.05, 1.33, 0.03, 4.94, 0.01, 6.60e-16, 6.42e-16, 6.42e-16, nan ], [ 71, 0.91, 0.05, 0.89, 0.05, 1.37, 0.03, 4.11, 0.01, 1.00e-15, 8.07e-16, 7.22e-16, nan ], [ 72, 0.94, 0.05, 0.94, 0.05, 1.41, 0.03, 4.67, 0.01, 8.14e-16, 7.89e-16, 6.24e-16, nan ], [ 73, 0.97, 0.05, 0.95, 0.05, 1.40, 0.03, 5.53, 0.01, 7.02e-16, 5.92e-16, 7.02e-16, nan ], [ 74, 0.97, 0.05, 0.97, 0.05, 1.44, 0.03, 4.46, 0.01, 7.74e-16, 7.74e-16, 6.15e-16, nan ], [ 75, 1.02, 0.05, 1.02, 0.05, 1.48, 0.03, 4.19, 0.01, 1.07e-15, 8.04e-16, 8.04e-16, nan ], [ 76, 1.05, 0.05, 1.00, 0.05, 1.52, 0.03, 4.71, 0.01, 6.27e-16, 7.71e-16, 7.71e-16, nan ], [ 77, 1.10, 0.04, 1.05, 0.05, 1.68, 0.03, 5.34, 0.01, 6.65e-16, 7.44e-16, 5.61e-16, nan ], [ 78, 1.16, 0.04, 1.08, 0.05, 1.71, 0.03, 4.43, 0.01, 6.57e-16, 5.54e-16, 5.15e-16, nan ], [ 79, 1.19, 0.04, 1.11, 0.05, 1.71, 0.03, 5.20, 0.01, 7.42e-16, 9.17e-16, 7.68e-16, nan ], [ 80, 1.21, 0.04, 1.13, 0.05, 1.79, 0.03, 3.47, 0.02, 6.40e-16, 5.62e-16, 5.62e-16, nan ], [ 81, 1.19, 0.05, 1.12, 0.05, 1.67, 0.03, 4.87, 0.01, 7.49e-16, 7.23e-16, 7.23e-16, nan ], [ 82, 1.22, 0.05, 1.14, 0.05, 1.66, 0.03, 5.47, 0.01, 5.48e-16, 6.99e-16, 5.48e-16, nan ], [ 83, 1.22, 0.05, 1.17, 0.05, 1.69, 0.03, 5.60, 0.01, 7.26e-16, 7.66e-16, 7.26e-16, nan ], [ 84, 1.28, 0.04, 1.17, 0.05, 1.80, 0.03, 5.24, 0.01, 6.16e-16, 7.18e-16, 5.35e-16, nan ], [ 85, 1.33, 0.04, 1.22, 0.05, 1.79, 0.03, 4.84, 0.01, 6.89e-16, 8.52e-16, 6.89e-16, nan ], [ 86, 1.31, 0.05, 1.26, 0.05, 1.87, 0.03, 5.05, 0.01, 5.23e-16, 5.23e-16, 5.96e-16, nan ], [ 87, 1.31, 0.05, 1.28, 0.05, 1.87, 0.03, 5.17, 0.01, 6.53e-16, 6.85e-16, 5.48e-16, nan ], [ 88, 1.43, 0.04, 1.26, 0.05, 1.97, 0.03, 5.29, 0.01, 5.11e-16, 6.66e-16, 5.82e-16, nan ], [ 89, 1.37, 0.05, 1.34, 0.05, 1.96, 0.03, 6.43, 0.01, 7.14e-16, 5.05e-16, 5.05e-16, nan ], [ 90, 1.40, 0.05, 1.37, 0.05, 1.99, 0.03, 5.53, 0.01, 7.93e-16, 8.14e-16, 8.24e-16, nan ], [ 100, 1.73, 0.05, 1.69, 0.05, 2.38, 0.03, 5.87, 0.01, 6.55e-16, 5.17e-16, 6.03e-16, nan ], [ 110, 2.13, 0.05, 1.89, 0.05, 2.90, 0.03, 6.14, 0.02, 5.33e-16, 5.78e-16, 6.59e-16, nan ], [ 120, 2.48, 0.05, 2.24, 0.05, 3.33, 0.04, 7.77, 0.02, 7.32e-16, 7.11e-16, 5.59e-16, nan ], [ 130, 2.48, 0.06, 2.54, 0.05, 3.52, 0.04, 6.83, 0.02, 9.78e-16, 8.54e-16, 8.90e-16, nan ], [ 140, 2.88, 0.06, 2.89, 0.05, 4.08, 0.04, 7.91, 0.02, 6.42e-16, 8.67e-16, 8.37e-16, nan ], [ 150, 3.30, 0.06, 3.13, 0.06, 4.43, 0.04, 7.94, 0.02, 8.09e-16, 9.52e-16, 8.94e-16, nan ], [ 160, 3.45, 0.06, 3.77, 0.05, 5.16, 0.04, 7.35, 0.03, 8.88e-16, 9.06e-16, 9.57e-16, nan ], [ 170, 3.96, 0.06, 3.90, 0.06, 5.43, 0.04, 8.58, 0.03, 1.02e-15, 1.17e-15, 9.00e-16, nan ], [ 180, 4.37, 0.06, 4.35, 0.06, 5.80, 0.05, 8.43, 0.03, 9.68e-16, 9.99e-16, 1.03e-15, nan ], [ 190, 5.11, 0.06, 4.70, 0.06, 6.75, 0.04, 8.54, 0.03, 1.08e-15, 1.09e-15, 1.09e-15, nan ], [ 200, 5.20, 0.06, 5.12, 0.06, 6.86, 0.05, 8.96, 0.04, 1.14e-15, 9.95e-16, 9.10e-16, nan ], [ 210, 5.48, 0.06, 5.46, 0.07, 7.41, 0.05, 9.14, 0.04, 1.12e-15, 1.21e-15, 1.03e-15, nan ], [ 220, 5.82, 0.07, 5.99, 0.07, 7.94, 0.05, 9.24, 0.04, 1.05e-15, 1.04e-15, 9.32e-16, nan ], [ 230, 6.27, 0.07, 6.45, 0.07, 8.51, 0.05, 9.45, 0.05, 1.38e-15, 1.17e-15, 1.41e-15, nan ], [ 240, 6.92, 0.07, 6.92, 0.07, 9.44, 0.05, 9.26, 0.05, 1.19e-15, 1.09e-15, 1.21e-15, nan ], [ 250, 7.20, 0.07, 7.27, 0.07, 9.34, 0.05, 9.46, 0.05, 1.16e-15, 1.27e-15, 1.04e-15, nan ], [ 260, 7.27, 0.07, 7.76, 0.07, 9.92, 0.05, 9.39, 0.06, 1.35e-15, 1.11e-15, 1.11e-15, nan ], [ 270, 7.91, 0.07, 8.25, 0.07, 10.47, 0.06, 9.80, 0.06, 1.28e-15, 1.26e-15, 1.10e-15, nan ], [ 280, 8.64, 0.07, 8.76, 0.07, 11.50, 0.05, 9.41, 0.07, 1.06e-15, 1.09e-15, 1.28e-15, nan ], [ 290, 8.54, 0.08, 8.78, 0.08, 11.30, 0.06, 9.95, 0.07, 1.38e-15, 1.96e-15, 1.58e-15, nan ], [ 300, 9.17, 0.08, 9.28, 0.08, 11.86, 0.06, 10.05, 0.07, 1.36e-15, 1.20e-15, 1.41e-15, nan ], [ 310, 9.79, 0.08, 9.79, 0.08, 12.46, 0.06, 9.76, 0.08, 1.44e-15, 1.48e-15, 1.31e-15, nan ], [ 320, 11.10, 0.07, 10.72, 0.08, 13.08, 0.06, 10.04, 0.08, 2.05e-15, 2.08e-15, 2.08e-15, nan ], [ 330, 10.17, 0.09, 10.55, 0.08, 13.25, 0.07, 10.08, 0.09, 1.72e-15, 1.57e-15, 1.39e-15, nan ], [ 340, 10.91, 0.09, 11.20, 0.08, 13.86, 0.07, 10.20, 0.09, 1.35e-15, 1.53e-15, 1.38e-15, nan ], [ 350, 11.56, 0.09, 11.56, 0.09, 14.69, 0.07, 9.64, 0.10, 1.31e-15, 1.34e-15, 1.31e-15, nan ], [ 360, 11.83, 0.09, 11.83, 0.09, 14.85, 0.07, 10.02, 0.10, 1.41e-15, 1.61e-15, 1.47e-15, nan ], [ 370, 12.37, 0.09, 12.78, 0.09, 15.69, 0.07, 10.27, 0.11, 1.54e-15, 1.24e-15, 1.40e-15, nan ], [ 380, 12.60, 0.09, 12.90, 0.09, 15.90, 0.07, 10.18, 0.11, 1.67e-15, 1.67e-15, 1.67e-15, nan ], [ 390, 12.87, 0.09, 13.41, 0.09, 16.53, 0.07, 10.09, 0.12, 1.46e-15, 1.89e-15, 1.46e-15, nan ], [ 400, 9.96, 0.13, 13.96, 0.09, 17.38, 0.07, 10.21, 0.13, 1.48e-15, 1.73e-15, 1.56e-15, nan ], [ 410, 13.35, 0.10, 14.19, 0.10, 17.31, 0.08, 10.15, 0.13, 1.58e-15, 1.55e-15, 1.80e-15, nan ], [ 420, 13.62, 0.10, 14.59, 0.10, 18.39, 0.08, 10.12, 0.14, 1.33e-15, 1.33e-15, 1.28e-15, nan ], [ 430, 13.90, 0.11, 15.15, 0.10, 18.75, 0.08, 9.96, 0.15, 1.76e-15, 1.72e-15, 1.67e-15, nan ], [ 440, 14.65, 0.11, 15.37, 0.10, 19.40, 0.08, 9.97, 0.16, 1.43e-15, 1.43e-15, 1.42e-15, nan ], [ 450, 14.51, 0.11, 15.78, 0.10, 19.82, 0.08, 10.28, 0.16, 1.48e-15, 1.69e-15, 1.66e-15, nan ], [ 460, 15.03, 0.11, 16.49, 0.10, 20.24, 0.08, 10.29, 0.16, 1.98e-15, 1.86e-15, 1.87e-15, nan ], [ 470, 15.56, 0.11, 16.90, 0.10, 21.12, 0.08, 10.43, 0.17, 1.93e-15, 1.53e-15, 1.47e-15, nan ], [ 480, 15.79, 0.12, 17.59, 0.11, 21.48, 0.09, 10.57, 0.17, 1.88e-15, 1.70e-15, 1.62e-15, nan ], [ 490, 16.03, 0.12, 17.49, 0.11, 20.72, 0.09, 10.26, 0.19, 1.77e-15, 1.72e-15, 1.94e-15, nan ], [ 500, 16.73, 0.12, 18.09, 0.11, 21.80, 0.09, 10.44, 0.19, 2.06e-15, 1.82e-15, 1.59e-15, nan ], [ 510, 16.70, 0.12, 18.62, 0.11, 22.16, 0.09, 10.03, 0.21, 1.56e-15, 1.62e-15, 1.41e-15, nan ], [ 520, 17.20, 0.13, 18.84, 0.12, 22.81, 0.10, 9.99, 0.22, 1.99e-15, 1.77e-15, 1.82e-15, nan ], [ 530, 17.87, 0.13, 19.61, 0.11, 23.51, 0.10, 10.39, 0.22, 2.27e-15, 2.27e-15, 2.45e-15, nan ], [ 540, 18.14, 0.13, 20.19, 0.12, 23.87, 0.10, 10.44, 0.22, 1.84e-15, 1.80e-15, 1.76e-15, nan ], [ 550, 18.54, 0.13, 20.56, 0.12, 24.00, 0.10, 10.28, 0.24, 1.89e-15, 1.91e-15, 1.89e-15, nan ], [ 560, 18.77, 0.13, 20.98, 0.12, 25.18, 0.10, 10.56, 0.24, 1.65e-15, 1.64e-15, 1.63e-15, nan ], [ 570, 19.01, 0.14, 21.35, 0.12, 25.84, 0.10, 10.30, 0.25, 2.06e-15, 2.11e-15, 2.06e-15, nan ], [ 580, 19.28, 0.14, 21.76, 0.12, 24.98, 0.11, 10.54, 0.26, 2.48e-15, 2.48e-15, 2.26e-15, nan ], [ 590, 19.65, 0.14, 22.35, 0.12, 26.61, 0.10, 10.62, 0.26, 1.94e-15, 2.34e-15, 2.32e-15, nan ], [ 600, 20.35, 0.14, 22.76, 0.13, 26.97, 0.11, 10.61, 0.27, 1.95e-15, 1.95e-15, 2.16e-15, nan ], [ 610, 20.19, 0.15, 23.14, 0.13, 27.39, 0.11, 10.54, 0.28, 2.15e-15, 1.59e-15, 1.72e-15, nan ], [ 620, 21.13, 0.15, 23.55, 0.13, 28.29, 0.11, 10.59, 0.29, 2.22e-15, 2.12e-15, 2.21e-15, nan ], [ 630, 21.53, 0.15, 24.10, 0.13, 27.64, 0.12, 10.61, 0.30, 1.99e-15, 1.99e-15, 1.99e-15, nan ], [ 640, 22.51, 0.15, 25.28, 0.13, 29.31, 0.11, 10.70, 0.31, 1.80e-15, 1.88e-15, 1.99e-15, nan ], [ 650, 22.00, 0.15, 25.06, 0.14, 29.98, 0.11, 10.49, 0.32, 1.99e-15, 1.93e-15, 1.80e-15, nan ], [ 660, 22.26, 0.16, 25.66, 0.14, 30.08, 0.12, 10.65, 0.33, 2.21e-15, 1.83e-15, 1.83e-15, nan ], [ 670, 22.91, 0.16, 26.48, 0.14, 30.75, 0.12, 10.62, 0.34, 2.43e-15, 2.21e-15, 2.10e-15, nan ], [ 680, 23.31, 0.16, 26.09, 0.14, 31.41, 0.12, 10.42, 0.36, 2.01e-15, 2.02e-15, 1.84e-15, nan ], [ 690, 23.54, 0.16, 27.09, 0.14, 31.58, 0.12, 10.52, 0.36, 2.38e-15, 2.38e-15, 2.22e-15, nan ], [ 700, 23.67, 0.17, 27.46, 0.14, 32.50, 0.12, 10.71, 0.37, 2.36e-15, 2.44e-15, 2.28e-15, nan ], [ 710, 24.49, 0.16, 26.95, 0.15, 33.11, 0.12, 10.55, 0.38, 1.96e-15, 2.41e-15, 2.12e-15, nan ], [ 720, 24.45, 0.17, 28.30, 0.15, 33.26, 0.12, 10.65, 0.39, 2.08e-15, 2.38e-15, 2.44e-15, nan ], [ 730, 25.27, 0.17, 28.85, 0.15, 32.88, 0.13, 10.68, 0.40, 2.34e-15, 2.32e-15, 2.19e-15, nan ], [ 740, 24.95, 0.18, 28.50, 0.15, 33.00, 0.13, 6.52, 0.67, 2.35e-15, 2.62e-15, 2.48e-15, nan ], [ 750, 26.05, 0.17, 29.46, 0.15, 33.89, 0.13, 10.61, 0.43, 2.29e-15, 2.06e-15, 2.02e-15, nan ], [ 760, 26.64, 0.17, 30.06, 0.15, 34.25, 0.14, 10.31, 0.45, 2.72e-15, 2.85e-15, 2.69e-15, nan ], [ 770, 26.86, 0.18, 30.25, 0.16, 34.67, 0.14, 10.59, 0.45, 2.25e-15, 2.58e-15, 1.92e-15, nan ], [ 780, 26.53, 0.18, 31.08, 0.16, 35.08, 0.14, 10.74, 0.45, 2.17e-15, 2.15e-15, 2.10e-15, nan ], [ 790, 26.46, 0.19, 30.90, 0.16, 34.97, 0.14, 10.69, 0.47, 2.55e-15, 2.65e-15, 2.51e-15, nan ], [ 800, 27.58, 0.19, 31.69, 0.16, 35.33, 0.15, 9.79, 0.52, 2.42e-15, 2.03e-15, 2.11e-15, nan ], [ 810, 28.13, 0.19, 32.68, 0.16, 37.01, 0.14, 10.62, 0.49, 2.39e-15, 2.26e-15, 2.27e-15, nan ], [ 820, 28.68, 0.19, 33.09, 0.16, 37.42, 0.14, 10.76, 0.50, 2.92e-15, 2.91e-15, 2.77e-15, nan ], [ 830, 28.91, 0.19, 33.66, 0.16, 38.09, 0.14, 6.63, 0.83, 1.94e-15, 2.20e-15, 2.20e-15, nan ], [ 840, 29.14, 0.19, 33.45, 0.17, 37.71, 0.15, 6.52, 0.87, 2.50e-15, 2.34e-15, 2.40e-15, nan ], [ 850, 30.02, 0.19, 34.84, 0.17, 38.86, 0.15, 10.64, 0.54, 2.43e-15, 2.21e-15, 2.04e-15, nan ], [ 860, 30.58, 0.19, 35.26, 0.17, 38.97, 0.15, 8.38, 0.71, 2.66e-15, 2.60e-15, 2.60e-15, nan ], [ 870, 30.80, 0.20, 29.90, 0.20, 38.14, 0.16, 10.57, 0.57, 2.61e-15, 2.62e-15, 2.36e-15, nan ], [ 880, 30.88, 0.20, 36.05, 0.17, 39.02, 0.16, 10.56, 0.59, 2.15e-15, 2.25e-15, 2.10e-15, nan ], [ 890, 31.14, 0.20, 35.64, 0.18, 38.47, 0.16, 6.48, 0.98, 2.23e-15, 2.30e-15, 2.39e-15, nan ], [ 900, 31.36, 0.21, 36.44, 0.18, 39.86, 0.16, 10.52, 0.62, 2.49e-15, 2.58e-15, 2.54e-15, nan ], [ 1000, 34.54, 0.23, 40.25, 0.20, 43.53, 0.18, 7.94, 1.01, 2.91e-15, 2.52e-15, 2.56e-15, nan ], [ 1100, 37.58, 0.26, 44.24, 0.22, 27.85, 0.35, 9.69, 1.00, 3.65e-15, 2.94e-15, 2.90e-15, nan ], [ 1200, 40.89, 0.28, 49.07, 0.24, 30.37, 0.38, 9.19, 1.26, 3.29e-15, 3.26e-15, 3.42e-15, nan ], [ 1300, 43.94, 0.31, 54.12, 0.25, 31.86, 0.42, 8.49, 1.59, 2.97e-15, 2.80e-15, 2.83e-15, nan ], [ 1400, 48.88, 0.32, 58.37, 0.27, 31.59, 0.50, 8.30, 1.89, 3.26e-15, 3.47e-15, 3.08e-15, nan ], [ 1500, 52.37, 0.34, 62.30, 0.29, 36.69, 0.49, 8.18, 2.20, 2.93e-15, 3.07e-15, 3.05e-15, nan ], [ 1600, 55.54, 0.37, 68.13, 0.30, 38.75, 0.53, 6.83, 3.00, 3.13e-15, 3.02e-15, 3.13e-15, nan ], [ 1700, 59.04, 0.39, 71.84, 0.32, 42.31, 0.55, 8.33, 2.78, 3.36e-15, 3.41e-15, 3.21e-15, nan ], [ 1800, 61.61, 0.42, 73.92, 0.35, 42.52, 0.61, 5.49, 4.72, 4.38e-15, 4.54e-15, 4.69e-15, nan ], [ 1900, 65.81, 0.44, 75.86, 0.38, 43.67, 0.66, 8.38, 3.45, 3.59e-15, 3.83e-15, 4.08e-15, nan ], [ 2000, 64.05, 0.50, 75.89, 0.42, 45.49, 0.70, 7.75, 4.13, 3.65e-15, 3.67e-15, 3.89e-15, nan ], [ 2100, 65.00, 0.54, 77.25, 0.46, 34.75, 1.02, 8.39, 4.21, 6.07e-15, 5.02e-15, 6.11e-15, nan ], [ 2200, 66.22, 0.59, 77.65, 0.50, 36.94, 1.05, 7.73, 5.01, 3.96e-15, 3.89e-15, 3.69e-15, nan ], [ 2300, 66.90, 0.63, 77.43, 0.55, 37.81, 1.12, 5.59, 7.58, 4.81e-15, 4.26e-15, 4.36e-15, nan ], [ 2400, 68.92, 0.67, 78.42, 0.59, 39.96, 1.15, 7.60, 6.07, 4.94e-15, 6.12e-15, 5.35e-15, nan ], [ 2500, 70.75, 0.71, 78.04, 0.64, 41.18, 1.21, 7.93, 6.31, 4.82e-15, 4.92e-15, 5.28e-15, nan ], [ 2600, 71.48, 0.76, 78.32, 0.69, 40.66, 1.33, 8.25, 6.56, 4.04e-15, 4.36e-15, 4.12e-15, nan ], [ 2700, 72.95, 0.80, 78.34, 0.74, 44.07, 1.32, 8.38, 6.96, 5.41e-15, 4.79e-15, 5.22e-15, nan ], [ 2800, 75.35, 0.83, 80.05, 0.78, 39.39, 1.59, 8.08, 7.76, 5.05e-15, 5.05e-15, 5.24e-15, nan ], [ 2900, 74.46, 0.90, 80.71, 0.83, 46.52, 1.45, 8.46, 7.96, 5.33e-15, 5.35e-15, 6.32e-15, nan ], [ 3000, 77.47, 0.93, 81.59, 0.88, 47.36, 1.52, 8.35, 8.63, 4.80e-15, 4.72e-15, 4.70e-15, nan ], [ 3100, 78.48, 0.98, 82.81, 0.93, 39.22, 1.96, 8.36, 9.20, 5.19e-15, 5.50e-15, 5.79e-15, nan ], [ 3200, 79.65, 1.03, 83.56, 0.98, 40.98, 2.00, 5.82, 14.09, 5.40e-15, 5.92e-15, 5.41e-15, nan ], [ 3300, 81.60, 1.07, 84.45, 1.03, 41.60, 2.10, 5.63, 15.47, 4.76e-15, 5.11e-15, 5.52e-15, nan ], [ 3400, 81.24, 1.14, 85.99, 1.08, 42.24, 2.19, 5.59, 16.56, 4.99e-15, 4.91e-15, 5.40e-15, nan ], [ 3500, 83.51, 1.17, 86.68, 1.13, 43.52, 2.25, 5.58, 17.56, 5.52e-15, 5.19e-15, 5.35e-15, nan ], [ 3600, 86.15, 1.20, 86.96, 1.19, 43.86, 2.37, 7.94, 13.06, 5.32e-15, 4.66e-15, 4.84e-15, nan ], [ 3700, 86.89, 1.26, 87.30, 1.26, 44.48, 2.46, 8.40, 13.05, 5.90e-15, 5.96e-15, 5.50e-15, nan ], [ 3800, 88.55, 1.31, 88.15, 1.31, 45.73, 2.53, 8.32, 13.90, 6.32e-15, 6.32e-15, 5.75e-15, nan ], [ 3900, 87.07, 1.40, 88.01, 1.38, 47.38, 2.57, 8.35, 14.58, 5.69e-15, 5.87e-15, 5.85e-15, nan ], [ 4000, 87.23, 1.47, 88.36, 1.45, 46.94, 2.73, 7.58, 16.90, 6.07e-15, 6.24e-15, 6.19e-15, nan ], [ 4100, 87.52, 1.54, 88.33, 1.52, 37.67, 3.57, 7.85, 17.13, 7.58e-15, 6.75e-15, 6.77e-15, nan ], [ 4200, 88.07, 1.60, 89.23, 1.58, 41.55, 3.40, 8.25, 17.12, 5.38e-15, 5.44e-15, 5.83e-15, nan ], [ 4300, 89.30, 1.66, 89.20, 1.66, 42.70, 3.47, 8.40, 17.62, 7.09e-15, 7.48e-15, 6.85e-15, nan ], [ 4400, 90.71, 1.71, 89.30, 1.73, 42.42, 3.65, 8.04, 19.26, 8.27e-15, 8.48e-15, 7.80e-15, nan ], [ 4500, 90.28, 1.80, 89.33, 1.81, 45.28, 3.58, 8.43, 19.22, 6.07e-15, 6.87e-15, 6.12e-15, nan ], [ 4600, 91.19, 1.86, 89.41, 1.89, 45.53, 3.72, 8.33, 20.34, 6.07e-15, 5.73e-15, 6.42e-15, nan ], [ 4700, 92.80, 1.90, 90.05, 1.96, 45.66, 3.87, 8.54, 20.70, 7.42e-15, 9.41e-15, 8.83e-15, nan ], [ 4800, 92.74, 1.99, 89.29, 2.06, 45.55, 4.05, 6.95, 26.52, 6.90e-15, 7.21e-15, 7.61e-15, nan ], [ 4900, 91.98, 2.09, 89.49, 2.15, 47.22, 4.07, 8.53, 22.52, 6.72e-15, 7.17e-15, 6.81e-15, nan ], [ 5000, 92.62, 2.16, 90.20, 2.22, 47.63, 4.20, 8.46, 23.66, 7.08e-15, 6.39e-15, 6.63e-15, nan ], [ 5100, 93.76, 2.22, 90.73, 2.29, 47.86, 4.35, 8.48, 24.54, 6.77e-15, 7.20e-15, 7.69e-15, nan ], [ 5200, 94.54, 2.29, 91.77, 2.36, 43.47, 4.98, 8.18, 26.44, 7.67e-15, 7.32e-15, 7.63e-15, nan ], [ 5300, 94.45, 2.38, 91.60, 2.45, 44.28, 5.08, 8.57, 26.22, 8.51e-15, 8.42e-15, 7.62e-15, nan ], [ 5400, 95.78, 2.44, 91.94, 2.54, 43.81, 5.33, 8.37, 27.88, 6.74e-15, 7.04e-15, 6.80e-15, nan ], [ 5500, 95.67, 2.53, 91.52, 2.65, 44.36, 5.46, 8.55, 28.33, 7.61e-15, 7.40e-15, 6.95e-15, nan ], [ 5600, 97.12, 2.58, 91.29, 2.75, 46.51, 5.40, 7.70, 32.58, 8.96e-15, 8.30e-15, 8.46e-15, nan ], [ 5700, 98.86, 2.63, 91.67, 2.84, 46.12, 5.64, 8.56, 30.37, 7.18e-15, 8.18e-15, 6.99e-15, nan ], [ 5800, 97.15, 2.77, 92.31, 2.92, 47.35, 5.69, 8.60, 31.31, 8.33e-15, 7.19e-15, 7.67e-15, nan ], [ 5900, 97.39, 2.86, 91.63, 3.04, 47.63, 5.85, 8.62, 32.30, 8.18e-15, 9.25e-15, 8.50e-15, nan ], [ 6000, 99.27, 2.90, 92.66, 3.11, 48.69, 5.92, 8.36, 34.47, 6.85e-15, 7.70e-15, 7.40e-15, nan ], [ 6100, 98.34, 3.03, 92.15, 3.23, 48.68, 6.12, 8.32, 35.80, 7.53e-15, 7.95e-15, 7.67e-15, nan ], [ 6200, 99.10, 3.10, 92.96, 3.31, 43.80, 7.02, 8.77, 35.06, 8.04e-15, 7.28e-15, 7.09e-15, nan ], [ 6300, 99.16, 3.20, 92.67, 3.43, 45.00, 7.06, 8.64, 36.74, 8.91e-15, 8.75e-15, 8.88e-15, nan ], [ 6400, 98.99, 3.31, 91.71, 3.57, 45.70, 7.17, 8.64, 37.95, 7.11e-15, 7.39e-15, 7.25e-15, nan ], [ 6500, 100.53, 3.36, 92.07, 3.67, 45.77, 7.39, 8.11, 41.68, 7.85e-15, 8.97e-15, 8.12e-15, nan ], [ 6600, 100.24, 3.48, 92.70, 3.76, 45.52, 7.66, 8.63, 40.39, 7.30e-15, 7.44e-15, 7.23e-15, nan ], [ 6700, 100.08, 3.59, 92.08, 3.90, 46.94, 7.65, 8.33, 43.10, 9.14e-15, 9.40e-15, 9.01e-15, nan ], [ 6800, 99.89, 3.70, 92.41, 4.00, 46.87, 7.89, 8.30, 44.57, 9.71e-15, 9.71e-15, 9.50e-15, nan ], [ 6900, 100.20, 3.80, 92.72, 4.11, 47.01, 8.10, 8.25, 46.19, 8.25e-15, 8.55e-15, 8.49e-15, nan ], [ 7000, 100.51, 3.90, 92.58, 4.24, 48.37, 8.11, 8.58, 45.70, 8.67e-15, 7.43e-15, 7.18e-15, nan ], [ 7100, 99.50, 4.05, 93.56, 4.31, 48.75, 8.27, 8.22, 49.05, 8.33e-15, 8.20e-15, 7.80e-15, nan ], [ 7200, 101.15, 4.10, 92.59, 4.48, 45.01, 9.21, 8.57, 48.43, 8.59e-15, 7.78e-15, 8.09e-15, nan ], [ 7300, 102.98, 4.14, 93.63, 4.55, 45.49, 9.37, 7.83, 54.46, 8.85e-15, 7.86e-15, 8.49e-15, nan ], [ 7400, 102.21, 4.29, 92.64, 4.73, 45.72, 9.58, 8.21, 53.37, 8.38e-15, 8.65e-15, 8.61e-15, nan ], [ 7500, 103.83, 4.33, 93.32, 4.82, 45.07, 9.99, 8.10, 55.58, 9.37e-15, 9.78e-15, 9.40e-15, nan ], [ 7600, 104.14, 4.44, 93.48, 4.94, 46.66, 9.91, 8.06, 57.33, 9.15e-15, 8.27e-15, 8.71e-15, nan ], [ 7700, 102.22, 4.64, 93.22, 5.09, 47.43, 10.00, 7.98, 59.45, 8.84e-15, 8.34e-15, 9.13e-15, nan ], [ 7800, 102.55, 4.75, 93.12, 5.23, 46.95, 10.37, 7.58, 64.18, 8.12e-15, 9.13e-15, 8.24e-15, nan ], [ 7900, 103.03, 4.85, 93.32, 5.35, 47.35, 10.55, 7.67, 65.14, 1.04e-14, 1.05e-14, 1.02e-14, nan ], [ 8000, 103.28, 4.96, 93.21, 5.49, 48.22, 10.62, 7.51, 68.17, 1.06e-14, 9.34e-15, 1.04e-14, nan ], [ 8100, 104.39, 5.03, 93.05, 5.64, 48.42, 10.84, 7.51, 69.95, 1.12e-14, 1.27e-14, 1.19e-14, nan ], [ 8200, 103.54, 5.20, 93.49, 5.75, 44.13, 12.19, 7.39, 72.83, 9.85e-15, 9.72e-15, 9.66e-15, nan ], [ 8300, 105.09, 5.24, 94.31, 5.85, 45.41, 12.14, 7.23, 76.21, 9.43e-15, 9.61e-15, 8.37e-15, nan ], [ 8400, 104.40, 5.41, 93.95, 6.01, 45.43, 12.43, 7.60, 74.30, 9.52e-15, 9.29e-15, 1.09e-14, nan ], [ 8500, 103.71, 5.57, 93.48, 6.18, 46.69, 12.38, 7.50, 77.09, 8.73e-15, 9.08e-15, 9.32e-15, nan ], [ 8600, 104.80, 5.65, 94.29, 6.28, 47.48, 12.47, 7.70, 76.88, 9.74e-15, 1.02e-14, 9.12e-15, nan ], [ 8700, 103.79, 5.84, 93.76, 6.46, 46.31, 13.08, 7.42, 81.64, 9.92e-15, 9.88e-15, 9.97e-15, nan ], [ 8800, 104.70, 5.92, 92.90, 6.67, 48.09, 12.89, 7.97, 77.74, 9.75e-15, 9.41e-15, 9.49e-15, nan ], [ 8900, 105.58, 6.00, 94.13, 6.73, 47.02, 13.48, 8.09, 78.38, 9.93e-15, 9.80e-15, 1.04e-14, nan ], [ 9000, 105.37, 6.15, 94.21, 6.88, 47.84, 13.55, 8.09, 80.12, 1.05e-14, 1.03e-14, 1.03e-14, nan ], [ 10000, 106.67, 7.50, 94.23, 8.49, 47.90, 16.70, 8.34, 95.91, 9.28e-15, 1.01e-14, 9.12e-15, nan ], [ 12000, 110.03, 10.47, 93.53, 12.32, 48.67, 23.67, 8.28, 139.09, 1.42e-14, 1.38e-14, 1.26e-14, nan ], [ 14000, 112.51, 13.94, 95.20, 16.47, 47.70, 32.87, 8.44, 185.70, 1.34e-14, 1.27e-14, 1.30e-14, nan ], [ 16000, 111.07, 18.44, 94.31, 21.72, 46.89, 43.68, 9.01, 227.37, 1.32e-14, 1.36e-14, 1.29e-14, nan ], [ 18000, 108.35, 23.92, 94.94, 27.31, 47.51, 54.56, 8.41, 308.12, 1.44e-14, 1.48e-14, 1.40e-14, nan ], [ 20000, 110.84, 28.87, 94.36, 33.92, 47.35, 67.59, 8.33, 383.95, 1.64e-14, 1.48e-14, 1.55e-14, nan ], ]) # numactl --interleave=all ../testing/testing_zhemv -U -N 123 -N 1234 --range 10:90:1 --range 100:900:10 --range 1000:9000:100 --range 10000:20000:2000 zhemv_U = array([ [ 10, 0.03, 0.03, 0.03, 0.03, 0.04, 0.02, 0.48, 0.00, 7.16e-16, 3.66e-16, 7.16e-16, nan ], [ 11, 0.03, 0.03, 0.04, 0.03, 0.05, 0.02, 0.58, 0.00, 3.33e-16, 2.91e-16, 2.28e-16, nan ], [ 12, 0.04, 0.03, 0.04, 0.03, 0.06, 0.02, 0.68, 0.00, 5.78e-16, 3.31e-16, 2.96e-16, nan ], [ 13, 0.05, 0.03, 0.05, 0.03, 0.07, 0.02, 0.79, 0.00, 3.42e-16, 5.51e-16, 2.05e-16, nan ], [ 14, 0.05, 0.03, 0.06, 0.03, 0.08, 0.02, 0.61, 0.00, 2.84e-16, 2.54e-16, 2.84e-16, nan ], [ 15, 0.06, 0.04, 0.07, 0.03, 0.09, 0.02, 0.92, 0.00, 3.74e-16, 3.60e-16, 3.74e-16, nan ], [ 16, 0.07, 0.03, 0.08, 0.03, 0.11, 0.02, 1.17, 0.00, 3.33e-16, 4.44e-16, 3.51e-16, nan ], [ 17, 0.07, 0.03, 0.08, 0.03, 0.11, 0.02, 1.17, 0.00, 4.31e-16, 2.34e-16, 4.31e-16, nan ], [ 18, 0.08, 0.04, 0.09, 0.03, 0.12, 0.02, 1.31, 0.00, 2.79e-16, 4.07e-16, 4.07e-16, nan ], [ 19, 0.09, 0.03, 0.10, 0.03, 0.14, 0.02, 1.09, 0.00, 4.18e-16, 4.18e-16, 4.18e-16, nan ], [ 20, 0.10, 0.03, 0.11, 0.03, 0.15, 0.02, 1.20, 0.00, 3.97e-16, 5.35e-16, 3.97e-16, nan ], [ 21, 0.11, 0.03, 0.12, 0.03, 0.16, 0.02, 1.22, 0.00, 3.49e-16, 3.78e-16, 3.49e-16, nan ], [ 22, 0.12, 0.04, 0.13, 0.03, 0.17, 0.02, 1.33, 0.00, 5.11e-16, 4.91e-16, 4.04e-16, nan ], [ 23, 0.13, 0.03, 0.15, 0.03, 0.19, 0.02, 1.58, 0.00, 3.18e-16, 5.57e-16, 3.09e-16, nan ], [ 24, 0.14, 0.03, 0.16, 0.03, 0.20, 0.02, 1.58, 0.00, 4.68e-16, 4.68e-16, 3.05e-16, nan ], [ 25, 0.16, 0.03, 0.17, 0.03, 0.22, 0.02, 1.85, 0.00, 4.26e-16, 5.68e-16, 4.26e-16, nan ], [ 26, 0.16, 0.04, 0.19, 0.03, 0.23, 0.03, 2.00, 0.00, 3.42e-16, 4.32e-16, 4.58e-16, nan ], [ 27, 0.19, 0.03, 0.20, 0.03, 0.27, 0.02, 1.52, 0.00, 5.43e-16, 5.43e-16, 3.96e-16, nan ], [ 28, 0.20, 0.03, 0.21, 0.03, 0.29, 0.02, 2.13, 0.00, 4.26e-16, 3.83e-16, 4.01e-16, nan ], [ 29, 0.21, 0.03, 0.24, 0.03, 0.29, 0.02, 1.75, 0.00, 3.68e-16, 3.47e-16, 2.88e-16, nan ], [ 30, 0.23, 0.03, 0.25, 0.03, 0.30, 0.02, 1.98, 0.00, 3.35e-16, 3.35e-16, 5.92e-16, nan ], [ 31, 0.24, 0.03, 0.26, 0.03, 0.35, 0.02, 2.11, 0.00, 4.73e-16, 3.44e-16, 3.44e-16, nan ], [ 32, 0.27, 0.03, 0.28, 0.03, 0.37, 0.02, 2.12, 0.00, 4.58e-16, 4.58e-16, 4.58e-16, nan ], [ 33, 0.28, 0.03, 0.21, 0.04, 0.38, 0.02, 2.39, 0.00, 4.81e-16, 4.81e-16, 4.44e-16, nan ], [ 34, 0.29, 0.03, 0.22, 0.04, 0.40, 0.02, 2.38, 0.00, 7.01e-16, 7.01e-16, 4.93e-16, nan ], [ 35, 0.30, 0.03, 0.24, 0.04, 0.42, 0.02, 2.52, 0.00, 4.13e-16, 4.54e-16, 4.19e-16, nan ], [ 36, 0.32, 0.03, 0.26, 0.04, 0.43, 0.03, 2.66, 0.00, 4.22e-16, 4.41e-16, 6.00e-16, nan ], [ 37, 0.34, 0.03, 0.27, 0.04, 0.44, 0.03, 2.28, 0.01, 4.29e-16, 5.81e-16, 4.19e-16, nan ], [ 38, 0.33, 0.04, 0.29, 0.04, 0.48, 0.03, 2.40, 0.01, 7.54e-16, 7.48e-16, 6.27e-16, nan ], [ 39, 0.35, 0.04, 0.29, 0.04, 0.50, 0.03, 2.52, 0.01, 5.47e-16, 6.11e-16, 6.11e-16, nan ], [ 40, 0.37, 0.04, 0.32, 0.04, 0.51, 0.03, 2.65, 0.01, 6.40e-16, 5.02e-16, 5.62e-16, nan ], [ 41, 0.41, 0.03, 0.34, 0.04, 0.54, 0.03, 2.78, 0.01, 5.29e-16, 5.27e-16, 5.21e-16, nan ], [ 42, 0.41, 0.04, 0.35, 0.04, 0.58, 0.03, 2.92, 0.01, 5.15e-16, 5.15e-16, 3.78e-16, nan ], [ 43, 0.45, 0.03, 0.36, 0.04, 0.61, 0.03, 2.57, 0.01, 5.03e-16, 5.03e-16, 5.03e-16, nan ], [ 44, 0.44, 0.04, 0.38, 0.04, 0.62, 0.03, 2.69, 0.01, 5.11e-16, 4.91e-16, 6.46e-16, nan ], [ 45, 0.45, 0.04, 0.40, 0.04, 0.64, 0.03, 2.81, 0.01, 8.50e-16, 8.05e-16, 8.50e-16, nan ], [ 46, 0.50, 0.04, 0.42, 0.04, 0.70, 0.03, 3.67, 0.00, 5.18e-16, 6.29e-16, 4.88e-16, nan ], [ 47, 0.49, 0.04, 0.43, 0.04, 0.70, 0.03, 2.94, 0.01, 6.46e-16, 7.57e-16, 6.06e-16, nan ], [ 48, 0.54, 0.04, 0.46, 0.04, 0.71, 0.03, 2.75, 0.01, 4.97e-16, 4.68e-16, 5.34e-16, nan ], [ 49, 0.56, 0.04, 0.47, 0.04, 0.71, 0.03, 2.86, 0.01, 7.25e-16, 5.80e-16, 5.85e-16, nan ], [ 50, 0.57, 0.04, 0.49, 0.04, 0.74, 0.03, 2.98, 0.01, 5.68e-16, 5.70e-16, 6.03e-16, nan ], [ 51, 0.59, 0.04, 0.51, 0.04, 0.77, 0.03, 3.10, 0.01, 5.74e-16, 5.57e-16, 5.74e-16, nan ], [ 52, 0.62, 0.04, 0.53, 0.04, 0.83, 0.03, 2.83, 0.01, 7.36e-16, 6.83e-16, 6.83e-16, nan ], [ 53, 0.64, 0.04, 0.55, 0.04, 0.86, 0.03, 2.85, 0.01, 5.47e-16, 4.24e-16, 5.36e-16, nan ], [ 54, 0.67, 0.04, 0.56, 0.04, 0.86, 0.03, 4.02, 0.01, 6.87e-16, 6.61e-16, 6.71e-16, nan ], [ 55, 0.66, 0.04, 0.58, 0.04, 0.88, 0.03, 3.16, 0.01, 5.33e-16, 5.52e-16, 5.33e-16, nan ], [ 56, 0.72, 0.04, 0.60, 0.04, 0.92, 0.03, 4.32, 0.01, 5.38e-16, 4.57e-16, 4.57e-16, nan ], [ 57, 0.70, 0.04, 0.62, 0.04, 0.92, 0.03, 3.86, 0.01, 6.71e-16, 6.36e-16, 5.14e-16, nan ], [ 58, 0.73, 0.04, 0.64, 0.04, 0.98, 0.03, 4.63, 0.01, 7.35e-16, 6.93e-16, 7.38e-16, nan ], [ 59, 0.79, 0.04, 0.65, 0.04, 0.99, 0.03, 3.63, 0.01, 4.34e-16, 4.97e-16, 4.93e-16, nan ], [ 60, 0.77, 0.04, 0.67, 0.04, 1.05, 0.03, 3.64, 0.01, 5.30e-16, 4.88e-16, 4.74e-16, nan ], [ 61, 0.78, 0.04, 0.69, 0.04, 1.09, 0.03, 3.76, 0.01, 8.40e-16, 7.81e-16, 1.10e-15, nan ], [ 62, 0.90, 0.04, 0.72, 0.04, 1.13, 0.03, 4.40, 0.01, 6.88e-16, 6.88e-16, 5.84e-16, nan ], [ 63, 0.88, 0.04, 0.76, 0.04, 1.21, 0.03, 4.01, 0.01, 5.64e-16, 6.86e-16, 4.79e-16, nan ], [ 64, 1.08, 0.03, 0.86, 0.04, 1.24, 0.03, 4.85, 0.01, 5.55e-16, 4.97e-16, 4.97e-16, nan ], [ 65, 0.84, 0.04, 0.77, 0.04, 1.15, 0.03, 4.27, 0.01, 4.89e-16, 6.65e-16, 4.89e-16, nan ], [ 66, 0.89, 0.04, 0.76, 0.05, 1.19, 0.03, 4.98, 0.01, 5.62e-16, 6.89e-16, 4.81e-16, nan ], [ 67, 0.92, 0.04, 0.80, 0.05, 1.18, 0.03, 5.13, 0.01, 6.50e-16, 8.55e-16, 8.55e-16, nan ], [ 68, 0.88, 0.04, 0.82, 0.05, 1.26, 0.03, 5.47, 0.01, 6.36e-16, 5.33e-16, 5.22e-16, nan ], [ 69, 0.93, 0.04, 0.83, 0.05, 1.30, 0.03, 4.41, 0.01, 6.51e-16, 6.51e-16, 6.18e-16, nan ], [ 70, 0.95, 0.04, 0.85, 0.05, 1.33, 0.03, 4.42, 0.01, 6.42e-16, 6.11e-16, 6.28e-16, nan ], [ 71, 0.93, 0.04, 0.88, 0.05, 1.37, 0.03, 4.55, 0.01, 6.41e-16, 6.17e-16, 6.33e-16, nan ], [ 72, 0.94, 0.05, 0.90, 0.05, 1.37, 0.03, 4.80, 0.01, 1.01e-15, 9.92e-16, 7.96e-16, nan ], [ 73, 1.01, 0.04, 0.93, 0.05, 1.35, 0.03, 4.80, 0.01, 9.93e-16, 7.85e-16, 7.79e-16, nan ], [ 74, 1.00, 0.04, 0.95, 0.05, 1.44, 0.03, 4.93, 0.01, 9.06e-16, 8.59e-16, 7.92e-16, nan ], [ 75, 1.09, 0.04, 1.00, 0.05, 1.44, 0.03, 5.66, 0.01, 8.00e-16, 7.94e-16, 7.87e-16, nan ], [ 76, 1.10, 0.04, 1.00, 0.05, 1.57, 0.03, 4.71, 0.01, 7.54e-16, 5.91e-16, 7.48e-16, nan ], [ 77, 1.15, 0.04, 1.05, 0.05, 1.56, 0.03, 4.83, 0.01, 7.61e-16, 7.44e-16, 5.61e-16, nan ], [ 78, 1.10, 0.05, 1.06, 0.05, 1.60, 0.03, 4.95, 0.01, 8.15e-16, 7.29e-16, 7.78e-16, nan ], [ 79, 1.24, 0.04, 1.11, 0.05, 1.64, 0.03, 4.64, 0.01, 7.68e-16, 9.04e-16, 7.25e-16, nan ], [ 80, 1.24, 0.04, 1.16, 0.05, 1.74, 0.03, 3.98, 0.01, 7.32e-16, 6.40e-16, 5.62e-16, nan ], [ 81, 1.27, 0.04, 1.16, 0.05, 1.57, 0.03, 4.87, 0.01, 5.70e-16, 7.57e-16, 7.75e-16, nan ], [ 82, 1.31, 0.04, 1.19, 0.05, 1.71, 0.03, 6.05, 0.01, 6.25e-16, 6.93e-16, 5.30e-16, nan ], [ 83, 1.25, 0.05, 1.17, 0.05, 1.69, 0.03, 5.60, 0.01, 6.90e-16, 7.06e-16, 8.56e-16, nan ], [ 84, 1.28, 0.05, 1.22, 0.05, 1.75, 0.03, 5.74, 0.01, 7.80e-16, 6.98e-16, 5.67e-16, nan ], [ 85, 1.31, 0.05, 1.23, 0.05, 1.77, 0.03, 5.36, 0.01, 7.01e-16, 6.70e-16, 6.72e-16, nan ], [ 86, 1.40, 0.04, 1.26, 0.05, 1.83, 0.03, 5.49, 0.01, 7.79e-16, 8.26e-16, 9.95e-16, nan ], [ 87, 1.34, 0.05, 1.29, 0.05, 1.86, 0.03, 4.70, 0.01, 6.98e-16, 5.17e-16, 5.89e-16, nan ], [ 88, 1.43, 0.04, 1.31, 0.05, 1.97, 0.03, 5.75, 0.01, 1.03e-15, 8.43e-16, 7.22e-16, nan ], [ 89, 1.46, 0.04, 1.34, 0.05, 1.90, 0.03, 5.75, 0.01, 1.12e-15, 8.60e-16, 1.01e-15, nan ], [ 90, 1.43, 0.05, 1.32, 0.05, 2.00, 0.03, 4.68, 0.01, 8.14e-16, 7.89e-16, 7.06e-16, nan ], [ 100, 1.76, 0.05, 1.56, 0.05, 2.26, 0.04, 6.81, 0.01, 1.02e-15, 9.10e-16, 1.11e-15, nan ], [ 110, 2.19, 0.04, 1.85, 0.05, 2.45, 0.04, 6.53, 0.02, 9.08e-16, 7.79e-16, 6.53e-16, nan ], [ 120, 2.64, 0.04, 2.24, 0.05, 3.24, 0.04, 7.77, 0.02, 7.58e-16, 7.20e-16, 7.49e-16, nan ], [ 130, 2.73, 0.05, 2.48, 0.06, 3.61, 0.04, 7.97, 0.02, 1.32e-15, 1.11e-15, 1.34e-15, nan ], [ 140, 2.93, 0.05, 2.83, 0.06, 4.05, 0.04, 7.47, 0.02, 1.02e-15, 8.18e-16, 1.02e-15, nan ], [ 150, 3.30, 0.06, 3.09, 0.06, 4.43, 0.04, 7.86, 0.02, 1.14e-15, 1.14e-15, 9.89e-16, nan ], [ 160, 3.69, 0.06, 3.84, 0.05, 5.19, 0.04, 8.94, 0.02, 1.07e-15, 9.57e-16, 8.93e-16, nan ], [ 170, 4.33, 0.05, 3.65, 0.06, 5.43, 0.04, 8.66, 0.03, 1.03e-15, 1.02e-15, 1.02e-15, nan ], [ 180, 4.51, 0.06, 3.96, 0.07, 5.80, 0.05, 8.70, 0.03, 9.99e-16, 1.01e-15, 9.48e-16, nan ], [ 190, 5.20, 0.06, 4.34, 0.07, 6.46, 0.05, 9.39, 0.03, 1.25e-15, 1.06e-15, 1.05e-15, nan ], [ 200, 5.20, 0.06, 4.81, 0.07, 7.01, 0.05, 9.52, 0.03, 1.30e-15, 1.46e-15, 1.28e-15, nan ], [ 210, 5.38, 0.07, 5.30, 0.07, 7.41, 0.05, 9.14, 0.04, 1.03e-15, 1.35e-15, 1.09e-15, nan ], [ 220, 5.82, 0.07, 5.51, 0.07, 7.98, 0.05, 9.51, 0.04, 9.69e-16, 1.17e-15, 1.05e-15, nan ], [ 230, 6.45, 0.07, 5.32, 0.08, 8.67, 0.05, 9.66, 0.04, 1.11e-15, 1.17e-15, 1.11e-15, nan ], [ 240, 7.02, 0.07, 6.19, 0.07, 9.26, 0.05, 9.87, 0.05, 1.28e-15, 1.21e-15, 1.19e-15, nan ], [ 250, 7.73, 0.07, 6.61, 0.08, 9.86, 0.05, 9.90, 0.05, 1.60e-15, 1.38e-15, 1.37e-15, nan ], [ 260, 7.24, 0.08, 7.27, 0.07, 10.05, 0.05, 9.88, 0.06, 1.54e-15, 1.32e-15, 1.32e-15, nan ], [ 270, 8.04, 0.07, 7.93, 0.07, 10.47, 0.06, 10.12, 0.06, 1.34e-15, 1.32e-15, 1.28e-15, nan ], [ 280, 8.19, 0.08, 7.69, 0.08, 11.07, 0.06, 10.17, 0.06, 1.73e-15, 1.77e-15, 1.45e-15, nan ], [ 290, 9.12, 0.07, 8.44, 0.08, 11.44, 0.06, 9.92, 0.07, 1.98e-15, 2.16e-15, 1.96e-15, nan ], [ 300, 9.28, 0.08, 8.72, 0.08, 12.04, 0.06, 10.36, 0.07, 1.36e-15, 1.41e-15, 1.59e-15, nan ], [ 310, 9.91, 0.08, 8.88, 0.09, 12.46, 0.06, 10.03, 0.08, 1.30e-15, 1.47e-15, 1.30e-15, nan ], [ 320, 10.96, 0.08, 10.86, 0.08, 13.28, 0.06, 10.43, 0.08, 1.60e-15, 1.45e-15, 1.43e-15, nan ], [ 330, 10.06, 0.09, 9.74, 0.09, 13.45, 0.07, 10.17, 0.09, 1.72e-15, 1.48e-15, 1.46e-15, nan ], [ 340, 10.70, 0.09, 10.56, 0.09, 13.86, 0.07, 10.33, 0.09, 1.50e-15, 1.34e-15, 1.36e-15, nan ], [ 350, 11.56, 0.09, 10.83, 0.09, 14.90, 0.07, 10.24, 0.10, 1.50e-15, 1.70e-15, 1.50e-15, nan ], [ 360, 11.58, 0.09, 10.62, 0.10, 14.90, 0.07, 10.40, 0.10, 1.56e-15, 1.59e-15, 1.42e-15, nan ], [ 370, 12.23, 0.09, 11.59, 0.09, 15.53, 0.07, 10.36, 0.11, 2.48e-15, 1.92e-15, 2.00e-15, nan ], [ 380, 13.04, 0.09, 12.19, 0.10, 16.32, 0.07, 10.44, 0.11, 1.92e-15, 1.74e-15, 1.67e-15, nan ], [ 390, 12.87, 0.09, 11.21, 0.11, 16.69, 0.07, 10.35, 0.12, 1.90e-15, 1.76e-15, 1.60e-15, nan ], [ 400, 10.13, 0.13, 12.83, 0.10, 17.84, 0.07, 10.63, 0.12, 1.48e-15, 1.43e-15, 1.57e-15, nan ], [ 410, 13.77, 0.10, 14.08, 0.10, 17.80, 0.08, 10.39, 0.13, 1.68e-15, 1.62e-15, 1.58e-15, nan ], [ 420, 14.59, 0.10, 13.50, 0.10, 18.17, 0.08, 10.57, 0.13, 1.97e-15, 1.81e-15, 1.78e-15, nan ], [ 430, 14.55, 0.10, 13.74, 0.11, 18.98, 0.08, 10.61, 0.14, 1.72e-15, 1.67e-15, 1.84e-15, nan ], [ 440, 15.52, 0.10, 15.09, 0.10, 19.69, 0.08, 10.65, 0.15, 1.94e-15, 1.94e-15, 2.08e-15, nan ], [ 450, 15.49, 0.10, 14.66, 0.11, 19.59, 0.08, 10.28, 0.16, 1.97e-15, 2.16e-15, 1.88e-15, nan ], [ 460, 15.45, 0.11, 16.04, 0.11, 20.47, 0.08, 10.76, 0.16, 1.50e-15, 1.51e-15, 1.73e-15, nan ], [ 470, 15.82, 0.11, 15.69, 0.11, 20.83, 0.09, 10.55, 0.17, 2.21e-15, 2.23e-15, 2.19e-15, nan ], [ 480, 16.68, 0.11, 17.43, 0.11, 21.48, 0.09, 10.51, 0.18, 2.12e-15, 2.17e-15, 2.33e-15, nan ], [ 490, 17.34, 0.11, 15.66, 0.12, 21.90, 0.09, 10.65, 0.18, 2.37e-15, 2.62e-15, 2.35e-15, nan ], [ 500, 17.42, 0.12, 15.91, 0.13, 22.03, 0.09, 10.66, 0.19, 1.64e-15, 1.82e-15, 1.61e-15, nan ], [ 510, 18.31, 0.11, 15.80, 0.13, 22.68, 0.09, 10.18, 0.21, 1.58e-15, 1.57e-15, 1.80e-15, nan ], [ 520, 18.05, 0.12, 16.94, 0.13, 23.33, 0.09, 10.38, 0.21, 1.97e-15, 1.97e-15, 1.97e-15, nan ], [ 530, 18.75, 0.12, 17.19, 0.13, 23.51, 0.10, 10.68, 0.21, 1.93e-15, 1.77e-15, 1.59e-15, nan ], [ 540, 19.05, 0.12, 17.84, 0.13, 24.17, 0.10, 10.78, 0.22, 1.88e-15, 1.69e-15, 1.69e-15, nan ], [ 550, 19.42, 0.12, 15.44, 0.16, 24.29, 0.10, 10.68, 0.23, 2.28e-15, 1.88e-15, 2.09e-15, nan ], [ 560, 20.29, 0.12, 17.97, 0.14, 25.18, 0.10, 10.80, 0.23, 2.29e-15, 2.04e-15, 2.04e-15, nan ], [ 570, 21.02, 0.12, 18.10, 0.14, 25.54, 0.10, 10.63, 0.25, 2.59e-15, 2.60e-15, 2.60e-15, nan ], [ 580, 20.58, 0.13, 19.28, 0.14, 26.20, 0.10, 10.84, 0.25, 2.07e-15, 1.96e-15, 1.90e-15, nan ], [ 590, 21.29, 0.13, 19.13, 0.15, 26.55, 0.11, 10.78, 0.26, 2.04e-15, 2.26e-15, 2.01e-15, nan ], [ 600, 21.70, 0.13, 20.77, 0.14, 27.52, 0.10, 10.73, 0.27, 2.09e-15, 2.10e-15, 1.90e-15, nan ], [ 610, 22.43, 0.13, 20.32, 0.15, 27.63, 0.11, 10.66, 0.28, 2.08e-15, 2.15e-15, 2.22e-15, nan ], [ 620, 22.49, 0.14, 20.39, 0.15, 28.54, 0.11, 10.89, 0.28, 2.07e-15, 2.22e-15, 1.89e-15, nan ], [ 630, 23.10, 0.14, 20.54, 0.15, 28.96, 0.11, 10.86, 0.29, 1.82e-15, 2.00e-15, 1.90e-15, nan ], [ 640, 24.69, 0.13, 22.33, 0.15, 29.63, 0.11, 10.94, 0.30, 1.99e-15, 1.80e-15, 1.97e-15, nan ], [ 650, 23.53, 0.14, 21.59, 0.16, 29.73, 0.11, 10.79, 0.31, 2.23e-15, 2.31e-15, 2.46e-15, nan ], [ 660, 23.94, 0.15, 22.10, 0.16, 30.65, 0.11, 10.82, 0.32, 3.14e-15, 2.97e-15, 2.80e-15, nan ], [ 670, 24.79, 0.15, 23.66, 0.15, 30.75, 0.12, 10.74, 0.33, 2.60e-15, 2.74e-15, 2.59e-15, nan ], [ 680, 24.88, 0.15, 23.17, 0.16, 31.93, 0.12, 10.94, 0.34, 2.49e-15, 2.64e-15, 2.47e-15, nan ], [ 690, 25.45, 0.15, 24.78, 0.15, 32.02, 0.12, 10.75, 0.36, 2.49e-15, 2.31e-15, 2.32e-15, nan ], [ 700, 26.03, 0.15, 24.27, 0.16, 32.50, 0.12, 10.94, 0.36, 2.29e-15, 2.48e-15, 2.48e-15, nan ], [ 710, 26.44, 0.15, 21.73, 0.19, 32.91, 0.12, 10.80, 0.37, 2.08e-15, 2.24e-15, 2.05e-15, nan ], [ 720, 26.65, 0.16, 24.18, 0.17, 33.52, 0.12, 10.88, 0.38, 2.46e-15, 2.25e-15, 2.57e-15, nan ], [ 730, 26.70, 0.16, 24.28, 0.18, 33.68, 0.13, 10.87, 0.39, 2.83e-15, 2.65e-15, 2.66e-15, nan ], [ 740, 27.98, 0.16, 26.76, 0.16, 33.23, 0.13, 10.87, 0.40, 2.92e-15, 2.31e-15, 2.31e-15, nan ], [ 750, 28.57, 0.16, 26.52, 0.17, 33.18, 0.14, 10.84, 0.42, 2.43e-15, 2.29e-15, 2.32e-15, nan ], [ 760, 28.60, 0.16, 25.72, 0.18, 34.01, 0.14, 10.90, 0.42, 3.01e-15, 2.86e-15, 2.85e-15, nan ], [ 770, 28.64, 0.17, 27.65, 0.17, 34.67, 0.14, 10.56, 0.45, 3.40e-15, 3.40e-15, 3.11e-15, nan ], [ 780, 28.69, 0.17, 27.87, 0.17, 35.57, 0.14, 11.03, 0.44, 2.62e-15, 2.77e-15, 2.48e-15, nan ], [ 790, 29.76, 0.17, 28.43, 0.18, 36.24, 0.14, 10.97, 0.46, 2.23e-15, 2.41e-15, 2.32e-15, nan ], [ 800, 29.84, 0.17, 28.20, 0.18, 36.65, 0.14, 10.98, 0.47, 2.84e-15, 2.84e-15, 2.99e-15, nan ], [ 810, 30.38, 0.17, 27.99, 0.19, 36.76, 0.14, 10.86, 0.48, 2.89e-15, 2.45e-15, 2.49e-15, nan ], [ 820, 31.35, 0.17, 29.17, 0.18, 37.18, 0.14, 11.00, 0.49, 2.55e-15, 2.65e-15, 2.78e-15, nan ], [ 830, 32.12, 0.17, 28.62, 0.19, 38.34, 0.14, 10.93, 0.50, 2.38e-15, 2.39e-15, 2.51e-15, nan ], [ 840, 31.25, 0.18, 28.71, 0.20, 36.77, 0.15, 11.00, 0.51, 3.80e-15, 3.80e-15, 3.53e-15, nan ], [ 850, 32.34, 0.18, 29.08, 0.20, 37.08, 0.16, 10.88, 0.53, 2.54e-15, 2.41e-15, 2.56e-15, nan ], [ 860, 32.75, 0.18, 31.55, 0.19, 36.78, 0.16, 11.00, 0.54, 2.57e-15, 2.39e-15, 2.41e-15, nan ], [ 870, 33.34, 0.18, 23.51, 0.26, 39.38, 0.15, 10.99, 0.55, 2.61e-15, 2.49e-15, 2.62e-15, nan ], [ 880, 33.94, 0.18, 32.33, 0.19, 39.26, 0.16, 11.01, 0.56, 2.63e-15, 2.60e-15, 2.52e-15, nan ], [ 890, 34.13, 0.19, 31.25, 0.20, 39.68, 0.16, 10.87, 0.58, 2.17e-15, 2.23e-15, 2.20e-15, nan ], [ 900, 33.49, 0.19, 31.36, 0.21, 40.04, 0.16, 10.99, 0.59, 2.92e-15, 2.58e-15, 2.44e-15, nan ], [ 1000, 37.80, 0.21, 35.45, 0.23, 43.53, 0.18, 10.70, 0.75, 2.75e-15, 2.39e-15, 2.32e-15, nan ], [ 1100, 41.57, 0.23, 35.79, 0.27, 28.02, 0.35, 10.32, 0.94, 3.10e-15, 3.31e-15, 3.31e-15, nan ], [ 1200, 45.09, 0.26, 38.34, 0.30, 30.05, 0.38, 9.90, 1.16, 3.27e-15, 3.54e-15, 3.04e-15, nan ], [ 1300, 47.31, 0.29, 42.30, 0.32, 31.33, 0.43, 9.77, 1.38, 3.71e-15, 4.77e-15, 4.63e-15, nan ], [ 1400, 53.57, 0.29, 44.33, 0.35, 32.56, 0.48, 9.09, 1.73, 4.06e-15, 4.23e-15, 4.39e-15, nan ], [ 1500, 55.94, 0.32, 45.06, 0.40, 36.33, 0.50, 8.60, 2.09, 3.79e-15, 3.79e-15, 4.40e-15, nan ], [ 1600, 61.20, 0.33, 56.94, 0.36, 38.16, 0.54, 8.35, 2.46, 3.87e-15, 3.98e-15, 3.78e-15, nan ], [ 1700, 63.23, 0.37, 49.77, 0.46, 40.19, 0.58, 8.27, 2.80, 4.07e-15, 3.89e-15, 3.92e-15, nan ], [ 1800, 67.71, 0.38, 53.47, 0.49, 42.19, 0.61, 7.83, 3.31, 4.04e-15, 4.17e-15, 4.17e-15, nan ], [ 1900, 71.02, 0.41, 53.83, 0.54, 43.14, 0.67, 8.30, 3.48, 4.44e-15, 4.57e-15, 4.45e-15, nan ], [ 2000, 74.29, 0.43, 55.32, 0.58, 44.17, 0.73, 8.35, 3.84, 4.12e-15, 4.09e-15, 4.36e-15, nan ], [ 2100, 77.77, 0.45, 56.84, 0.62, 35.30, 1.00, 8.35, 4.23, 4.33e-15, 4.13e-15, 3.96e-15, nan ], [ 2200, 79.24, 0.49, 58.63, 0.66, 37.04, 1.05, 8.41, 4.61, 3.99e-15, 4.60e-15, 4.26e-15, nan ], [ 2300, 85.23, 0.50, 59.80, 0.71, 39.03, 1.09, 7.60, 5.57, 5.14e-15, 5.16e-15, 5.14e-15, nan ], [ 2400, 86.84, 0.53, 71.39, 0.65, 39.86, 1.16, 8.23, 5.60, 4.63e-15, 4.93e-15, 4.38e-15, nan ], [ 2500, 88.88, 0.56, 59.28, 0.84, 41.55, 1.20, 8.44, 5.93, 5.48e-15, 5.67e-15, 5.67e-15, nan ], [ 2600, 92.64, 0.58, 61.71, 0.88, 41.81, 1.29, 8.46, 6.40, 6.89e-15, 6.86e-15, 6.85e-15, nan ], [ 2700, 93.67, 0.62, 63.08, 0.93, 42.98, 1.36, 8.37, 6.98, 5.06e-15, 5.02e-15, 5.08e-15, nan ], [ 2800, 97.30, 0.64, 64.77, 0.97, 40.78, 1.54, 8.50, 7.39, 5.39e-15, 5.55e-15, 4.89e-15, nan ], [ 2900, 100.48, 0.67, 63.39, 1.06, 45.92, 1.47, 8.50, 7.92, 5.04e-15, 5.06e-15, 5.35e-15, nan ], [ 3000, 106.88, 0.67, 65.73, 1.10, 47.39, 1.52, 8.56, 8.41, 5.21e-15, 5.16e-15, 5.08e-15, nan ], [ 3100, 110.33, 0.70, 64.15, 1.20, 38.99, 1.97, 8.58, 8.97, 6.08e-15, 5.41e-15, 5.52e-15, nan ], [ 3200, 111.83, 0.73, 84.42, 0.97, 40.55, 2.02, 9.40, 8.71, 5.40e-15, 5.55e-15, 5.56e-15, nan ], [ 3300, 114.06, 0.76, 66.99, 1.30, 41.19, 2.12, 8.60, 10.14, 5.67e-15, 6.10e-15, 5.81e-15, nan ], [ 3400, 116.08, 0.80, 67.44, 1.37, 42.76, 2.16, 8.61, 10.74, 6.46e-15, 6.11e-15, 5.92e-15, nan ], [ 3500, 120.77, 0.81, 68.14, 1.44, 44.02, 2.23, 8.48, 11.56, 6.11e-15, 5.59e-15, 5.52e-15, nan ], [ 3600, 122.58, 0.85, 69.43, 1.49, 44.63, 2.32, 8.60, 12.06, 5.81e-15, 5.82e-15, 6.10e-15, nan ], [ 3700, 124.34, 0.88, 71.06, 1.54, 44.85, 2.44, 8.50, 12.90, 5.44e-15, 5.65e-15, 5.67e-15, nan ], [ 3800, 127.26, 0.91, 72.17, 1.60, 46.28, 2.50, 8.56, 13.51, 6.23e-15, 6.12e-15, 6.00e-15, nan ], [ 3900, 127.86, 0.95, 69.05, 1.76, 47.13, 2.58, 8.35, 14.57, 5.81e-15, 6.08e-15, 5.63e-15, nan ], [ 4000, 125.40, 1.02, 89.42, 1.43, 46.87, 2.73, 8.53, 15.01, 6.16e-15, 6.28e-15, 6.14e-15, nan ], [ 4100, 118.74, 1.13, 69.89, 1.92, 39.96, 3.37, 7.88, 17.07, 6.16e-15, 6.89e-15, 6.55e-15, nan ], [ 4200, 119.93, 1.18, 72.32, 1.95, 41.06, 3.44, 8.52, 16.57, 7.28e-15, 6.54e-15, 6.54e-15, nan ], [ 4300, 123.02, 1.20, 71.07, 2.08, 42.00, 3.52, 8.52, 17.36, 6.06e-15, 6.35e-15, 6.19e-15, nan ], [ 4400, 123.45, 1.26, 73.15, 2.12, 43.15, 3.59, 8.56, 18.11, 6.31e-15, 6.39e-15, 6.12e-15, nan ], [ 4500, 122.96, 1.32, 73.50, 2.20, 44.37, 3.65, 8.59, 18.86, 6.75e-15, 6.53e-15, 6.80e-15, nan ], [ 4600, 124.32, 1.36, 73.46, 2.31, 45.99, 3.68, 8.60, 19.70, 6.95e-15, 7.40e-15, 7.18e-15, nan ], [ 4700, 122.51, 1.44, 75.13, 2.35, 47.08, 3.76, 8.67, 20.40, 6.19e-15, 6.62e-15, 6.40e-15, nan ], [ 4800, 123.08, 1.50, 93.44, 1.97, 46.15, 3.99, 8.75, 21.08, 7.21e-15, 6.83e-15, 7.02e-15, nan ], [ 4900, 122.94, 1.56, 72.59, 2.65, 47.08, 4.08, 8.72, 22.04, 8.24e-15, 7.80e-15, 7.80e-15, nan ], [ 5000, 121.91, 1.64, 74.09, 2.70, 48.51, 4.12, 8.79, 22.75, 7.47e-15, 7.83e-15, 7.48e-15, nan ], [ 5100, 123.90, 1.68, 75.27, 2.77, 49.69, 4.19, 8.75, 23.80, 8.39e-15, 8.64e-15, 8.41e-15, nan ], [ 5200, 123.23, 1.76, 75.03, 2.88, 44.16, 4.90, 8.76, 24.71, 8.76e-15, 8.93e-15, 8.58e-15, nan ], [ 5300, 123.78, 1.82, 74.62, 3.01, 44.22, 5.08, 8.77, 25.64, 8.93e-15, 8.59e-15, 8.95e-15, nan ], [ 5400, 122.48, 1.91, 74.60, 3.13, 44.18, 5.28, 8.73, 26.73, 7.28e-15, 7.42e-15, 7.64e-15, nan ], [ 5500, 123.07, 1.97, 76.99, 3.14, 45.11, 5.37, 8.70, 27.84, 7.53e-15, 6.95e-15, 7.25e-15, nan ], [ 5600, 125.41, 2.00, 98.53, 2.55, 45.94, 5.46, 8.69, 28.87, 8.12e-15, 8.45e-15, 8.29e-15, nan ], [ 5700, 124.51, 2.09, 76.33, 3.41, 46.50, 5.59, 8.76, 29.69, 8.20e-15, 8.11e-15, 8.22e-15, nan ], [ 5800, 124.91, 2.16, 75.87, 3.55, 47.53, 5.66, 8.67, 31.03, 9.28e-15, 8.33e-15, 9.11e-15, nan ], [ 5900, 124.85, 2.23, 76.86, 3.62, 47.89, 5.82, 8.78, 31.73, 7.88e-15, 7.56e-15, 7.35e-15, nan ], [ 6000, 127.01, 2.27, 76.88, 3.75, 49.86, 5.78, 8.36, 34.48, 7.60e-15, 7.88e-15, 7.89e-15, nan ], [ 6100, 126.06, 2.36, 77.08, 3.86, 49.58, 6.01, 8.55, 34.81, 8.49e-15, 9.36e-15, 8.75e-15, nan ], [ 6200, 128.07, 2.40, 77.78, 3.95, 44.62, 6.89, 8.44, 36.44, 7.79e-15, 7.88e-15, 7.82e-15, nan ], [ 6300, 127.85, 2.48, 76.00, 4.18, 45.47, 6.98, 8.81, 36.04, 8.40e-15, 8.02e-15, 8.86e-15, nan ], [ 6400, 130.99, 2.50, 100.48, 3.26, 45.48, 7.21, 9.22, 35.54, 8.53e-15, 8.69e-15, 9.12e-15, nan ], [ 6500, 129.29, 2.61, 78.02, 4.33, 45.39, 7.45, 8.67, 38.98, 7.96e-15, 7.22e-15, 8.21e-15, nan ], [ 6600, 128.20, 2.72, 78.97, 4.41, 46.19, 7.55, 8.37, 41.64, 8.75e-15, 9.98e-15, 9.18e-15, nan ], [ 6700, 129.35, 2.78, 79.03, 4.54, 46.43, 7.74, 8.74, 41.11, 7.78e-15, 7.94e-15, 7.79e-15, nan ], [ 6800, 129.88, 2.85, 77.61, 4.77, 46.58, 7.94, 8.71, 42.46, 9.95e-15, 1.02e-14, 9.64e-15, nan ], [ 6900, 132.60, 2.87, 77.75, 4.90, 47.45, 8.03, 8.73, 43.62, 8.70e-15, 8.51e-15, 8.58e-15, nan ], [ 7000, 130.96, 2.99, 78.26, 5.01, 48.39, 8.10, 8.29, 47.29, 9.23e-15, 8.75e-15, 8.67e-15, nan ], [ 7100, 131.65, 3.06, 78.31, 5.15, 49.28, 8.19, 8.29, 48.67, 7.97e-15, 8.42e-15, 7.83e-15, nan ], [ 7200, 132.78, 3.12, 102.98, 4.03, 45.35, 9.15, 8.14, 50.94, 7.83e-15, 8.23e-15, 8.72e-15, nan ], [ 7300, 132.80, 3.21, 79.19, 5.38, 44.94, 9.49, 7.82, 54.51, 9.41e-15, 9.67e-15, 9.07e-15, nan ], [ 7400, 132.62, 3.30, 79.55, 5.51, 45.54, 9.62, 8.17, 53.61, 7.64e-15, 7.70e-15, 8.69e-15, nan ], [ 7500, 134.81, 3.34, 79.02, 5.70, 45.93, 9.80, 8.08, 55.71, 8.08e-15, 8.51e-15, 8.18e-15, nan ], [ 7600, 134.43, 3.44, 79.45, 5.82, 47.22, 9.79, 8.09, 57.16, 8.45e-15, 8.41e-15, 8.30e-15, nan ], [ 7700, 134.17, 3.54, 78.14, 6.07, 46.73, 10.15, 8.06, 58.88, 8.20e-15, 8.11e-15, 8.77e-15, nan ], [ 7800, 135.30, 3.60, 78.70, 6.19, 48.05, 10.13, 7.72, 63.08, 8.40e-15, 8.81e-15, 8.77e-15, nan ], [ 7900, 135.85, 3.68, 79.45, 6.29, 48.20, 10.36, 7.70, 64.87, 9.47e-15, 9.87e-15, 9.62e-15, nan ], [ 8000, 136.27, 3.76, 107.74, 4.75, 48.32, 10.60, 7.69, 66.61, 9.00e-15, 8.96e-15, 9.01e-15, nan ], [ 8100, 135.13, 3.89, 78.97, 6.65, 48.21, 10.89, 7.51, 69.86, 8.90e-15, 9.06e-15, 9.18e-15, nan ], [ 8200, 132.88, 4.05, 78.76, 6.83, 45.51, 11.82, 7.37, 73.03, 9.72e-15, 8.68e-15, 9.05e-15, nan ], [ 8300, 135.70, 4.06, 80.81, 6.82, 45.79, 12.04, 7.29, 75.65, 9.44e-15, 9.66e-15, 9.65e-15, nan ], [ 8400, 133.21, 4.24, 80.84, 6.98, 46.11, 12.24, 7.59, 74.38, 8.45e-15, 8.24e-15, 8.49e-15, nan ], [ 8500, 135.04, 4.28, 80.91, 7.14, 46.16, 12.52, 7.63, 75.79, 8.87e-15, 9.55e-15, 9.26e-15, nan ], [ 8600, 133.53, 4.43, 81.05, 7.30, 46.93, 12.61, 7.72, 76.69, 1.07e-14, 1.17e-14, 1.10e-14, nan ], [ 8700, 134.76, 4.49, 81.66, 7.42, 47.86, 12.65, 7.59, 79.79, 9.70e-15, 9.67e-15, 9.05e-15, nan ], [ 8800, 132.94, 4.66, 108.00, 5.74, 48.36, 12.81, 8.02, 77.27, 9.47e-15, 9.71e-15, 9.18e-15, nan ], [ 8900, 133.91, 4.73, 80.20, 7.90, 47.01, 13.48, 8.14, 77.84, 1.21e-14, 1.29e-14, 1.17e-14, nan ], [ 9000, 133.66, 4.85, 81.75, 7.93, 48.24, 13.43, 8.16, 79.46, 9.94e-15, 9.76e-15, 1.00e-14, nan ], [ 10000, 133.73, 5.98, 81.51, 9.82, 48.79, 16.40, 8.47, 94.42, 1.00e-14, 1.21e-14, 1.12e-14, nan ], [ 12000, 134.57, 8.56, 110.76, 10.40, 48.00, 24.00, 8.32, 138.49, 1.21e-14, 1.22e-14, 1.28e-14, nan ], [ 14000, 130.07, 12.06, 82.60, 18.99, 47.31, 33.15, 8.54, 183.66, 1.34e-14, 1.31e-14, 1.34e-14, nan ], [ 16000, 127.94, 16.01, 112.71, 18.17, 47.62, 43.01, 8.88, 230.69, 1.39e-14, 1.28e-14, 1.23e-14, nan ], [ 18000, 124.97, 20.74, 84.81, 30.57, 47.48, 54.60, 7.85, 330.42, 1.60e-14, 1.45e-14, 1.56e-14, nan ], [ 20000, 122.15, 26.20, 116.89, 27.38, 46.89, 68.25, 8.45, 378.62, 1.66e-14, 1.67e-14, 1.80e-14, nan ], ]) # ------------------------------------------------------------ # file: v2.0.0/cuda7.0-k40c/zpotrf.txt # numactl --interleave=all ../testing/testing_zpotrf -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 zpotrf = array([ [ 10, nan, nan, 0.33, 0.00, nan ], [ 20, nan, nan, 1.09, 0.00, nan ], [ 30, nan, nan, 2.58, 0.00, nan ], [ 40, nan, nan, 2.57, 0.00, nan ], [ 50, nan, nan, 3.87, 0.00, nan ], [ 60, nan, nan, 4.75, 0.00, nan ], [ 70, nan, nan, 5.18, 0.00, nan ], [ 80, nan, nan, 5.61, 0.00, nan ], [ 90, nan, nan, 5.89, 0.00, nan ], [ 100, nan, nan, 6.06, 0.00, nan ], [ 200, nan, nan, 28.62, 0.00, nan ], [ 300, nan, nan, 12.87, 0.00, nan ], [ 400, nan, nan, 27.16, 0.00, nan ], [ 500, nan, nan, 43.19, 0.00, nan ], [ 600, nan, nan, 53.23, 0.01, nan ], [ 700, nan, nan, 74.00, 0.01, nan ], [ 800, nan, nan, 79.83, 0.01, nan ], [ 900, nan, nan, 107.22, 0.01, nan ], [ 1000, nan, nan, 131.66, 0.01, nan ], [ 2000, nan, nan, 375.51, 0.03, nan ], [ 3000, nan, nan, 550.82, 0.07, nan ], [ 4000, nan, nan, 680.12, 0.13, nan ], [ 5000, nan, nan, 764.24, 0.22, nan ], [ 6000, nan, nan, 828.03, 0.35, nan ], [ 7000, nan, nan, 882.55, 0.52, nan ], [ 8000, nan, nan, 922.54, 0.74, nan ], [ 9000, nan, nan, 950.90, 1.02, nan ], [ 10000, nan, nan, 983.89, 1.36, nan ], [ 12000, nan, nan, 1032.41, 2.23, nan ], [ 14000, nan, nan, 1061.08, 3.45, nan ], [ 16000, nan, nan, 1088.31, 5.02, nan ], [ 18000, nan, nan, 1105.07, 7.04, nan ], [ 20000, nan, nan, 1122.98, 9.50, nan ], ]) # numactl --interleave=all ../testing/testing_zpotrf_gpu -N 123 -N 1234 --range 10:90:10 --range 100:900:100 --range 1000:9000:1000 --range 10000:20000:2000 zpotrf_gpu = array([ [ 10, nan, nan, 0.00, 0.00, nan ], [ 20, nan, nan, 0.01, 0.00, nan ], [ 30, nan, nan, 0.03, 0.00, nan ], [ 40, nan, nan, 0.07, 0.00, nan ], [ 50, nan, nan, 0.14, 0.00, nan ], [ 60, nan, nan, 0.23, 0.00, nan ], [ 70, nan, nan, 0.36, 0.00, nan ], [ 80, nan, nan, 0.52, 0.00, nan ], [ 90, nan, nan, 0.71, 0.00, nan ], [ 100, nan, nan, 0.93, 0.00, nan ], [ 200, nan, nan, 5.95, 0.00, nan ], [ 300, nan, nan, 10.73, 0.00, nan ], [ 400, nan, nan, 23.17, 0.00, nan ], [ 500, nan, nan, 39.91, 0.00, nan ], [ 600, nan, nan, 50.84, 0.01, nan ], [ 700, nan, nan, 73.22, 0.01, nan ], [ 800, nan, nan, 82.49, 0.01, nan ], [ 900, nan, nan, 111.63, 0.01, nan ], [ 1000, nan, nan, 138.97, 0.01, nan ], [ 2000, nan, nan, 439.58, 0.02, nan ], [ 3000, nan, nan, 640.66, 0.06, nan ], [ 4000, nan, nan, 781.19, 0.11, nan ], [ 5000, nan, nan, 858.01, 0.19, nan ], [ 6000, nan, nan, 916.48, 0.31, nan ], [ 7000, nan, nan, 967.71, 0.47, nan ], [ 8000, nan, nan, 1005.48, 0.68, nan ], [ 9000, nan, nan, 1029.80, 0.94, nan ], [ 10000, nan, nan, 1055.77, 1.26, nan ], [ 12000, nan, nan, 1098.56, 2.10, nan ], [ 14000, nan, nan, 1118.59, 3.27, nan ], [ 16000, nan, nan, 1140.72, 4.79, nan ], [ 18000, nan, nan, 1152.94, 6.75, nan ], [ 20000, nan, nan, 1166.65, 9.14, nan ], ])
76.363084
886
0.443182
7940d546489c2c1353ca45d6331d3637f08649dd
448
pyde
Python
processing/chapter9/sketch_9_1_L60/sketch_9_1_L60.pyde
brickdonut/2019-fall-polytech-cs
b2830795f35e65ff90cf73e0746551c6efdd1f87
[ "MIT" ]
null
null
null
processing/chapter9/sketch_9_1_L60/sketch_9_1_L60.pyde
brickdonut/2019-fall-polytech-cs
b2830795f35e65ff90cf73e0746551c6efdd1f87
[ "MIT" ]
null
null
null
processing/chapter9/sketch_9_1_L60/sketch_9_1_L60.pyde
brickdonut/2019-fall-polytech-cs
b2830795f35e65ff90cf73e0746551c6efdd1f87
[ "MIT" ]
null
null
null
xCoordinate = [1,2,3,4,5,6,7,8,9,10] coordinate = 0 def setup(): size(500,500) smooth() noStroke() for i in range(0, len(xCoordinate)): xCoordinate[i] = 35*i + 90 def draw(): background(50) for coordinate in xCoordinate: fill(200) ellipse(coordinate, 250, 30, 30) fill(0) ellipse(coordinate, 250, 3,3) def keyPressed(): if (key == 's'): saveFrame("myP")
21.333333
40
0.540179
7940d5e63e5badcec8569d3275d3d3fefef1df42
844
py
Python
app/translate.py
raz-m12/python_flask-website
9f4396a0b436c06174a5d0fc0c83aa2fae6ed277
[ "MIT" ]
null
null
null
app/translate.py
raz-m12/python_flask-website
9f4396a0b436c06174a5d0fc0c83aa2fae6ed277
[ "MIT" ]
null
null
null
app/translate.py
raz-m12/python_flask-website
9f4396a0b436c06174a5d0fc0c83aa2fae6ed277
[ "MIT" ]
null
null
null
import json import requests from flask import current_app from flask_babel import _ def translate(text, source_language, dest_language): if 'MS_TRANSLATOR_KEY' not in current_app.config or \ not current_app.config['MS_TRANSLATOR_KEY']: return _('Error: the translation service is not configured.') auth = { 'Ocp-Apim-Subscription-Key': current_app.config['MS_TRANSLATOR_KEY'], 'Ocp-Apim-Subscription-Region': 'westeurope'} r = requests.post( 'https://api.cognitive.microsofttranslator.com' '/translate?api-version=3.0&from={}&to={}'.format( source_language, dest_language), headers=auth, json=[ {'Text': text}]) if r.status_code != 200: return _('Error: the translation service failed.') return r.json()[0]['translations'][0]['text']
38.363636
77
0.663507
7940d69df3fbe72f3f545c1df20a26c1b2095d9a
2,964
py
Python
stackformation/deploy/__init__.py
ibejohn818/stackformation
7ab5b29b584c64cea31add470c4f6df847d19c1c
[ "MIT" ]
null
null
null
stackformation/deploy/__init__.py
ibejohn818/stackformation
7ab5b29b584c64cea31add470c4f6df847d19c1c
[ "MIT" ]
1,396
2017-12-24T18:25:05.000Z
2022-03-31T15:05:19.000Z
stackformation/deploy/__init__.py
ibejohn818/stackformation
7ab5b29b584c64cea31add470c4f6df847d19c1c
[ "MIT" ]
null
null
null
import time import logging from stackformation.utils import (match_stack, _match_stack) from colorama import Fore, Back, Style # noqa logger = logging.getLogger(__name__) class Deploy(object): """ Base deploy class """ def cli_confirm(self, infra, selector=[], **kwargs): c = 0 defaults = { 'reverse': False, 'ask': 'Deploy Stack(s)?' } defaults.update(kwargs) stacks = infra.list_stacks(reverse=defaults['reverse']) results = match_stack(selector, stacks) for stack in results: c += 1 print("Stack: {}{}/{}{}".format( Fore.CYAN + Style.BRIGHT, stack.get_stack_name(), stack.get_remote_stack_name(), Style.RESET_ALL )) if c <= 0: print("NO STACKS SELCTED!") return False ans = input("{} [y/n]: \n".format(defaults['ask'])) if ans.lower().startswith("y"): return True return False def destroy(self, infra, selector=False, **kw): stacks = infra.list_stacks(reverse=True) stacks = match_stack(selector, stacks) for stack in stacks: try: start = stack.start_destroy(infra, stack.infra.context) if not start: print("{} Skipping destroy..".format(stack.get_stack_name())) except Exception as e: print(str(e)) continue time.sleep(2) while stack.deploying(infra): pass logger.info("DESTROY COMPLETE: {}".format(stack.get_stack_name())) def __destroy(self, infra, selector=False, **kwargs): stacks = infra.list_stacks(reverse=True) for stack in stacks: if selector and not _match_stack(selector, stack): continue start = stack.start_destroy(infra, stack.infra.context) if not start: continue time.sleep(2) while stack.deploying(infra): pass logger.info("DESTROY COMPLETE: {}".format(stack.get_stack_name())) class SerialDeploy(Deploy): """ Sequential deployment """ def deploy(self, infra, selector=False): stacks = infra.get_stacks() stacks = match_stack(selector, stacks) for stack in stacks: dependent_stacks = infra.get_dependent_stacks(stack) for k, stk in dependent_stacks.items(): stk.load_stack_outputs(stack.infra) start = stack.start_deploy(infra, stack.infra.context) if not start: print("{} Skipping deploy..".format(stack.get_stack_name())) time.sleep(2) while stack.deploying(infra): pass logger.info("DEPLOY COMPLETE: {}".format(stack.get_stack_name()))
26
81
0.547571
7940d7a6a60ec9f488759063d37b32c9c5e51e8d
5,271
py
Python
pluraexercise.py
RajParab/pluradl.py
b1ab480526c698f578e9f4bdd9ca9cddd9876f5e
[ "MIT" ]
10
2020-08-14T03:17:53.000Z
2021-08-14T13:58:11.000Z
pluraexercise.py
RajParab/pluradl.py
b1ab480526c698f578e9f4bdd9ca9cddd9876f5e
[ "MIT" ]
null
null
null
pluraexercise.py
RajParab/pluradl.py
b1ab480526c698f578e9f4bdd9ca9cddd9876f5e
[ "MIT" ]
6
2020-09-15T18:44:45.000Z
2021-04-15T10:59:00.000Z
from plura_dl.scrapeutils import ( os, sys, re, sleep, Path, clear, TimeoutException, set_chrome_driver, wait_for_access, enter_hibernation ) from selenium.webdriver.chrome.options import Options from pluradl import get_courses, get_usr_pw, flag_parser, arg_parser, set_directory LOGIN_URL=r'https://app.pluralsight.com/id?' COURSE_BASE=r'https://app.pluralsight.com/library/courses' DLPATH, USERNAME, PASSWORD = "", "", "" USERNAME_INPUT=r'//*[@id="Username"]' PASSWORD_INPUT=r'//*[@id="Password"]' LOGIN_SUBMIT=r'//*[@id="login"]' DOWNLOAD_EXERCISE_FILE=r'//*[@id="ps-main"]/div/div[2]/section/div[3]/div/div/button' ALT_DOWNLOAD_EXERCISE_FILE=r'/html/body/div[1]/div[3]/div/div[2]/section/div[4]/div/div/button' def login_routine(driver, LOGIN_URL): """Handles WebDriver login into Pluralsight Arguments: driver {WebDriver} -- WebDriver object to use LOGIN_URL {str} -- Login url """ driver.get(LOGIN_URL) wait_for_access(driver, PASSWORD_INPUT) driver.find_element_by_xpath(USERNAME_INPUT).send_keys(USERNAME) driver.find_element_by_xpath(PASSWORD_INPUT).send_keys(PASSWORD) driver.find_element_by_xpath(LOGIN_SUBMIT).click() def download_routine(driver, course, sleep_time=5): """Handling the download of exercise files from Pluralsight Arguments: driver {WebDriver} -- WebDriver object to use excercise_url {str} -- Exercise files page url """ sleep(sleep_time) excercise_url = COURSE_BASE + '/' + course + '/' + 'exercise-files' no_materals_lookup = r'this course has no materials' upgrade_lookup = r'Upgrade today' driver.get(excercise_url) materials_check=True try: wait_for_access(driver, DOWNLOAD_EXERCISE_FILE, timer=sleep_time).click() except TimeoutException: try: course_text = driver.find_element_by_class_name('l-course-page__content').text except: course_text = "" if re.search(no_materals_lookup, course_text): materials_check=False print(course, 'did not have any course materials. Tagging it ...') with open(os.path.join(DLPATH,'tagged_courses.txt'), 'at') as f: f.write(course + '\n') elif re.search(upgrade_lookup, course_text): materials_check=False print(course, 'are not a part of your subscription. Tagging it ...') with open(os.path.join(DLPATH,'tagged_courses.txt'), 'at') as f: f.write(course + '\n') if materials_check: try: wait_for_access(driver, ALT_DOWNLOAD_EXERCISE_FILE, timer=sleep_time).click() except TimeoutException: print(course, 'did not succeeded. The course might not be in your subscription or it`s not available anymore. Tagging it ...') with open(os.path.join(DLPATH,'failed_courses.txt'), 'at') as f: f.write(course + '\n') def already_tagged_courses(): """Courses get tagged if they are already downloaded, if they do not contain any materials at all or if the do not contain authorized materials for used subscription. Getting information from tagged_courses.txt. Returns: [str] -- List of tagged course_ids """ zip_reg = re.compile(r'.+\.zip$') name_reg = re.compile(r'.*(?=.zip)') tagged_courses = os.path.join(DLPATH, 'tagged_courses.txt') course_tags = [] if os.path.exists(tagged_courses): with open(tagged_courses, 'rt') as f: for line in f.readlines(): course_tags.append(line.strip()) for element in Path(DLPATH).rglob('*.zip'): filename = element.name if zip_reg.match(filename): course_tags.append(name_reg.search(filename).group()) return course_tags def main(): """Main execution Using Selenium WebDriver along with courselist.txt and Pluralsight credentials to automate the downloading process of exercise files. """ global DLPATH, USERNAME, PASSWORD scriptpath = os.path.dirname(os.path.abspath(sys.argv[0])) DLPATH = os.path.join(scriptpath,"exercise_files") flag_state = flag_parser() arg_state = arg_parser() if flag_state[0]: print("Executing by flag input ..") USERNAME, PASSWORD = flag_state[1], flag_state[2] elif arg_state[0]: print("Executing by user input ..") USERNAME, PASSWORD = arg_state[1], arg_state[2] else: USERNAME, PASSWORD = get_usr_pw() print("Setting username to:", USERNAME) courses = get_courses(os.path.dirname(os.path.abspath(sys.argv[0]))) if os.path.exists(DLPATH): course_tags = already_tagged_courses() else: course_tags = [] driver = set_chrome_driver(DLPATH) set_directory(DLPATH) login_routine(driver, LOGIN_URL) for course in courses: if course[0] not in course_tags: download_routine(driver, course[0], sleep_time=5) else: print(course[0], "is tagged, skipping it.") print("\nEnd of list reached. Downloads might still be in progress.") enter_hibernation() driver.close() if __name__ == "__main__": main()
35.857143
142
0.658509
7940d7db84ed683eb3d8d25fdbc6a92e05e270cc
1,479
py
Python
test/test_inference/test_annotations.py
haoqixu/jedi
ea93dbc08eac0a1b8c39e15c554c0b0c4ce65591
[ "MIT" ]
10
2020-07-21T21:59:54.000Z
2021-07-19T11:01:47.000Z
test/test_inference/test_annotations.py
haoqixu/jedi
ea93dbc08eac0a1b8c39e15c554c0b0c4ce65591
[ "MIT" ]
null
null
null
test/test_inference/test_annotations.py
haoqixu/jedi
ea93dbc08eac0a1b8c39e15c554c0b0c4ce65591
[ "MIT" ]
1
2021-01-30T18:17:01.000Z
2021-01-30T18:17:01.000Z
from textwrap import dedent import pytest def test_simple_annotations(Script, environment): """ Annotations only exist in Python 3. If annotations adhere to PEP-0484, we use them (they override inference), else they are parsed but ignored """ if environment.version_info.major == 2: pytest.skip() source = dedent("""\ def annot(a:3): return a annot('')""") assert [d.name for d in Script(source).infer()] == ['str'] source = dedent("""\ def annot_ret(a:3) -> 3: return a annot_ret('')""") assert [d.name for d in Script(source).infer()] == ['str'] source = dedent("""\ def annot(a:int): return a annot('')""") assert [d.name for d in Script(source).infer()] == ['int'] @pytest.mark.parametrize('reference', [ 'assert 1', '1', 'def x(): pass', '1, 2', r'1\n' ]) def test_illegal_forward_references(Script, environment, reference): if environment.version_info.major == 2: pytest.skip() source = 'def foo(bar: "%s"): bar' % reference assert not Script(source).infer() def test_lambda_forward_references(Script, environment): if environment.version_info.major == 2: pytest.skip() source = 'def foo(bar: "lambda: 3"): bar' # For now just receiving the 3 is ok. I'm doubting that this is what we # want. We also execute functions. Should we only execute classes? assert Script(source).infer()
22.753846
77
0.613928
7940d867a51a6573716d4e0ffa0d7c2691ed6696
1,940
py
Python
nes/ensemble_selection/config.py
automl/nes
1c54786c30acd6e19eb9708204bffc86b58ea272
[ "Apache-2.0" ]
26
2020-06-22T16:07:54.000Z
2022-03-23T08:12:05.000Z
nes/ensemble_selection/config.py
automl/nes
1c54786c30acd6e19eb9708204bffc86b58ea272
[ "Apache-2.0" ]
2
2020-07-13T06:23:18.000Z
2022-03-31T07:30:18.000Z
nes/ensemble_selection/config.py
automl/nes
1c54786c30acd6e19eb9708204bffc86b58ea272
[ "Apache-2.0" ]
4
2020-07-06T01:55:16.000Z
2021-08-02T00:00:14.000Z
from collections import namedtuple # ====================================== # Some global configs for the experiments. BUDGET = 400 # Maximum number of networks evaluated. PLOT_EVERY = 25 # Frequency at which incumbents are chosen (and plotting is done). MAX_M = 30 # Largest ensemble size used. model_seeds = namedtuple(typename="model_seeds", field_names=["arch", "init", "scheme"]) dataset_to_budget = { "cifar10": 400, "cifar100": 400, "fmnist": 400, "tiny": 200, "imagenet": 1000 } # deepens_rs not included here yet since the archs are the best ones from the sample trained for nes_rs. See rs_incumbets.py SCHEMES = ["nes_rs", "nes_re", "deepens_darts", "deepens_gdas", "nes_rs_oneshot", "nes_re_50k", "nes_rs_darts", "deepens_minimum", "nes_rs_50k", "deepens_amoebanet_50k", "deepens_darts_50k", "deepens_amoebanet", "darts_esa", "amoebanet_esa", "nes_rs_esa", "deepens_darts_anchor", "darts_rs", "darts_hyper", "joint"] POOLS = { scheme: [model_seeds(arch=seed, init=seed, scheme=scheme) for seed in range(BUDGET)] for scheme in SCHEMES if "nes" in scheme } POOLS.update( { scheme: [model_seeds(arch=0, init=seed, scheme=scheme) for seed in range(MAX_M)] for scheme in SCHEMES if "deepens" in scheme } ) POOLS.update( { scheme: [model_seeds(arch=0, init=seed, scheme=scheme) for seed in range(BUDGET)] for scheme in SCHEMES if scheme in ["darts_esa", "amoebanet_esa"] } ) # tiny seed 3 POOLS.update( { scheme: [model_seeds(arch=7, init=seed, scheme=scheme) for seed in range(BUDGET)] for scheme in SCHEMES if scheme == "nes_rs_esa" } ) POOLS.update( { scheme: [model_seeds(arch=seed, init=seed, scheme=scheme) for seed in range(BUDGET)] for scheme in SCHEMES if scheme in ["darts_rs", "darts_hyper", "joint"] } )
27.714286
124
0.641753
7940d8a1b0968e4ad027a6773ef338c778ac82a1
8,412
py
Python
code-gen.py
hpsoar/swagger-objc
1a1b5844e2543d1c5426fb5f180d25e0f12fbe53
[ "MIT" ]
null
null
null
code-gen.py
hpsoar/swagger-objc
1a1b5844e2543d1c5426fb5f180d25e0f12fbe53
[ "MIT" ]
null
null
null
code-gen.py
hpsoar/swagger-objc
1a1b5844e2543d1c5426fb5f180d25e0f12fbe53
[ "MIT" ]
null
null
null
# -*- coding:utf8 -*- import json from jinja2 import Template from jinja2 import FileSystemLoader from jinja2.environment import Environment jenv = Environment() jenv.loader = FileSystemLoader('.') class Property(object): def __init__(self, name, info): self.name = name self.type = '' self.item_type = None if info: self.parse(name, info) """ boolean/int32/int64/float/double/string/date/date-time/array """ def parse(self, name, definition): if not definition: return None if not name: name = definition.get('name', None) self.name = name definition.update(definition.get('schema', {})) t = definition.get('type', None) if 'format' in definition: t = definition['format'] if '$ref' in definition: t = definition['$ref'] self.type = t self.required = definition.get('required', False) self.default = definition.get('default', None) self.item_type = Property('item_type', definition.get('items', None)) self.enum = definition.get('enum', None) self.example = definition.get('example', None) self.examples = definition.get('examples', None) self.comment = '' self.desc = definition.get('description', '') self.is_native_type = False self.is_simple_type = False class Parameter(Property): def __init__(self, name, info): super(Parameter, self).__init__(name, info) self.position = info.get('in', 'query') class API: def __init__(self, name, path, method, parameters, responses, summary, desc, tags): self.name = name self.path = path self.method = method self.parameters = parameters self.responses = responses self.summary = summary self.desc = desc self.tags = tags self.merged_response = None def render_model_header(module, models): template = jenv.get_template('objc-model-header.template') o = open('%s_Model.h' % module, 'w') print >>o, template.render(models=models) def render_model_body(module, models): template = jenv.get_template('objc-model-body.template') o = open('%s_Model.m' % module, 'w') print >>o, template.render(models=models) def to_camel_case(s, lower=True): import re ret = re.sub(r'(?!^)_([a-zA-Z])', lambda m: m.group(1).upper(), s) if s else s if not lower: ret = ret[0].upper() + ret[1:] if ret else ret return ret def convert_property_name(name): if name == 'id': return 'Id' else: return to_camel_case(name) def flatten_models(models): return[m for (name, m) in models.items()] def process_ref_types(p, models): if p.type and p.type.startswith('#/definitions'): t = p.type.replace('#/definitions/', '') p.type = models[t]['name'] def process_property(p, models): process_ref_types(p, models) if p.item_type: process_ref_types(p.item_type, models) if p.enum: p.comment = '%s' % '\n'.join(p.enum) elif p.examples: p.comment = p.examples p.name = convert_property_name(p.name) def process_model_properties(models): for (name, m) in models.items(): for p in m.get('properties', []): process_property(p, models) return models def convert_to_objc_type(p): if not p: return (None, False, False, None) convert_to_objc_type(p.item_type) m = { 'int32': ('int', True, True), 'int64': ('long long', True, True), 'float': ('float', True, True), 'double': ('double', True, True), 'boolean': ('BOOL', True, True), 'string': ('NSString', False, True), 'date': ('NSString', False, True), 'date-time': ('NSString', False, True), 'array': ('NSArray', False, False), 'byte': ('NSData', False, False), 'binary': ('NSData', False, False), } t, is_native_type, is_simple_type = m.get(p.type, (p.type, False, False)) p.type = t p.is_native_type = is_native_type p.is_simple_type = is_simple_type p.item_type = p.item_type and p.item_type.type def convert_to_objc_types(models): for m in models: for p in m.get('properties', []): convert_to_objc_type(p) return models def parse_model(model_name, definition): props = [] required_props = definition.get('required', []) for (name, p) in definition.get('properties', {}).items(): prop = Property(name, p) if not prop.required: prop.required = name in required_props props.append(prop) return { 'name': model_name, 'properties': props } def parse_definitions(definitions): models = {} for (name, d) in definitions.items(): models[name] = parse_model(name, d) return models def process_api_names(apis): for api in apis: api.name = to_camel_case(api.name, lower=False) return apis def process_api_parameters(apis, models): for api in apis: for p in api.parameters: process_property(p, models) return apis def process_api_responses(apis, models): for api in apis: for p in api.responses: process_property(p, models) for p in api.merged_response: process_property(p, models) return apis def merge_response(apis): import copy for api in apis: codes = [] descriptions = [] data = None for p in api.responses: codes.append(p.name) descriptions.append(p.desc) if p.name == '200': data = copy.deepcopy(p) data.name = 'data' resp = [ Property('code', {'type': 'integer', 'format': 'int32', 'enum': codes }), Property('description', {'type': 'string', 'examples': descriptions }), ] if data: resp.append(data) api.merged_response = resp return apis def convert_api_to_objc(apis): for api in apis: for p in api.parameters: convert_to_objc_type(p) for p in api.responses: convert_to_objc_type(p) for p in api.merged_response: convert_to_objc_type(p) return apis def parse_api(paths): apis = [] for (path, ops) in paths.items(): for (method, api_info) in ops.items(): parameters = [Parameter(None, p) for p in api_info.get('parameters', [])] responses = [Property(code, info) for (code, info) in api_info.get('responses', {}).items()] api = API(api_info.get('operationId', ''), path, method, parameters, responses, api_info.get('summary', ''), api_info.get('description', ''), api_info.get('tags', [])) apis.append(api) return apis def render_api_header(module, apis): template = jenv.get_template('objc-api-header.template') o = open('%s_Api.h' % module, 'w') print >>o, template.render(module=module, apis=apis) def render_api_body(module, apis): template = jenv.get_template('objc-api-body.template') o = open('%s_Api.m' % module, 'w') print >>o, template.render(module=module, apis=apis) def main(path, module): content = json.load(open(path)) for key in content: print key parsed_models = parse_definitions(content['definitions']) parsed_models = process_model_properties(parsed_models) apis = parse_api(content.get('paths', {})) apis = process_api_names(apis) apis = process_api_parameters(apis, parsed_models) apis = merge_response(apis) apis = process_api_responses(apis, parsed_models) apis = convert_api_to_objc(apis) parsed_models = flatten_models(parsed_models) parsed_models = convert_to_objc_types(parsed_models) render_model_header(module, parsed_models) render_model_body(module, parsed_models) render_api_header(module, apis) render_api_body(module, apis) if __name__ == '__main__': import sys module = 'Default' if len(sys.argv) > 2: module = sys.argv[2] main(sys.argv[1], module)
28.323232
104
0.595459
7940d9bec71e8f61e360b7c6afe78c8a45f0aa6d
850
py
Python
reference/sketchbook/spew/spew.py
JaDogg/__py_playground
416f88db10e03f5380bcb5cfcad0bca50ffa657c
[ "MIT" ]
1
2015-10-28T00:00:16.000Z
2015-10-28T00:00:16.000Z
reference/sketchbook/spew/spew.py
JaDogg/__py_playground
416f88db10e03f5380bcb5cfcad0bca50ffa657c
[ "MIT" ]
null
null
null
reference/sketchbook/spew/spew.py
JaDogg/__py_playground
416f88db10e03f5380bcb5cfcad0bca50ffa657c
[ "MIT" ]
null
null
null
import random, re # N.B. the words can be arbitrary text. dictionary = {word: expansion.strip() for line in open('menu.text') for word, expansion in [line.split(':', 1)]} def expand_word(word, probability=.99): """Given a dictionary word, replace it with its definition or not, randomly. Further expand the definition (but less probably, to make it eventually stop growing).""" if random.random() < probability: return expand_text(dictionary[word], probability * .8) else: return word def expand_text(text, probability): "Find substrings like [blah], and expand them." return re.sub(r'\[([^]]*)\]', lambda match: expand_word(match.group(1), probability), text) if __name__ == '__main__': import sys print expand_word(sys.argv[1])
32.692308
73
0.630588
7940dab525889c3eca9fbcdd4c2c2d8b69a80096
450
py
Python
src/bdbd/src/bdbd/test/circles2.py
rkent/BDBD
c5d391da84faf5607c443078781f8b4e1c017dd5
[ "MIT" ]
null
null
null
src/bdbd/src/bdbd/test/circles2.py
rkent/BDBD
c5d391da84faf5607c443078781f8b4e1c017dd5
[ "MIT" ]
null
null
null
src/bdbd/src/bdbd/test/circles2.py
rkent/BDBD
c5d391da84faf5607c443078781f8b4e1c017dd5
[ "MIT" ]
null
null
null
# test circles in geometry from bdbd.libpy.geometry import shortestPath import math D_TO_R = math.pi / 180. # degrees to radians x = 3.0 rho = 0.5 # test cases from RKJ notebook 2020-08-26 phis = [60.5, 18.5, 27.0, -90.0] yes = [2.0, 1.75, -2.0, -2.0] for i in range(0, len(phis)): solution = shortestPath(x, yes[i], phis[i]* D_TO_R, rho) print('Solution: {}'.format(solution)) print('gamma: {:6.2f}'.format(solution['gamma']/D_TO_R))
26.470588
60
0.648889
7940dabcfb03cc9eb46f678365685a6e99bcceec
6,561
py
Python
python/paddle/fluid/data_feeder.py
limeng357/Paddle
dbd25805c88c48998eb9dc0f4b2ca1fd46326482
[ "ECL-2.0", "Apache-2.0" ]
1
2021-08-29T03:39:53.000Z
2021-08-29T03:39:53.000Z
python/paddle/fluid/data_feeder.py
limeng357/Paddle
dbd25805c88c48998eb9dc0f4b2ca1fd46326482
[ "ECL-2.0", "Apache-2.0" ]
1
2022-03-29T21:57:12.000Z
2022-03-29T21:57:12.000Z
python/paddle/fluid/data_feeder.py
limeng357/Paddle
dbd25805c88c48998eb9dc0f4b2ca1fd46326482
[ "ECL-2.0", "Apache-2.0" ]
2
2020-11-04T08:01:39.000Z
2020-11-06T08:33:28.000Z
# Copyright (c) 2018 PaddlePaddle 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 applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from __future__ import print_function import core import numpy import six.moves as six import multiprocessing from framework import Variable, default_main_program __all__ = ['DataFeeder'] class DataToLoDTensorConverter(object): def __init__(self, place, lod_level, shape, dtype): self.place = place self.lod_level = lod_level self.shape = shape if dtype == core.VarDesc.VarType.FP32: self.dtype = 'float32' elif dtype == core.VarDesc.VarType.INT64: self.dtype = 'int64' elif dtype == core.VarDesc.VarType.FP64: self.dtype = 'float64' elif dtype == core.VarDesc.VarType.INT32: self.dtype = 'int32' elif dtype == core.VarDesc.VarType.UINT8: self.dtype = 'uint8' else: raise ValueError("dtype must be any of [int32, float32, int64, " "float64, uint8]") self.data = [] self.lod = [] for i in six.range(lod_level): self.lod.append([0]) def feed(self, data): self._feed_impl_(data, self.lod, self.lod_level) def _feed_impl_(self, data, lod, lod_level): if lod_level == 0: self.data.append(data) else: cur_lod_len = len(data) lod[0].append(lod[0][-1] + cur_lod_len) for each_data in data: self._feed_impl_(each_data, lod[1:], lod_level - 1) def done(self): arr = numpy.array(self.data, dtype=self.dtype).reshape(self.shape) t = core.LoDTensor() t.set(arr, self.place) if self.lod_level > 0: t.set_lod(self.lod) return t class DataFeeder(object): def __init__(self, feed_list, place, program=None): self.feed_dtypes = [] self.feed_names = [] self.feed_shapes = [] self.feed_lod_level = [] if program is None: program = default_main_program() for each_var in feed_list: if isinstance(each_var, basestring): each_var = program.block(0).var(each_var) if not isinstance(each_var, Variable): raise TypeError("Feed list should contain a list of variable") self.feed_dtypes.append(each_var.dtype) self.feed_names.append(each_var.name) shape = each_var.shape batch_size_dim = -1 for i, s in enumerate(shape): if s < 0: batch_size_dim = i break if batch_size_dim == -1: raise ValueError("Variable {0} must has a batch size dimension", each_var.name) self.feed_lod_level.append(each_var.lod_level) self.feed_shapes.append(shape) self.place = place def feed(self, iterable): converter = [] for lod_level, shape, dtype in six.zip( self.feed_lod_level, self.feed_shapes, self.feed_dtypes): converter.append( DataToLoDTensorConverter( place=self.place, lod_level=lod_level, shape=shape, dtype=dtype)) for each_sample in iterable: assert len(each_sample) == len(converter), ( "The number of fields in data (%s) does not match " + "len(feed_list) (%s)") % (len(each_sample), len(converter)) for each_converter, each_slot in six.zip(converter, each_sample): each_converter.feed(each_slot) ret_dict = {} for each_name, each_converter in six.zip(self.feed_names, converter): ret_dict[each_name] = each_converter.done() return ret_dict def feed_parallel(self, iterable, num_places=None): if isinstance(self.place, core.CUDAPlace): places = [ core.CUDAPlace(i) for i in six.xrange(self._get_number_of_places_(num_places)) ] else: places = [ core.CPUPlace() for _ in six.xrange(self._get_number_of_places_(num_places)) ] if len(iterable) != len(places): raise ValueError("feed_parallel takes multiple mini-batches. Each " "mini-batch will be feed on each device. The " "number of devices and number of mini-batches " "must be same.") place = self.place for p, batch in six.zip(places, iterable): self.place = p yield self.feed(batch) self.place = place def _get_number_of_places_(self, num_places): if num_places is not None: return int(num_places) elif isinstance(self.place, core.CUDAPlace): return core.get_cuda_device_count() else: return multiprocessing.cpu_count() def decorate_reader(self, reader, multi_devices, num_places=None, drop_last=True): def __reader_creator__(): if not multi_devices: for item in reader(): yield self.feed(item) else: num = self._get_number_of_places_(num_places) item = [] for batch in reader(): item.append(batch) if len(item) == num: yield list(self.feed_parallel(item, num)) item = [] if not drop_last and len(item) != 0: raise ValueError( "The data batch which cannot fit for devices will be " "dropped is not implementation. Other strategies are " "not implemented") return __reader_creator__
36.653631
80
0.56089
7940dc01970daa7fcd75f3b8fab9bc1acd05edaa
2,344
py
Python
experiments/migrations/0001_initial.py
aapris/DjangoHttpBroker-Experiments
694065d13ef014e4faf102d353041b1c179a3c3c
[ "MIT" ]
null
null
null
experiments/migrations/0001_initial.py
aapris/DjangoHttpBroker-Experiments
694065d13ef014e4faf102d353041b1c179a3c3c
[ "MIT" ]
null
null
null
experiments/migrations/0001_initial.py
aapris/DjangoHttpBroker-Experiments
694065d13ef014e4faf102d353041b1c179a3c3c
[ "MIT" ]
null
null
null
# Generated by Django 2.2b1 on 2019-03-23 10:54 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='RfidRead', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('scanned_at', models.DateTimeField(auto_now_add=True)), ], ), migrations.CreateModel( name='RfidScanner', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('devid', models.CharField(db_index=True, max_length=32, unique=True)), ('name', models.CharField(blank=True, max_length=256)), ('description', models.CharField(blank=True, max_length=10000)), ('lat', models.FloatField(blank=True, null=True)), ('lon', models.FloatField(blank=True, null=True)), ('activity_at', models.DateTimeField(blank=True, null=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ], ), migrations.CreateModel( name='RfidTag', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('tagid', models.CharField(db_index=True, max_length=256)), ('name', models.CharField(blank=True, max_length=256)), ('reads', models.ManyToManyField(blank=True, related_name='related_rfidtags', through='experiments.RfidRead', to='experiments.RfidScanner', verbose_name='RFID Tag reads')), ], ), migrations.AddField( model_name='rfidread', name='rfidscanner', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='experiments.RfidScanner'), ), migrations.AddField( model_name='rfidread', name='rfidtag', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='experiments.RfidTag'), ), ]
41.857143
188
0.59215
7940dc18b963df9968ac2ae766ce8c32e443c520
538
py
Python
shipments/migrations/0003_alter_shipment_transporter.py
Zadigo/mycommerce
145031ebb359389e680a820577a4b6b2d382646d
[ "MIT" ]
null
null
null
shipments/migrations/0003_alter_shipment_transporter.py
Zadigo/mycommerce
145031ebb359389e680a820577a4b6b2d382646d
[ "MIT" ]
null
null
null
shipments/migrations/0003_alter_shipment_transporter.py
Zadigo/mycommerce
145031ebb359389e680a820577a4b6b2d382646d
[ "MIT" ]
null
null
null
# Generated by Django 4.0.1 on 2022-04-20 21:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('shipments', '0002_alter_shipment_transporter'), ] operations = [ migrations.AlterField( model_name='shipment', name='transporter', field=models.CharField(choices=[('In house', 'In House'), ('DHL', 'Dhl'), ('Post office', 'Post Office'), ('Chronopost', 'Chronopost')], default='In house', max_length=150), ), ]
28.315789
185
0.613383
7940dd9e9df3d85315325bf08935934ebc208201
5,254
py
Python
troposphere/registry.py
sabakaio/docker-registry
720a800e5f7f02ff1ec5d9b1d559a2dd6114f7f1
[ "MIT" ]
null
null
null
troposphere/registry.py
sabakaio/docker-registry
720a800e5f7f02ff1ec5d9b1d559a2dd6114f7f1
[ "MIT" ]
null
null
null
troposphere/registry.py
sabakaio/docker-registry
720a800e5f7f02ff1ec5d9b1d559a2dd6114f7f1
[ "MIT" ]
null
null
null
from functools import partial from troposphere import Output, Parameter, Template from troposphere import GetAtt, Ref, Join from troposphere import constants as c, ec2, s3 from helpers import iam from helpers import meta from helpers.amilookup.resources import ami_lookup template = Template() az = template.add_parameter(Parameter( 'AvailabilityZone', Type=c.AVAILABILITY_ZONE_NAME, Description='Availability Zone of the Subnet' )) ssh_key = template.add_parameter(Parameter( 'SSHKeyName', Type=c.KEY_PAIR_NAME, Description='Name of an existing EC2 KeyPair to enable SSH access to the instance' )) ssh_location = template.add_parameter(Parameter( 'SSHLocation', Description='The IP address range that can be used to SSH to the EC2 instances', Type=c.STRING, MinLength='9', MaxLength='18', Default='0.0.0.0/0', AllowedPattern='(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})', ConstraintDescription='must be a valid IP CIDR range of the form x.x.x.x/x.' )) ami_id = GetAtt(ami_lookup(template), 'Id') ssh_sg = ec2.SecurityGroup( 'SSHSecurityGroup', template, SecurityGroupIngress=[ {'IpProtocol': 'tcp', 'FromPort': '22', 'ToPort': '22', 'CidrIp': Ref(ssh_location)} ], GroupDescription='Enable SSH on port 22 for given location' ) web_sg = ec2.SecurityGroup( 'WebSecurityGroup', template, SecurityGroupIngress=[ {'IpProtocol': 'tcp', 'FromPort': '443', 'ToPort': '443', 'CidrIp': '0.0.0.0/0'}, ], GroupDescription='Enable HTTPS ports for all incoming traffic' ) service_name = 'DockerRegistry' bucket = template.add_resource(s3.Bucket( service_name + 'Storage', AccessControl=s3.Private, )) registry_profile = iam.make_instance_profile( service_name + 'InstanceProfile', template, partial(iam.bucket_full_access, bucket) ) registry_instance_type = template.add_parameter(Parameter( service_name + 'InstanceType', Type=c.STRING, Default=c.T2_MICRO, AllowedValues=[c.T2_MICRO, c.T2_SMALL, c.T2_MEDIUM, c.M4_LARGE, c.C4_LARGE] )) registry_block_device_size = template.add_parameter(Parameter( service_name + 'BlockDeviseSize', Type=c.STRING, Default='30', Description='{n} root file system size (GB)'.format(n=service_name) )) registry = ec2.Instance( service_name + 'Instance', template, AvailabilityZone=Ref(az), IamInstanceProfile=Ref(registry_profile), InstanceType=Ref(registry_instance_type), ImageId=ami_id, KeyName=Ref(ssh_key), SecurityGroupIds=[Ref(ssh_sg), Ref(web_sg)], BlockDeviceMappings=[ec2.BlockDeviceMapping( DeviceName='/dev/xvda', Ebs=ec2.EBSBlockDevice( VolumeSize=Ref(registry_block_device_size), VolumeType='gp2' ) )], Tags=[ec2.Tag('Name', 'docker-registry')], ) registry_domain = template.add_parameter(Parameter( 'DockerRegistryCertDomainName', Type=c.STRING, Description='Domain to issue certificate for' )) registry_domain_email = template.add_parameter(Parameter( 'DockerRegistryCertEmail', Type=c.STRING, Description='Email to use on certificate issue' )) registry_certs = '/opt/registry/security/' registry_htpasswd = '/opt/registry/htpasswd' registry_compose = Join('', [ 'version: "2"\n', 'services:\n', ' registry:\n', ' restart: always\n', ' image: registry:2\n', ' container_name: registry\n', ' ports:\n', ' - 443:5000\n', ' environment:\n', ' REGISTRY_STORAGE: s3\n', ' REGISTRY_STORAGE_S3_REGION: ', Ref('AWS::Region'), '\n', ' REGISTRY_STORAGE_S3_ACCESSKEY: ""\n', ' REGISTRY_STORAGE_S3_SECRETKEY: ""\n', ' REGISTRY_STORAGE_S3_BUCKET: ', Ref(bucket), '\n', ' REGISTRY_HTTP_TLS_CERTIFICATE: /certs/fullchain.pem\n', ' REGISTRY_HTTP_TLS_KEY: /certs/privkey.pem\n', ' REGISTRY_AUTH: htpasswd\n', ' REGISTRY_AUTH_HTPASSWD_REALM: "Registry Realm"\n', ' REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd\n', ' volumes:\n', ' - {d}:/certs:ro\n'.format(d=registry_certs), ' - {f}:/auth/htpasswd\n'.format(f=registry_htpasswd), ]) compose_init, compose_file = meta.docker_compose('registry', registry_compose) compose = '{b} -f {f}'.format( b='/usr/local/bin/docker-compose', f=compose_file) certbot_init = meta.certbot( Ref(registry_domain), Ref(registry_domain_email), copy_to=registry_certs, pre_hook=('%s stop' % compose), post_hook=('%s up -d' % compose), ) meta.add_init( registry, meta.docker, certbot_init, meta.htpasswd(registry_htpasswd), compose_init, ) eip = template.add_parameter(Parameter( 'DockerRegistryEIP', Type=c.STRING, Description=( 'Allocation ID for the VPC Elastic IP address you want to associate ' 'with Docker Registry instance. You should already have domain name ' 'configured for this IP' ) )) ec2.EIPAssociation( service_name + 'EIPAccociation', template, AllocationId=Ref(eip), InstanceId=Ref(registry), ) template.add_output(Output( registry.title + 'Ip', Value=GetAtt(registry, 'PublicIp') )) print(template.to_json())
30.022857
92
0.676056
7940dde24bf0016b6fd74e9d920e1934d22e0b5e
991
py
Python
src/pub_test.py
mijazm/ros_test
f0a70bcf131fd36d2ddbde268fcc85beca9774d0
[ "MIT" ]
null
null
null
src/pub_test.py
mijazm/ros_test
f0a70bcf131fd36d2ddbde268fcc85beca9774d0
[ "MIT" ]
null
null
null
src/pub_test.py
mijazm/ros_test
f0a70bcf131fd36d2ddbde268fcc85beca9774d0
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # This code creates a publisher node which publishes a random number between 0 and 1 to the # topic /random. # Author: Mijaz Mukundan # This code was written to test ROS installation import rospy from std_msgs.msg import Float32 import random def talker(): # A node must have a unique name, if a new node starts with the same name the previous one # goes poof, the anonymous flag will cause ros to choose a unique name rospy.init_node('talker', anonymous=True) # Defining which topic would it publish to pub = rospy.Publisher(name = '/random', data_class = Float32, queue_size=1) # An update rate of 10Hz r = rospy.Rate(1) while not rospy.is_shutdown(): rand_num = Float32() rand_num.data = random.random() #Create a random number pub.publish(rand_num) # Publish the random number r.sleep() if __name__=='__main__': try: talker() except rospy.ROSInterruptException: pass
28.314286
95
0.690212
7940df89dccd943056617c0592a923d7561affe4
3,436
py
Python
scripts/generate-supplier-user-csv.py
alphagov-mirror/digitalmarketplace-scripts
8a7ef9b2b5f5fffea6e012bd676b095a27d35101
[ "MIT" ]
1
2020-06-23T01:55:31.000Z
2020-06-23T01:55:31.000Z
scripts/generate-supplier-user-csv.py
alphagov-mirror/digitalmarketplace-scripts
8a7ef9b2b5f5fffea6e012bd676b095a27d35101
[ "MIT" ]
267
2015-10-12T12:43:52.000Z
2021-08-19T10:38:55.000Z
scripts/generate-supplier-user-csv.py
alphagov-mirror/digitalmarketplace-scripts
8a7ef9b2b5f5fffea6e012bd676b095a27d35101
[ "MIT" ]
7
2015-11-11T16:47:41.000Z
2021-04-10T18:03:04.000Z
#!/usr/bin/env python3 """ PREREQUISITE: You'll need AWS credentials set up for the environment that you're uploading to: Save your aws_access_key_id and aws_secret_access_key in ~/.aws/credentials If you have more than one set of credentials in there then be sure to set your AWS_PROFILE environment variable to reference the right credentials before running the script. Alternatively, if this script is being run from Jenkins, do not provide any credentials and boto will use the Jenkins IAM role. It should have the required permissions for the bucket. This will: * call the export_<suppliers|users>_for_framework endpoint from the API * create a CSV file from the results and save to saved to `<output-dir>/<filename>.csv` (see get-model-data.py) * upload the file to the S3 admin reports bucket for <stage> with the file path: <framework_slug>/official-details-for-suppliers-<framework_slug>.csv OR <framework_slug>/user-research-suppliers-on-<framework_slug>.csv OR <framework_slug>/all-email-accounts-for-suppliers-<framework_slug>.csv e.g. g-cloud-10/user-research-suppliers-on-g-cloud-10.csv Usage: scripts/generate-supplier-user-csv.py <stage> <report_type> <framework_slug> [options] Options: --dry-run Don't actually do anything --user-research-opted-in Only include users who have opted in to user research --output-dir=<output_dir> Location to store CSV file [default: data] """ import os import sys sys.path.insert(0, '.') from dmscripts.helpers.auth_helpers import get_auth_token from dmscripts.generate_supplier_user_csv import generate_csv_and_upload_to_s3 from dmscripts.helpers import logging_helpers from dmscripts.helpers.logging_helpers import logging from dmscripts.helpers.s3_helpers import get_bucket_name from dmutils.env_helpers import get_api_endpoint_from_stage from docopt import docopt from dmapiclient import DataAPIClient from dmutils.s3 import S3 logger = logging_helpers.configure_logger({ 'dmapiclient.base': logging.WARNING, }) if __name__ == '__main__': arguments = docopt(__doc__) stage = arguments['<stage>'] data_api_client = DataAPIClient(get_api_endpoint_from_stage(stage), get_auth_token('api', stage)) report_type = arguments['<report_type>'] framework_slug = arguments['<framework_slug>'] output_dir = arguments['--output-dir'] user_research_opted_in = arguments['--user-research-opted-in'] or None dry_run = arguments['--dry-run'] if report_type not in ['users', 'suppliers']: logger.error('Please specify users or suppliers to be exported.') sys.exit(1) if not os.path.exists(output_dir): logger.info("Creating {} directory".format(output_dir)) os.makedirs(output_dir) if dry_run: bucket = None else: if stage == 'local': bucket = S3('digitalmarketplace-dev-uploads') else: # e.g. preview would give 'digitalmarketplace-reports-preview-preview' bucket = S3(get_bucket_name(stage, "reports")) ok = generate_csv_and_upload_to_s3( bucket, framework_slug, report_type, output_dir, data_api_client, dry_run=dry_run, user_research_opted_in=user_research_opted_in, logger=logger, ) if not ok: sys.exit(1)
36.946237
119
0.708673
7940e02278ae9d6779f7972dc5fcf78c5820c7ed
56
py
Python
dwpicker/ingest/animschool/__init__.py
markusng/dwpicker
cb63176ac82b0e1c2a1e0695b5554f784387daa5
[ "MIT" ]
null
null
null
dwpicker/ingest/animschool/__init__.py
markusng/dwpicker
cb63176ac82b0e1c2a1e0695b5554f784387daa5
[ "MIT" ]
null
null
null
dwpicker/ingest/animschool/__init__.py
markusng/dwpicker
cb63176ac82b0e1c2a1e0695b5554f784387daa5
[ "MIT" ]
null
null
null
from dwpicker.ingest.animschool.converter import convert
56
56
0.892857
7940e0706ff7f2bc8922f102fa1e8cc413da4c42
5,668
py
Python
error_analysis.py
vsawal/CS224N-Final-Project
be43a039cefc85568427db2b0cee5ba61fb05157
[ "MIT" ]
3
2020-09-13T06:56:21.000Z
2020-11-22T13:32:18.000Z
error_analysis.py
vsawal/CS224N-Final-Project
be43a039cefc85568427db2b0cee5ba61fb05157
[ "MIT" ]
1
2021-05-05T11:16:37.000Z
2021-05-05T11:16:37.000Z
error_analysis.py
vsawal/CS224N-Final-Project
be43a039cefc85568427db2b0cee5ba61fb05157
[ "MIT" ]
null
null
null
import json import timeit import uuid def get_english_arabic_translation(): with open("train-v2.0-questions-arabic.txt", "r") as arfile: arabic = arfile.readlines() with open("train-v2.0-questions-copy.txt", "r") as infile: for i, line in enumerate(infile): line = line.lower() if 'how' in line or 'which' in line or 'who' in line or \ 'what' in line or 'where' in line or \ 'why' in line or 'when' in line: continue print("##################") print("English:", line) print("Arabic:", arabic[i]) def question_type(): who, when, what, where, why, which, how, other = \ [0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0] with open("final_dict.json", "r") as jsonfile: a = json.load(jsonfile) for k, v in a.items(): q = v['question'].lower() if "who" in q: who[0] += 1 who[1] += v['correct_ans'] elif "when" in q: when[0] += 1 when[1] += v['correct_ans'] elif "what" in q: what[0] += 1 what[1] += v['correct_ans'] elif "where" in q: where[0] += 1 where[1] += v['correct_ans'] elif "why" in q: why[0] += 1 why[1] += v['correct_ans'] elif "which" in q: which[0] += 1 which[1] += v['correct_ans'] elif "how" in q: how[0] += 1 how[1] += v['correct_ans'] else: other[0] += 1 other[1] += v['correct_ans'] #print(q) who.append(who[1]/who[0] * 100) when.append(when[1]/when[0] * 100) what.append(what[1]/what[0] * 100) where.append(where[1]/where[0] * 100) why.append(why[1]/why[0] * 100) which.append(which[1]/which[0] * 100) how.append(how[1]/how[0] * 100) other.append(other[1]/other[0] * 100) print("who:", who) print("when:", when) print("what:", what) print("where:", where) print("why:", why) print("which:", which) print("how:", how) print("other:", other) def create_dataset_based_on_que_type(outfilename=None, search_criteria=None): ans = {"version": "v2.0", "data": []} with open("data/dev-v2.0.json", "r") as jsonFile: a = json.load(jsonFile) for i in a["data"]: for j in i["paragraphs"]: qas_list = j["qas"] new_qas_list = [] for item in qas_list: if 'what' in item['question'].lower(): new_qas_list.append(item) #print(item['question'].lower()) print("##########################################") print("Original qas list:", len(qas_list)) j["qas"] = new_qas_list[:] print(" New qas list:", len(new_qas_list)) print("Modified qas list:", len(j["qas"])) #for item in qas_list: #print(item['question'].lower()) with open("data/dev-what.json", "w") as jsonFile: json.dump(a, jsonFile) def calculate_change(): a1 = [77.38, 77.36, 74.61, 74.93, 71.07, 69.45, 55.43, 52.54] b1 = [76.27, 75.40, 74.12, 73.10, 69.75, 66.18, 57.60, 64.40] a = [80.34, 79.10, 77.59, 76.99, 75.37, 72.10, 68.40, 62.38] b = [79.26, 77.32, 77.15, 75.18, 73.46, 69.76, 69.87, 72.58] for i in range(len(a)): print("diff:", (b[i]-a[i])/a[i]) def get_raw_scores(dataset, preds): count = 0 min_avg, max_avg = 100, 0 exact_scores = {} f1_scores = {} for article in dataset: for p in article['paragraphs']: for qa in p['qas']: qid = qa['id'] gold_answers = [a['text'] for a in qa['answers'] if normalize_answer(a['text'])] if not gold_answers: # For unanswerable questions, only correct answer is empty string gold_answers = [''] #print(gold_answers) #length = sum([len(x.split()) for x in gold_answers])/len(gold_answers) if 'how' in qa['question'].lower() or \ 'which' in qa['question'].lower() or \ 'who' in qa['question'].lower() or \ 'what' in qa['question'].lower() or \ 'where' in qa['question'].lower() or \ 'why' in qa['question'].lower() or \ 'when' in qa['question'].lower(): continue if qid not in preds: print('Missing prediction for %s' % qid) continue a_pred = preds[qid] # Take max over all gold answers exact_scores[qid] = max(compute_exact(a, a_pred) for a in gold_answers) f1_scores[qid] = max(compute_f1(a, a_pred) for a in gold_answers) print("question:", qa['question']) print("a_pred:", a_pred) print("gold:", gold_answers) print("####################") return exact_scores, f1_scores if __name__ == '__main__': print("Start test ...") start_time = timeit.default_timer() get_english_arabic_translation() question_type() create_dataset_based_on_que_type() calculate_change() with open("data/dev-v2.0.json", 'r') as fd: dataset_json = json.load(fd) dataset = dataset_json['data'] with open("output/predictions.json", 'r') as fp: preds = json.load(fp) get_raw_scores(dataset, preds) print("End test.") print("Total time: ", timeit.default_timer() - start_time)
33.341176
79
0.501764
7940e1430766127b75041bd5739e7b0515073f7c
57
py
Python
mods/persistence.py
hirusha-adi/UnSillyRAT
819cc02d3f357a206f6253637ba92f55727ad30d
[ "MIT" ]
null
null
null
mods/persistence.py
hirusha-adi/UnSillyRAT
819cc02d3f357a206f6253637ba92f55727ad30d
[ "MIT" ]
null
null
null
mods/persistence.py
hirusha-adi/UnSillyRAT
819cc02d3f357a206f6253637ba92f55727ad30d
[ "MIT" ]
null
null
null
class PERSISTENCE: def __init__(self): pass
11.4
23
0.614035
7940e31677bf69f77d9091c49244c743238649d1
1,074
py
Python
config.py
valentine-ochieng/Moringa-Overflow
03d44aaaebca316961e4fb6203e429ee5974d782
[ "MIT" ]
1
2022-01-10T13:07:50.000Z
2022-01-10T13:07:50.000Z
config.py
valentine-ochieng/Moringa-Overflow
03d44aaaebca316961e4fb6203e429ee5974d782
[ "MIT" ]
null
null
null
config.py
valentine-ochieng/Moringa-Overflow
03d44aaaebca316961e4fb6203e429ee5974d782
[ "MIT" ]
null
null
null
import os class Config: SECRET_KEY = os.environ.get('SECRET_KEY') SQLALCHEMY_TRACK_MODIFICATIONS = False UPLOADED_PHOTOS_DEST = 'app/static/photos' # email configurations MAIL_SERVER = 'smtp.googlemail.com' MAIL_PORT = 587 MAIL_USE_TLS = True MAIL_USERNAME = os.environ.get("MAIL_USERNAME") MAIL_PASSWORD = os.environ.get("MAIL_PASSWORD") # simple mde configurations SIMPLEMDE_JS_IIFE = True SIMPLEMDE_USE_CDN = True @staticmethod def init_app(app): pass class TestConfig(Config): pass class ProdConfig(Config): SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL") if SQLALCHEMY_DATABASE_URI and SQLALCHEMY_DATABASE_URI.startswith("postgres://"): SQLALCHEMY_DATABASE_URI = SQLALCHEMY_DATABASE_URI.replace("postgres://", "postgresql://", 1) pass class DevConfig(Config): SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://access:access@localhost/moringamain' DEBUG = True config_options = { 'development': DevConfig, 'production': ProdConfig, 'test': TestConfig }
33.5625
100
0.721601
7940e3f33c19c94be1143ccd5e2488b56d49fed2
1,201
py
Python
corefacility/core/synchronizations/exceptions.py
serik1987/corefacility
78d84e19403361e83ef562e738473849f9133bef
[ "RSA-MD" ]
null
null
null
corefacility/core/synchronizations/exceptions.py
serik1987/corefacility
78d84e19403361e83ef562e738473849f9133bef
[ "RSA-MD" ]
null
null
null
corefacility/core/synchronizations/exceptions.py
serik1987/corefacility
78d84e19403361e83ef562e738473849f9133bef
[ "RSA-MD" ]
null
null
null
from django.utils.translation import gettext_lazy as _ from rest_framework import status from rest_framework.exceptions import APIException class SynchronizationError(APIException): """ This is the base class for all synchronization routines """ pass class TeapotError(SynchronizationError): """ Trying to synchronize responses when all synchronizers are switched off """ status_code = status.HTTP_503_SERVICE_UNAVAILABLE def __init__(self): super().__init__(_("Unable to perform synchronization because all synchronizers were switched off")) class RemoteServerError(SynchronizationError): """ Trying to synchronize responses when the remote server can't return the successful response """ status_code = status.HTTP_503_SERVICE_UNAVAILABLE def __init__(self): super().__init__(_("Unable to perform synchronization due to the temporary problems on remote server")) class UserRemoveConsistencyError(SynchronizationError): """ Trying to remove a user that has been currently logged in """ def __init__(self): super().__init__(_("Failed to remove a user: the user has been currently logged in"))
28.595238
111
0.741882
7940e45bb9aa9fff252a360df399a79442c536c5
451
py
Python
rectifai/settings.py
Sushil-Thapa/rectif.ai
b308f613402097dca9734806a8c27ba3eef6a358
[ "Apache-2.0" ]
null
null
null
rectifai/settings.py
Sushil-Thapa/rectif.ai
b308f613402097dca9734806a8c27ba3eef6a358
[ "Apache-2.0" ]
null
null
null
rectifai/settings.py
Sushil-Thapa/rectif.ai
b308f613402097dca9734806a8c27ba3eef6a358
[ "Apache-2.0" ]
null
null
null
import os import logging from dotenv import load_dotenv load_dotenv(verbose=True) logger = logging.getLogger(__name__) # The Root Directory of the project ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) POSENET_PATH = os.path.join(ROOT_DIR, 'data','raw','posenet.pth') POSTURENET_PATH = os.path.join(ROOT_DIR, 'data','raw','posturenet.pth') import torch device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
28.1875
71
0.764967
7940e482cc03dd9784e0134b9e2ba122ea6b31ef
15,268
py
Python
ironicclient/osc/v1/baremetal_volume_target.py
sapcc/python-ironicclient
8dcbf5b6d0bc2c2dc3881dbc557e2e403e2fe2b4
[ "Apache-2.0" ]
41
2015-01-29T20:10:48.000Z
2022-01-26T10:04:28.000Z
ironicclient/osc/v1/baremetal_volume_target.py
sapcc/python-ironicclient
8dcbf5b6d0bc2c2dc3881dbc557e2e403e2fe2b4
[ "Apache-2.0" ]
null
null
null
ironicclient/osc/v1/baremetal_volume_target.py
sapcc/python-ironicclient
8dcbf5b6d0bc2c2dc3881dbc557e2e403e2fe2b4
[ "Apache-2.0" ]
46
2015-01-19T17:46:52.000Z
2021-12-19T01:22:47.000Z
# Copyright 2017 FUJITSU LIMITED # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. import itertools import logging from osc_lib.command import command from osc_lib import utils as oscutils from ironicclient.common.i18n import _ from ironicclient.common import utils from ironicclient import exc from ironicclient.v1 import resource_fields as res_fields class CreateBaremetalVolumeTarget(command.ShowOne): """Create a new baremetal volume target.""" log = logging.getLogger(__name__ + ".CreateBaremetalVolumeTarget") def get_parser(self, prog_name): parser = super(CreateBaremetalVolumeTarget, self).get_parser(prog_name) parser.add_argument( '--node', dest='node_uuid', metavar='<uuid>', required=True, help=_('UUID of the node that this volume target belongs to.')) parser.add_argument( '--type', dest='volume_type', metavar="<volume type>", required=True, help=_("Type of the volume target, e.g. 'iscsi', " "'fibre_channel'.")) parser.add_argument( '--property', dest='properties', metavar="<key=value>", action='append', help=_("Key/value property related to the type of this volume " "target. Can be specified multiple times." )) parser.add_argument( '--boot-index', dest='boot_index', metavar="<boot index>", type=int, required=True, help=_("Boot index of the volume target.")) parser.add_argument( '--volume-id', dest='volume_id', metavar="<volume id>", required=True, help=_("ID of the volume associated with this target.")) parser.add_argument( '--uuid', dest='uuid', metavar='<uuid>', help=_("UUID of the volume target.")) parser.add_argument( '--extra', dest='extra', metavar="<key=value>", action='append', help=_("Record arbitrary key/value metadata. " "Can be specified multiple times.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) baremetal_client = self.app.client_manager.baremetal if parsed_args.boot_index < 0: raise exc.CommandError( _('Expected non-negative --boot-index, got %s') % parsed_args.boot_index) field_list = ['extra', 'volume_type', 'properties', 'boot_index', 'node_uuid', 'volume_id', 'uuid'] fields = dict((k, v) for (k, v) in vars(parsed_args).items() if k in field_list and v is not None) fields = utils.args_array_to_dict(fields, 'properties') fields = utils.args_array_to_dict(fields, 'extra') volume_target = baremetal_client.volume_target.create(**fields) data = dict([(f, getattr(volume_target, f, '')) for f in res_fields.VOLUME_TARGET_DETAILED_RESOURCE.fields]) return self.dict2columns(data) class ShowBaremetalVolumeTarget(command.ShowOne): """Show baremetal volume target details.""" log = logging.getLogger(__name__ + ".ShowBaremetalVolumeTarget") def get_parser(self, prog_name): parser = super(ShowBaremetalVolumeTarget, self).get_parser(prog_name) parser.add_argument( 'volume_target', metavar='<id>', help=_("UUID of the volume target.")) parser.add_argument( '--fields', nargs='+', dest='fields', metavar='<field>', action='append', default=[], choices=res_fields.VOLUME_TARGET_DETAILED_RESOURCE.fields, help=_("One or more volume target fields. Only these fields will " "be fetched from the server.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal fields = list(itertools.chain.from_iterable(parsed_args.fields)) fields = fields if fields else None volume_target = baremetal_client.volume_target.get( parsed_args.volume_target, fields=fields)._info volume_target.pop("links", None) return zip(*sorted(volume_target.items())) class ListBaremetalVolumeTarget(command.Lister): """List baremetal volume targets.""" log = logging.getLogger(__name__ + ".ListBaremetalVolumeTarget") def get_parser(self, prog_name): parser = super(ListBaremetalVolumeTarget, self).get_parser(prog_name) parser.add_argument( '--node', dest='node', metavar='<node>', help=_("Only list volume targets of this node (name or UUID).")) parser.add_argument( '--limit', dest='limit', metavar='<limit>', type=int, help=_('Maximum number of volume targets to return per request, ' '0 for no limit. Default is the maximum number used ' 'by the Baremetal API Service.')) parser.add_argument( '--marker', dest='marker', metavar='<volume target>', help=_('Volume target UUID (for example, of the last ' 'volume target in the list from a previous request). ' 'Returns the list of volume targets after this UUID.')) parser.add_argument( '--sort', dest='sort', metavar='<key>[:<direction>]', help=_('Sort output by specified volume target fields and ' 'directions (asc or desc) (default:asc). Multiple fields ' 'and directions can be specified, separated by comma.')) display_group = parser.add_mutually_exclusive_group(required=False) display_group.add_argument( '--long', dest='detail', action='store_true', default=False, help=_("Show detailed information about volume targets.")) display_group.add_argument( '--fields', nargs='+', dest='fields', metavar='<field>', action='append', default=[], choices=res_fields.VOLUME_TARGET_DETAILED_RESOURCE.fields, help=_("One or more volume target fields. Only these fields will " "be fetched from the server. Can not be used when " "'--long' is specified.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)" % parsed_args) client = self.app.client_manager.baremetal columns = res_fields.VOLUME_TARGET_RESOURCE.fields labels = res_fields.VOLUME_TARGET_RESOURCE.labels params = {} if parsed_args.limit is not None and parsed_args.limit < 0: raise exc.CommandError( _('Expected non-negative --limit, got %s') % parsed_args.limit) params['limit'] = parsed_args.limit params['marker'] = parsed_args.marker if parsed_args.node is not None: params['node'] = parsed_args.node if parsed_args.detail: params['detail'] = parsed_args.detail columns = res_fields.VOLUME_TARGET_DETAILED_RESOURCE.fields labels = res_fields.VOLUME_TARGET_DETAILED_RESOURCE.labels elif parsed_args.fields: params['detail'] = False fields = itertools.chain.from_iterable(parsed_args.fields) resource = res_fields.Resource(list(fields)) columns = resource.fields labels = resource.labels params['fields'] = columns self.log.debug("params(%s)" % params) data = client.volume_target.list(**params) data = oscutils.sort_items(data, parsed_args.sort) return (labels, (oscutils.get_item_properties(s, columns, formatters={ 'Properties': oscutils.format_dict},) for s in data)) class DeleteBaremetalVolumeTarget(command.Command): """Unregister baremetal volume target(s).""" log = logging.getLogger(__name__ + ".DeleteBaremetalVolumeTarget") def get_parser(self, prog_name): parser = ( super(DeleteBaremetalVolumeTarget, self).get_parser(prog_name)) parser.add_argument( 'volume_targets', metavar='<volume target>', nargs='+', help=_("UUID(s) of the volume target(s) to delete.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal failures = [] for volume_target in parsed_args.volume_targets: try: baremetal_client.volume_target.delete(volume_target) print(_('Deleted volume target %s') % volume_target) except exc.ClientException as e: failures.append(_("Failed to delete volume target " "%(volume_target)s: %(error)s") % {'volume_target': volume_target, 'error': e}) if failures: raise exc.ClientException("\n".join(failures)) class SetBaremetalVolumeTarget(command.Command): """Set baremetal volume target properties.""" log = logging.getLogger(__name__ + ".SetBaremetalVolumeTarget") def get_parser(self, prog_name): parser = ( super(SetBaremetalVolumeTarget, self).get_parser(prog_name)) parser.add_argument( 'volume_target', metavar='<volume target>', help=_("UUID of the volume target.")) parser.add_argument( '--node', dest='node_uuid', metavar='<uuid>', help=_('UUID of the node that this volume target belongs to.')) parser.add_argument( '--type', dest='volume_type', metavar="<volume type>", help=_("Type of the volume target, e.g. 'iscsi', " "'fibre_channel'.")) parser.add_argument( '--property', dest='properties', metavar="<key=value>", action='append', help=_("Key/value property related to the type of this volume " "target. Can be specified multiple times.")) parser.add_argument( '--boot-index', dest='boot_index', metavar="<boot index>", type=int, help=_("Boot index of the volume target.")) parser.add_argument( '--volume-id', dest='volume_id', metavar="<volume id>", help=_("ID of the volume associated with this target.")) parser.add_argument( '--extra', dest='extra', metavar="<key=value>", action='append', help=_("Record arbitrary key/value metadata. " "Can be specified multiple times.")) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal if parsed_args.boot_index is not None and parsed_args.boot_index < 0: raise exc.CommandError( _('Expected non-negative --boot-index, got %s') % parsed_args.boot_index) properties = [] if parsed_args.node_uuid: properties.extend(utils.args_array_to_patch( 'add', ["node_uuid=%s" % parsed_args.node_uuid])) if parsed_args.volume_type: properties.extend(utils.args_array_to_patch( 'add', ["volume_type=%s" % parsed_args.volume_type])) if parsed_args.boot_index: properties.extend(utils.args_array_to_patch( 'add', ["boot_index=%s" % parsed_args.boot_index])) if parsed_args.volume_id: properties.extend(utils.args_array_to_patch( 'add', ["volume_id=%s" % parsed_args.volume_id])) if parsed_args.properties: properties.extend(utils.args_array_to_patch( 'add', ["properties/" + x for x in parsed_args.properties])) if parsed_args.extra: properties.extend(utils.args_array_to_patch( 'add', ["extra/" + x for x in parsed_args.extra])) if properties: baremetal_client.volume_target.update( parsed_args.volume_target, properties) else: self.log.warning("Please specify what to set.") class UnsetBaremetalVolumeTarget(command.Command): """Unset baremetal volume target properties.""" log = logging.getLogger(__name__ + "UnsetBaremetalVolumeTarget") def get_parser(self, prog_name): parser = ( super(UnsetBaremetalVolumeTarget, self).get_parser(prog_name)) parser.add_argument( 'volume_target', metavar='<volume target>', help=_("UUID of the volume target.")) parser.add_argument( '--extra', dest='extra', metavar="<key>", action='append', help=_('Extra to unset (repeat option to unset multiple extras)')) parser.add_argument( "--property", dest='properties', metavar="<key>", action='append', help='Property to unset on this baremetal volume target ' '(repeat option to unset multiple properties).', ) return parser def take_action(self, parsed_args): self.log.debug("take_action(%s)", parsed_args) baremetal_client = self.app.client_manager.baremetal properties = [] if parsed_args.extra: properties.extend(utils.args_array_to_patch('remove', ['extra/' + x for x in parsed_args.extra])) if parsed_args.properties: properties.extend(utils.args_array_to_patch( 'remove', ['properties/' + x for x in parsed_args.properties])) if properties: baremetal_client.volume_target.update( parsed_args.volume_target, properties) else: self.log.warning("Please specify what to unset.")
36.968523
79
0.58449
7940e511765f5975386fc8fd99dd39413a0d4248
14,271
py
Python
darglint/parse/grammars/google_arguments_section.py
s-weigand/darglint
6bc5d764db86626a996de1ff50925f976bf1449e
[ "MIT" ]
405
2017-10-19T11:04:21.000Z
2022-03-23T07:58:40.000Z
darglint/parse/grammars/google_arguments_section.py
s-weigand/darglint
6bc5d764db86626a996de1ff50925f976bf1449e
[ "MIT" ]
186
2018-03-26T20:33:37.000Z
2022-03-20T22:47:54.000Z
darglint/parse/grammars/google_arguments_section.py
s-weigand/darglint
6bc5d764db86626a996de1ff50925f976bf1449e
[ "MIT" ]
43
2018-10-14T23:49:48.000Z
2022-02-10T12:39:16.000Z
# Generated on 2020-05-31 10:21:20.274591 from darglint.errors import ( ParameterMalformedError, ) from darglint.parse.grammar import ( BaseGrammar, P, ) from darglint.token import ( TokenType, ) from darglint.parse.identifiers import ( NoqaIdentifier, ) from darglint.errors import ( EmptyDescriptionError, EmptyTypeError, IndentError, ) from darglint.parse.identifiers import ( ArgumentIdentifier, ArgumentItemIdentifier, ArgumentTypeIdentifier, ) class ArgumentsGrammar(BaseGrammar): productions = [ P("arguments-section", ([], "arguments", "arguments-section1", 0)), P("items-argument", ([], "item-argument", "items-argument0", 0), ([ArgumentItemIdentifier], "head-argument", "item-body", 0), ([ArgumentIdentifier, EmptyDescriptionError], "indent", "head-argument1", 0), ([ArgumentIdentifier, EmptyTypeError, EmptyDescriptionError], "indent", "head-argument3", 2), ([ArgumentIdentifier, ArgumentTypeIdentifier, EmptyDescriptionError], "indent", "head-argument7", 0), ([ArgumentIdentifier, ArgumentTypeIdentifier, EmptyDescriptionError], "indent", "head-argument10", 0), ([ArgumentIdentifier, EmptyDescriptionError], "indent", "head-argument14", 0)), P("item-argument", ([ArgumentItemIdentifier], "head-argument", "item-body", 0), ([ArgumentIdentifier, EmptyDescriptionError], "indent", "head-argument1", 0), ([ArgumentIdentifier, EmptyTypeError, EmptyDescriptionError], "indent", "head-argument3", 2), ([ArgumentIdentifier, ArgumentTypeIdentifier, EmptyDescriptionError], "indent", "head-argument7", 0), ([ArgumentIdentifier, ArgumentTypeIdentifier, EmptyDescriptionError], "indent", "head-argument10", 0), ([ArgumentIdentifier, EmptyDescriptionError], "indent", "head-argument14", 0)), P("head-argument", ([ArgumentIdentifier], "indent", "head-argument1", 0), ([ArgumentIdentifier, EmptyTypeError], "indent", "head-argument3", 2), ([ArgumentIdentifier, ArgumentTypeIdentifier], "indent", "head-argument7", 0), ([ArgumentIdentifier, ArgumentTypeIdentifier], "indent", "head-argument10", 0), ([ArgumentIdentifier], "indent", "head-argument14", 0)), P("item-body", ([], "line", "item-body0", 2), ([], "line", "item-body1", 2), ([], "line", "newline", 2), ([], "word", "line", 2), ([], "word", "noqa-maybe", 2), ([NoqaIdentifier], "hash", "noqa", 2), ([NoqaIdentifier], "noqa-head", "noqa-statement1", 2), (TokenType.INDENT, 2), (TokenType.COLON, 2), (TokenType.HASH, 2), (TokenType.LPAREN, 2), (TokenType.RPAREN, 2), (TokenType.WORD, 2), (TokenType.RAISES, 2), (TokenType.ARGUMENTS, 2), (TokenType.ARGUMENT_TYPE, 2), (TokenType.RETURNS, 2), (TokenType.RETURN_TYPE, 2), (TokenType.YIELDS, 2), (TokenType.YIELD_TYPE, 2), (TokenType.VARIABLES, 2), (TokenType.VARIABLE_TYPE, 2), (TokenType.NOQA, 2), (TokenType.OTHER, 2), (TokenType.RECEIVES, 2), (TokenType.WARNS, 2), (TokenType.SEE, 2), (TokenType.ALSO, 2), (TokenType.NOTES, 2), (TokenType.EXAMPLES, 2), (TokenType.REFERENCES, 2), (TokenType.HEADER, 2), ([IndentError], "line", "item-body4", 0), ([IndentError], "line", "item-body6", 0)), P("paragraph-indented-two", ([], "indented-two", "paragraph-indented-two0", 0), ([], "indented-two", "line", 0)), P("paragraph", ([], "indents", "paragraph0", 0), ([], "indents", "line", 0), ([], "line", "paragraph2", 0), ([], "word", "line", 0), ([], "word", "noqa-maybe", 0), ([NoqaIdentifier], "hash", "noqa", 0), ([NoqaIdentifier], "noqa-head", "noqa-statement1", 0), (TokenType.INDENT, 0), (TokenType.COLON, 0), (TokenType.HASH, 0), (TokenType.LPAREN, 0), (TokenType.RPAREN, 0), (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0), (TokenType.HEADER, 0), ([], "line", "paragraph1", 0)), P("line", ([], "word", "line", 0), ([], "word", "noqa-maybe", 0), ([NoqaIdentifier], "hash", "noqa", 0), ([NoqaIdentifier], "noqa-head", "noqa-statement1", 0), (TokenType.INDENT, 0), (TokenType.COLON, 0), (TokenType.HASH, 0), (TokenType.LPAREN, 0), (TokenType.RPAREN, 0), (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0), (TokenType.HEADER, 0)), P("indented-two", ([], "indent", "indented-two0", 0)), P("indents", ([], "indent", "indents", 0), (TokenType.INDENT, 0)), P("newlines", ([], "newline", "newlines", 0), (TokenType.NEWLINE, 0)), P("word", (TokenType.COLON, 0), (TokenType.HASH, 0), (TokenType.INDENT, 0), (TokenType.LPAREN, 0), (TokenType.RPAREN, 0), (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0), (TokenType.HEADER, 0)), P("ident", (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0)), P("arguments", (TokenType.ARGUMENTS, 0)), P("colon", (TokenType.COLON, 0)), P("hash", (TokenType.HASH, 0)), P("indent", (TokenType.INDENT, 0)), P("lparen", (TokenType.LPAREN, 0)), P("newline", (TokenType.NEWLINE, 0)), P("rparen", (TokenType.RPAREN, 0)), P("noqa", (TokenType.NOQA, 0)), P("noqa-maybe", ([NoqaIdentifier], "hash", "noqa", 0), ([NoqaIdentifier], "noqa-head", "noqa-statement1", 0)), P("noqa-head", ([], "hash", "noqa", 0)), P("words", ([], "word", "words", 0), (TokenType.COLON, 0), (TokenType.HASH, 0), (TokenType.INDENT, 0), (TokenType.LPAREN, 0), (TokenType.RPAREN, 0), (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0), (TokenType.HEADER, 0)), P("type-section-parens", ([], "lparen", "type-section-parens0", 0)), P("type-words-colon", ([], "type-word-colon", "type-words-colon", 0), ([], "type-word-colon", "type-words-colon0", 0), ([ParameterMalformedError], "malformed-type-word", "malformed-type-words", 0), (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0), (TokenType.LPAREN, 0), (TokenType.RPAREN, 0), (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0), (TokenType.COLON, 0), (TokenType.INDENT, 0)), P("type-word-colon", (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0), (TokenType.COLON, 0), (TokenType.INDENT, 0)), P("malformed-type-words", ([], "malformed-type-word", "malformed-type-words", 0), (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0), (TokenType.LPAREN, 0), (TokenType.RPAREN, 0)), P("malformed-type-word", (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0), (TokenType.LPAREN, 0), (TokenType.RPAREN, 0)), P("arguments-section1", ([], "colon", "arguments-section2", 0)), P("arguments-section2", ([], "newline", "arguments-section3", 0)), P("arguments-section3", ([], "items-argument", "newlines", 0), ([], "item-argument", "items-argument0", 0), ([ArgumentItemIdentifier], "head-argument", "item-body", 0), ([ArgumentIdentifier, EmptyDescriptionError], "indent", "head-argument1", 0), ([ArgumentIdentifier, EmptyTypeError, EmptyDescriptionError], "indent", "head-argument3", 2), ([ArgumentIdentifier, ArgumentTypeIdentifier, EmptyDescriptionError], "indent", "head-argument7", 0), ([ArgumentIdentifier, ArgumentTypeIdentifier, EmptyDescriptionError], "indent", "head-argument10", 0), ([ArgumentIdentifier, EmptyDescriptionError], "indent", "head-argument14", 0)), P("items-argument0", ([], "newline", "items-argument", 0)), P("head-argument1", ([], "ident", "colon", 0)), P("head-argument3", ([], "ident", "head-argument4", 0)), P("head-argument4", ([], "lparen", "head-argument5", 0)), P("head-argument5", ([], "rparen", "colon", 0)), P("head-argument7", ([], "ident", "head-argument8", 0)), P("head-argument8", ([], "type-section-parens", "colon", 0)), P("head-argument10", ([], "ident", "head-argument11", 0)), P("head-argument11", ([], "type-section-parens", "head-argument12", 0)), P("head-argument12", ([], "colon", "newline", 0)), P("head-argument14", ([], "ident", "head-argument15", 0)), P("head-argument15", ([], "colon", "newline", 0)), P("item-body0", ([], "newline", "paragraph-indented-two", 0)), P("item-body1", ([], "newline", "item-body2", 0)), P("item-body2", ([], "paragraph-indented-two", "newline", 0)), P("item-body4", ([], "newline", "paragraph", 0)), P("item-body6", ([], "newline", "item-body7", 0)), P("item-body7", ([], "paragraph", "newline", 0)), P("paragraph-indented-two0", ([], "line", "paragraph-indented-two1", 0)), P("paragraph-indented-two1", ([], "newline", "paragraph-indented-two", 0)), P("paragraph0", ([], "line", "paragraph1", 0)), P("paragraph1", ([], "newline", "paragraph", 0)), P("paragraph2", ([], "newline", "paragraph", 0)), P("indented-two0", ([], "indent", "indents", 0), (TokenType.INDENT, 0)), P("noqa-statement1", ([], "colon", "words", 0)), P("type-section-parens0", ([], "type-words-colon", "rparen", 0), (TokenType.RPAREN, 0)), P("type-words-colon0", ([], "newline", "type-words-colon1", 0), (TokenType.NEWLINE, 0)), P("type-words-colon1", ([], "indents", "type-words-colon", 0), ([], "indent", "indents", 0), (TokenType.INDENT, 0), ([], "type-word-colon", "type-words-colon", 0), ([], "type-word-colon", "type-words-colon0", 0), ([ParameterMalformedError], "malformed-type-word", "malformed-type-words", 0), (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0), (TokenType.LPAREN, 0), (TokenType.RPAREN, 0), (TokenType.WORD, 0), (TokenType.RAISES, 0), (TokenType.ARGUMENTS, 0), (TokenType.ARGUMENT_TYPE, 0), (TokenType.RETURNS, 0), (TokenType.RETURN_TYPE, 0), (TokenType.YIELDS, 0), (TokenType.YIELD_TYPE, 0), (TokenType.VARIABLES, 0), (TokenType.VARIABLE_TYPE, 0), (TokenType.NOQA, 0), (TokenType.OTHER, 0), (TokenType.RECEIVES, 0), (TokenType.WARNS, 0), (TokenType.SEE, 0), (TokenType.ALSO, 0), (TokenType.NOTES, 0), (TokenType.EXAMPLES, 0), (TokenType.REFERENCES, 0), (TokenType.COLON, 0)), ] start = "arguments-section"
150.221053
1,294
0.657557
7940e5ad23db95af64198b956199c89063741219
73,162
py
Python
tools/run_tests/run_tests.py
vixadd/grpc
7c9e8b425166276232653725de32ea0422a39b33
[ "Apache-2.0" ]
2
2021-07-13T09:16:08.000Z
2021-11-17T11:07:13.000Z
tools/run_tests/run_tests.py
vixadd/grpc
7c9e8b425166276232653725de32ea0422a39b33
[ "Apache-2.0" ]
1
2017-09-12T19:02:08.000Z
2017-09-12T19:02:08.000Z
tools/run_tests/run_tests.py
vixadd/grpc
7c9e8b425166276232653725de32ea0422a39b33
[ "Apache-2.0" ]
1
2021-07-05T12:40:00.000Z
2021-07-05T12:40:00.000Z
#!/usr/bin/env python # Copyright 2015 gRPC authors. # # 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 License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Run tests in parallel.""" from __future__ import print_function import argparse import ast import collections import glob import itertools import json import logging import multiprocessing import os import os.path import pipes import platform import random import re import socket import subprocess import sys import tempfile import traceback import time from six.moves import urllib import uuid import six import python_utils.jobset as jobset import python_utils.report_utils as report_utils import python_utils.watch_dirs as watch_dirs import python_utils.start_port_server as start_port_server try: from python_utils.upload_test_results import upload_results_to_bq except (ImportError): pass # It's ok to not import because this is only necessary to upload results to BQ. gcp_utils_dir = os.path.abspath( os.path.join(os.path.dirname(__file__), '../gcp/utils')) sys.path.append(gcp_utils_dir) _ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..')) os.chdir(_ROOT) _FORCE_ENVIRON_FOR_WRAPPERS = { 'GRPC_VERBOSITY': 'DEBUG', } _POLLING_STRATEGIES = { 'linux': ['epollex', 'epoll1', 'poll'], 'mac': ['poll'], } def platform_string(): return jobset.platform_string() _DEFAULT_TIMEOUT_SECONDS = 5 * 60 _PRE_BUILD_STEP_TIMEOUT_SECONDS = 10 * 60 def run_shell_command(cmd, env=None, cwd=None): try: subprocess.check_output(cmd, shell=True, env=env, cwd=cwd) except subprocess.CalledProcessError as e: logging.exception( "Error while running command '%s'. Exit status %d. Output:\n%s", e.cmd, e.returncode, e.output) raise def max_parallel_tests_for_current_platform(): # Too much test parallelization has only been seen to be a problem # so far on windows. if jobset.platform_string() == 'windows': return 64 return 1024 # SimpleConfig: just compile with CONFIG=config, and run the binary to test class Config(object): def __init__(self, config, environ=None, timeout_multiplier=1, tool_prefix=[], iomgr_platform='native'): if environ is None: environ = {} self.build_config = config self.environ = environ self.environ['CONFIG'] = config self.tool_prefix = tool_prefix self.timeout_multiplier = timeout_multiplier self.iomgr_platform = iomgr_platform def job_spec(self, cmdline, timeout_seconds=_DEFAULT_TIMEOUT_SECONDS, shortname=None, environ={}, cpu_cost=1.0, flaky=False): """Construct a jobset.JobSpec for a test under this config Args: cmdline: a list of strings specifying the command line the test would like to run """ actual_environ = self.environ.copy() for k, v in environ.items(): actual_environ[k] = v if not flaky and shortname and shortname in flaky_tests: flaky = True if shortname in shortname_to_cpu: cpu_cost = shortname_to_cpu[shortname] return jobset.JobSpec( cmdline=self.tool_prefix + cmdline, shortname=shortname, environ=actual_environ, cpu_cost=cpu_cost, timeout_seconds=(self.timeout_multiplier * timeout_seconds if timeout_seconds else None), flake_retries=4 if flaky or args.allow_flakes else 0, timeout_retries=1 if flaky or args.allow_flakes else 0) def get_c_tests(travis, test_lang): out = [] platforms_str = 'ci_platforms' if travis else 'platforms' with open('tools/run_tests/generated/tests.json') as f: js = json.load(f) return [ tgt for tgt in js if tgt['language'] == test_lang and platform_string() in tgt[platforms_str] and not (travis and tgt['flaky']) ] def _check_compiler(compiler, supported_compilers): if compiler not in supported_compilers: raise Exception('Compiler %s not supported (on this platform).' % compiler) def _check_arch(arch, supported_archs): if arch not in supported_archs: raise Exception('Architecture %s not supported.' % arch) def _is_use_docker_child(): """Returns True if running running as a --use_docker child.""" return True if os.getenv('RUN_TESTS_COMMAND') else False _PythonConfigVars = collections.namedtuple('_ConfigVars', [ 'shell', 'builder', 'builder_prefix_arguments', 'venv_relative_python', 'toolchain', 'runner', 'test_name', 'iomgr_platform', ]) def _python_config_generator(name, major, minor, bits, config_vars): name += '_' + config_vars.iomgr_platform return PythonConfig( name, config_vars.shell + config_vars.builder + config_vars.builder_prefix_arguments + [_python_pattern_function(major=major, minor=minor, bits=bits)] + [name] + config_vars.venv_relative_python + config_vars.toolchain, config_vars.shell + config_vars.runner + [ os.path.join(name, config_vars.venv_relative_python[0]), config_vars.test_name ]) def _pypy_config_generator(name, major, config_vars): return PythonConfig( name, config_vars.shell + config_vars.builder + config_vars.builder_prefix_arguments + [_pypy_pattern_function(major=major)] + [name] + config_vars.venv_relative_python + config_vars.toolchain, config_vars.shell + config_vars.runner + [os.path.join(name, config_vars.venv_relative_python[0])]) def _python_pattern_function(major, minor, bits): # Bit-ness is handled by the test machine's environment if os.name == "nt": if bits == "64": return '/c/Python{major}{minor}/python.exe'.format(major=major, minor=minor, bits=bits) else: return '/c/Python{major}{minor}_{bits}bits/python.exe'.format( major=major, minor=minor, bits=bits) else: return 'python{major}.{minor}'.format(major=major, minor=minor) def _pypy_pattern_function(major): if major == '2': return 'pypy' elif major == '3': return 'pypy3' else: raise ValueError("Unknown PyPy major version") class CLanguage(object): def __init__(self, make_target, test_lang): self.make_target = make_target self.platform = platform_string() self.test_lang = test_lang def configure(self, config, args): self.config = config self.args = args self._make_options = [] self._use_cmake = True if self.platform == 'windows': _check_compiler(self.args.compiler, [ 'default', 'cmake', 'cmake_vs2015', 'cmake_vs2017', 'cmake_vs2019' ]) _check_arch(self.args.arch, ['default', 'x64', 'x86']) if self.args.compiler == 'cmake_vs2019': cmake_generator_option = 'Visual Studio 16 2019' elif self.args.compiler == 'cmake_vs2017': cmake_generator_option = 'Visual Studio 15 2017' else: cmake_generator_option = 'Visual Studio 14 2015' cmake_arch_option = 'x64' if self.args.arch == 'x64' else 'Win32' self._cmake_configure_extra_args = [ '-G', cmake_generator_option, '-A', cmake_arch_option ] else: if self.platform == 'linux': # Allow all the known architectures. _check_arch_option has already checked that we're not doing # something illegal when not running under docker. _check_arch(self.args.arch, ['default', 'x64', 'x86']) else: _check_arch(self.args.arch, ['default']) self._docker_distro, self._cmake_configure_extra_args = self._compiler_options( self.args.use_docker, self.args.compiler) if self.args.arch == 'x86': # disable boringssl asm optimizations when on x86 # see https://github.com/grpc/grpc/blob/b5b8578b3f8b4a9ce61ed6677e19d546e43c5c68/tools/run_tests/artifacts/artifact_targets.py#L253 self._cmake_configure_extra_args.append('-DOPENSSL_NO_ASM=ON') if args.iomgr_platform == "uv": cflags = '-DGRPC_UV -DGRPC_CUSTOM_IOMGR_THREAD_CHECK -DGRPC_CUSTOM_SOCKET ' try: cflags += subprocess.check_output( ['pkg-config', '--cflags', 'libuv']).strip() + ' ' except (subprocess.CalledProcessError, OSError): pass try: ldflags = subprocess.check_output( ['pkg-config', '--libs', 'libuv']).strip() + ' ' except (subprocess.CalledProcessError, OSError): ldflags = '-luv ' self._make_options += [ 'EXTRA_CPPFLAGS={}'.format(cflags), 'EXTRA_LDLIBS={}'.format(ldflags) ] def test_specs(self): out = [] binaries = get_c_tests(self.args.travis, self.test_lang) for target in binaries: if self._use_cmake and target.get('boringssl', False): # cmake doesn't build boringssl tests continue auto_timeout_scaling = target.get('auto_timeout_scaling', True) polling_strategies = (_POLLING_STRATEGIES.get( self.platform, ['all']) if target.get('uses_polling', True) else ['none']) if self.args.iomgr_platform == 'uv': polling_strategies = ['all'] for polling_strategy in polling_strategies: env = { 'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH': _ROOT + '/src/core/tsi/test_creds/ca.pem', 'GRPC_POLL_STRATEGY': polling_strategy, 'GRPC_VERBOSITY': 'DEBUG' } resolver = os.environ.get('GRPC_DNS_RESOLVER', None) if resolver: env['GRPC_DNS_RESOLVER'] = resolver shortname_ext = '' if polling_strategy == 'all' else ' GRPC_POLL_STRATEGY=%s' % polling_strategy if polling_strategy in target.get('excluded_poll_engines', []): continue timeout_scaling = 1 if auto_timeout_scaling: config = self.args.config if ('asan' in config or config == 'msan' or config == 'tsan' or config == 'ubsan' or config == 'helgrind' or config == 'memcheck'): # Scale overall test timeout if running under various sanitizers. # scaling value is based on historical data analysis timeout_scaling *= 3 if self.config.build_config in target['exclude_configs']: continue if self.args.iomgr_platform in target.get('exclude_iomgrs', []): continue if self.platform == 'windows': binary = 'cmake/build/%s/%s.exe' % (_MSBUILD_CONFIG[ self.config.build_config], target['name']) else: if self._use_cmake: binary = 'cmake/build/%s' % target['name'] else: binary = 'bins/%s/%s' % (self.config.build_config, target['name']) cpu_cost = target['cpu_cost'] if cpu_cost == 'capacity': cpu_cost = multiprocessing.cpu_count() if os.path.isfile(binary): list_test_command = None filter_test_command = None # these are the flag defined by gtest and benchmark framework to list # and filter test runs. We use them to split each individual test # into its own JobSpec, and thus into its own process. if 'benchmark' in target and target['benchmark']: with open(os.devnull, 'w') as fnull: tests = subprocess.check_output( [binary, '--benchmark_list_tests'], stderr=fnull) for line in tests.decode().split('\n'): test = line.strip() if not test: continue cmdline = [binary, '--benchmark_filter=%s$' % test ] + target['args'] out.append( self.config.job_spec( cmdline, shortname='%s %s' % (' '.join(cmdline), shortname_ext), cpu_cost=cpu_cost, timeout_seconds=target.get( 'timeout_seconds', _DEFAULT_TIMEOUT_SECONDS) * timeout_scaling, environ=env)) elif 'gtest' in target and target['gtest']: # here we parse the output of --gtest_list_tests to build up a complete # list of the tests contained in a binary for each test, we then # add a job to run, filtering for just that test. with open(os.devnull, 'w') as fnull: tests = subprocess.check_output( [binary, '--gtest_list_tests'], stderr=fnull) base = None for line in tests.decode().split('\n'): i = line.find('#') if i >= 0: line = line[:i] if not line: continue if line[0] != ' ': base = line.strip() else: assert base is not None assert line[1] == ' ' test = base + line.strip() cmdline = [binary, '--gtest_filter=%s' % test ] + target['args'] out.append( self.config.job_spec( cmdline, shortname='%s %s' % (' '.join(cmdline), shortname_ext), cpu_cost=cpu_cost, timeout_seconds=target.get( 'timeout_seconds', _DEFAULT_TIMEOUT_SECONDS) * timeout_scaling, environ=env)) else: cmdline = [binary] + target['args'] shortname = target.get( 'shortname', ' '.join(pipes.quote(arg) for arg in cmdline)) shortname += shortname_ext out.append( self.config.job_spec( cmdline, shortname=shortname, cpu_cost=cpu_cost, flaky=target.get('flaky', False), timeout_seconds=target.get( 'timeout_seconds', _DEFAULT_TIMEOUT_SECONDS) * timeout_scaling, environ=env)) elif self.args.regex == '.*' or self.platform == 'windows': print('\nWARNING: binary not found, skipping', binary) return sorted(out) def make_targets(self): if self.platform == 'windows': # don't build tools on windows just yet return ['buildtests_%s' % self.make_target] return [ 'buildtests_%s' % self.make_target, 'tools_%s' % self.make_target, 'check_epollexclusive' ] def make_options(self): return self._make_options def pre_build_steps(self): if self.platform == 'windows': return [['tools\\run_tests\\helper_scripts\\pre_build_cmake.bat'] + self._cmake_configure_extra_args] elif self._use_cmake: return [['tools/run_tests/helper_scripts/pre_build_cmake.sh'] + self._cmake_configure_extra_args] else: return [] def build_steps(self): return [] def post_tests_steps(self): if self.platform == 'windows': return [] else: return [['tools/run_tests/helper_scripts/post_tests_c.sh']] def makefile_name(self): if self._use_cmake: return 'cmake/build/Makefile' else: return 'Makefile' def _clang_cmake_configure_extra_args(self, version_suffix=''): return [ '-DCMAKE_C_COMPILER=clang%s' % version_suffix, '-DCMAKE_CXX_COMPILER=clang++%s' % version_suffix, ] def _compiler_options(self, use_docker, compiler): """Returns docker distro and cmake configure args to use for given compiler.""" if not use_docker and not _is_use_docker_child(): # if not running under docker, we cannot ensure the right compiler version will be used, # so we only allow the non-specific choices. _check_compiler(compiler, ['default', 'cmake']) if compiler == 'gcc4.9' or compiler == 'default' or compiler == 'cmake': return ('jessie', []) elif compiler == 'gcc5.3': return ('ubuntu1604', []) elif compiler == 'gcc7.4': return ('ubuntu1804', []) elif compiler == 'gcc8.3': return ('buster', []) elif compiler == 'gcc8.3_openssl102': return ('buster_openssl102', [ "-DgRPC_SSL_PROVIDER=package", ]) elif compiler == 'gcc_musl': return ('alpine', []) elif compiler == 'clang4.0': return ('ubuntu1604', self._clang_cmake_configure_extra_args( version_suffix='-4.0')) elif compiler == 'clang5.0': return ('ubuntu1604', self._clang_cmake_configure_extra_args( version_suffix='-5.0')) else: raise Exception('Compiler %s not supported.' % compiler) def dockerfile_dir(self): return 'tools/dockerfile/test/cxx_%s_%s' % ( self._docker_distro, _docker_arch_suffix(self.args.arch)) def __str__(self): return self.make_target # This tests Node on grpc/grpc-node and will become the standard for Node testing class RemoteNodeLanguage(object): def __init__(self): self.platform = platform_string() def configure(self, config, args): self.config = config self.args = args # Note: electron ABI only depends on major and minor version, so that's all # we should specify in the compiler argument _check_compiler(self.args.compiler, [ 'default', 'node0.12', 'node4', 'node5', 'node6', 'node7', 'node8', 'electron1.3', 'electron1.6' ]) if self.args.compiler == 'default': self.runtime = 'node' self.node_version = '8' else: if self.args.compiler.startswith('electron'): self.runtime = 'electron' self.node_version = self.args.compiler[8:] else: self.runtime = 'node' # Take off the word "node" self.node_version = self.args.compiler[4:] # TODO: update with Windows/electron scripts when available for grpc/grpc-node def test_specs(self): if self.platform == 'windows': return [ self.config.job_spec( ['tools\\run_tests\\helper_scripts\\run_node.bat']) ] else: return [ self.config.job_spec( ['tools/run_tests/helper_scripts/run_grpc-node.sh'], None, environ=_FORCE_ENVIRON_FOR_WRAPPERS) ] def pre_build_steps(self): return [] def make_targets(self): return [] def make_options(self): return [] def build_steps(self): return [] def post_tests_steps(self): return [] def makefile_name(self): return 'Makefile' def dockerfile_dir(self): return 'tools/dockerfile/test/node_jessie_%s' % _docker_arch_suffix( self.args.arch) def __str__(self): return 'grpc-node' class Php7Language(object): def configure(self, config, args): self.config = config self.args = args _check_compiler(self.args.compiler, ['default']) self._make_options = ['EMBED_OPENSSL=true', 'EMBED_ZLIB=true'] def test_specs(self): return [ self.config.job_spec(['src/php/bin/run_tests.sh'], environ=_FORCE_ENVIRON_FOR_WRAPPERS) ] def pre_build_steps(self): return [] def make_targets(self): return ['static_c', 'shared_c'] def make_options(self): return self._make_options def build_steps(self): return [['tools/run_tests/helper_scripts/build_php.sh']] def post_tests_steps(self): return [['tools/run_tests/helper_scripts/post_tests_php.sh']] def makefile_name(self): return 'Makefile' def dockerfile_dir(self): return 'tools/dockerfile/test/php7_jessie_%s' % _docker_arch_suffix( self.args.arch) def __str__(self): return 'php7' class PythonConfig( collections.namedtuple('PythonConfig', ['name', 'build', 'run'])): """Tuple of commands (named s.t. 'what it says on the tin' applies)""" class PythonLanguage(object): _TEST_SPECS_FILE = { 'native': ['src/python/grpcio_tests/tests/tests.json'], 'gevent': [ 'src/python/grpcio_tests/tests/tests.json', 'src/python/grpcio_tests/tests_gevent/tests.json', ], 'asyncio': ['src/python/grpcio_tests/tests_aio/tests.json'], } _TEST_FOLDER = { 'native': 'test', 'gevent': 'test_gevent', 'asyncio': 'test_aio', } def configure(self, config, args): self.config = config self.args = args self.pythons = self._get_pythons(self.args) def test_specs(self): # load list of known test suites tests_json = [] for tests_json_file_name in self._TEST_SPECS_FILE[ self.args.iomgr_platform]: with open(tests_json_file_name) as tests_json_file: tests_json.extend(json.load(tests_json_file)) environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) # TODO(https://github.com/grpc/grpc/issues/21401) Fork handlers is not # designed for non-native IO manager. It has a side-effect that # overrides threading settings in C-Core. if args.iomgr_platform != 'native': environment['GRPC_ENABLE_FORK_SUPPORT'] = '0' return [ self.config.job_spec( config.run, timeout_seconds=8 * 60, environ=dict(GRPC_PYTHON_TESTRUNNER_FILTER=str(suite_name), **environment), shortname='%s.%s.%s' % (config.name, self._TEST_FOLDER[self.args.iomgr_platform], suite_name), ) for suite_name in tests_json for config in self.pythons ] def pre_build_steps(self): return [] def make_targets(self): return [] def make_options(self): return [] def build_steps(self): return [config.build for config in self.pythons] def post_tests_steps(self): if self.config.build_config != 'gcov': return [] else: return [['tools/run_tests/helper_scripts/post_tests_python.sh']] def makefile_name(self): return 'Makefile' def dockerfile_dir(self): return 'tools/dockerfile/test/python_%s_%s' % ( self._python_manager_name(), _docker_arch_suffix(self.args.arch)) def _python_manager_name(self): """Choose the docker image to use based on python version.""" if self.args.compiler in [ 'python2.7', 'python3.5', 'python3.6', 'python3.7', 'python3.8' ]: return 'stretch_' + self.args.compiler[len('python'):] elif self.args.compiler == 'python_alpine': return 'alpine' else: return 'stretch_default' def _get_pythons(self, args): """Get python runtimes to test with, based on current platform, architecture, compiler etc.""" if args.arch == 'x86': bits = '32' else: bits = '64' if os.name == 'nt': shell = ['bash'] builder = [ os.path.abspath( 'tools/run_tests/helper_scripts/build_python_msys2.sh') ] builder_prefix_arguments = ['MINGW{}'.format(bits)] venv_relative_python = ['Scripts/python.exe'] toolchain = ['mingw32'] else: shell = [] builder = [ os.path.abspath( 'tools/run_tests/helper_scripts/build_python.sh') ] builder_prefix_arguments = [] venv_relative_python = ['bin/python'] toolchain = ['unix'] # Selects the corresponding testing mode. # See src/python/grpcio_tests/commands.py for implementation details. if args.iomgr_platform == 'native': test_command = 'test_lite' elif args.iomgr_platform == 'gevent': test_command = 'test_gevent' elif args.iomgr_platform == 'asyncio': test_command = 'test_aio' else: raise ValueError('Unsupported IO Manager platform: %s' % args.iomgr_platform) runner = [ os.path.abspath('tools/run_tests/helper_scripts/run_python.sh') ] config_vars = _PythonConfigVars(shell, builder, builder_prefix_arguments, venv_relative_python, toolchain, runner, test_command, args.iomgr_platform) python27_config = _python_config_generator(name='py27', major='2', minor='7', bits=bits, config_vars=config_vars) python35_config = _python_config_generator(name='py35', major='3', minor='5', bits=bits, config_vars=config_vars) python36_config = _python_config_generator(name='py36', major='3', minor='6', bits=bits, config_vars=config_vars) python37_config = _python_config_generator(name='py37', major='3', minor='7', bits=bits, config_vars=config_vars) python38_config = _python_config_generator(name='py38', major='3', minor='8', bits=bits, config_vars=config_vars) pypy27_config = _pypy_config_generator(name='pypy', major='2', config_vars=config_vars) pypy32_config = _pypy_config_generator(name='pypy3', major='3', config_vars=config_vars) if args.iomgr_platform in ('asyncio', 'gevent'): if args.compiler not in ('default', 'python3.6', 'python3.7', 'python3.8'): raise Exception( 'Compiler %s not supported with IO Manager platform: %s' % (args.compiler, args.iomgr_platform)) if args.compiler == 'default': if os.name == 'nt': if args.iomgr_platform == 'gevent': # TODO(https://github.com/grpc/grpc/issues/23784) allow # gevent to run on later version once issue solved. return (python36_config,) else: return (python38_config,) else: if args.iomgr_platform in ('asyncio', 'gevent'): return (python36_config, python38_config) elif os.uname()[0] == 'Darwin': # NOTE(rbellevi): Testing takes significantly longer on # MacOS, so we restrict the number of interpreter versions # tested. return ( python27_config, python38_config, ) else: return ( python27_config, python35_config, python37_config, python38_config, ) elif args.compiler == 'python2.7': return (python27_config,) elif args.compiler == 'python3.5': return (python35_config,) elif args.compiler == 'python3.6': return (python36_config,) elif args.compiler == 'python3.7': return (python37_config,) elif args.compiler == 'python3.8': return (python38_config,) elif args.compiler == 'pypy': return (pypy27_config,) elif args.compiler == 'pypy3': return (pypy32_config,) elif args.compiler == 'python_alpine': return (python27_config,) elif args.compiler == 'all_the_cpythons': return ( python27_config, python35_config, python36_config, python37_config, python38_config, ) else: raise Exception('Compiler %s not supported.' % args.compiler) def __str__(self): return 'python' class RubyLanguage(object): def configure(self, config, args): self.config = config self.args = args _check_compiler(self.args.compiler, ['default']) def test_specs(self): tests = [ self.config.job_spec(['tools/run_tests/helper_scripts/run_ruby.sh'], timeout_seconds=10 * 60, environ=_FORCE_ENVIRON_FOR_WRAPPERS) ] for test in [ 'src/ruby/end2end/sig_handling_test.rb', 'src/ruby/end2end/channel_state_test.rb', 'src/ruby/end2end/channel_closing_test.rb', 'src/ruby/end2end/sig_int_during_channel_watch_test.rb', 'src/ruby/end2end/killed_client_thread_test.rb', 'src/ruby/end2end/forking_client_test.rb', 'src/ruby/end2end/grpc_class_init_test.rb', 'src/ruby/end2end/multiple_killed_watching_threads_test.rb', 'src/ruby/end2end/load_grpc_with_gc_stress_test.rb', 'src/ruby/end2end/client_memory_usage_test.rb', 'src/ruby/end2end/package_with_underscore_test.rb', 'src/ruby/end2end/graceful_sig_handling_test.rb', 'src/ruby/end2end/graceful_sig_stop_test.rb', 'src/ruby/end2end/errors_load_before_grpc_lib_test.rb', 'src/ruby/end2end/logger_load_before_grpc_lib_test.rb', 'src/ruby/end2end/status_codes_load_before_grpc_lib_test.rb', 'src/ruby/end2end/call_credentials_timeout_test.rb', 'src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_test.rb' ]: tests.append( self.config.job_spec(['ruby', test], shortname=test, timeout_seconds=20 * 60, environ=_FORCE_ENVIRON_FOR_WRAPPERS)) return tests def pre_build_steps(self): return [['tools/run_tests/helper_scripts/pre_build_ruby.sh']] def make_targets(self): return [] def make_options(self): return [] def build_steps(self): return [['tools/run_tests/helper_scripts/build_ruby.sh']] def post_tests_steps(self): return [['tools/run_tests/helper_scripts/post_tests_ruby.sh']] def makefile_name(self): return 'Makefile' def dockerfile_dir(self): return 'tools/dockerfile/test/ruby_buster_%s' % _docker_arch_suffix( self.args.arch) def __str__(self): return 'ruby' class CSharpLanguage(object): def __init__(self): self.platform = platform_string() def configure(self, config, args): self.config = config self.args = args if self.platform == 'windows': _check_compiler(self.args.compiler, ['default', 'coreclr']) _check_arch(self.args.arch, ['default']) self._cmake_arch_option = 'x64' else: _check_compiler(self.args.compiler, ['default', 'coreclr']) self._docker_distro = 'buster' def test_specs(self): with open('src/csharp/tests.json') as f: tests_by_assembly = json.load(f) msbuild_config = _MSBUILD_CONFIG[self.config.build_config] nunit_args = ['--labels=All', '--noresult', '--workers=1'] assembly_subdir = 'bin/%s' % msbuild_config assembly_extension = '.exe' if self.args.compiler == 'coreclr': assembly_subdir += '/netcoreapp2.1' runtime_cmd = ['dotnet', 'exec'] assembly_extension = '.dll' else: assembly_subdir += '/net45' if self.platform == 'windows': runtime_cmd = [] elif self.platform == 'mac': # mono before version 5.2 on MacOS defaults to 32bit runtime runtime_cmd = ['mono', '--arch=64'] else: runtime_cmd = ['mono'] specs = [] for assembly in six.iterkeys(tests_by_assembly): assembly_file = 'src/csharp/%s/%s/%s%s' % ( assembly, assembly_subdir, assembly, assembly_extension) if self.config.build_config != 'gcov' or self.platform != 'windows': # normally, run each test as a separate process for test in tests_by_assembly[assembly]: cmdline = runtime_cmd + [assembly_file, '--test=%s' % test] + nunit_args specs.append( self.config.job_spec( cmdline, shortname='csharp.%s' % test, environ=_FORCE_ENVIRON_FOR_WRAPPERS)) else: # For C# test coverage, run all tests from the same assembly at once # using OpenCover.Console (only works on Windows). cmdline = [ 'src\\csharp\\packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe', '-target:%s' % assembly_file, '-targetdir:src\\csharp', '-targetargs:%s' % ' '.join(nunit_args), '-filter:+[Grpc.Core]*', '-register:user', '-output:src\\csharp\\coverage_csharp_%s.xml' % assembly ] # set really high cpu_cost to make sure instances of OpenCover.Console run exclusively # to prevent problems with registering the profiler. run_exclusive = 1000000 specs.append( self.config.job_spec(cmdline, shortname='csharp.coverage.%s' % assembly, cpu_cost=run_exclusive, environ=_FORCE_ENVIRON_FOR_WRAPPERS)) return specs def pre_build_steps(self): if self.platform == 'windows': return [[ 'tools\\run_tests\\helper_scripts\\pre_build_csharp.bat', self._cmake_arch_option ]] else: return [['tools/run_tests/helper_scripts/pre_build_csharp.sh']] def make_targets(self): return ['grpc_csharp_ext'] def make_options(self): return [] def build_steps(self): if self.platform == 'windows': return [['tools\\run_tests\\helper_scripts\\build_csharp.bat']] else: return [['tools/run_tests/helper_scripts/build_csharp.sh']] def post_tests_steps(self): if self.platform == 'windows': return [['tools\\run_tests\\helper_scripts\\post_tests_csharp.bat']] else: return [['tools/run_tests/helper_scripts/post_tests_csharp.sh']] def makefile_name(self): if self.platform == 'windows': return 'cmake/build/%s/Makefile' % self._cmake_arch_option else: # no need to set x86 specific flags as run_tests.py # currently forbids x86 C# builds on both Linux and MacOS. return 'cmake/build/Makefile' def dockerfile_dir(self): return 'tools/dockerfile/test/csharp_%s_%s' % ( self._docker_distro, _docker_arch_suffix(self.args.arch)) def __str__(self): return 'csharp' class ObjCLanguage(object): def configure(self, config, args): self.config = config self.args = args _check_compiler(self.args.compiler, ['default']) def test_specs(self): out = [] out.append( self.config.job_spec( ['src/objective-c/tests/build_one_example_bazel.sh'], timeout_seconds=10 * 60, shortname='ios-buildtest-example-sample', cpu_cost=1e6, environ={ 'SCHEME': 'Sample', 'EXAMPLE_PATH': 'src/objective-c/examples/Sample', 'FRAMEWORKS': 'NO' })) # Currently not supporting compiling as frameworks in Bazel out.append( self.config.job_spec( ['src/objective-c/tests/build_one_example.sh'], timeout_seconds=20 * 60, shortname='ios-buildtest-example-sample-frameworks', cpu_cost=1e6, environ={ 'SCHEME': 'Sample', 'EXAMPLE_PATH': 'src/objective-c/examples/Sample', 'FRAMEWORKS': 'YES' })) out.append( self.config.job_spec( ['src/objective-c/tests/build_one_example.sh'], timeout_seconds=20 * 60, shortname='ios-buildtest-example-switftsample', cpu_cost=1e6, environ={ 'SCHEME': 'SwiftSample', 'EXAMPLE_PATH': 'src/objective-c/examples/SwiftSample' })) out.append( self.config.job_spec( ['src/objective-c/tests/build_one_example_bazel.sh'], timeout_seconds=10 * 60, shortname='ios-buildtest-example-tvOS-sample', cpu_cost=1e6, environ={ 'SCHEME': 'tvOS-sample', 'EXAMPLE_PATH': 'src/objective-c/examples/tvOS-sample', 'FRAMEWORKS': 'NO' })) # Disabled due to #20258 # TODO (mxyan): Reenable this test when #20258 is resolved. # out.append( # self.config.job_spec( # ['src/objective-c/tests/build_one_example_bazel.sh'], # timeout_seconds=20 * 60, # shortname='ios-buildtest-example-watchOS-sample', # cpu_cost=1e6, # environ={ # 'SCHEME': 'watchOS-sample-WatchKit-App', # 'EXAMPLE_PATH': 'src/objective-c/examples/watchOS-sample', # 'FRAMEWORKS': 'NO' # })) out.append( self.config.job_spec(['src/objective-c/tests/run_plugin_tests.sh'], timeout_seconds=60 * 60, shortname='ios-test-plugintest', cpu_cost=1e6, environ=_FORCE_ENVIRON_FOR_WRAPPERS)) out.append( self.config.job_spec( ['src/objective-c/tests/run_plugin_option_tests.sh'], timeout_seconds=60 * 60, shortname='ios-test-plugin-option-test', cpu_cost=1e6, environ=_FORCE_ENVIRON_FOR_WRAPPERS)) out.append( self.config.job_spec( ['test/core/iomgr/ios/CFStreamTests/build_and_run_tests.sh'], timeout_seconds=60 * 60, shortname='ios-test-cfstream-tests', cpu_cost=1e6, environ=_FORCE_ENVIRON_FOR_WRAPPERS)) # TODO: replace with run_one_test_bazel.sh when Bazel-Xcode is stable out.append( self.config.job_spec(['src/objective-c/tests/run_one_test.sh'], timeout_seconds=60 * 60, shortname='ios-test-unittests', cpu_cost=1e6, environ={'SCHEME': 'UnitTests'})) out.append( self.config.job_spec(['src/objective-c/tests/run_one_test.sh'], timeout_seconds=60 * 60, shortname='ios-test-interoptests', cpu_cost=1e6, environ={'SCHEME': 'InteropTests'})) out.append( self.config.job_spec(['src/objective-c/tests/run_one_test.sh'], timeout_seconds=60 * 60, shortname='ios-test-cronettests', cpu_cost=1e6, environ={'SCHEME': 'CronetTests'})) out.append( self.config.job_spec(['src/objective-c/tests/run_one_test.sh'], timeout_seconds=30 * 60, shortname='ios-perf-test', cpu_cost=1e6, environ={'SCHEME': 'PerfTests'})) out.append( self.config.job_spec(['src/objective-c/tests/run_one_test.sh'], timeout_seconds=30 * 60, shortname='ios-perf-test-posix', cpu_cost=1e6, environ={'SCHEME': 'PerfTestsPosix'})) out.append( self.config.job_spec(['test/cpp/ios/build_and_run_tests.sh'], timeout_seconds=60 * 60, shortname='ios-cpp-test-cronet', cpu_cost=1e6, environ=_FORCE_ENVIRON_FOR_WRAPPERS)) out.append( self.config.job_spec(['src/objective-c/tests/run_one_test.sh'], timeout_seconds=60 * 60, shortname='mac-test-basictests', cpu_cost=1e6, environ={ 'SCHEME': 'MacTests', 'PLATFORM': 'macos' })) out.append( self.config.job_spec(['src/objective-c/tests/run_one_test.sh'], timeout_seconds=30 * 60, shortname='tvos-test-basictests', cpu_cost=1e6, environ={ 'SCHEME': 'TvTests', 'PLATFORM': 'tvos' })) return sorted(out) def pre_build_steps(self): return [] def make_targets(self): return [] def make_options(self): return [] def build_steps(self): return [] def post_tests_steps(self): return [] def makefile_name(self): return 'Makefile' def dockerfile_dir(self): return None def __str__(self): return 'objc' class Sanity(object): def configure(self, config, args): self.config = config self.args = args _check_compiler(self.args.compiler, ['default']) def test_specs(self): import yaml with open('tools/run_tests/sanity/sanity_tests.yaml', 'r') as f: environ = {'TEST': 'true'} if _is_use_docker_child(): environ['CLANG_FORMAT_SKIP_DOCKER'] = 'true' environ['CLANG_TIDY_SKIP_DOCKER'] = 'true' # sanity tests run tools/bazel wrapper concurrently # and that can result in a download/run race in the wrapper. # under docker we already have the right version of bazel # so we can just disable the wrapper. environ['DISABLE_BAZEL_WRAPPER'] = 'true' return [ self.config.job_spec(cmd['script'].split(), timeout_seconds=30 * 60, environ=environ, cpu_cost=cmd.get('cpu_cost', 1)) for cmd in yaml.load(f) ] def pre_build_steps(self): return [] def make_targets(self): return ['run_dep_checks'] def make_options(self): return [] def build_steps(self): return [] def post_tests_steps(self): return [] def makefile_name(self): return 'Makefile' def dockerfile_dir(self): return 'tools/dockerfile/test/sanity' def __str__(self): return 'sanity' # different configurations we can run under with open('tools/run_tests/generated/configs.json') as f: _CONFIGS = dict( (cfg['config'], Config(**cfg)) for cfg in ast.literal_eval(f.read())) _LANGUAGES = { 'c++': CLanguage('cxx', 'c++'), 'c': CLanguage('c', 'c'), 'grpc-node': RemoteNodeLanguage(), 'php7': Php7Language(), 'python': PythonLanguage(), 'ruby': RubyLanguage(), 'csharp': CSharpLanguage(), 'objc': ObjCLanguage(), 'sanity': Sanity() } _MSBUILD_CONFIG = { 'dbg': 'Debug', 'opt': 'Release', 'gcov': 'Debug', } def _windows_arch_option(arch): """Returns msbuild cmdline option for selected architecture.""" if arch == 'default' or arch == 'x86': return '/p:Platform=Win32' elif arch == 'x64': return '/p:Platform=x64' else: print('Architecture %s not supported.' % arch) sys.exit(1) def _check_arch_option(arch): """Checks that architecture option is valid.""" if platform_string() == 'windows': _windows_arch_option(arch) elif platform_string() == 'linux': # On linux, we need to be running under docker with the right architecture. runtime_arch = platform.architecture()[0] if arch == 'default': return elif runtime_arch == '64bit' and arch == 'x64': return elif runtime_arch == '32bit' and arch == 'x86': return else: print( 'Architecture %s does not match current runtime architecture.' % arch) sys.exit(1) else: if args.arch != 'default': print('Architecture %s not supported on current platform.' % args.arch) sys.exit(1) def _docker_arch_suffix(arch): """Returns suffix to dockerfile dir to use.""" if arch == 'default' or arch == 'x64': return 'x64' elif arch == 'x86': return 'x86' else: print('Architecture %s not supported with current settings.' % arch) sys.exit(1) def runs_per_test_type(arg_str): """Auxiliary function to parse the "runs_per_test" flag. Returns: A positive integer or 0, the latter indicating an infinite number of runs. Raises: argparse.ArgumentTypeError: Upon invalid input. """ if arg_str == 'inf': return 0 try: n = int(arg_str) if n <= 0: raise ValueError return n except: msg = '\'{}\' is not a positive integer or \'inf\''.format(arg_str) raise argparse.ArgumentTypeError(msg) def percent_type(arg_str): pct = float(arg_str) if pct > 100 or pct < 0: raise argparse.ArgumentTypeError( "'%f' is not a valid percentage in the [0, 100] range" % pct) return pct # This is math.isclose in python >= 3.5 def isclose(a, b, rel_tol=1e-09, abs_tol=0.0): return abs(a - b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol) # parse command line argp = argparse.ArgumentParser(description='Run grpc tests.') argp.add_argument('-c', '--config', choices=sorted(_CONFIGS.keys()), default='opt') argp.add_argument( '-n', '--runs_per_test', default=1, type=runs_per_test_type, help='A positive integer or "inf". If "inf", all tests will run in an ' 'infinite loop. Especially useful in combination with "-f"') argp.add_argument('-r', '--regex', default='.*', type=str) argp.add_argument('--regex_exclude', default='', type=str) argp.add_argument('-j', '--jobs', default=multiprocessing.cpu_count(), type=int) argp.add_argument('-s', '--slowdown', default=1.0, type=float) argp.add_argument('-p', '--sample_percent', default=100.0, type=percent_type, help='Run a random sample with that percentage of tests') argp.add_argument('-f', '--forever', default=False, action='store_const', const=True) argp.add_argument('-t', '--travis', default=False, action='store_const', const=True) argp.add_argument('--newline_on_success', default=False, action='store_const', const=True) argp.add_argument('-l', '--language', choices=sorted(_LANGUAGES.keys()), nargs='+', required=True) argp.add_argument('-S', '--stop_on_failure', default=False, action='store_const', const=True) argp.add_argument('--use_docker', default=False, action='store_const', const=True, help='Run all the tests under docker. That provides ' + 'additional isolation and prevents the need to install ' + 'language specific prerequisites. Only available on Linux.') argp.add_argument( '--allow_flakes', default=False, action='store_const', const=True, help= 'Allow flaky tests to show as passing (re-runs failed tests up to five times)' ) argp.add_argument( '--arch', choices=['default', 'x86', 'x64'], default='default', help= 'Selects architecture to target. For some platforms "default" is the only supported choice.' ) argp.add_argument( '--compiler', choices=[ 'default', 'gcc4.9', 'gcc5.3', 'gcc7.4', 'gcc8.3', 'gcc8.3_openssl102', 'gcc_musl', 'clang4.0', 'clang5.0', 'python2.7', 'python3.5', 'python3.6', 'python3.7', 'python3.8', 'pypy', 'pypy3', 'python_alpine', 'all_the_cpythons', 'electron1.3', 'electron1.6', 'coreclr', 'cmake', 'cmake_vs2015', 'cmake_vs2017', 'cmake_vs2019', ], default='default', help= 'Selects compiler to use. Allowed values depend on the platform and language.' ) argp.add_argument('--iomgr_platform', choices=['native', 'uv', 'gevent', 'asyncio'], default='native', help='Selects iomgr platform to build on') argp.add_argument('--build_only', default=False, action='store_const', const=True, help='Perform all the build steps but don\'t run any tests.') argp.add_argument('--measure_cpu_costs', default=False, action='store_const', const=True, help='Measure the cpu costs of tests') argp.add_argument( '--update_submodules', default=[], nargs='*', help= 'Update some submodules before building. If any are updated, also run generate_projects. ' + 'Submodules are specified as SUBMODULE_NAME:BRANCH; if BRANCH is omitted, master is assumed.' ) argp.add_argument('-a', '--antagonists', default=0, type=int) argp.add_argument('-x', '--xml_report', default=None, type=str, help='Generates a JUnit-compatible XML report') argp.add_argument('--report_suite_name', default='tests', type=str, help='Test suite name to use in generated JUnit XML report') argp.add_argument( '--report_multi_target', default=False, const=True, action='store_const', help='Generate separate XML report for each test job (Looks better in UIs).' ) argp.add_argument( '--quiet_success', default=False, action='store_const', const=True, help= 'Don\'t print anything when a test passes. Passing tests also will not be reported in XML report. ' + 'Useful when running many iterations of each test (argument -n).') argp.add_argument( '--force_default_poller', default=False, action='store_const', const=True, help='Don\'t try to iterate over many polling strategies when they exist') argp.add_argument( '--force_use_pollers', default=None, type=str, help='Only use the specified comma-delimited list of polling engines. ' 'Example: --force_use_pollers epoll1,poll ' ' (This flag has no effect if --force_default_poller flag is also used)') argp.add_argument('--max_time', default=-1, type=int, help='Maximum test runtime in seconds') argp.add_argument('--bq_result_table', default='', type=str, nargs='?', help='Upload test results to a specified BQ table.') args = argp.parse_args() flaky_tests = set() shortname_to_cpu = {} if args.force_default_poller: _POLLING_STRATEGIES = {} elif args.force_use_pollers: _POLLING_STRATEGIES[platform_string()] = args.force_use_pollers.split(',') jobset.measure_cpu_costs = args.measure_cpu_costs # update submodules if necessary need_to_regenerate_projects = False for spec in args.update_submodules: spec = spec.split(':', 1) if len(spec) == 1: submodule = spec[0] branch = 'master' elif len(spec) == 2: submodule = spec[0] branch = spec[1] cwd = 'third_party/%s' % submodule def git(cmd, cwd=cwd): print('in %s: git %s' % (cwd, cmd)) run_shell_command('git %s' % cmd, cwd=cwd) git('fetch') git('checkout %s' % branch) git('pull origin %s' % branch) if os.path.exists('src/%s/gen_build_yaml.py' % submodule): need_to_regenerate_projects = True if need_to_regenerate_projects: if jobset.platform_string() == 'linux': run_shell_command('tools/buildgen/generate_projects.sh') else: print( 'WARNING: may need to regenerate projects, but since we are not on') print( ' Linux this step is being skipped. Compilation MAY fail.') # grab config run_config = _CONFIGS[args.config] build_config = run_config.build_config if args.travis: _FORCE_ENVIRON_FOR_WRAPPERS = {'GRPC_TRACE': 'api'} languages = set(_LANGUAGES[l] for l in args.language) for l in languages: l.configure(run_config, args) language_make_options = [] if any(language.make_options() for language in languages): if not 'gcov' in args.config and len(languages) != 1: print( 'languages with custom make options cannot be built simultaneously with other languages' ) sys.exit(1) else: # Combining make options is not clean and just happens to work. It allows C & C++ to build # together, and is only used under gcov. All other configs should build languages individually. language_make_options = list( set([ make_option for lang in languages for make_option in lang.make_options() ])) if args.use_docker: if not args.travis: print('Seen --use_docker flag, will run tests under docker.') print('') print( 'IMPORTANT: The changes you are testing need to be locally committed' ) print( 'because only the committed changes in the current branch will be') print('copied to the docker environment.') time.sleep(5) dockerfile_dirs = set([l.dockerfile_dir() for l in languages]) if len(dockerfile_dirs) > 1: print('Languages to be tested require running under different docker ' 'images.') sys.exit(1) else: dockerfile_dir = next(iter(dockerfile_dirs)) child_argv = [arg for arg in sys.argv if not arg == '--use_docker'] run_tests_cmd = 'python tools/run_tests/run_tests.py %s' % ' '.join( child_argv[1:]) env = os.environ.copy() env['RUN_TESTS_COMMAND'] = run_tests_cmd env['DOCKERFILE_DIR'] = dockerfile_dir env['DOCKER_RUN_SCRIPT'] = 'tools/run_tests/dockerize/docker_run_tests.sh' if args.xml_report: env['XML_REPORT'] = args.xml_report if not args.travis: env['TTY_FLAG'] = '-t' # enables Ctrl-C when not on Jenkins. subprocess.check_call( 'tools/run_tests/dockerize/build_docker_and_run_tests.sh', shell=True, env=env) sys.exit(0) _check_arch_option(args.arch) def make_jobspec(cfg, targets, makefile='Makefile'): if platform_string() == 'windows': return [ jobset.JobSpec([ 'cmake', '--build', '.', '--target', '%s' % target, '--config', _MSBUILD_CONFIG[cfg] ], cwd=os.path.dirname(makefile), timeout_seconds=None) for target in targets ] else: if targets and makefile.startswith('cmake/build/'): # With cmake, we've passed all the build configuration in the pre-build step already return [ jobset.JobSpec( [os.getenv('MAKE', 'make'), '-j', '%d' % args.jobs] + targets, cwd='cmake/build', timeout_seconds=None) ] if targets: return [ jobset.JobSpec( [ os.getenv('MAKE', 'make'), '-f', makefile, '-j', '%d' % args.jobs, 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' % args.slowdown, 'CONFIG=%s' % cfg, 'Q=' ] + language_make_options + ([] if not args.travis else ['JENKINS_BUILD=1']) + targets, timeout_seconds=None) ] else: return [] make_targets = {} for l in languages: makefile = l.makefile_name() make_targets[makefile] = make_targets.get(makefile, set()).union( set(l.make_targets())) def build_step_environ(cfg): environ = {'CONFIG': cfg} msbuild_cfg = _MSBUILD_CONFIG.get(cfg) if msbuild_cfg: environ['MSBUILD_CONFIG'] = msbuild_cfg return environ build_steps = list( set( jobset.JobSpec(cmdline, environ=build_step_environ(build_config), timeout_seconds=_PRE_BUILD_STEP_TIMEOUT_SECONDS, flake_retries=2) for l in languages for cmdline in l.pre_build_steps())) if make_targets: make_commands = itertools.chain.from_iterable( make_jobspec(build_config, list(targets), makefile) for (makefile, targets) in make_targets.items()) build_steps.extend(set(make_commands)) build_steps.extend( set( jobset.JobSpec(cmdline, environ=build_step_environ(build_config), timeout_seconds=None) for l in languages for cmdline in l.build_steps())) post_tests_steps = list( set( jobset.JobSpec(cmdline, environ=build_step_environ(build_config)) for l in languages for cmdline in l.post_tests_steps())) runs_per_test = args.runs_per_test forever = args.forever def _shut_down_legacy_server(legacy_server_port): try: version = int( urllib.request.urlopen('http://localhost:%d/version_number' % legacy_server_port, timeout=10).read()) except: pass else: urllib.request.urlopen('http://localhost:%d/quitquitquit' % legacy_server_port).read() def _calculate_num_runs_failures(list_of_results): """Calculate number of runs and failures for a particular test. Args: list_of_results: (List) of JobResult object. Returns: A tuple of total number of runs and failures. """ num_runs = len(list_of_results) # By default, there is 1 run per JobResult. num_failures = 0 for jobresult in list_of_results: if jobresult.retries > 0: num_runs += jobresult.retries if jobresult.num_failures > 0: num_failures += jobresult.num_failures return num_runs, num_failures # _build_and_run results class BuildAndRunError(object): BUILD = object() TEST = object() POST_TEST = object() def _has_epollexclusive(): binary = 'bins/%s/check_epollexclusive' % args.config if not os.path.exists(binary): return False try: subprocess.check_call(binary) return True except subprocess.CalledProcessError as e: return False except OSError as e: # For languages other than C and Windows the binary won't exist return False # returns a list of things that failed (or an empty list on success) def _build_and_run(check_cancelled, newline_on_success, xml_report=None, build_only=False): """Do one pass of building & running tests.""" # build latest sequentially num_failures, resultset = jobset.run(build_steps, maxjobs=1, stop_on_failure=True, newline_on_success=newline_on_success, travis=args.travis) if num_failures: return [BuildAndRunError.BUILD] if build_only: if xml_report: report_utils.render_junit_xml_report( resultset, xml_report, suite_name=args.report_suite_name) return [] if not args.travis and not _has_epollexclusive() and platform_string( ) in _POLLING_STRATEGIES and 'epollex' in _POLLING_STRATEGIES[ platform_string()]: print('\n\nOmitting EPOLLEXCLUSIVE tests\n\n') _POLLING_STRATEGIES[platform_string()].remove('epollex') # start antagonists antagonists = [ subprocess.Popen(['tools/run_tests/python_utils/antagonist.py']) for _ in range(0, args.antagonists) ] start_port_server.start_port_server() resultset = None num_test_failures = 0 try: infinite_runs = runs_per_test == 0 one_run = set(spec for language in languages for spec in language.test_specs() if (re.search(args.regex, spec.shortname) and (args.regex_exclude == '' or not re.search(args.regex_exclude, spec.shortname)))) # When running on travis, we want out test runs to be as similar as possible # for reproducibility purposes. if args.travis and args.max_time <= 0: massaged_one_run = sorted(one_run, key=lambda x: x.cpu_cost) else: # whereas otherwise, we want to shuffle things up to give all tests a # chance to run. massaged_one_run = list( one_run) # random.sample needs an indexable seq. num_jobs = len(massaged_one_run) # for a random sample, get as many as indicated by the 'sample_percent' # argument. By default this arg is 100, resulting in a shuffle of all # jobs. sample_size = int(num_jobs * args.sample_percent / 100.0) massaged_one_run = random.sample(massaged_one_run, sample_size) if not isclose(args.sample_percent, 100.0): assert args.runs_per_test == 1, "Can't do sampling (-p) over multiple runs (-n)." print("Running %d tests out of %d (~%d%%)" % (sample_size, num_jobs, args.sample_percent)) if infinite_runs: assert len(massaged_one_run ) > 0, 'Must have at least one test for a -n inf run' runs_sequence = (itertools.repeat(massaged_one_run) if infinite_runs else itertools.repeat(massaged_one_run, runs_per_test)) all_runs = itertools.chain.from_iterable(runs_sequence) if args.quiet_success: jobset.message( 'START', 'Running tests quietly, only failing tests will be reported', do_newline=True) num_test_failures, resultset = jobset.run( all_runs, check_cancelled, newline_on_success=newline_on_success, travis=args.travis, maxjobs=args.jobs, maxjobs_cpu_agnostic=max_parallel_tests_for_current_platform(), stop_on_failure=args.stop_on_failure, quiet_success=args.quiet_success, max_time=args.max_time) if resultset: for k, v in sorted(resultset.items()): num_runs, num_failures = _calculate_num_runs_failures(v) if num_failures > 0: if num_failures == num_runs: # what about infinite_runs??? jobset.message('FAILED', k, do_newline=True) else: jobset.message('FLAKE', '%s [%d/%d runs flaked]' % (k, num_failures, num_runs), do_newline=True) finally: for antagonist in antagonists: antagonist.kill() if args.bq_result_table and resultset: upload_extra_fields = { 'compiler': args.compiler, 'config': args.config, 'iomgr_platform': args.iomgr_platform, 'language': args.language[ 0 ], # args.language is a list but will always have one element when uploading to BQ is enabled. 'platform': platform_string() } try: upload_results_to_bq(resultset, args.bq_result_table, upload_extra_fields) except NameError as e: logging.warning( e) # It's fine to ignore since this is not critical if xml_report and resultset: report_utils.render_junit_xml_report( resultset, xml_report, suite_name=args.report_suite_name, multi_target=args.report_multi_target) number_failures, _ = jobset.run(post_tests_steps, maxjobs=1, stop_on_failure=False, newline_on_success=newline_on_success, travis=args.travis) out = [] if number_failures: out.append(BuildAndRunError.POST_TEST) if num_test_failures: out.append(BuildAndRunError.TEST) return out if forever: success = True while True: dw = watch_dirs.DirWatcher(['src', 'include', 'test', 'examples']) initial_time = dw.most_recent_change() have_files_changed = lambda: dw.most_recent_change() != initial_time previous_success = success errors = _build_and_run(check_cancelled=have_files_changed, newline_on_success=False, build_only=args.build_only) == 0 if not previous_success and not errors: jobset.message('SUCCESS', 'All tests are now passing properly', do_newline=True) jobset.message('IDLE', 'No change detected') while not have_files_changed(): time.sleep(1) else: errors = _build_and_run(check_cancelled=lambda: False, newline_on_success=args.newline_on_success, xml_report=args.xml_report, build_only=args.build_only) if not errors: jobset.message('SUCCESS', 'All tests passed', do_newline=True) else: jobset.message('FAILED', 'Some tests failed', do_newline=True) exit_code = 0 if BuildAndRunError.BUILD in errors: exit_code |= 1 if BuildAndRunError.TEST in errors: exit_code |= 2 if BuildAndRunError.POST_TEST in errors: exit_code |= 4 sys.exit(exit_code)
37.596095
147
0.539064
7940e5b632b9146f74c807eae55b8084a5cde85a
312
py
Python
lambda-layer/src/common/constants.py
USDOT-SDC/log4sdc
718875d33fcbd54f2b8f7201d09f761e9afef038
[ "MIT" ]
null
null
null
lambda-layer/src/common/constants.py
USDOT-SDC/log4sdc
718875d33fcbd54f2b8f7201d09f761e9afef038
[ "MIT" ]
1
2021-11-19T18:18:53.000Z
2021-11-19T18:18:53.000Z
lambda-layer/src/common/constants.py
USDOT-SDC/log4sdc
718875d33fcbd54f2b8f7201d09f761e9afef038
[ "MIT" ]
null
null
null
class Constants: LOGGER_NAME = "log4sdc-common" LOGGER_LOG_LEVEL_ENV_VAR = "LOG_LEVEL" LOGGER_DEFAULT_LOG_LEVEL = "WARN" def __setattr__(self, attr, value): if hasattr(self, attr): raise Exception("Attempting to alter read-only value") self.__dict__[attr] = value
24
66
0.666667
7940e5be571d4199306b83bb35c3a271dcd3734c
164
py
Python
api/admin.py
nnamdiib/timetable-app
4184e0d860df6e98ad17d5c3d30d23bbbc15ac58
[ "MIT" ]
null
null
null
api/admin.py
nnamdiib/timetable-app
4184e0d860df6e98ad17d5c3d30d23bbbc15ac58
[ "MIT" ]
2
2020-02-11T23:43:12.000Z
2020-06-05T17:37:52.000Z
api/admin.py
nnamdiib/timetable-app
4184e0d860df6e98ad17d5c3d30d23bbbc15ac58
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import * # Register your models here. admin.site.register(Day) admin.site.register(Course) admin.site.register(Class)
23.428571
32
0.79878
7940e684f03b37e6ab1d2274d2b193edb1c6d23c
42,349
py
Python
Python/2 kyu/Evaluate Mathematical Expression/test_calc.py
newtonsspawn/codewars_challenges
62b20d4e729c8ba79eac7cae6a179af57abd45d4
[ "MIT" ]
3
2020-05-29T23:29:35.000Z
2021-08-12T03:16:44.000Z
Python/2 kyu/Evaluate Mathematical Expression/test_calc.py
newtonsspawn/codewars_challenges
62b20d4e729c8ba79eac7cae6a179af57abd45d4
[ "MIT" ]
null
null
null
Python/2 kyu/Evaluate Mathematical Expression/test_calc.py
newtonsspawn/codewars_challenges
62b20d4e729c8ba79eac7cae6a179af57abd45d4
[ "MIT" ]
3
2020-05-22T12:14:55.000Z
2021-04-15T12:52:42.000Z
from unittest import TestCase from calc import calc class TestCalc(TestCase): def test_calc_001(self): self.assertEqual(calc('2 + 3 * 4 / 3 - 6 / 3 * 3 + 8'), 8) def test_calc_002(self): self.assertEqual(calc('1 + 2 * 3 * 3 - 8'), 11) def test_calc_003(self): self.assertEqual(calc('1 + 2 * 3 * (5 - 2) - 8'), 11) def test_calc_004(self): self.assertEqual(calc('1 + 2 * 3 * (5 - (3 - 1)) - 8'), 11) def test_calc_005(self): self.assertEqual(calc('4 + -(1)'), 3) def test_calc_006(self): self.assertEqual(calc('4 - -(1)'), 5) def test_calc_007(self): self.assertEqual(calc('4 * -(1)'), -4) def test_calc_008(self): self.assertEqual(calc('4 / -(1)'), -4) def test_calc_009(self): self.assertEqual(calc('-1'), -1) def test_calc_010(self): self.assertEqual(calc('-(-1)'), 1) def test_calc_011(self): self.assertEqual(calc('-(-(-1))'), -1) def test_calc_012(self): self.assertEqual(calc('-(-(-(-1)))'), 1) def test_calc_013(self): self.assertEqual(calc('(((((-1)))))'), -1) def test_calc_014(self): self.assertEqual(calc('5 - 1'), 4) def test_calc_015(self): self.assertEqual(calc('5- 1'), 4) def test_calc_016(self): self.assertEqual(calc('5 -1'), 4) def test_calc_017(self): self.assertEqual(calc('28 + 86 - -4 / 57 - -93 + -48 * -40 / -29'), 140.86327888687237) def test_calc_018(self): self.assertEqual(calc('-18 - 96 * 48 + 23 - 2 - 88 / -71 * -33'), -4645.901408450704) def test_calc_019(self): self.assertEqual(calc('49 - -94 / -36 * 94 * 43 * -11 - -26 + 2'), 116172.22222222222) def test_calc_020(self): self.assertEqual(calc('-41 - 15 * -56 - 52 - -25 - -8 - -47 + -6'), 821) def test_calc_021(self): self.assertEqual(calc('-66 - 85 - 87 + 15 * -8 + -13 - 37 + -6'), -414) def test_calc_022(self): self.assertEqual(calc('31 + -43 * 38 * -40 / -82 + -62 + -87 / -41'), -825.9512195121952) def test_calc_023(self): self.assertEqual(calc('-74 - 61 / 36 - 18 - 4 - -63 * 16 * -23'), -23281.694444444445) def test_calc_024(self): self.assertEqual(calc('-6 * -10 + -14 - -97 / 33 / -21 / 41 * -15'), 46.05120895364798) def test_calc_025(self): self.assertEqual(calc('-84 / -7 * -3 + -31 / 7 * 52 / 27 - -40'), -4.529100529100532) def test_calc_026(self): self.assertEqual(calc('46 + 92 + -34 + 35 / -72 + -2 * 41 + 26'), 47.513888888888886) def test_calc_027(self): self.assertEqual(calc('-4 + 89 - -84 + 75 + 50 + -11 - 64 + 22'), 241) def test_calc_028(self): self.assertEqual(calc('-69 * 42 * -25 - -71 + -43 + -73 * 48 - 74'), 68900) def test_calc_029(self): self.assertEqual(calc('-70 * -44 * -75 + -38 / 22 * -84 / 2 * -54'), -234917.45454545456) def test_calc_030(self): self.assertEqual(calc('4 - -24 * 79 * -1 * -14 + 62 + 62 - -44'), 26716) def test_calc_031(self): self.assertEqual(calc('31 * 57 * 46 * 90 + -63 - 6 - -54 + -45'), 7315320) def test_calc_032(self): self.assertEqual(calc('-69 / 72 + 66 * -9 + -76 - -57 / -98 / -14'), -670.916788143829) def test_calc_033(self): self.assertEqual(calc('-91 - 22 - -53 * 19 + -19 - -16 + 30 - 5'), 916) def test_calc_034(self): self.assertEqual(calc('-40 - -47 * 3 / -2 * -85 - -11 + 76 + -44'), 5995.5) def test_calc_035(self): self.assertEqual(calc('82 + -81 * -62 - 41 * -77 - 12 * -23 + -97'), 8440) def test_calc_036(self): self.assertEqual(calc('-92 - 38 - 42 + -70 - -95 - 69 - -60 + 76'), -80) def test_calc_037(self): self.assertEqual(calc('72 * -48 * 98 - 65 + -40 / 85 - 58 + 59'), -338752.4705882353) def test_calc_038(self): self.assertEqual(calc('-74 * 45 / 25 - -1 - -66 - -47 * -44 - -37'), -2097.2) def test_calc_039(self): self.assertEqual(calc('-69 / -33 + -58 + 46 + 94 - -51 + 81 + 8'), 224.0909090909091) def test_calc_040(self): self.assertEqual(calc('-25 / -5 / -27 + -57 / 8 * 69 * 80 + -64'), -39394.18518518518) def test_calc_041(self): self.assertEqual(calc('8 * -47 + 77 + -98 / -87 / -47 - -91 - 4'), -212.0239667400342) def test_calc_042(self): self.assertEqual(calc('-21 / 31 * -73 / 73 / -93 - 69 * -54 + -97'), 3628.9927159209155) def test_calc_043(self): self.assertEqual(calc('41 / -89 / 29 * -55 * 67 / -100 * -41 * -2'), -48.00065865943432) def test_calc_044(self): self.assertEqual(calc('3 + 71 * -31 - 31 + -44 - 94 - 79 - -59'), -2387) def test_calc_045(self): self.assertEqual(calc('-9 - -96 * 80 / 56 + 89 / -43 + -25 + -91'), 10.073089700996675) def test_calc_046(self): self.assertEqual(calc('18 + -75 * 79 - 93 * -88 * 48 * 92 - -91'), 36134728) def test_calc_047(self): self.assertEqual(calc('-91 - 83 - 42 - -76 + -38 - 15 + 9 + 91'), -93) def test_calc_048(self): self.assertEqual(calc('-52 + -47 * 50 / 84 / -21 / -41 - -51 / -97'), -52.55826586774178) def test_calc_049(self): self.assertEqual(calc('70 + 35 + 7 - -20 / 68 * 82 * 71 - 48'), 1776.3529411764705) def test_calc_050(self): self.assertEqual(calc('1 / 81 + 20 * -64 / -2 - -7 / -53 + 18'), 657.8802702073142) def test_calc_051(self): self.assertEqual(calc('-63 * 27 / 62 / 81 + -45 - -87 - 83 + -74'), -115.33870967741936) def test_calc_052(self): self.assertEqual(calc('-49 + -75 / 90 - 89 * 40 / 62 / 12 * -50'), 189.41397849462365) def test_calc_053(self): self.assertEqual(calc('79 + -28 - -15 + -100 / 56 + 10 - 93 / 97'), 73.25552282768777) def test_calc_054(self): self.assertEqual(calc('40 * -29 + 27 * -71 / 11 - -73 + -3 * 65'), -1456.2727272727273) def test_calc_055(self): self.assertEqual(calc('-28 - -33 / 13 * 27 + 30 / 34 + -61 * -73'), 4494.420814479638) def test_calc_056(self): self.assertEqual(calc('-49 - 54 / -41 - -64 / 37 - 54 * 69 / -92'), -5.453197099538556) def test_calc_057(self): self.assertEqual(calc('-7 - -7 * -24 * 47 * -76 * 96 * -100 * -55'), 316850687993) def test_calc_058(self): self.assertEqual(calc('10 / -55 + -73 / 46 - 30 + 40 - -82 / -19'), 3.915435822758477) def test_calc_059(self): self.assertEqual(calc('19 - -93 - 11 + 45 / -17 + -51 / 23 * -22'), 147.13554987212277) def test_calc_060(self): self.assertEqual(calc('10 / 11 - -13 / 93 / -4 * -63 / -29 * 12'), -0.001921326726665895) def test_calc_061(self): self.assertEqual(calc('57 * -41 - -65 - -49 - 75 - -37 / 82 - 76'), -2373.548780487805) def test_calc_062(self): self.assertEqual(calc('-50 - -61 + 76 / 44 / 71 * 8 - -82 * -6'), -480.8053777208707) def test_calc_063(self): self.assertEqual(calc('-43 / 98 / 2 * 53 + 4 / 100 - -48 + 53'), 89.41244897959183) def test_calc_064(self): self.assertEqual(calc('-46 * -95 - -30 + 66 / 29 * 71 - 78 * 46'), 973.5862068965516) def test_calc_065(self): self.assertEqual(calc('-34 + 35 / -35 + -32 / -16 + -26 * 96 * -6'), 14943.0) def test_calc_066(self): self.assertEqual(calc('81 + -14 + 42 + -41 + -100 * -89 + -78 * -22'), 10684) def test_calc_067(self): self.assertEqual(calc('-29 + -56 - -53 + -46 - 76 / 24 * 22 * -6'), 339.99999999999994) def test_calc_068(self): self.assertEqual(calc('-94 + -28 + 35 + 67 + 31 - 21 - 94 - -31'), -73) def test_calc_069(self): self.assertEqual(calc('-96 * -56 / -24 - -42 - 81 + 37 + -9 * 42'), -604.0) def test_calc_070(self): self.assertEqual(calc('17 * 7 * 39 - -35 + 70 * 28 / -83 / -65'), 4676.363299351251) def test_calc_071(self): self.assertEqual(calc('-26 * 88 / 91 / 58 + -5 / -45 + -59 / 52'), -1.4570018104500861) def test_calc_072(self): self.assertEqual(calc('-66 * 28 * 32 - -20 - 50 / -52 - 88 + 39'), -59164.03846153846) def test_calc_073(self): self.assertEqual(calc('76 / 32 - 46 * 39 - 35 * 72 / 40 * -54'), 1610.375) def test_calc_074(self): self.assertEqual(calc('61 + 81 / 57 * 29 + -52 / 42 * -78 / 46'), 104.30990519777706) def test_calc_075(self): self.assertEqual(calc('-32 - 64 - -14 - 44 + 78 * 47 + -81 / -64'), 3541.265625) def test_calc_076(self): self.assertEqual(calc('-59 / -54 * 21 + 73 * 52 * 96 - 86 / 77'), 364437.82756132755) def test_calc_077(self): self.assertEqual(calc('-93 / -98 + -36 + 20 * 5 - 61 / -51 * 16'), 84.08623449379752) def test_calc_078(self): self.assertEqual(calc('12 * 51 + 33 - -7 - -60 * -54 / -88 / 7'), 657.2597402597403) def test_calc_079(self): self.assertEqual(calc('1 + -77 - 8 + 73 / -9 - 66 * -37 * 98'), 239223.88888888888) def test_calc_080(self): self.assertEqual(calc('15 + 34 - -54 / -7 / -14 - -62 * -64 - 25'), -3943.4489795918366) def test_calc_081(self): self.assertEqual(calc('-9 - 78 * -2 + 93 - -48 * 57 / 87 + 93'), 364.44827586206895) def test_calc_082(self): self.assertEqual(calc('16 + -24 - -75 / -7 + 22 * 42 / 37 * -33'), -842.8223938223938) def test_calc_083(self): self.assertEqual(calc('-60 - 68 * 17 - -77 * 31 + 83 / -35 / 18'), 1170.868253968254) def test_calc_084(self): self.assertEqual(calc('-36 - -78 * 45 * -69 * 11 - 13 + 88 + -98'), -2664149) def test_calc_085(self): self.assertEqual(calc('71 - -48 / -38 - -97 * 55 - -91 / -22 * -47'), 5599.145933014354) def test_calc_086(self): self.assertEqual(calc('-70 + -58 / 20 / -72 + -97 / 42 + -98 * -49'), 4729.730753968254) def test_calc_087(self): self.assertEqual(calc('-100 + 93 / 19 - -35 + -57 + -89 + -88 + -82'), -376.10526315789474) def test_calc_088(self): self.assertEqual(calc('52 * -84 + 94 - -64 * -26 / -66 * 3 - -16'), -4182.363636363636) def test_calc_089(self): self.assertEqual(calc('94 + -7 - 70 / 55 - -53 * 87 + 81 + -23'), 4754.727272727273) def test_calc_090(self): self.assertEqual(calc('68 * -51 / -40 / -8 * -6 - -89 + 61 * 85'), 5339.025) def test_calc_091(self): self.assertEqual(calc('75 + -95 + 85 / 3 * -39 * -88 + -49 - -63'), 97234.0) def test_calc_092(self): self.assertEqual(calc('76 / -8 - 48 + -77 / 26 * 93 + -63 / -27'), -330.58974358974365) def test_calc_093(self): self.assertEqual(calc('-24 - -19 + 15 + -61 * 59 * -56 + -28 * 99'), 198782) def test_calc_094(self): self.assertEqual(calc('-22 / 50 / 78 + -51 + -8 * 39 / 76 - -64'), 8.889095816464234) def test_calc_095(self): self.assertEqual(calc('-41 / -39 - 48 - -98 / 31 - 67 + -48 * 43'), -2174.7874276261373) def test_calc_096(self): self.assertEqual(calc('-13 * -27 - -46 * -99 - -25 - 53 - -41 + 88'), -4102) def test_calc_097(self): self.assertEqual(calc('92 - 81 - 89 + 63 * 51 / -2 + 73 * -66'), -6502.5) def test_calc_098(self): self.assertEqual(calc('-35 / -62 * -43 - 46 + -88 / 38 / -97 + -36'), -106.2503194301017) def test_calc_099(self): self.assertEqual(calc('53 + -84 * -58 / -39 - 82 + -18 * 4 + -95'), -320.9230769230769) def test_calc_100(self): self.assertEqual(calc('-71 - 24 * -19 - 34 + 65 - 89 - -52 - 41'), 338) def test_calc_101(self): self.assertEqual(calc('-62 - -38 - 14 * 54 + -92 * 4 - 70 - 66'), -1284) def test_calc_102(self): self.assertEqual(calc('60 * 82 / 72 + 81 - 65 * 40 * -91 - 7'), 236742.33333333334) def test_calc_103(self): self.assertEqual(calc('-91 + 55 - -26 + -48 / -17 - -25 + 28 * -25'), -682.1764705882352) def test_calc_104(self): self.assertEqual(calc('-10 * 15 * -25 * -7 * 99 / 55 * -3 / -1'), -141750.0) def test_calc_105(self): self.assertEqual(calc('-37 - -43 / 21 * -42 / 3 / -47 - -52 / -73'), -37.102399689109106) def test_calc_106(self): self.assertEqual(calc('73 + 38 + 64 * 44 - 6 + 38 * 81 * -25'), -74029) def test_calc_107(self): self.assertEqual(calc('-67 * -42 / -2 + -4 / -49 + 80 - 10 / -82'), -1326.7964161274267) def test_calc_108(self): self.assertEqual(calc('-28 * 23 * 61 / -2 / -90 + 42 / 27 + 11'), -205.6888888888889) def test_calc_109(self): self.assertEqual(calc('-63 / 4 - -72 / -98 * 1 - -17 / 2 + 76'), 68.01530612244898) def test_calc_110(self): self.assertEqual(calc('90 + 78 - -5 - -61 * 31 - -9 * 20 + 16'), 2260) def test_calc_111(self): self.assertEqual(calc('-92 + -10 / 71 / 95 - -7 - 4 * -77 * 69'), 21166.99851742031) def test_calc_112(self): self.assertEqual(calc('-43 / -93 * 51 - 57 / -53 * -6 * -50 * 27'), 8734.90139987827) def test_calc_113(self): self.assertEqual(calc('-41 / 90 - -41 - -76 / -32 / 8 - 4 * 82'), -287.7524305555556) def test_calc_114(self): self.assertEqual(calc('67 * 19 / 40 - -37 / -76 / -66 + -43 + -68'), -79.16762360446572) def test_calc_115(self): self.assertEqual(calc('-80 + 2 * -44 + 49 + -16 / -56 / -78 / 14'), -119.00026164311879) def test_calc_116(self): self.assertEqual(calc('-33 + 72 * 64 / 20 - 96 + -80 / 82 / -16'), 101.4609756097561) def test_calc_117(self): self.assertEqual( calc('(15) + (-29 - 71 / (27)) - (47 * ((((-81 / 52)))) * 16)'), 1154.754985754986) def test_calc_118(self): self.assertEqual( calc('-(-9) * (81 / 78 * -(98)) + (-23 + -(((-(-20 - 30)))) / 40)'), -940.1730769230769) def test_calc_119(self): self.assertEqual( calc('-(81) / (56 * -66 / -(19)) - (-9 - -((((-8 + -19)))) + -63)'), 98.5836038961039) def test_calc_120(self): self.assertEqual( calc('(-77) + (80 + 83 / (12)) + (34 * (((-(77 - -57)))) * 87)'), -396362.0833333333) def test_calc_121(self): self.assertEqual( calc('(-12) - (-2 / -36 + (2)) / (86 * ((((-86 * -9)))) + -36)'), -12.000030897600341) def test_calc_122(self): self.assertEqual( calc('(51) / (-24 + -54 * -(31)) + (-40 + (((-(9 - 44)))) - -80)'), 75.03090909090909) def test_calc_123(self): self.assertEqual( calc('(33) / (-82 / 92 - (55)) / (-38 - -(((-(-49 + 56)))) * 46)'), 0.001640088162841955) def test_calc_124(self): self.assertEqual( calc('(-72) - (-37 + -75 + (62)) + (-95 * ((((63 + 79)))) - -93)'), -13419) def test_calc_125(self): self.assertEqual( calc('-(66) + (70 - -90 - (7)) / (-96 - -((((-88 + 99)))) * 29)'), -65.31390134529148) def test_calc_126(self): self.assertEqual( calc('(100) / (60 + 6 * (100)) - (-24 / -((((34 - -74)))) / -44)'), 0.15656565656565657) def test_calc_127(self): self.assertEqual( calc('-(51) * (77 - -76 / -(46)) - (97 * (((-(-78 * 90)))) + -46)'), -684736.7391304348) def test_calc_128(self): self.assertEqual( calc('-(100) * (79 / 9 + (33)) / (77 / (((-(32 + -35)))) / 40)'), -6510.8225108225115) def test_calc_129(self): self.assertEqual(calc( '(-10) / (59 / -41 * -(91)) * (28 * -((((-80 / -16)))) + -42)'), 13.898305084745763) def test_calc_130(self): self.assertEqual(calc( '-(-73) + (-19 * 91 + (59)) - (31 - -(((-(-15 * 48)))) / -61)'), -1616.1967213114754) def test_calc_131(self): self.assertEqual( calc('(10) - (-40 * -18 / (98)) - (81 * (((-(-58 - -25)))) - 99)'), -2571.3469387755104) def test_calc_132(self): self.assertEqual( calc('-(-5) - (84 + -21 + (11)) * (-77 + -((((-6 * 53)))) / 58)'), 5297.275862068966) def test_calc_133(self): self.assertEqual( calc('(-52) - (-8 / -80 / (57)) / (-96 / (((-(62 - -84)))) * 58)'), -52.00004600221819) def test_calc_134(self): self.assertEqual( calc('-(-85) / (66 * 15 * -(14)) + (-73 * (((-(71 / 63)))) * -10)'), -822.7045454545454) def test_calc_135(self): self.assertEqual(calc( '-(-59) + (-11 / -79 - -(72)) - (-23 * (((-(77 + 56)))) - -63)'), -2990.8607594936707) def test_calc_136(self): self.assertEqual( calc('(-39) + (28 * -92 * -(22)) + (-3 / -((((78 * 5)))) * -97)'), 56632.25384615385) def test_calc_137(self): self.assertEqual( calc('(56) / (96 / -77 - (45)) * (71 - ((((-71 * 27)))) / 85)'), -113.28286502469565) def test_calc_138(self): self.assertEqual(calc( '(-31) + (-33 + -58 - (97)) + (-20 - -(((-(63 / 47)))) + -82)'), -322.3404255319149) def test_calc_139(self): self.assertEqual( calc('-(-62) * (54 - 51 / -(78)) * (85 * (((-(-24 + -36)))) - 3)'), 17271380.538461536) def test_calc_140(self): self.assertEqual( calc('-(12) / (81 + -27 / -(85)) + (58 / -((((-40 / 55)))) / 21)'), 3.650049603174603) def test_calc_141(self): self.assertEqual( calc('-(-32) * (-63 + -76 - (44)) - (-17 / ((((54 / 63)))) + 64)'), -5900.166666666667) def test_calc_142(self): self.assertEqual( calc('-(-46) / (55 * 66 * (68)) + (-8 - ((((-41 - 57)))) / 85)'), -6.846872467995463) def test_calc_143(self): self.assertEqual( calc('-(71) + (48 - 66 + -(50)) / (82 + ((((-60 + 66)))) * -100)'), -70.86872586872587) def test_calc_144(self): self.assertEqual(calc( '-(-84) * (22 * 66 + -(46)) + (-94 * -(((-(-43 + 10)))) * -3)'), 108798) def test_calc_145(self): self.assertEqual( calc('-(83) * (-73 + -87 + (18)) / (-11 * ((((13 * 42)))) / 30)'), -58.871128871128874) def test_calc_146(self): self.assertEqual( calc('(-46) / (-82 / 70 * (48)) + (59 + (((-(-11 + -68)))) - 38)'), 100.8180894308943) def test_calc_147(self): self.assertEqual(calc( '(-51) + (-42 + 92 - -(18)) / (-53 * -(((-(-16 / 45)))) + -46)'), -53.50409165302782) def test_calc_148(self): self.assertEqual( calc('-(-77) / (82 + 14 * (86)) * (-41 / ((((47 + 28)))) - 96)'), -5.780787973043028) def test_calc_149(self): self.assertEqual( calc('-(-99) / (97 + -71 - -(91)) - (-42 / ((((57 - -69)))) + 32)'), -30.82051282051282) def test_calc_150(self): self.assertEqual( calc('-(-48) - (87 * 14 / -(23)) + (-83 - (((-(72 * 19)))) / 37)'), 54.92949471210341) def test_calc_151(self): self.assertEqual( calc('(87) - (-92 * 59 + (80)) - (59 + (((-(-20 - -89)))) * 45)'), 8481) def test_calc_152(self): self.assertEqual( calc('(84) - (60 - 36 / -(88)) + (-48 - -((((-50 + -12)))) + 5)'), -81.4090909090909) def test_calc_153(self): self.assertEqual( calc('(-45) / (1 / 3 / -(54)) + (18 / ((((-100 - 35)))) * 99)'), 7276.8) def test_calc_154(self): self.assertEqual(calc( '(-62) / (-16 * -18 * -(99)) * (-80 * -((((-89 - 75)))) * -30)'), 855.8922558922559) def test_calc_155(self): self.assertEqual( calc('-(-9) + (8 / -64 * -(27)) + (70 + ((((-78 - -41)))) + 74)'), 119.375) def test_calc_156(self): self.assertEqual( calc('-(75) / (74 - -73 * -(76)) - (31 + (((-(-82 * 70)))) - 87)'), -5683.986298867373) def test_calc_157(self): self.assertEqual( calc('(-49) * (-91 + -2 * (80)) + (-52 - ((((-47 + 99)))) * 26)'), 10895) def test_calc_158(self): self.assertEqual( calc('-(-39) - (-48 / 33 / (49)) + (75 / (((-(65 + 74)))) * -40)'), 60.612418414062816) def test_calc_159(self): self.assertEqual( calc('-(-18) / (-97 / 46 * (64)) * (-51 + -(((-(-20 * 8)))) + 92)'), 15.871778350515463) def test_calc_160(self): self.assertEqual( calc('-(-19) - (37 - -15 - -(17)) - (91 - (((-(31 / 49)))) + -92)'), -49.63265306122449) def test_calc_161(self): self.assertEqual( calc('(13) / (34 / -62 * (22)) * (-30 - ((((-75 / 13)))) + -58)'), 88.60695187165776) def test_calc_162(self): self.assertEqual( calc('(-86) - (-16 + -74 / -(50)) / (88 + ((((22 * 80)))) * -3)'), -86.0027966101695) def test_calc_163(self): self.assertEqual( calc('(-13) * (55 / -63 - (50)) / (37 - (((-(2 * -17)))) * 36)'), -0.5571602412377475) def test_calc_164(self): self.assertEqual( calc('(-37) + (39 / -12 * -(13)) - (72 - ((((28 / -49)))) - -87)'), -154.32142857142856) def test_calc_165(self): self.assertEqual( calc('-(1) / (87 / -17 * -(76)) / (-57 - ((((-42 + 69)))) / -33)'), 4.576361112579463e-05) def test_calc_166(self): self.assertEqual(calc( '-(-71) * (38 * -88 / (100)) - (-26 + -(((-(88 / 11)))) - -83)'), -2439.24) def test_calc_167(self): self.assertEqual(calc( '-(-30) * (-45 + -19 * (89)) - (-81 * (((-(-89 - -13)))) / 81)'), -52004.0) def test_calc_168(self): self.assertEqual( calc('-(86) - (92 + -11 * -(69)) * (82 / -(((-(68 - 62)))) / 24)'), -570.5972222222222) def test_calc_169(self): self.assertEqual(calc( '(87) + (-23 / 25 + -(43)) / (-84 / -(((-(-91 / -94)))) + -29)'), 87.3793754152824) def test_calc_170(self): self.assertEqual( calc('-(26) + (-27 + 23 * (85)) + (70 - -((((47 * -29)))) * -39)'), 55129) def test_calc_171(self): self.assertEqual( calc('-(25) * (-66 * 33 - (5)) / (88 + (((-(-44 - 23)))) / 94)'), 615.1876723827797) def test_calc_172(self): self.assertEqual( calc('(-25) * (-75 + 44 * -(50)) * (-7 - -((((-94 * -67)))) / 31)'), 11156673.387096774) def test_calc_173(self): self.assertEqual( calc('-(55) - (-74 - -74 * (49)) + (37 - ((((-77 / -89)))) * 72)'), -3632.2921348314608) def test_calc_174(self): self.assertEqual( calc('(82) - (25 * 36 + (61)) * (65 - -((((4 + 58)))) - 56)'), -68149) def test_calc_175(self): self.assertEqual( calc('-(22) + (-11 * 20 / (28)) + (33 * ((((71 / 82)))) * -34)'), -1001.3449477351917) def test_calc_176(self): self.assertEqual( calc('(57) - (-69 / -68 + (80)) * (-8 * -((((-25 * 74)))) + -24)'), 1201019.0) def test_calc_177(self): self.assertEqual( calc('(43) + (-2 / 18 / (70)) - (93 / (((-(-85 * 95)))) - 23)'), 65.98689567054892) def test_calc_178(self): self.assertEqual( calc('-(5) / (61 * -61 * (54)) - (35 / (((-(-50 - -15)))) + 78)'), -78.99997511620731) def test_calc_179(self): self.assertEqual( calc('-(32) - (4 + 60 - -(84)) / (-16 * ((((79 - -92)))) - -21)'), -31.94548802946593) def test_calc_180(self): self.assertEqual( calc('-(64) / (-58 + -63 / -(2)) + (96 + -(((-(58 - 2)))) - -40)'), 194.41509433962264) def test_calc_181(self): self.assertEqual(calc( '-(-62) / (-57 + -63 * (2)) / (-82 + -(((-(64 - 83)))) * -73)'), -0.0002596151833008814) def test_calc_182(self): self.assertEqual(calc( '-(6) * (-69 + -32 * -(13)) * (68 + -(((-(-40 + -55)))) + 35)'), -16656) def test_calc_183(self): self.assertEqual( calc('(83) + (-96 * -20 / -(48)) / (-73 - -((((21 / 1)))) + 83)'), 81.70967741935483) def test_calc_184(self): self.assertEqual( calc('-(-21) / (65 + -60 - -(51)) / (96 - ((((-12 - 68)))) - -50)'), 0.00165929203539823) def test_calc_185(self): self.assertEqual( calc('-(2) * (69 * 15 + -(6)) - (66 / -(((-(67 * 4)))) * -90)'), -2035.8358208955224) def test_calc_186(self): self.assertEqual( calc('(-15) * (-58 * 29 + -(64)) - (-66 / ((((-74 / 83)))) - -95)'), 26020.972972972973) def test_calc_187(self): self.assertEqual(calc( '-(17) * (-74 - -83 + -(20)) + (-88 / -((((-34 - 99)))) / -19)'), 187.0348239018599) def test_calc_188(self): self.assertEqual( calc('-(28) / (-22 / 95 - -(53)) - (69 - -((((46 / -10)))) * 94)'), 362.8693796130062) def test_calc_189(self): self.assertEqual( calc('(60) + (37 + 78 / -(25)) / (-54 + -(((-(-56 - -81)))) * 25)'), 60.05933450087566) def test_calc_190(self): self.assertEqual(calc( '-(25) / (-86 - -72 - (55)) / (-48 + -(((-(24 - 66)))) + -21)'), -0.0032641336989163074) def test_calc_191(self): self.assertEqual( calc('-(45) * (-95 + -46 * -(78)) * (-39 / (((-(35 / 15)))) * 82)'), -215433269.99999997) def test_calc_192(self): self.assertEqual( calc('(-53) * (14 - 18 - -(70)) * (61 + ((((19 / -13)))) * -5)'), -238940.3076923077) def test_calc_193(self): self.assertEqual(calc( '(-74) + (-13 / -100 / (30)) - (-74 + ((((-16 - -32)))) - 28)'), 12.004333333333335) def test_calc_194(self): self.assertEqual( calc('-(76) * (66 - 76 + (23)) * (70 * (((-(-15 + -48)))) / 6)'), -726180.0) def test_calc_195(self): self.assertEqual( calc('(91) + (19 * 75 * (65)) + (-43 + -(((-(-54 + 10)))) / -39)'), 92674.1282051282) def test_calc_196(self): self.assertEqual(calc( '-(-21) + (28 / -32 - (54)) / (26 * -(((-(-17 * -54)))) / 28)'), 20.93562510474275) def test_calc_197(self): self.assertEqual( calc('(-47) / (-97 * -59 * (90)) + (90 + (((-(56 * 76)))) * 9)'), -38214.000091249734) def test_calc_198(self): self.assertEqual( calc('(-44) - (-16 + -94 / (29)) * (24 * -(((-(-9 / 79)))) / -1)'), 8.609340899170661) def test_calc_199(self): self.assertEqual( calc('-(85) * (-41 / -26 - -(42)) + (50 / -((((65 / 23)))) / 100)'), -3704.215384615385) def test_calc_200(self): self.assertEqual(calc( '-(40) * (13 * 93 + -(78)) * (-38 * -(((-(-34 * 79)))) - -12)'), -4618099200) def test_calc_201(self): self.assertEqual( calc('(7) - (73 + 25 * (7)) / (20 + ((((-40 + 97)))) + 29)'), 4.660377358490566) def test_calc_202(self): self.assertEqual( calc('(54) + (13 / -50 * (29)) - (-64 - -(((-(-34 * 52)))) / -50)'), 145.82) def test_calc_203(self): self.assertEqual( calc('(-53) + (100 * -46 - -(28)) * (91 * (((-(-17 - 47)))) / 96)'), -277421.0) def test_calc_204(self): self.assertEqual( calc('(30) - (67 * 13 * -(97)) + (-24 - ((((-88 / 99)))) * -31)'), 84465.44444444444) def test_calc_205(self): self.assertEqual( calc('-(95) - (-40 + -44 * (77)) / (32 - -((((77 - 82)))) * -8)'), -47.388888888888886) def test_calc_206(self): self.assertEqual(calc( '-(-97) * (-97 - -86 * -(23)) * (-46 + ((((-69 - 44)))) / -37)'), 8643945.27027027) def test_calc_207(self): self.assertEqual( calc('(-13) + (9 / 14 / (54)) - (-29 - -((((-48 / 38)))) + 10)'), 7.275062656641605) def test_calc_208(self): self.assertEqual( calc('(-40) - (-85 * 22 - (78)) - (2 - (((-(-19 * 62)))) + 60)'), 3024) def test_calc_209(self): self.assertEqual( calc('-(-38) * (8 - 21 * (98)) + (75 - -(((-(-25 + -38)))) * -97)'), -83936) def test_calc_210(self): self.assertEqual(calc( '(-3) * (-58 * 17 / (40)) * (-84 / -(((-(-42 + -70)))) * -69)'), -3826.9124999999995) def test_calc_211(self): self.assertEqual( calc('-(1) / (-20 / -53 * -(49)) + (-79 + ((((-57 - 9)))) - -5)'), -139.94591836734693) def test_calc_212(self): self.assertEqual( calc('-(20) * (-38 - -76 + (96)) + (-18 + (((-(69 + -73)))) / 60)'), -2697.9333333333334) def test_calc_213(self): self.assertEqual( calc('-(69) * (28 + -76 * (56)) + (90 + -(((-(100 - 2)))) / 61)'), 291823.60655737703) def test_calc_214(self): self.assertEqual(calc( '-(-86) - (64 + 14 / (22)) + (-73 * -(((-(-44 / -80)))) * -20)'), 824.3636363636365) def test_calc_215(self): self.assertEqual(calc( '(-82) / (-3 / 40 * (95)) / (-53 - -(((-(-29 * -20)))) * -12)'), 0.001666247564763944) def test_calc_216(self): self.assertEqual( calc('-(-85) * (31 - -16 * (69)) * (75 * -((((36 - -33)))) / -32)'), 15601816.40625) def test_calc_217(self): self.assertEqual(calc('40- 10- 8- -72'), 94) def test_calc_218(self): self.assertEqual(calc('-33- 31- 18- 54'), -136) def test_calc_219(self): self.assertEqual(calc('-75- -37- 62- 50'), -150) def test_calc_220(self): self.assertEqual(calc('-59- -28- 6- 8'), -45) def test_calc_221(self): self.assertEqual(calc('62- -57- -78- -95'), 292) def test_calc_222(self): self.assertEqual(calc('-15- 94- 60- 4'), -173) def test_calc_223(self): self.assertEqual(calc('92- -19- 22- 36'), 53) def test_calc_224(self): self.assertEqual(calc('4- 8- 53- -36'), -21) def test_calc_225(self): self.assertEqual(calc('21- -71- 51- 80'), -39) def test_calc_226(self): self.assertEqual(calc('-12- -11- 66- -70'), 3) def test_calc_227(self): self.assertEqual(calc('50- 80- 27- -11'), -46) def test_calc_228(self): self.assertEqual(calc('26- 49- -72- 70'), -21) def test_calc_229(self): self.assertEqual(calc('40- 36- -48- 100'), -48) def test_calc_230(self): self.assertEqual(calc('-79- -58- -35- 67'), -53) def test_calc_231(self): self.assertEqual(calc('-2- -74- 6- 89'), -23) def test_calc_232(self): self.assertEqual(calc('-31- -85- 36- -51'), 69) def test_calc_233(self): self.assertEqual(calc('74- -32- 24- -1'), 83) def test_calc_234(self): self.assertEqual(calc('34- -99- 49- -9'), 93) def test_calc_235(self): self.assertEqual(calc('41- 51- -19- -10'), 19) def test_calc_236(self): self.assertEqual(calc('-76- -26- 19- 77'), -146) def test_calc_237(self): self.assertEqual(calc('48- -51- 22- -16'), 93) def test_calc_238(self): self.assertEqual(calc('-13- 96- -90- -63'), 44) def test_calc_239(self): self.assertEqual(calc('32- -24- -62- 80'), 38) def test_calc_240(self): self.assertEqual(calc('49- 63- 5- -48'), 29) def test_calc_241(self): self.assertEqual(calc('23- -22- 88- -25'), -18) def test_calc_242(self): self.assertEqual(calc('59- -85- 7- 41'), 96) def test_calc_243(self): self.assertEqual(calc('-93- 57- -31- -92'), -27) def test_calc_244(self): self.assertEqual(calc('-73- -5- 21- 79'), -168) def test_calc_245(self): self.assertEqual(calc('-78- -48- 53- 94'), -177) def test_calc_246(self): self.assertEqual(calc('-51- -20- 72- 41'), -144) def test_calc_247(self): self.assertEqual(calc('-47- -61- 20- 32'), -38) def test_calc_248(self): self.assertEqual(calc('-75- -69- -32- -40'), 66) def test_calc_249(self): self.assertEqual(calc('-11- -11- 5- 15'), -20) def test_calc_250(self): self.assertEqual(calc('-3- -64- -27- -13'), 101) def test_calc_251(self): self.assertEqual(calc('21- -52- 7- -38'), 104) def test_calc_252(self): self.assertEqual(calc('-11- 78- 31- -81'), -39) def test_calc_253(self): self.assertEqual(calc('-4- 75- -23- -54'), -2) def test_calc_254(self): self.assertEqual(calc('-84- 50- -60- 34'), -108) def test_calc_255(self): self.assertEqual(calc('94- -10- -41- 87'), 58) def test_calc_256(self): self.assertEqual(calc('-23- -8- 34- -100'), 51) def test_calc_257(self): self.assertEqual(calc('63- -70- 23- 14'), 96) def test_calc_258(self): self.assertEqual(calc('67- -75- -38- 23'), 157) def test_calc_259(self): self.assertEqual(calc('52- 6- 58- 24'), -36) def test_calc_260(self): self.assertEqual(calc('-95- 40- 94- -72'), -157) def test_calc_261(self): self.assertEqual(calc('-55- 17- 36- 60'), -168) def test_calc_262(self): self.assertEqual(calc('-100- 27- 7- 19'), -153) def test_calc_263(self): self.assertEqual(calc('-78- -14- -49- 74'), -89) def test_calc_264(self): self.assertEqual(calc('-52- 76- 43- 48'), -219) def test_calc_265(self): self.assertEqual(calc('-27- 45- 28- -67'), -33) def test_calc_266(self): self.assertEqual(calc('-64- 18- 38- 97'), -217) def test_calc_267(self): self.assertEqual(calc('48- 34- -55- -64'), 133) def test_calc_268(self): self.assertEqual(calc('-35- 80- -94- 33'), -54) def test_calc_269(self): self.assertEqual(calc('-37- 38- 74- -6'), -143) def test_calc_270(self): self.assertEqual(calc('53- -17- -55- -26'), 151) def test_calc_271(self): self.assertEqual(calc('-29- 23- 57- -80'), -29) def test_calc_272(self): self.assertEqual(calc('-31- -61- 25- -6'), 11) def test_calc_273(self): self.assertEqual(calc('-28- -57- 69- -76'), 36) def test_calc_274(self): self.assertEqual(calc('32- -84- -32- -20'), 168) def test_calc_275(self): self.assertEqual(calc('-86- -24- -97- -32'), 67) def test_calc_276(self): self.assertEqual(calc('69- 54- -83- -41'), 139) def test_calc_277(self): self.assertEqual(calc('-99- -98- -56- -10'), 65) def test_calc_278(self): self.assertEqual(calc('-14- 22- -82- -32'), 78) def test_calc_279(self): self.assertEqual(calc('-83- 5- -49- 38'), -77) def test_calc_280(self): self.assertEqual(calc('49- 33- -25- 93'), -52) def test_calc_281(self): self.assertEqual(calc('5- -99- -94- -7'), 205) def test_calc_282(self): self.assertEqual(calc('-9- -41- -9- -99'), 140) def test_calc_283(self): self.assertEqual(calc('5- 40- 46- 35'), -116) def test_calc_284(self): self.assertEqual(calc('-96- 45- -12- -45'), -84) def test_calc_285(self): self.assertEqual(calc('-92- -54- -25- 87'), -100) def test_calc_286(self): self.assertEqual(calc('-25- 40- 47- -48'), -64) def test_calc_287(self): self.assertEqual(calc('27- -75- -67- -57'), 226) def test_calc_288(self): self.assertEqual(calc('24- 46- -94- 82'), -10) def test_calc_289(self): self.assertEqual(calc('77- -6- 62- 95'), -74) def test_calc_290(self): self.assertEqual(calc('27- 95- 96- -84'), -80) def test_calc_291(self): self.assertEqual(calc('23- -9- -48- -2'), 82) def test_calc_292(self): self.assertEqual(calc('84- 73- 26- 93'), -108) def test_calc_293(self): self.assertEqual(calc('30- 67- 88- -59'), -66) def test_calc_294(self): self.assertEqual(calc('17- 48- 23- 70'), -124) def test_calc_295(self): self.assertEqual(calc('-70- 37- -67- 76'), -116) def test_calc_296(self): self.assertEqual(calc('-64- -49- -41- 94'), -68) def test_calc_297(self): self.assertEqual(calc('4- 54- -86- -33'), 69) def test_calc_298(self): self.assertEqual(calc('-42- 61- 72- 39'), -214) def test_calc_299(self): self.assertEqual(calc('13- -52- -69- 96'), 38) def test_calc_300(self): self.assertEqual(calc('81- 15- -5- -13'), 84) def test_calc_301(self): self.assertEqual(calc('88- -66- 53- 10'), 91) def test_calc_302(self): self.assertEqual(calc('-60- -96- 52- 55'), -71) def test_calc_303(self): self.assertEqual(calc('-7- -18- -54- -19'), 84) def test_calc_304(self): self.assertEqual(calc('73- -47- -59- 60'), 119) def test_calc_305(self): self.assertEqual(calc('-43- 7- -64- 17'), -3) def test_calc_306(self): self.assertEqual(calc('5- 41- -44- -2'), 10) def test_calc_307(self): self.assertEqual(calc('31- -83- 69- 81'), -36) def test_calc_308(self): self.assertEqual(calc('37- -73- 49- -53'), 114) def test_calc_309(self): self.assertEqual(calc('33- 8- -47- -60'), 132) def test_calc_310(self): self.assertEqual(calc('14- 93- 82- -4'), -157) def test_calc_311(self): self.assertEqual(calc('-9- -32- -26- 21'), 28) def test_calc_312(self): self.assertEqual(calc('-32- 33- 10- -26'), -49) def test_calc_313(self): self.assertEqual(calc('89- -81- 5- 1'), 164) def test_calc_314(self): self.assertEqual(calc('25- 59- 22- 94'), -150) def test_calc_315(self): self.assertEqual(calc('24- -86- -61- -28'), 199) def test_calc_316(self): self.assertEqual(calc('-1- -44- 45- 62'), -64)
34.097424
80
0.454509
7940e6cad1672aa487f8ed6c103179a0622ce4b6
2,050
py
Python
acurl/tests/test_to_curl.py
markgreene74/mite
339bdfc39be30534ea2169d8257469bd0ff535fb
[ "MIT" ]
17
2019-11-14T22:32:56.000Z
2022-02-01T15:38:03.000Z
acurl/tests/test_to_curl.py
markgreene74/mite
339bdfc39be30534ea2169d8257469bd0ff535fb
[ "MIT" ]
35
2020-01-08T10:50:31.000Z
2022-02-17T17:00:34.000Z
acurl/tests/test_to_curl.py
markgreene74/mite
339bdfc39be30534ea2169d8257469bd0ff535fb
[ "MIT" ]
4
2019-11-14T14:48:18.000Z
2020-05-06T22:09:25.000Z
import pytest from helpers import create_request import acurl def test_to_curl(): r = create_request("GET", "http://foo.com") assert r.to_curl() == "curl -X GET http://foo.com" def test_to_curl_headers(): r = create_request( "GET", "http://foo.com", headers=("Foo: bar", "My-Header: is-awesome") ) assert ( r.to_curl() == "curl -X GET -H 'Foo: bar' -H 'My-Header: is-awesome' http://foo.com" ) def test_to_curl_cookies(): r = create_request( "GET", "http://foo.com", cookies=(acurl._Cookie(False, "foo.com", True, "/", False, 0, "123", "456"),), ) assert r.to_curl() == "curl -X GET --cookie 123=456 http://foo.com" def test_to_curl_multiple_cookies(): r = create_request( "GET", "http://foo.com", cookies=( acurl._Cookie(False, "foo.com", True, "/", False, 0, "123", "456"), acurl._Cookie(False, "foo.com", True, "/", False, 0, "789", "abc"), ), ) assert r.to_curl() == "curl -X GET --cookie '123=456;789=abc' http://foo.com" @pytest.mark.skip(reason="unimplemented") def test_to_curl_cookies_wrong_domain(): # I'm not sure if this is a valid test case...Request objects should # probably only be constructed via Session.request, which always creates # cookies for the domain of the request. So the case this is exercising # won't ever happen. r = create_request( "GET", "http://foo.com", cookies=( acurl._Cookie( False, "bar.com", # The domain doesn't match, the cookie should not be passed True, "/", False, 0, "123", "456", ), ), ) assert r.to_curl() == "curl -X GET http://foo.com" def test_to_curl_auth(): r = create_request("GET", "http://foo.com", auth=("user", "pass")) assert r.to_curl() == "curl -X GET --user user:pass http://foo.com"
28.873239
87
0.540976
7940e70c7114480e2b25391b63da5ddfa8250971
6,690
py
Python
kubernetes/client/models/v1beta1_custom_resource_definition_list.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1beta1_custom_resource_definition_list.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1beta1_custom_resource_definition_list.py
anemerovsky-essextec/python
6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1beta1CustomResourceDefinitionList(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'api_version': 'str', 'items': 'list[V1beta1CustomResourceDefinition]', 'kind': 'str', 'metadata': 'V1ListMeta' } attribute_map = { 'api_version': 'apiVersion', 'items': 'items', 'kind': 'kind', 'metadata': 'metadata' } def __init__(self, api_version=None, items=None, kind=None, metadata=None): """ V1beta1CustomResourceDefinitionList - a model defined in Swagger """ self._api_version = None self._items = None self._kind = None self._metadata = None self.discriminator = None if api_version is not None: self.api_version = api_version self.items = items if kind is not None: self.kind = kind if metadata is not None: self.metadata = metadata @property def api_version(self): """ Gets the api_version of this V1beta1CustomResourceDefinitionList. APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources :return: The api_version of this V1beta1CustomResourceDefinitionList. :rtype: str """ return self._api_version @api_version.setter def api_version(self, api_version): """ Sets the api_version of this V1beta1CustomResourceDefinitionList. APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources :param api_version: The api_version of this V1beta1CustomResourceDefinitionList. :type: str """ self._api_version = api_version @property def items(self): """ Gets the items of this V1beta1CustomResourceDefinitionList. Items individual CustomResourceDefinitions :return: The items of this V1beta1CustomResourceDefinitionList. :rtype: list[V1beta1CustomResourceDefinition] """ return self._items @items.setter def items(self, items): """ Sets the items of this V1beta1CustomResourceDefinitionList. Items individual CustomResourceDefinitions :param items: The items of this V1beta1CustomResourceDefinitionList. :type: list[V1beta1CustomResourceDefinition] """ if items is None: raise ValueError("Invalid value for `items`, must not be `None`") self._items = items @property def kind(self): """ Gets the kind of this V1beta1CustomResourceDefinitionList. Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds :return: The kind of this V1beta1CustomResourceDefinitionList. :rtype: str """ return self._kind @kind.setter def kind(self, kind): """ Sets the kind of this V1beta1CustomResourceDefinitionList. Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds :param kind: The kind of this V1beta1CustomResourceDefinitionList. :type: str """ self._kind = kind @property def metadata(self): """ Gets the metadata of this V1beta1CustomResourceDefinitionList. :return: The metadata of this V1beta1CustomResourceDefinitionList. :rtype: V1ListMeta """ return self._metadata @metadata.setter def metadata(self, metadata): """ Sets the metadata of this V1beta1CustomResourceDefinitionList. :param metadata: The metadata of this V1beta1CustomResourceDefinitionList. :type: V1ListMeta """ self._metadata = metadata def to_dict(self): """ Returns the model properties as a dict """ result = {} for attr, _ in iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value return result def to_str(self): """ Returns the string representation of the model """ return pformat(self.to_dict()) def __repr__(self): """ For `print` and `pprint` """ return self.to_str() def __eq__(self, other): """ Returns true if both objects are equal """ if not isinstance(other, V1beta1CustomResourceDefinitionList): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """ Returns true if both objects are not equal """ return not self == other
31.857143
281
0.625411
7940ebb43087fee2dc062c5637d43fd3569d3fea
2,366
py
Python
ulfs/gumbel.py
asappresearch/neural-ilm
fd7e09960525391f4084a5753429deabd7ff00aa
[ "MIT" ]
null
null
null
ulfs/gumbel.py
asappresearch/neural-ilm
fd7e09960525391f4084a5753429deabd7ff00aa
[ "MIT" ]
null
null
null
ulfs/gumbel.py
asappresearch/neural-ilm
fd7e09960525391f4084a5753429deabd7ff00aa
[ "MIT" ]
2
2021-02-25T04:42:14.000Z
2021-02-25T04:43:06.000Z
import torch from torch.autograd import Variable import torch.nn.functional as F def sample_gumbel(shape, eps=1e-10): """ Sample from Gumbel(0, 1) based on https://github.com/ericjang/gumbel-softmax/blob/3c8584924603869e90ca74ac20a6a03d99a91ef9/Categorical%20VAE.ipynb , (MIT license) """ U = torch.rand(shape).float() return - torch.log(eps - torch.log(U + eps)) def gumbel_softmax_sample(logits, tau, eps=1e-10): """ Draw a sample from the Gumbel-Softmax distribution based on https://github.com/ericjang/gumbel-softmax/blob/3c8584924603869e90ca74ac20a6a03d99a91ef9/Categorical%20VAE.ipynb (MIT license) """ dims = len(logits.size()) gumbel_noise = sample_gumbel(logits.size(), eps=eps) y = logits + Variable(gumbel_noise) res = F.softmax(y / tau) return res def gumbel_softmax(logits, tau, hard, eps=1e-10): """ Sample from the Gumbel-Softmax distribution and optionally discretize. Args: logits: [batch_size, n_class] unnormalized log-probs tau: non-negative scalar temperature hard: if True, take argmax, but differentiate w.r.t. soft sample y Returns: [batch_size, n_class] sample from the Gumbel-Softmax distribution. If hard=True, then the returned sample will be one-hot, otherwise it will be a probability distribution that sums to 1 across classes Constraints: - this implementation only works on batch_size x num_features tensor for now based on https://github.com/ericjang/gumbel-softmax/blob/3c8584924603869e90ca74ac20a6a03d99a91ef9/Categorical%20VAE.ipynb , (MIT license) """ shape = logits.size() assert len(shape) == 2 y_soft = gumbel_softmax_sample(logits, tau=tau, eps=eps) if hard: _, k = y_soft.data.max(-1) # this bit is based on # https://discuss.pytorch.org/t/stop-gradients-for-st-gumbel-softmax/530/5 y_hard = torch.FloatTensor(*shape).zero_().scatter_(-1, k.view(-1, 1), 1.0) # this cool bit of code achieves two things: # - makes the output value exactly one-hot (since we add then # subtract y_soft value) # - makes the gradient equal to y_soft gradient (since we strip # all other gradients) y = Variable(y_hard - y_soft.data) + y_soft else: y = y_soft return y
36.4
118
0.681319
7940ebd0885aea30f08ccb8bf1bdb86250de6fd7
6,450
py
Python
llvm/utils/lit/lit/TestingConfig.py
vusec/typesan
831ca2af1a629e8ea93bb8c5b4215f12247b595c
[ "Apache-2.0" ]
30
2016-09-06T06:58:43.000Z
2021-12-23T11:59:38.000Z
llvm/utils/lit/lit/TestingConfig.py
vusec/typesan
831ca2af1a629e8ea93bb8c5b4215f12247b595c
[ "Apache-2.0" ]
1
2018-05-15T00:55:37.000Z
2018-05-15T00:55:37.000Z
llvm/utils/lit/lit/TestingConfig.py
vusec/typesan
831ca2af1a629e8ea93bb8c5b4215f12247b595c
[ "Apache-2.0" ]
17
2016-10-24T06:08:16.000Z
2022-02-18T17:27:14.000Z
import os import sys OldPy = sys.version_info[0] == 2 and sys.version_info[1] < 7 class TestingConfig: """" TestingConfig - Information on the tests inside a suite. """ @staticmethod def fromdefaults(litConfig): """ fromdefaults(litConfig) -> TestingConfig Create a TestingConfig object with default values. """ # Set the environment based on the command line arguments. environment = { 'PATH' : os.pathsep.join(litConfig.path + [os.environ.get('PATH','')]), 'LLVM_DISABLE_CRASH_REPORT' : '1', } pass_vars = ['LIBRARY_PATH', 'LD_LIBRARY_PATH', 'SYSTEMROOT', 'TERM', 'LD_PRELOAD', 'ASAN_OPTIONS', 'UBSAN_OPTIONS', 'LSAN_OPTIONS', 'ADB', 'ANDROID_SERIAL'] for var in pass_vars: val = os.environ.get(var, '') # Check for empty string as some variables such as LD_PRELOAD cannot be empty # ('') for OS's such as OpenBSD. if val: environment[var] = val if sys.platform == 'win32': environment.update({ 'INCLUDE' : os.environ.get('INCLUDE',''), 'PATHEXT' : os.environ.get('PATHEXT',''), 'PYTHONUNBUFFERED' : '1', 'TEMP' : os.environ.get('TEMP',''), 'TMP' : os.environ.get('TMP',''), }) # The option to preserve TEMP, TMP, and TMPDIR. # This is intended to check how many temporary files would be generated # (and be not cleaned up) in automated builders. if 'LIT_PRESERVES_TMP' in os.environ: environment.update({ 'TEMP' : os.environ.get('TEMP',''), 'TMP' : os.environ.get('TMP',''), 'TMPDIR' : os.environ.get('TMPDIR',''), }) # Set the default available features based on the LitConfig. available_features = [] if litConfig.useValgrind: available_features.append('valgrind') if litConfig.valgrindLeakCheck: available_features.append('vg_leak') return TestingConfig(None, name = '<unnamed>', suffixes = set(), test_format = None, environment = environment, substitutions = [], unsupported = False, test_exec_root = None, test_source_root = None, excludes = [], available_features = available_features, pipefail = True) def load_from_path(self, path, litConfig): """ load_from_path(path, litConfig) Load the configuration module at the provided path into the given config object. """ # Load the config script data. data = None if not OldPy: f = open(path) try: data = f.read() except: litConfig.fatal('unable to load config file: %r' % (path,)) f.close() # Execute the config script to initialize the object. cfg_globals = dict(globals()) cfg_globals['config'] = self cfg_globals['lit_config'] = litConfig cfg_globals['__file__'] = path try: if OldPy: execfile(path, cfg_globals) else: exec(compile(data, path, 'exec'), cfg_globals, None) if litConfig.debug: litConfig.note('... loaded config %r' % path) except SystemExit: e = sys.exc_info()[1] # We allow normal system exit inside a config file to just # return control without error. if e.args: raise except: import traceback litConfig.fatal( 'unable to parse config file %r, traceback: %s' % ( path, traceback.format_exc())) self.finish(litConfig) def __init__(self, parent, name, suffixes, test_format, environment, substitutions, unsupported, test_exec_root, test_source_root, excludes, available_features, pipefail, limit_to_features = [], is_early = False): self.parent = parent self.name = str(name) self.suffixes = set(suffixes) self.test_format = test_format self.environment = dict(environment) self.substitutions = list(substitutions) self.unsupported = unsupported self.test_exec_root = test_exec_root self.test_source_root = test_source_root self.excludes = set(excludes) self.available_features = set(available_features) self.pipefail = pipefail # This list is used by TestRunner.py to restrict running only tests that # require one of the features in this list if this list is non-empty. # Configurations can set this list to restrict the set of tests to run. self.limit_to_features = set(limit_to_features) # Whether the suite should be tested early in a given run. self.is_early = bool(is_early) def finish(self, litConfig): """finish() - Finish this config object, after loading is complete.""" self.name = str(self.name) self.suffixes = set(self.suffixes) self.environment = dict(self.environment) self.substitutions = list(self.substitutions) if self.test_exec_root is not None: # FIXME: This should really only be suite in test suite config # files. Should we distinguish them? self.test_exec_root = str(self.test_exec_root) if self.test_source_root is not None: # FIXME: This should really only be suite in test suite config # files. Should we distinguish them? self.test_source_root = str(self.test_source_root) self.excludes = set(self.excludes) @property def root(self): """root attribute - The root configuration for the test suite.""" if self.parent is None: return self else: return self.parent.root
38.622754
89
0.545116
7940ec0266e43981dcef61d5fcd769a14fe8f985
5,780
py
Python
datamanager/transforms.py
nielswart/inetbfa-data-conversion
bf2a28c19608babe32846036122584a1dccd34a1
[ "Apache-2.0" ]
1
2016-03-03T10:32:47.000Z
2016-03-03T10:32:47.000Z
datamanager/transforms.py
nielswart/inetbfa-data-conversion
bf2a28c19608babe32846036122584a1dccd34a1
[ "Apache-2.0" ]
null
null
null
datamanager/transforms.py
nielswart/inetbfa-data-conversion
bf2a28c19608babe32846036122584a1dccd34a1
[ "Apache-2.0" ]
null
null
null
import pandas as pd import numpy as np from functools import partial from os import path from datamanager.envs import MASTER_DATA_PATH ''' This module contains equity indicator and transformation functions for time series data based on pandas DataFrame's ''' def calc_booktomarket(close, bookvalue): ''' ''' # should forward fill - the book-value made known at a certain date is valid for the next year / or until the next book value is available bookval = bookvalue.ffill() b2m = bookval / close return b2m def detrended_oscillator(close): ''' Calculate the detrended oscillator ''' ma20 = partial(moving_avg, days=20) ma50 = partial(moving_avg, days=50) max20 = partial(max, period = 20) ixlr = index_log_returns(close) assert isinstance(ixlr.index, pd.DatetimeIndex) sma = ma20(ixlr) lma = ma50(ixlr) maximum = max20(ixlr) do = (sma - lma) / maximum return do def resample_monthly(data, how = 'last'): ''' Resample the data to a monthly frequency using a specific aggregation function ''' if(how == 'sum'): return data.resample('M').sum() elif(how == 'mean'): return data.resample('M').mean() return data.resample('M').last() def moving_avg(data, days, min_days = None): ''' Calculate the moving average of the daily data Parameters --------- data : pandas.DataFrame days : int min_days : int Returns ----------- ''' return pd.rolling_mean(data, days, min_periods=min_days, freq='D') def momentum_monthly(close, start_lag, end_lag): ''' Calculate the momentum from monthly closing prices Parameters ----- close : pandas.DataFrame The closing prices to calculate the momentum from (columns are security identifiers and the index is a time series index) start_lag : int the starting month to calculate the momentum from relative to the newest (most recent) month in the data set (0). E.g. -12 is 12 months ago -1 is one month ago end_lag : int the ending month to calculate the momentum to relative to the most recent month. Returns ---------- momentum : pandas.DataFrame The price momentum ''' assert close.index.freq == "M" # shift dates to align and calculate momentum mom = np.log(close.shift(end_lag)) - np.log(close.shift(start_lag)) return mom def earnings_momentum(ey, close, start_lag, end_lag): ''' Calculate the momentum in the fundamental earnings of the company derived from the EY and the closing price ''' def pead_momentum(announcements, close): ''' Calculate the price momentum from the most recent earnings announcement normalised to annualised returns Parameters ----------- announcements : pandas.DataFraem close : pandas.DataFrame Returns ----------- ''' assert len(announcements.index) == len(close.index) assert len(announcements.columns) == len(close.columns) # make 1 at every earnings announcement anndays = announcements.applymap(lambda x: 0 if np.isnan(x) else 1) ann_data = anndays.as_matrix() last_ann_price = close * anndays last_ann_price = last_ann_price.applymap(lambda x: np.NaN if x == 0 else x) last_ann_price = last_ann_price.ffill() # convert this to util function taking a predicate days_since_data = np.ndarray([len(anndays.index), len(anndays.columns)]) col = 0 ann_data = anndays.as_matrix() for ticker in anndays.columns: days_since = 0 row = 0 for day in anndays.index: if (ann_data[row, col] == 1): days_since = 1.0 else: days_since += 1.0 days_since_data[row, col] = days_since row += 1 col += 1 # calculate returns dsdf = pd.DataFrame(days_since_data, index = anndays.index, columns = anndays.columns) norm_factor = 252.0 / dsdf norm_mom = (np.log(close) - np.log(last_ann_price)) * norm_factor return norm_mom def earnings_surprise(announcements, close): ''' Calculate the earnings surprise defined as the the cumulative return after a company earnings announcement for the days 0-2 Returns ----- surprise : pandas.DataFrame The cumulative return (surprise) values on the announcement days (index) - all NaN rows removed ''' ea = announcements.dropna(how='all') # calculate the log returns logret = log_returns(close.drop_na(how='all')) # calculate the 3 day rolling sum of returns sum3day = pd.rolling_sum(logret.shift(-2), 3) # get the 3 day sum - the surprise ann = ea.applymap(lambda val: 0 if np.isnan(val) else 1) return ann * sum3day def earnings_surprise_changes(announcements, close): ''' Calculates the change in earnings suprises by comparing an earnings surprise to a previous surprise ''' # calculate the earnings surprise surprise = earnings_surprise(announcements, close) filled = surprise.ffill() diffd = filled.diff() def earnings_surprise_change_momentum(announcements, close): ''' Calculate the price momentum since the most recent earnings surprise change normalised to annualised returns ''' def log_returns(data): ''' Parameters ----- :window Pandas DataFrame :returns Pandas DataFrame ''' assert data.index.freq == "Day" ret = np.log(data) - np.log(data.tshift(1)) return ret def index_log_returns(price): logret = log_returns(price) logret.dropna(how = 'all', inplace=True) return np.exp(logret.cumsum())*100
27.393365
167
0.651903
7940ed61e5165e294c0f3f71db4e8d7275b733a8
645
py
Python
backend/manage.py
crowdbotics-apps/ideapros-llc-stream-33286
a60a79687e5f0a2a5ec8cefb059479f587b9694a
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/ideapros-llc-stream-33286
a60a79687e5f0a2a5ec8cefb059479f587b9694a
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/ideapros-llc-stream-33286
a60a79687e5f0a2a5ec8cefb059479f587b9694a
[ "FTL", "AML", "RSA-MD" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ideapros_llc_stream_33286.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) from exc execute_from_command_line(sys.argv) if __name__ == '__main__': main()
29.318182
89
0.691473
7940f089b0dc96bbc2f67020ac2125f06d6ed674
3,472
py
Python
print_variance.py
tiskw/gaussian-process-bootstrapping-layer
a1c20232ba286aa3245e6aab575a9aaaf274931f
[ "MIT" ]
null
null
null
print_variance.py
tiskw/gaussian-process-bootstrapping-layer
a1c20232ba286aa3245e6aab575a9aaaf274931f
[ "MIT" ]
null
null
null
print_variance.py
tiskw/gaussian-process-bootstrapping-layer
a1c20232ba286aa3245e6aab575a9aaaf274931f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Training script for CIFAR10 classifier. """ import argparse import os import time import numpy import sklearn.metrics import torch import torchvision from model import LeNet5, GaussianProcessBootstrapping class GaussianProcessBootstrappingPrintVar(GaussianProcessBootstrapping): """ PyTorch implementation of Gaussian process bootstrapping layer. """ def forward(self, X): """ Forward function for 2D tensor of shape (n_samples, n_channels). Args: inputs (torch.tensor): Input tensor of shape (n_samples, n_channels). """ if self.P is None: self.P = torch.zeros((X.shape[1], X.shape[1]), requires_grad=False, device=X.device) with torch.no_grad(): X_copy = X.clone().detach() self.P = self.a * self.P + (1.0 - self.a) * torch.matmul(torch.transpose(X_copy, 0, 1), X_copy) with torch.no_grad(): e = self.e P = self.P.clone().detach().double() I = torch.eye(P.shape[0], device=P.device, dtype=P.dtype) S = I - torch.linalg.lstsq(P + e * I, P)[0] M = (I - torch.matmul(P, S) / e).float() V = torch.sum(torch.matmul(X, M) * X, dim=1, keepdim=True) if not self.training: for v in V.clone().detach().cpu().flatten().tolist(): print(v) return X def parse_args(): """ Parse command line arguments. """ parser = argparse.ArgumentParser(description=__doc__.strip()) parser.add_argument("--batch_size", default=500, type=int, help="batch size") parser.add_argument("--device", default="cuda", type=str, help="device type for NN model") parser.add_argument("--epoch", default=10, type=int, help="number of training epochs") parser.add_argument("--n_cpus", default=max(1, os.cpu_count()//2), type=int, help="number of available CPUs") parser.add_argument("--std_error", default=0.2, type=float, help="standard deviation of the gp resampling layer") parser.add_argument("--model", default=None, type=str, help="path to model") return parser.parse_args() def main(args): """ Main function. """ # Dump arguments. print("args =", args) # Create NN model instance. model = LeNet5(gpb_layer_pos="bottom", std_error=args.std_error) model[9] = GaussianProcessBootstrappingPrintVar(std_error=args.std_error) model.load_state_dict(torch.load(args.model)) model.to(args.device) print(model) # Setup training dataset. transform = torchvision.transforms.Compose([ torchvision.transforms.ToTensor(), torchvision.transforms.Normalize((0.4914, 0.4822, 0.4465), (0.2023, 0.1994, 0.2010)), ]) dataset = torchvision.datasets.CIFAR10(root="dataset", train=False, transform=transform, download=True) dataloader = torch.utils.data.DataLoader(dataset, batch_size=args.batch_size, shuffle=True, num_workers=args.n_cpus) model.train() for _ in range(args.epoch): for images, labels in dataloader: images = images.to(args.device) labels = labels.to(args.device) output = model(images) model.eval() for images, labels in dataloader: images = images.to(args.device) labels = labels.to(args.device) output = model(images) if __name__ == "__main__": main(parse_args()) # vim: expandtab tabstop=4 shiftwidth=4 fdm=marker
32.148148
120
0.643721
7940f1ca33d38ef2e5c607be77e486e8bb64318b
322
py
Python
jp.atcoder/abc031/abc031_b/8925627.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc031/abc031_b/8925627.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc031/abc031_b/8925627.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
import sys import numpy as np I = np.array(sys.stdin.read().split(), dtype=np.int64) L, H, n = I[:3] a = I[3:] def main(): res = np.zeros(n, dtype=np.int64) res = np.maximum(L - a, 0) res[a > H] = -1 return res if __name__ == "__main__": ans = main() print(*ans, sep="\n")
16.1
55
0.515528
7940f36b37afb9c180baab949ffd4a6080b396cb
11,164
py
Python
app.py
exandwhy/COVID19_Streamlit
db84b55943e72446dcc9e51dd5ca09f7ce771dee
[ "Apache-2.0" ]
null
null
null
app.py
exandwhy/COVID19_Streamlit
db84b55943e72446dcc9e51dd5ca09f7ce771dee
[ "Apache-2.0" ]
null
null
null
app.py
exandwhy/COVID19_Streamlit
db84b55943e72446dcc9e51dd5ca09f7ce771dee
[ "Apache-2.0" ]
null
null
null
import streamlit as st import numpy as np import pandas as pd import plotly.express as px import plotly.graph_objects as go import matplotlib from plotly.subplots import make_subplots import warnings warnings.filterwarnings(action='ignore') @st.cache(allow_output_mutation=True) def get_data(): url = 'https://api.covid19india.org/csv/latest/state_wise.csv' return pd.read_csv(url) df = get_data() st.title('COVID-19 Outbreak Monitor') st.markdown("> and then the whole world walked inside and shut their doors and said we will stop it.") # Status Table st.header('\n') @st.cache(allow_output_mutation=True) def display_status(df): df = df[['State', 'Confirmed', 'Recovered', 'Active', 'Deaths', 'Last_Updated_Time']] df.drop([0], axis=0, inplace=True) df = df.style.background_gradient(cmap="YlGnBu") return df status_table = display_status(df) st.dataframe(status_table) # Status of COVID-19 summary = df[df['State'] == 'Total'] summary = summary[['Active', 'Recovered', 'Deaths']] summary = summary.transpose() summary = summary.reset_index() summary = summary.rename(columns = {'index' : 'Property', 0 : 'Numbers'}) fig_summary = px.pie(summary, values='Numbers', names='Property') st.plotly_chart(fig_summary) # Statewise distribution of confirmed, active, recovered and deceased st.header('Cases Distribution') statewise = df.drop([0]) status = ['Confirmed', 'Active', 'Recovered', 'Deaths'] option = st.selectbox('', status) @st.cache(allow_output_mutation=True) def display_status(option): df = statewise[['State', option]] fig = px.pie(df, values=option, names='State') fig.update_traces(hoverinfo='label+percent+name', textinfo='none') return fig status = display_status(option) st.plotly_chart(status) # Spread Trends st.header('Spread Trends') @st.cache(allow_output_mutation=True) def get_trends_data(): url = 'https://api.covid19india.org/csv/latest/state_wise_daily.csv' return pd.read_csv(url) trends = get_trends_data() trends = trends.rename(columns = {'TT' : 'All States', 'AN' : 'Andaman and Nicobar Islands', 'AP' : 'Andhra Pradesh', 'AR' : 'Arunachal Pradesh', 'AS' : 'Assam', 'BR' : 'Bihar', 'CH' : 'Chandigarh', 'CT' : 'Chhattisgarh', 'DN' : 'Dadar and Nagar Haveli', 'DD' : 'Daman and Diu', 'DL' : 'Delhi', 'GA' : 'Goa', 'GJ' : 'Gujarat', 'HR' : 'Haryana', 'HP' : 'Himachal Pradesh', 'JK' : 'Jammu and Kashmir', 'JH' : 'Jharkhand', 'KA' : 'Karnataka', 'KL' : 'Kerala', 'LA' : 'Ladakh', 'LD' : 'Lakshdweep', 'MP' : 'Madhya Pradesh', 'MH' : 'Maharastra', 'MN' : 'Manipur', 'ML' : 'Meghalaya', 'MZ' : 'Mizoram', 'NL' : 'Nagaland', 'OR' : 'Odisa', 'PY' : 'Puducherry', 'PB' : 'Punjab', 'RJ' : 'Rajasthan', 'SK' : 'Sikkim', 'TN' : 'Tamil Nadu', 'TG' : 'Telangana', 'TR' : 'Tripura', 'UP' : 'Uttar Pradesh', 'UT' : 'Uttarakhand', 'WB' : 'West Bengal'}) log = st.checkbox('Logarithmic') cumulative = st.checkbox('Cumulative') trends_confirmed = trends[trends['Status'] == 'Confirmed'].drop(columns = ['Status']) trends_recovered = trends[trends['Status'] == 'Recovered'].drop(columns = ['Status']) trends_deceased = trends[trends['Status'] == 'Deceased'].drop(columns = ['Status']) if cumulative: trends_confirmed = trends_confirmed.set_index('Date') trends_confirmed = trends_confirmed.cumsum() trends_confirmed = trends_confirmed.reset_index() trends_recovered = trends_recovered.set_index('Date') trends_recovered = trends_recovered.cumsum() trends_recovered = trends_recovered.reset_index() trends_deceased = trends_deceased.set_index('Date') trends_deceased = trends_deceased.cumsum() trends_deceased = trends_deceased.reset_index() @st.cache(allow_output_mutation=True) def trends_plot(state, df): df = df[['Date', state]] if log: fig = go.Figure(data=go.Scatter(x=df['Date'], y=np.log1p(df[state]), mode='lines+markers')) else: fig = go.Figure(go.Scatter(x=df['Date'], y=df[state], mode='lines+markers')) fig.update_layout(xaxis_title='----->Timeline', yaxis_title='----->Patients') return fig x = list(trends_confirmed.columns) del x[0] del x[-1] states = x option_c = st.selectbox('Confirmed Cases',states) confirmed = trends_plot(option_c, trends_confirmed) st.plotly_chart(confirmed) option_r = st.selectbox('Recovered Cases',states) recovered = trends_plot(option_r, trends_recovered) st.plotly_chart(recovered) option_d = st.selectbox('Number of Deceased',states) deceased = trends_plot(option_d, trends_deceased) st.plotly_chart(deceased) # comparison st.header('Compare') cases = ['Confirmed Cases', 'Recovered Cases', 'Deceased Cases'] cmp = st.selectbox('I want to compare', cases) state_1 = st.selectbox('in', x) state_2 = st.selectbox('and', x) @st.cache(allow_output_mutation=True) def compare(df, state_1, state_2): fig = go.Figure() fig.add_trace(go.Scatter(x=df['Date'], y=df[state_1], mode='lines+markers', name=state_1)) fig.add_trace(go.Scatter(x=df['Date'], y=df[state_2], mode='lines+markers', name=state_2)) return fig if cmp == cases[0]: trends_confirmed = trends_confirmed.set_index('Date') trends_confirmed = trends_confirmed.cumsum() trends_confirmed = trends_confirmed.reset_index() fig_cmp = compare(trends_confirmed, state_1, state_2) elif cmp == cases[1]: trends_recovered = trends_recovered.set_index('Date') trends_recovered = trends_recovered.cumsum() trends_recovered = trends_recovered.reset_index() fig_cmp = compare(trends_recovered, state_1, state_2) else: trends_deceased = trends_deceased.set_index('Date') trends_deceased = trends_deceased.cumsum() trends_deceased = trends_deceased.reset_index() fig_cmp = compare(trends_deceased, state_1, state_2) st.plotly_chart(fig_cmp) # Testing st.header('COVID-19 Testing Status') @st.cache(allow_output_mutation=True) def get_test_data(): url = 'https://api.covid19india.org/csv/latest/tested_numbers_icmr_data.csv' return pd.read_csv(url) test = get_test_data() tested_pm = test.copy() test = test[['Update Time Stamp', 'Total Samples Tested']] test = test.set_index('Update Time Stamp') test = test.diff() test = test.reset_index() test['Update Time Stamp'] = pd.to_datetime(test['Update Time Stamp']) test['Update Time Stamp'] = test['Update Time Stamp'].dt.strftime('%d-%m-%Y') test['Date'] = pd.DatetimeIndex(test['Update Time Stamp']).date test['Month'] = pd.DatetimeIndex(test['Update Time Stamp']).month test = test[['Date', 'Month', 'Total Samples Tested']] test = test.fillna(0) st.markdown('\n') st.markdown('**Samples tested daily**') def test_plot(df): fig = px.scatter(df, x = 'Date', y = 'Total Samples Tested', color = 'Month', hover_data = ['Date', 'Total Samples Tested'], size = 'Total Samples Tested') fig.update_layout(xaxis_title='-----> Timeline', yaxis_title='-----> Number of Tests') st.plotly_chart(fig) test_plot(test) st.markdown('**Tests per million**') tested_pm = tested_pm[['Update Time Stamp', 'Tests per million']] tested_pm['Date'] = pd.to_datetime(tested_pm['Update Time Stamp']) tested_pm['Date'] = tested_pm['Date'].dt.strftime('%d-%m-%Y') tested_pm['Month'] = pd.DatetimeIndex(tested_pm['Date']).month tested_pm = tested_pm.fillna(0) tested_pm.rename(columns = {'Tests per million':'Total Samples Tested'}, inplace = True) test_plot(tested_pm) # Hospital Data st.header('Hospitals') def get_hospital_data(): url = 'https://api.rootnet.in/covid19-in/hospitals/beds.json' hosp = pd.read_json(url) return pd.DataFrame(hosp['data']['regional']) hosp = get_hospital_data() hosp = hosp[hosp['state'] != 'INDIA'] def urban_rural(hosp, x, y, name): fig = go.Figure(data=[ go.Bar(name=name, x=x, y=y) ]) fig.update_layout(barmode='group') st.plotly_chart(fig) def ur_plot(hosp, y_urban, y_rural, name_urban, name_rular): fig = go.Figure(data=[ go.Bar(name=name_urban, x=hosp['state'], y=y_urban), go.Bar(name=name_rular, x=hosp['state'], y=y_rural) ]) fig.update_layout(barmode='group') st.plotly_chart(fig) urban_button = st.button('Urban Hospital') if urban_button: urban_rural(hosp, hosp['state'], hosp['urbanHospitals'], 'Urban Hospital') else: pass rural_button = st.button('Rural Hospital') if rural_button: urban_rural(hosp, hosp['state'], hosp['ruralHospitals'], 'Rural Hospital') else: pass ur_button = st.button('Urban VS Rural Hospital') if ur_button: ur_plot(hosp, hosp['urbanHospitals'], hosp['ruralHospitals'], 'Urban Hospital', 'Rural Hospital') else: pass # Hospital Beds st.header('Hospital Beds') urbanbeds_button = st.button('Urban Beds') if urbanbeds_button: urban_rural(hosp, hosp['state'], hosp['urbanBeds'], 'Urban Hospital Beds') else: pass ruralbeds_button = st.button('Rural Beds') if ruralbeds_button: urban_rural(hosp, hosp['state'], hosp['ruralBeds'], 'Rural Hospital Beds') else: pass urbeds_button = st.button('Urban vs Rural Beds') if urbeds_button: ur_plot(hosp, hosp['urbanBeds'], hosp['ruralBeds'], 'Urban Hospital Beds', 'Rural Hospital Beds') else: pass # Map # @st.cache # def on_map(): # url = 'https://api.covid19india.org/csv/latest/state_wise.csv' # return pd.read_csv(url) # cnf = on_map() # fig = px.choropleth(cnf, locations="IND", # color="Confirmed", # lifeExp is a column of gapminder # hover_name="Confirmed", # column to add to hover information # color_continuous_scale=px.colors.sequential.Plasma) # st.plotly_chart(fig)
32.932153
102
0.597187
7940f36c49102a7178559252454817d51ac2cea8
3,156
py
Python
src/qibo/backends/matrices.py
renatomello/qibo
20c6f3f22effbeccd5d31ed456717f9bee449e0c
[ "Apache-2.0" ]
null
null
null
src/qibo/backends/matrices.py
renatomello/qibo
20c6f3f22effbeccd5d31ed456717f9bee449e0c
[ "Apache-2.0" ]
null
null
null
src/qibo/backends/matrices.py
renatomello/qibo
20c6f3f22effbeccd5d31ed456717f9bee449e0c
[ "Apache-2.0" ]
1
2022-03-28T17:52:46.000Z
2022-03-28T17:52:46.000Z
import numpy as np class Matrices: _NAMES = ["I", "H", "X", "Y", "Z", "S", "T", "CNOT", "CZ", "SWAP", "FSWAP", "TOFFOLI"] def __init__(self, backend): self.backend = backend self._I = None self._H = None self._X = None self._Y = None self._Z = None self._S = None self._T = None self._CNOT = None self._CZ = None self._SWAP = None self._FSWAP = None self._TOFFOLI = None self.allocate_matrices() def allocate_matrices(self): for name in self._NAMES: getattr(self, f"_set{name}")() @property def dtype(self): return self.backend._dtypes.get('DTYPECPX') @property def I(self): return self._I @property def H(self): return self._H @property def X(self): return self._X @property def Y(self): return self._Y @property def Z(self): return self._Z @property def S(self): return self._S @property def T(self): return self._T @property def CNOT(self): return self._CNOT @property def CZ(self): return self._CZ @property def SWAP(self): return self._SWAP @property def FSWAP(self): return self._FSWAP @property def TOFFOLI(self): return self._TOFFOLI def _setI(self): self._I = self.backend.cast(np.eye(2, dtype=self.dtype)) def _setH(self): m = np.ones((2, 2), dtype=self.dtype) m[1, 1] = -1 self._H = self.backend.cast(m / np.sqrt(2)) def _setX(self): m = np.zeros((2, 2), dtype=self.dtype) m[0, 1], m[1, 0] = 1, 1 self._X = self.backend.cast(m) def _setY(self): m = np.zeros((2, 2), dtype=self.dtype) m[0, 1], m[1, 0] = -1j, 1j self._Y = self.backend.cast(m) def _setZ(self): m = np.eye(2, dtype=self.dtype) m[1, 1] = -1 self._Z = self.backend.cast(m) def _setS(self): m = np.eye(2, dtype=self.dtype) m[1, 1] = 1j self._S = self.backend.cast(m) def _setT(self): m = np.eye(2, dtype=self.dtype) m[1, 1] = np.exp(1j * np.pi / 4.0) self._T = self.backend.cast(m) def _setCNOT(self): m = np.eye(4, dtype=self.dtype) m[2, 2], m[2, 3] = 0, 1 m[3, 2], m[3, 3] = 1, 0 self._CNOT = self.backend.cast(m) def _setCZ(self): m = np.eye(4, dtype=self.dtype) m[3, 3] = -1 self._CZ = self.backend.cast(m) def _setSWAP(self): m = np.eye(4, dtype=self.dtype) m[1, 1], m[1, 2] = 0, 1 m[2, 1], m[2, 2] = 1, 0 self._SWAP = self.backend.cast(m) def _setFSWAP(self): m = np.eye(4, dtype=self.dtype) m[1, 1], m[1, 2] = 0, 1 m[2, 1], m[2, 2] = 1, 0 m[3, 3] = -1 self._FSWAP = self.backend.cast(m) def _setTOFFOLI(self): m = np.eye(8, dtype=self.dtype) m[-2, -2], m[-2, -1] = 0, 1 m[-1, -2], m[-1, -1] = 1, 0 self._TOFFOLI = self.backend.cast(m)
22.225352
90
0.499049
7940f47ef5e5e23289a1a570bfd18f3b8f004e00
5,937
py
Python
roommatefinder/settings.py
smlaming/Roomate-Finder
864d6633f4303b53596d8fe62572bf7808c6c443
[ "MIT" ]
null
null
null
roommatefinder/settings.py
smlaming/Roomate-Finder
864d6633f4303b53596d8fe62572bf7808c6c443
[ "MIT" ]
null
null
null
roommatefinder/settings.py
smlaming/Roomate-Finder
864d6633f4303b53596d8fe62572bf7808c6c443
[ "MIT" ]
null
null
null
""" Django settings for roommatefinder project. Generated by 'django-admin startproject' using Django 3.1.6. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathlib import Path import os import sys # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = ['roommate-finder-a-22.herokuapp.com'] #Turn to False when running locally SECURE_SSL_REDIRECT = True # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'bootstrap4', 'django.contrib.sites', 'roommatefinder', 'allauth', 'allauth.account', 'allauth.socialaccount', 'allauth.socialaccount.providers.google', 'questionnaire.apps.QuestionnaireConfig', 'django.forms', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'roommatefinder.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'roommatefinder.wsgi.application' # Database # https://docs.djangoproject.com/en/3.1/ref/settings/#databases #https://www.enterprisedb.com/postgres-tutorials/how-use-postgresql-django if 'test' in sys.argv: #Configuration for test database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'd3rlagcac4cit3', 'USER': 'pkudwynznfiykn', 'PASSWORD': '27ba052fc181835bc04248398dbc09f0962cdd4bbe882df1564d297b1f2392e0', 'HOST': 'ec2-34-225-167-77.compute-1.amazonaws.com', 'PORT': 5432, 'TEST': { 'NAME': 'd3rlagcac4cit3', #This is an important entry } } } else: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'd1rgh00vmo1i24', 'USER': 'uoszgxtubbrxrt', 'PASSWORD': 'bd578c0b6ca6d2462219a42e2ab66d2884755fe570d633be21f0db641d77fc0d', 'HOST': 'ec2-3-222-11-129.compute-1.amazonaws.com', 'PORT': '5432', } } # Password validation # https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/3.1/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'EST' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.1/howto/static-files/ STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') STATIC_URL = '/static/' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' AWS_LOCATION = 'static' AWS_ACCESS_KEY_ID ='' AWS_SECRET_ACCESS_KEY = '' AWS_STORAGE_BUCKET_NAME ='dwltestproj1' AWS_S3_CUSTOM_DOMAIN='%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME AWS_S3_OBJECT_PARAMETERS = { 'CacheControl': 'max-age=86400', } DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' STATICFILES_STORAGE = "storages.backends.s3boto3.S3Boto3Storage" STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) #STATICFILES_DIRS = [ # os.path.join(BASE_DIR, 'static'), #] STATIC_URL='https://%s/%s/' % (AWS_S3_CUSTOM_DOMAIN, AWS_LOCATION) ADMIN_MEDIA_PREFIX = STATIC_URL + 'admin/' STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', ) AWS_DEFAULT_ACL = None #Google Login Tutorial #https://medium.com/@whizzoe/in-5-mins-set-up-google-login-to-sign-up-users-on-django-e71d5c38f5d5 AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend', ) SITE_ID = 1 LOGIN_REDIRECT_URL = '/' SOCIALACCOUNT_PROVIDERS = { 'google': { 'SCOPE': [ 'profile', 'email', ], 'AUTH_PARAMS': { 'access_type': 'online', } } } #FORM_RENDERER = 'django.forms.renderers.TemplatesSetting' # Activate Django-Heroku. #CS3240 Resources Page try: # Configure Django App for Heroku. import django_heroku django_heroku.settings(locals()) except ImportError: found = False
25.925764
150
0.6857
7940f4a951b02381f1745deaf9d984fc6d654579
8,837
py
Python
android/scripts/common.py
hustwei/deqp
812d768b55dcedf2c0fda63e69db3c05600f379d
[ "Apache-2.0" ]
null
null
null
android/scripts/common.py
hustwei/deqp
812d768b55dcedf2c0fda63e69db3c05600f379d
[ "Apache-2.0" ]
null
null
null
android/scripts/common.py
hustwei/deqp
812d768b55dcedf2c0fda63e69db3c05600f379d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- #------------------------------------------------------------------------- # drawElements Quality Program utilities # -------------------------------------- # # Copyright 2015 The Android Open Source Project # # 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 License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # #------------------------------------------------------------------------- import os import re import sys import shlex import subprocess import multiprocessing import string try: import threading except ImportError: import dummy_threading as threading class NativeLib: def __init__ (self, apiVersion, abiVersion, prebuiltDir): self.apiVersion = apiVersion self.abiVersion = abiVersion self.prebuiltDir = prebuiltDir def __str__ (self): return "(API: %s, ABI: %s)" % (self.apiVersion, self.abiVersion) def __repr__ (self): return "(API: %s, ABI: %s)" % (self.apiVersion, self.abiVersion) def getPlatform (): if sys.platform.startswith('linux'): return 'linux' else: return sys.platform def selectByOS (variants): platform = getPlatform() if platform in variants: return variants[platform] elif 'other' in variants: return variants['other'] else: raise Exception("No configuration for '%s'" % platform) def isExecutable (path): return os.path.isfile(path) and os.access(path, os.X_OK) def which (binName): for path in os.environ['PATH'].split(os.pathsep): path = path.strip('"') fullPath = os.path.join(path, binName) if isExecutable(fullPath): return fullPath return None def isBinaryInPath (binName): return which(binName) != None def selectFirstExistingBinary (filenames): for filename in filenames: if filename != None and isExecutable(filename): return filename return None def selectFirstExistingDir (paths): for path in paths: if path != None and os.path.isdir(path): return path return None def die (msg): print msg exit(-1) def shellquote(s): return '"%s"' % s.replace('\\', '\\\\').replace('"', '\"').replace('$', '\$').replace('`', '\`') def execute (commandLine): args = shlex.split(commandLine) retcode = subprocess.call(args) if retcode != 0: raise Exception("Failed to execute '%s', got %d" % (commandLine, retcode)) def execArgs (args): # Make sure previous stdout prints have been written out. sys.stdout.flush() retcode = subprocess.call(args) if retcode != 0: raise Exception("Failed to execute '%s', got %d" % (str(args), retcode)) def execArgsInDirectory (args, cwd, linePrefix=""): def readApplyPrefixAndPrint (source, prefix, sink): while True: line = source.readline() if len(line) == 0: # EOF break; sink.write(prefix + line) process = subprocess.Popen(args, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdoutJob = threading.Thread(target=readApplyPrefixAndPrint, args=(process.stdout, linePrefix, sys.stdout)) stderrJob = threading.Thread(target=readApplyPrefixAndPrint, args=(process.stderr, linePrefix, sys.stderr)) stdoutJob.start() stderrJob.start() retcode = process.wait() if retcode != 0: raise Exception("Failed to execute '%s', got %d" % (str(args), retcode)) def serialApply(f, argsList): for args in argsList: f(*args) def parallelApply(f, argsList): class ErrorCode: def __init__ (self): self.error = None; def applyAndCaptureError (func, args, errorCode): try: func(*args) except: errorCode.error = sys.exc_info() errorCode = ErrorCode() jobs = [] for args in argsList: job = threading.Thread(target=applyAndCaptureError, args=(f, args, errorCode)) job.start() jobs.append(job) for job in jobs: job.join() if errorCode.error: raise errorCode.error[0], errorCode.error[1], errorCode.error[2] class Device: def __init__(self, serial, product, model, device): self.serial = serial self.product = product self.model = model self.device = device def __str__ (self): return "%s: {product: %s, model: %s, device: %s}" % (self.serial, self.product, self.model, self.device) def getDevices (adb): proc = subprocess.Popen([adb, 'devices', '-l'], stdout=subprocess.PIPE) (stdout, stderr) = proc.communicate() if proc.returncode != 0: raise Exception("adb devices -l failed, got %d" % proc.returncode) ptrn = re.compile(r'^([a-zA-Z0-9]+)\s+.*product:([^\s]+)\s+model:([^\s]+)\s+device:([^\s]+)') devices = [] for line in stdout.splitlines()[1:]: if len(line.strip()) == 0: continue m = ptrn.match(line) if m == None: print "WARNING: Failed to parse device info '%s'" % line continue devices.append(Device(m.group(1), m.group(2), m.group(3), m.group(4))) return devices def getWin32Generator (): if which("jom.exe") != None: return "NMake Makefiles JOM" else: return "NMake Makefiles" def isNinjaSupported (): return which("ninja") != None def getUnixGenerator (): if isNinjaSupported(): return "Ninja" else: return "Unix Makefiles" def getExtraBuildArgs (generator): if generator == "Unix Makefiles": return ["--", "-j%d" % multiprocessing.cpu_count()] else: return [] NDK_HOST_OS_NAMES = [ "windows", "windows-x86_64", "darwin-x86", "darwin-x86_64", "linux-x86", "linux-x86_64" ] def getNDKHostOsName (ndkPath): for name in NDK_HOST_OS_NAMES: if os.path.exists(os.path.join(ndkPath, "prebuilt", name)): return name raise Exception("Couldn't determine NDK host OS") # deqp/android path ANDROID_DIR = os.path.realpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")) # Build configuration NATIVE_LIBS = [ # API ABI prebuiltsDir NativeLib(13, "armeabi-v7a", 'android-arm'), # ARM v7a ABI NativeLib(13, "x86", 'android-x86'), # x86 NativeLib(21, "arm64-v8a", 'android-arm64'), # ARM64 v8a ABI NativeLib(21, "x86_64", 'android-x86_64'), # x86_64 ] ANDROID_JAVA_API = "android-22" NATIVE_LIB_NAME = "libdeqp.so" def selectNDKPath (): candidates = [ os.path.expanduser("~/android-ndk-r11"), "C:/android/android-ndk-r11", os.environ.get("ANDROID_NDK_PATH", None), # If not defined, return None ] ndkPath = selectFirstExistingDir(candidates) if ndkPath == None: raise Exception("None of NDK directory candidates exist: %s. Check ANDROID_NDK_PATH in common.py" % candidates) return ndkPath def noneSafePathJoin (*components): if None in components: return None return os.path.join(*components) # NDK paths ANDROID_NDK_PATH = selectNDKPath() ANDROID_NDK_HOST_OS = getNDKHostOsName(ANDROID_NDK_PATH) ANDROID_NDK_TOOLCHAIN_VERSION = "r11" # Toolchain file is selected based on this # Native code build settings CMAKE_GENERATOR = selectByOS({ 'win32': getWin32Generator(), 'other': getUnixGenerator() }) EXTRA_BUILD_ARGS = getExtraBuildArgs(CMAKE_GENERATOR) # SDK paths ANDROID_SDK_PATH = selectFirstExistingDir([ os.environ.get("ANDROID_SDK_PATH", None), os.path.expanduser("~/android-sdk-linux"), os.path.expanduser("~/android-sdk-mac_x86"), "C:/android/android-sdk-windows", ]) ANDROID_BIN = selectFirstExistingBinary([ noneSafePathJoin(ANDROID_SDK_PATH, "tools", "android"), noneSafePathJoin(ANDROID_SDK_PATH, "tools", "android.bat"), which('android'), ]) ADB_BIN = selectFirstExistingBinary([ which('adb'), # \note Prefer adb in path to avoid version issues on dev machines noneSafePathJoin(ANDROID_SDK_PATH, "platform-tools", "adb"), noneSafePathJoin(ANDROID_SDK_PATH, "platform-tools", "adb.exe"), ]) ZIPALIGN_BIN = selectFirstExistingBinary([ noneSafePathJoin(ANDROID_SDK_PATH, "tools", "zipalign"), noneSafePathJoin(ANDROID_SDK_PATH, "tools", "zipalign.exe"), which('zipalign'), ]) JARSIGNER_BIN = which('jarsigner') # Apache ant ANT_BIN = selectFirstExistingBinary([ which('ant'), "C:/android/apache-ant-1.8.4/bin/ant.bat", "C:/android/apache-ant-1.9.2/bin/ant.bat", "C:/android/apache-ant-1.9.3/bin/ant.bat", "C:/android/apache-ant-1.9.4/bin/ant.bat", ]) def makeNameValueTuple (name): return (name, str(eval(name))) CONFIG_VAR_NAMES = [ "ANDROID_DIR", "NATIVE_LIBS", "ANDROID_JAVA_API", "NATIVE_LIB_NAME", "ANDROID_NDK_PATH", "ANDROID_NDK_HOST_OS", "ANDROID_NDK_TOOLCHAIN_VERSION", "CMAKE_GENERATOR", "EXTRA_BUILD_ARGS", "ANDROID_SDK_PATH", "ANDROID_BIN", "ADB_BIN", "ZIPALIGN_BIN", "JARSIGNER_BIN", "ANT_BIN", ] CONFIG_STRINGS = [makeNameValueTuple(x) for x in CONFIG_VAR_NAMES]
26.860182
113
0.690619
7940f4dcc4b04af088f8ec9f29b0a6c9aed7d386
11,485
py
Python
riboflask_compare.py
skiniry/Trips-Viz
a742a6c7d0c9758e3c439828e804025d7fc44b4f
[ "MIT" ]
7
2019-07-25T14:34:48.000Z
2021-10-19T07:52:29.000Z
riboflask_compare.py
skiniry/Trips-Viz
a742a6c7d0c9758e3c439828e804025d7fc44b4f
[ "MIT" ]
3
2021-06-07T23:26:38.000Z
2021-11-15T22:37:43.000Z
riboflask_compare.py
skiniry/Trips-Viz
a742a6c7d0c9758e3c439828e804025d7fc44b4f
[ "MIT" ]
2
2019-09-04T08:51:25.000Z
2022-03-10T20:58:40.000Z
import matplotlib matplotlib.use('agg') from matplotlib import pyplot as plt import mpld3 from mpld3 import plugins,utils from new_plugins import InteractiveLegendPlugin,TopToolbar,DownloadProfile,DownloadPNG from fetch_shelve_reads2 import get_reads import sqlite3 import config import os import config def merge_dict(dict1,dict2): master_dict = dict1 for key in dict2: if key in master_dict: master_dict[key] += dict2[key] else: master_dict[key] = dict2[key] return master_dict color_dict = {'frames': ['#FF4A45', '#64FC44', '#5687F9']} def generate_compare_plot(tran, ambig, min_read, max_read,master_filepath_dict,lite, offset_dict,ribocoverage,organism,normalize, short_code, background_col, hili_start, hili_stop,comp_uag_col,comp_uga_col,comp_uaa_col, title_size, subheading_size,axis_label_size, marker_size,cds_marker_size, cds_marker_colour, legend_size,transcriptome): labels = [] start_visible=[] line_collections = [] all_stops = ["TAG","TAA","TGA"] returnstr = "Position," y_max = 50 if normalize == True: y_max = 0 connection = sqlite3.connect('{}/trips.sqlite'.format(config.SCRIPT_LOC)) connection.text_factory = str cursor = connection.cursor() cursor.execute("SELECT owner FROM organisms WHERE organism_name = '{}' and transcriptome_list = '{}';".format(organism, transcriptome)) owner = (cursor.fetchone())[0] if owner == 1: if os.path.isfile("{0}/{1}/{2}/{2}.{3}.sqlite".format(config.SCRIPT_LOC, config.ANNOTATION_DIR,organism,transcriptome)): transhelve = sqlite3.connect("{0}/{1}/{2}/{2}.{3}.sqlite".format(config.SCRIPT_LOC, config.ANNOTATION_DIR,organism,transcriptome)) else: return_str = "Cannot find annotation file {}.{}.sqlite".format(organism,transcriptome) return {'current': 400, 'total': 100, 'status': 'return_str','result': return_str} else: transhelve = sqlite3.connect("{0}transcriptomes/{1}/{2}/{3}/{2}_{3}.sqlite".format(config.UPLOADS_DIR,owner,organism,transcriptome)) cursor = transhelve.cursor() cursor.execute("SELECT * from transcripts WHERE transcript = '{}'".format(tran)) result = cursor.fetchone() traninfo = {"transcript":result[0] , "gene":result[1], "length":result[2] , "cds_start":result[3] , "cds_stop":result[4] , "seq":result[5] , "strand":result[6], "stop_list":result[7].split(","),"start_list":result[8].split(","), "exon_junctions":result[9].split(","), "tran_type":result[10], "principal":result[11]} traninfo["stop_list"] = [int(x) for x in traninfo["stop_list"]] traninfo["start_list"] = [int(x) for x in traninfo["start_list"]] if str(traninfo["exon_junctions"][0]) != "": traninfo["exon_junctions"] = [int(x) for x in traninfo["exon_junctions"]] else: traninfo["exon_junctions"] = [] transhelve.close() gene = traninfo["gene"] tranlen = traninfo["length"] cds_start = traninfo["cds_start"] cds_stop = traninfo["cds_stop"] strand = traninfo["strand"] if cds_start == 'NULL' or cds_start == None: cds_start = 0 if cds_stop == 'NULL' or cds_stop == None: cds_stop = 0 all_starts = traninfo["start_list"] all_stops = {"TAG":[],"TAA":[],"TGA":[]} seq = traninfo["seq"].upper() for i in range(0,len(seq)): if seq[i:i+3] in all_stops: all_stops[seq[i:i+3]].append(i+1) start_stop_dict = {1:{"starts":[0], "stops":{"TGA":[0],"TAG":[0],"TAA":[0]}}, 2:{"starts":[0], "stops":{"TGA":[0],"TAG":[0],"TAA":[0]}}, 3:{"starts":[0], "stops":{"TGA":[0],"TAG":[0],"TAA":[0]}}} for start in all_starts: rem = ((start-1)%3)+1 start_stop_dict[rem]["starts"].append(start-1) for stop in all_stops: for stop_pos in all_stops[stop]: rem = ((stop_pos-1)%3)+1 start_stop_dict[rem]["stops"][stop].append(stop_pos-1) fig = plt.figure(figsize=(13,8)) ax_main = plt.subplot2grid((30,1), (0,0),rowspan=22) if normalize != True: label = 'Read count' else: label = 'Normalized read count' ax_main.set_ylabel(label, fontsize=axis_label_size, labelpad=30) label = 'Position (nucleotides)' ax_main.set_xlabel(label, fontsize=axis_label_size, labelpad=10) #if normalize is true work out the factors for each colour if normalize == True: all_mapped_reads = [] for color in master_filepath_dict: all_mapped_reads.append(master_filepath_dict[color]["mapped_reads"]) min_reads = float(min(all_mapped_reads)) for color in master_filepath_dict: factor = min_reads/float(master_filepath_dict[color]["mapped_reads"]) master_filepath_dict[color]["factor"] = factor # So items can be plotted alphabetically unsorted_list = [] for color in master_filepath_dict: input_list = [color, master_filepath_dict[color]["file_names"],master_filepath_dict[color]["file_descs"],master_filepath_dict[color]["file_ids"],master_filepath_dict[color]["filepaths"],master_filepath_dict[color]["file_type"],master_filepath_dict[color]["minread"],master_filepath_dict[color]["maxread"]] if "factor" in master_filepath_dict[color]: input_list.append(master_filepath_dict[color]["factor"]) unsorted_list.append(input_list) sorted_list = sorted(unsorted_list, key=lambda x: x[1][0]) returndict = {} for item in sorted_list: # needed to make get_reads accept file_paths file_paths = {"riboseq":{}} for i in range(0,len(item[3])): file_paths["riboseq"][item[3][i]] = item[4][i] file_names =item[1][0] file_descs = item[2] if item[5] == "riboseq": filename_reads, seqvar_dict = get_reads(ambig, item[6], item[7], tran, file_paths, tranlen, ribocoverage, organism, False, False,"fiveprime","riboseq",1) else: filename_reads, seqvar_dict = get_reads(ambig, item[6], item[7], tran, file_paths, tranlen, True, organism, False, False,"fiveprime","riboseq",1) if normalize == False: try: max_val = max(filename_reads.values())*1.1 if max_val > y_max: y_max = max_val except Exception as e: pass labels.append(file_names) start_visible.append(True) plot_filename = ax_main.plot(filename_reads.keys(), filename_reads.values(), alpha=1, label = labels, zorder=1,color=item[0], linewidth=3) line_collections.append(plot_filename) returndict[file_names] = {} for pos in filename_reads: returndict[file_names][pos] = filename_reads[pos] else: normalized_reads = {} for pos in filename_reads: normalized_reads[pos] = filename_reads[pos]*item[8] try: max_val = max(normalized_reads.values())*1.1 if max_val > y_max: y_max = max_val except Exception as e: pass labels.append(file_names) start_visible.append(True) plot_filename = ax_main.plot(normalized_reads.keys(), normalized_reads.values(), alpha=1, label = labels, zorder=1,color=item[0], linewidth=3) line_collections.append(plot_filename) returndict[file_names] = {} for pos in filename_reads: returndict[file_names][pos] = normalized_reads[pos] for plot_filename in returndict: returnstr += "{},".format(plot_filename) returnstr += "\n" for i in range(0,tranlen): returnstr += "{},".format(i) for plot_filename in returndict: returnstr += "{},".format(returndict[plot_filename][i]) returnstr += "\n" ax_main.set_ylim(0, y_max) # draw cds start #plt.plot((cds_start,cds_start), (0, y_max), cds_marker_colour,linestyle = ':',linewidth=cds_marker_size) # draw cds end #plt.plot((cds_stop, cds_stop), (0, y_max), cds_marker_colour,linestyle = ':',linewidth=cds_marker_size) cds_markers = ax_main.plot((cds_start,cds_start), (0, y_max*0.97), color=cds_marker_colour,linestyle = 'solid', linewidth=cds_marker_size) ax_main.text(cds_start,y_max*0.97,"CDS start",fontsize=18,color="black",ha="center") #ax_main.annotate('axes fraction',xy=(3, 1), xycoords='data',xytext=(0.8, 0.95), textcoords='axes fraction',arrowprops=dict(facecolor='black', shrink=0.05),horizontalalignment='right', verticalalignment='top') #trans = blended_transform_factory(ax_main.transData, ax_main.transAxes) #ax_main.annotate('CDS RELATIVE START',(100,100),transform=trans) #tform = blended_transform_factory(ax_main.transData, ax_main.transAxes) #r=10 #ax_main.text(cds_start, 0.9, "CDS START OR WHATEVER", fontsize='xx-large', color='r', transform=tform) cds_markers += ax_main.plot((cds_stop+1,cds_stop+1), (0, y_max*0.97), color=cds_marker_colour,linestyle = 'solid', linewidth=cds_marker_size) ax_main.text(cds_stop,y_max*0.97,"CDS stop",fontsize=18,color="black",ha="center") line_collections.append(cds_markers) start_visible.append(True) labels.append("CDS Markers") ax_f1 = plt.subplot2grid((30,1), (27,0),rowspan=1,sharex=ax_main) ax_f1.set_facecolor('lightgray') ax_f2 = plt.subplot2grid((30,1), (28,0),rowspan=1,sharex=ax_main) ax_f2.set_facecolor('lightgray') ax_f6 = plt.subplot2grid((30,1), (29,0),rowspan=1,sharex=ax_main) ax_f6.set_facecolor('lightgray') ax_f6.set_xlabel('Transcript: {} Length: {} nt'.format(tran, tranlen), fontsize=subheading_size, labelpad=10) for axis, frame in ((ax_f1, 1), (ax_f2, 2), (ax_f6, 3)): color = color_dict['frames'][frame - 1] axis.set_xlim(0, tranlen) starts = [(item, 1) for item in start_stop_dict[frame]['starts']] axis.broken_barh(starts, (0.5, 1), color='white',zorder=5, linewidth=2) stops = [(item, 1) for item in start_stop_dict[frame]['stops']] uag_stops = [(item, 1) for item in start_stop_dict[frame]['stops']['TAG']] uaa_stops = [(item, 1) for item in start_stop_dict[frame]['stops']['TAA']] uga_stops = [(item, 1) for item in start_stop_dict[frame]['stops']['TGA']] axis.broken_barh(uag_stops, (0, 1), color=comp_uag_col, zorder=2, linewidth=2) axis.broken_barh(uaa_stops, (0, 1), color=comp_uaa_col, zorder=2, linewidth=2) axis.broken_barh(uga_stops, (0, 1), color=comp_uga_col, zorder=2, linewidth=2) axis.set_ylabel('{}'.format(frame),rotation='horizontal', labelpad=10, verticalalignment='center') axis.set_ylim(0, 1) axis.tick_params(top=False, left=False, right=False, bottom=False, labeltop=False, labelleft=False, labelright=False, labelbottom=False) ax_f6.axes.get_yaxis().set_ticks([]) ax_f2.axes.get_yaxis().set_ticks([]) ax_f1.axes.get_yaxis().set_ticks([]) title_str = '{} ({})'.format(gene,short_code) plt.title(title_str, fontsize=title_size, y=36) if not (hili_start == 0 and hili_stop == 0): hili_start = int(hili_start) hili_stop = int(hili_stop) hili = ax_main.fill_between([hili_start,hili_stop],[y_max, y_max],zorder=0, alpha=0.75,color="#fffbaf") labels.append("Highligter") start_visible.append(True) line_collections.append(hili) leg_offset = (legend_size-17)*5 if leg_offset <0: leg_offset = 0 leg_offset += 230 ilp = InteractiveLegendPlugin(line_collections, labels, alpha_unsel=0,alpha_sel=0.85, xoffset=leg_offset, yoffset=20,start_visible=start_visible,fontsize=legend_size) plugins.connect(fig, ilp,TopToolbar(yoffset=-50,xoffset=-300),DownloadProfile(returnstr=returnstr),DownloadPNG(returnstr=title_str)) ax_main.set_facecolor(background_col) # This changes the size of the tick markers, works on both firefox and chrome. ax_main.tick_params('both', labelsize=marker_size) ax_main.xaxis.set_major_locator(plt.MaxNLocator(3)) ax_main.yaxis.set_major_locator(plt.MaxNLocator(3)) ax_main.grid(color="white", linewidth=20,linestyle="solid") graph = "<div style='padding-left: 55px;padding-top: 22px;'> <a href='https://trips.ucc.ie/short/{0}' target='_blank' ><button class='button centerbutton' type='submit'><b>Direct link to this plot</b></button></a> </div>".format(short_code) tot_prog = 100 graph += mpld3.fig_to_html(fig) return graph
44.688716
307
0.720853
7940f506a415a9b35af8f8725517de78605c7c62
4,104
py
Python
locations/spiders/orangetheory_fitness.py
mfjackson/alltheplaces
37c90b4041c80a574e6e4c2f886883e97df4b636
[ "MIT" ]
null
null
null
locations/spiders/orangetheory_fitness.py
mfjackson/alltheplaces
37c90b4041c80a574e6e4c2f886883e97df4b636
[ "MIT" ]
null
null
null
locations/spiders/orangetheory_fitness.py
mfjackson/alltheplaces
37c90b4041c80a574e6e4c2f886883e97df4b636
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json import scrapy from locations.items import GeojsonPointItem class OrangetheoryFitnessSpider(scrapy.Spider): name = "orangetheory_fitness" allowed_domains = ["orangetheory.co"] start_urls = [ "https://api.orangetheory.co/partners/studios/v2?country=United+States", "https://api.orangetheory.co/partners/studios/v2?country=Canada", "https://api.orangetheory.co/partners/studios/v2?country=Australia", "https://api.orangetheory.co/partners/studios/v2?country=Chile", "https://api.orangetheory.co/partners/studios/v2?country=China", "https://api.orangetheory.co/partners/studios/v2?country=Colombia", "https://api.orangetheory.co/partners/studios/v2?country=Costa+Rica", "https://api.orangetheory.co/partners/studios/v2?country=Dominican+Republic", "https://api.orangetheory.co/partners/studios/v2?country=Germany", "https://api.orangetheory.co/partners/studios/v2?country=Guatemala", "https://api.orangetheory.co/partners/studios/v2?country=Hong+Kong", "https://api.orangetheory.co/partners/studios/v2?country=India", "https://api.orangetheory.co/partners/studios/v2?country=Israel", "https://api.orangetheory.co/partners/studios/v2?country=Japan", "https://api.orangetheory.co/partners/studios/v2?country=Kuwait", "https://api.orangetheory.co/partners/studios/v2?country=Mexico", "https://api.orangetheory.co/partners/studios/v2?country=New+Zealand", "https://api.orangetheory.co/partners/studios/v2?country=Peru", "https://api.orangetheory.co/partners/studios/v2?country=Puerto+Rico", "https://api.orangetheory.co/partners/studios/v2?country=Singapore", "https://api.orangetheory.co/partners/studios/v2?country=Spain", "https://api.orangetheory.co/partners/studios/v2?country=United+Arab+Emirates", "https://api.orangetheory.co/partners/studios/v2?country=United+Kingdom", ] download_delay = 0.3 def parse(self, response): location_data = json.loads(response.text) locations = location_data["data"] for location in locations: # Handle junk data if ( " live" in location[0]["studioName"].lower() ): # Skip Orangetheory Live virtual records continue if location[0]["studioLocation"]["physicalAddress"] in [ "*", "a", ]: # Skip placeholder records continue if location[0]["studioLocation"]["longitude"] in [ "1.00000000", "0.00000000", ]: # Skip test records continue if location[0]["studioName"] == "LatLong": # Skip latlon placeholder record continue # Handle coordinates if ( float(location[0]["studioLocation"]["latitude"]) < -55.0 ): # Drop handful of bad coords in Antarctica lat = lon = "" elif ( float(location[0]["studioLocation"]["longitude"]) < -180.0 ): # Drop handful of bad coords lat = lon = "" else: lat = location[0]["studioLocation"]["latitude"] lon = location[0]["studioLocation"]["longitude"] properties = { "ref": location[0]["studioId"], "name": location[0]["studioName"], "addr_full": location[0]["studioLocation"]["physicalAddress"].strip(), "city": location[0]["studioLocation"]["physicalCity"], "state": location[0]["studioLocation"]["physicalState"], "postcode": location[0]["studioLocation"]["physicalPostalCode"], "country": location[0]["studioLocation"]["physicalCountry"], "lat": lat, "lon": lon, "phone": location[0]["studioLocation"]["phoneNumber"], } yield GeojsonPointItem(**properties)
46.11236
88
0.597222
7940f5e0a0ba6c34abdda501be57630b2505b6b5
69,598
py
Python
src/gdata/service.py
gauravuniverse/gdata-python-client
c4575d0775ebb83ac2bac2d40319ea921a184f5a
[ "Apache-2.0" ]
483
2015-01-07T18:03:08.000Z
2021-12-22T00:05:55.000Z
src/gdata/service.py
gauravuniverse/gdata-python-client
c4575d0775ebb83ac2bac2d40319ea921a184f5a
[ "Apache-2.0" ]
68
2015-01-05T17:25:36.000Z
2021-12-06T20:43:34.000Z
src/gdata/service.py
gauravuniverse/gdata-python-client
c4575d0775ebb83ac2bac2d40319ea921a184f5a
[ "Apache-2.0" ]
297
2015-01-02T20:05:06.000Z
2022-03-17T22:25:34.000Z
# # Copyright (C) 2006,2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """GDataService provides CRUD ops. and programmatic login for GData services. Error: A base exception class for all exceptions in the gdata_client module. CaptchaRequired: This exception is thrown when a login attempt results in a captcha challenge from the ClientLogin service. When this exception is thrown, the captcha_token and captcha_url are set to the values provided in the server's response. BadAuthentication: Raised when a login attempt is made with an incorrect username or password. NotAuthenticated: Raised if an operation requiring authentication is called before a user has authenticated. NonAuthSubToken: Raised if a method to modify an AuthSub token is used when the user is either not authenticated or is authenticated through another authentication mechanism. NonOAuthToken: Raised if a method to modify an OAuth token is used when the user is either not authenticated or is authenticated through another authentication mechanism. RequestError: Raised if a CRUD request returned a non-success code. UnexpectedReturnType: Raised if the response from the server was not of the desired type. For example, this would be raised if the server sent a feed when the client requested an entry. GDataService: Encapsulates user credentials needed to perform insert, update and delete operations with the GData API. An instance can perform user authentication, query, insertion, deletion, and update. Query: Eases query URI creation by allowing URI parameters to be set as dictionary attributes. For example a query with a feed of '/base/feeds/snippets' and ['bq'] set to 'digital camera' will produce '/base/feeds/snippets?bq=digital+camera' when .ToUri() is called on it. """ __author__ = 'api.jscudder (Jeffrey Scudder)' import re import urllib import urlparse try: from xml.etree import cElementTree as ElementTree except ImportError: try: import cElementTree as ElementTree except ImportError: try: from xml.etree import ElementTree except ImportError: from elementtree import ElementTree import atom.service import gdata import atom import atom.http_interface import atom.token_store import gdata.auth import gdata.gauth AUTH_SERVER_HOST = 'https://www.google.com' # When requesting an AuthSub token, it is often helpful to track the scope # which is being requested. One way to accomplish this is to add a URL # parameter to the 'next' URL which contains the requested scope. This # constant is the default name (AKA key) for the URL parameter. SCOPE_URL_PARAM_NAME = 'authsub_token_scope' # When requesting an OAuth access token or authorization of an existing OAuth # request token, it is often helpful to track the scope(s) which is/are being # requested. One way to accomplish this is to add a URL parameter to the # 'callback' URL which contains the requested scope. This constant is the # default name (AKA key) for the URL parameter. OAUTH_SCOPE_URL_PARAM_NAME = 'oauth_token_scope' # Maps the service names used in ClientLogin to scope URLs. CLIENT_LOGIN_SCOPES = gdata.gauth.AUTH_SCOPES # Default parameters for GDataService.GetWithRetries method DEFAULT_NUM_RETRIES = 3 DEFAULT_DELAY = 1 DEFAULT_BACKOFF = 2 def lookup_scopes(service_name): """Finds the scope URLs for the desired service. In some cases, an unknown service may be used, and in those cases this function will return None. """ if service_name in CLIENT_LOGIN_SCOPES: return CLIENT_LOGIN_SCOPES[service_name] return None # Module level variable specifies which module should be used by GDataService # objects to make HttpRequests. This setting can be overridden on each # instance of GDataService. # This module level variable is deprecated. Reassign the http_client member # of a GDataService object instead. http_request_handler = atom.service class Error(Exception): pass class CaptchaRequired(Error): pass class BadAuthentication(Error): pass class NotAuthenticated(Error): pass class NonAuthSubToken(Error): pass class NonOAuthToken(Error): pass class RequestError(Error): pass class UnexpectedReturnType(Error): pass class BadAuthenticationServiceURL(Error): pass class FetchingOAuthRequestTokenFailed(RequestError): pass class TokenUpgradeFailed(RequestError): pass class RevokingOAuthTokenFailed(RequestError): pass class AuthorizationRequired(Error): pass class TokenHadNoScope(Error): pass class RanOutOfTries(Error): pass class GDataService(atom.service.AtomService): """Contains elements needed for GData login and CRUD request headers. Maintains additional headers (tokens for example) needed for the GData services to allow a user to perform inserts, updates, and deletes. """ # The hander member is deprecated, use http_client instead. handler = None # The auth_token member is deprecated, use the token_store instead. auth_token = None # The tokens dict is deprecated in favor of the token_store. tokens = None def __init__(self, email=None, password=None, account_type='HOSTED_OR_GOOGLE', service=None, auth_service_url=None, source=None, server=None, additional_headers=None, handler=None, tokens=None, http_client=None, token_store=None): """Creates an object of type GDataService. Args: email: string (optional) The user's email address, used for authentication. password: string (optional) The user's password. account_type: string (optional) The type of account to use. Use 'GOOGLE' for regular Google accounts or 'HOSTED' for Google Apps accounts, or 'HOSTED_OR_GOOGLE' to try finding a HOSTED account first and, if it doesn't exist, try finding a regular GOOGLE account. Default value: 'HOSTED_OR_GOOGLE'. service: string (optional) The desired service for which credentials will be obtained. auth_service_url: string (optional) User-defined auth token request URL allows users to explicitly specify where to send auth token requests. source: string (optional) The name of the user's application. server: string (optional) The name of the server to which a connection will be opened. Default value: 'base.google.com'. additional_headers: dictionary (optional) Any additional headers which should be included with CRUD operations. handler: module (optional) This parameter is deprecated and has been replaced by http_client. tokens: This parameter is deprecated, calls should be made to token_store instead. http_client: An object responsible for making HTTP requests using a request method. If none is provided, a new instance of atom.http.ProxiedHttpClient will be used. token_store: Keeps a collection of authorization tokens which can be applied to requests for a specific URLs. Critical methods are find_token based on a URL (atom.url.Url or a string), add_token, and remove_token. """ atom.service.AtomService.__init__(self, http_client=http_client, token_store=token_store) self.email = email self.password = password self.account_type = account_type self.service = service self.auth_service_url = auth_service_url self.server = server self.additional_headers = additional_headers or {} self._oauth_input_params = None self.__SetSource(source) self.__captcha_token = None self.__captcha_url = None self.__gsessionid = None if http_request_handler.__name__ == 'gdata.urlfetch': import gdata.alt.appengine self.http_client = gdata.alt.appengine.AppEngineHttpClient() def _SetSessionId(self, session_id): """Used in unit tests to simulate a 302 which sets a gsessionid.""" self.__gsessionid = session_id # Define properties for GDataService def _SetAuthSubToken(self, auth_token, scopes=None): """Deprecated, use SetAuthSubToken instead.""" self.SetAuthSubToken(auth_token, scopes=scopes) def __SetAuthSubToken(self, auth_token, scopes=None): """Deprecated, use SetAuthSubToken instead.""" self._SetAuthSubToken(auth_token, scopes=scopes) def _GetAuthToken(self): """Returns the auth token used for authenticating requests. Returns: string """ current_scopes = lookup_scopes(self.service) if current_scopes: token = self.token_store.find_token(current_scopes[0]) if hasattr(token, 'auth_header'): return token.auth_header return None def _GetCaptchaToken(self): """Returns a captcha token if the most recent login attempt generated one. The captcha token is only set if the Programmatic Login attempt failed because the Google service issued a captcha challenge. Returns: string """ return self.__captcha_token def __GetCaptchaToken(self): return self._GetCaptchaToken() captcha_token = property(__GetCaptchaToken, doc="""Get the captcha token for a login request.""") def _GetCaptchaURL(self): """Returns the URL of the captcha image if a login attempt generated one. The captcha URL is only set if the Programmatic Login attempt failed because the Google service issued a captcha challenge. Returns: string """ return self.__captcha_url def __GetCaptchaURL(self): return self._GetCaptchaURL() captcha_url = property(__GetCaptchaURL, doc="""Get the captcha URL for a login request.""") def GetGeneratorFromLinkFinder(self, link_finder, func, num_retries=DEFAULT_NUM_RETRIES, delay=DEFAULT_DELAY, backoff=DEFAULT_BACKOFF): """returns a generator for pagination""" yield link_finder next = link_finder.GetNextLink() while next is not None: next_feed = func(str(self.GetWithRetries( next.href, num_retries=num_retries, delay=delay, backoff=backoff))) yield next_feed next = next_feed.GetNextLink() def _GetElementGeneratorFromLinkFinder(self, link_finder, func, num_retries=DEFAULT_NUM_RETRIES, delay=DEFAULT_DELAY, backoff=DEFAULT_BACKOFF): for element in self.GetGeneratorFromLinkFinder(link_finder, func, num_retries=num_retries, delay=delay, backoff=backoff).entry: yield element def GetOAuthInputParameters(self): return self._oauth_input_params def SetOAuthInputParameters(self, signature_method, consumer_key, consumer_secret=None, rsa_key=None, two_legged_oauth=False, requestor_id=None): """Sets parameters required for using OAuth authentication mechanism. NOTE: Though consumer_secret and rsa_key are optional, either of the two is required depending on the value of the signature_method. Args: signature_method: class which provides implementation for strategy class oauth.oauth.OAuthSignatureMethod. Signature method to be used for signing each request. Valid implementations are provided as the constants defined by gdata.auth.OAuthSignatureMethod. Currently they are gdata.auth.OAuthSignatureMethod.RSA_SHA1 and gdata.auth.OAuthSignatureMethod.HMAC_SHA1 consumer_key: string Domain identifying third_party web application. consumer_secret: string (optional) Secret generated during registration. Required only for HMAC_SHA1 signature method. rsa_key: string (optional) Private key required for RSA_SHA1 signature method. two_legged_oauth: boolean (optional) Enables two-legged OAuth process. requestor_id: string (optional) User email adress to make requests on their behalf. This parameter should only be set when two_legged_oauth is True. """ self._oauth_input_params = gdata.auth.OAuthInputParams( signature_method, consumer_key, consumer_secret=consumer_secret, rsa_key=rsa_key, requestor_id=requestor_id) if two_legged_oauth: oauth_token = gdata.auth.OAuthToken( oauth_input_params=self._oauth_input_params) self.SetOAuthToken(oauth_token) def FetchOAuthRequestToken(self, scopes=None, extra_parameters=None, request_url='%s/accounts/OAuthGetRequestToken' % \ AUTH_SERVER_HOST, oauth_callback=None): """Fetches and sets the OAuth request token and returns it. Args: scopes: string or list of string base URL(s) of the service(s) to be accessed. If None, then this method tries to determine the scope(s) from the current service. extra_parameters: dict (optional) key-value pairs as any additional parameters to be included in the URL and signature while making a request for fetching an OAuth request token. All the OAuth parameters are added by default. But if provided through this argument, any default parameters will be overwritten. For e.g. a default parameter oauth_version 1.0 can be overwritten if extra_parameters = {'oauth_version': '2.0'} request_url: Request token URL. The default is 'https://www.google.com/accounts/OAuthGetRequestToken'. oauth_callback: str (optional) If set, it is assume the client is using the OAuth v1.0a protocol where the callback url is sent in the request token step. If the oauth_callback is also set in extra_params, this value will override that one. Returns: The fetched request token as a gdata.auth.OAuthToken object. Raises: FetchingOAuthRequestTokenFailed if the server responded to the request with an error. """ if scopes is None: scopes = lookup_scopes(self.service) if not isinstance(scopes, (list, tuple)): scopes = [scopes,] if oauth_callback: if extra_parameters is not None: extra_parameters['oauth_callback'] = oauth_callback else: extra_parameters = {'oauth_callback': oauth_callback} request_token_url = gdata.auth.GenerateOAuthRequestTokenUrl( self._oauth_input_params, scopes, request_token_url=request_url, extra_parameters=extra_parameters) response = self.http_client.request('GET', str(request_token_url)) if response.status == 200: token = gdata.auth.OAuthToken() token.set_token_string(response.read()) token.scopes = scopes token.oauth_input_params = self._oauth_input_params self.SetOAuthToken(token) return token error = { 'status': response.status, 'reason': 'Non 200 response on fetch request token', 'body': response.read() } raise FetchingOAuthRequestTokenFailed(error) def SetOAuthToken(self, oauth_token): """Attempts to set the current token and add it to the token store. The oauth_token can be any OAuth token i.e. unauthorized request token, authorized request token or access token. This method also attempts to add the token to the token store. Use this method any time you want the current token to point to the oauth_token passed. For e.g. call this method with the request token you receive from FetchOAuthRequestToken. Args: request_token: gdata.auth.OAuthToken OAuth request token. """ if self.auto_set_current_token: self.current_token = oauth_token if self.auto_store_tokens: self.token_store.add_token(oauth_token) def GenerateOAuthAuthorizationURL( self, request_token=None, callback_url=None, extra_params=None, include_scopes_in_callback=False, scopes_param_prefix=OAUTH_SCOPE_URL_PARAM_NAME, request_url='%s/accounts/OAuthAuthorizeToken' % AUTH_SERVER_HOST): """Generates URL at which user will login to authorize the request token. Args: request_token: gdata.auth.OAuthToken (optional) OAuth request token. If not specified, then the current token will be used if it is of type <gdata.auth.OAuthToken>, else it is found by looking in the token_store by looking for a token for the current scope. callback_url: string (optional) The URL user will be sent to after logging in and granting access. extra_params: dict (optional) Additional parameters to be sent. include_scopes_in_callback: Boolean (default=False) if set to True, and if 'callback_url' is present, the 'callback_url' will be modified to include the scope(s) from the request token as a URL parameter. The key for the 'callback' URL's scope parameter will be OAUTH_SCOPE_URL_PARAM_NAME. The benefit of including the scope URL as a parameter to the 'callback' URL, is that the page which receives the OAuth token will be able to tell which URLs the token grants access to. scopes_param_prefix: string (default='oauth_token_scope') The URL parameter key which maps to the list of valid scopes for the token. This URL parameter will be included in the callback URL along with the scopes of the token as value if include_scopes_in_callback=True. request_url: Authorization URL. The default is 'https://www.google.com/accounts/OAuthAuthorizeToken'. Returns: A string URL at which the user is required to login. Raises: NonOAuthToken if the user's request token is not an OAuth token or if a request token was not available. """ if request_token and not isinstance(request_token, gdata.auth.OAuthToken): raise NonOAuthToken if not request_token: if isinstance(self.current_token, gdata.auth.OAuthToken): request_token = self.current_token else: current_scopes = lookup_scopes(self.service) if current_scopes: token = self.token_store.find_token(current_scopes[0]) if isinstance(token, gdata.auth.OAuthToken): request_token = token if not request_token: raise NonOAuthToken return str(gdata.auth.GenerateOAuthAuthorizationUrl( request_token, authorization_url=request_url, callback_url=callback_url, extra_params=extra_params, include_scopes_in_callback=include_scopes_in_callback, scopes_param_prefix=scopes_param_prefix)) def UpgradeToOAuthAccessToken(self, authorized_request_token=None, request_url='%s/accounts/OAuthGetAccessToken' \ % AUTH_SERVER_HOST, oauth_version='1.0', oauth_verifier=None): """Upgrades the authorized request token to an access token and returns it Args: authorized_request_token: gdata.auth.OAuthToken (optional) OAuth request token. If not specified, then the current token will be used if it is of type <gdata.auth.OAuthToken>, else it is found by looking in the token_store by looking for a token for the current scope. request_url: Access token URL. The default is 'https://www.google.com/accounts/OAuthGetAccessToken'. oauth_version: str (default='1.0') oauth_version parameter. All other 'oauth_' parameters are added by default. This parameter too, is added by default but here you can override it's value. oauth_verifier: str (optional) If present, it is assumed that the client will use the OAuth v1.0a protocol which includes passing the oauth_verifier (as returned by the SP) in the access token step. Returns: Access token Raises: NonOAuthToken if the user's authorized request token is not an OAuth token or if an authorized request token was not available. TokenUpgradeFailed if the server responded to the request with an error. """ if (authorized_request_token and not isinstance(authorized_request_token, gdata.auth.OAuthToken)): raise NonOAuthToken if not authorized_request_token: if isinstance(self.current_token, gdata.auth.OAuthToken): authorized_request_token = self.current_token else: current_scopes = lookup_scopes(self.service) if current_scopes: token = self.token_store.find_token(current_scopes[0]) if isinstance(token, gdata.auth.OAuthToken): authorized_request_token = token if not authorized_request_token: raise NonOAuthToken access_token_url = gdata.auth.GenerateOAuthAccessTokenUrl( authorized_request_token, self._oauth_input_params, access_token_url=request_url, oauth_version=oauth_version, oauth_verifier=oauth_verifier) response = self.http_client.request('GET', str(access_token_url)) if response.status == 200: token = gdata.auth.OAuthTokenFromHttpBody(response.read()) token.scopes = authorized_request_token.scopes token.oauth_input_params = authorized_request_token.oauth_input_params self.SetOAuthToken(token) return token else: raise TokenUpgradeFailed({'status': response.status, 'reason': 'Non 200 response on upgrade', 'body': response.read()}) def RevokeOAuthToken(self, request_url='%s/accounts/AuthSubRevokeToken' % \ AUTH_SERVER_HOST): """Revokes an existing OAuth token. request_url: Token revoke URL. The default is 'https://www.google.com/accounts/AuthSubRevokeToken'. Raises: NonOAuthToken if the user's auth token is not an OAuth token. RevokingOAuthTokenFailed if request for revoking an OAuth token failed. """ scopes = lookup_scopes(self.service) token = self.token_store.find_token(scopes[0]) if not isinstance(token, gdata.auth.OAuthToken): raise NonOAuthToken response = token.perform_request(self.http_client, 'GET', request_url, headers={'Content-Type':'application/x-www-form-urlencoded'}) if response.status == 200: self.token_store.remove_token(token) else: raise RevokingOAuthTokenFailed def GetAuthSubToken(self): """Returns the AuthSub token as a string. If the token is an gdta.auth.AuthSubToken, the Authorization Label ("AuthSub token") is removed. This method examines the current_token to see if it is an AuthSubToken or SecureAuthSubToken. If not, it searches the token_store for a token which matches the current scope. The current scope is determined by the service name string member. Returns: If the current_token is set to an AuthSubToken/SecureAuthSubToken, return the token string. If there is no current_token, a token string for a token which matches the service object's default scope is returned. If there are no tokens valid for the scope, returns None. """ if isinstance(self.current_token, gdata.auth.AuthSubToken): return self.current_token.get_token_string() current_scopes = lookup_scopes(self.service) if current_scopes: token = self.token_store.find_token(current_scopes[0]) if isinstance(token, gdata.auth.AuthSubToken): return token.get_token_string() else: token = self.token_store.find_token(atom.token_store.SCOPE_ALL) if isinstance(token, gdata.auth.ClientLoginToken): return token.get_token_string() return None def SetAuthSubToken(self, token, scopes=None, rsa_key=None): """Sets the token sent in requests to an AuthSub token. Sets the current_token and attempts to add the token to the token_store. Only use this method if you have received a token from the AuthSub service. The auth token is set automatically when UpgradeToSessionToken() is used. See documentation for Google AuthSub here: http://code.google.com/apis/accounts/AuthForWebApps.html Args: token: gdata.auth.AuthSubToken or gdata.auth.SecureAuthSubToken or string The token returned by the AuthSub service. If the token is an AuthSubToken or SecureAuthSubToken, the scope information stored in the token is used. If the token is a string, the scopes parameter is used to determine the valid scopes. scopes: list of URLs for which the token is valid. This is only used if the token parameter is a string. rsa_key: string (optional) Private key required for RSA_SHA1 signature method. This parameter is necessary if the token is a string representing a secure token. """ if not isinstance(token, gdata.auth.AuthSubToken): token_string = token if rsa_key: token = gdata.auth.SecureAuthSubToken(rsa_key) else: token = gdata.auth.AuthSubToken() token.set_token_string(token_string) # If no scopes were set for the token, use the scopes passed in, or # try to determine the scopes based on the current service name. If # all else fails, set the token to match all requests. if not token.scopes: if scopes is None: scopes = lookup_scopes(self.service) if scopes is None: scopes = [atom.token_store.SCOPE_ALL] token.scopes = scopes if self.auto_set_current_token: self.current_token = token if self.auto_store_tokens: self.token_store.add_token(token) def GetClientLoginToken(self): """Returns the token string for the current token or a token matching the service scope. If the current_token is a ClientLoginToken, the token string for the current token is returned. If the current_token is not set, this method searches for a token in the token_store which is valid for the service object's current scope. The current scope is determined by the service name string member. The token string is the end of the Authorization header, it doesn not include the ClientLogin label. """ if isinstance(self.current_token, gdata.auth.ClientLoginToken): return self.current_token.get_token_string() current_scopes = lookup_scopes(self.service) if current_scopes: token = self.token_store.find_token(current_scopes[0]) if isinstance(token, gdata.auth.ClientLoginToken): return token.get_token_string() else: token = self.token_store.find_token(atom.token_store.SCOPE_ALL) if isinstance(token, gdata.auth.ClientLoginToken): return token.get_token_string() return None def SetClientLoginToken(self, token, scopes=None): """Sets the token sent in requests to a ClientLogin token. This method sets the current_token to a new ClientLoginToken and it also attempts to add the ClientLoginToken to the token_store. Only use this method if you have received a token from the ClientLogin service. The auth_token is set automatically when ProgrammaticLogin() is used. See documentation for Google ClientLogin here: http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html Args: token: string or instance of a ClientLoginToken. """ if not isinstance(token, gdata.auth.ClientLoginToken): token_string = token token = gdata.auth.ClientLoginToken() token.set_token_string(token_string) if not token.scopes: if scopes is None: scopes = lookup_scopes(self.service) if scopes is None: scopes = [atom.token_store.SCOPE_ALL] token.scopes = scopes if self.auto_set_current_token: self.current_token = token if self.auto_store_tokens: self.token_store.add_token(token) # Private methods to create the source property. def __GetSource(self): return self.__source def __SetSource(self, new_source): self.__source = new_source # Update the UserAgent header to include the new application name. self.additional_headers['User-Agent'] = atom.http_interface.USER_AGENT % ( self.__source,) source = property(__GetSource, __SetSource, doc="""The source is the name of the application making the request. It should be in the form company_id-app_name-app_version""") # Authentication operations def ProgrammaticLogin(self, captcha_token=None, captcha_response=None): """Authenticates the user and sets the GData Auth token. Login retreives a temporary auth token which must be used with all requests to GData services. The auth token is stored in the GData client object. Login is also used to respond to a captcha challenge. If the user's login attempt failed with a CaptchaRequired error, the user can respond by calling Login with the captcha token and the answer to the challenge. Args: captcha_token: string (optional) The identifier for the captcha challenge which was presented to the user. captcha_response: string (optional) The user's answer to the captch challenge. Raises: CaptchaRequired if the login service will require a captcha response BadAuthentication if the login service rejected the username or password Error if the login service responded with a 403 different from the above """ request_body = gdata.auth.generate_client_login_request_body(self.email, self.password, self.service, self.source, self.account_type, captcha_token, captcha_response) # If the user has defined their own authentication service URL, # send the ClientLogin requests to this URL: if not self.auth_service_url: auth_request_url = AUTH_SERVER_HOST + '/accounts/ClientLogin' else: auth_request_url = self.auth_service_url auth_response = self.http_client.request('POST', auth_request_url, data=request_body, headers={'Content-Type':'application/x-www-form-urlencoded'}) response_body = auth_response.read() if auth_response.status == 200: # TODO: insert the token into the token_store directly. self.SetClientLoginToken( gdata.auth.get_client_login_token(response_body)) self.__captcha_token = None self.__captcha_url = None elif auth_response.status == 403: # Examine each line to find the error type and the captcha token and # captch URL if they are present. captcha_parameters = gdata.auth.get_captcha_challenge(response_body, captcha_base_url='%s/accounts/' % AUTH_SERVER_HOST) if captcha_parameters: self.__captcha_token = captcha_parameters['token'] self.__captcha_url = captcha_parameters['url'] raise CaptchaRequired, 'Captcha Required' elif response_body.splitlines()[0] == 'Error=BadAuthentication': self.__captcha_token = None self.__captcha_url = None raise BadAuthentication, 'Incorrect username or password' else: self.__captcha_token = None self.__captcha_url = None raise Error, 'Server responded with a 403 code' elif auth_response.status == 302: self.__captcha_token = None self.__captcha_url = None # Google tries to redirect all bad URLs back to # http://www.google.<locale>. If a redirect # attempt is made, assume the user has supplied an incorrect authentication URL raise BadAuthenticationServiceURL, 'Server responded with a 302 code.' def ClientLogin(self, username, password, account_type=None, service=None, auth_service_url=None, source=None, captcha_token=None, captcha_response=None): """Convenience method for authenticating using ProgrammaticLogin. Sets values for email, password, and other optional members. Args: username: password: account_type: string (optional) service: string (optional) auth_service_url: string (optional) captcha_token: string (optional) captcha_response: string (optional) """ self.email = username self.password = password if account_type: self.account_type = account_type if service: self.service = service if source: self.source = source if auth_service_url: self.auth_service_url = auth_service_url self.ProgrammaticLogin(captcha_token, captcha_response) def GenerateAuthSubURL(self, next, scope, secure=False, session=True, domain='default'): """Generate a URL at which the user will login and be redirected back. Users enter their credentials on a Google login page and a token is sent to the URL specified in next. See documentation for AuthSub login at: http://code.google.com/apis/accounts/docs/AuthSub.html Args: next: string The URL user will be sent to after logging in. scope: string or list of strings. The URLs of the services to be accessed. secure: boolean (optional) Determines whether or not the issued token is a secure token. session: boolean (optional) Determines whether or not the issued token can be upgraded to a session token. """ if not isinstance(scope, (list, tuple)): scope = (scope,) return gdata.auth.generate_auth_sub_url(next, scope, secure=secure, session=session, request_url='%s/accounts/AuthSubRequest' % AUTH_SERVER_HOST, domain=domain) def UpgradeToSessionToken(self, token=None): """Upgrades a single use AuthSub token to a session token. Args: token: A gdata.auth.AuthSubToken or gdata.auth.SecureAuthSubToken (optional) which is good for a single use but can be upgraded to a session token. If no token is passed in, the token is found by looking in the token_store by looking for a token for the current scope. Raises: NonAuthSubToken if the user's auth token is not an AuthSub token TokenUpgradeFailed if the server responded to the request with an error. """ if token is None: scopes = lookup_scopes(self.service) if scopes: token = self.token_store.find_token(scopes[0]) else: token = self.token_store.find_token(atom.token_store.SCOPE_ALL) if not isinstance(token, gdata.auth.AuthSubToken): raise NonAuthSubToken self.SetAuthSubToken(self.upgrade_to_session_token(token)) def upgrade_to_session_token(self, token): """Upgrades a single use AuthSub token to a session token. Args: token: A gdata.auth.AuthSubToken or gdata.auth.SecureAuthSubToken which is good for a single use but can be upgraded to a session token. Returns: The upgraded token as a gdata.auth.AuthSubToken object. Raises: TokenUpgradeFailed if the server responded to the request with an error. """ response = token.perform_request(self.http_client, 'GET', AUTH_SERVER_HOST + '/accounts/AuthSubSessionToken', headers={'Content-Type':'application/x-www-form-urlencoded'}) response_body = response.read() if response.status == 200: token.set_token_string( gdata.auth.token_from_http_body(response_body)) return token else: raise TokenUpgradeFailed({'status': response.status, 'reason': 'Non 200 response on upgrade', 'body': response_body}) def RevokeAuthSubToken(self): """Revokes an existing AuthSub token. Raises: NonAuthSubToken if the user's auth token is not an AuthSub token """ scopes = lookup_scopes(self.service) token = self.token_store.find_token(scopes[0]) if not isinstance(token, gdata.auth.AuthSubToken): raise NonAuthSubToken response = token.perform_request(self.http_client, 'GET', AUTH_SERVER_HOST + '/accounts/AuthSubRevokeToken', headers={'Content-Type':'application/x-www-form-urlencoded'}) if response.status == 200: self.token_store.remove_token(token) def AuthSubTokenInfo(self): """Fetches the AuthSub token's metadata from the server. Raises: NonAuthSubToken if the user's auth token is not an AuthSub token """ scopes = lookup_scopes(self.service) token = self.token_store.find_token(scopes[0]) if not isinstance(token, gdata.auth.AuthSubToken): raise NonAuthSubToken response = token.perform_request(self.http_client, 'GET', AUTH_SERVER_HOST + '/accounts/AuthSubTokenInfo', headers={'Content-Type':'application/x-www-form-urlencoded'}) result_body = response.read() if response.status == 200: return result_body else: raise RequestError, {'status': response.status, 'body': result_body} def GetWithRetries(self, uri, extra_headers=None, redirects_remaining=4, encoding='UTF-8', converter=None, num_retries=DEFAULT_NUM_RETRIES, delay=DEFAULT_DELAY, backoff=DEFAULT_BACKOFF, logger=None): """This is a wrapper method for Get with retrying capability. To avoid various errors while retrieving bulk entities by retrying specified times. Note this method relies on the time module and so may not be usable by default in Python2.2. Args: num_retries: Integer; the retry count. delay: Integer; the initial delay for retrying. backoff: Integer; how much the delay should lengthen after each failure. logger: An object which has a debug(str) method to receive logging messages. Recommended that you pass in the logging module. Raises: ValueError if any of the parameters has an invalid value. RanOutOfTries on failure after number of retries. """ # Moved import for time module inside this method since time is not a # default module in Python2.2. This method will not be usable in # Python2.2. import time if backoff <= 1: raise ValueError("backoff must be greater than 1") num_retries = int(num_retries) if num_retries < 0: raise ValueError("num_retries must be 0 or greater") if delay <= 0: raise ValueError("delay must be greater than 0") # Let's start mtries, mdelay = num_retries, delay while mtries > 0: if mtries != num_retries: if logger: logger.debug("Retrying: %s" % uri) try: rv = self.Get(uri, extra_headers=extra_headers, redirects_remaining=redirects_remaining, encoding=encoding, converter=converter) except SystemExit: # Allow this error raise except RequestError, e: # Error 500 is 'internal server error' and warrants a retry # Error 503 is 'service unavailable' and warrants a retry if e[0]['status'] not in [500, 503]: raise e # Else, fall through to the retry code... except Exception, e: if logger: logger.debug(e) # Fall through to the retry code... else: # This is the right path. return rv mtries -= 1 time.sleep(mdelay) mdelay *= backoff raise RanOutOfTries('Ran out of tries.') # CRUD operations def Get(self, uri, extra_headers=None, redirects_remaining=4, encoding='UTF-8', converter=None): """Query the GData API with the given URI The uri is the portion of the URI after the server value (ex: www.google.com). To perform a query against Google Base, set the server to 'base.google.com' and set the uri to '/base/feeds/...', where ... is your query. For example, to find snippets for all digital cameras uri should be set to: '/base/feeds/snippets?bq=digital+camera' Args: uri: string The query in the form of a URI. Example: '/base/feeds/snippets?bq=digital+camera'. extra_headers: dictionary (optional) Extra HTTP headers to be included in the GET request. These headers are in addition to those stored in the client's additional_headers property. The client automatically sets the Content-Type and Authorization headers. redirects_remaining: int (optional) Tracks the number of additional redirects this method will allow. If the service object receives a redirect and remaining is 0, it will not follow the redirect. This was added to avoid infinite redirect loops. encoding: string (optional) The character encoding for the server's response. Default is UTF-8 converter: func (optional) A function which will transform the server's results before it is returned. Example: use GDataFeedFromString to parse the server response as if it were a GDataFeed. Returns: If there is no ResultsTransformer specified in the call, a GDataFeed or GDataEntry depending on which is sent from the server. If the response is niether a feed or entry and there is no ResultsTransformer, return a string. If there is a ResultsTransformer, the returned value will be that of the ResultsTransformer function. """ if extra_headers is None: extra_headers = {} if self.__gsessionid is not None: if uri.find('gsessionid=') < 0: if uri.find('?') > -1: uri += '&gsessionid=%s' % (self.__gsessionid,) else: uri += '?gsessionid=%s' % (self.__gsessionid,) server_response = self.request('GET', uri, headers=extra_headers) result_body = server_response.read() if server_response.status == 200: if converter: return converter(result_body) # There was no ResultsTransformer specified, so try to convert the # server's response into a GDataFeed. feed = gdata.GDataFeedFromString(result_body) if not feed: # If conversion to a GDataFeed failed, try to convert the server's # response to a GDataEntry. entry = gdata.GDataEntryFromString(result_body) if not entry: # The server's response wasn't a feed, or an entry, so return the # response body as a string. return result_body return entry return feed elif server_response.status in (301, 302): if redirects_remaining > 0: location = (server_response.getheader('Location') or server_response.getheader('location')) if location is not None: m = re.compile('[\?\&]gsessionid=(\w*\-)').search(location) if m is not None: self.__gsessionid = m.group(1) return GDataService.Get(self, location, extra_headers, redirects_remaining - 1, encoding=encoding, converter=converter) else: raise RequestError, {'status': server_response.status, 'reason': '302 received without Location header', 'body': result_body} else: raise RequestError, {'status': server_response.status, 'reason': 'Redirect received, but redirects_remaining <= 0', 'body': result_body} else: raise RequestError, {'status': server_response.status, 'reason': server_response.reason, 'body': result_body} def GetMedia(self, uri, extra_headers=None): """Returns a MediaSource containing media and its metadata from the given URI string. """ response_handle = self.request('GET', uri, headers=extra_headers) return gdata.MediaSource(response_handle, response_handle.getheader( 'Content-Type'), response_handle.getheader('Content-Length')) def GetEntry(self, uri, extra_headers=None): """Query the GData API with the given URI and receive an Entry. See also documentation for gdata.service.Get Args: uri: string The query in the form of a URI. Example: '/base/feeds/snippets?bq=digital+camera'. extra_headers: dictionary (optional) Extra HTTP headers to be included in the GET request. These headers are in addition to those stored in the client's additional_headers property. The client automatically sets the Content-Type and Authorization headers. Returns: A GDataEntry built from the XML in the server's response. """ result = GDataService.Get(self, uri, extra_headers, converter=atom.EntryFromString) if isinstance(result, atom.Entry): return result else: raise UnexpectedReturnType, 'Server did not send an entry' def GetFeed(self, uri, extra_headers=None, converter=gdata.GDataFeedFromString): """Query the GData API with the given URI and receive a Feed. See also documentation for gdata.service.Get Args: uri: string The query in the form of a URI. Example: '/base/feeds/snippets?bq=digital+camera'. extra_headers: dictionary (optional) Extra HTTP headers to be included in the GET request. These headers are in addition to those stored in the client's additional_headers property. The client automatically sets the Content-Type and Authorization headers. Returns: A GDataFeed built from the XML in the server's response. """ result = GDataService.Get(self, uri, extra_headers, converter=converter) if isinstance(result, atom.Feed): return result else: raise UnexpectedReturnType, 'Server did not send a feed' def GetNext(self, feed): """Requests the next 'page' of results in the feed. This method uses the feed's next link to request an additional feed and uses the class of the feed to convert the results of the GET request. Args: feed: atom.Feed or a subclass. The feed should contain a next link and the type of the feed will be applied to the results from the server. The new feed which is returned will be of the same class as this feed which was passed in. Returns: A new feed representing the next set of results in the server's feed. The type of this feed will match that of the feed argument. """ next_link = feed.GetNextLink() # Create a closure which will convert an XML string to the class of # the feed object passed in. def ConvertToFeedClass(xml_string): return atom.CreateClassFromXMLString(feed.__class__, xml_string) # Make a GET request on the next link and use the above closure for the # converted which processes the XML string from the server. if next_link and next_link.href: return GDataService.Get(self, next_link.href, converter=ConvertToFeedClass) else: return None def Post(self, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4, media_source=None, converter=None): """Insert or update data into a GData service at the given URI. Args: data: string, ElementTree._Element, atom.Entry, or gdata.GDataEntry The XML to be sent to the uri. uri: string The location (feed) to which the data should be inserted. Example: '/base/feeds/items'. extra_headers: dict (optional) HTTP headers which are to be included. The client automatically sets the Content-Type, Authorization, and Content-Length headers. url_params: dict (optional) Additional URL parameters to be included in the URI. These are translated into query arguments in the form '&dict_key=value&...'. Example: {'max-results': '250'} becomes &max-results=250 escape_params: boolean (optional) If false, the calling code has already ensured that the query will form a valid URL (all reserved characters have been escaped). If true, this method will escape the query and any URL parameters provided. media_source: MediaSource (optional) Container for the media to be sent along with the entry, if provided. converter: func (optional) A function which will be executed on the server's response. Often this is a function like GDataEntryFromString which will parse the body of the server's response and return a GDataEntry. Returns: If the post succeeded, this method will return a GDataFeed, GDataEntry, or the results of running converter on the server's result body (if converter was specified). """ return GDataService.PostOrPut(self, 'POST', data, uri, extra_headers=extra_headers, url_params=url_params, escape_params=escape_params, redirects_remaining=redirects_remaining, media_source=media_source, converter=converter) def PostOrPut(self, verb, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4, media_source=None, converter=None): """Insert data into a GData service at the given URI. Args: verb: string, either 'POST' or 'PUT' data: string, ElementTree._Element, atom.Entry, or gdata.GDataEntry The XML to be sent to the uri. uri: string The location (feed) to which the data should be inserted. Example: '/base/feeds/items'. extra_headers: dict (optional) HTTP headers which are to be included. The client automatically sets the Content-Type, Authorization, and Content-Length headers. url_params: dict (optional) Additional URL parameters to be included in the URI. These are translated into query arguments in the form '&dict_key=value&...'. Example: {'max-results': '250'} becomes &max-results=250 escape_params: boolean (optional) If false, the calling code has already ensured that the query will form a valid URL (all reserved characters have been escaped). If true, this method will escape the query and any URL parameters provided. media_source: MediaSource (optional) Container for the media to be sent along with the entry, if provided. converter: func (optional) A function which will be executed on the server's response. Often this is a function like GDataEntryFromString which will parse the body of the server's response and return a GDataEntry. Returns: If the post succeeded, this method will return a GDataFeed, GDataEntry, or the results of running converter on the server's result body (if converter was specified). """ if extra_headers is None: extra_headers = {} if self.__gsessionid is not None: if uri.find('gsessionid=') < 0: if url_params is None: url_params = {} url_params['gsessionid'] = self.__gsessionid if data and media_source: if ElementTree.iselement(data): data_str = ElementTree.tostring(data) else: data_str = str(data) multipart = [] multipart.append('Media multipart posting\r\n--END_OF_PART\r\n' + \ 'Content-Type: application/atom+xml\r\n\r\n') multipart.append('\r\n--END_OF_PART\r\nContent-Type: ' + \ media_source.content_type+'\r\n\r\n') multipart.append('\r\n--END_OF_PART--\r\n') extra_headers['MIME-version'] = '1.0' extra_headers['Content-Length'] = str(len(multipart[0]) + len(multipart[1]) + len(multipart[2]) + len(data_str) + media_source.content_length) extra_headers['Content-Type'] = 'multipart/related; boundary=END_OF_PART' server_response = self.request(verb, uri, data=[multipart[0], data_str, multipart[1], media_source.file_handle, multipart[2]], headers=extra_headers, url_params=url_params) result_body = server_response.read() elif media_source or isinstance(data, gdata.MediaSource): if isinstance(data, gdata.MediaSource): media_source = data extra_headers['Content-Length'] = str(media_source.content_length) extra_headers['Content-Type'] = media_source.content_type server_response = self.request(verb, uri, data=media_source.file_handle, headers=extra_headers, url_params=url_params) result_body = server_response.read() else: http_data = data if 'Content-Type' not in extra_headers: content_type = 'application/atom+xml' extra_headers['Content-Type'] = content_type server_response = self.request(verb, uri, data=http_data, headers=extra_headers, url_params=url_params) result_body = server_response.read() # Server returns 201 for most post requests, but when performing a batch # request the server responds with a 200 on success. if server_response.status == 201 or server_response.status == 200: if converter: return converter(result_body) feed = gdata.GDataFeedFromString(result_body) if not feed: entry = gdata.GDataEntryFromString(result_body) if not entry: return result_body return entry return feed elif server_response.status == 302: if redirects_remaining > 0: location = (server_response.getheader('Location') or server_response.getheader('location')) if location is not None: m = re.compile('[\?\&]gsessionid=(\w*\-)').search(location) if m is not None: self.__gsessionid = m.group(1) return GDataService.PostOrPut(self, verb, data, location, extra_headers, url_params, escape_params, redirects_remaining - 1, media_source, converter=converter) else: raise RequestError, {'status': server_response.status, 'reason': '302 received without Location header', 'body': result_body} else: raise RequestError, {'status': server_response.status, 'reason': 'Redirect received, but redirects_remaining <= 0', 'body': result_body} else: raise RequestError, {'status': server_response.status, 'reason': server_response.reason, 'body': result_body} def Put(self, data, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=3, media_source=None, converter=None): """Updates an entry at the given URI. Args: data: string, ElementTree._Element, or xml_wrapper.ElementWrapper The XML containing the updated data. uri: string A URI indicating entry to which the update will be applied. Example: '/base/feeds/items/ITEM-ID' extra_headers: dict (optional) HTTP headers which are to be included. The client automatically sets the Content-Type, Authorization, and Content-Length headers. url_params: dict (optional) Additional URL parameters to be included in the URI. These are translated into query arguments in the form '&dict_key=value&...'. Example: {'max-results': '250'} becomes &max-results=250 escape_params: boolean (optional) If false, the calling code has already ensured that the query will form a valid URL (all reserved characters have been escaped). If true, this method will escape the query and any URL parameters provided. converter: func (optional) A function which will be executed on the server's response. Often this is a function like GDataEntryFromString which will parse the body of the server's response and return a GDataEntry. Returns: If the put succeeded, this method will return a GDataFeed, GDataEntry, or the results of running converter on the server's result body (if converter was specified). """ return GDataService.PostOrPut(self, 'PUT', data, uri, extra_headers=extra_headers, url_params=url_params, escape_params=escape_params, redirects_remaining=redirects_remaining, media_source=media_source, converter=converter) def Delete(self, uri, extra_headers=None, url_params=None, escape_params=True, redirects_remaining=4): """Deletes the entry at the given URI. Args: uri: string The URI of the entry to be deleted. Example: '/base/feeds/items/ITEM-ID' extra_headers: dict (optional) HTTP headers which are to be included. The client automatically sets the Content-Type and Authorization headers. url_params: dict (optional) Additional URL parameters to be included in the URI. These are translated into query arguments in the form '&dict_key=value&...'. Example: {'max-results': '250'} becomes &max-results=250 escape_params: boolean (optional) If false, the calling code has already ensured that the query will form a valid URL (all reserved characters have been escaped). If true, this method will escape the query and any URL parameters provided. Returns: True if the entry was deleted. """ if extra_headers is None: extra_headers = {} if self.__gsessionid is not None: if uri.find('gsessionid=') < 0: if url_params is None: url_params = {} url_params['gsessionid'] = self.__gsessionid server_response = self.request('DELETE', uri, headers=extra_headers, url_params=url_params) result_body = server_response.read() if server_response.status == 200: return True elif server_response.status == 302: if redirects_remaining > 0: location = (server_response.getheader('Location') or server_response.getheader('location')) if location is not None: m = re.compile('[\?\&]gsessionid=(\w*\-)').search(location) if m is not None: self.__gsessionid = m.group(1) return GDataService.Delete(self, location, extra_headers, url_params, escape_params, redirects_remaining - 1) else: raise RequestError, {'status': server_response.status, 'reason': '302 received without Location header', 'body': result_body} else: raise RequestError, {'status': server_response.status, 'reason': 'Redirect received, but redirects_remaining <= 0', 'body': result_body} else: raise RequestError, {'status': server_response.status, 'reason': server_response.reason, 'body': result_body} def ExtractToken(url, scopes_included_in_next=True): """Gets the AuthSub token from the current page's URL. Designed to be used on the URL that the browser is sent to after the user authorizes this application at the page given by GenerateAuthSubRequestUrl. Args: url: The current page's URL. It should contain the token as a URL parameter. Example: 'http://example.com/?...&token=abcd435' scopes_included_in_next: If True, this function looks for a scope value associated with the token. The scope is a URL parameter with the key set to SCOPE_URL_PARAM_NAME. This parameter should be present if the AuthSub request URL was generated using GenerateAuthSubRequestUrl with include_scope_in_next set to True. Returns: A tuple containing the token string and a list of scope strings for which this token should be valid. If the scope was not included in the URL, the tuple will contain (token, None). """ parsed = urlparse.urlparse(url) token = gdata.auth.AuthSubTokenFromUrl(parsed[4]) scopes = '' if scopes_included_in_next: for pair in parsed[4].split('&'): if pair.startswith('%s=' % SCOPE_URL_PARAM_NAME): scopes = urllib.unquote_plus(pair.split('=')[1]) return (token, scopes.split(' ')) def GenerateAuthSubRequestUrl(next, scopes, hd='default', secure=False, session=True, request_url='https://www.google.com/accounts/AuthSubRequest', include_scopes_in_next=True): """Creates a URL to request an AuthSub token to access Google services. For more details on AuthSub, see the documentation here: http://code.google.com/apis/accounts/docs/AuthSub.html Args: next: The URL where the browser should be sent after the user authorizes the application. This page is responsible for receiving the token which is embeded in the URL as a parameter. scopes: The base URL to which access will be granted. Example: 'http://www.google.com/calendar/feeds' will grant access to all URLs in the Google Calendar data API. If you would like a token for multiple scopes, pass in a list of URL strings. hd: The domain to which the user's account belongs. This is set to the domain name if you are using Google Apps. Example: 'example.org' Defaults to 'default' secure: If set to True, all requests should be signed. The default is False. session: If set to True, the token received by the 'next' URL can be upgraded to a multiuse session token. If session is set to False, the token may only be used once and cannot be upgraded. Default is True. request_url: The base of the URL to which the user will be sent to authorize this application to access their data. The default is 'https://www.google.com/accounts/AuthSubRequest'. include_scopes_in_next: Boolean if set to true, the 'next' parameter will be modified to include the requested scope as a URL parameter. The key for the next's scope parameter will be SCOPE_URL_PARAM_NAME. The benefit of including the scope URL as a parameter to the next URL, is that the page which receives the AuthSub token will be able to tell which URLs the token grants access to. Returns: A URL string to which the browser should be sent. """ if isinstance(scopes, list): scope = ' '.join(scopes) else: scope = scopes if include_scopes_in_next: if next.find('?') > -1: next += '&%s' % urllib.urlencode({SCOPE_URL_PARAM_NAME:scope}) else: next += '?%s' % urllib.urlencode({SCOPE_URL_PARAM_NAME:scope}) return gdata.auth.GenerateAuthSubUrl(next=next, scope=scope, secure=secure, session=session, request_url=request_url, domain=hd) class Query(dict): """Constructs a query URL to be used in GET requests Url parameters are created by adding key-value pairs to this object as a dict. For example, to add &max-results=25 to the URL do my_query['max-results'] = 25 Category queries are created by adding category strings to the categories member. All items in the categories list will be concatenated with the / symbol (symbolizing a category x AND y restriction). If you would like to OR 2 categories, append them as one string with a | between the categories. For example, do query.categories.append('Fritz|Laurie') to create a query like this feed/-/Fritz%7CLaurie . This query will look for results in both categories. """ def __init__(self, feed=None, text_query=None, params=None, categories=None): """Constructor for Query Args: feed: str (optional) The path for the feed (Examples: '/base/feeds/snippets' or 'calendar/feeds/[email protected]/private/full' text_query: str (optional) The contents of the q query parameter. The contents of the text_query are URL escaped upon conversion to a URI. params: dict (optional) Parameter value string pairs which become URL params when translated to a URI. These parameters are added to the query's items (key-value pairs). categories: list (optional) List of category strings which should be included as query categories. See http://code.google.com/apis/gdata/reference.html#Queries for details. If you want to get results from category A or B (both categories), specify a single list item 'A|B'. """ self.feed = feed self.categories = [] if text_query: self.text_query = text_query if isinstance(params, dict): for param in params: self[param] = params[param] if isinstance(categories, list): for category in categories: self.categories.append(category) def _GetTextQuery(self): if 'q' in self.keys(): return self['q'] else: return None def _SetTextQuery(self, query): self['q'] = query text_query = property(_GetTextQuery, _SetTextQuery, doc="""The feed query's q parameter""") def _GetAuthor(self): if 'author' in self.keys(): return self['author'] else: return None def _SetAuthor(self, query): self['author'] = query author = property(_GetAuthor, _SetAuthor, doc="""The feed query's author parameter""") def _GetAlt(self): if 'alt' in self.keys(): return self['alt'] else: return None def _SetAlt(self, query): self['alt'] = query alt = property(_GetAlt, _SetAlt, doc="""The feed query's alt parameter""") def _GetUpdatedMin(self): if 'updated-min' in self.keys(): return self['updated-min'] else: return None def _SetUpdatedMin(self, query): self['updated-min'] = query updated_min = property(_GetUpdatedMin, _SetUpdatedMin, doc="""The feed query's updated-min parameter""") def _GetUpdatedMax(self): if 'updated-max' in self.keys(): return self['updated-max'] else: return None def _SetUpdatedMax(self, query): self['updated-max'] = query updated_max = property(_GetUpdatedMax, _SetUpdatedMax, doc="""The feed query's updated-max parameter""") def _GetPublishedMin(self): if 'published-min' in self.keys(): return self['published-min'] else: return None def _SetPublishedMin(self, query): self['published-min'] = query published_min = property(_GetPublishedMin, _SetPublishedMin, doc="""The feed query's published-min parameter""") def _GetPublishedMax(self): if 'published-max' in self.keys(): return self['published-max'] else: return None def _SetPublishedMax(self, query): self['published-max'] = query published_max = property(_GetPublishedMax, _SetPublishedMax, doc="""The feed query's published-max parameter""") def _GetStartIndex(self): if 'start-index' in self.keys(): return self['start-index'] else: return None def _SetStartIndex(self, query): if not isinstance(query, str): query = str(query) self['start-index'] = query start_index = property(_GetStartIndex, _SetStartIndex, doc="""The feed query's start-index parameter""") def _GetMaxResults(self): if 'max-results' in self.keys(): return self['max-results'] else: return None def _SetMaxResults(self, query): if not isinstance(query, str): query = str(query) self['max-results'] = query max_results = property(_GetMaxResults, _SetMaxResults, doc="""The feed query's max-results parameter""") def _GetOrderBy(self): if 'orderby' in self.keys(): return self['orderby'] else: return None def _SetOrderBy(self, query): self['orderby'] = query orderby = property(_GetOrderBy, _SetOrderBy, doc="""The feed query's orderby parameter""") def ToUri(self): q_feed = self.feed or '' category_string = '/'.join( [urllib.quote_plus(c) for c in self.categories]) # Add categories to the feed if there are any. if len(self.categories) > 0: q_feed = q_feed + '/-/' + category_string return atom.service.BuildUri(q_feed, self) def __str__(self): return self.ToUri()
40.511059
90
0.679761
7940f7ce9519faa133ecd76ee74693a00d8a5a94
1,691
py
Python
app/aspect/aspect_knowlege_base.py
ahmedAdel202090/Aspect-Model
2cb21f0385a6b1bbc5f6c7be168783e7fb2c766e
[ "MIT" ]
null
null
null
app/aspect/aspect_knowlege_base.py
ahmedAdel202090/Aspect-Model
2cb21f0385a6b1bbc5f6c7be168783e7fb2c766e
[ "MIT" ]
null
null
null
app/aspect/aspect_knowlege_base.py
ahmedAdel202090/Aspect-Model
2cb21f0385a6b1bbc5f6c7be168783e7fb2c766e
[ "MIT" ]
null
null
null
from app.aspect.utils import seq_to_vec from app.aspect.aspect_extraction import AspectExtraction class AspectKnowledgeBase(object): def __init__(self): self.texts = [] self.knowledge_set = {} self.aspect_extraction = AspectExtraction() self.num_keywords=0 def __call__(self,model,texts,ngram,skip_keywords): self.texts = texts text_value = list(map(lambda x:x["text"],texts)) text = ' '.join(text_value) doc_vec = seq_to_vec(model,text) for text in texts: aspects = self.aspect_extraction(model,doc_vec,text,ngram,skip_keywords) for aspect_obj in aspects: self.num_keywords +=1 if not aspect_obj['aspect'] in self.knowledge_set.keys(): self.knowledge_set[aspect_obj['aspect']] = {'sentiment':[0,0,0,0,0] , 'score':aspect_obj['score']} sentiment = aspect_obj['sentiment'] self.knowledge_set[aspect_obj['aspect']]['sentiment'][sentiment] +=1 self.rank_normalize() #self.knowledge_set = dict(sorted(self.knowledge_set.items(), key=lambda item: item[1]['score'],reverse=True)) self.knowledge_set = self.transform_aspect_to_obj(self.knowledge_set) return self.knowledge_set def rank_normalize(self): for keyword in self.knowledge_set.keys(): keyword_freq = sum(self.knowledge_set[keyword]['sentiment']) self.knowledge_set[keyword]['score'] = self.knowledge_set[keyword]['score'] * (keyword_freq / self.num_keywords) def transform_aspect_to_obj(self,knowledge_set): temp_knowledge_set = [] for aspect,value in knowledge_set.items(): value['aspect'] = aspect temp_knowledge_set.append(value) return temp_knowledge_set
43.358974
120
0.703726
7940f81c08a9717ff9a38f16b516bc37e6349c0c
12,830
py
Python
code/python/QuotesAPIforDigitalPortals/v3/fds/sdk/QuotesAPIforDigitalPortals/model/inline_response20052_data.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/QuotesAPIforDigitalPortals/v3/fds/sdk/QuotesAPIforDigitalPortals/model/inline_response20052_data.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/QuotesAPIforDigitalPortals/v3/fds/sdk/QuotesAPIforDigitalPortals/model/inline_response20052_data.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
""" Quotes API For Digital Portals The quotes API combines endpoints for retrieving security end-of-day, delayed, and realtime prices with performance key figures and basic reference data on the security and market level. The API supports over 20 different price types for each quote and comes with basic search endpoints based on security identifiers and instrument names. Market coverage is included in the *Sample Use Cases* section below. The Digital Portal use case is focused on high-performance applications that are * serving millions of end-users, * accessible by client browsers via the internet, * supporting subscriptions for streamed updates out-of-the-box, * typically combining a wide variety of *for Digital Portals*-APIs into a highly use-case specific solution for customers, * integrated into complex infrastructures such as existing frontend frameworks, authentication services. All APIs labelled *for Digital Portals* have been designed for direct use by client web applications and feature extreme low latency: The average response time across all endpoints is 30 ms whereas 99% of all requests are answered in close to under 300ms. See the Time Series API for Digital Portals for direct access to price histories, and the News API for Digital Portals for searching and fetching related news. # noqa: E501 The version of the OpenAPI document: 2 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from fds.sdk.QuotesAPIforDigitalPortals.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, OpenApiModel ) from fds.sdk.QuotesAPIforDigitalPortals.exceptions import ApiAttributeError class InlineResponse20052Data(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. Attributes: allowed_values (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict with a capitalized key describing the allowed value and an allowed value. These dicts store the allowed enum values. attribute_map (dict): The key is attribute name and the value is json key in definition. discriminator_value_class_map (dict): A dict to go from the discriminator variable value to the discriminator class name. validations (dict): The key is the tuple path to the attribute and the for var_name this is (var_name,). The value is a dict that stores validations for max_length, min_length, max_items, min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, inclusive_minimum, and regex. additional_properties_type (tuple): A tuple of classes accepted as additional properties values. """ allowed_values = { } validations = { } @cached_property def additional_properties_type(): """ This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @cached_property def openapi_types(): """ This must be a method because a model may have properties that are of type self, this must run after the class is loaded Returns openapi_types (dict): The key is attribute name and the value is attribute type. """ return { 'id': (float,), # noqa: E501 'name': (str,), # noqa: E501 'description': (str,), # noqa: E501 } @cached_property def discriminator(): return None attribute_map = { 'id': 'id', # noqa: E501 'name': 'name', # noqa: E501 'description': 'description', # noqa: E501 } read_only_vars = { } _composed_schemas = {} @classmethod @convert_js_args_to_python_args def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 """InlineResponse20052Data - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. Defaults to True _path_to_item (tuple/list): This is a list of keys or values to drill down to the model in received_data when deserializing a response _spec_property_naming (bool): True if the variable names in the input data are serialized names, as specified in the OpenAPI document. False if the variable names in the input data are pythonic names, e.g. snake case (default) _configuration (Configuration): the instance to use when deserializing a file_type parameter. If passed, type conversion is attempted If omitted no type conversion is done. _visited_composed_classes (tuple): This stores a tuple of classes that we have traveled through so that if we see that class again we will not use its discriminator again. When traveling through a discriminator, the composed schema that is is traveled through is added to this set. For example if Animal has a discriminator petType and we pass in "Dog", and the class Dog allOf includes Animal, we move through Animal once using the discriminator, and pick Dog. Then in Dog, we will make an instance of the Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) id (float): Identifier of the type.. [optional] # noqa: E501 name (str): Name of the type.. [optional] # noqa: E501 description (str): Description of the type.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), path_to_item=_path_to_item, valid_classes=(self.__class__,), ) self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ '_data_store', '_check_type', '_spec_property_naming', '_path_to_item', '_configuration', '_visited_composed_classes', ]) @convert_js_args_to_python_args def __init__(self, *args, **kwargs): # noqa: E501 """InlineResponse20052Data - a model defined in OpenAPI Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. Defaults to True _path_to_item (tuple/list): This is a list of keys or values to drill down to the model in received_data when deserializing a response _spec_property_naming (bool): True if the variable names in the input data are serialized names, as specified in the OpenAPI document. False if the variable names in the input data are pythonic names, e.g. snake case (default) _configuration (Configuration): the instance to use when deserializing a file_type parameter. If passed, type conversion is attempted If omitted no type conversion is done. _visited_composed_classes (tuple): This stores a tuple of classes that we have traveled through so that if we see that class again we will not use its discriminator again. When traveling through a discriminator, the composed schema that is is traveled through is added to this set. For example if Animal has a discriminator petType and we pass in "Dog", and the class Dog allOf includes Animal, we move through Animal once using the discriminator, and pick Dog. Then in Dog, we will make an instance of the Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) id (float): Identifier of the type.. [optional] # noqa: E501 name (str): Name of the type.. [optional] # noqa: E501 description (str): Description of the type.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) _configuration = kwargs.pop('_configuration', None) _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), path_to_item=_path_to_item, valid_classes=(self.__class__,), ) self._data_store = {} self._check_type = _check_type self._spec_property_naming = _spec_property_naming self._path_to_item = _path_to_item self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): if var_name not in self.attribute_map and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " f"class with read only attributes.")
48.598485
1,302
0.593453
7940f99daaa46ff6b8d81dc0cb4f2c1e3d302dd7
3,683
py
Python
ui/src/lib/pybitcointools/bitcoin/stealth.py
superzitao/Wallet
a7018511afcf47e04e563640e52b86fd4862f838
[ "MIT" ]
null
null
null
ui/src/lib/pybitcointools/bitcoin/stealth.py
superzitao/Wallet
a7018511afcf47e04e563640e52b86fd4862f838
[ "MIT" ]
null
null
null
ui/src/lib/pybitcointools/bitcoin/stealth.py
superzitao/Wallet
a7018511afcf47e04e563640e52b86fd4862f838
[ "MIT" ]
null
null
null
import main as main import transaction as tx # Shared secrets and uncovering pay keys def shared_secret_sender(scan_pubkey, ephem_privkey): shared_point = main.multiply(scan_pubkey, ephem_privkey) shared_secret = main.sha256(main.encode_pubkey(shared_point, 'bin_compressed')) return shared_secret def shared_secret_receiver(ephem_pubkey, scan_privkey): shared_point = main.multiply(ephem_pubkey, scan_privkey) shared_secret = main.sha256(main.encode_pubkey(shared_point, 'bin_compressed')) return shared_secret def uncover_pay_pubkey_sender(scan_pubkey, spend_pubkey, ephem_privkey): shared_secret = shared_secret_sender(scan_pubkey, ephem_privkey) return main.add_pubkeys(spend_pubkey, main.privtopub(shared_secret)) def uncover_pay_pubkey_receiver(scan_privkey, spend_pubkey, ephem_pubkey): shared_secret = shared_secret_receiver(ephem_pubkey, scan_privkey) return main.add_pubkeys(spend_pubkey, main.privtopub(shared_secret)) def uncover_pay_privkey(scan_privkey, spend_privkey, ephem_pubkey): shared_secret = shared_secret_receiver(ephem_pubkey, scan_privkey) return main.add_privkeys(spend_privkey, shared_secret) # Address encoding # Functions for basic stealth addresses, # i.e. one scan key, one spend key, no prefix def pubkeys_to_basic_stealth_address(scan_pubkey, spend_pubkey, magic_byte=42): # magic_byte = 42 for mainnet, 43 for testnet. hex_scankey = main.encode_pubkey(scan_pubkey, 'hex_compressed') hex_spendkey = main.encode_pubkey(spend_pubkey, 'hex_compressed') hex_data = '00{0:066x}01{1:066x}0100'.format(int(hex_scankey, 16), int(hex_spendkey, 16)) addr = main.hex_to_b58check(hex_data, magic_byte) return addr def basic_stealth_address_to_pubkeys(stealth_address): hex_data = main.b58check_to_hex(stealth_address) if len(hex_data) != 140: raise Exception('Stealth address is not of basic type (one scan key, one spend key, no prefix)') scan_pubkey = hex_data[2:68] spend_pubkey = hex_data[70:136] return scan_pubkey, spend_pubkey # Sending stealth payments def mk_stealth_metadata_script(ephem_pubkey, nonce): op_return = '6a' msg_size = '26' version = '06' return op_return + msg_size + version + '{0:08x}'.format(nonce) + main.encode_pubkey(ephem_pubkey, 'hex_compressed') def mk_stealth_tx_outputs(stealth_addr, value, ephem_privkey, nonce, network='btc'): scan_pubkey, spend_pubkey = basic_stealth_address_to_pubkeys(stealth_addr) if network == 'btc': btc_magic_byte = 42 if stealth_addr != pubkeys_to_basic_stealth_address(scan_pubkey, spend_pubkey, btc_magic_byte): raise Exception('Invalid btc mainnet stealth address: ' + stealth_addr) magic_byte_addr = 0 elif network == 'testnet': testnet_magic_byte = 43 if stealth_addr != pubkeys_to_basic_stealth_address(scan_pubkey, spend_pubkey, testnet_magic_byte): raise Exception('Invalid testnet stealth address: ' + stealth_addr) magic_byte_addr = 111 ephem_pubkey = main.privkey_to_pubkey(ephem_privkey) output0 = {'script': mk_stealth_metadata_script(ephem_pubkey, nonce), 'value': 0} pay_pubkey = uncover_pay_pubkey_sender(scan_pubkey, spend_pubkey, ephem_privkey) pay_addr = main.pubkey_to_address(pay_pubkey, magic_byte_addr) output1 = {'address': pay_addr, 'value': value} return [output0, output1] # Receiving stealth payments def ephem_pubkey_from_tx_script(stealth_tx_script): if len(stealth_tx_script) != 80: raise Exception('Wrong format for stealth tx output') return stealth_tx_script[14:]
36.465347
120
0.754005
7940fa0932898a9c10c15ccba761695b30986434
4,671
py
Python
hevc/convert2.py
dugle80/video-cleanup
0274435deb74f49f4ff4827bedbc7f9186d22071
[ "MIT" ]
null
null
null
hevc/convert2.py
dugle80/video-cleanup
0274435deb74f49f4ff4827bedbc7f9186d22071
[ "MIT" ]
1
2022-03-18T04:54:47.000Z
2022-03-18T04:54:47.000Z
hevc/convert2.py
dugle80/video-cleanup
0274435deb74f49f4ff4827bedbc7f9186d22071
[ "MIT" ]
null
null
null
from subprocess import PIPE from ffprobe import FFProbe from pathlib import Path import multiprocessing import time import os import signal import subprocess import shlex import psutil import send2trash import logging import shutil useramdsk = 0 if useramdsk == 0: ip = "/home/david/Downloads/jdownloader/" elif useramdsk == 1: ip = "/tmp/ramdisk/clean/" trsh11 = "/tmp/ramdisk/trash/" else: print("ramdisk setting incorrect, quitting") quit() fmpg0 = "/usr/bin/ffmpeg " fmpg1 = " -hide_banner -hwaccel auto -i " # insert src + 2 fmpg2 = ( " -movflags faststart" + " -c:v hevc_nvenc -n -rc 1" + " -rc-lookahead 20 -no-scenecut 0 -cq 32 -c:a " ) logfile = "/home/david/Downloads/convert.log" logging.basicConfig( filename=logfile, format="%(asctime)s - %(message)s", datefmt="%y-%b-%d %H:%M:%S", level=logging.INFO, ) # multiprocessing idea from: # http://net-informations.com/python/pro/sleep.htm # pulled nvidia_smi commands needed from GPUtil code # Could update for windows based on that code # pip install gputil # (don't think you need to install at this point) # https://github.com/anderskm/gputil # def getTemp(): nvidia_smi = "/usr/bin/nvidia-smi" gpucmd = subprocess.Popen( [nvidia_smi, "--query-gpu=temperature.gpu", "--format=csv,noheader,nounits"], stdout=PIPE, ) stdout, stderr = gpucmd.communicate() Temp = stdout.decode("UTF-8").rstrip() return Temp def probe_file_codec(filename): cmnd = "ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1" cmnd = cmnd + " " + str(filename) cmnd = shlex.split(cmnd) p = subprocess.Popen(cmnd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() out = out.rstrip() out = str(out).strip("b'") out = out.replace("'", "") return out def probe_duration(filename): cmnd = "ffprobe -v error -select_streams v:0 -show_entries format=duration -of default=noprint_wrappers=1:nokey=1" cmnd = cmnd + " " + str(filename) cmnd = shlex.split(cmnd) p = subprocess.Popen(cmnd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() out = out.rstrip() out = str(out).strip("b'") out = out.replace("'", "") if "." in out: out = out.split(".") return out[0] else: return out # return audio codec def Acdc(srcvid): for stream in FFProbe(srcvid).streams: if stream.is_audio(): return stream.codec_name def convert2hevc(srcvid, parent, stem): ff_mpeg = ( fmpg0 + fmpg1 + srcvid + fmpg2 + Acdc(srcvid) + " " + parent + "/" + stem + ".HEVC" + ".mp4" ) ffmpeg = shlex.split(ff_mpeg) p9 = subprocess.Popen(ffmpeg, preexec_fn=os.setsid) p9.communicate() return clean264 = dict() manager = multiprocessing.Manager() jobs = [] for path1 in Path(ip).rglob("*"): if probe_file_codec(path1) != "h264": continue return2 = manager.list() convert = multiprocessing.Process( target=convert2hevc, args=(str(path1), str(path1.parent), str(path1.stem)), ) jobs.append(convert) logging.info("starting transcode of: {}".format(str(path1))) convert.start() clean264[str(path1)] = str(path1.parent) + "/" + str(path1.stem) + ".HEVC.mp4" while True: procName = "ffmpeg" time.sleep(2) if int(getTemp()) > 90: procPid = "" for proc in psutil.process_iter(): if proc.name() == procName: procPid = proc.pid logging.info("pausing ffmpeg") os.kill(procPid, signal.SIGSTOP) print("paused!") time.sleep(30) print("resuming") logging.info("resuming ffmpeg") os.kill(procPid, signal.SIGCONT) if not convert.is_alive(): break for j1 in jobs: j1.join() # clean up another attempt for k, v in clean264.items(): if probe_duration(k) == probe_duration(v): sz = os.path.getsize(k) * 0.75 if os.path.getsize(v) < sz: logging.info(" trashing {}".format(k)) print("trash", k) if useramdsk == 0: send2trash.send2trash(k) elif useramdsk == 1: kname = k.split(ip) shutil.move(k, trsh11 + kname[1]) else: logging.info("check file size on {}".format(k)) print() print("log, see if worth converting: {}".format(k)) print()
27.803571
120
0.597731
7940fa5a8330931272881c3feb58f02432021d8d
329
py
Python
shop/urls.py
Zoki92/E-commerce
f5614f54ce06606d99f9b8360cb4f88a97c616f3
[ "MIT" ]
null
null
null
shop/urls.py
Zoki92/E-commerce
f5614f54ce06606d99f9b8360cb4f88a97c616f3
[ "MIT" ]
null
null
null
shop/urls.py
Zoki92/E-commerce
f5614f54ce06606d99f9b8360cb4f88a97c616f3
[ "MIT" ]
1
2019-05-24T06:14:04.000Z
2019-05-24T06:14:04.000Z
from django.urls import path from . import views app_name = 'shop' urlpatterns = [ path('', views.product_list, name='product_list'), path('<slug:category_slug>/', views.product_list, name="product_list_by_category"), path('<int:id>/<slug:slug>/', views.product_detail, name="product_detail"), ]
23.5
55
0.665653
7940fad5a60338301de94da34338f7699e423e7e
1,368
bzl
Python
java/java_grpc_library.bzl
purkhusid/rules_proto_grpc
943656d049d2932a32d8f882bbb05c024b499020
[ "Apache-2.0" ]
null
null
null
java/java_grpc_library.bzl
purkhusid/rules_proto_grpc
943656d049d2932a32d8f882bbb05c024b499020
[ "Apache-2.0" ]
null
null
null
java/java_grpc_library.bzl
purkhusid/rules_proto_grpc
943656d049d2932a32d8f882bbb05c024b499020
[ "Apache-2.0" ]
null
null
null
"""Generated definition of java_grpc_library.""" load("//java:java_grpc_compile.bzl", "java_grpc_compile") load("//internal:compile.bzl", "proto_compile_attrs") load("@rules_java//java:defs.bzl", "java_library") def java_grpc_library(name, **kwargs): # Compile protos name_pb = name + "_pb" java_grpc_compile( name = name_pb, **{ k: v for (k, v) in kwargs.items() if k in ["protos" if "protos" in kwargs else "deps"] + proto_compile_attrs.keys() } # Forward args ) # Create java library java_library( name = name, srcs = [name_pb], deps = GRPC_DEPS + (kwargs.get("deps", []) if "protos" in kwargs else []), runtime_deps = ["@io_grpc_grpc_java//netty"], exports = GRPC_DEPS + kwargs.get("exports", []), visibility = kwargs.get("visibility"), tags = kwargs.get("tags"), ) GRPC_DEPS = [ # From https://github.com/grpc/grpc-java/blob/f6c2d221e2b6c975c6cf465d68fe11ab12dabe55/BUILD.bazel#L32-L38 "@io_grpc_grpc_java//api", "@io_grpc_grpc_java//protobuf", "@io_grpc_grpc_java//stub", "@io_grpc_grpc_java//stub:javax_annotation", "@com_google_code_findbugs_jsr305//jar", "@com_google_guava_guava//jar", "@com_google_protobuf//:protobuf_java", "@com_google_protobuf//:protobuf_java_util", ]
33.365854
110
0.636696
7940fb81936a9262fb9c27a126f063374f6481b0
1,163
py
Python
chapters/chp4/mlp.py
Tomspiano/D2L-PyTorch
c748c72a2da66211bd88c1adcd048b05be40e77c
[ "Apache-2.0" ]
2
2021-06-29T15:42:24.000Z
2021-07-21T08:09:52.000Z
chapters/chp4/mlp.py
Tomspiano/D2L-PyTorch
c748c72a2da66211bd88c1adcd048b05be40e77c
[ "Apache-2.0" ]
null
null
null
chapters/chp4/mlp.py
Tomspiano/D2L-PyTorch
c748c72a2da66211bd88c1adcd048b05be40e77c
[ "Apache-2.0" ]
null
null
null
import torch from modules import base from modules import fashionMNIST as fmnist from torch import nn from torch.nn import init from modules import d2lCustom as custom def train(num_inputs, num_hiddens, num_outputs, train_iter, test_iter, eps): # epoch 46, loss 0.155, train acc 0.943, test acc 0.883, 546.2 examples/sec # if eps = 1e-3, learning rate = 0.5 net = nn.Sequential( custom.FlattenLayer(), nn.Linear(num_inputs, num_hiddens), nn.ReLU(), nn.Linear(num_hiddens, num_outputs) ) for params in net.parameters(): init.normal_(params, mean=0, std=.01) loss = nn.CrossEntropyLoss() optimizer = torch.optim.SGD(net.parameters(), lr=.5) base.train(net, train_iter, test_iter, loss, eps=eps, num_epochs=50, optimizer=optimizer) def main(): batch_size = 256 num_inputs, num_outputs, num_hiddens = 784, 10, 256 eps = 1e-3 # eps = 1e-1 root = '../../Datasets' train_iter, test_iter = fmnist.load_data(batch_size, root=root) train(num_inputs, num_hiddens, num_outputs, train_iter, test_iter, eps) if __name__ == '__main__': main()
25.282609
93
0.66638
7940fc23b1a7a6d6466c51140fa0bcf02baf53b8
1,393
py
Python
PREPROCESSING/manual_labeling/mark_good_datasets_manually.py
MobMonRob/ArmMovementPredictionStudien
7086f7b044d54b023c7d40e9413c35178a1ad084
[ "Apache-2.0" ]
2
2020-10-15T07:24:26.000Z
2022-02-18T05:37:13.000Z
PREPROCESSING/manual_labeling/mark_good_datasets_manually.py
MobMonRob/ArmMovementPredictionStudien
7086f7b044d54b023c7d40e9413c35178a1ad084
[ "Apache-2.0" ]
null
null
null
PREPROCESSING/manual_labeling/mark_good_datasets_manually.py
MobMonRob/ArmMovementPredictionStudien
7086f7b044d54b023c7d40e9413c35178a1ad084
[ "Apache-2.0" ]
null
null
null
import os from tkinter import * from ArmMovementPredictionStudien.PREPROCESSING.utils.utils import open_dataset_numpy from ArmMovementPredictionStudien.PREPROCESSING.visualisation.visualise_files import visualise import matplotlib.pyplot as plt first = True file_list = os.listdir("../../DATA/0_raw/") counter = 1090 def write_in_good(): write(file_list[counter], "good") def write_in_bad(): write(file_list[counter], "bad") def write(file, good_or_bad): plt.close('all') if good_or_bad == "good": database = open("./good_files.csv", 'a') elif good_or_bad == "bad": database = open("./bad_files.csv", 'a') else: raise Exception("Enter good or bad") length = len(open_dataset_numpy(file, "../../DATA/0_raw/")) database.write(f"{file};{length}\n") database.close() show_file() def show_file(): global counter print(counter) counter += 1 visualise(file_selection=file_list[counter], pick_random_file=False) if __name__ == "__main__": master = Tk() master.geometry("200x80+0+0") good_button = Button(master, text="Good", width=10, bg="green", command=write_in_good) bad_button = Button(master, text="Bad", width=10, bg="red", command=write_in_bad) good_button.pack(side="left") bad_button.pack(side="right") if first: show_file() first = False mainloop()
25.327273
94
0.676956
7940ffa57b85019cb993185eb941fad74f1d58e6
824
py
Python
Examples/Python/SimpleTransformix.py
sorenchr2011/SimpleElastix
2a79d151894021c66dceeb2c8a64ff61506e7155
[ "Apache-2.0" ]
1
2021-03-05T22:52:15.000Z
2021-03-05T22:52:15.000Z
Examples/Python/SimpleTransformix.py
sorenchr2011/SimpleElastix
2a79d151894021c66dceeb2c8a64ff61506e7155
[ "Apache-2.0" ]
null
null
null
Examples/Python/SimpleTransformix.py
sorenchr2011/SimpleElastix
2a79d151894021c66dceeb2c8a64ff61506e7155
[ "Apache-2.0" ]
1
2021-01-16T08:57:07.000Z
2021-01-16T08:57:07.000Z
import SimpleITK as sitk import sys # Make transform elastixImageFilter = sitk.ElastixImageFilter() elastixImageFilter.SetFixedImage(sitk.ReadImage(str(sys.argv[1]))) elastixImageFilter.SetMovingImage(sitk.ReadImage(str(sys.argv[2]))) elastixImageFilter.SetParameterMap(sitk.ReadParameterFile(str(sys.argv[3]))) elastixImageFilter.LogToConsoleOn() elastixImageFilter.Execute() # Instantiate SimpleTransformix transformixImageFilter = sitk.TransformixImageFilter() # Read Input transformixImageFilter.SetInputImage(sitk.ReadImage(str(sys.argv[4]))) transformixImageFilter.SetParameterMap(elastixImageFilter.GetTransformParameterMap()) # Perform warp transformixImageFilter.LogToConsoleOn() transformixImageFilter.Execute() # Write result image sitk.WriteImage(transformixImageFilter.GetResultImage(), str(sys.argv[5]))
32.96
85
0.839806
794100e819f99a290a75a4d245839f314058c0bb
22,254
py
Python
mrcnn/visualize.py
felixstillger/Mask_RCNN
fab32b45cd104f8df63906157606024c2897ca3e
[ "MIT" ]
null
null
null
mrcnn/visualize.py
felixstillger/Mask_RCNN
fab32b45cd104f8df63906157606024c2897ca3e
[ "MIT" ]
null
null
null
mrcnn/visualize.py
felixstillger/Mask_RCNN
fab32b45cd104f8df63906157606024c2897ca3e
[ "MIT" ]
null
null
null
""" Mask R-CNN Display and Visualization Functions. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla """ import os import sys import random import itertools import colorsys import numpy as np from skimage.measure import find_contours import matplotlib.pyplot as plt from matplotlib import patches, lines from matplotlib.patches import Polygon import IPython.display # Root directory of the project ROOT_DIR = os.path.abspath("../") # Import Mask RCNN sys.path.append(ROOT_DIR) # To find local version of the library from mrcnn import utils ############################################################ # Visualization ############################################################ def display_images(images, titles=None, cols=4, cmap=None, norm=None, interpolation=None): """Display the given set of images, optionally with titles. images: list or array of image tensors in HWC format. titles: optional. A list of titles to display with each image. cols: number of images per row cmap: Optional. Color map to use. For example, "Blues". norm: Optional. A Normalize instance to map values to colors. interpolation: Optional. Image interpolation to use for display. """ titles = titles if titles is not None else [""] * len(images) rows = len(images) // cols + 1 plt.figure(figsize=(14, 14 * rows // cols)) i = 1 for image, title in zip(images, titles): plt.subplot(rows, cols, i) plt.title(title, fontsize=9) plt.axis('off') plt.imshow(image.astype(np.uint8), cmap=cmap, norm=norm, interpolation=interpolation) i += 1 plt.show() def random_colors(N, bright=True): """ Generate random colors. To get visually distinct colors, generate them in HSV space then convert to RGB. """ brightness = 1.0 if bright else 0.7 hsv = [(i / N, 1, brightness) for i in range(N)] colors = list(map(lambda c: colorsys.hsv_to_rgb(*c), hsv)) random.shuffle(colors) return colors def apply_mask(image, mask, color, alpha=0.5): """Apply the given mask to the image. """ for c in range(3): image[:, :, c] = np.where(mask == 1, image[:, :, c] * (1 - alpha) + alpha * color[c] * 255, image[:, :, c]) return image def display_instances(image, boxes, masks, class_ids, class_names, scores=None, title="", figsize=(16, 16), ax=None, show_mask=True, show_bbox=True, colors=None, captions=None): """ boxes: [num_instance, (y1, x1, y2, x2, class_id)] in image coordinates. masks: [height, width, num_instances] class_ids: [num_instances] class_names: list of class names of the dataset scores: (optional) confidence scores for each box title: (optional) Figure title show_mask, show_bbox: To show masks and bounding boxes or not figsize: (optional) the size of the image colors: (optional) An array or colors to use with each object captions: (optional) A list of strings to use as captions for each object """ # Number of instances N = boxes.shape[0] if not N: print("\n*** No instances to display *** \n") else: assert boxes.shape[0] == masks.shape[-1] == class_ids.shape[0] # If no axis is passed, create one and automatically call show() auto_show = False if not ax: _, ax = plt.subplots(1, figsize=figsize) auto_show = True # Generate random colors colors = colors or random_colors(N) # Show area outside image boundaries. height, width = image.shape[:2] ax.set_ylim(height + 10, -10) ax.set_xlim(-10, width + 10) ax.axis('off') ax.set_title(title) masked_image = image.astype(np.uint32).copy() for i in range(N): color = colors[i] # Bounding box if not np.any(boxes[i]): # Skip this instance. Has no bbox. Likely lost in image cropping. continue y1, x1, y2, x2 = boxes[i] if show_bbox: p = patches.Rectangle((x1, y1), x2 - x1, y2 - y1, linewidth=2, alpha=0.7, linestyle="dashed", edgecolor=color, facecolor='none') ax.add_patch(p) # Label if not captions: class_id = class_ids[i] score = scores[i] if scores is not None else None label = class_names[class_id] caption = "{} {:.3f}".format(label, score) if score else label else: caption = captions[i] ax.text(x1, y1 + 8, caption, color='w', size=11, backgroundcolor="none") # Mask mask = masks[:, :, i] if show_mask: masked_image = apply_mask(masked_image, mask, color) # Mask Polygon # Pad to ensure proper polygons for masks that touch image edges. padded_mask = np.zeros( (mask.shape[0] + 2, mask.shape[1] + 2), dtype=np.uint8) padded_mask[1:-1, 1:-1] = mask contours = find_contours(padded_mask, 0.5) for verts in contours: # Subtract the padding and flip (y, x) to (x, y) verts = np.fliplr(verts) - 1 p = Polygon(verts, facecolor="none", edgecolor=color) ax.add_patch(p) ax.imshow(masked_image.astype(np.uint8)) if auto_show: plt.show() def display_instances2(image, boxes, masks, class_ids, class_names, scores=None, title="", figsize=(16, 16), ax=None, show_mask=True, show_bbox=True, colors=None, captions=None, save_dir=None, save_name=None): """ boxes: [num_instance, (y1, x1, y2, x2, class_id)] in image coordinates. masks: [height, width, num_instances] class_ids: [num_instances] class_names: list of class names of the dataset scores: (optional) confidence scores for each box title: (optional) Figure title show_mask, show_bbox: To show masks and bounding boxes or not figsize: (optional) the size of the image colors: (optional) An array or colors to use with each object captions: (optional) A list of strings to use as captions for each object """ # Number of instances N = boxes.shape[0] if not N: print("\n*** No instances to display *** \n") else: assert boxes.shape[0] == masks.shape[-1] == class_ids.shape[0] # If no axis is passed, create one and automatically call show() auto_show = False if not ax: _, ax = plt.subplots(1, figsize=figsize) auto_show = True # Generate random colors colors = colors or random_colors(N) # Show area outside image boundaries. height, width = image.shape[:2] ax.set_ylim(height + 10, -10) ax.set_xlim(-10, width + 10) ax.axis('off') ax.set_title(title) masked_image = image.astype(np.uint32).copy() for i in range(N): color = colors[i] # Bounding box if not np.any(boxes[i]): # Skip this instance. Has no bbox. Likely lost in image cropping. continue y1, x1, y2, x2 = boxes[i] if show_bbox: p = patches.Rectangle((x1, y1), x2 - x1, y2 - y1, linewidth=2, alpha=0.7, linestyle="dashed", edgecolor=color, facecolor='none') ax.add_patch(p) # Label if not captions: class_id = class_ids[i] score = scores[i] if scores is not None else None label = class_names[class_id] caption = "{} {:.3f}".format(label, score) if score else label else: caption = captions[i] ax.text(x1, y1 + 8, caption, color='w', size=11, backgroundcolor="none") # Mask mask = masks[:, :, i] if show_mask: masked_image = apply_mask(masked_image, mask, color) # Mask Polygon # Pad to ensure proper polygons for masks that touch image edges. padded_mask = np.zeros( (mask.shape[0] + 2, mask.shape[1] + 2), dtype=np.uint8) padded_mask[1:-1, 1:-1] = mask contours = find_contours(padded_mask, 0.5) for verts in contours: # Subtract the padding and flip (y, x) to (x, y) verts = np.fliplr(verts) - 1 p = Polygon(verts, facecolor="none", edgecolor=color) ax.add_patch(p) ax.imshow(masked_image.astype(np.uint8)) # save_name = str(random.uniform(1, 1000000000000000)) plt.savefig(f"{save_dir}/img{save_name}") print(save_name) if auto_show: plt.show() def display_differences(image, gt_box, gt_class_id, gt_mask, pred_box, pred_class_id, pred_score, pred_mask, class_names, title="", ax=None, show_mask=True, show_box=True, iou_threshold=0.5, score_threshold=0.5): """Display ground truth and prediction instances on the same image.""" # Match predictions to ground truth gt_match, pred_match, overlaps = utils.compute_matches( gt_box, gt_class_id, gt_mask, pred_box, pred_class_id, pred_score, pred_mask, iou_threshold=iou_threshold, score_threshold=score_threshold) # Ground truth = green. Predictions = red colors = [(0, 1, 0, .8)] * len(gt_match)\ + [(1, 0, 0, 1)] * len(pred_match) # Concatenate GT and predictions class_ids = np.concatenate([gt_class_id, pred_class_id]) scores = np.concatenate([np.zeros([len(gt_match)]), pred_score]) boxes = np.concatenate([gt_box, pred_box]) masks = np.concatenate([gt_mask, pred_mask], axis=-1) # Captions per instance show score/IoU captions = ["" for m in gt_match] + ["{:.2f} / {:.2f}".format( pred_score[i], (overlaps[i, int(pred_match[i])] if pred_match[i] > -1 else overlaps[i].max())) for i in range(len(pred_match))] # Set title if not provided title = title or "Ground Truth and Detections\n GT=green, pred=red, captions: score/IoU" # Display display_instances( image, boxes, masks, class_ids, class_names, scores, ax=ax, show_bbox=show_box, show_mask=show_mask, colors=colors, captions=captions, title=title) def draw_rois(image, rois, refined_rois, mask, class_ids, class_names, limit=10): """ anchors: [n, (y1, x1, y2, x2)] list of anchors in image coordinates. proposals: [n, 4] the same anchors but refined to fit objects better. """ masked_image = image.copy() # Pick random anchors in case there are too many. ids = np.arange(rois.shape[0], dtype=np.int32) ids = np.random.choice( ids, limit, replace=False) if ids.shape[0] > limit else ids fig, ax = plt.subplots(1, figsize=(12, 12)) if rois.shape[0] > limit: plt.title("Showing {} random ROIs out of {}".format( len(ids), rois.shape[0])) else: plt.title("{} ROIs".format(len(ids))) # Show area outside image boundaries. ax.set_ylim(image.shape[0] + 20, -20) ax.set_xlim(-50, image.shape[1] + 20) ax.axis('off') for i, id in enumerate(ids): color = np.random.rand(3) class_id = class_ids[id] # ROI y1, x1, y2, x2 = rois[id] p = patches.Rectangle((x1, y1), x2 - x1, y2 - y1, linewidth=2, edgecolor=color if class_id else "gray", facecolor='none', linestyle="dashed") ax.add_patch(p) # Refined ROI if class_id: ry1, rx1, ry2, rx2 = refined_rois[id] p = patches.Rectangle((rx1, ry1), rx2 - rx1, ry2 - ry1, linewidth=2, edgecolor=color, facecolor='none') ax.add_patch(p) # Connect the top-left corners of the anchor and proposal for easy visualization ax.add_line(lines.Line2D([x1, rx1], [y1, ry1], color=color)) # Label label = class_names[class_id] ax.text(rx1, ry1 + 8, "{}".format(label), color='w', size=11, backgroundcolor="none") # Mask m = utils.unmold_mask(mask[id], rois[id] [:4].astype(np.int32), image.shape) masked_image = apply_mask(masked_image, m, color) ax.imshow(masked_image) # Print stats print("Positive ROIs: ", class_ids[class_ids > 0].shape[0]) print("Negative ROIs: ", class_ids[class_ids == 0].shape[0]) print("Positive Ratio: {:.2f}".format( class_ids[class_ids > 0].shape[0] / class_ids.shape[0])) # TODO: Replace with matplotlib equivalent? def draw_box(image, box, color): """Draw 3-pixel width bounding boxes on the given image array. color: list of 3 int values for RGB. """ y1, x1, y2, x2 = box image[y1:y1 + 2, x1:x2] = color image[y2:y2 + 2, x1:x2] = color image[y1:y2, x1:x1 + 2] = color image[y1:y2, x2:x2 + 2] = color return image def display_top_masks(image, mask, class_ids, class_names, limit=4): """Display the given image and the top few class masks.""" to_display = [] titles = [] to_display.append(image) titles.append("H x W={}x{}".format(image.shape[0], image.shape[1])) # Pick top prominent classes in this image unique_class_ids = np.unique(class_ids) mask_area = [np.sum(mask[:, :, np.where(class_ids == i)[0]]) for i in unique_class_ids] top_ids = [v[0] for v in sorted(zip(unique_class_ids, mask_area), key=lambda r: r[1], reverse=True) if v[1] > 0] # Generate images and titles for i in range(limit): class_id = top_ids[i] if i < len(top_ids) else -1 # Pull masks of instances belonging to the same class. m = mask[:, :, np.where(class_ids == class_id)[0]] m = np.sum(m * np.arange(1, m.shape[-1] + 1), -1) to_display.append(m) titles.append(class_names[class_id] if class_id != -1 else "-") display_images(to_display, titles=titles, cols=limit + 1, cmap="Blues_r") def plot_precision_recall(AP, precisions, recalls): """Draw the precision-recall curve. AP: Average precision at IoU >= 0.5 precisions: list of precision values recalls: list of recall values """ # Plot the Precision-Recall curve _, ax = plt.subplots(1) ax.set_title("Precision-Recall Curve. AP@50 = {:.3f}".format(AP)) ax.set_ylim(0, 1.1) ax.set_xlim(0, 1.1) _ = ax.plot(recalls, precisions) def plot_overlaps(gt_class_ids, pred_class_ids, pred_scores, overlaps, class_names, threshold=0.5): """Draw a grid showing how ground truth objects are classified. gt_class_ids: [N] int. Ground truth class IDs pred_class_id: [N] int. Predicted class IDs pred_scores: [N] float. The probability scores of predicted classes overlaps: [pred_boxes, gt_boxes] IoU overlaps of predictions and GT boxes. class_names: list of all class names in the dataset threshold: Float. The prediction probability required to predict a class """ gt_class_ids = gt_class_ids[gt_class_ids != 0] pred_class_ids = pred_class_ids[pred_class_ids != 0] plt.figure(figsize=(12, 10)) plt.imshow(overlaps, interpolation='nearest', cmap=plt.cm.Blues) plt.yticks(np.arange(len(pred_class_ids)), ["{} ({:.2f})".format(class_names[int(id)], pred_scores[i]) for i, id in enumerate(pred_class_ids)]) plt.xticks(np.arange(len(gt_class_ids)), [class_names[int(id)] for id in gt_class_ids], rotation=90) thresh = overlaps.max() / 2. for i, j in itertools.product(range(overlaps.shape[0]), range(overlaps.shape[1])): text = "" if overlaps[i, j] > threshold: text = "match" if gt_class_ids[j] == pred_class_ids[i] else "wrong" color = ("white" if overlaps[i, j] > thresh else "black" if overlaps[i, j] > 0 else "grey") plt.text(j, i, "{:.3f}\n{}".format(overlaps[i, j], text), horizontalalignment="center", verticalalignment="center", fontsize=9, color=color) plt.tight_layout() plt.xlabel("Ground Truth") plt.ylabel("Predictions") def draw_boxes(image, boxes=None, refined_boxes=None, masks=None, captions=None, visibilities=None, title="", ax=None): """Draw bounding boxes and segmentation masks with different customizations. boxes: [N, (y1, x1, y2, x2, class_id)] in image coordinates. refined_boxes: Like boxes, but draw with solid lines to show that they're the result of refining 'boxes'. masks: [N, height, width] captions: List of N titles to display on each box visibilities: (optional) List of values of 0, 1, or 2. Determine how prominent each bounding box should be. title: An optional title to show over the image ax: (optional) Matplotlib axis to draw on. """ # Number of boxes assert boxes is not None or refined_boxes is not None N = boxes.shape[0] if boxes is not None else refined_boxes.shape[0] # Matplotlib Axis if not ax: _, ax = plt.subplots(1, figsize=(12, 12)) # Generate random colors colors = random_colors(N) # Show area outside image boundaries. margin = image.shape[0] // 10 ax.set_ylim(image.shape[0] + margin, -margin) ax.set_xlim(-margin, image.shape[1] + margin) ax.axis('off') ax.set_title(title) masked_image = image.astype(np.uint32).copy() for i in range(N): # Box visibility visibility = visibilities[i] if visibilities is not None else 1 if visibility == 0: color = "gray" style = "dotted" alpha = 0.5 elif visibility == 1: color = colors[i] style = "dotted" alpha = 1 elif visibility == 2: color = colors[i] style = "solid" alpha = 1 # Boxes if boxes is not None: if not np.any(boxes[i]): # Skip this instance. Has no bbox. Likely lost in cropping. continue y1, x1, y2, x2 = boxes[i] p = patches.Rectangle((x1, y1), x2 - x1, y2 - y1, linewidth=2, alpha=alpha, linestyle=style, edgecolor=color, facecolor='none') ax.add_patch(p) # Refined boxes if refined_boxes is not None and visibility > 0: ry1, rx1, ry2, rx2 = refined_boxes[i].astype(np.int32) p = patches.Rectangle((rx1, ry1), rx2 - rx1, ry2 - ry1, linewidth=2, edgecolor=color, facecolor='none') ax.add_patch(p) # Connect the top-left corners of the anchor and proposal if boxes is not None: ax.add_line(lines.Line2D([x1, rx1], [y1, ry1], color=color)) # Captions if captions is not None: caption = captions[i] # If there are refined boxes, display captions on them if refined_boxes is not None: y1, x1, y2, x2 = ry1, rx1, ry2, rx2 ax.text(x1, y1, caption, size=11, verticalalignment='top', color='w', backgroundcolor="none", bbox={'facecolor': color, 'alpha': 0.5, 'pad': 2, 'edgecolor': 'none'}) # Masks if masks is not None: mask = masks[:, :, i] masked_image = apply_mask(masked_image, mask, color) # Mask Polygon # Pad to ensure proper polygons for masks that touch image edges. padded_mask = np.zeros( (mask.shape[0] + 2, mask.shape[1] + 2), dtype=np.uint8) padded_mask[1:-1, 1:-1] = mask contours = find_contours(padded_mask, 0.5) for verts in contours: # Subtract the padding and flip (y, x) to (x, y) verts = np.fliplr(verts) - 1 p = Polygon(verts, facecolor="none", edgecolor=color) ax.add_patch(p) ax.imshow(masked_image.astype(np.uint8)) def display_table(table): """Display values in a table format. table: an iterable of rows, and each row is an iterable of values. """ html = "" for row in table: row_html = "" for col in row: row_html += "<td>{:40}</td>".format(str(col)) html += "<tr>" + row_html + "</tr>" html = "<table>" + html + "</table>" IPython.display.display(IPython.display.HTML(html)) def display_weight_stats(model): """Scans all the weights in the model and returns a list of tuples that contain stats about each weight. """ layers = model.get_trainable_layers() table = [["WEIGHT NAME", "SHAPE", "MIN", "MAX", "STD"]] for l in layers: weight_values = l.get_weights() # list of Numpy arrays weight_tensors = l.weights # list of TF tensors for i, w in enumerate(weight_values): weight_name = weight_tensors[i].name # Detect problematic layers. Exclude biases of conv layers. alert = "" if w.min() == w.max() and not (l.__class__.__name__ == "Conv2D" and i == 1): alert += "<span style='color:red'>*** dead?</span>" if np.abs(w.min()) > 1000 or np.abs(w.max()) > 1000: alert += "<span style='color:red'>*** Overflow?</span>" # Add row table.append([ weight_name + alert, str(w.shape), "{:+9.4f}".format(w.min()), "{:+10.4f}".format(w.max()), "{:+9.4f}".format(w.std()), ]) display_table(table)
37.654822
92
0.580031
794100fc628723df100085b233fee0eef09588f7
3,454
py
Python
osidb_bindings/bindings/python_client/api/auth/auth_token_refresh_create.py
RedHatProductSecurity/osidb-bindings
5cbfbcd7164b4f1eca64c6d0f7154819ec9a4846
[ "MIT" ]
null
null
null
osidb_bindings/bindings/python_client/api/auth/auth_token_refresh_create.py
RedHatProductSecurity/osidb-bindings
5cbfbcd7164b4f1eca64c6d0f7154819ec9a4846
[ "MIT" ]
null
null
null
osidb_bindings/bindings/python_client/api/auth/auth_token_refresh_create.py
RedHatProductSecurity/osidb-bindings
5cbfbcd7164b4f1eca64c6d0f7154819ec9a4846
[ "MIT" ]
null
null
null
from typing import Any, Dict, Optional import httpx from ...client import Client from ...models.token_refresh import TokenRefresh from ...types import UNSET, Response, Unset def _get_kwargs( *, client: Client, form_data: TokenRefresh, multipart_data: TokenRefresh, json_body: TokenRefresh, ) -> Dict[str, Any]: url = "{}/auth/token/refresh".format( client.base_url, ) headers: Dict[str, Any] = client.get_headers() json_json_body: Dict[str, Any] = UNSET if not isinstance(json_body, Unset): json_body.to_dict() multipart_multipart_data: Dict[str, Any] = UNSET if not isinstance(multipart_data, Unset): multipart_data.to_multipart() return { "url": url, "headers": headers, "data": form_data.to_dict(), } def _parse_response(*, response: httpx.Response) -> Optional[TokenRefresh]: if response.status_code == 200: _response_200 = response.json() response_200: TokenRefresh if isinstance(_response_200, Unset): response_200 = UNSET else: response_200 = TokenRefresh.from_dict(_response_200) return response_200 return None def _build_response(*, response: httpx.Response) -> Response[TokenRefresh]: return Response( status_code=response.status_code, content=response.content, headers=response.headers, parsed=_parse_response(response=response), ) def sync_detailed( *, client: Client, form_data: TokenRefresh, multipart_data: TokenRefresh, json_body: TokenRefresh, ) -> Response[TokenRefresh]: kwargs = _get_kwargs( client=client, form_data=form_data, multipart_data=multipart_data, json_body=json_body, ) response = httpx.post( verify=client.verify_ssl, auth=client.auth, timeout=client.timeout, **kwargs, ) response.raise_for_status() return _build_response(response=response) def sync( *, client: Client, form_data: TokenRefresh, multipart_data: TokenRefresh, json_body: TokenRefresh, ) -> Optional[TokenRefresh]: """Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.""" return sync_detailed( client=client, form_data=form_data, multipart_data=multipart_data, json_body=json_body, ).parsed async def asyncio_detailed( *, client: Client, form_data: TokenRefresh, multipart_data: TokenRefresh, json_body: TokenRefresh, ) -> Response[TokenRefresh]: kwargs = _get_kwargs( client=client, form_data=form_data, multipart_data=multipart_data, json_body=json_body, ) async with httpx.AsyncClient(verify=client.verify_ssl) as _client: response = await _client.post(**kwargs) return _build_response(response=response) async def asyncio( *, client: Client, form_data: TokenRefresh, multipart_data: TokenRefresh, json_body: TokenRefresh, ) -> Optional[TokenRefresh]: """Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.""" return ( await asyncio_detailed( client=client, form_data=form_data, multipart_data=multipart_data, json_body=json_body, ) ).parsed
24.496454
78
0.657209
79410163e2a053e67bd9da0f8807f3560be8e135
378
py
Python
generators/abstract.py
lucasgeorgegustafson/MTG-pack-generator
495df761f8163373268793cb74e274c42582fe3a
[ "MIT" ]
1
2021-03-25T03:16:40.000Z
2021-03-25T03:16:40.000Z
generators/abstract.py
lucasgeorgegustafson/MTG-pack-generator
495df761f8163373268793cb74e274c42582fe3a
[ "MIT" ]
null
null
null
generators/abstract.py
lucasgeorgegustafson/MTG-pack-generator
495df761f8163373268793cb74e274c42582fe3a
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class AbstractGenerator(ABC): @abstractmethod def sort_by_rarity(self): pass @abstractmethod def roll_for_mythic(self): pass @abstractmethod def fix_sort(self): pass @abstractmethod def print_pack(self): pass @abstractmethod def generate_pack(self): pass
15.12
35
0.634921
79410168ad7caffa8737a619c9d3f3d4b5db1dd9
10,855
py
Python
ucsmsdk/mometa/sw/SwEthEstcPc.py
anoop1984/python_sdk
c4a226bad5e10ad233eda62bc8f6d66a5a82b651
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/sw/SwEthEstcPc.py
anoop1984/python_sdk
c4a226bad5e10ad233eda62bc8f6d66a5a82b651
[ "Apache-2.0" ]
null
null
null
ucsmsdk/mometa/sw/SwEthEstcPc.py
anoop1984/python_sdk
c4a226bad5e10ad233eda62bc8f6d66a5a82b651
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for SwEthEstcPc ManagedObject.""" import sys, os from ...ucsmo import ManagedObject from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta from ...ucsmeta import VersionMeta class SwEthEstcPcConsts(): ADMIN_SPEED_10GBPS = "10gbps" ADMIN_SPEED_1GBPS = "1gbps" ADMIN_SPEED_20GBPS = "20gbps" ADMIN_SPEED_40GBPS = "40gbps" ADMIN_SPEED_INDETERMINATE = "indeterminate" ADMIN_STATE_DISABLED = "disabled" ADMIN_STATE_ENABLED = "enabled" CDP_DISABLED = "disabled" CDP_ENABLED = "enabled" FORGE_MAC_ALLOW = "allow" FORGE_MAC_DENY = "deny" IF_ROLE_DIAG = "diag" IF_ROLE_FCOE_NAS_STORAGE = "fcoe-nas-storage" IF_ROLE_FCOE_STORAGE = "fcoe-storage" IF_ROLE_FCOE_UPLINK = "fcoe-uplink" IF_ROLE_MGMT = "mgmt" IF_ROLE_MONITOR = "monitor" IF_ROLE_NAS_STORAGE = "nas-storage" IF_ROLE_NETWORK = "network" IF_ROLE_NETWORK_FCOE_UPLINK = "network-fcoe-uplink" IF_ROLE_SERVER = "server" IF_ROLE_SERVICE = "service" IF_ROLE_STORAGE = "storage" IF_ROLE_UNKNOWN = "unknown" IF_TYPE_AGGREGATION = "aggregation" IF_TYPE_PHYSICAL = "physical" IF_TYPE_UNKNOWN = "unknown" IF_TYPE_VIRTUAL = "virtual" LACP_FAST_TIMER_FALSE = "false" LACP_FAST_TIMER_NO = "no" LACP_FAST_TIMER_TRUE = "true" LACP_FAST_TIMER_YES = "yes" LACP_SUSPEND_INDIVIDUAL_FALSE = "false" LACP_SUSPEND_INDIVIDUAL_NO = "no" LACP_SUSPEND_INDIVIDUAL_TRUE = "true" LACP_SUSPEND_INDIVIDUAL_YES = "yes" MON_TRAF_DIR_BOTH = "both" MON_TRAF_DIR_RX = "rx" MON_TRAF_DIR_TX = "tx" PORT_MODE_ACCESS = "access" PORT_MODE_TRUNK = "trunk" PRIORITY_FLOW_CTRL_AUTO = "auto" PRIORITY_FLOW_CTRL_ON = "on" PROTOCOL_LACP = "lacp" PROTOCOL_STATIC = "static" RECV_FLOW_CTRL_OFF = "off" RECV_FLOW_CTRL_ON = "on" SEND_FLOW_CTRL_OFF = "off" SEND_FLOW_CTRL_ON = "on" SWITCH_ID_A = "A" SWITCH_ID_B = "B" SWITCH_ID_NONE = "NONE" UPLINK_FAIL_ACTION_LINK_DOWN = "link-down" UPLINK_FAIL_ACTION_WARNING = "warning" class SwEthEstcPc(ManagedObject): """This is SwEthEstcPc class.""" consts = SwEthEstcPcConsts() naming_props = set([u'portId']) mo_meta = MoMeta("SwEthEstcPc", "swEthEstcPc", "pc-[port_id]", VersionMeta.Version141i, "InputOutput", 0xfff, [], ["read-only"], [u'swEthLanBorder', u'swEthMon'], [u'swEthTargetEp', u'swVlan'], ["Get"]) prop_meta = { "admin_speed": MoPropertyMeta("admin_speed", "adminSpeed", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, None, None, None, None, ["10gbps", "1gbps", "20gbps", "40gbps", "indeterminate"], []), "admin_state": MoPropertyMeta("admin_state", "adminState", "string", VersionMeta.Version141i, MoPropertyMeta.READ_WRITE, 0x2, None, None, None, ["disabled", "enabled"], []), "border_aggr_port_id": MoPropertyMeta("border_aggr_port_id", "borderAggrPortId", "uint", VersionMeta.Version302a, MoPropertyMeta.READ_WRITE, 0x4, None, None, None, [], []), "border_port_id": MoPropertyMeta("border_port_id", "borderPortId", "uint", VersionMeta.Version141i, MoPropertyMeta.READ_WRITE, 0x8, None, None, None, [], []), "border_slot_id": MoPropertyMeta("border_slot_id", "borderSlotId", "uint", VersionMeta.Version141i, MoPropertyMeta.READ_WRITE, 0x10, None, None, None, [], []), "cdp": MoPropertyMeta("cdp", "cdp", "string", VersionMeta.Version142b, MoPropertyMeta.READ_ONLY, None, None, None, None, ["disabled", "enabled"], []), "child_action": MoPropertyMeta("child_action", "childAction", "string", VersionMeta.Version141i, MoPropertyMeta.INTERNAL, 0x20, None, None, r"""((deleteAll|ignore|deleteNonPresent),){0,2}(deleteAll|ignore|deleteNonPresent){0,1}""", [], []), "cos_value": MoPropertyMeta("cos_value", "cosValue", "uint", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, None, None, None, None, [], []), "dn": MoPropertyMeta("dn", "dn", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, 0x40, 0, 256, None, [], []), "ep_dn": MoPropertyMeta("ep_dn", "epDn", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, None, 0, 256, None, [], []), "forge_mac": MoPropertyMeta("forge_mac", "forgeMac", "string", VersionMeta.Version142b, MoPropertyMeta.READ_ONLY, None, None, None, None, ["allow", "deny"], []), "if_role": MoPropertyMeta("if_role", "ifRole", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, None, None, None, None, ["diag", "fcoe-nas-storage", "fcoe-storage", "fcoe-uplink", "mgmt", "monitor", "nas-storage", "network", "network-fcoe-uplink", "server", "service", "storage", "unknown"], []), "if_type": MoPropertyMeta("if_type", "ifType", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, None, None, None, None, ["aggregation", "physical", "unknown", "virtual"], []), "lacp_fast_timer": MoPropertyMeta("lacp_fast_timer", "lacpFastTimer", "string", VersionMeta.Version222c, MoPropertyMeta.READ_ONLY, None, None, None, None, ["false", "no", "true", "yes"], []), "lacp_suspend_individual": MoPropertyMeta("lacp_suspend_individual", "lacpSuspendIndividual", "string", VersionMeta.Version222c, MoPropertyMeta.READ_ONLY, None, None, None, None, ["false", "no", "true", "yes"], []), "locale": MoPropertyMeta("locale", "locale", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, None, None, None, r"""((defaultValue|unknown|server|chassis|internal|external),){0,5}(defaultValue|unknown|server|chassis|internal|external){0,1}""", [], []), "mon_traf_dir": MoPropertyMeta("mon_traf_dir", "monTrafDir", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, None, None, None, None, ["both", "rx", "tx"], []), "name": MoPropertyMeta("name", "name", "string", VersionMeta.Version141i, MoPropertyMeta.READ_WRITE, 0x80, None, None, r"""[\-\.:_a-zA-Z0-9]{0,16}""", [], []), "peer_dn": MoPropertyMeta("peer_dn", "peerDn", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, None, 0, 256, None, [], []), "port_id": MoPropertyMeta("port_id", "portId", "uint", VersionMeta.Version141i, MoPropertyMeta.NAMING, 0x100, None, None, None, [], []), "port_mode": MoPropertyMeta("port_mode", "portMode", "string", VersionMeta.Version141i, MoPropertyMeta.READ_WRITE, 0x200, None, None, None, ["access", "trunk"], []), "priority_flow_ctrl": MoPropertyMeta("priority_flow_ctrl", "priorityFlowCtrl", "string", VersionMeta.Version211a, MoPropertyMeta.READ_ONLY, None, None, None, None, ["auto", "on"], []), "protocol": MoPropertyMeta("protocol", "protocol", "string", VersionMeta.Version142b, MoPropertyMeta.READ_ONLY, None, None, None, None, ["lacp", "static"], []), "recv_flow_ctrl": MoPropertyMeta("recv_flow_ctrl", "recvFlowCtrl", "string", VersionMeta.Version211a, MoPropertyMeta.READ_ONLY, None, None, None, None, ["off", "on"], []), "rn": MoPropertyMeta("rn", "rn", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, 0x400, 0, 256, None, [], []), "sacl": MoPropertyMeta("sacl", "sacl", "string", VersionMeta.Version302a, MoPropertyMeta.READ_ONLY, None, None, None, r"""((none|del|mod|addchild|cascade),){0,4}(none|del|mod|addchild|cascade){0,1}""", [], []), "send_flow_ctrl": MoPropertyMeta("send_flow_ctrl", "sendFlowCtrl", "string", VersionMeta.Version211a, MoPropertyMeta.READ_ONLY, None, None, None, None, ["off", "on"], []), "status": MoPropertyMeta("status", "status", "string", VersionMeta.Version141i, MoPropertyMeta.READ_WRITE, 0x800, None, None, r"""((removed|created|modified|deleted),){0,3}(removed|created|modified|deleted){0,1}""", [], []), "switch_id": MoPropertyMeta("switch_id", "switchId", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, None, None, None, None, ["A", "B", "NONE"], []), "transport": MoPropertyMeta("transport", "transport", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, None, None, None, r"""((defaultValue|unknown|ether|dce|fc),){0,4}(defaultValue|unknown|ether|dce|fc){0,1}""", [], []), "type": MoPropertyMeta("type", "type", "string", VersionMeta.Version141i, MoPropertyMeta.READ_ONLY, None, None, None, r"""((defaultValue|unknown|lan|san|ipc),){0,4}(defaultValue|unknown|lan|san|ipc){0,1}""", [], []), "uplink_fail_action": MoPropertyMeta("uplink_fail_action", "uplinkFailAction", "string", VersionMeta.Version142b, MoPropertyMeta.READ_ONLY, None, None, None, None, ["link-down", "warning"], []), } prop_map = { "adminSpeed": "admin_speed", "adminState": "admin_state", "borderAggrPortId": "border_aggr_port_id", "borderPortId": "border_port_id", "borderSlotId": "border_slot_id", "cdp": "cdp", "childAction": "child_action", "cosValue": "cos_value", "dn": "dn", "epDn": "ep_dn", "forgeMac": "forge_mac", "ifRole": "if_role", "ifType": "if_type", "lacpFastTimer": "lacp_fast_timer", "lacpSuspendIndividual": "lacp_suspend_individual", "locale": "locale", "monTrafDir": "mon_traf_dir", "name": "name", "peerDn": "peer_dn", "portId": "port_id", "portMode": "port_mode", "priorityFlowCtrl": "priority_flow_ctrl", "protocol": "protocol", "recvFlowCtrl": "recv_flow_ctrl", "rn": "rn", "sacl": "sacl", "sendFlowCtrl": "send_flow_ctrl", "status": "status", "switchId": "switch_id", "transport": "transport", "type": "type", "uplinkFailAction": "uplink_fail_action", } def __init__(self, parent_mo_or_dn, port_id, **kwargs): self._dirty_mask = 0 self.port_id = port_id self.admin_speed = None self.admin_state = None self.border_aggr_port_id = None self.border_port_id = None self.border_slot_id = None self.cdp = None self.child_action = None self.cos_value = None self.ep_dn = None self.forge_mac = None self.if_role = None self.if_type = None self.lacp_fast_timer = None self.lacp_suspend_individual = None self.locale = None self.mon_traf_dir = None self.name = None self.peer_dn = None self.port_mode = None self.priority_flow_ctrl = None self.protocol = None self.recv_flow_ctrl = None self.sacl = None self.send_flow_ctrl = None self.status = None self.switch_id = None self.transport = None self.type = None self.uplink_fail_action = None ManagedObject.__init__(self, "SwEthEstcPc", parent_mo_or_dn, **kwargs)
60.642458
317
0.661354
7941019bdd915dfdf28221bcd1a6510512c373b0
3,120
py
Python
models/necks/db_fpn.py
ZhenqiSong/OCR_Pytorch
df4e8c53353b6c515509241d4c9af3b153224a10
[ "MIT" ]
null
null
null
models/necks/db_fpn.py
ZhenqiSong/OCR_Pytorch
df4e8c53353b6c515509241d4c9af3b153224a10
[ "MIT" ]
null
null
null
models/necks/db_fpn.py
ZhenqiSong/OCR_Pytorch
df4e8c53353b6c515509241d4c9af3b153224a10
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # __author__:Song Zhenqi # 2021-01-26 import torch import torch.nn as nn from torch.nn import functional as F from . import register_neck @register_neck('DBFPN') class DBFPN(nn.Module): def __init__(self, in_channels, out_channels, **kwargs): super(DBFPN, self).__init__() self.out_channels = out_channels self.in2_conv = nn.Conv2d(in_channels=in_channels[0], out_channels=self.out_channels, kernel_size=1, bias=False) self.in3_conv = nn.Conv2d(in_channels=in_channels[1], out_channels=self.out_channels, kernel_size=1, bias=False) self.in4_conv = nn.Conv2d(in_channels=in_channels[2], out_channels=self.out_channels, kernel_size=1, bias=False) self.in5_conv = nn.Conv2d(in_channels=in_channels[3], out_channels=self.out_channels, kernel_size=1, bias=False) self.p5_conv = nn.Conv2d(in_channels=self.out_channels, out_channels=self.out_channels//4, kernel_size=3, padding=1, bias=False) self.p4_conv = nn.Conv2d(in_channels=self.out_channels, out_channels=self.out_channels//4, kernel_size=3, padding=1, bias=False) self.p3_conv = nn.Conv2d(in_channels=self.out_channels, out_channels=self.out_channels//4, kernel_size=3, padding=1, bias=False) self.p2_conv = nn.Conv2d(in_channels=self.out_channels, out_channels=self.out_channels//4, kernel_size=3, padding=1, bias=False) def forward(self, x): c2, c3, c4, c5 = x in5 = self.in5_conv(c5) in4 = self.in4_conv(c4) in3 = self.in3_conv(c3) in2 = self.in2_conv(c2) out4 = in4 + F.interpolate(in5, scale_factor=2, mode='nearest') out3 = in3 + F.interpolate(out4, scale_factor=2, mode='nearest') out2 = in2 + F.interpolate(out3, scale_factor=2, mode='nearest') p5 = self.p5_conv(in5) p4 = self.p4_conv(out4) p3 = self.p3_conv(out3) p2 = self.p2_conv(out2) p5 = F.interpolate(p5, scale_factor=8, mode='nearest') p4 = F.interpolate(p4, scale_factor=4, mode='nearest') p3 = F.interpolate(p3, scale_factor=2, mode='nearest') fuse = torch.cat([p5, p4, p3, p2], dim=1) return fuse
37.142857
72
0.476282