content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
class Solution:
def judgeCircle(self, moves: str) -> bool:
h_pos = 0
v_pos = 0
for move in moves:
if move == 'U':
v_pos += 1
elif move == 'D':
v_pos -= 1
elif move == 'L':
h_pos -= 1
elif move == 'R':
h_pos += 1
if h_pos == 0 and v_pos == 0:
return True
return False
| class Solution:
def judge_circle(self, moves: str) -> bool:
h_pos = 0
v_pos = 0
for move in moves:
if move == 'U':
v_pos += 1
elif move == 'D':
v_pos -= 1
elif move == 'L':
h_pos -= 1
elif move == 'R':
h_pos += 1
if h_pos == 0 and v_pos == 0:
return True
return False |
morning = {'Java', 'C', 'Ruby', 'Lisp', 'C#'}
afternoon = {'Python', 'C#', 'Java', 'C', 'Ruby'}
print(morning ^ afternoon)
print(morning.symmetric_difference(afternoon))
| morning = {'Java', 'C', 'Ruby', 'Lisp', 'C#'}
afternoon = {'Python', 'C#', 'Java', 'C', 'Ruby'}
print(morning ^ afternoon)
print(morning.symmetric_difference(afternoon)) |
"""
DO NOT COMMIT THIS FILE WITH INFORMATION FILLED OUT!
DO NOT COMMIT THIS FILE WITH INFORMATION FILLED OUT!
DO NOT COMMIT THIS FILE WITH INFORMATION FILLED OUT!
DO NOT COMMIT THIS FILE WITH INFORMATION FILLED OUT!
"""
DB_USERNAME = ''
DB_PASSWORD = ''
SECRET_KEY = ''
| """
DO NOT COMMIT THIS FILE WITH INFORMATION FILLED OUT!
DO NOT COMMIT THIS FILE WITH INFORMATION FILLED OUT!
DO NOT COMMIT THIS FILE WITH INFORMATION FILLED OUT!
DO NOT COMMIT THIS FILE WITH INFORMATION FILLED OUT!
"""
db_username = ''
db_password = ''
secret_key = '' |
# https://www.hackerrank.com/challenges/equal-stacks
def equal_stacks(stacks):
stacks_size = [sum(stack) for stack in stacks]
while len(set(stacks_size)) > 1:
higher = stacks_size.index(max(stacks_size))
poped = stacks[higher].pop(0)
stacks_size[higher] -= poped
return stacks_size[0]
n1, n2, n3 = map(int, input().strip().split(' '))
s1 = [int(x) for x in input().strip().split(' ')]
s2 = [int(x) for x in input().strip().split(' ')]
s3 = [int(x) for x in input().strip().split(' ')]
print(equal_stacks([s1, s2, s3]))
| def equal_stacks(stacks):
stacks_size = [sum(stack) for stack in stacks]
while len(set(stacks_size)) > 1:
higher = stacks_size.index(max(stacks_size))
poped = stacks[higher].pop(0)
stacks_size[higher] -= poped
return stacks_size[0]
(n1, n2, n3) = map(int, input().strip().split(' '))
s1 = [int(x) for x in input().strip().split(' ')]
s2 = [int(x) for x in input().strip().split(' ')]
s3 = [int(x) for x in input().strip().split(' ')]
print(equal_stacks([s1, s2, s3])) |
#!/usr/env/bin python3
#
#-----------------------------------------------------------------------
#
# Mathematical and physical constants.
#
#-----------------------------------------------------------------------
#
# Pi.
pi_geom = 3.14159265358979323846264338327
# Degrees per radian.
degs_per_radian = 360.0 / (2.0 * pi_geom)
# Radius of the Earth in meters.
radius_Earth = 6371200.0
#
#-----------------------------------------------------------------------
#
# Other.
#
#-----------------------------------------------------------------------
#
valid_vals_BOOLEAN = [True, False]
| pi_geom = 3.141592653589793
degs_per_radian = 360.0 / (2.0 * pi_geom)
radius__earth = 6371200.0
valid_vals_boolean = [True, False] |
#!/usr/local/bin/python3.4
"""
## Copyright (c) 2015 SONATA-NFV, 2017 5GTANGO [, ANY ADDITIONAL AFFILIATION]
## 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.
##
## Neither the name of the SONATA-NFV, 5GTANGO [, ANY ADDITIONAL AFFILIATION]
## nor the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## This work has been performed in the framework of the SONATA project,
## funded by the European Commission under Grant number 671517 through
## the Horizon 2020 and 5G-PPP programmes. The authors would like to
## acknowledge the contributions of their colleagues of the SONATA
## partner consortium (www.sonata-nfv.eu).
##
## This work has been performed in the framework of the 5GTANGO project,
## funded by the European Commission under Grant number 761493 through
## the Horizon 2020 and 5G-PPP programmes. The authors would like to
## acknowledge the contributions of their colleagues of the 5GTANGO
## partner consortium (www.5gtango.eu).
"""
class nsd_content:
def __init__(self, uuid="", name="", description="", vendor="", version="", md5="", author="", created="", status="", updated=""):
self.uuid=uuid
self.name=name
self.description=description
self.vendor=vendor
self.version=version
self.md5=md5
self.author=author
self.created=created
self.status=status
self.updated=updated
def __str__(self):
str_result = "NSD: " + self.uuid \
+ self.name \
+ self.description \
+ self.vendor \
+ self.version \
+ self.md5 \
+ self.author \
+ self.created \
+ self.status \
+ self.updated
return str_result | """
## Copyright (c) 2015 SONATA-NFV, 2017 5GTANGO [, ANY ADDITIONAL AFFILIATION]
## 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.
##
## Neither the name of the SONATA-NFV, 5GTANGO [, ANY ADDITIONAL AFFILIATION]
## nor the names of its contributors may be used to endorse or promote
## products derived from this software without specific prior written
## permission.
##
## This work has been performed in the framework of the SONATA project,
## funded by the European Commission under Grant number 671517 through
## the Horizon 2020 and 5G-PPP programmes. The authors would like to
## acknowledge the contributions of their colleagues of the SONATA
## partner consortium (www.sonata-nfv.eu).
##
## This work has been performed in the framework of the 5GTANGO project,
## funded by the European Commission under Grant number 761493 through
## the Horizon 2020 and 5G-PPP programmes. The authors would like to
## acknowledge the contributions of their colleagues of the 5GTANGO
## partner consortium (www.5gtango.eu).
"""
class Nsd_Content:
def __init__(self, uuid='', name='', description='', vendor='', version='', md5='', author='', created='', status='', updated=''):
self.uuid = uuid
self.name = name
self.description = description
self.vendor = vendor
self.version = version
self.md5 = md5
self.author = author
self.created = created
self.status = status
self.updated = updated
def __str__(self):
str_result = 'NSD: ' + self.uuid + self.name + self.description + self.vendor + self.version + self.md5 + self.author + self.created + self.status + self.updated
return str_result |
# common.py
#
# Module common infrastructure
#
_FORMATTERS = dict()
def register_formatter(descriptor):
"""Decorator that registers a formatter class"""
def passthrough(cls):
_FORMATTERS[descriptor] = cls
return cls
return passthrough
def get_formatter(descriptor):
if not descriptor in _FORMATTERS:
print("descriptor must be one of:")
print(_FORMATTERS.keys())
return _FORMATTERS[descriptor]
| _formatters = dict()
def register_formatter(descriptor):
"""Decorator that registers a formatter class"""
def passthrough(cls):
_FORMATTERS[descriptor] = cls
return cls
return passthrough
def get_formatter(descriptor):
if not descriptor in _FORMATTERS:
print('descriptor must be one of:')
print(_FORMATTERS.keys())
return _FORMATTERS[descriptor] |
x = 1
for i in range (0, 5):
y = 7
for j in range (0, 3):
print(f"I={x} J={y}")
y -= 1
x += 2
| x = 1
for i in range(0, 5):
y = 7
for j in range(0, 3):
print(f'I={x} J={y}')
y -= 1
x += 2 |
n = int(input("enter a no: "))
for i in range (n*10, n-1 ,-n):
print(i)
| n = int(input('enter a no: '))
for i in range(n * 10, n - 1, -n):
print(i) |
class Solution:
def minRemoveToMakeValid(self, s: str) -> str:
stack = []
bad = set()
for index, c in enumerate(s):
if c == "(":
stack.append(index)
elif c == ")":
if len(stack) > 0:
stack.pop()
else:
bad.add(index)
for leftover in stack:
bad.add(leftover)
return "".join(c for index, c in enumerate(s) if index not in bad) | class Solution:
def min_remove_to_make_valid(self, s: str) -> str:
stack = []
bad = set()
for (index, c) in enumerate(s):
if c == '(':
stack.append(index)
elif c == ')':
if len(stack) > 0:
stack.pop()
else:
bad.add(index)
for leftover in stack:
bad.add(leftover)
return ''.join((c for (index, c) in enumerate(s) if index not in bad)) |
#
# Copyright (C) 2018 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.
#
layout = BoolScalar("layout", False) # NHWC
# TEST 1: DEPTHWISE_CONV2D_NCHW, pad = 0, stride = 1, cm = 2, act = none
i1 = Input("op1", "TENSOR_FLOAT32", "{1, 3, 3, 2}")
f1 = Parameter("op2", "TENSOR_FLOAT32", "{1, 2, 2, 4}", [.25, 0., .2, 0., .25, 0., 0., .3, .25, 0., 0., 0., .25, .1, 0., 0.])
b1 = Parameter("op3", "TENSOR_FLOAT32", "{4}", [1, 2, 3, 4])
o1 = Output("op4", "TENSOR_FLOAT32", "{1, 2, 2, 4}")
Model().Operation("DEPTHWISE_CONV_2D", i1, f1, b1, 0, 0, 0, 0, 1, 1, 2, 0, layout).To(o1)
# Additional data type
quant8 = DataTypeConverter().Identify({
i1: ("TENSOR_QUANT8_ASYMM", 0.5, 0),
f1: ("TENSOR_QUANT8_ASYMM", 0.01, 0),
b1: ("TENSOR_INT32", 0.005, 0),
o1: ("TENSOR_QUANT8_ASYMM", 0.1, 0)
})
channelQuant8 = DataTypeConverter().Identify({
i1: ("TENSOR_QUANT8_ASYMM", 0.5, 0),
f1: ("TENSOR_QUANT8_SYMM_PER_CHANNEL", 0, 0, SymmPerChannelQuantParams(channelDim=3, scales=[0.01, 0.005, 0.01, 0.005])),
b1: ("TENSOR_INT32", 0.0, 0, SymmPerChannelQuantParams(channelDim=0, scales=[0.005, 0.0025, 0.005, 0.0025], hide=True)),
o1: ("TENSOR_QUANT8_ASYMM", 0.1, 0)
})
channelQuant8_mult_gt_1 = DataTypeConverter().Identify({
i1: ("TENSOR_QUANT8_ASYMM", 0.5, 0),
f1: ("TENSOR_QUANT8_SYMM_PER_CHANNEL", 0, 0, SymmPerChannelQuantParams(channelDim=3, scales=[0.01, 0.005, 0.01, 0.005])),
b1: ("TENSOR_INT32", 0.0, 0, SymmPerChannelQuantParams(channelDim=0, scales=[0.005, 0.0025, 0.005, 0.0025], hide=True)),
o1: ("TENSOR_QUANT8_ASYMM", 0.0001, 0)
})
# Instantiate an example
example = Example({
i1: [10, 21, 10, 22, 10, 23,
10, 24, 10, 25, 10, 26,
10, 27, 10, 28, 10, 29],
o1: [11, 3, 7.2, 10.6,
11, 3, 7.4, 10.9,
11, 3, 7.8, 11.5,
11, 3, 8.0, 11.8]
}).AddNchw(i1, o1, layout).AddInput(f1, b1).AddVariations("relaxed", "float16", channelQuant8, channelQuant8_mult_gt_1, quant8)
# TEST 2: DEPTHWISE_CONV2D_NCHW_2, pad = valid, stride = 1, cm = 2, act = none
i2 = Input("op1", "TENSOR_FLOAT32", "{1, 3, 2, 2}")
f2 = Parameter("op2", "TENSOR_FLOAT32", "{1, 2, 2, 4}", [1, 2, 3, 4, -9, 10, -11, 12, 5, 6, 7, 8, 13, -14, 15, -16])
b2 = Parameter("op3", "TENSOR_FLOAT32", "{4}", [1, 2, 3, 4])
o2 = Output("op4", "TENSOR_FLOAT32", "{1, 2, 1, 4}")
Model().Operation("DEPTHWISE_CONV_2D", i2, f2, b2, 2, 1, 1, 2, 0, layout).To(o2)
# Additional data type
quant8 = DataTypeConverter().Identify({
i2: ("TENSOR_QUANT8_ASYMM", 0.5, 128),
f2: ("TENSOR_QUANT8_ASYMM", 0.5, 128),
b2: ("TENSOR_INT32", 0.25, 0),
o2: ("TENSOR_QUANT8_ASYMM", 1.0, 100)
})
channelQuant8 = DataTypeConverter().Identify({
i2: ("TENSOR_QUANT8_ASYMM", 0.5, 128),
f2: ("TENSOR_QUANT8_SYMM_PER_CHANNEL", 0, 0, SymmPerChannelQuantParams(channelDim=3, scales=[0.5, 0.25, 0.5, 0.25])),
b2: ("TENSOR_INT32", 0.0, 0, SymmPerChannelQuantParams(channelDim=0, scales=[0.25, 0.125, 0.25, 0.125], hide=True)),
o2: ("TENSOR_QUANT8_ASYMM", 1.0, 100)
})
# Instantiate an example
example = Example({
i2: [1, 2, 7, 8, 3, 4, 9, 10, 5, 6, 11, 12],
o2: [71, -34, 99, -20, 91, -26, 127, -4]
}).AddNchw(i2, o2, layout).AddInput(f2, b2).AddVariations("relaxed", "float16", quant8, channelQuant8)
# TEST 3: DEPTHWISE_CONV2D_NCHW_LARGE, pad = 0, stride = 1, cm = 1, act = none
i3 = Input("op1", "TENSOR_FLOAT32", "{1, 2, 2, 2}")
f3 = Parameter("op2", "TENSOR_FLOAT32", "{1, 2, 2, 2}", [.25, 0, .25, 1, .25, 0, .25, 1])
b3 = Parameter("op3", "TENSOR_FLOAT32", "{2}", [100, 200])
o3 = Output("op4", "TENSOR_FLOAT32", "{1, 1, 1, 2}")
Model("large").Operation("DEPTHWISE_CONV_2D", i3, f3, b3, 0, 0, 0, 0, 1, 1, 1, 0, layout).To(o3)
# Additional data type
quant8 = DataTypeConverter().Identify({
i3: ("TENSOR_QUANT8_ASYMM", 0.5, 100),
f3: ("TENSOR_QUANT8_ASYMM", 0.125, 128),
b3: ("TENSOR_INT32", 0.0625, 0),
o3: ("TENSOR_QUANT8_ASYMM", 2.0, 128)
})
channelQuant8 = DataTypeConverter().Identify({
i3: ("TENSOR_QUANT8_ASYMM", 0.5, 128),
f3: ("TENSOR_QUANT8_SYMM_PER_CHANNEL", 0, 0, SymmPerChannelQuantParams(channelDim=3, scales=[0.125, 0.25])),
b3: ("TENSOR_INT32", 0.0, 0, SymmPerChannelQuantParams(channelDim=0, scales=[0.0625, 0.125], hide=True)),
o3: ("TENSOR_QUANT8_ASYMM", 2.0, 128)
})
# Instantiate an example
example = Example({
i3: [10, 21, 10, 22, 10, 23, 10, 24],
o3: [110, 246]
}).AddNchw(i3, o3, layout).AddInput(f3, b3).AddVariations("relaxed", "float16", quant8, channelQuant8)
# TEST 4: DEPTHWISE_CONV2D_NCHW_LARGE, pad = 0, stride = 1, cm = 1, act = none
i4 = Input("op1", "TENSOR_FLOAT32", "{1, 2, 2, 4}")
f4 = Parameter("op2", "TENSOR_FLOAT32", "{1, 2, 2, 4}", [.25, 0, 10, 50, .25, 1, 20, 50, .25, 0, 30, 50, .25, 1, 40, 50])
b4 = Parameter("op3", "TENSOR_FLOAT32", "{4}", [6000, 7000, 8000, 9000])
o4 = Output("op4", "TENSOR_FLOAT32", "{1, 1, 1, 4}")
Model("large").Operation("DEPTHWISE_CONV_2D", i4, f4, b4, 0, 0, 0, 0, 1, 1, 1, 0, layout).To(o4)
# Additional data type
quant8 = DataTypeConverter().Identify({
i4: ("TENSOR_QUANT8_ASYMM", 0.5, 128),
f4: ("TENSOR_QUANT8_ASYMM", 0.25, 0),
b4: ("TENSOR_INT32", 0.125, 0),
o4: ("TENSOR_QUANT8_ASYMM", 50.0, 0)
})
channelQuant8 = DataTypeConverter().Identify({
i4: ("TENSOR_QUANT8_ASYMM", 0.5, 128),
f4: ("TENSOR_QUANT8_SYMM_PER_CHANNEL", 0, 0, SymmPerChannelQuantParams(channelDim=3, scales=[1.0, 2.0, 1.0, 1.0])),
b4: ("TENSOR_INT32", 0.0, 0, SymmPerChannelQuantParams(channelDim=0, scales=[0.5, 1.0, 0.5, 0.5], hide=True)),
o4: ("TENSOR_QUANT8_ASYMM", 50.0, 0)
})
# Instantiate an example
example = Example({
i4: [10, 21, 10, 0,
10, 22, 20, 0,
10, 23, 30, 0,
10, 24, 40, 0],
o4: [6010, 7046, 11000, 9000]
}).AddNchw(i4, o4, layout).AddInput(f4, b4).AddVariations("relaxed", "float16", quant8, channelQuant8)
# TEST 9: quantized with scale product greater than output scale
input_scale = 256.5 / 255
input_zero_point = 127
filter_scale = 256.5 / 255
filter_zero_point = 128
i9 = Input("op1",
("TENSOR_QUANT8_ASYMM", [1, 3, 2, 2], input_scale, input_zero_point))
f9 = Parameter(
"op2",
("TENSOR_QUANT8_ASYMM", [1, 2, 2, 4], filter_scale, filter_zero_point), [
129, 130, 131, 132, 119, 138, 117, 140, 133, 134, 135, 136, 141, 114,
143, 112
])
b9 = Parameter("op3", ("TENSOR_INT32", [4], input_scale * filter_scale, 0),
[2, 4, 6, 8])
o9 = Output("op4", ("TENSOR_QUANT8_ASYMM", [1, 2, 1, 4], 1.0, 127))
model9 = Model("quant_output_multiplier_gt_1").Operation("DEPTHWISE_CONV_2D", i9, f9, b9, 2, 1, 1, 2,
0).To(o9)
# Instantiate an example
example = Example({
i9: [129, 131, 141, 143, 133, 135, 145, 147, 137, 139, 149, 151],
o9: [255, 58, 255, 87, 255, 74, 255, 119]
}, model=model9).AddInput(f9, b9).AddVariations("relaxed")
| layout = bool_scalar('layout', False)
i1 = input('op1', 'TENSOR_FLOAT32', '{1, 3, 3, 2}')
f1 = parameter('op2', 'TENSOR_FLOAT32', '{1, 2, 2, 4}', [0.25, 0.0, 0.2, 0.0, 0.25, 0.0, 0.0, 0.3, 0.25, 0.0, 0.0, 0.0, 0.25, 0.1, 0.0, 0.0])
b1 = parameter('op3', 'TENSOR_FLOAT32', '{4}', [1, 2, 3, 4])
o1 = output('op4', 'TENSOR_FLOAT32', '{1, 2, 2, 4}')
model().Operation('DEPTHWISE_CONV_2D', i1, f1, b1, 0, 0, 0, 0, 1, 1, 2, 0, layout).To(o1)
quant8 = data_type_converter().Identify({i1: ('TENSOR_QUANT8_ASYMM', 0.5, 0), f1: ('TENSOR_QUANT8_ASYMM', 0.01, 0), b1: ('TENSOR_INT32', 0.005, 0), o1: ('TENSOR_QUANT8_ASYMM', 0.1, 0)})
channel_quant8 = data_type_converter().Identify({i1: ('TENSOR_QUANT8_ASYMM', 0.5, 0), f1: ('TENSOR_QUANT8_SYMM_PER_CHANNEL', 0, 0, symm_per_channel_quant_params(channelDim=3, scales=[0.01, 0.005, 0.01, 0.005])), b1: ('TENSOR_INT32', 0.0, 0, symm_per_channel_quant_params(channelDim=0, scales=[0.005, 0.0025, 0.005, 0.0025], hide=True)), o1: ('TENSOR_QUANT8_ASYMM', 0.1, 0)})
channel_quant8_mult_gt_1 = data_type_converter().Identify({i1: ('TENSOR_QUANT8_ASYMM', 0.5, 0), f1: ('TENSOR_QUANT8_SYMM_PER_CHANNEL', 0, 0, symm_per_channel_quant_params(channelDim=3, scales=[0.01, 0.005, 0.01, 0.005])), b1: ('TENSOR_INT32', 0.0, 0, symm_per_channel_quant_params(channelDim=0, scales=[0.005, 0.0025, 0.005, 0.0025], hide=True)), o1: ('TENSOR_QUANT8_ASYMM', 0.0001, 0)})
example = example({i1: [10, 21, 10, 22, 10, 23, 10, 24, 10, 25, 10, 26, 10, 27, 10, 28, 10, 29], o1: [11, 3, 7.2, 10.6, 11, 3, 7.4, 10.9, 11, 3, 7.8, 11.5, 11, 3, 8.0, 11.8]}).AddNchw(i1, o1, layout).AddInput(f1, b1).AddVariations('relaxed', 'float16', channelQuant8, channelQuant8_mult_gt_1, quant8)
i2 = input('op1', 'TENSOR_FLOAT32', '{1, 3, 2, 2}')
f2 = parameter('op2', 'TENSOR_FLOAT32', '{1, 2, 2, 4}', [1, 2, 3, 4, -9, 10, -11, 12, 5, 6, 7, 8, 13, -14, 15, -16])
b2 = parameter('op3', 'TENSOR_FLOAT32', '{4}', [1, 2, 3, 4])
o2 = output('op4', 'TENSOR_FLOAT32', '{1, 2, 1, 4}')
model().Operation('DEPTHWISE_CONV_2D', i2, f2, b2, 2, 1, 1, 2, 0, layout).To(o2)
quant8 = data_type_converter().Identify({i2: ('TENSOR_QUANT8_ASYMM', 0.5, 128), f2: ('TENSOR_QUANT8_ASYMM', 0.5, 128), b2: ('TENSOR_INT32', 0.25, 0), o2: ('TENSOR_QUANT8_ASYMM', 1.0, 100)})
channel_quant8 = data_type_converter().Identify({i2: ('TENSOR_QUANT8_ASYMM', 0.5, 128), f2: ('TENSOR_QUANT8_SYMM_PER_CHANNEL', 0, 0, symm_per_channel_quant_params(channelDim=3, scales=[0.5, 0.25, 0.5, 0.25])), b2: ('TENSOR_INT32', 0.0, 0, symm_per_channel_quant_params(channelDim=0, scales=[0.25, 0.125, 0.25, 0.125], hide=True)), o2: ('TENSOR_QUANT8_ASYMM', 1.0, 100)})
example = example({i2: [1, 2, 7, 8, 3, 4, 9, 10, 5, 6, 11, 12], o2: [71, -34, 99, -20, 91, -26, 127, -4]}).AddNchw(i2, o2, layout).AddInput(f2, b2).AddVariations('relaxed', 'float16', quant8, channelQuant8)
i3 = input('op1', 'TENSOR_FLOAT32', '{1, 2, 2, 2}')
f3 = parameter('op2', 'TENSOR_FLOAT32', '{1, 2, 2, 2}', [0.25, 0, 0.25, 1, 0.25, 0, 0.25, 1])
b3 = parameter('op3', 'TENSOR_FLOAT32', '{2}', [100, 200])
o3 = output('op4', 'TENSOR_FLOAT32', '{1, 1, 1, 2}')
model('large').Operation('DEPTHWISE_CONV_2D', i3, f3, b3, 0, 0, 0, 0, 1, 1, 1, 0, layout).To(o3)
quant8 = data_type_converter().Identify({i3: ('TENSOR_QUANT8_ASYMM', 0.5, 100), f3: ('TENSOR_QUANT8_ASYMM', 0.125, 128), b3: ('TENSOR_INT32', 0.0625, 0), o3: ('TENSOR_QUANT8_ASYMM', 2.0, 128)})
channel_quant8 = data_type_converter().Identify({i3: ('TENSOR_QUANT8_ASYMM', 0.5, 128), f3: ('TENSOR_QUANT8_SYMM_PER_CHANNEL', 0, 0, symm_per_channel_quant_params(channelDim=3, scales=[0.125, 0.25])), b3: ('TENSOR_INT32', 0.0, 0, symm_per_channel_quant_params(channelDim=0, scales=[0.0625, 0.125], hide=True)), o3: ('TENSOR_QUANT8_ASYMM', 2.0, 128)})
example = example({i3: [10, 21, 10, 22, 10, 23, 10, 24], o3: [110, 246]}).AddNchw(i3, o3, layout).AddInput(f3, b3).AddVariations('relaxed', 'float16', quant8, channelQuant8)
i4 = input('op1', 'TENSOR_FLOAT32', '{1, 2, 2, 4}')
f4 = parameter('op2', 'TENSOR_FLOAT32', '{1, 2, 2, 4}', [0.25, 0, 10, 50, 0.25, 1, 20, 50, 0.25, 0, 30, 50, 0.25, 1, 40, 50])
b4 = parameter('op3', 'TENSOR_FLOAT32', '{4}', [6000, 7000, 8000, 9000])
o4 = output('op4', 'TENSOR_FLOAT32', '{1, 1, 1, 4}')
model('large').Operation('DEPTHWISE_CONV_2D', i4, f4, b4, 0, 0, 0, 0, 1, 1, 1, 0, layout).To(o4)
quant8 = data_type_converter().Identify({i4: ('TENSOR_QUANT8_ASYMM', 0.5, 128), f4: ('TENSOR_QUANT8_ASYMM', 0.25, 0), b4: ('TENSOR_INT32', 0.125, 0), o4: ('TENSOR_QUANT8_ASYMM', 50.0, 0)})
channel_quant8 = data_type_converter().Identify({i4: ('TENSOR_QUANT8_ASYMM', 0.5, 128), f4: ('TENSOR_QUANT8_SYMM_PER_CHANNEL', 0, 0, symm_per_channel_quant_params(channelDim=3, scales=[1.0, 2.0, 1.0, 1.0])), b4: ('TENSOR_INT32', 0.0, 0, symm_per_channel_quant_params(channelDim=0, scales=[0.5, 1.0, 0.5, 0.5], hide=True)), o4: ('TENSOR_QUANT8_ASYMM', 50.0, 0)})
example = example({i4: [10, 21, 10, 0, 10, 22, 20, 0, 10, 23, 30, 0, 10, 24, 40, 0], o4: [6010, 7046, 11000, 9000]}).AddNchw(i4, o4, layout).AddInput(f4, b4).AddVariations('relaxed', 'float16', quant8, channelQuant8)
input_scale = 256.5 / 255
input_zero_point = 127
filter_scale = 256.5 / 255
filter_zero_point = 128
i9 = input('op1', ('TENSOR_QUANT8_ASYMM', [1, 3, 2, 2], input_scale, input_zero_point))
f9 = parameter('op2', ('TENSOR_QUANT8_ASYMM', [1, 2, 2, 4], filter_scale, filter_zero_point), [129, 130, 131, 132, 119, 138, 117, 140, 133, 134, 135, 136, 141, 114, 143, 112])
b9 = parameter('op3', ('TENSOR_INT32', [4], input_scale * filter_scale, 0), [2, 4, 6, 8])
o9 = output('op4', ('TENSOR_QUANT8_ASYMM', [1, 2, 1, 4], 1.0, 127))
model9 = model('quant_output_multiplier_gt_1').Operation('DEPTHWISE_CONV_2D', i9, f9, b9, 2, 1, 1, 2, 0).To(o9)
example = example({i9: [129, 131, 141, 143, 133, 135, 145, 147, 137, 139, 149, 151], o9: [255, 58, 255, 87, 255, 74, 255, 119]}, model=model9).AddInput(f9, b9).AddVariations('relaxed') |
class Arrival:
def __init__(self, time_from_stop, dist_from_stop):
self.time_from_stop = time_from_stop
self.dist_from_stop = dist_from_stop
def __repr__(self):
return f'''{self.__class__.__name__}(
{self.time_from_stop!r}, {self.dist_from_stop!r})'''
def __str__(self):
return (
f'{self.dist_from_stop} and arrives in {self.get_minutes()} '
f'minutes and {self.get_seconds()} seconds'
)
def get_minutes(self):
return self.time_from_stop[0]
def get_seconds(self):
return self.time_from_stop[1]
class BusRoute:
def __init__(self, bus_route_name, bus_stop):
self.name = bus_route_name
self.monitored_stop = bus_stop
self.bus_arrivals = []
def add_bus_arrival(self, time, distance):
self.bus_arrivals.append(Arrival(time, distance))
def get_short_bus_route_name(self, long_route_name):
return long_route_name[long_route_name.rfind('_')+1:]
def __repr__(self):
return f'''{self.__class__.__name__}(
{self.name!r}, {self.monitored_stop!r}, {self.bus_arrivals!r})'''
def __str__(self):
bus_str = (
f'For the {self.get_short_bus_route_name(self.name)} bus '
f'at the {self.monitored_stop} stop, '
)
if len(self.bus_arrivals) == 0:
bus_str += f'there are no buses available at this time!'
for index, arrival in enumerate(self.bus_arrivals):
bus_str += f'{self.ordinal(index + 1)} bus is {arrival}, '
# excluding trailing characters
return bus_str[:-2]
def ordinal(self, num):
return BusRoute.ordinal_dict.get(num, "next")
ordinal_dict = {
1 : "first",
2 : "second",
3 : "third"
}
| class Arrival:
def __init__(self, time_from_stop, dist_from_stop):
self.time_from_stop = time_from_stop
self.dist_from_stop = dist_from_stop
def __repr__(self):
return f'{self.__class__.__name__}(\n {self.time_from_stop!r}, {self.dist_from_stop!r})'
def __str__(self):
return f'{self.dist_from_stop} and arrives in {self.get_minutes()} minutes and {self.get_seconds()} seconds'
def get_minutes(self):
return self.time_from_stop[0]
def get_seconds(self):
return self.time_from_stop[1]
class Busroute:
def __init__(self, bus_route_name, bus_stop):
self.name = bus_route_name
self.monitored_stop = bus_stop
self.bus_arrivals = []
def add_bus_arrival(self, time, distance):
self.bus_arrivals.append(arrival(time, distance))
def get_short_bus_route_name(self, long_route_name):
return long_route_name[long_route_name.rfind('_') + 1:]
def __repr__(self):
return f'{self.__class__.__name__}(\n {self.name!r}, {self.monitored_stop!r}, {self.bus_arrivals!r})'
def __str__(self):
bus_str = f'For the {self.get_short_bus_route_name(self.name)} bus at the {self.monitored_stop} stop, '
if len(self.bus_arrivals) == 0:
bus_str += f'there are no buses available at this time!'
for (index, arrival) in enumerate(self.bus_arrivals):
bus_str += f'{self.ordinal(index + 1)} bus is {arrival}, '
return bus_str[:-2]
def ordinal(self, num):
return BusRoute.ordinal_dict.get(num, 'next')
ordinal_dict = {1: 'first', 2: 'second', 3: 'third'} |
ES_HOST = 'localhost:9200'
ES_INDEX = 'pending-cord_cell'
ES_DOC_TYPE = 'cell'
API_PREFIX = 'cord_cell'
API_VERSION = ''
| es_host = 'localhost:9200'
es_index = 'pending-cord_cell'
es_doc_type = 'cell'
api_prefix = 'cord_cell'
api_version = '' |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
@author : zzw
@time : 2019/8/3 14:33
@file : __init__.py
@description :
"""
__version__ = "0.1.0"
| """
@author : zzw
@time : 2019/8/3 14:33
@file : __init__.py
@description :
"""
__version__ = '0.1.0' |
num1 = 11
num2 = 22
num3 = 33
num4 = 44
num5 = 55
num6 = 66
num7 = 77
num8 = 88
num10 = 100
numm11 = 111
| num1 = 11
num2 = 22
num3 = 33
num4 = 44
num5 = 55
num6 = 66
num7 = 77
num8 = 88
num10 = 100
numm11 = 111 |
def make_style_sheet():
style = """
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px;
color: #333;
}
body > *:first-child {
margin-top: 0 !important;
}
body > *:last-child {
margin-bottom: 0 !important;
}
a {
color: #4183C4;
text-decoration: none;
}
a.absent {
color: #cc0000;
}
a.anchor {
display: block;
padding-left: 30px;
margin-left: -30px;
cursor: pointer;
position: absolute;
top: 0;
left: 0;
bottom: 0;
}
h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
cursor: text;
position: relative;
}
h2:first-child, h1:first-child, h1:first-child + h2, h3:first-child, h4:first-child, h5:first-child, h6:first-child {
margin-top: 0;
padding-top: 0;
}
h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {
text-decoration: none;
}
h1 tt, h1 code {
font-size: inherit;
}
h2 tt, h2 code {
font-size: inherit;
}
h3 tt, h3 code {
font-size: inherit;
}
h4 tt, h4 code {
font-size: inherit;
}
h5 tt, h5 code {
font-size: inherit;
}
h6 tt, h6 code {
font-size: inherit;
}
h1 {
font-size: 28px;
color: black;
}
h2 {
font-size: 24px;
border-bottom: 1px solid #cccccc;
color: black;
}
h3 {
font-size: 18px;
}
h4 {
font-size: 16px;
}
h5 {
font-size: 14px;
}
h6 {
color: #777777;
font-size: 14px;
}
p, blockquote, ul, ol, dl, li, table, pre {
margin: 15px 0;
}
hr {
background: transparent url("http://tinyurl.com/bq5kskr") repeat-x 0 0;
border: 0 none;
color: #cccccc;
height: 4px;
padding: 0;
}
body > h2:first-child {
margin-top: 0;
padding-top: 0;
}
body > h1:first-child {
margin-top: 0;
padding-top: 0;
}
body > h1:first-child + h2 {
margin-top: 0;
padding-top: 0;
}
body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {
margin-top: 0;
padding-top: 0;
}
a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0;
}
h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {
margin-top: 0;
}
li p.first {
display: inline-block;
}
ul, ol {
padding-left: 30px;
}
ul :first-child, ol :first-child {
margin-top: 0;
}
ul :last-child, ol :last-child {
margin-bottom: 0;
}
dl {
padding: 0;
}
dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px;
}
dl dt:first-child {
padding: 0;
}
dl dt > :first-child {
margin-top: 0;
}
dl dt > :last-child {
margin-bottom: 0;
}
dl dd {
margin: 0 0 15px;
padding: 0 15px;
}
dl dd > :first-child {
margin-top: 0;
}
dl dd > :last-child {
margin-bottom: 0;
}
blockquote {
border-left: 4px solid #dddddd;
padding: 0 15px;
color: #777777;
}
blockquote > :first-child {
margin-top: 0;
}
blockquote > :last-child {
margin-bottom: 0;
}
table {
padding: 0;
}
table tr {
border-top: 1px solid #cccccc;
background-color: white;
margin: 0;
padding: 0;
}
table tr:nth-child(2n) {
background-color: #f8f8f8;
}
table tr th {
font-weight: bold;
border: 1px solid #cccccc;
text-align: left;
margin: 0;
padding: 6px 13px;
}
table tr td {
border: 1px solid #cccccc;
text-align: left;
margin: 0;
padding: 6px 13px;
}
table tr th :first-child, table tr td :first-child {
margin-top: 0;
}
table tr th :last-child, table tr td :last-child {
margin-bottom: 0;
}
img {
max-width: 100%;
}
span.frame {
display: block;
overflow: hidden;
}
span.frame > span {
border: 1px solid #dddddd;
display: block;
float: left;
overflow: hidden;
margin: 13px 0 0;
padding: 7px;
width: auto;
}
span.frame span img {
display: block;
float: left;
}
span.frame span span {
clear: both;
color: #333333;
display: block;
padding: 5px 0 0;
}
span.align-center {
display: block;
overflow: hidden;
clear: both;
}
span.align-center > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: center;
}
span.align-center span img {
margin: 0 auto;
text-align: center;
}
span.align-right {
display: block;
overflow: hidden;
clear: both;
}
span.align-right > span {
display: block;
overflow: hidden;
margin: 13px 0 0;
text-align: right;
}
span.align-right span img {
margin: 0;
text-align: right;
}
span.float-left {
display: block;
margin-right: 13px;
overflow: hidden;
float: left;
}
span.float-left span {
margin: 13px 0 0;
}
span.float-right {
display: block;
margin-left: 13px;
overflow: hidden;
float: right;
}
span.float-right > span {
display: block;
overflow: hidden;
margin: 13px auto 0;
text-align: right;
}
code, tt {
margin: 0 2px;
padding: 0 5px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px;
}
pre code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent;
}
.highlight pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px;
}
pre {
background-color: #f8f8f8;
border: 1px solid #cccccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px;
}
pre code, pre tt {
background-color: transparent;
border: none;
}
"""
return style | def make_style_sheet():
style = '\n body {\n font-family: Helvetica, arial, sans-serif;\n font-size: 14px;\n line-height: 1.6;\n padding-top: 10px;\n padding-bottom: 10px;\n background-color: white;\n padding: 30px;\n color: #333;\n }\n\n body > *:first-child {\n margin-top: 0 !important;\n }\n\n body > *:last-child {\n margin-bottom: 0 !important;\n }\n\n a {\n color: #4183C4;\n text-decoration: none;\n }\n\n a.absent {\n color: #cc0000;\n }\n\n a.anchor {\n display: block;\n padding-left: 30px;\n margin-left: -30px;\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n }\n\n h1, h2, h3, h4, h5, h6 {\n margin: 20px 0 10px;\n padding: 0;\n font-weight: bold;\n -webkit-font-smoothing: antialiased;\n cursor: text;\n position: relative;\n }\n\n h2:first-child, h1:first-child, h1:first-child + h2, h3:first-child, h4:first-child, h5:first-child, h6:first-child {\n margin-top: 0;\n padding-top: 0;\n }\n\n h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, h5:hover a.anchor, h6:hover a.anchor {\n text-decoration: none;\n }\n\n h1 tt, h1 code {\n font-size: inherit;\n }\n\n h2 tt, h2 code {\n font-size: inherit;\n }\n\n h3 tt, h3 code {\n font-size: inherit;\n }\n\n h4 tt, h4 code {\n font-size: inherit;\n }\n\n h5 tt, h5 code {\n font-size: inherit;\n }\n\n h6 tt, h6 code {\n font-size: inherit;\n }\n\n h1 {\n font-size: 28px;\n color: black;\n }\n\n h2 {\n font-size: 24px;\n border-bottom: 1px solid #cccccc;\n color: black;\n }\n\n h3 {\n font-size: 18px;\n }\n\n h4 {\n font-size: 16px;\n }\n\n h5 {\n font-size: 14px;\n }\n\n h6 {\n color: #777777;\n font-size: 14px;\n }\n\n p, blockquote, ul, ol, dl, li, table, pre {\n margin: 15px 0;\n }\n\n hr {\n background: transparent url("http://tinyurl.com/bq5kskr") repeat-x 0 0;\n border: 0 none;\n color: #cccccc;\n height: 4px;\n padding: 0;\n }\n\n body > h2:first-child {\n margin-top: 0;\n padding-top: 0;\n }\n\n body > h1:first-child {\n margin-top: 0;\n padding-top: 0;\n }\n\n body > h1:first-child + h2 {\n margin-top: 0;\n padding-top: 0;\n }\n\n body > h3:first-child, body > h4:first-child, body > h5:first-child, body > h6:first-child {\n margin-top: 0;\n padding-top: 0;\n }\n\n a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {\n margin-top: 0;\n padding-top: 0;\n }\n\n h1 p, h2 p, h3 p, h4 p, h5 p, h6 p {\n margin-top: 0;\n }\n\n li p.first {\n display: inline-block;\n }\n\n ul, ol {\n padding-left: 30px;\n }\n\n ul :first-child, ol :first-child {\n margin-top: 0;\n }\n\n ul :last-child, ol :last-child {\n margin-bottom: 0;\n }\n\n dl {\n padding: 0;\n }\n\n dl dt {\n font-size: 14px;\n font-weight: bold;\n font-style: italic;\n padding: 0;\n margin: 15px 0 5px;\n }\n\n dl dt:first-child {\n padding: 0;\n }\n\n dl dt > :first-child {\n margin-top: 0;\n }\n\n dl dt > :last-child {\n margin-bottom: 0;\n }\n\n dl dd {\n margin: 0 0 15px;\n padding: 0 15px;\n }\n\n dl dd > :first-child {\n margin-top: 0;\n }\n\n dl dd > :last-child {\n margin-bottom: 0;\n }\n\n blockquote {\n border-left: 4px solid #dddddd;\n padding: 0 15px;\n color: #777777;\n }\n\n blockquote > :first-child {\n margin-top: 0;\n }\n\n blockquote > :last-child {\n margin-bottom: 0;\n }\n\n table {\n padding: 0;\n }\n table tr {\n border-top: 1px solid #cccccc;\n background-color: white;\n margin: 0;\n padding: 0;\n }\n\n table tr:nth-child(2n) {\n background-color: #f8f8f8;\n }\n\n table tr th {\n font-weight: bold;\n border: 1px solid #cccccc;\n text-align: left;\n margin: 0;\n padding: 6px 13px;\n }\n\n table tr td {\n border: 1px solid #cccccc;\n text-align: left;\n margin: 0;\n padding: 6px 13px;\n }\n\n table tr th :first-child, table tr td :first-child {\n margin-top: 0;\n }\n\n table tr th :last-child, table tr td :last-child {\n margin-bottom: 0;\n }\n\n img {\n max-width: 100%;\n }\n\n span.frame {\n display: block;\n overflow: hidden;\n }\n\n span.frame > span {\n border: 1px solid #dddddd;\n display: block;\n float: left;\n overflow: hidden;\n margin: 13px 0 0;\n padding: 7px;\n width: auto;\n }\n\n span.frame span img {\n display: block;\n float: left;\n }\n\n span.frame span span {\n clear: both;\n color: #333333;\n display: block;\n padding: 5px 0 0;\n }\n\n span.align-center {\n display: block;\n overflow: hidden;\n clear: both;\n }\n\n span.align-center > span {\n display: block;\n overflow: hidden;\n margin: 13px auto 0;\n text-align: center;\n }\n\n span.align-center span img {\n margin: 0 auto;\n text-align: center;\n }\n\n span.align-right {\n display: block;\n overflow: hidden;\n clear: both;\n }\n\n span.align-right > span {\n display: block;\n overflow: hidden;\n margin: 13px 0 0;\n text-align: right;\n }\n\n span.align-right span img {\n margin: 0;\n text-align: right;\n }\n\n span.float-left {\n display: block;\n margin-right: 13px;\n overflow: hidden;\n float: left;\n }\n\n span.float-left span {\n margin: 13px 0 0;\n }\n\n span.float-right {\n display: block;\n margin-left: 13px;\n overflow: hidden;\n float: right;\n }\n\n span.float-right > span {\n display: block;\n overflow: hidden;\n margin: 13px auto 0;\n text-align: right;\n }\n\n code, tt {\n margin: 0 2px;\n padding: 0 5px;\n white-space: nowrap;\n border: 1px solid #eaeaea;\n background-color: #f8f8f8;\n border-radius: 3px;\n }\n\n pre code {\n margin: 0;\n padding: 0;\n white-space: pre;\n border: none;\n background: transparent;\n }\n\n .highlight pre {\n background-color: #f8f8f8;\n border: 1px solid #cccccc;\n font-size: 13px;\n line-height: 19px;\n overflow: auto;\n padding: 6px 10px;\n border-radius: 3px;\n }\n\n pre {\n background-color: #f8f8f8;\n border: 1px solid #cccccc;\n font-size: 13px;\n line-height: 19px;\n overflow: auto;\n padding: 6px 10px;\n border-radius: 3px;\n }\n\n pre code, pre tt {\n background-color: transparent;\n border: none;\n }\n '
return style |
class Instrumentable (object):
def __init__(self):
self.instrumentation = []
def add_instrumentation(self, ins):
self.instrumentation.append(ins)
def get_context(self):
return []
def initialize_instrumentation(self):
for i in self.instrumentation: i.initialize(self)
def run_instrumentation(self):
for i in self.instrumentation: i.run(self)
def end_instrumentation(self):
for i in self.instrumentation: i.end(self)
| class Instrumentable(object):
def __init__(self):
self.instrumentation = []
def add_instrumentation(self, ins):
self.instrumentation.append(ins)
def get_context(self):
return []
def initialize_instrumentation(self):
for i in self.instrumentation:
i.initialize(self)
def run_instrumentation(self):
for i in self.instrumentation:
i.run(self)
def end_instrumentation(self):
for i in self.instrumentation:
i.end(self) |
model = dict(
type='FasterRCNN',
pretrained='open-mmlab://msra/hrnetv2_w32',
backbone=dict(
type='HRNet',
extra=dict(
stage1=dict(
num_modules=1,
num_branches=1,
block='BOTTLENECK',
num_blocks=(4, ),
num_channels=(64, )),
stage2=dict(
num_modules=1,
num_branches=2,
block='BASIC',
num_blocks=(4, 4),
num_channels=(32, 64)),
stage3=dict(
num_modules=4,
num_branches=3,
block='BASIC',
num_blocks=(4, 4, 4),
num_channels=(32, 64, 128)),
stage4=dict(
num_modules=3,
num_branches=4,
block='BASIC',
num_blocks=(4, 4, 4, 4),
num_channels=(32, 64, 128, 256)))),
neck=dict(type='HRFPN', in_channels=[32, 64, 128, 256], out_channels=256),
rpn_head=dict(
type='RPNHead',
in_channels=256,
feat_channels=256,
anchor_generator=dict(
type='AnchorGenerator',
scales=[1.0, 2.0, 12.0],
ratios=[0.05, 0.3, 0.73, 2.5],
strides=[4, 8, 16, 16, 16]),
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[0.0, 0.0, 0.0, 0.0],
target_stds=[1.0, 1.0, 1.0, 1.0]),
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
roi_head=dict(
type='StandardRoIHead',
bbox_roi_extractor=dict(
type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', out_size=7, sample_num=0),
out_channels=256,
featmap_strides=[4, 8, 16, 32]),
bbox_head=dict(
type='Shared2FCBBoxHead',
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=136,
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[0.0, 0.0, 0.0, 0.0],
target_stds=[0.1, 0.1, 0.2, 0.2]),
reg_class_agnostic=False,
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0),
loss_bbox=dict(type='L1Loss', loss_weight=1.0)),
train_cfg=dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.5,
min_pos_iou=0.5,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
pos_weight=-1,
debug=False),
test_cfg=dict(
score_thr=0.05,
nms=dict(type='nms', iou_thr=0.5),
max_per_img=2000)))
train_cfg = dict(
rpn=dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.3,
min_pos_iou=0.3,
match_low_quality=True,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=256,
pos_fraction=0.5,
neg_pos_ub=-1,
add_gt_as_proposals=False),
allowed_border=-1,
pos_weight=-1,
debug=False),
rpn_proposal=dict(
nms_across_levels=False,
nms_pre=3000,
nms_post=2000,
max_num=2000,
nms_thr=0.7,
min_bbox_size=0),
rcnn=dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.5,
min_pos_iou=0.5,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
pos_weight=-1,
debug=False))
test_cfg = dict(
rpn=dict(
nms_across_levels=False,
nms_pre=3000,
nms_post=2000,
max_num=2000,
nms_thr=0.7,
min_bbox_size=0),
rcnn=dict(
score_thr=0.05, nms=dict(type='nms', iou_thr=0.5), max_per_img=2000))
dataset_type = 'DeepScoresV2Dataset'
data_root = 'data/ds2_dense/'
img_norm_cfg = dict(mean=[240, 240, 240], std=[57, 57, 57], to_rgb=False)
data = dict(
imgs_per_gpu=1,
workers_per_gpu=1,
train=dict(
type='DeepScoresV2Dataset',
ann_file='data/ds2_dense/deepscores_train.json',
img_prefix='data/ds2_dense/images/',
pipeline=[
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True),
dict(type='RandomCrop', crop_size=(1400, 1400)),
dict(type='Resize', img_scale=(700, 700), keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.0),
dict(
type='Normalize',
mean=[240, 240, 240],
std=[57, 57, 57],
to_rgb=False),
dict(type='Pad', size_divisor=32),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])
]),
val=dict(
type='DeepScoresV2Dataset',
ann_file='data/ds2_dense/deepscores_test.json',
img_prefix='data/ds2_dense/images/',
pipeline=[
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipAug',
img_scale=(1400, 1900),
flip=False,
transforms=[
dict(type='Resize', keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.0),
dict(
type='Normalize',
mean=[240, 240, 240],
std=[57, 57, 57],
to_rgb=False),
dict(type='Pad', size_divisor=32),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img'])
])
]),
test=dict(
type='DeepScoresV2Dataset',
ann_file='data/ds2_dense/deepscores_test.json',
img_prefix='data/ds2_dense/images/',
pipeline=[
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipAug',
img_scale=(1400, 1900),
flip=False,
transforms=[
dict(type='Resize', keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.0),
dict(
type='Normalize',
mean=[240, 240, 240],
std=[57, 57, 57],
to_rgb=False),
dict(type='Pad', size_divisor=32),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img'])
])
]))
evaluation = dict(interval=1000, metric='bbox')
optimizer = dict(type='SGD', lr=0.001, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=None)
lr_config = dict(
policy='step',
warmup='linear',
warmup_iters=500,
warmup_ratio=0.001,
step=[8, 11],
gamma=0.5)
total_epochs = 5000
checkpoint_config = dict(interval=10)
log_config = dict(
interval=100,
hooks=[dict(type='TextLoggerHook'),
dict(type='TensorboardLoggerHook')])
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = None
resume_from = None
workflow = [('train', 1)]
work_dir = './work_dirs/DSv2_faster_rcnn_hrnetv2p_w32'
gpu_ids = range(0, 1)
seed = None | model = dict(type='FasterRCNN', pretrained='open-mmlab://msra/hrnetv2_w32', backbone=dict(type='HRNet', extra=dict(stage1=dict(num_modules=1, num_branches=1, block='BOTTLENECK', num_blocks=(4,), num_channels=(64,)), stage2=dict(num_modules=1, num_branches=2, block='BASIC', num_blocks=(4, 4), num_channels=(32, 64)), stage3=dict(num_modules=4, num_branches=3, block='BASIC', num_blocks=(4, 4, 4), num_channels=(32, 64, 128)), stage4=dict(num_modules=3, num_branches=4, block='BASIC', num_blocks=(4, 4, 4, 4), num_channels=(32, 64, 128, 256)))), neck=dict(type='HRFPN', in_channels=[32, 64, 128, 256], out_channels=256), rpn_head=dict(type='RPNHead', in_channels=256, feat_channels=256, anchor_generator=dict(type='AnchorGenerator', scales=[1.0, 2.0, 12.0], ratios=[0.05, 0.3, 0.73, 2.5], strides=[4, 8, 16, 16, 16]), bbox_coder=dict(type='DeltaXYWHBBoxCoder', target_means=[0.0, 0.0, 0.0, 0.0], target_stds=[1.0, 1.0, 1.0, 1.0]), loss_cls=dict(type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0), loss_bbox=dict(type='L1Loss', loss_weight=1.0)), roi_head=dict(type='StandardRoIHead', bbox_roi_extractor=dict(type='SingleRoIExtractor', roi_layer=dict(type='RoIAlign', out_size=7, sample_num=0), out_channels=256, featmap_strides=[4, 8, 16, 32]), bbox_head=dict(type='Shared2FCBBoxHead', in_channels=256, fc_out_channels=1024, roi_feat_size=7, num_classes=136, bbox_coder=dict(type='DeltaXYWHBBoxCoder', target_means=[0.0, 0.0, 0.0, 0.0], target_stds=[0.1, 0.1, 0.2, 0.2]), reg_class_agnostic=False, loss_cls=dict(type='CrossEntropyLoss', use_sigmoid=False, loss_weight=1.0), loss_bbox=dict(type='L1Loss', loss_weight=1.0)), train_cfg=dict(assigner=dict(type='MaxIoUAssigner', pos_iou_thr=0.5, neg_iou_thr=0.5, min_pos_iou=0.5, match_low_quality=False, ignore_iof_thr=-1), sampler=dict(type='RandomSampler', num=512, pos_fraction=0.25, neg_pos_ub=-1, add_gt_as_proposals=True), pos_weight=-1, debug=False), test_cfg=dict(score_thr=0.05, nms=dict(type='nms', iou_thr=0.5), max_per_img=2000)))
train_cfg = dict(rpn=dict(assigner=dict(type='MaxIoUAssigner', pos_iou_thr=0.7, neg_iou_thr=0.3, min_pos_iou=0.3, match_low_quality=True, ignore_iof_thr=-1), sampler=dict(type='RandomSampler', num=256, pos_fraction=0.5, neg_pos_ub=-1, add_gt_as_proposals=False), allowed_border=-1, pos_weight=-1, debug=False), rpn_proposal=dict(nms_across_levels=False, nms_pre=3000, nms_post=2000, max_num=2000, nms_thr=0.7, min_bbox_size=0), rcnn=dict(assigner=dict(type='MaxIoUAssigner', pos_iou_thr=0.5, neg_iou_thr=0.5, min_pos_iou=0.5, match_low_quality=False, ignore_iof_thr=-1), sampler=dict(type='RandomSampler', num=512, pos_fraction=0.25, neg_pos_ub=-1, add_gt_as_proposals=True), pos_weight=-1, debug=False))
test_cfg = dict(rpn=dict(nms_across_levels=False, nms_pre=3000, nms_post=2000, max_num=2000, nms_thr=0.7, min_bbox_size=0), rcnn=dict(score_thr=0.05, nms=dict(type='nms', iou_thr=0.5), max_per_img=2000))
dataset_type = 'DeepScoresV2Dataset'
data_root = 'data/ds2_dense/'
img_norm_cfg = dict(mean=[240, 240, 240], std=[57, 57, 57], to_rgb=False)
data = dict(imgs_per_gpu=1, workers_per_gpu=1, train=dict(type='DeepScoresV2Dataset', ann_file='data/ds2_dense/deepscores_train.json', img_prefix='data/ds2_dense/images/', pipeline=[dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), dict(type='RandomCrop', crop_size=(1400, 1400)), dict(type='Resize', img_scale=(700, 700), keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.0), dict(type='Normalize', mean=[240, 240, 240], std=[57, 57, 57], to_rgb=False), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])]), val=dict(type='DeepScoresV2Dataset', ann_file='data/ds2_dense/deepscores_test.json', img_prefix='data/ds2_dense/images/', pipeline=[dict(type='LoadImageFromFile'), dict(type='MultiScaleFlipAug', img_scale=(1400, 1900), flip=False, transforms=[dict(type='Resize', keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.0), dict(type='Normalize', mean=[240, 240, 240], std=[57, 57, 57], to_rgb=False), dict(type='Pad', size_divisor=32), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img'])])]), test=dict(type='DeepScoresV2Dataset', ann_file='data/ds2_dense/deepscores_test.json', img_prefix='data/ds2_dense/images/', pipeline=[dict(type='LoadImageFromFile'), dict(type='MultiScaleFlipAug', img_scale=(1400, 1900), flip=False, transforms=[dict(type='Resize', keep_ratio=True), dict(type='RandomFlip', flip_ratio=0.0), dict(type='Normalize', mean=[240, 240, 240], std=[57, 57, 57], to_rgb=False), dict(type='Pad', size_divisor=32), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img'])])]))
evaluation = dict(interval=1000, metric='bbox')
optimizer = dict(type='SGD', lr=0.001, momentum=0.9, weight_decay=0.0001)
optimizer_config = dict(grad_clip=None)
lr_config = dict(policy='step', warmup='linear', warmup_iters=500, warmup_ratio=0.001, step=[8, 11], gamma=0.5)
total_epochs = 5000
checkpoint_config = dict(interval=10)
log_config = dict(interval=100, hooks=[dict(type='TextLoggerHook'), dict(type='TensorboardLoggerHook')])
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = None
resume_from = None
workflow = [('train', 1)]
work_dir = './work_dirs/DSv2_faster_rcnn_hrnetv2p_w32'
gpu_ids = range(0, 1)
seed = None |
# Create by Zwlin
parts = ['Is', 'Chicago', 'Not', 'Chicago?']
print(' '.join(parts))
data = ['ACME', 50, 91.1]
print(','.join(str(d) for d in data))
print('a','b','c',sep=":")
def sample():
yield 'Is'
yield 'Chicago'
yield 'Not'
yield 'Chicago?'
print(' '.join(sample()))
def combine(source,maxsize):
parts = []
size = 0
for part in source:
parts.append(part)
size+=len(part)
if size>maxsize:
yield ''.join(parts)
parts = []
size = 0
yield ''.join(parts)
for part in combine(sample(),2):
print(part) | parts = ['Is', 'Chicago', 'Not', 'Chicago?']
print(' '.join(parts))
data = ['ACME', 50, 91.1]
print(','.join((str(d) for d in data)))
print('a', 'b', 'c', sep=':')
def sample():
yield 'Is'
yield 'Chicago'
yield 'Not'
yield 'Chicago?'
print(' '.join(sample()))
def combine(source, maxsize):
parts = []
size = 0
for part in source:
parts.append(part)
size += len(part)
if size > maxsize:
yield ''.join(parts)
parts = []
size = 0
yield ''.join(parts)
for part in combine(sample(), 2):
print(part) |
bot1_wieght_layer_one = [[0.9236090789486788, 0.9210637151227483, 0.16119690767556938, 0.8891669007445379, 0.7530696859511529, 0.9684743676682231, 0.9140001906787625, 0.5462343790375778, 0.4625067913831683, 0.10294585839313619, 0.4659734634943964, 0.673851063496881, 0.4119975257359164, 0.4119836779033137, 0.7865910876180061, 0.1746772681586115, 0.14820492751578285, 0.17880158440303084, 0.638384333104671, 0.43867886886921015, 0.6326278950050328, 0.2038501568125496, 0.7776665581230366, 0.771139612953913, 0.43664378114255786, 0.6845899209090841, 0.5932741356128547, 0.11859280518324489, 0.8426718127223154, 0.4257864591630002, 0.21919389456471672, 0.1541410719278874, 0.2446740228834895, 0.9096981936870991, 0.1051376200906824, 0.123215850106273, 0.6207186782859335, 0.12151357138851293, 0.245688625096243, 0.5091516271356124, 0.28696783191231534, 0.5667720957901029, 0.10179946375444471, 0.07698229364715592, 0.1401060329173568, 0.5605864629155267, 0.5008708650129818, 0.472155979148543, 0.5114298750374805, 0.9177025359111187, 0.61180000017252, 0.9252156543730644, 0.2808056118845378, 0.6182738570732967, 0.5059140465417934, 0.5112371150715369, 0.27569977707132176, 0.02903301704146266, 0.17203745230481327, 0.9580314724608192, 0.6390629826262436, 0.8543772996780469, 0.22765734772859614, 0.9295293185057587, 0.8547086226616534, 0.9140367615756183, 0.5656403835945063, 0.7666637822837286, 0.9299245560369479, 0.8137362078324749, 0.3851752602753137, 0.8004765184387966, 0.0971362374612369, 0.13655452483402186, 0.681154264654838, 0.8355206616694442, 0.43933750924147164, 0.71607525665252, 0.8953318177972461, 0.022026267303617897, 0.5379372446996521, 0.6862725587397568, 0.27276362350445715, 0.49012588773556165, 0.5696505291988504, 0.21259703281855824, 0.1867281303140862, 0.42325083070354375, 0.631788358712714], [0.7009723489355959, 0.7755630380298649, 0.8214056821060041, 0.4461526836763151, 0.481755469593232, 0.5764701181036724, 0.7738443613698299, 0.21967191669080766, 0.19282038280162728, 0.39385789086602196, 0.5820753136137473, 0.01721939343217893, 0.480717572857995, 0.8080397884821071, 0.14979914461915833, 0.05020212300797988, 0.4793960860291525, 0.4111506744658292, 0.11930327529571894, 0.17955502154369407, 0.012925435392506346, 0.6586587616764189, 0.3350099047088869, 0.850937080408252, 0.3718678907068308, 0.11527601403252008, 0.3820497255478599, 0.8384920848109105, 0.23044526475037008, 0.9605022019079362, 0.09805750577785943, 0.6388010648085247, 0.811493593498141, 0.7564250423670958, 0.5065952240509837, 0.3192868220605316, 0.9018435753300349, 0.7925964122857911, 0.5901342628725957, 0.24032639017044632, 0.7550949068239841, 0.2236507475146402, 0.4581717506132187, 0.6432281715775092, 0.988379547788904, 0.9966056280412324, 0.1503852003097801, 0.976042458489067, 0.5836833913400898, 0.021680494802164274, 0.14334321299342823, 0.40345057671485207, 0.07690051341546122, 0.2883238996638102, 0.06247477125530687, 0.8831434714740543, 0.7992503785963946, 0.5508405994824376, 0.871669234416104, 0.026718434754273712, 0.7491959845828274, 0.20519507295138506, 0.09890971057888864, 0.05864231885284432, 0.5321323261102776, 0.026852658151600095, 0.20141662483981437, 0.760045443955652, 0.9841625274763108, 0.19685565520746218, 0.7800021932695238, 0.17249359025903865, 0.8266218686663086, 0.6559503710562061, 0.31724873992729585, 0.5043915547250579, 0.4771462768633111, 0.5324992962774662, 0.3998427431059661, 0.851042824534796, 0.29401048321424783, 0.4544698337810461, 0.5402161422297389, 0.40766838762361923, 0.8214367316258696, 0.8966562700769893, 0.335538655169051, 0.9086239832954099, 0.2969905257097156], [0.3231913811466237, 0.49455018068676915, 0.020115280341378883, 0.939309926845729, 0.809256214386146, 0.16188418048501263, 0.6947821096278696, 0.269503928890676, 0.694710666019383, 0.34130801490673524, 0.5605916497543431, 0.27172737204972475, 0.7945312677357029, 0.16491875540350354, 0.9869336720174897, 0.30965640739924993, 0.5258455430674109, 0.12750669144383564, 0.8654638043494218, 0.07456877485695645, 0.26519813578704565, 0.08240250870985188, 0.13791901503822068, 0.9262629830390752, 0.7807683018349625, 0.2866134465024618, 0.7275912230185161, 0.39633527385313094, 0.8269415815154668, 0.9252629059344307, 0.20584727649599321, 0.2732115250597331, 0.4394403529369988, 0.015555325729710745, 0.8428575769078923, 0.967126028942085, 0.4993172354888792, 0.24312585575789936, 0.6434459615728989, 0.02335972742555248, 0.6634083210927555, 0.2481544257857462, 0.3519494142105719, 0.17254804445942729, 0.4982478238034753, 0.6416114376911248, 0.7150972406764894, 0.7418676207303256, 0.42560719662783, 0.0489875647100404, 0.416476821220803, 0.15542676930763677, 0.4239585382833506, 0.21758594620000116, 0.07632062853561095, 0.9875086818905897, 0.020919543554601128, 0.675259594105383, 0.6763139304631209, 0.6674743448679705, 0.49126602590641266, 0.8975328658686905, 0.01608796536761481, 0.5519324254188372, 0.354836670790713, 0.96472998395987, 0.12715716485339834, 0.7054852504728606, 0.17895273751474383, 0.7009933372268667, 0.6954841942212401, 0.3854323324969532, 0.548654084166919, 0.32283834532831657, 0.8343092899904988, 0.38009103184225546, 0.1099413834459616, 0.8094901612213391, 0.07202157549284327, 0.2045928210556428, 0.2902079036708729, 0.46961317160129923, 0.1758368359583009, 0.3582640422327067, 0.016889696224707373, 0.1236770272039085, 0.9694625313575694, 0.8103352600561743, 0.9687763599315438], [0.4070390588651397, 0.8617588449266992, 0.08591633335314042, 0.6191989471056557, 0.3753693585165173, 0.2149345558169109, 0.7780221191994218, 0.5408325834037762, 0.020440943891304686, 0.6329782367456378, 0.6537990030532523, 0.22364638436066686, 0.07578526627260385, 0.6379292872123573, 0.9042035248510895, 0.2690482512676077, 0.6861732406804237, 0.8334933093228785, 0.3370981202351897, 0.8741826040155269, 0.29511483082457846, 0.5571312208957903, 0.3061482289248987, 0.8244277316654556, 0.2422727844397241, 0.5436010174651802, 0.37895447534567184, 0.010113688337024973, 0.9783768939285751, 0.9233279297354652, 0.5692680422198491, 0.19315369363505774, 0.6992947651255726, 0.5545602213934571, 0.1174521520800843, 0.0369244735892984, 0.8252874024755956, 0.21259160020927514, 0.7858656584310622, 0.9007851853044347, 0.2370301885058812, 0.45686879546211323, 0.11571461463718813, 0.3896826966165772, 0.4981331064743928, 0.5866411796597666, 0.6830030429417404, 0.7071669815943974, 0.8807237758828365, 0.554005183344843, 0.9636013114933643, 0.19402805842940196, 0.3978216837432135, 0.5129440332588614, 0.166553254085275, 0.5352123850156179, 0.4027616229168385, 0.005098195056520649, 0.3386189590714881, 0.7765541310547399, 0.9039211291176523, 0.04559183233801234, 0.1622843722688485, 0.03019770752386708, 0.26622001294465547, 0.43614772311783734, 0.34739222887697985, 0.9697566624307592, 0.9609419715427007, 0.7074015056633886, 0.5868196682545251, 0.7982268307295808, 0.886232311967204, 0.9518031066954507, 0.6872598812061947, 0.3526484212314378, 0.9516021862352316, 0.9640485831196367, 0.8107766071127982, 0.04525336974900995, 0.7679067193270388, 0.5662505182473457, 0.2968769818345395, 0.15202276157422823, 0.8970256324617895, 0.8271611993099104, 0.0549443663293846, 0.3623385912038649, 0.11261669206443203], [0.2797643283795904, 0.08401213798968554, 0.09171795115463965, 0.3215252061839202, 0.25810270717858663, 0.5022332226688793, 0.3117092081164258, 0.696184432075916, 0.6623992613862014, 0.8947306875377811, 0.660183510866882, 0.4389112026419373, 0.8729973077348417, 0.3593172359101109, 0.9383081704486153, 0.6814907986713262, 0.12042377644299584, 0.5196326588387824, 0.7590149173622956, 0.8227967012186834, 0.39276246517039604, 0.5893744092449043, 0.09967888604125141, 0.47180914793055106, 0.4536650098230439, 0.09236992993531501, 0.8119871643278841, 0.09946082622993269, 0.6002239914572185, 0.4889899727332142, 0.3924243726512765, 0.8642185928678245, 0.6964674340764225, 0.27204251902914445, 0.36115859166360675, 0.6173441115538776, 0.5331102719543005, 0.38184811564067744, 0.7715154543314913, 0.8996642127295942, 0.9056673110933559, 0.8510314318000046, 0.7336560542901602, 0.8912677463693386, 0.6901616315208431, 0.32561570881580604, 0.7959076593250595, 0.24942235414705494, 0.6573791527737103, 0.9201963876362174, 0.8323067850929537, 0.7279998615643604, 0.3826805993365904, 0.045676098733975934, 0.043303519044695093, 0.8440710947384173, 0.7409523987878059, 0.8000858292713338, 0.6359813072962217, 0.9061052798260985, 0.940592213468678, 0.43695012925590615, 0.3915399189988765, 0.1910117813884753, 0.8683547419579423, 0.12282755413615187, 0.11953629066114091, 0.9754448453980374, 0.7260252387777577, 0.32434725828955424, 0.9145141543079923, 0.40110248557419836, 0.34769566352601045, 0.0838353264410443, 0.9479912750604463, 0.5884767174600394, 0.6814848125020173, 0.030688358936346583, 0.35050139205693864, 0.02167886951952913, 0.6921972330226244, 0.6911967281899353, 0.6975261388316664, 0.10058100263896674, 0.3193344433949835, 0.1785130300493687, 0.2602831588019199, 0.5361167553489439, 0.022185465522298387], [0.10788444578454681, 0.702287504733945, 0.8378486373091145, 0.1764792111165694, 0.4446810930412909, 0.8418815765556584, 0.5223500638044959, 0.3366394179912534, 0.0879099654588299, 0.05731420403755483, 0.6184259060592221, 0.31176334067697586, 0.06799554084782677, 0.1207736456142624, 0.6831410900168667, 0.5396729636996535, 0.21590341847030348, 0.9767765952640611, 0.7318562628813758, 0.6344655185467192, 0.2632381920252692, 0.27982389315699674, 0.9006828529879133, 0.3140457975275168, 0.08608901192416896, 0.7354710972364773, 0.3082953317686338, 0.6946255118648296, 0.5284811516940894, 0.8081220676202092, 0.40274126433946533, 0.3488491734703477, 0.8968371036834721, 0.35695471431982806, 0.15674472673402773, 0.06273501437253737, 0.6749105444709496, 0.05005081382691212, 0.8032437874978855, 0.202158385064238, 0.1873644584663986, 0.4294318893565694, 0.18182248866450512, 0.9554560476986663, 0.3675487674862612, 0.9919634637398465, 0.023889714671826767, 0.6521530561945705, 0.6760494633176135, 0.07064749031780793, 0.3376120612771143, 0.6411435237281696, 0.9860718340623801, 0.22057486482084487, 0.9372280458752786, 0.7138460146519181, 0.559552068301644, 0.5714444889793434, 0.0922805775005755, 0.8553214064573208, 0.05328262868991385, 0.058889466346619845, 0.2915410418915184, 0.0832556509976553, 0.8828544285972318, 0.15924680299410066, 0.745766423991, 0.9872573714646465, 0.9228374075018008, 0.18595773239960256, 0.8816529492197483, 0.12081435089993442, 0.08923940274246744, 0.3605026994356263, 0.6892852873014638, 0.20914854583343834, 0.16587521109364733, 0.30794124428340286, 0.7025610167574737, 0.012539560626656288, 0.37785208376736557, 0.7477226555566733, 0.7414107605760913, 0.31943396451657036, 0.38909237944266917, 0.6335105987404311, 0.9238952535677788, 0.25289503360949805, 0.9481002587299109], [0.9721489350785666, 0.9877244968544684, 0.7855318534731416, 0.4726500885182058, 0.8739619163948421, 0.7299267386244095, 0.20954355642117828, 0.6425706285552998, 0.9062072566081306, 0.5506940996550641, 0.029809750242027255, 0.6766403812044975, 0.9779691143308561, 0.6844722355944154, 0.535512193504793, 0.15938875677668296, 0.49709536425050704, 0.26499421669509404, 0.21925168389431993, 0.4410506648359185, 0.9179772032227889, 0.13412020742978825, 0.7241828870246916, 0.40429528689236727, 0.15842309688402434, 0.46253494043756405, 0.1829744326433912, 0.08561687606826973, 0.4401108481993309, 0.7180390544115067, 0.7361107957395013, 0.724515399770915, 0.21157207165085834, 0.32237499013018844, 0.2272045768246952, 0.7781337797606571, 0.9609857833525874, 0.6049924799674548, 0.5348377726114955, 0.49890219823027726, 0.5680204612210852, 0.06488612494833657, 0.3581235064248297, 0.5187265393856662, 0.4384971714672219, 0.32113708905397287, 0.3520382064493177, 0.0443339852040564, 0.1350990845752965, 0.37562765440238965, 0.7388016841764187, 0.25462901404568794, 0.2553925655477314, 0.7176798009620682, 0.5230233058351859, 0.3193700710869337, 0.2730332404587338, 0.593261095694369, 0.9704858861893627, 0.7652462432866033, 0.29828817649869765, 0.6929683914761721, 0.3945648810798984, 0.03202772899299111, 0.49316061565035896, 0.2836364179892703, 0.8603955652443955, 0.08783230895195715, 0.04521630559808354, 0.8634890251092915, 0.8208961383729279, 0.28062549246814383, 0.45890817263819406, 0.6255127624968135, 0.4582122773091999, 0.24660015357276788, 0.2647060585811929, 0.30053561071333745, 0.5771036348873657, 0.2398972346567888, 0.1852245905965746, 0.2865783124134298, 0.37460365922842187, 0.09207147411307604, 0.6773958626475222, 0.21287875371809362, 0.07431464937189702, 0.11530672366347983, 0.9117823527960761], [0.4178119267137512, 0.5721335763079896, 0.6917349861907042, 0.21391497866678788, 0.07790870157945051, 0.9059014795349973, 0.618268349588375, 0.7490510814528829, 0.3452295820181265, 0.0778650802227353, 0.16606611482276878, 0.6267447469762019, 0.7824021188756904, 0.950827556570088, 0.10751626884378773, 0.8340746942291397, 0.9074326114302199, 0.18669786957880674, 0.8503204026569705, 0.8188397893827213, 0.4536238485410031, 0.0577434256690349, 0.6089404332635284, 0.029147445069945044, 0.5750909165928971, 0.5243436414548786, 0.06963467810681012, 0.4536999209385053, 0.8805977392883694, 0.43889768107550764, 0.4077700303695404, 0.7871784805866673, 0.19940086710859684, 0.8238585484921673, 0.8220289764497547, 0.12514902040833786, 0.9275864667613339, 0.6689332286742803, 0.5785816058284048, 0.38909375140963154, 0.06736207634079994, 0.06884357880412117, 0.9297524337016129, 0.5004920874160007, 0.10156527966087903, 0.016285795236322453, 0.9208327991499639, 0.4192081129129074, 0.14453882296664644, 0.617236605289631, 0.23509345768924972, 0.20719453604584648, 0.6892464215399696, 0.8735054849904799, 0.7821193062077179, 0.3366996999245747, 0.33265834739752487, 0.1634407463739218, 0.9546601623617, 0.28982722706758846, 0.4441568033383747, 0.4454512767724129, 0.8087240954281081, 0.5873511159612158, 0.6641779698508281, 0.4367976310412923, 0.05785742776789882, 0.633178460055429, 0.4009117758374101, 0.6703491158975458, 0.4412607175622638, 0.04796950858216176, 0.47326453920617617, 0.9378782924084312, 0.5610126447242526, 0.036442033483475855, 0.7760034475115767, 0.19312185985870955, 0.05903656488279918, 0.43454963586423356, 0.9663600285178147, 0.5054418052753229, 0.10258067927049008, 0.1208979826737776, 0.3995310737001927, 0.3575700803321339, 0.24189337505545427, 0.4214863463627905, 0.10556469936975099], [0.3030343474749423, 0.10079660010921576, 0.1991163875839299, 0.07364781735146175, 0.4142335874581575, 0.8096357584925153, 0.8388657241874425, 0.01743915845433197, 0.41437319767900005, 0.4566061929967511, 0.21172856457128342, 0.009733770707688993, 0.13492516175738167, 0.9739990297803294, 0.24579441387489287, 0.17485627819259808, 0.23908888780666027, 0.7141594443068483, 0.5626665296709473, 0.13526787588658196, 0.6413805890010359, 0.8437725568887717, 0.6858345973512588, 0.9904037421037295, 0.22617361676437275, 0.8799495093713446, 0.9580387101195238, 0.014154843794793925, 0.1807177073859868, 0.2177867950357114, 0.26645840320834513, 0.4079506125451817, 0.9708098613085748, 0.6535201536264544, 0.004762919978452684, 0.014359420763816577, 0.4755281677217933, 0.745026358861412, 0.20899278950677247, 0.7470650889774508, 0.3323097298821245, 0.6477723135962388, 0.9085528185106942, 0.23484505316670878, 0.07479274825394189, 0.9686356498515181, 0.5538725369965508, 0.5555155484170593, 0.9127647345455006, 0.5385504138229577, 0.6340082330628852, 0.7948320780751937, 0.5825452809755111, 0.32812492028278095, 0.9009050051576923, 0.5936546238119828, 0.1184996233782929, 0.4925078113703494, 0.15962675579347674, 0.824133928646716, 0.8365800232120811, 0.8338217253317379, 0.5994805918586313, 0.7868173529621724, 0.8380261472483449, 0.8090985831124037, 0.28436866305682973, 0.43235704242694317, 0.44179577270998016, 0.6850132216597447, 0.4741865277776305, 0.5945673321742275, 0.24833012256652254, 0.03897039470776775, 0.522754747531851, 0.29674725593878193, 0.6426239821422135, 0.198857331513, 0.4001871572984106, 0.6052640665876413, 0.7232659472233631, 0.30280215690491663, 0.30113720141396316, 0.9552806199687541, 0.6854237915447328, 0.13956584412785156, 0.7285386687711951, 0.98222387351813, 0.07475489762184007], [0.22648531828632212, 0.4824281514338119, 0.11872428005724212, 0.8345144873968273, 0.14020625335358883, 0.2772690174002468, 0.1546268572310644, 0.3839350572357031, 0.3005470710411313, 0.36845509047086933, 0.7524913251261408, 0.48626318000998936, 0.8171069666792441, 0.7529472336056009, 0.08781176453341055, 0.4298913410678594, 0.1257463843437665, 0.8881939436592382, 0.20312510362309733, 0.10850494766913998, 0.31635144152003947, 0.924704778311123, 0.8672715005181396, 0.1726499174473879, 0.23060196511174358, 0.36927067263672364, 0.2266753446302464, 0.4321235778173369, 0.14362677458503215, 0.5300100442704107, 0.9849521467639577, 0.2844023851634999, 0.8318850747639045, 0.6288406519894371, 0.6713160760957748, 0.12174034175844739, 0.12290818916538548, 0.7168734240091438, 0.7925680460181738, 0.06049259984371913, 0.24392988129834792, 0.20851984389351153, 0.4713852552996477, 0.040723604641543676, 0.30906667089280804, 0.26581635641797996, 0.8117701590422527, 0.2705161388340924, 0.22792033811335988, 0.11692907821213416, 0.38309580039984514, 0.04570640984864405, 0.8526654994824616, 0.1533331042999374, 0.1742761463176723, 0.48153232513084177, 0.19161464347151147, 0.9185832650576403, 0.4934548625248155, 0.021005979816700937, 0.9107291114463093, 0.10936814988728094, 0.7852916780164095, 0.3969799705109427, 0.1950010548094493, 0.2963960677709754, 0.1482047403054626, 0.7148747428954253, 0.6038827728212182, 0.6962716864275008, 0.06978022581430343, 0.6985049164364994, 0.5807456038048644, 0.6709997000805512, 0.8792863627723257, 0.7378036764941204, 0.5495443242967329, 0.3496205894698846, 0.8443835772182252, 0.10948976993947046, 0.0680888166391449, 0.1378015716108837, 0.5615030763440819, 0.8584402384714549, 0.37757596671396154, 0.8483250152768873, 0.258104165892859, 0.4750095325501692, 0.7724750025261836], [0.44389441904589344, 0.02433787946957744, 0.24172968548804485, 0.6070936202309101, 0.5056605805286013, 0.7144302651348257, 0.26230651428249174, 0.0168415855148929, 0.7546048124048121, 0.7446058038196425, 0.8103163535085638, 0.5395374329519966, 0.8677301723976767, 0.9929445362204892, 0.415005256850453, 0.1604784789833451, 0.9052899525000557, 0.9968875299806688, 0.8804810789450488, 0.2739905715506541, 0.518960224753623, 0.8834217924062843, 0.4351483691115572, 0.7339624448687048, 0.37998882464643857, 0.39931937086880287, 0.3941570909898272, 0.09265787483840182, 0.21230846215012222, 0.15217651641181051, 0.9915821118014967, 0.7701305222284069, 0.07076624648179963, 0.7508149580248991, 0.11452696072779767, 0.7269244078127457, 0.4575156855468345, 0.863866852930958, 0.8810796441716492, 0.08315205820464466, 0.2392786630549968, 0.9809881890692095, 0.49774018376494855, 0.2164936036747599, 0.4411602198773463, 0.23618217490651494, 0.25028252101285253, 0.864922793481573, 0.3275222278399894, 0.8459694418806368, 0.7414354263212619, 0.2819344946833905, 0.9799958979032483, 0.016263235919676045, 0.8290481233087124, 0.08690312692179514, 0.06661524900429139, 0.19369844080818055, 0.22645761792040642, 0.4004441020682512, 0.21574033421465555, 0.9590646119254275, 0.8332377094807794, 0.8429900328219821, 0.5508435868400916, 0.5611945355164816, 0.6400685460080022, 0.8650794150755421, 0.6099653959919991, 0.7786001373259936, 0.25603116275612714, 0.13661307012039903, 0.6688189425271687, 0.4970479316342795, 0.5938549742802922, 0.735007749219325, 0.9036241722831124, 0.7954059155310759, 0.8890075433781273, 0.5722178286390445, 0.05843675111361657, 0.882732560404803, 0.46040161135863944, 0.0036135346107771804, 0.17422593455080615, 0.9334081769443241, 0.8262015552666739, 0.6555919889511189, 0.781207543935886], [0.6754110116601949, 0.5445526452818652, 0.6073200266478743, 0.4743937456211036, 0.6133882651756238, 0.349181715790455, 0.8913479905569976, 0.39533267374518655, 0.46571217501921813, 0.9648969114865207, 0.5242259403095273, 0.5861791814341571, 0.052432257904996615, 0.42106454154707995, 0.9710280905891446, 0.8355297881537236, 0.9265693117103212, 0.9026684901522883, 0.6970234237769248, 0.03739770987704594, 0.5997405621275582, 0.8669834732764669, 0.2731050650050192, 0.1467142140829455, 0.4413216633078365, 0.2716820819081105, 0.43757272266977765, 0.7654503061819301, 0.22736943365051643, 0.10147093713883792, 0.7194627050270115, 0.7452132789062282, 0.8034522993945326, 0.31338980653830506, 0.9941236626742169, 0.5695449589931374, 0.9883695303210803, 0.4663178683387543, 0.3678555656483694, 0.09342094967147263, 0.7040522376296019, 0.46264681804216123, 0.6799663830521205, 0.5824756240800743, 0.8811498975810477, 0.10304249682922173, 0.42081437867403326, 0.26923037141479356, 0.8687985903321818, 0.8170140181229454, 0.3825266995310225, 0.6970759533263784, 0.8126079481355168, 0.271516064432218, 0.15616579782529927, 0.555735569831623, 0.9069400377242064, 0.5546618398243572, 0.7775605793385554, 0.44927082271359764, 0.8058218252598536, 0.9497308317811548, 0.9456426959167047, 0.10097260724762902, 0.536790256040104, 0.4876365527980059, 0.6813595601091766, 0.2716462311073613, 0.049775820571019924, 0.7895187266105063, 0.7725288348768223, 0.7767886142240238, 0.8786937999200706, 0.37296799216174614, 0.418971263754631, 0.8527761387184657, 0.42227147136932186, 0.5968511009009912, 0.741210911067583, 0.5009689404148686, 0.2611800722083323, 0.37705786587714896, 0.1428461867815386, 0.2947150137012575, 0.1478710297366823, 0.580996664183334, 0.9869418663834576, 0.5170287128383537, 0.3223793605807064], [0.47363761067222054, 0.348502921352425, 0.6376988556662698, 0.9450216357937573, 0.040396358562485135, 0.3055520826047141, 0.6488633108501389, 0.7081929738226214, 0.34801042875406063, 0.7783747230021859, 0.9618489717658709, 0.8642741929606672, 0.7371451333248759, 0.8292681554639788, 0.37128912793746327, 0.0053566809112577385, 0.6377305157217715, 0.2222345244435776, 0.4248646673058537, 0.30912173725625114, 0.9699363201507253, 0.5588725790842637, 0.8604879535428797, 0.553213085578852, 0.5835572285235683, 0.6104738773235407, 0.5160111040811681, 0.6476095434865877, 0.7281101003431144, 0.12176069270943624, 0.550509919455454, 0.627925413311515, 0.010847326225137732, 0.26274228198737415, 0.1983289624926493, 0.6209934985336116, 0.28785908899017676, 0.3872905025901243, 0.975598144634646, 0.28457901685878184, 0.5349504208434952, 0.6840935203133721, 0.48795789209240015, 0.841107598419212, 0.3925139595869769, 0.02474360872015302, 0.9847030537523502, 0.0061816212443317475, 0.9711004449026653, 0.048416667101451316, 0.859865267739729, 0.7925305211311096, 0.4197928844291352, 0.6839534784758764, 0.6625299918578287, 0.7333454028986263, 0.518789767990799, 0.10862640274246071, 0.28106875259371533, 0.2434205354142953, 0.8411441449127371, 0.583399825046402, 0.07501592419041614, 0.8153885301354553, 0.6974477597527748, 0.4391915967992026, 0.7498961578160926, 0.47444444288624743, 0.22816335225996676, 0.17798701807396367, 0.9045587620495678, 0.23881874785717638, 0.6798838813607976, 0.6041546101008096, 0.6668122494923934, 0.08265482303745475, 0.6010925813581808, 0.36529228274162895, 0.6889173028094426, 0.17905265356494937, 0.1254877788639145, 0.9041557162950608, 0.45854855256130567, 0.45282864962436764, 0.03560072704953943, 0.9695854800257312, 0.7030897443661815, 0.8388039278408054, 0.561794444307025], [0.807735908816847, 0.11139194890023585, 0.9071328117839277, 0.5616661858970509, 0.36661481120363326, 0.10476993159070558, 0.5610849402857655, 0.6259302923553304, 0.4463269232535091, 0.3813941372040748, 0.8612117084970073, 0.6374375237515236, 0.1142376855656192, 0.5449734220641227, 0.6613791105316364, 0.5873695465022224, 0.2829241489999047, 0.9970267815369599, 0.24513382839802944, 0.14380584927702955, 0.48527395628713454, 0.44874794611091706, 0.24510576509555504, 0.7470316841827438, 0.6540935476431394, 0.7736520630338827, 0.7241445822898341, 0.4850275719374978, 0.22572238664177902, 0.83196983634961, 0.9797609844832964, 0.1941989287812642, 0.79343007555494, 0.4863798079453081, 0.5551031964753423, 0.1976164684936882, 0.3303829177717619, 0.5130403732385073, 0.8963937829814235, 0.13661509260340632, 0.19653078718590278, 0.22574166609108748, 0.6794171016505037, 0.23732800696159984, 0.9378844295043073, 0.12171979395877097, 0.5687068384755245, 0.5944640938968451, 0.5390704310463801, 0.06000576701126348, 0.7883688123900865, 0.5531230630621755, 0.10258446679019972, 0.6733023882660187, 0.6480698304598124, 0.7717071355983769, 0.8612976084698857, 0.03401806184512013, 0.11521757764755902, 0.5721469016286939, 0.5170413933821388, 0.11717821308346621, 0.3760121576011386, 0.4511921682817326, 0.887559804266018, 0.6742879850742893, 0.22216842936471348, 0.6511042385367134, 0.5837657100831344, 0.27935499183749546, 0.6554349755192593, 0.43798377403073285, 0.2713676440950191, 0.9648416889054933, 0.4840308972957319, 0.6024871553466362, 0.41003086517252707, 0.46735340826077676, 0.05466015979196248, 0.21479358821623762, 0.8787172067655754, 0.4481262039552453, 0.7704544457240257, 0.08850603394587198, 0.02936630768814419, 0.16744137788864677, 0.5105667223256865, 0.27880563333928776, 0.39024146439752594], [0.19535158016260268, 0.8580816300579772, 0.18272913323771922, 0.5903095934600608, 0.10796903480924258, 0.3584646349587337, 0.5972566707405474, 0.7619246293711402, 0.848166047371129, 0.2679836871571215, 0.06344675476007289, 0.6236674115079759, 0.9097478939824821, 0.016329453280874318, 0.4134816257441418, 0.044279255533925754, 0.09183421070739972, 0.3039502357170105, 0.7686049767866585, 0.8875396363951107, 0.6545769659297056, 0.07574632739231313, 0.7087422801806533, 0.3180203865312541, 0.11323833234086089, 0.698140724264588, 0.7362210053089739, 0.18492138891799148, 0.6425891162848326, 0.5709360185972094, 0.5576208124643292, 0.1433454855005697, 0.3055013571139825, 0.6194981404384113, 0.847279574598229, 0.8048079055860268, 0.8471875836416023, 0.3928595051958865, 0.6800600462351265, 0.5959680959350443, 0.22074764835310912, 0.03413290772035871, 0.9259183827447341, 0.14649369716435456, 0.15046966865270162, 0.07998152654171042, 0.9165478177959402, 0.31635203503696396, 0.8981193291335272, 0.07873298687013497, 0.20243642172037168, 0.36445249645271216, 0.7929545801027236, 0.8755093729764273, 0.2482307157524295, 0.07875241769288832, 0.5743700973279281, 0.04419927319384642, 0.33569014526105445, 0.15004116783964194, 0.3727859351245687, 0.371078620065724, 0.47207253296299123, 0.8962443784997401, 0.12923003343441297, 0.7815458105802999, 0.6958626903529359, 0.4777508762193434, 0.1462046680050073, 0.5828269237975487, 0.3826280119107256, 0.7226192128415215, 0.5303073530191322, 0.3533733015412477, 0.2805014403952075, 0.8004779088335582, 0.4021663712165473, 0.5070243556712211, 0.6196307401710146, 0.605531972656143, 0.5473953660323659, 0.4832225519858323, 0.41820081339448, 0.7671389180125706, 0.19880350008041436, 0.9335557514720043, 0.7317267199807683, 0.10564321566179713, 0.910725943218761], [0.06173814051485338, 0.5994819789515876, 0.4985090433062135, 0.3481744222228068, 0.2930826260982543, 0.14599576181759555, 0.5147272414678341, 0.058052806789734124, 0.28987373727446786, 0.13216682374978606, 0.16478707837704887, 0.49789067321736824, 0.1302001677222554, 0.9917392354558564, 0.8387073662836838, 0.4731251471985226, 0.5129812048141357, 0.3433870640605823, 0.94639437620672, 0.7150857199624557, 0.21530954828780635, 0.4738539796396666, 0.16322950780565504, 0.32375555905662456, 0.050803790740591825, 0.7864937201789873, 0.9712590752086738, 0.4677320223197242, 0.20840795904363463, 0.4429352901258954, 0.8572268966955164, 0.36594232366381585, 0.580490449121416, 0.3687558418615624, 0.14522619565068606, 0.38147550905638894, 0.13209996187955075, 0.2610971939548822, 0.9591611632495901, 0.879573326848693, 0.8149858471661953, 0.00912974392000554, 0.0894528962251746, 0.18811813232673702, 0.21435406360632137, 0.30546279920663644, 0.9954415604785714, 0.9066273613746969, 0.5886945735714764, 0.06612017127891234, 0.6515374875971671, 0.7486126038480159, 0.9198079624170253, 0.5203340286525656, 0.47706998909592646, 0.5069195511928342, 0.9015051332529426, 0.03754608183309549, 0.43014839489669143, 0.5913549161393707, 0.9714970086378905, 0.8416369322963175, 0.15187295920775257, 0.2628194484865487, 0.26095415706930314, 0.5835928704412813, 0.49436629867591997, 0.6132373057739182, 0.31996668024355424, 0.010654891534005673, 0.901339372399253, 0.7390306056967024, 0.4988149723973383, 0.21751203139342978, 0.7685392178338261, 0.8569459177710408, 0.10140352222920779, 0.6095616061454283, 0.6762400648731661, 0.6030279506499625, 0.23433944746102564, 0.5725050462140842, 0.9615093269055793, 0.768751279409903, 0.6834490317195652, 0.18409086592922141, 0.6454160053237774, 0.9505479509879916, 0.5663839227290637], [0.7327549407874815, 0.6733671166650326, 0.8367646570853996, 0.018478359073776485, 0.6584731376680405, 0.31387759704581875, 0.15006813721916, 0.7346599911193442, 0.4127468651983599, 0.8548796293081616, 0.7807309369399827, 0.23207212998060778, 0.31191421276089504, 0.5923704644595996, 0.7887083432835394, 0.5935012603646707, 0.9110162037380435, 0.872946869781296, 0.9400400754134192, 0.6734571622743758, 0.8806654143045911, 0.5139032367115736, 0.7775313197564813, 0.681957396902388, 0.2624102301990351, 0.17841889615318052, 0.9387378053067176, 0.30100094988835613, 0.06491053294487226, 0.1645763260844808, 0.7990769622462853, 0.7800933536336111, 0.3932483442076554, 0.7960087195323606, 0.03320381930262495, 0.8221923615521812, 0.679228078401437, 0.6556837310390313, 0.5295752068380779, 0.37023091948706877, 0.1606207586111339, 0.15930061552475927, 0.2521126626883953, 0.6791450420857855, 0.1308518325747926, 0.6077982045468908, 0.2920489416380635, 0.9613638300835251, 0.6625797654649798, 0.586441999284505, 0.6364595494679566, 0.8538927554504315, 0.290126493784877, 0.9020750521266359, 0.9454733341398092, 0.006262228998793806, 0.3093492103495019, 0.6496551925100745, 0.3803705466672138, 0.8238161541904785, 0.4284359253159221, 0.6731695834982708, 0.2403308752322607, 0.054984859309370804, 0.0438610095816121, 0.31555673858810607, 0.7549538450536584, 0.3660365286666589, 0.3992526366062008, 0.3789048530250587, 0.22004211645090177, 0.9911983732940806, 0.4274534000048409, 0.2798807183816536, 0.24336211679897812, 0.9867104898164227, 0.307401498084926, 0.04331856121731226, 0.4703927644421433, 0.10822427544742119, 0.8161922615961262, 0.07566841479777608, 0.3880359302461226, 0.36615618964694896, 0.13696628736053296, 0.9073489881075049, 0.28853851451873624, 0.204022607160826, 0.725786769099369], [0.8780214767824338, 0.9775350101935294, 0.91875583021429, 0.5233918463240823, 0.22286859237694978, 0.9257294651561544, 0.08870162887099686, 0.8794829821812786, 0.41933866193626446, 0.2611065857239181, 0.7068972779705096, 0.8913492830861586, 0.03404717545529701, 0.5589494115993408, 0.8082257596653473, 0.9328309501276061, 0.9611939352938693, 0.32290439737389665, 0.6494030364179499, 0.14673475182438678, 0.2513487181230678, 0.28029769393794546, 0.8644282724515687, 0.9248173982808549, 0.7311834095850062, 0.7179852602747963, 0.43137872243008224, 0.9604095804692698, 0.9191159909008216, 0.7873092796158728, 0.1895542294785808, 0.5358636195716269, 0.4316543167190512, 0.07782199732913164, 0.23299231608467252, 0.534040811148236, 0.7435670057961906, 0.010975504955095583, 0.7670632878750768, 0.28966996882145424, 0.3276478808698776, 0.1437081585258274, 0.5603719672113965, 0.5343910811834202, 0.500322368284791, 0.30990097651951753, 0.26844479921362163, 0.5986541565136185, 0.8325911480572753, 0.582615585186586, 0.2100137494252733, 0.6313635845425847, 0.041970860236079655, 0.8745895441408162, 0.534830352686939, 0.6566475423897831, 0.8392886596850275, 0.5003433612505988, 0.32199955276490444, 0.8331878329028906, 0.023351224637420342, 0.10650425276014697, 0.049117318633950746, 0.5959049036806815, 0.7727706572304512, 0.47677437731513683, 0.2930505018107986, 0.6832355371967054, 0.9973346581209166, 0.17087358455061297, 0.6382327186413007, 0.7734663473948582, 0.6294640921813314, 0.33293781193082894, 0.04823936670985063, 0.5093524186507031, 0.4221438139413901, 0.5764459543177793, 0.7604211220227889, 0.7895731400933353, 0.10379627996020468, 0.1644755566386884, 0.9458085703542594, 0.047809023693736075, 0.6187327738514409, 0.9940685058728169, 0.9972088498036871, 0.09346821963160457, 0.2629879971713506], [0.5921795726907094, 0.5236691846219622, 0.5706087804198934, 0.5493111002890881, 0.2836598131336685, 0.0954378022007677, 0.3503362379744419, 0.417516677670125, 0.3584659795963766, 0.15331314351957293, 0.4895697077188811, 0.24161979094295538, 0.31659640135940736, 0.80313425939084, 0.5876016750144017, 0.6077538204506213, 0.6473472953658501, 0.9681337454032949, 0.8938292042257076, 0.8129331154958093, 0.6271089971822903, 0.0932431915990466, 0.7298615788836794, 0.31501622819680597, 0.6995327704225717, 0.944877528923261, 0.060769716260844264, 0.5575449023970561, 0.5273510594640575, 0.3332883527894366, 0.3269866660098121, 0.7448209577224162, 0.8077250244589677, 0.4254645351989046, 0.18821103798156924, 0.834828789093044, 0.010161752678862657, 0.932672371563232, 0.0025626739858252146, 0.31105876388482523, 0.9896237493853334, 0.9784578144135792, 0.34538641282293714, 0.5566278514963338, 0.9387083569566761, 0.08085833180887414, 0.1766372894063155, 0.7306442803865707, 0.21856381825283078, 0.9837976573764479, 0.35021098045489285, 0.238740352707009, 0.5240772002341829, 0.7116383602930043, 0.7861881112237322, 0.6629642222831407, 0.46506130281016234, 0.09066914762821421, 0.3888845808866649, 0.19628722818868427, 0.9871961385279713, 0.20504639317148698, 0.8528265141339012, 0.9926010729506202, 0.2215686898936261, 0.44284172924297616, 0.45341048624997315, 0.6228330862744844, 0.9153029004139825, 0.8852140495961042, 0.20134622555631188, 0.6139262219396837, 0.9820304614458683, 0.5112030029308969, 0.14226658117820112, 0.4924853156715747, 0.6867308050564731, 0.7717458356459538, 0.2833717755304891, 0.3378354315618708, 0.604218729083199, 0.13168735129710318, 0.8078483924953729, 0.39310191456886123, 0.8959029330438014, 0.8765062622831602, 0.8084051073485089, 0.1989209389802673, 0.12452717076357189], [0.6389272709951754, 0.9413323314590839, 0.6392682442556196, 0.3747564334170669, 0.5610491777675694, 0.3677375136856096, 0.6539718062171969, 0.6285203926978007, 0.5631279416110686, 0.18950519311441782, 0.7226698238454713, 0.5652110899881859, 0.3792926731019707, 0.029594200095853784, 0.09399677346324997, 0.8535795809670471, 0.5307822159792509, 0.03289671258906823, 0.28834787661294137, 0.9224076912780182, 0.42111215543273117, 0.6217460955199156, 0.5840074278960433, 0.3359889115026239, 0.07308412921826535, 0.015926798519617646, 0.33326952586846514, 0.6612086577290672, 0.027444339287311825, 0.07610808388148904, 0.2001590547797084, 0.23236950700950454, 0.2860597957358797, 0.5655149654876299, 0.3716213996992688, 0.7987541104359092, 0.04290000624539958, 0.4648803189964196, 0.46894435702453685, 0.33744906524652585, 0.43347740872170704, 0.5375944861877426, 0.8545079594662517, 0.7318851233857124, 0.08376365709845546, 0.08740863136776555, 0.6069295445577177, 0.5047941141255023, 0.869766638397423, 0.48124520264386306, 0.564429601362776, 0.8798299053693893, 0.5357997346075069, 0.8580643375265533, 0.3464444716730323, 0.006886678355234377, 0.30530796145266137, 0.30266077166140337, 0.9970749689070376, 0.13711644351912156, 0.6728784945829647, 0.04774777371460448, 0.382511935312022, 0.10964130524720017, 0.7065378935177645, 0.3030434070330994, 0.1706391857404591, 0.5039343241986278, 0.6432202812149216, 0.4056816565095903, 0.5715674655432016, 0.5739705187395138, 0.1521471773171892, 0.5520750872252749, 0.8380021197693478, 0.31311938582365184, 0.41432742769572184, 0.8681468762606518, 0.9338785126727056, 0.9526850842398418, 0.9566992856115509, 0.6337531601181717, 0.1198263501164829, 0.36912369101788867, 0.9251018533396869, 0.012333178755327912, 0.628859550281964, 0.7111794364925131, 0.9523258915283581], [0.08255942296955898, 0.8364406404009156, 0.6443597653879414, 0.618876343638427, 0.21690113732047345, 0.5424362023228411, 0.26532261027544757, 0.9165123575981962, 0.10818484233328651, 0.5279545430955032, 0.7406435520839232, 0.09290488776997552, 0.4268406861816698, 0.534445016547474, 0.5078470067153872, 0.837186932354647, 0.22618694038636233, 0.2749739208646602, 0.04124588447155242, 0.500941070589734, 0.638393423573852, 0.44645482971654205, 0.3221218720779543, 0.8060727703795892, 0.26771156744793867, 0.1294089732740381, 0.8928705572179015, 0.6426155112565274, 0.6477105785525474, 0.8719736177933894, 0.07511232017599778, 0.5578247570964093, 0.4336062233005, 0.5204551035483137, 0.5734323923141249, 0.4165770949494264, 0.46113142617425407, 0.34593531268113453, 0.880560050833618, 0.3674867389817813, 0.9678445346813193, 0.6906914123994115, 0.6164771301538566, 0.6410061189901073, 0.8833562326916368, 0.33620228656437356, 0.10339538586492647, 0.7514800088700307, 0.468360439971496, 0.8566120048830741, 0.8903489139643902, 0.2333772787005245, 0.6245684885117978, 0.8619105274508512, 0.65117545784051, 0.8695910526742259, 0.5955684853763866, 0.7641191092905754, 0.5022010708718065, 0.3711771933961687, 0.7602477686656227, 0.1589550274440913, 0.2206737846936151, 0.22454116104030653, 0.6491502450666584, 0.32554646385551866, 0.33552877503857814, 0.7407249088243756, 0.47770538637969995, 0.18885362763505043, 0.2963936339948595, 0.9175194891467573, 0.44117580258211364, 0.6368607209246854, 0.9287685275332186, 0.5108162786522749, 0.664113783933174, 0.5267359669735451, 0.5099162636570373, 0.48203671127749037, 0.22663926227034403, 0.8477521447490141, 0.6056736643160574, 0.9586180747459554, 0.5508540613810617, 0.5628828822056122, 0.030267822093533847, 0.2037835742643762, 0.8108518754004513], [0.21155243148657088, 0.6644654413792157, 0.33965411099121623, 0.8365859427675942, 0.5373295049026847, 0.4024289490255798, 0.637869826327398, 0.9787821318651106, 0.7671253125558877, 0.29084406432070864, 0.9374444360848144, 0.9233485335459986, 0.5647031067561276, 0.6258798647167488, 0.07173599696811461, 0.41460635803007795, 0.41365136373067035, 0.5910338588908807, 0.24932420981706693, 0.40647130050038516, 0.7369275040233074, 0.13132870516155892, 0.11823856777036057, 0.4922020372138822, 0.9356193149323445, 0.11074745284010834, 0.43431582101487864, 0.6126840979202538, 0.6528075486723843, 0.25384824497903413, 0.8155441197535044, 0.790228464004852, 0.006367849032681838, 0.6752885017908047, 0.07837191806408605, 0.643734462809796, 0.3089919539956698, 0.14268334077559175, 0.02333344249943803, 0.7913721713376612, 0.08503723198525148, 0.07083620394498613, 0.7338731257419842, 0.1361828146017685, 0.9237501364773881, 0.6071192131696413, 0.8940648492257888, 0.7516744846094192, 0.8798201247105508, 0.8050025832709191, 0.27851867477676695, 0.2216857312014402, 0.0317009294224162, 0.042357505725324596, 0.6880672564703674, 0.07649047704924539, 0.445234972369588, 0.07490951795444634, 0.03519617887552828, 0.05313114132620944, 0.458584248512257, 0.9617791982512968, 0.38567069521071384, 0.7378487045440475, 0.8770164693045296, 0.02593481620046134, 0.03379814231224998, 0.732484308700405, 0.6956833048882093, 0.8143272631056954, 0.10773567391588301, 0.5798689061752423, 0.1399314535230094, 0.09381427773014528, 0.8842924777588432, 0.47722707027690126, 0.315319779227365, 0.060897362651439635, 0.41308962201032196, 0.04221961025837295, 0.6702500049536841, 0.48658929188546296, 0.6174217789408062, 0.17947304802249198, 0.09401047021059583, 0.2052479762273307, 0.24539766891550652, 0.5241059501745857, 0.8182553351268695], [0.31452367682044724, 0.5868325600853366, 0.7287101135309413, 0.239834371051856, 0.7976352842569927, 0.3393975307939674, 0.6588920760598261, 0.6574173422067107, 0.9970389925241413, 0.48112019186097765, 0.6370673008292129, 0.1108771586905265, 0.8472267110432655, 0.1191264383096039, 0.07065159598283166, 0.6279527100509459, 0.1227099784746688, 0.6278848691531841, 0.5855895690384797, 0.8706582106527907, 0.12306059454601048, 0.7150710824982769, 0.15727289237075426, 0.08716276836493586, 0.029410421565433054, 0.23171440762738837, 0.806725612167363, 0.5645227665347009, 0.9346790648093313, 0.2981045743463927, 0.2106855152681092, 0.3541377434117331, 0.47825877290253316, 0.4740634750569691, 0.3593085788483745, 0.15205549213801173, 0.8831152012438578, 0.9607932116402454, 0.0629186994222124, 0.13818701668580347, 0.8478539135787282, 0.7164013323558655, 0.7691986503155324, 0.7617286299576547, 0.24386934817106232, 0.6601724276501543, 0.2844291522130691, 0.2776012394821613, 0.009473490202790313, 0.47490264651986136, 0.34173778505361707, 0.49871538648134517, 0.8055420771484197, 0.4948261689799439, 0.32893443560628466, 0.883597675636965, 0.2448830396084355, 0.3233109350588036, 0.9065310563755257, 0.06466770870175764, 0.033173445828154624, 0.7081075780693497, 0.523696031755392, 0.8961886474949768, 0.979508039015024, 0.6751973456272038, 0.435988321736673, 0.8769871617593884, 0.6364685692723667, 0.09363382743434279, 0.7961923138191327, 0.1222145421574733, 0.6127258374010938, 0.9601000470634415, 0.9823769517667279, 0.8852544880429071, 0.948838665324486, 0.33370414393860937, 0.3020680396183294, 0.47290775836012033, 0.9778842489357462, 0.40655350675003166, 0.704488918384738, 0.0463995689293113, 0.8618107612833837, 0.0068906318791801535, 0.648591178524924, 0.10276738086828707, 0.18319787678899602], [0.47067966180364806, 0.17335125746842184, 0.07744775396161985, 0.38252180008427694, 0.8197924346522685, 0.5483008120586852, 0.4686804265263619, 0.1539866771428755, 0.22153786593390468, 0.8734083259320837, 0.8468800559832983, 0.8573704870424338, 0.5978843491460601, 0.6573706267275655, 0.34923933852218114, 0.0008623054519518725, 0.13770399142325407, 0.5793767377834176, 0.08626785297252415, 0.5236962403785748, 0.6529960402692727, 0.8689956701803011, 0.8408283752829668, 0.09139908738275904, 0.06216875404817823, 0.42522144925254746, 0.07464216917141231, 0.9816717387998705, 0.3339039787628718, 0.5259962217760854, 0.6269149030568393, 0.3586305593047865, 0.3164548143546416, 0.2888286815708798, 0.21500262949077364, 0.7051242756258971, 0.33111254570009396, 0.34608436684274035, 0.5883664242973607, 0.5741621593481716, 0.29640008630010795, 0.8873432809066879, 0.8236596603663815, 0.6876688395980347, 0.259368990423799, 0.6431969923436753, 0.07243000762121932, 0.6758695316450778, 0.8088707558248815, 0.024833311085503684, 0.4346719629376975, 0.150073901699334, 0.5565799714601368, 0.8017668605985727, 0.15563580163293, 0.9972349970914597, 0.27259923221911586, 0.8974658780894798, 0.633770460507187, 0.9810796821898161, 0.2252420548245001, 0.17514053822361864, 0.18095045285782607, 0.48873493669559886, 0.3732840421783872, 0.8396550758913048, 0.12459361518904422, 0.007402020256916386, 0.8218382845226191, 0.26107450726579695, 0.08332859261851666, 0.2401961546656689, 0.3140416098097739, 0.5323311545795972, 0.3307553851597447, 0.3302694108996672, 0.39839160401049456, 0.852778519438578, 0.6198753149565817, 0.32871497788692616, 0.30032665294347427, 0.9645704505396206, 0.7221962344527919, 0.5529777935580016, 0.48195672168247394, 0.2909584318362054, 0.10684095787299486, 0.524251873582422, 0.9042033499231357], [0.6786718890894536, 0.9360848893226597, 0.9195942174229267, 0.9050438058077476, 0.3866620452477443, 0.13861966688885707, 0.9726013467704148, 0.7445330862698136, 0.27990222957385114, 0.7272471222199449, 0.12912938656509332, 0.3392570590442723, 0.7105490778899618, 0.3244856667953624, 0.37235193213945106, 0.13114728092464212, 0.7306220734742386, 0.7472235920523959, 0.8272559031730156, 0.527401859281813, 0.6555094148512521, 0.15174980727739606, 0.15293729784513466, 0.7702024077837781, 0.10228670774693349, 0.9252585619911088, 0.5038493657510967, 0.5508450364623523, 0.32010384418714755, 0.004402347541819784, 0.45309743837515404, 0.20076517918388548, 0.42737555872594246, 0.061618716493492265, 0.9060111071829697, 0.5652648124552704, 0.42795194792807545, 0.4074923483602284, 0.9572720595873383, 0.02821005538264565, 0.9029660440189707, 0.45383740614750223, 0.09664408982394113, 0.375284572184006, 0.46023832786950225, 0.9026842364635288, 0.3673434254224319, 0.499854549940266, 0.7362197820026027, 0.7863011694766673, 0.7645168153710346, 0.5777389978030208, 0.5603642813182397, 0.8192211912911636, 0.07789770693030273, 0.9678697382355035, 0.9717305532827434, 0.7763002527111937, 0.44842663909597247, 0.6089530116193439, 0.24856797278371823, 0.5860977337761667, 0.5208146859613425, 0.04921325089951356, 0.6035307221768036, 0.11252946449835854, 0.6220921750329035, 0.7738425149465435, 0.4997925100819619, 0.5388794970026483, 0.5121084503931655, 0.829673460867087, 0.5447132288725038, 0.7576693171978315, 0.19969417070203554, 0.530010989009563, 0.9765117295842283, 0.1589841293623515, 0.5476260654218397, 0.6697235959644398, 0.7312887799501441, 0.7845009504534269, 0.3414972796381559, 0.8969270020049198, 0.5149079772937352, 0.2137781750411043, 0.5011275223966584, 0.8196612107551579, 0.2706041484235385], [0.4689308044364561, 0.1592556256794917, 0.9643780737731674, 0.8580466528549477, 0.4024694598433667, 0.2997172313428942, 0.3694937298956771, 0.3609730208757731, 0.4728834605823844, 0.12405069235498734, 0.15240143704170372, 0.05845121167210077, 0.33082653064261236, 0.07218041893047822, 0.5432172732382614, 0.5212810087061834, 0.8303126006156486, 0.37160056670780117, 0.06491011686162085, 0.5454536669473815, 0.9744187952138066, 0.06384529087785062, 0.08009384803027564, 0.2579340056331765, 0.15778212329070784, 0.7473197508644865, 0.3814228680429942, 0.4037678696565862, 0.10699822396335412, 0.46017934267500493, 0.47218106196198695, 0.9084659025086295, 0.0482039177742738, 0.34210296411122376, 0.656743812274937, 0.16210293032809675, 0.9420638115007246, 0.8442764596373619, 0.5864495420660558, 0.2917875934454687, 0.18755631468287493, 0.8613719731543936, 0.335756163400315, 0.9325148962280047, 0.136283745590831, 0.15622701986306387, 0.923266141274925, 0.3141061820873364, 0.1624860259090396, 0.9309266785428646, 0.7234357672281464, 0.3011736723147692, 0.41713642589039035, 0.673700575588811, 0.21945262242070307, 0.1894773421690913, 0.15872241329670522, 0.8219109989134571, 0.6541281097306036, 0.2682821213100599, 0.7620821086425906, 0.37059333063585864, 0.2884303240782722, 0.5939508418841956, 0.33525732803729824, 0.7739505071057788, 0.5018983644136475, 0.7980893918864033, 0.09443284072662816, 0.9860760173155696, 0.40858388106463794, 0.4864780749413562, 0.05549379398971632, 0.9675349098349951, 0.8312538123960729, 0.9548965995550719, 0.49128007981505384, 0.2628928097691403, 0.42613298539832756, 0.47688039931279014, 0.7988326140612175, 0.6048712486505857, 0.7222594145085502, 0.6277470546093541, 0.6396106581578065, 0.9110284011325437, 0.269015304289253, 0.2727367221229253, 0.5623917387689411], [0.06207368181253137, 0.8370436179713142, 0.48312662621517455, 0.0839684303328534, 0.3639542295946939, 0.8817848525065376, 0.19561607709505346, 0.0662299775784333, 0.026098488002490816, 0.7012680411405539, 0.11488462152887191, 0.24128554302387284, 0.08409165212711567, 0.6787143743621306, 0.9846325375618924, 0.2481236616907121, 0.9928643140488921, 0.6772794691295502, 0.8553512498972905, 0.9256497792829562, 0.7073198188707865, 0.3318958767790757, 0.5954477983896375, 0.43015925766395346, 0.592542146167197, 0.17017805771774097, 0.7782793303043051, 0.3201161904824189, 0.44258424081202874, 0.7854559700230879, 0.9359021933216592, 0.9113528684167422, 0.8432766294881009, 0.47003159489589186, 0.7014247262828015, 0.042331700768487246, 0.12133463830875357, 0.9377589119360252, 0.7859357872647528, 0.09077601742499608, 0.28227710718203747, 0.8407391173602563, 0.7585466079656884, 0.7512028631590524, 0.6635000556842259, 0.1556965080293603, 0.6570864005007412, 0.12503681134054612, 0.6406152452206803, 0.6758482002012092, 0.2306561977184285, 0.5733566011535653, 0.38058493346790967, 0.26442980252537407, 0.3490119286653077, 0.41276017230650675, 0.15880067232865602, 0.36882219630712876, 0.6872329559258853, 0.49133252565317753, 0.4087221443656218, 0.917179959188718, 0.4696648068807755, 0.20992187909599902, 0.5662947885325013, 0.7248048371865745, 0.09568829255460676, 0.2990779691560773, 0.22757222573079716, 0.22777103393428888, 0.7499322249421724, 0.8210241633365614, 0.41862562824831406, 0.11645864659695715, 0.3505090447148935, 0.5938006331878736, 0.6978305974531012, 0.006354086984557306, 0.853434599853247, 0.013336680791795952, 0.37654952636626493, 0.8291228964229043, 0.9505215175314558, 0.22473069862537642, 0.9794342044228075, 0.3153700314639908, 0.9796838334254855, 0.6497144205834879, 0.9586031718526422], [0.6881935059123235, 0.2857992287935922, 0.5392420101962055, 0.8350066987074207, 0.7303004418850774, 0.023353583485674845, 0.5008778991669215, 0.900666519677886, 0.09414888188276216, 0.9255305518592748, 0.2848651437705376, 0.9879988994837561, 0.04729513792236273, 0.978503916808745, 0.015854454121602246, 0.20754984606004256, 0.23798773629771486, 0.08786809693491282, 0.9332995422524655, 0.018706575442957396, 0.06962141094729002, 0.36166499182372236, 0.008747905466303885, 0.26157266302878435, 0.1894090099739213, 0.15179911421151782, 0.783614566688397, 0.27873509980652156, 0.8942961067519903, 0.6488329622419126, 0.9238515205030657, 0.40394892913301306, 0.3823929411589585, 0.34674416515745066, 0.1893219592695965, 0.8873464401764113, 0.6473529835381948, 0.6221172446037629, 0.2769379220583347, 0.8548147184985623, 0.07642509329234703, 0.24400219828391945, 0.1365173035023176, 0.09774337974630865, 0.002519332902520044, 0.9619829586467429, 0.40208809594872985, 0.41680666846505543, 0.34117535843219127, 0.8054346306887744, 0.2485595047314203, 0.2977778844154042, 0.13200108624991602, 0.9145154250826253, 0.202247386723575, 0.12441930234588239, 0.2973504492587933, 0.9958047433961651, 0.592781407959969, 0.12826703732226752, 0.8744820929414956, 0.5003084093962786, 0.08936914210658387, 0.9140146055759077, 0.3371323815458802, 0.6315068362695981, 0.8016436873511674, 0.9816054913540524, 0.8697230111665605, 0.5542056159981029, 0.3292414709704321, 0.7063512806867938, 0.9452308170656275, 0.6181952723414077, 0.008232380034881137, 0.7877212770537909, 0.4641297034186822, 0.26164905457919063, 0.7006945817854182, 0.5797628767348308, 0.6057958412465118, 0.9206111305371159, 0.6727209067362293, 0.34076973015576284, 0.11367771698835705, 0.5665426015965426, 0.9101063026701217, 0.6988045760298637, 0.3446407165432771], [0.13209898449907387, 0.8591820721439712, 0.23264769274951536, 0.5494409431494077, 0.5056577790849632, 0.6096995082660097, 0.2025865081587821, 0.853929482299894, 0.8129492820384435, 0.9643914894118122, 0.3818545628207023, 0.12610097526987218, 0.7187353948510398, 0.2529644734248725, 0.023835280293614813, 0.4047845950868322, 0.5857883176509316, 0.5625227193030454, 0.806067884599265, 0.5643153409091569, 0.18134193667665643, 0.7863930918450893, 0.3795569175888398, 0.8181221544064358, 0.7218523321677016, 0.6086041201529591, 0.09938267198501893, 0.04730470566524447, 0.8247083110800993, 0.29238549038863704, 0.881480162244677, 0.6091740589947264, 0.017565110142120033, 0.7911592205277027, 0.3098739932463861, 0.3412705809617139, 0.16608373852504266, 0.3554281772417399, 0.6544349564591172, 0.7583142794769326, 0.11625386291804274, 0.7134549473592855, 0.7956625306550962, 0.5735391733840018, 0.7619424221804528, 0.8340549029344104, 0.1875444575435773, 0.8125981788926016, 0.15659298178971914, 0.8508970393773135, 0.662651718809134, 0.8264293659400063, 0.44654931593845604, 0.4192470099308526, 0.15204053565388387, 0.5882697893583749, 0.4345750278109809, 0.09850760819608229, 0.14091628310360893, 0.7308356532091398, 0.04632373619085439, 0.04166825094847926, 0.5657733359686105, 0.3565686197171115, 0.29199348598331254, 0.9308198084512485, 0.4164861445655177, 0.37436957003707994, 0.9299614066098547, 0.921072815762624, 0.7844264358582574, 0.7815715867233785, 0.6693043174998956, 0.15659082325122564, 0.4420305345052975, 0.0999317462754773, 0.6361892417304719, 0.6741873029627578, 0.014161401778511773, 0.09920296136152107, 0.012898324994366939, 0.14255823490573805, 0.7807655092348627, 0.7867100013334126, 0.5897416519021162, 0.8881221961877112, 0.6319432163259534, 0.1721146831114031, 0.41851313338925467], [0.252434453523269, 0.7954220007575719, 0.8355626764439885, 0.472234139407964, 0.6243517262861522, 0.2694438440278515, 0.22903198902248845, 0.2329227844025229, 0.4284079854798485, 0.7465560532095887, 0.09597258880634019, 0.7236160891180348, 0.21615813747321178, 0.6724723642222807, 0.47745135678609396, 0.6557756126170944, 0.3904095435752697, 0.7005613666038595, 0.8814535629884822, 0.039361788348419524, 0.9422486006540367, 0.962916636550417, 0.21863719656006708, 0.6357381020664425, 0.5153123402372074, 0.676126376145128, 0.39515279131402314, 0.5473514030285309, 0.9694287069353724, 0.9484295289314618, 0.41797358508676674, 0.9658662276951205, 0.4924340260368536, 0.8321526647001873, 0.49333131871191827, 0.7515903231088801, 0.5889097698041315, 0.07469728882495463, 0.8187710393543329, 0.9323377450462531, 0.5034100862931311, 0.13780069607074752, 0.09805047864948602, 0.9569741916403658, 0.13336495550183802, 0.9674891285115923, 0.9150695648196562, 0.8002684616879204, 0.45998303248397776, 0.11646282258026686, 0.7043419294537379, 0.0883526216937085, 0.8332662676730971, 0.2989902681300709, 0.26682296377521264, 0.09847431947023522, 0.4394968160391255, 0.12484257685664446, 0.9149785171857033, 0.03831032073295826, 0.5310997515792331, 0.8930414369602175, 0.6057140973109642, 0.010091579897061553, 0.1530969089899501, 0.18236002754178693, 0.0756023381039953, 0.03800954438108184, 0.24286716129106078, 0.8970595508914099, 0.8377174607490453, 0.8054043198615143, 0.13623945495272394, 0.9372329803014297, 0.5888848274317262, 0.4782811177940697, 0.4703474640139015, 0.11152381012300239, 0.4116058870595396, 0.5828729233648039, 0.7743832826218837, 0.1068337021296405, 0.642621764358944, 0.5805774051680093, 0.15770075438202258, 0.7200736226978128, 0.6331195416745554, 0.12076014677465885, 0.8012667732753368], [0.3365304409413027, 0.14392071131485873, 0.12616880058186652, 0.666261463179179, 0.03505173305806475, 0.3004406422081958, 0.38081838352397623, 0.1607126336238035, 0.6644508088707728, 0.6254815644618223, 0.25987632159794005, 0.860800691094763, 0.24161663852075144, 0.6818716422089769, 0.6671936932908322, 0.7859869701286273, 0.6457634227357135, 0.6869864401335857, 0.08364116390953724, 0.8150746246640079, 0.16768394402251363, 0.34754921454825827, 0.530339486773835, 0.7231598125733801, 0.8609144927072642, 0.861006275303955, 0.2285713439913789, 0.6149726401368069, 0.01231398005621731, 0.5848894472840563, 0.06666740403261784, 0.8555982328339365, 0.5493449144437244, 0.6468223884622942, 0.3543093886065287, 0.939562402685706, 0.31421190219994155, 0.7888209364987551, 0.49440375004131176, 0.9744077854852387, 0.4116150312957748, 0.8738671332681629, 0.6072721498136605, 0.265388333850899, 0.45738093947055025, 0.8256869616748419, 0.721085705756952, 0.4334084699929295, 0.949615133534841, 0.8996870116215431, 0.05708484345585452, 0.9340081600429128, 0.28832551488773006, 0.6248405658001157, 0.8435635323087313, 0.20511058206857868, 0.716625093817508, 0.22897390129677253, 0.5645161303557658, 0.42595583213969546, 0.03701500453747719, 0.5307593691044159, 0.5195193731283735, 0.411774200850194, 0.1782469096509215, 0.45708152591613327, 0.11635087267063904, 0.5711953681512103, 0.9896163469392834, 0.9976788198241433, 0.09676599801320906, 0.5667969209758633, 0.580860296104861, 0.07621649464152747, 0.09739288026583415, 0.8121563283708785, 0.35775963032242775, 0.3166762519764812, 0.7933510251288189, 0.7836940475846617, 0.11283645662143171, 0.36044471007854206, 0.7869946351089331, 0.16788304635785745, 0.15686120338363319, 0.7503466843720341, 0.9572808773901921, 0.14746514419999013, 0.5770532353582984], [0.2628669137226328, 0.6800081978417578, 0.7763517715941253, 0.7040279533266568, 0.9819123431096654, 0.09225562353590078, 0.5990469726496388, 0.2670846305332927, 0.263353053451049, 0.9395011953221185, 0.5322945870243897, 0.0589637046567032, 0.468547952134055, 0.9522856257983144, 0.030736065609641372, 0.8756846833625386, 0.1886567122929469, 0.4774289970121488, 0.7739990749060096, 0.3363101899556781, 0.28779697864287856, 0.7070104123105668, 0.8067172081181191, 0.7781826035958227, 0.6474314781575093, 0.9078622496031485, 0.4801069557527373, 0.9078743526535095, 0.34512708056788166, 0.4195813497896367, 0.03681337410864649, 0.5764867502894847, 0.30069837869921434, 0.9084613389176335, 0.7956112020642767, 0.30553339074168706, 0.20141412465624087, 0.28873922835925225, 0.3449993384569592, 0.6820545947527211, 0.8414726585769976, 0.7879661940194789, 0.9387231118352586, 0.6600690572106689, 0.18604849147094826, 0.4287595767638829, 0.8543788305160122, 0.12364207418956907, 0.07961084884529279, 0.38768769773713496, 0.22181532469329268, 0.14144861257542207, 0.28619475443157427, 0.6716525736906024, 0.7843257799407813, 0.4491035960424977, 0.3346705241987816, 0.5974685341952795, 0.45283699364588725, 0.4220947184215712, 0.15180502856632938, 0.5673552337213482, 0.5119161650056073, 0.7233069508567747, 0.33884138819917364, 0.31447243117989676, 0.09133140139763496, 0.6605414226609609, 0.5979576526860947, 0.38775896329475223, 0.41695940271811827, 0.8776631385742134, 0.20592362713950774, 0.9264905713893674, 0.8640614257380739, 0.6212957819374371, 0.9072545517931139, 0.7639222058637363, 0.7384163186100242, 0.686828110286536, 0.43140415405941845, 0.050303317272339165, 0.70465667242147, 0.16170969626367715, 0.6804595984353261, 0.7652531390124648, 0.06525003870293067, 0.08078080463573456, 0.9939968163746431], [0.28925355045426215, 0.06424132386427284, 0.20616183122343967, 0.7816931071024372, 0.8074493422619707, 0.3621851668734921, 0.12295169097359893, 0.3912305406024943, 0.7615932837818259, 0.1399689312498814, 0.6951196087564081, 0.2816763595883942, 0.16432500200984756, 0.6523296713772749, 0.6916097411651497, 0.16299325652745356, 0.82612895879277, 0.17809753786872473, 0.06354368226310836, 0.22661991272975035, 0.2564473022178476, 0.618757986316576, 0.619442050292151, 0.02893192533307576, 0.1583965632411125, 0.6178281405949388, 0.8095611348905557, 0.5855393783667587, 0.778913273147202, 0.47771125364057077, 0.5203470033334937, 0.30355020340616623, 0.5914302193871241, 0.0895391065491048, 0.862816774443246, 0.43052691880988825, 0.23609350322699452, 0.2583102677628425, 0.5592309517182706, 0.8318790237127104, 0.530895227361225, 0.5638096814327156, 0.03669074062006872, 0.06547077387612998, 0.07708838979653321, 0.7714174232265827, 0.7907373573522265, 0.2383972676440831, 0.178592916500802, 0.25434579898609033, 0.42131916303663675, 0.6808163894318169, 0.5732246057845333, 0.17050380415576616, 0.014066851686452275, 0.46013944891235314, 0.8792921741527701, 0.31349188804739414, 0.5359769659141723, 0.8642526699289402, 0.9389017821798217, 0.9848904822309308, 0.8112546769860313, 0.883510372121539, 0.14889645462031809, 0.9245955182044697, 0.6002791381279725, 0.7301237728969817, 0.6955917132795392, 0.5194955454241297, 0.3027461293815653, 0.22876447842362357, 0.7995609860063836, 0.34832197614495475, 0.8527448115207769, 0.14108493219773277, 0.5317164958111085, 0.5524996124804241, 0.3896645448686268, 0.9389473017472979, 0.5352665439868651, 0.21197779142504647, 0.27908812145721207, 0.3333916622546378, 0.1910709427101388, 0.605190710384604, 0.30264038335795884, 0.2778559161160814, 0.04900078995727486], [0.43574902525568604, 0.6045458446877167, 0.4514933371599622, 0.2793260540272785, 0.747203930100166, 0.44187238758336544, 0.48658535472718467, 0.7552044515698407, 0.4671669484407136, 0.7555546613366457, 0.5805601479048851, 0.6178598809365065, 0.6027729493886048, 0.327879102489257, 0.09279270184573019, 0.8819452818108663, 0.4396717532116259, 0.1849731596440649, 0.7410614050988614, 0.5597379105323653, 0.6340777878044821, 0.3252266687553933, 0.8118980414448913, 0.7216343079074736, 0.4711830539978159, 0.7784894231871892, 0.5134205219662721, 0.876601086690635, 0.7723178752283386, 0.6689948433327629, 0.021785867509779844, 0.1970817002299743, 0.5947523991946674, 0.3465184446630891, 0.2983911097566109, 0.568543438925438, 0.9657677316583253, 0.7893712022462439, 0.12663885633788108, 0.31345558877044444, 0.3584616329209809, 0.2884447917517644, 0.0835277168778975, 0.8547518502808011, 0.7859027061063103, 0.37254275226433176, 0.8767353431485406, 0.4910859048508104, 0.258058419111198, 0.20232573367659112, 0.16526056194598748, 0.46266128478816093, 0.3383860165626956, 0.6709203519149725, 0.5831460623419354, 0.45102193264919166, 0.5538623235881542, 0.3788436997415008, 0.9574885409898504, 0.9322074667963394, 0.6019351616344683, 0.9080539403016465, 0.1592817290291464, 0.9922539643929387, 0.2967755234887638, 0.27913134705028064, 0.5948772256531719, 0.0008083411521653261, 0.7757946827071842, 0.9095775291386413, 0.9196114739426864, 0.048072922971673204, 0.7112035782992928, 0.4468453982822268, 0.9707321557711286, 0.06540959554748194, 0.5805809872584886, 0.15539722025539937, 0.1454863001837161, 0.5115441869887117, 0.4287395743068756, 0.9406682239184411, 0.13005618084781934, 0.41468399809243306, 0.06718483652098994, 0.8923108417349503, 0.8689125131011822, 0.7437890570408032, 0.07670140153317773], [0.17727609970821168, 0.8334906729220842, 0.9095411010418225, 0.9989993205488631, 0.8970673646738692, 0.9706151197498212, 0.36224895171769245, 0.06386860153020857, 0.3765501211402166, 0.5127614373724284, 0.6790970699499885, 0.35099810162420486, 0.5445470674240748, 0.6949533528850375, 0.3325705568801385, 0.673817073015557, 0.8574232404210357, 0.5148512869314688, 0.4614615729429873, 0.006461436033273871, 0.17730864223353215, 0.5298121562524614, 0.7443282425637429, 0.08445082750201549, 0.12787719990991098, 0.23343292094080825, 0.5453080731033213, 0.015557237611109609, 0.38856707603804186, 0.35965042538090064, 0.4602432927015214, 0.48620353874069555, 0.5581778640170965, 0.3842359155409306, 0.9454547767720698, 0.3045732600981722, 0.8705569094267467, 0.3126924998022015, 0.7144963614725265, 0.7487091802372875, 0.9955157207596517, 0.3563941605926443, 0.07490918716826378, 0.7376690149041435, 0.5749310419810628, 0.32751927791555047, 0.21433838541116623, 0.9247420141297441, 0.3658476065215407, 0.47297054857194976, 0.10120009015345088, 0.7259350245246728, 0.15641400766250058, 0.22646443523924498, 0.6170923682502435, 0.6516860245950115, 0.4517582251163975, 0.5978015203116485, 0.97614764069387, 0.5432997863547578, 0.15712319430447685, 0.9714898227462948, 0.9106421728406239, 0.2901615044685556, 0.168052727027177, 0.8793932411362089, 0.06326058056157169, 0.8537828374365928, 0.4902475861306109, 0.38125492747973044, 0.2879272115167014, 0.2922557432370688, 0.9515492249023736, 0.3718996900247503, 0.2949768596024892, 0.1345470991043315, 0.1907648420186704, 0.3885001669344983, 0.2274679423613427, 0.0982774917151975, 0.8086524432962293, 0.9322907942988367, 0.9328392380977308, 0.7557774798893258, 0.6604105183086245, 0.3809819996352827, 0.9709068518687244, 0.37650147645524534, 0.8797040920511114], [0.3374861951438002, 0.23895713604512125, 0.7636954114817881, 0.17069531636662882, 0.3239420115018271, 0.9427477990400132, 0.4422692278131559, 0.6751235877757975, 0.35721829429012875, 0.6607823478540582, 0.6066094441418117, 0.16069355882759961, 0.3155686217327227, 0.4282035760934877, 0.7440854218738434, 0.24756429928532175, 0.6368293656517561, 0.6500061637667601, 0.73738115479139, 0.4378558931611207, 0.1333888133406973, 0.083398454816349, 0.2942558456034323, 0.31236844385939067, 0.20145379332314706, 0.8172510605807186, 0.24532422587559533, 0.9426701949582232, 0.7184260630654474, 0.08630650148674224, 0.6980936568086683, 0.3272329018792953, 0.30421169249766944, 0.8400335725521699, 0.6198063878953485, 0.8800094859782545, 0.19286215671388296, 0.9496512145936116, 0.6339870271686606, 0.5293556331945974, 0.6847459079232665, 0.0962152746701076, 0.6552257199945852, 0.32258580282124094, 0.14655179589893386, 0.16236613614450468, 0.3404328168093178, 0.8166473000392613, 0.2916503153958676, 0.9488626022554322, 0.9739398976992226, 0.9094936102304864, 0.340023053952743, 0.94927219472813, 0.7267603986926592, 0.15628411247280294, 0.7475547921201052, 0.9399124825418499, 0.09698395996076581, 0.9145300396194145, 0.6339331263883672, 0.9675565968494892, 0.3206029370501551, 0.003166775954895229, 0.5404208717506693, 0.8315024722627524, 0.3620885932042901, 0.19793631960936253, 0.6485782161383014, 0.06340753030234714, 0.4956408115278429, 0.5320670000272544, 0.6928944401977462, 0.8803839979711626, 0.26018003978773385, 0.9102643386748459, 0.7606784395716172, 0.21725220622711627, 0.7474164923073636, 0.8330909115361319, 0.38865037775179223, 0.7667293106712022, 0.19306549176661825, 0.41765610894772787, 0.4710495079612296, 0.1028967437320033, 0.1584697649298814, 0.08877602239920124, 0.43590187744717535], [0.8767798213150556, 0.7402905667550858, 0.681306101740437, 0.45065658488245486, 0.29062266706645923, 0.25345308417702306, 0.5514550566838811, 0.050190830522200414, 0.6460828894200424, 0.4868561826554825, 0.6445670394232889, 0.6030793678640611, 0.12425288063298534, 0.5870736752995857, 0.7504915669108805, 0.857217141989458, 0.886399109749027, 0.73140847977964, 0.004355311919113536, 0.20082932783358676, 0.39874613261339775, 0.5277875449404482, 0.7706425292248501, 0.7333149708195558, 0.08849558569157134, 0.7774724139089288, 0.19941096470972342, 0.43011320340660275, 0.6273527438389366, 0.7582296018784709, 0.9359218397944371, 0.48558766313110713, 0.05653466484295455, 0.573400732470097, 0.2292209281937908, 0.5658234010687759, 0.9716498895982173, 0.49894186042903665, 0.10903302922427116, 0.8266268629008727, 0.37722986164420347, 0.3428323104762473, 0.7446267589158959, 0.676502180398083, 0.6284160920823388, 0.8366088543555177, 0.4677177812732274, 0.6878998796824863, 0.5881670594614951, 0.12887120402044916, 0.49163764349433203, 0.295448703226619, 0.39262225145758767, 0.055047028497218875, 0.5065894965475476, 0.03892530571241937, 0.4433745689449372, 0.013606256136755146, 0.23893928459993152, 0.5397617115469945, 0.9416213348165522, 0.26701976446649867, 0.5297643400630333, 0.8821548405540685, 0.7749631695054328, 0.8402111923158895, 0.8158704598841227, 0.3300327414339921, 0.5532401323196249, 0.7051564871403732, 0.031775888730803614, 0.5256188013035926, 0.6474340951478574, 0.5373558789590714, 0.13714001534131304, 0.9999461597012564, 0.7545674518995963, 0.4071213476402833, 0.9821514131471437, 0.7619012877326233, 0.8106598394262263, 0.9979272406273922, 0.6964585112705692, 0.768183408123943, 0.5813731710495215, 0.7186930256322168, 0.6939490557676479, 0.1387120591335621, 0.537550224711139], [0.6445267688097679, 0.8672318584760279, 0.8646549500636769, 0.9447065826977449, 0.4396910422025644, 0.12719443711839973, 0.3889560414140969, 0.7900208639238427, 0.38379717065047336, 0.29470235282675294, 0.9685774236842468, 0.4113824947780007, 0.7256674380240695, 0.20588979190570844, 0.12531341276787156, 0.9888888364126407, 0.22757110893205545, 0.5923649144365112, 0.4049496237147986, 0.02622332756735002, 0.9646759996382085, 0.1381470385373892, 0.44089317261975747, 0.8506643131506442, 0.5214999604550182, 0.8358401369270844, 0.7362415989795644, 0.16888530251638223, 0.6760134441021778, 0.750761387398107, 0.762255679252731, 0.42315044074915453, 0.6039542803412107, 0.6914317856649209, 0.3410657284177464, 0.49439785288254146, 0.31062517287686875, 0.7641897846061854, 0.15882467110189835, 0.25461812138645523, 0.1649740754263762, 0.32906630179382335, 0.8191950654724666, 0.10078421637221235, 0.6725932529649279, 0.43655797085094505, 0.7731848255190357, 0.4266365556786753, 0.7764350436442461, 0.1856309546777276, 0.5756129982360815, 0.6620362929019004, 0.45524765498782394, 0.7659963178584408, 0.7012867386661666, 0.3990619769083322, 0.8227663914526152, 0.34235016534230367, 0.06510863728271021, 0.15439296766472377, 0.784525279227048, 0.9559773120575443, 0.83447702856797, 0.9228418033030726, 0.9316061664358751, 0.03728079226619874, 0.6827174982486444, 0.4871366356377369, 0.11539113871143225, 0.9605588318883541, 0.9211948580523726, 0.19964158936951482, 0.6725241523627675, 0.8891428024156611, 0.5862134792264311, 0.15238451067579106, 0.6667993012848721, 0.2646517026228957, 0.29246873720442257, 0.7652960582905014, 0.7669365352317316, 0.8488436944381353, 0.4143112056576901, 0.41269252932455447, 0.4044873326789723, 0.7367872066776237, 0.533409343040186, 0.8025802768205182, 0.8716147428499752], [0.4943242446049688, 0.48432463154898464, 0.894306037931377, 0.5929400017303887, 0.993488556457265, 0.25412301194639053, 0.5338947403339935, 0.10149158761464816, 0.5465568298420754, 0.36489333949654446, 0.014492587800809975, 0.5184978981072311, 0.9573761178937794, 0.6009984081899306, 0.47586151303144275, 0.6895080533128322, 0.03741734173259437, 0.169449375838306, 0.8780432296688463, 0.7798756734482564, 0.5922621453717599, 0.4149584751201749, 0.28557761486659083, 0.6219498152372738, 0.6814612917668595, 0.9065478083881379, 0.6629710783560083, 0.9702562688615158, 0.7411156572094194, 0.06481642943346688, 0.2429278386374104, 0.810134256627632, 0.883018510472257, 0.9982663002827877, 0.7650746951208215, 0.5717539684562033, 0.45339206137437116, 0.4513006342713908, 0.322638212940788, 0.28205972671018287, 0.47239713995703403, 0.7671413305150901, 0.9698633275181329, 0.08930287769997469, 0.4842708268715852, 0.6234315173124023, 0.8926791195921748, 0.9306764359495514, 0.715071664588506, 0.8392137316419902, 0.03426875567348109, 0.48825703386718855, 0.9182125164109367, 0.2106689914414296, 0.8699989152985291, 0.48764285668468366, 0.31944639691099164, 0.545841659517332, 0.7615997785482863, 0.8644133417482424, 0.8753757956803, 0.2401758478758581, 0.8711982874893084, 0.6680744860936942, 0.36684508535992566, 0.6315585172384744, 0.776232551177921, 0.03771131207438849, 0.5038616060220826, 0.10416047607666301, 0.5331552365726495, 0.7653980279933758, 0.029780132088968125, 0.6390305735052513, 0.21487559545862867, 0.2341656816406642, 0.40237821010610386, 0.03626356900791883, 0.4907588394323359, 0.10231116048239208, 0.5998601052635217, 0.4507828007926462, 0.7032876715524603, 0.4902195477218523, 0.8888403952550855, 0.48862859843840145, 0.6103631374700578, 0.38856856040573506, 0.5787301452046386], [0.1255517109014449, 0.38807620655807773, 0.4792100205969232, 0.4920099112140399, 0.22963690355205768, 0.15722522486588186, 0.6732686865178659, 0.1846418622053051, 0.19831295127875137, 0.666398054304459, 0.12023358531193684, 0.6776015744728352, 0.3072493029007951, 0.26272599818249676, 0.26987190713184805, 0.9351237850616615, 0.9403666911885091, 0.1918576402539568, 0.06165005725905903, 0.459390421915977, 0.9317338085250116, 0.9271636416096445, 0.8518646221630052, 0.6488786673790444, 0.4441428110127338, 0.11787622260255148, 0.8615756628312252, 0.19579015386452048, 0.0901574934037187, 0.4911526179487221, 0.2908841957498327, 0.296969964157506, 0.39553881447686645, 0.07681712611428759, 0.016249680322145466, 0.24230361605910877, 0.003523194689287412, 0.8599036252423059, 0.44985906886188354, 0.4970261616869798, 0.8347263178835761, 0.874352585235325, 0.9326540446460811, 0.7669945664938829, 0.5596114809752317, 0.5909784421036192, 0.7221543367652734, 0.5977027857541861, 0.07395480924420206, 0.293643942164745, 0.9899190054165836, 0.20758287674568754, 0.21646735134589468, 0.493926470822445, 0.45695685253462803, 0.6886927978441875, 0.7907337270558611, 0.36118488809350136, 0.2747325420954888, 0.9682305053679313, 0.2061986641755469, 0.09862249616225882, 0.29447970121525746, 0.1563446222979984, 0.7142444142885579, 0.27901224623904364, 0.3348413404475089, 0.024717533032736938, 0.11517121085110049, 0.8270771931011848, 0.4816199894867438, 0.8279510656350074, 0.31858555678488465, 0.26715290470317865, 0.5101839705194834, 0.03176894180005829, 0.5522684780508881, 0.9277942399032957, 0.13060249098821186, 0.8223309292381051, 0.6235324029595669, 0.6152635728504807, 0.9946889355011076, 0.1457281229719064, 0.24438717315657998, 0.8676150467071082, 0.7053145017225485, 0.3869872686855318, 0.897154769826219]]
bot1_bias_layer_one = [[0.5282374042863404, 0.8007323313652918, 0.6907877265641761, 0.7245762443884515, 0.9843443673819136, 0.6485807543265106, 0.05225336900731414, 0.7383205257600947, 0.44856317241224886, 0.1045379682319707, 0.4406046877449542, 0.7102555123655883, 0.5113748061203466, 0.7980383728641556, 0.7395317014801107, 0.4852792793358126, 0.532919138233343, 0.6144706525422695, 0.2513549201706653, 0.07432586269244412, 0.5396421667617102, 0.3169536751317228, 0.5428484104184691, 0.9688976580762136, 0.7635073206168332, 0.15879638473458735, 0.11226710166385523, 0.9783586343995047, 0.5151033400253183, 0.5308787843709262, 0.45693851611062375, 0.2416143595829653, 0.8723438111695375, 0.33898908394449656, 0.05106482052347239, 0.5167887209236562, 0.9719542083704084, 0.04173490365739163, 0.6783250191205238, 0.4648055056755612], [0.6437198038545422, 0.9917483405613948, 0.9281071623730037, 0.6724020868769381, 0.05226172818274122, 0.9610646556933303, 0.5883123806872438, 0.37723748829314974, 0.9026655940006579, 0.19869106648298018, 0.5224525606903694, 0.3269723346297789, 0.6065718326066825, 0.8664309788120428, 0.4596969520025904, 0.6693091453985626, 0.44706467657131266, 0.042578354912096716, 0.6793630721861424, 0.9508389093533054, 0.16833181611158543, 0.9003269359860947, 0.09473809854534154, 0.7384733052252871, 0.9068056428150388, 0.7653873677385669, 0.530961741180609, 0.3684465885277163, 0.8200391498140044, 0.37327128207942295, 0.9346049514955589, 0.5060598588731101, 0.5858120121551168, 0.94398552598559, 0.4451865301523843, 0.47504351902179176, 0.18015790305053403, 0.4684873184531432, 0.8104417932468928, 0.5364346775097965], [0.52472855349079, 0.9024087499726638, 0.48768699338800214, 0.6194022520988656, 0.0886858567996448, 0.4251991201600297, 0.9676568969098656, 0.6236867925826434, 0.6497055086913761, 0.9470896351789123, 0.580707420788774, 0.11867039941167934, 0.06585504858295244, 0.3386008383780995, 0.8336328993477536, 0.5490554648734383, 0.10219550406059441, 0.3407714324326281, 0.5457743932998534, 0.6030409385129596, 0.8523951575344998, 0.7980544349637834, 0.12283711245320716, 0.2396100195804558, 0.2011669733979633, 0.3776310487760113, 0.20838060076746678, 0.42585579675696617, 0.6532378478211758, 0.10675484361511434, 0.2815539917103992, 0.8346075537823006, 0.5049572820293564, 0.2568064165955368, 0.8276430468717176, 0.7814683755632481, 0.7567069054045219, 0.5779602546719758, 0.8812140586620885, 0.8596189261135361], [0.7576053372348847, 0.6125376117266595, 0.711214814163607, 0.438262380865984, 0.002532049659931923, 0.46699682515498264, 0.7320108935369988, 0.7223678494951178, 0.9385723744004828, 0.7704360638196736, 0.14482429069671143, 0.7085486171015449, 0.5750370011639848, 0.8647881444376616, 0.7685729826622748, 0.46741999196907336, 0.45906943218340124, 0.10391558768455611, 0.3055394992408642, 0.9492448037825001, 0.8605846701607707, 0.7326884430360666, 0.7486569222785744, 0.2627444904294036, 0.2541474295119921, 0.9751838893258497, 0.6493093022436812, 0.6916064980126243, 0.8365902337434984, 0.9439581642244835, 0.18124811522241757, 0.19995624825715086, 0.08114158081115563, 0.7232554675847003, 0.19476399735316652, 0.6809064207223642, 0.3314219102095959, 0.9715475930640679, 0.0940605184279707, 0.6188046043001112], [0.44162688789419013, 0.6998956352998441, 0.03886034505219915, 0.08042530853277341, 0.5408707506513485, 0.8039354835951812, 0.16526429023422962, 0.14891270751651442, 0.7112086276723384, 0.5495776914487421, 0.9228467695461018, 0.726505190685584, 0.12596778171151723, 0.8193009044015871, 0.4476944659951484, 0.015734995207615454, 0.8118308443406469, 0.18888316536655514, 0.11639297036877028, 0.5710320533749121, 0.3950524792648278, 0.714501934591881, 0.5051223069133127, 0.8642394770952276, 0.32464133092718217, 0.41661400446049235, 0.43610062314642173, 0.7710716996006635, 0.884527978627645, 0.5340829211489462, 0.709077171747681, 0.9302925427195408, 0.18178976444676587, 0.0018836523882554967, 0.9232174375276231, 0.5738487349949958, 0.2525981870883497, 0.14273696256940116, 0.4368103839200922, 0.40238189583397943], [0.10979419742424834, 0.05284721682087057, 0.8483677726825901, 0.6959499137322643, 0.07273865149706793, 0.4406796944089445, 0.5579798845228036, 0.5334095793527182, 0.3839110614450588, 0.30772608893522757, 0.4712646179926183, 0.0674866808694915, 0.9751361941588671, 0.3232761761100279, 0.8071647971365754, 0.24686603484159697, 0.01625619206634421, 0.7033952605561047, 0.7334279862389642, 0.47995270868865025, 0.508359413935169, 0.923428883082407, 0.4430556315049017, 0.4721717555910293, 0.6146816191698786, 0.13215916430522012, 0.4964023995385246, 0.8603867936291556, 0.4502701083463472, 0.26807433681778825, 0.6283170187201215, 0.5828260727173091, 0.3244542658112781, 0.8467638288756998, 0.6939280369159224, 0.21158516487071177, 0.7305394182014601, 0.34546288343323883, 0.22898529662142186, 0.4995186946165374], [0.7863750442130348, 0.46288832192932106, 0.8537304142124101, 0.06314868574013988, 0.1265890231498985, 0.9262667962639739, 0.38075087314419864, 0.8900846496736299, 0.23680988145309745, 0.008327542089045181, 0.7926834875107507, 0.9729041429678242, 0.06452539310565608, 0.5725170363511132, 0.4178235693235982, 0.7285572327055083, 0.5590531949941934, 0.9821548780032038, 0.7416867582006693, 0.9538455850546536, 0.38044262337190315, 0.7741033647765257, 0.4721328246804548, 0.9032310636301526, 0.6270670595070585, 0.950869492640897, 0.8263027653951777, 0.3329194493735198, 0.6337304769254406, 0.6759456662452645, 0.04595534402854662, 0.9102832864534441, 0.5857548307211281, 0.8175705058753707, 0.18745098366725443, 0.3517310137524525, 0.7776900680514854, 0.6684817389807713, 0.19233427520676272, 0.0862631251737872], [0.3029998500846066, 0.28935410322744937, 0.6218554486907973, 0.8420387073112087, 0.3505590207331256, 0.17059716888909038, 0.7929155849924996, 0.9301922687399469, 0.20904218564994226, 0.9053271423091368, 0.6559874824815429, 0.06825261778794134, 0.6982263083236689, 0.2444967667513155, 0.5049436444722383, 0.7339695457170737, 0.4982474626344098, 0.9639522828469195, 0.7295931853467219, 0.7492534761642515, 0.5257603259007675, 0.3525551958088887, 0.5796558730253563, 0.6177609808548299, 0.4435892068291156, 0.23588527138492033, 0.7308777534403581, 0.8912550212262936, 0.022121991638857086, 0.437885081588575, 0.0352709012239486, 0.3120209685298869, 0.9981275679919468, 0.014428328242256816, 0.9619488252724584, 0.1093546538599861, 0.6459844100065254, 0.027118754513430265, 0.07749672145525588, 0.10494186154011342], [0.36155509396613605, 0.7890087454782185, 0.5837834202625904, 0.2873696204357541, 0.01366896918030669, 0.8508083024690711, 0.2784936795590105, 0.9915823878507602, 0.13074738597706737, 0.09287053720482552, 0.07886646503368144, 0.7879075929008182, 0.25778460032148975, 0.8930425817728, 0.17727874522524334, 0.8888395867633827, 0.5861103110625878, 0.3729198408913216, 0.7422271081745749, 0.4347682889210617, 0.1989063241235577, 0.10141300611033444, 0.6416262228473784, 0.5971824695812258, 0.8669910911990809, 0.4438532034619552, 0.9775182100303129, 0.6987519060348957, 0.6335108638588863, 0.6335173639601613, 0.316177468115288, 0.8330519838304269, 0.38277838557150556, 0.888467179418893, 0.7364649940682547, 0.7337703880045546, 0.22087647689863776, 0.6671205398428391, 0.031240188370789013, 0.3693172635829167], [0.6080245103627565, 0.43829971692554126, 0.6652537781376434, 0.2541920121088903, 0.10402190152963131, 0.54799408646527, 0.26335677910183064, 0.9977211514021288, 0.9803891733486586, 0.6672690889483182, 0.3579486509803098, 0.8523772918608504, 0.5574217978194949, 0.18355678412309684, 0.11928526227430791, 0.11807880340623966, 0.4681081843045445, 0.663464813852211, 0.06599013486464511, 0.13273089089611323, 0.6124027637943724, 0.27642149450004494, 0.11244713217945279, 0.7633545590364574, 0.7476551733669871, 0.7624934118869393, 0.4575439334050335, 0.5449333841975237, 0.3051569233713072, 0.5724802086284331, 0.15178932301229442, 0.9908985128517098, 0.7614575923560923, 0.7611619968225237, 0.14688852620523685, 0.6960447028120814, 0.9575489842581474, 0.7435570302606918, 0.64255160878343, 0.5743406211691952], [0.4764187029750734, 0.8902797936988391, 0.42532216446139515, 0.27850980697787353, 0.30782112649039706, 0.32354677966530676, 0.36358544796330583, 0.41973788170505333, 0.08007962552492698, 0.42023356776709386, 0.5751497733677049, 0.907121621350938, 0.04188683347397504, 0.8232567319152595, 0.5315234415371232, 0.9412576211741531, 0.6593546086274757, 0.12797962260500506, 0.3628084962043221, 0.8600602667280222, 0.05656713402354441, 0.17786144196159537, 0.15917565808614353, 0.2931384381900478, 0.5712176257770376, 0.17061948594165333, 0.0045293149545670985, 0.45372353647457697, 0.5942497448869575, 0.5508022368338262, 0.717405676941688, 0.553223974562584, 0.551214718595, 0.8290552239101374, 0.8217797841427029, 0.47232307990221345, 0.8713066744437719, 0.5741029635053125, 0.6135659946901764, 0.1601602233765036], [0.5555195122024822, 0.11357151494849604, 0.6622829791786821, 0.527922144132917, 0.3916339412409443, 0.8684470240881991, 0.4354279966432101, 0.9317537327465877, 0.022391398190218403, 0.0847930813884854, 0.9490765810050635, 0.7456401249072926, 0.4892834195804754, 0.1902281369702058, 0.3231248476450297, 0.41250222374461365, 0.35177940068122326, 0.7987941354215241, 0.9642817417507571, 0.4351958176256788, 0.5520971122607368, 0.2662548234259856, 0.8757242147245973, 0.9174896203229823, 0.2479328412424252, 0.32595614020756947, 0.9886582270575998, 0.7114536280313782, 0.9290490999801969, 0.6160931332873637, 0.23223965033374183, 0.7493464976567716, 0.10285473871270889, 0.572432700855567, 0.8979438200123571, 0.3874618873794474, 0.38963995381753525, 0.27810813022614467, 0.2611508075621607, 0.4695642237482581], [0.09180406550313858, 0.9536432174254263, 0.331040669738237, 0.6526941835329422, 0.787370730209742, 0.4829072896362061, 0.3585516391079998, 0.8322727985864191, 0.9889645453372817, 0.15610306564099552, 0.9269410101433467, 0.7115477005925924, 0.7798198948674565, 0.2030614883944566, 0.7335814432599502, 0.9409385022063694, 0.7934233401124346, 0.17892920164157822, 0.7961286406762232, 0.38517112347482796, 0.743322406587928, 0.997000220800002, 0.16975984779004605, 0.44586506009283033, 0.3939817924540088, 0.8600888895880838, 0.13034366830347122, 0.4605835930937182, 0.21301339556803978, 0.12101687181599785, 0.6520233105014817, 0.8524109887793991, 0.581419881968457, 0.9503454548611743, 0.4724778246143172, 0.16748236756985224, 0.27086595647044587, 0.44166024230288015, 0.9100043316802258, 0.0025598283245876763], [0.036558366047447666, 0.951206863987329, 0.9276141267525767, 0.3407273112650998, 0.6402211741430154, 0.9298329099066687, 0.968353438969897, 0.8066551594096047, 0.7355451061363726, 0.18334736029708598, 0.3338819401034293, 0.3818947888756733, 0.3613621726262606, 0.09478204262897583, 0.08099784972759583, 0.12685727576246153, 0.08487369107940923, 0.9213647389791035, 0.6308133056393888, 0.2346759753327755, 0.26122527528271255, 0.3841398501841776, 0.9850088052502715, 0.40725611395547345, 0.8883515724118635, 0.10884958404106093, 0.49480167881260884, 0.2352287770921404, 0.31317729880243816, 0.6143280019507399, 0.3884607030124161, 0.8942290968801521, 0.08553382227640416, 0.07337409101915504, 0.2688612320963977, 0.3607967443802065, 0.7033981798202761, 0.9910104825604094, 0.47967595444395295, 0.07860053489887253], [0.9303694579474419, 0.65743537419524, 0.7573694174157902, 0.7900219771081194, 0.1311417990627205, 0.9017480092548321, 0.5224913881975612, 0.7805039530248696, 0.7037842690897504, 0.30243906629153716, 0.28773577358934355, 0.05515307290967464, 0.9855774357437966, 0.33319096066125775, 0.9973384883110036, 0.216727588241736, 0.9155129310029899, 0.6187685516410545, 0.7318469791973959, 0.01715984711946983, 0.4137628687836644, 0.40308731451070745, 0.9812720014417943, 0.3656736970678067, 0.7214171379352884, 0.4716830000042188, 0.3211026740213274, 0.37168268228411516, 0.24686502570160984, 0.9610048147120761, 0.31841395752072355, 0.7835617777536383, 0.4448211776237857, 0.5714326976983406, 0.30413597113583946, 0.46410791001417906, 0.7923844953662684, 0.39829548448009544, 0.7621499266965927, 0.5895525642943074], [0.5354456543140124, 0.7864646022812039, 0.986074919569088, 0.24366178501603253, 0.2838301619167105, 0.7938178697934669, 0.6063597923135704, 0.5604931570758807, 0.3091556838211519, 0.5331551041213544, 0.9642073999421401, 0.4124303185465632, 6.597819755049805e-05, 0.3846666717051227, 0.7614829078417563, 0.72557274976776, 0.21171693212164844, 0.7240133290820134, 0.1035186020998915, 0.8847814429509909, 0.24589923991797025, 0.8787268424296528, 0.9078422079491352, 0.12363931745585499, 0.42290050261952516, 0.10289176362902974, 0.9855556004300402, 0.6681638983299176, 0.7850906005278752, 0.9348934354519969, 0.6683301507451773, 0.5799549041919367, 0.4147211970428566, 0.4077616817198809, 0.939507173043615, 0.8516548803839927, 0.04822527152475575, 0.25040144120938723, 0.43300441526149325, 0.2718545965539435], [0.2886080571305464, 0.30259788346816285, 0.076927863313757, 0.6306793798933725, 0.3544977491245779, 0.7200545241810984, 0.3322555232634017, 0.5820797134542185, 0.12819724606371896, 0.2085289613857222, 0.9153705147982248, 0.1980206421111591, 0.7167259943349726, 0.9060539891306533, 0.3411130363785718, 0.10889784494761778, 0.5946134531396255, 0.9138561197049507, 0.6277954269229936, 0.48711815767818345, 0.4056593201670996, 0.8687956069662421, 0.5479504856054183, 0.6212018368461979, 0.06397172738870105, 0.04321739724030771, 0.22331199321696749, 0.752262414127651, 0.43178358536656025, 0.5075651362340445, 0.9031734925577821, 0.6441717384100485, 0.4246729178433052, 0.5741317542561614, 0.3759000600915483, 0.2543479237898948, 0.7398516864127815, 0.4319967575012372, 0.39178692880669774, 0.27018338356642746], [0.5914013802315883, 0.6966491903129953, 0.07909452092844493, 0.6429034801984461, 0.9158200498480357, 0.0457436844148964, 0.9535880986111993, 0.4036599920042603, 0.18734118570808422, 0.6052169240025779, 0.28289308248262734, 0.10043434110546012, 0.802539146842573, 0.07840856036303812, 0.04705899829589266, 0.754350070699537, 0.5224955294551503, 0.7139893428925421, 0.7341100101980763, 0.26359559179104186, 0.9680002028940262, 0.9898362748996594, 0.517795116815029, 0.530873926733039, 0.878253113362021, 0.8688823110355398, 0.6579797442071422, 0.3218990980575054, 0.3323887429834148, 0.6403553590148504, 0.8571367940398008, 0.23613465917089926, 0.9174486436898553, 0.9908927409219584, 0.45879222744231984, 0.5196651622602689, 0.903469725173193, 0.49697350058909384, 0.8090351664344424, 0.139899810413314], [0.2846962055427015, 0.12426022521901836, 0.958037733933284, 0.19645877687914148, 0.2500137159327618, 0.7775206440650362, 0.9550576011867677, 0.9753031549903538, 0.9843008005671541, 0.3579081003591803, 0.4952922599338746, 0.5168579182896426, 0.45274437268262446, 0.08947521381042667, 0.04613750388234927, 0.8782912020281504, 0.8190374546262154, 0.4875105014280313, 0.33169840558772967, 0.5317439332225594, 0.5094573843406561, 0.21940706809292365, 0.5128067969500457, 0.17441193212644246, 0.9165330896716449, 0.8067865223983669, 0.004976185692947999, 0.48186896489544206, 0.5446905397383867, 0.7273618398382723, 0.8490724329540034, 0.06281007577452324, 0.4176711873281648, 0.46531258647600493, 0.9536683841064754, 0.5320865965126607, 0.136556634909616, 0.7169702056794217, 0.8671784388553111, 0.39039123458058533], [0.11476735258921233, 0.16288624665118012, 0.07439842486356629, 0.9312333182744784, 0.025043159082211996, 0.6087385989144453, 0.18746019460359142, 0.2337589730196129, 0.6498620955665207, 0.6937234756676556, 0.4201521944936212, 0.7624725157028637, 0.13087320511585354, 0.2958778211440005, 0.35793365089052587, 0.5021550510189444, 0.04689537306515246, 0.45296987606291417, 0.7414119184375603, 0.8985357768030755, 0.9265572575706214, 0.5498323448886893, 0.229855635734454, 0.44862522998434384, 0.6088363070654847, 0.5164757571958161, 0.8747180432725382, 0.4412998428476709, 0.49674006310481267, 0.4201449375139855, 0.32191300817304414, 0.899295582238282, 0.6037374993989044, 0.5962933218180466, 0.03992835379537196, 0.3424514642094869, 0.5881582586793377, 0.5066137184538121, 0.420566137276128, 0.6204102890700302], [0.1717774816612111, 0.26473858207990064, 0.48492922227567203, 0.5221120664912278, 0.3603718065838797, 0.20561780260995555, 0.8825006852534271, 0.622586390910986, 0.15410013541518686, 0.9518884531639028, 0.5186162560662777, 0.25286378413545785, 0.07047597279543438, 0.966860485378446, 0.05402969201071395, 0.5704821671561654, 0.32415336643857806, 0.07344583430575746, 0.98382391416645, 0.4494723972669201, 0.14536968663951078, 0.9789692762169377, 0.45168736487074346, 0.2551290123037706, 0.8338071891369979, 0.19441054300789617, 0.7690854088802564, 0.3483773469451519, 0.2425143385652354, 0.007192724569955122, 0.6083091936227473, 0.32113866483604625, 0.8547169405083923, 0.9235791422469641, 0.48265128318364603, 0.7653980807738866, 0.4750875187846131, 0.531586337703901, 0.7521268909082224, 0.2607437953857553], [0.7520478560248436, 0.312252331671078, 0.557997534302579, 0.34713764955486004, 0.21411598485948347, 0.3282857229317512, 0.058232589975318994, 0.5857369263558264, 0.13761322734933812, 0.23850503763875053, 0.6491275179309179, 0.9143946836453878, 0.371049420591799, 0.04956242794051302, 0.03756142576283039, 0.19119286968911775, 0.6829784746098002, 0.6347720571655239, 0.27569685339371175, 0.2542531569148935, 0.6257528734151947, 0.012152318349204494, 0.9993719361662287, 0.0818473678533419, 0.061531103272058796, 0.899033158083912, 0.6791561506446193, 0.13113033409338137, 0.1661920563209095, 0.77441512401131, 0.7895019057822719, 0.8754692398836217, 0.815893950124527, 0.9890152250482848, 0.4084098012286115, 0.2226868918557593, 0.7544219382392489, 0.9206763667218736, 0.5361125022229081, 0.3862230275327899], [0.9664333575302647, 0.5123902273704258, 0.7900684764904468, 0.800033855557901, 0.49999356632525116, 0.968166288476215, 0.6240184591017016, 0.24172033801322335, 0.7029539248550747, 0.0523082850408374, 0.61411894421687, 0.773414910420878, 0.49797074095556937, 0.4918039247155015, 0.1352050764751267, 0.4158968299116136, 0.47942360661799166, 0.22938830875666394, 0.08145131824753826, 0.027559746466286783, 0.11930130417676721, 0.05745974729272463, 0.137905999691463, 0.3293023317618169, 0.19589697571966713, 0.33158682300629805, 0.25566404826090494, 0.41860740413134667, 0.45093765827491405, 0.6496998154230602, 0.06313804377969079, 0.8797429039361524, 0.36611492573517057, 0.7326092345284815, 0.8736804351434507, 0.22164681334595282, 0.6588868573412098, 0.9513250845403904, 0.171872516558346, 0.35232246589562344], [0.23846783912034097, 0.31289668878103727, 0.7109227249639721, 0.4413695022638833, 0.557869219656795, 0.09359174080895927, 0.8357215559543906, 0.8948289435908282, 0.9110908255495519, 0.9708069583632613, 0.7458860051379627, 0.0018037864133964021, 0.8770997098244465, 0.26176689649040263, 0.8295348541462196, 0.652023922600753, 0.015408423924661685, 0.826836800533934, 0.11948154517583998, 0.5895346638938812, 0.4306862191148738, 0.9716258605407303, 0.4029785008988722, 0.5370424890059847, 0.4020896423681467, 0.3075135619075021, 0.5548955555880424, 0.16078652060660015, 0.27738424637450965, 0.40315295518363414, 0.3894951227919209, 0.24554299747516162, 0.9333168720435372, 0.47067990687720107, 0.7024537209229025, 0.032718660149192225, 0.5729706706828684, 0.0966191442994565, 0.9853468462448844, 0.9422981403373298], [0.22681951660164024, 0.899257064349061, 0.36945067144191834, 0.3599809967991987, 0.5994287422981949, 0.47626655089359327, 0.23449042427639322, 0.23532588557235, 0.8035832642729512, 0.7315227892786735, 0.05686259464413412, 0.35870388410382237, 0.5356546508625858, 0.8561593522502731, 0.5179672915669524, 0.7512737497719101, 0.5272922735118873, 0.009344807741574424, 0.8292447410706214, 0.21955158394112906, 0.05240102877191688, 0.14671759440080023, 0.5041968577242806, 0.301573346379019, 0.028208699628502254, 0.8165421853226893, 0.8859013220406766, 0.04456043864975734, 0.042784838735421715, 0.2913070943948318, 0.19080249283614625, 0.7447629652627382, 0.05790061472251051, 0.8816807061017713, 0.42447437891187567, 0.3084264255015091, 0.5077190380502947, 0.7235180575626023, 0.8419390990488687, 0.4736272967045032], [0.3755987118040701, 0.66461704368007, 0.7770254505871378, 0.9056865086751943, 0.6993533255708103, 0.3493005532367971, 0.7035252106600669, 0.2160927646130456, 0.05606404830518652, 0.3428858958928237, 0.562421109360729, 0.21965738312702332, 0.30140712200990494, 0.15844531757771085, 0.05918852199857072, 0.4486925449387188, 0.22592048999157288, 0.7366910075323855, 0.5737185527521312, 0.23770403147010233, 0.2795070771623991, 0.7413341485903104, 0.775021668923174, 0.6188673858909581, 0.2589389696660095, 0.966634843962226, 0.5557742119511939, 0.06499762647172036, 0.9807822337246135, 0.711612921552711, 0.46017354301203894, 0.8567683385989687, 0.5185814425439282, 0.8689536612314087, 0.20069179175255292, 0.3637828734187334, 0.9817146633198706, 0.8537909496585927, 0.3616953587572328, 0.082581331311947], [0.3276162757821931, 0.8988997903702403, 0.38957251331140696, 0.7855881355356018, 0.009528863902416584, 0.02185332796084516, 0.9278117924557476, 0.25171302195676637, 0.7194104326526312, 0.28805752198030354, 0.2991785034276856, 0.9187860988136197, 0.8848164068170141, 0.22916360993333296, 0.34410968814241893, 0.9182843050747854, 0.08005953188407922, 0.9115983207764008, 0.6307708854292958, 0.8747519894017676, 0.07413030323548075, 0.81547861186985, 0.4817437745677233, 0.11796156970797089, 0.38832198230455794, 0.511320007824598, 0.7643658098517029, 0.4427674284528115, 0.7567280017362101, 0.23943709358790277, 0.5060911513316845, 0.9950357229848774, 0.13411288048136738, 0.3790139610939026, 0.9608477331140743, 0.1400489002660067, 0.5779774394417428, 0.21675595226670397, 0.9177115321128427, 0.19215939539691174], [0.7214191166388125, 0.32624555571369807, 0.48718053291358865, 0.1192852555337981, 0.368322386097127, 0.3698720746048365, 0.9772381302662888, 0.5685286317768721, 0.5219300129883295, 0.1599262917282288, 0.2760643308850298, 0.11679980417596347, 0.797398970551561, 0.007963206844745607, 0.2574767880725808, 0.20443195265753256, 0.9833616236220033, 0.5145576315349922, 0.043953560466303054, 0.23447722206211608, 0.6961966169439321, 0.6860177441330073, 0.2773153300311213, 0.7353530454694565, 0.08196548715625596, 0.2870045467358201, 0.884845076329907, 0.18897951546562253, 0.07698167440070869, 0.014235458277937485, 0.7578213640318767, 0.5124120129427492, 0.8453804291970074, 0.22423284163830637, 0.6429172510199457, 0.52951200561552, 0.2465641488902004, 0.6315677302987114, 0.977078390714113, 0.5942344352020806], [0.24172637811844888, 0.2971198366594141, 0.200651829863974, 0.3578813996454957, 0.9433322658786207, 0.5297006465577169, 0.09743859154822909, 0.5126912904860422, 0.05731539979502365, 0.405458882731057, 0.45964544480763725, 0.9665306219673531, 0.14714513531056583, 0.8251134408199273, 0.41677689625386505, 0.5351812115895918, 0.33383121662055937, 0.1993387756573366, 0.4270954202283761, 0.4340962966385311, 0.9695886606493639, 0.13498984858663843, 0.9819603543040618, 0.6223774736821508, 0.08737059135924541, 0.6147209842014804, 0.6720066661491462, 0.8641768343268659, 0.18723729595755834, 0.6470069536539051, 0.40177828033778595, 0.7401416628192257, 0.5271107447016355, 0.0755363353150712, 0.1484019885619563, 0.7035475214713459, 0.4332391789290432, 0.41647107711993736, 0.8369694462258492, 0.6694648529036997], [0.9949963398759567, 0.526264605802731, 0.638205861591911, 0.7772492828572212, 0.19963097848751576, 0.13358073331704357, 0.2754203702208603, 0.8769979732183413, 0.18113264790809347, 0.48198726846262196, 0.018347739117808848, 0.8964030245872391, 0.807719520872237, 0.8064335822845045, 0.6780468104811597, 0.46662722184802763, 0.3455400698350152, 0.03989269647596194, 0.918802834448473, 0.5039305254428137, 0.2444785184561049, 0.5008581887256347, 0.697091228823128, 0.6073491482101635, 0.6360928584324486, 0.8993022517913076, 0.028596726828495678, 0.21087216985749913, 0.5631203056361146, 0.1118239349713015, 0.46332782729130717, 0.17596194000510157, 0.6801457545188768, 0.757189289254151, 0.16556053860149744, 0.4123162769842771, 0.11372413038359053, 0.04673501857469231, 0.41911661517150167, 0.1334776199627361], [0.6092513586494025, 0.15725496181233856, 0.12590405324393983, 0.8275978169453394, 0.12723618801915448, 0.2443186709013282, 0.8011111833507533, 0.44101893082522714, 0.20496208047338627, 0.5624568412615738, 0.03974601131234945, 0.8679611356389516, 0.12326755414754587, 0.2705375230886987, 0.2606909973374183, 0.32934953014874624, 0.9222457235717407, 0.22523593534970454, 0.8590681808150307, 0.052832857299696556, 0.8166277528992428, 0.44683894316579487, 0.14956445644838456, 0.9783668889554349, 0.6169311092327765, 0.30214466797503314, 0.8175548079439096, 0.8433094405396716, 0.4596458568805649, 0.5458012341791739, 0.17159902830542473, 0.4415966187108019, 0.2772388553321268, 0.6619085527181116, 0.3945388842400118, 0.1455108223300403, 0.2674387810023967, 0.7037717079350307, 0.9889624965974706, 0.5167371634724124], [0.6774713845899429, 0.836896279265669, 0.24332278759118375, 0.5137791515230906, 0.6331956023382421, 0.9103038026834508, 0.6645765228981031, 0.3240858757045769, 0.9885647102469566, 0.3360352203028767, 0.051678916830688815, 0.42648907660681434, 0.8370922622003686, 0.756105319186261, 0.5945134531650385, 0.3393560699340892, 0.1959632741186872, 0.24468647112005637, 0.6327840151303724, 0.22668913321695272, 0.7801918749855855, 0.37316243160516605, 0.5077829430848748, 0.4687132144890598, 0.07351193586319393, 0.6897812060434317, 0.04722587514665311, 0.3568764548993437, 0.5758836032246245, 0.646762587734918, 0.27235341246362943, 0.5138033800079471, 0.9154328465635224, 0.2436478715901218, 0.14193769206520113, 0.44963018615547123, 0.6803434665689992, 0.6407284856514383, 0.6318764300786878, 0.5896609348575889], [0.17190718544188544, 0.8200454611905432, 0.1993937280347129, 0.8821580322727778, 0.8997395496809604, 0.3938076328356347, 0.003614089067500492, 0.6354634233416467, 0.17450617850385952, 0.13396283326084135, 0.9689312101837568, 0.3444336256365036, 0.1686822657944721, 0.17549665563102268, 0.7113706987241372, 0.6571131805404757, 0.9871503649929292, 0.18664123660606968, 0.885213629884068, 0.7886413531972399, 0.06121842284399315, 0.14300558258300788, 0.008752543428108939, 0.5156928636280925, 0.9537719058957079, 0.2617530691594806, 0.8130665801129765, 0.038314662122827525, 0.46740508971376526, 0.9316862588492979, 0.8415856875281552, 0.9993831936512184, 0.8781826620536864, 0.4775981225325241, 0.7135597088164792, 0.6687118221542102, 0.5049557053677877, 0.9631236299654812, 0.40293483636555827, 0.6761874554356204], [0.6467098319655639, 0.7032693710996192, 0.3626720460037317, 0.21484914163563051, 0.9184407924141559, 0.04655203444525513, 0.40474601616681893, 0.08361713168467322, 0.32100330232098473, 0.053794286601089536, 0.9336608279095288, 0.7490547445758277, 0.48619431918097455, 0.11488497431468248, 0.32718206450621945, 0.716903030856084, 0.13270395093268272, 0.23241621473798268, 0.06524351349798829, 0.5253699395755614, 0.5853115694068752, 0.48020890470975275, 0.4238352423880869, 0.5397353448255269, 0.6971755227475235, 0.7339655833669806, 0.8290657543717893, 0.4486886263549539, 0.10839516181327946, 0.06801368741633884, 0.08291877452300678, 0.24865989370148045, 0.2556938262187817, 0.10578296375965801, 0.3549477146134723, 0.5240823917031383, 0.8376458932619352, 0.3728757477169974, 0.38220238937975326, 0.06141731767602432], [0.9832108722362318, 0.3779293910941709, 0.6804952458388146, 0.22987586644208402, 0.7561438754243436, 0.5932177308952423, 0.9047003041419597, 0.24551344102110506, 0.554994851412291, 0.6190356695362655, 0.598911337181588, 0.018779164142332272, 0.1618921967973358, 0.3791512543341613, 0.355759289370573, 0.37896057076122547, 0.1127444287809719, 0.9522948036052805, 0.28438664547490855, 0.21441035011263698, 0.5114081424534971, 0.16545962073676623, 0.8738162897276447, 0.30582733314629884, 0.9658758260763181, 0.1762622383329694, 0.46294028288763844, 0.16626039549465232, 0.4211349676411442, 0.500051149073675, 0.6066239970392665, 0.3291447280262204, 0.8920203992973339, 0.551870312045204, 0.30870701448300486, 0.9834734806861527, 0.26894806614222244, 0.11859975216670493, 0.5284550820741946, 0.6748735043198242], [0.6450377201188152, 0.43053091965050816, 0.1783586589988927, 0.572208374170269, 0.6873689611862636, 0.5734817589756572, 0.04753144630176187, 0.7213787328550061, 0.5075439384079886, 0.9949468929464709, 0.17917568889717195, 0.754177489933067, 0.5027232407266575, 0.25953137631224177, 0.5964403010970668, 0.8007994025985303, 0.011799513308295317, 0.052912302080494134, 0.6809640196248827, 0.09691295868510108, 0.8017324667233471, 0.4349730933411128, 0.006911115725534711, 0.962759978209515, 0.7596278045615403, 0.9398228983488089, 0.027011814239984333, 0.0771530920049095, 0.08194366748763282, 0.9352315011098186, 0.8932821877495932, 0.8986656492600367, 0.7083726407081292, 0.2389968715686901, 0.5378362083427726, 0.33320187842727345, 0.40192317526152255, 0.17441673468465857, 0.740129287739041, 0.7901442537455176], [0.326738205170362, 0.756767749791562, 0.5971516499831208, 0.30144150927132773, 0.6989608712244655, 0.9467264470886341, 0.2488718174918133, 0.7391040650197364, 0.15237075338203498, 0.12335143473812482, 0.43200558236773445, 0.6733909976606801, 0.7491889353791865, 0.6997029267001967, 0.8834734516946482, 0.1761433852731069, 0.8798777157910298, 0.4759319615950359, 0.8397700343014783, 0.4625806286716255, 0.16990842485037427, 0.08750558017552823, 0.4671984565853913, 0.8582779384199715, 0.8365578386383689, 0.8143775726467016, 0.8544966498608376, 0.793507692369757, 0.2038359429843275, 0.15037688051220288, 0.11188175119932275, 0.7529853531833388, 0.2140638554980525, 0.4754210559078519, 0.4843798203268166, 0.9280878710519552, 0.39730113768041786, 0.4406359868480413, 0.11810038112617716, 0.09797530086865547], [0.42556042866446486, 0.16295823727634107, 0.06500778162778476, 0.7349568914232298, 0.8398850589172584, 0.7122572793373432, 0.8739470440463255, 0.854048167301086, 0.5082312937552903, 0.0988943628886697, 0.17447857432369196, 0.5925573539619443, 0.8176331325049689, 0.7886222959732644, 0.9011212677325275, 0.8670420145782344, 0.7309403995800507, 0.01886803046228891, 0.13003163925578032, 0.37761202149015605, 0.4668333006075892, 0.4728837915826314, 0.2623931245891815, 0.8924176472313725, 0.07417071919518936, 0.1480276689267298, 0.030231902806799993, 0.38169501360464175, 0.6130840668969509, 0.908970623539551, 0.5979567214343731, 0.054960560490365906, 0.9841408022496942, 0.5503587798406868, 0.884039783905665, 0.47096115652367887, 0.21919154027116738, 0.8885688280474321, 0.7685753079343106, 0.05446351657257387], [0.040387576356510135, 0.7088319397054356, 0.5546803196014922, 0.7259687271460956, 0.145798537456581, 0.8663027253397662, 0.7060734969393972, 0.7969049341528956, 0.08740561967412064, 0.8970452770304629, 0.07199266846390195, 0.8287134808850785, 0.9172819906766946, 0.24221141593830775, 0.8977853779219266, 0.8245526701232444, 0.9422293414335923, 0.49770387797453475, 0.9268496521362725, 0.730233268190579, 0.002832310611083466, 0.038864116182108166, 0.7439010463081545, 0.6517251724150827, 0.8971633950577387, 0.5870857916999253, 0.9970510910386452, 0.14841021616715167, 0.4420806738733257, 0.7955286522568907, 0.8215336036945504, 0.3027349450210822, 0.0006501426374789787, 0.4293479133740381, 0.7692358030405718, 0.5388509437467256, 0.6422792584520928, 0.8092022551254392, 0.5609122911438457, 0.22962585968656413], [0.9094301989801878, 0.6575456138981004, 0.16621313574782914, 0.5244120109615658, 0.2466152489447384, 0.7759345488290827, 0.9567060923852674, 0.752666572512363, 0.22254428498944245, 0.5891802990129962, 0.9576975179279983, 0.04661219141758777, 0.3894482628512198, 0.1271024118432016, 0.07844469656176634, 0.4235581749007732, 0.2510009963894956, 0.125801432681511, 0.37445668181383196, 0.4136430995565231, 0.9818039595145034, 0.5032619116331586, 0.4886268541569613, 0.4899593262299302, 0.4729100916932426, 0.8489041773026731, 0.589274481222488, 0.46055284632374305, 0.4239938032848132, 0.9972725461111954, 0.18246524288079313, 0.7575566100897623, 0.36305758358030926, 0.17897471369948026, 0.23505159968216105, 0.031007448035939134, 0.6249636786788976, 0.8268153833927993, 0.8653406398342298, 0.20695297511958155]]
bot1_wieght_layer_two = [[0.6665196860661599, 0.8481771583763376, 0.07726852187332567, 0.4076612936474281, 0.6801241739839177, 0.4324281764916259, 0.7920573029749063, 0.6695824126739598, 0.72764202717719, 0.4368907605055562, 0.41199851138955057, 0.11754338749703352, 0.7738687592679276, 0.609948012752974, 0.03513613880809463, 0.17718900138840188, 0.15461800832273598, 0.47335210240169945, 0.5451749096558407, 0.8571399278899893, 0.44234065019440916, 0.5034124018610292, 0.6485375506365091, 0.29807522225215677, 0.6185066351700109, 0.4399443001408194, 0.6524525398896217, 0.05908370670791474, 0.838627440395335, 0.44389665587170635, 0.19585031506596629, 0.5798226877447776, 0.09987698920293919, 0.83762487110238, 0.03580907507283504, 0.6626698671401646, 0.8227294257347237, 0.6476394607448163, 0.1842460082505356, 0.283328775331815], [0.40474277047501694, 0.16076412725654188, 0.7544121673074636, 0.6326962892406167, 0.042119598518534196, 0.3857272114276967, 0.07155701631767009, 0.26859468502899253, 0.5618450092167772, 0.3150077028332705, 0.5505491333727801, 0.5525090345223052, 0.15486593588460018, 0.7187076375507572, 0.578286305979075, 0.039136238696212744, 0.37214214832366765, 0.9104394173049062, 0.21272251730263536, 0.6850966406946472, 0.1727992844699897, 0.7264144467310562, 0.6248258758405187, 0.5190696285679706, 0.7978152687257978, 0.2085750271609954, 0.2685009900743477, 0.6207406914304479, 0.7982580008166668, 0.7376779368426966, 0.12124910277652978, 0.3581777100684088, 0.2950345840466353, 0.5883659490676034, 0.7999840802144952, 0.6600945516982931, 0.9779803784894753, 0.28867112267931105, 0.7233348134283624, 0.9516280205956392], [0.8788429575256413, 0.6240909157340729, 0.257633661887153, 0.27280193755175974, 0.2039022146429348, 0.31783074347048634, 0.7779101424887137, 0.3612162628590171, 0.7454135013554919, 0.17651720039512242, 0.8686225519736198, 0.5901063553605768, 0.5285329921421419, 0.02100423354493497, 0.734047385167553, 0.3134283435734887, 0.6379264939876061, 0.6377947255249657, 0.020085114466928844, 0.2619126215910974, 0.33949872266376435, 0.9727486460033935, 0.912485107076961, 0.0023396680349867527, 0.8688175837431675, 0.8152045658724784, 0.9975323840260591, 0.9135289122196727, 0.9036528227658676, 0.15803776373710088, 0.6283100805726034, 0.6488323197518102, 0.14497917405561056, 0.85374944567469, 0.27545303859866643, 0.48470972071058305, 0.8883695941370073, 0.8523079985026628, 0.742611149255975, 0.22363803423337725], [0.5785837830860099, 0.7432914907370645, 0.13018676467746992, 0.5223142443725408, 0.7195189279531476, 0.772640792421348, 0.14327621964512316, 0.6878829043185156, 0.055148280727183474, 0.8676040054543029, 0.48642135136869813, 0.30302851629800986, 0.9228633066490742, 0.667418229322695, 0.4777650552484912, 0.31537473096370805, 0.7700808697761502, 0.7960825672157771, 0.07249937731173295, 0.29899721239280774, 0.22179935581659127, 0.22273872676775142, 0.8764042515281045, 0.4366391448529726, 0.5478426436326207, 0.8314815849605053, 0.7549992548812183, 0.10936866387806565, 0.00910480845136652, 0.8084386256361511, 0.8166844640961154, 0.7313462564948571, 0.9959804810391605, 0.379523919185773, 0.6995967653492718, 0.8556104883245215, 0.9650033347051147, 0.18733000156715507, 0.4266888620654947, 0.07133812296022024], [0.7875953823075772, 0.048326692977263, 0.6878467941077652, 0.7531952401170053, 0.1558136040327478, 0.24307431692944004, 0.36153377164447553, 0.5487397481159532, 0.2755151330503123, 0.9266893099869177, 0.14615611701269082, 0.3560843408398615, 0.436443462902138, 0.7102764507205671, 0.18129364036624473, 0.38322340811115996, 0.15569544999933282, 0.15621497631267722, 0.55678174104075, 0.3401026392668376, 0.679928790269094, 0.08653086603130078, 0.6006734337150899, 0.9215754829197332, 0.3043813432254693, 0.5622410331187045, 0.09614694997099149, 0.4764624730311171, 0.7345611971372603, 0.5108499127618724, 0.654746711987487, 0.5557444311516856, 0.6852308206138262, 0.6543865122015662, 0.629658940606578, 0.044031977277485757, 0.7088084836606233, 0.06107386886067778, 0.04794948328013904, 0.0012119198186545388], [0.9873189624796332, 0.27669438975668836, 0.2966661605787152, 0.4139209966023878, 0.7497354718500084, 0.7542696882524106, 0.00047323287009148896, 0.28730378667067424, 0.7002811162039493, 0.8911910805889037, 0.7721344980447392, 0.47105119592884437, 0.373075838742169, 0.6032608233856785, 0.2139192273308207, 0.9319543355860133, 0.7269956643405344, 0.4034038337286081, 0.2585252420078713, 0.30834958635077747, 0.7334934229247756, 0.3310362628624629, 0.3757338129837905, 0.5376537254283258, 0.10018251675931056, 0.5596408768846562, 0.5148348651496074, 0.21777504252094781, 0.7054121319095489, 0.5984424196600101, 0.7603507020760363, 0.6434851532447466, 0.7793360816630102, 0.6791377750819247, 0.8874939483155643, 0.020297431321990134, 0.7877588152594723, 0.6825344779265455, 0.441631266772038, 0.7799358378043548], [0.14948070809461733, 0.6977752887489436, 0.5634986541181175, 0.38736488579116424, 0.1796681809180415, 0.18478666703628643, 0.9620236762440904, 0.4964269350799757, 0.6930587049586162, 0.708399807879856, 0.5134398465585625, 0.21393537446142608, 0.2602216489930229, 0.6837769252814112, 0.48595998832884835, 0.7237548539290024, 0.5536057526377521, 0.9142678952472156, 0.6407298133232981, 0.584126792744114, 0.4820710811205783, 0.3504942970905538, 0.6883168343596142, 0.8462933225924858, 0.4180247400964584, 0.5665180278641676, 0.8897732971718966, 0.8364818856148337, 0.7265938868603569, 0.5112350504417468, 0.03991181239209585, 0.072054980230297, 0.29923288318823416, 0.26160244227878526, 0.7902954979262191, 0.6789474159144181, 0.05402719615844953, 0.01288405023914263, 0.9858435071632456, 0.49550313163016246], [0.6814128052540557, 0.6857591462474116, 0.17342028359449235, 0.05198456664141582, 0.09253968414262181, 0.6361262726691442, 0.6310776794858192, 0.8264686540690918, 0.15536853521783067, 0.11365547163341394, 0.8741173383962068, 0.6431090470198938, 0.34886604214094474, 0.5841128943565191, 0.1306826318025598, 0.4755713452380752, 0.8934737037194166, 0.14880757216831608, 0.34448841790338536, 0.5426574181929463, 0.45282331001343046, 0.34496344066027285, 0.8355456308073075, 0.6467171865039304, 0.9828190934106459, 0.25020939133138687, 0.17359383174806498, 0.6414283048549022, 0.47943336037935724, 0.7910623150001057, 0.0836370290846139, 0.6806298932145972, 0.6162814930918981, 0.04744051039144781, 0.8151539617310978, 0.3762036323742327, 0.7318338145244138, 0.19441096162641314, 0.9256087655217963, 0.7843727099817441]]
bot1_bias_layer_two = [0.9406758857641467, 0.2126300180227927, 0.331421320987095, 0.6544606649999443, 0.2590151001820765, 0.08833035527361466, 0.4011952057788569, 0.44027479425504645, 0.42029806024477445, 0.5533297661090261, 0.3002221256295219, 0.7862574899592699, 0.3823932166902484, 0.06760529143192306, 0.8904817529085136, 0.2574363071108112, 0.9442652930673417, 0.8638464662536666, 0.9976792804834141, 0.08161112639543766, 0.8274457390637798, 0.06122431173779852, 0.30150861649483907, 0.9149791640899687, 0.6020251233163026, 0.39163356768437085, 0.3071120702029102, 0.9926591632450795, 0.308554239450762, 0.05802603153354935, 0.8493015772384627, 0.9817798648175765, 0.8871207805059099, 0.5548975481126734, 0.3695821803629423, 0.11344073506325347, 0.6326004241760085, 0.18922738053612775, 0.8335478543097846, 0.873969649479351]
bot1_wieght_layer_three = [0.7706324920831208, 0.4063910281084029, 0.2674792952177699, 0.43250967613182023, 0.612819122412578, 0.5903832494962349, 0.32915418215488546, 0.7434764512130551, 0.3377554418516807, 0.04299585439686038, 0.7203935879359235, 0.10166762979556576, 0.32301210307652384, 0.1252640719699869, 0.7500335966851666, 0.7566998032956905, 0.7678225469600396, 0.10952170159380425, 0.9805573962843176, 0.5779722827213246, 0.5908026476984574, 0.8924849290572959, 0.17075043196157114, 0.12926979033332275, 0.9819466259288311, 0.32978141701528274, 0.9651996134918539, 0.8438254105458438, 0.5511668691700664, 0.08296071500756907, 0.31100584604157344, 0.7878835121381841, 0.8410458785821329, 0.8566297235828838, 0.5073891786969, 0.7462087871999677, 0.8550172205512508, 0.15640742681071018, 0.19677970287277002, 0.5522731191600392]
bot1_bias_layer_three = [0.6469845616746536, 0.8286284260749673, 0.6801201252488618, 0.17433357165597319, 0.18834517979902088, 0.7638133663899956, 0.19825026476233243, 0.5542303268791007]
bot1_fitness = 61.10234434690874
bot1_num = 1
| bot1_wieght_layer_one = [[0.9236090789486788, 0.9210637151227483, 0.16119690767556938, 0.8891669007445379, 0.7530696859511529, 0.9684743676682231, 0.9140001906787625, 0.5462343790375778, 0.4625067913831683, 0.10294585839313619, 0.4659734634943964, 0.673851063496881, 0.4119975257359164, 0.4119836779033137, 0.7865910876180061, 0.1746772681586115, 0.14820492751578285, 0.17880158440303084, 0.638384333104671, 0.43867886886921015, 0.6326278950050328, 0.2038501568125496, 0.7776665581230366, 0.771139612953913, 0.43664378114255786, 0.6845899209090841, 0.5932741356128547, 0.11859280518324489, 0.8426718127223154, 0.4257864591630002, 0.21919389456471672, 0.1541410719278874, 0.2446740228834895, 0.9096981936870991, 0.1051376200906824, 0.123215850106273, 0.6207186782859335, 0.12151357138851293, 0.245688625096243, 0.5091516271356124, 0.28696783191231534, 0.5667720957901029, 0.10179946375444471, 0.07698229364715592, 0.1401060329173568, 0.5605864629155267, 0.5008708650129818, 0.472155979148543, 0.5114298750374805, 0.9177025359111187, 0.61180000017252, 0.9252156543730644, 0.2808056118845378, 0.6182738570732967, 0.5059140465417934, 0.5112371150715369, 0.27569977707132176, 0.02903301704146266, 0.17203745230481327, 0.9580314724608192, 0.6390629826262436, 0.8543772996780469, 0.22765734772859614, 0.9295293185057587, 0.8547086226616534, 0.9140367615756183, 0.5656403835945063, 0.7666637822837286, 0.9299245560369479, 0.8137362078324749, 0.3851752602753137, 0.8004765184387966, 0.0971362374612369, 0.13655452483402186, 0.681154264654838, 0.8355206616694442, 0.43933750924147164, 0.71607525665252, 0.8953318177972461, 0.022026267303617897, 0.5379372446996521, 0.6862725587397568, 0.27276362350445715, 0.49012588773556165, 0.5696505291988504, 0.21259703281855824, 0.1867281303140862, 0.42325083070354375, 0.631788358712714], [0.7009723489355959, 0.7755630380298649, 0.8214056821060041, 0.4461526836763151, 0.481755469593232, 0.5764701181036724, 0.7738443613698299, 0.21967191669080766, 0.19282038280162728, 0.39385789086602196, 0.5820753136137473, 0.01721939343217893, 0.480717572857995, 0.8080397884821071, 0.14979914461915833, 0.05020212300797988, 0.4793960860291525, 0.4111506744658292, 0.11930327529571894, 0.17955502154369407, 0.012925435392506346, 0.6586587616764189, 0.3350099047088869, 0.850937080408252, 0.3718678907068308, 0.11527601403252008, 0.3820497255478599, 0.8384920848109105, 0.23044526475037008, 0.9605022019079362, 0.09805750577785943, 0.6388010648085247, 0.811493593498141, 0.7564250423670958, 0.5065952240509837, 0.3192868220605316, 0.9018435753300349, 0.7925964122857911, 0.5901342628725957, 0.24032639017044632, 0.7550949068239841, 0.2236507475146402, 0.4581717506132187, 0.6432281715775092, 0.988379547788904, 0.9966056280412324, 0.1503852003097801, 0.976042458489067, 0.5836833913400898, 0.021680494802164274, 0.14334321299342823, 0.40345057671485207, 0.07690051341546122, 0.2883238996638102, 0.06247477125530687, 0.8831434714740543, 0.7992503785963946, 0.5508405994824376, 0.871669234416104, 0.026718434754273712, 0.7491959845828274, 0.20519507295138506, 0.09890971057888864, 0.05864231885284432, 0.5321323261102776, 0.026852658151600095, 0.20141662483981437, 0.760045443955652, 0.9841625274763108, 0.19685565520746218, 0.7800021932695238, 0.17249359025903865, 0.8266218686663086, 0.6559503710562061, 0.31724873992729585, 0.5043915547250579, 0.4771462768633111, 0.5324992962774662, 0.3998427431059661, 0.851042824534796, 0.29401048321424783, 0.4544698337810461, 0.5402161422297389, 0.40766838762361923, 0.8214367316258696, 0.8966562700769893, 0.335538655169051, 0.9086239832954099, 0.2969905257097156], [0.3231913811466237, 0.49455018068676915, 0.020115280341378883, 0.939309926845729, 0.809256214386146, 0.16188418048501263, 0.6947821096278696, 0.269503928890676, 0.694710666019383, 0.34130801490673524, 0.5605916497543431, 0.27172737204972475, 0.7945312677357029, 0.16491875540350354, 0.9869336720174897, 0.30965640739924993, 0.5258455430674109, 0.12750669144383564, 0.8654638043494218, 0.07456877485695645, 0.26519813578704565, 0.08240250870985188, 0.13791901503822068, 0.9262629830390752, 0.7807683018349625, 0.2866134465024618, 0.7275912230185161, 0.39633527385313094, 0.8269415815154668, 0.9252629059344307, 0.20584727649599321, 0.2732115250597331, 0.4394403529369988, 0.015555325729710745, 0.8428575769078923, 0.967126028942085, 0.4993172354888792, 0.24312585575789936, 0.6434459615728989, 0.02335972742555248, 0.6634083210927555, 0.2481544257857462, 0.3519494142105719, 0.17254804445942729, 0.4982478238034753, 0.6416114376911248, 0.7150972406764894, 0.7418676207303256, 0.42560719662783, 0.0489875647100404, 0.416476821220803, 0.15542676930763677, 0.4239585382833506, 0.21758594620000116, 0.07632062853561095, 0.9875086818905897, 0.020919543554601128, 0.675259594105383, 0.6763139304631209, 0.6674743448679705, 0.49126602590641266, 0.8975328658686905, 0.01608796536761481, 0.5519324254188372, 0.354836670790713, 0.96472998395987, 0.12715716485339834, 0.7054852504728606, 0.17895273751474383, 0.7009933372268667, 0.6954841942212401, 0.3854323324969532, 0.548654084166919, 0.32283834532831657, 0.8343092899904988, 0.38009103184225546, 0.1099413834459616, 0.8094901612213391, 0.07202157549284327, 0.2045928210556428, 0.2902079036708729, 0.46961317160129923, 0.1758368359583009, 0.3582640422327067, 0.016889696224707373, 0.1236770272039085, 0.9694625313575694, 0.8103352600561743, 0.9687763599315438], [0.4070390588651397, 0.8617588449266992, 0.08591633335314042, 0.6191989471056557, 0.3753693585165173, 0.2149345558169109, 0.7780221191994218, 0.5408325834037762, 0.020440943891304686, 0.6329782367456378, 0.6537990030532523, 0.22364638436066686, 0.07578526627260385, 0.6379292872123573, 0.9042035248510895, 0.2690482512676077, 0.6861732406804237, 0.8334933093228785, 0.3370981202351897, 0.8741826040155269, 0.29511483082457846, 0.5571312208957903, 0.3061482289248987, 0.8244277316654556, 0.2422727844397241, 0.5436010174651802, 0.37895447534567184, 0.010113688337024973, 0.9783768939285751, 0.9233279297354652, 0.5692680422198491, 0.19315369363505774, 0.6992947651255726, 0.5545602213934571, 0.1174521520800843, 0.0369244735892984, 0.8252874024755956, 0.21259160020927514, 0.7858656584310622, 0.9007851853044347, 0.2370301885058812, 0.45686879546211323, 0.11571461463718813, 0.3896826966165772, 0.4981331064743928, 0.5866411796597666, 0.6830030429417404, 0.7071669815943974, 0.8807237758828365, 0.554005183344843, 0.9636013114933643, 0.19402805842940196, 0.3978216837432135, 0.5129440332588614, 0.166553254085275, 0.5352123850156179, 0.4027616229168385, 0.005098195056520649, 0.3386189590714881, 0.7765541310547399, 0.9039211291176523, 0.04559183233801234, 0.1622843722688485, 0.03019770752386708, 0.26622001294465547, 0.43614772311783734, 0.34739222887697985, 0.9697566624307592, 0.9609419715427007, 0.7074015056633886, 0.5868196682545251, 0.7982268307295808, 0.886232311967204, 0.9518031066954507, 0.6872598812061947, 0.3526484212314378, 0.9516021862352316, 0.9640485831196367, 0.8107766071127982, 0.04525336974900995, 0.7679067193270388, 0.5662505182473457, 0.2968769818345395, 0.15202276157422823, 0.8970256324617895, 0.8271611993099104, 0.0549443663293846, 0.3623385912038649, 0.11261669206443203], [0.2797643283795904, 0.08401213798968554, 0.09171795115463965, 0.3215252061839202, 0.25810270717858663, 0.5022332226688793, 0.3117092081164258, 0.696184432075916, 0.6623992613862014, 0.8947306875377811, 0.660183510866882, 0.4389112026419373, 0.8729973077348417, 0.3593172359101109, 0.9383081704486153, 0.6814907986713262, 0.12042377644299584, 0.5196326588387824, 0.7590149173622956, 0.8227967012186834, 0.39276246517039604, 0.5893744092449043, 0.09967888604125141, 0.47180914793055106, 0.4536650098230439, 0.09236992993531501, 0.8119871643278841, 0.09946082622993269, 0.6002239914572185, 0.4889899727332142, 0.3924243726512765, 0.8642185928678245, 0.6964674340764225, 0.27204251902914445, 0.36115859166360675, 0.6173441115538776, 0.5331102719543005, 0.38184811564067744, 0.7715154543314913, 0.8996642127295942, 0.9056673110933559, 0.8510314318000046, 0.7336560542901602, 0.8912677463693386, 0.6901616315208431, 0.32561570881580604, 0.7959076593250595, 0.24942235414705494, 0.6573791527737103, 0.9201963876362174, 0.8323067850929537, 0.7279998615643604, 0.3826805993365904, 0.045676098733975934, 0.043303519044695093, 0.8440710947384173, 0.7409523987878059, 0.8000858292713338, 0.6359813072962217, 0.9061052798260985, 0.940592213468678, 0.43695012925590615, 0.3915399189988765, 0.1910117813884753, 0.8683547419579423, 0.12282755413615187, 0.11953629066114091, 0.9754448453980374, 0.7260252387777577, 0.32434725828955424, 0.9145141543079923, 0.40110248557419836, 0.34769566352601045, 0.0838353264410443, 0.9479912750604463, 0.5884767174600394, 0.6814848125020173, 0.030688358936346583, 0.35050139205693864, 0.02167886951952913, 0.6921972330226244, 0.6911967281899353, 0.6975261388316664, 0.10058100263896674, 0.3193344433949835, 0.1785130300493687, 0.2602831588019199, 0.5361167553489439, 0.022185465522298387], [0.10788444578454681, 0.702287504733945, 0.8378486373091145, 0.1764792111165694, 0.4446810930412909, 0.8418815765556584, 0.5223500638044959, 0.3366394179912534, 0.0879099654588299, 0.05731420403755483, 0.6184259060592221, 0.31176334067697586, 0.06799554084782677, 0.1207736456142624, 0.6831410900168667, 0.5396729636996535, 0.21590341847030348, 0.9767765952640611, 0.7318562628813758, 0.6344655185467192, 0.2632381920252692, 0.27982389315699674, 0.9006828529879133, 0.3140457975275168, 0.08608901192416896, 0.7354710972364773, 0.3082953317686338, 0.6946255118648296, 0.5284811516940894, 0.8081220676202092, 0.40274126433946533, 0.3488491734703477, 0.8968371036834721, 0.35695471431982806, 0.15674472673402773, 0.06273501437253737, 0.6749105444709496, 0.05005081382691212, 0.8032437874978855, 0.202158385064238, 0.1873644584663986, 0.4294318893565694, 0.18182248866450512, 0.9554560476986663, 0.3675487674862612, 0.9919634637398465, 0.023889714671826767, 0.6521530561945705, 0.6760494633176135, 0.07064749031780793, 0.3376120612771143, 0.6411435237281696, 0.9860718340623801, 0.22057486482084487, 0.9372280458752786, 0.7138460146519181, 0.559552068301644, 0.5714444889793434, 0.0922805775005755, 0.8553214064573208, 0.05328262868991385, 0.058889466346619845, 0.2915410418915184, 0.0832556509976553, 0.8828544285972318, 0.15924680299410066, 0.745766423991, 0.9872573714646465, 0.9228374075018008, 0.18595773239960256, 0.8816529492197483, 0.12081435089993442, 0.08923940274246744, 0.3605026994356263, 0.6892852873014638, 0.20914854583343834, 0.16587521109364733, 0.30794124428340286, 0.7025610167574737, 0.012539560626656288, 0.37785208376736557, 0.7477226555566733, 0.7414107605760913, 0.31943396451657036, 0.38909237944266917, 0.6335105987404311, 0.9238952535677788, 0.25289503360949805, 0.9481002587299109], [0.9721489350785666, 0.9877244968544684, 0.7855318534731416, 0.4726500885182058, 0.8739619163948421, 0.7299267386244095, 0.20954355642117828, 0.6425706285552998, 0.9062072566081306, 0.5506940996550641, 0.029809750242027255, 0.6766403812044975, 0.9779691143308561, 0.6844722355944154, 0.535512193504793, 0.15938875677668296, 0.49709536425050704, 0.26499421669509404, 0.21925168389431993, 0.4410506648359185, 0.9179772032227889, 0.13412020742978825, 0.7241828870246916, 0.40429528689236727, 0.15842309688402434, 0.46253494043756405, 0.1829744326433912, 0.08561687606826973, 0.4401108481993309, 0.7180390544115067, 0.7361107957395013, 0.724515399770915, 0.21157207165085834, 0.32237499013018844, 0.2272045768246952, 0.7781337797606571, 0.9609857833525874, 0.6049924799674548, 0.5348377726114955, 0.49890219823027726, 0.5680204612210852, 0.06488612494833657, 0.3581235064248297, 0.5187265393856662, 0.4384971714672219, 0.32113708905397287, 0.3520382064493177, 0.0443339852040564, 0.1350990845752965, 0.37562765440238965, 0.7388016841764187, 0.25462901404568794, 0.2553925655477314, 0.7176798009620682, 0.5230233058351859, 0.3193700710869337, 0.2730332404587338, 0.593261095694369, 0.9704858861893627, 0.7652462432866033, 0.29828817649869765, 0.6929683914761721, 0.3945648810798984, 0.03202772899299111, 0.49316061565035896, 0.2836364179892703, 0.8603955652443955, 0.08783230895195715, 0.04521630559808354, 0.8634890251092915, 0.8208961383729279, 0.28062549246814383, 0.45890817263819406, 0.6255127624968135, 0.4582122773091999, 0.24660015357276788, 0.2647060585811929, 0.30053561071333745, 0.5771036348873657, 0.2398972346567888, 0.1852245905965746, 0.2865783124134298, 0.37460365922842187, 0.09207147411307604, 0.6773958626475222, 0.21287875371809362, 0.07431464937189702, 0.11530672366347983, 0.9117823527960761], [0.4178119267137512, 0.5721335763079896, 0.6917349861907042, 0.21391497866678788, 0.07790870157945051, 0.9059014795349973, 0.618268349588375, 0.7490510814528829, 0.3452295820181265, 0.0778650802227353, 0.16606611482276878, 0.6267447469762019, 0.7824021188756904, 0.950827556570088, 0.10751626884378773, 0.8340746942291397, 0.9074326114302199, 0.18669786957880674, 0.8503204026569705, 0.8188397893827213, 0.4536238485410031, 0.0577434256690349, 0.6089404332635284, 0.029147445069945044, 0.5750909165928971, 0.5243436414548786, 0.06963467810681012, 0.4536999209385053, 0.8805977392883694, 0.43889768107550764, 0.4077700303695404, 0.7871784805866673, 0.19940086710859684, 0.8238585484921673, 0.8220289764497547, 0.12514902040833786, 0.9275864667613339, 0.6689332286742803, 0.5785816058284048, 0.38909375140963154, 0.06736207634079994, 0.06884357880412117, 0.9297524337016129, 0.5004920874160007, 0.10156527966087903, 0.016285795236322453, 0.9208327991499639, 0.4192081129129074, 0.14453882296664644, 0.617236605289631, 0.23509345768924972, 0.20719453604584648, 0.6892464215399696, 0.8735054849904799, 0.7821193062077179, 0.3366996999245747, 0.33265834739752487, 0.1634407463739218, 0.9546601623617, 0.28982722706758846, 0.4441568033383747, 0.4454512767724129, 0.8087240954281081, 0.5873511159612158, 0.6641779698508281, 0.4367976310412923, 0.05785742776789882, 0.633178460055429, 0.4009117758374101, 0.6703491158975458, 0.4412607175622638, 0.04796950858216176, 0.47326453920617617, 0.9378782924084312, 0.5610126447242526, 0.036442033483475855, 0.7760034475115767, 0.19312185985870955, 0.05903656488279918, 0.43454963586423356, 0.9663600285178147, 0.5054418052753229, 0.10258067927049008, 0.1208979826737776, 0.3995310737001927, 0.3575700803321339, 0.24189337505545427, 0.4214863463627905, 0.10556469936975099], [0.3030343474749423, 0.10079660010921576, 0.1991163875839299, 0.07364781735146175, 0.4142335874581575, 0.8096357584925153, 0.8388657241874425, 0.01743915845433197, 0.41437319767900005, 0.4566061929967511, 0.21172856457128342, 0.009733770707688993, 0.13492516175738167, 0.9739990297803294, 0.24579441387489287, 0.17485627819259808, 0.23908888780666027, 0.7141594443068483, 0.5626665296709473, 0.13526787588658196, 0.6413805890010359, 0.8437725568887717, 0.6858345973512588, 0.9904037421037295, 0.22617361676437275, 0.8799495093713446, 0.9580387101195238, 0.014154843794793925, 0.1807177073859868, 0.2177867950357114, 0.26645840320834513, 0.4079506125451817, 0.9708098613085748, 0.6535201536264544, 0.004762919978452684, 0.014359420763816577, 0.4755281677217933, 0.745026358861412, 0.20899278950677247, 0.7470650889774508, 0.3323097298821245, 0.6477723135962388, 0.9085528185106942, 0.23484505316670878, 0.07479274825394189, 0.9686356498515181, 0.5538725369965508, 0.5555155484170593, 0.9127647345455006, 0.5385504138229577, 0.6340082330628852, 0.7948320780751937, 0.5825452809755111, 0.32812492028278095, 0.9009050051576923, 0.5936546238119828, 0.1184996233782929, 0.4925078113703494, 0.15962675579347674, 0.824133928646716, 0.8365800232120811, 0.8338217253317379, 0.5994805918586313, 0.7868173529621724, 0.8380261472483449, 0.8090985831124037, 0.28436866305682973, 0.43235704242694317, 0.44179577270998016, 0.6850132216597447, 0.4741865277776305, 0.5945673321742275, 0.24833012256652254, 0.03897039470776775, 0.522754747531851, 0.29674725593878193, 0.6426239821422135, 0.198857331513, 0.4001871572984106, 0.6052640665876413, 0.7232659472233631, 0.30280215690491663, 0.30113720141396316, 0.9552806199687541, 0.6854237915447328, 0.13956584412785156, 0.7285386687711951, 0.98222387351813, 0.07475489762184007], [0.22648531828632212, 0.4824281514338119, 0.11872428005724212, 0.8345144873968273, 0.14020625335358883, 0.2772690174002468, 0.1546268572310644, 0.3839350572357031, 0.3005470710411313, 0.36845509047086933, 0.7524913251261408, 0.48626318000998936, 0.8171069666792441, 0.7529472336056009, 0.08781176453341055, 0.4298913410678594, 0.1257463843437665, 0.8881939436592382, 0.20312510362309733, 0.10850494766913998, 0.31635144152003947, 0.924704778311123, 0.8672715005181396, 0.1726499174473879, 0.23060196511174358, 0.36927067263672364, 0.2266753446302464, 0.4321235778173369, 0.14362677458503215, 0.5300100442704107, 0.9849521467639577, 0.2844023851634999, 0.8318850747639045, 0.6288406519894371, 0.6713160760957748, 0.12174034175844739, 0.12290818916538548, 0.7168734240091438, 0.7925680460181738, 0.06049259984371913, 0.24392988129834792, 0.20851984389351153, 0.4713852552996477, 0.040723604641543676, 0.30906667089280804, 0.26581635641797996, 0.8117701590422527, 0.2705161388340924, 0.22792033811335988, 0.11692907821213416, 0.38309580039984514, 0.04570640984864405, 0.8526654994824616, 0.1533331042999374, 0.1742761463176723, 0.48153232513084177, 0.19161464347151147, 0.9185832650576403, 0.4934548625248155, 0.021005979816700937, 0.9107291114463093, 0.10936814988728094, 0.7852916780164095, 0.3969799705109427, 0.1950010548094493, 0.2963960677709754, 0.1482047403054626, 0.7148747428954253, 0.6038827728212182, 0.6962716864275008, 0.06978022581430343, 0.6985049164364994, 0.5807456038048644, 0.6709997000805512, 0.8792863627723257, 0.7378036764941204, 0.5495443242967329, 0.3496205894698846, 0.8443835772182252, 0.10948976993947046, 0.0680888166391449, 0.1378015716108837, 0.5615030763440819, 0.8584402384714549, 0.37757596671396154, 0.8483250152768873, 0.258104165892859, 0.4750095325501692, 0.7724750025261836], [0.44389441904589344, 0.02433787946957744, 0.24172968548804485, 0.6070936202309101, 0.5056605805286013, 0.7144302651348257, 0.26230651428249174, 0.0168415855148929, 0.7546048124048121, 0.7446058038196425, 0.8103163535085638, 0.5395374329519966, 0.8677301723976767, 0.9929445362204892, 0.415005256850453, 0.1604784789833451, 0.9052899525000557, 0.9968875299806688, 0.8804810789450488, 0.2739905715506541, 0.518960224753623, 0.8834217924062843, 0.4351483691115572, 0.7339624448687048, 0.37998882464643857, 0.39931937086880287, 0.3941570909898272, 0.09265787483840182, 0.21230846215012222, 0.15217651641181051, 0.9915821118014967, 0.7701305222284069, 0.07076624648179963, 0.7508149580248991, 0.11452696072779767, 0.7269244078127457, 0.4575156855468345, 0.863866852930958, 0.8810796441716492, 0.08315205820464466, 0.2392786630549968, 0.9809881890692095, 0.49774018376494855, 0.2164936036747599, 0.4411602198773463, 0.23618217490651494, 0.25028252101285253, 0.864922793481573, 0.3275222278399894, 0.8459694418806368, 0.7414354263212619, 0.2819344946833905, 0.9799958979032483, 0.016263235919676045, 0.8290481233087124, 0.08690312692179514, 0.06661524900429139, 0.19369844080818055, 0.22645761792040642, 0.4004441020682512, 0.21574033421465555, 0.9590646119254275, 0.8332377094807794, 0.8429900328219821, 0.5508435868400916, 0.5611945355164816, 0.6400685460080022, 0.8650794150755421, 0.6099653959919991, 0.7786001373259936, 0.25603116275612714, 0.13661307012039903, 0.6688189425271687, 0.4970479316342795, 0.5938549742802922, 0.735007749219325, 0.9036241722831124, 0.7954059155310759, 0.8890075433781273, 0.5722178286390445, 0.05843675111361657, 0.882732560404803, 0.46040161135863944, 0.0036135346107771804, 0.17422593455080615, 0.9334081769443241, 0.8262015552666739, 0.6555919889511189, 0.781207543935886], [0.6754110116601949, 0.5445526452818652, 0.6073200266478743, 0.4743937456211036, 0.6133882651756238, 0.349181715790455, 0.8913479905569976, 0.39533267374518655, 0.46571217501921813, 0.9648969114865207, 0.5242259403095273, 0.5861791814341571, 0.052432257904996615, 0.42106454154707995, 0.9710280905891446, 0.8355297881537236, 0.9265693117103212, 0.9026684901522883, 0.6970234237769248, 0.03739770987704594, 0.5997405621275582, 0.8669834732764669, 0.2731050650050192, 0.1467142140829455, 0.4413216633078365, 0.2716820819081105, 0.43757272266977765, 0.7654503061819301, 0.22736943365051643, 0.10147093713883792, 0.7194627050270115, 0.7452132789062282, 0.8034522993945326, 0.31338980653830506, 0.9941236626742169, 0.5695449589931374, 0.9883695303210803, 0.4663178683387543, 0.3678555656483694, 0.09342094967147263, 0.7040522376296019, 0.46264681804216123, 0.6799663830521205, 0.5824756240800743, 0.8811498975810477, 0.10304249682922173, 0.42081437867403326, 0.26923037141479356, 0.8687985903321818, 0.8170140181229454, 0.3825266995310225, 0.6970759533263784, 0.8126079481355168, 0.271516064432218, 0.15616579782529927, 0.555735569831623, 0.9069400377242064, 0.5546618398243572, 0.7775605793385554, 0.44927082271359764, 0.8058218252598536, 0.9497308317811548, 0.9456426959167047, 0.10097260724762902, 0.536790256040104, 0.4876365527980059, 0.6813595601091766, 0.2716462311073613, 0.049775820571019924, 0.7895187266105063, 0.7725288348768223, 0.7767886142240238, 0.8786937999200706, 0.37296799216174614, 0.418971263754631, 0.8527761387184657, 0.42227147136932186, 0.5968511009009912, 0.741210911067583, 0.5009689404148686, 0.2611800722083323, 0.37705786587714896, 0.1428461867815386, 0.2947150137012575, 0.1478710297366823, 0.580996664183334, 0.9869418663834576, 0.5170287128383537, 0.3223793605807064], [0.47363761067222054, 0.348502921352425, 0.6376988556662698, 0.9450216357937573, 0.040396358562485135, 0.3055520826047141, 0.6488633108501389, 0.7081929738226214, 0.34801042875406063, 0.7783747230021859, 0.9618489717658709, 0.8642741929606672, 0.7371451333248759, 0.8292681554639788, 0.37128912793746327, 0.0053566809112577385, 0.6377305157217715, 0.2222345244435776, 0.4248646673058537, 0.30912173725625114, 0.9699363201507253, 0.5588725790842637, 0.8604879535428797, 0.553213085578852, 0.5835572285235683, 0.6104738773235407, 0.5160111040811681, 0.6476095434865877, 0.7281101003431144, 0.12176069270943624, 0.550509919455454, 0.627925413311515, 0.010847326225137732, 0.26274228198737415, 0.1983289624926493, 0.6209934985336116, 0.28785908899017676, 0.3872905025901243, 0.975598144634646, 0.28457901685878184, 0.5349504208434952, 0.6840935203133721, 0.48795789209240015, 0.841107598419212, 0.3925139595869769, 0.02474360872015302, 0.9847030537523502, 0.0061816212443317475, 0.9711004449026653, 0.048416667101451316, 0.859865267739729, 0.7925305211311096, 0.4197928844291352, 0.6839534784758764, 0.6625299918578287, 0.7333454028986263, 0.518789767990799, 0.10862640274246071, 0.28106875259371533, 0.2434205354142953, 0.8411441449127371, 0.583399825046402, 0.07501592419041614, 0.8153885301354553, 0.6974477597527748, 0.4391915967992026, 0.7498961578160926, 0.47444444288624743, 0.22816335225996676, 0.17798701807396367, 0.9045587620495678, 0.23881874785717638, 0.6798838813607976, 0.6041546101008096, 0.6668122494923934, 0.08265482303745475, 0.6010925813581808, 0.36529228274162895, 0.6889173028094426, 0.17905265356494937, 0.1254877788639145, 0.9041557162950608, 0.45854855256130567, 0.45282864962436764, 0.03560072704953943, 0.9695854800257312, 0.7030897443661815, 0.8388039278408054, 0.561794444307025], [0.807735908816847, 0.11139194890023585, 0.9071328117839277, 0.5616661858970509, 0.36661481120363326, 0.10476993159070558, 0.5610849402857655, 0.6259302923553304, 0.4463269232535091, 0.3813941372040748, 0.8612117084970073, 0.6374375237515236, 0.1142376855656192, 0.5449734220641227, 0.6613791105316364, 0.5873695465022224, 0.2829241489999047, 0.9970267815369599, 0.24513382839802944, 0.14380584927702955, 0.48527395628713454, 0.44874794611091706, 0.24510576509555504, 0.7470316841827438, 0.6540935476431394, 0.7736520630338827, 0.7241445822898341, 0.4850275719374978, 0.22572238664177902, 0.83196983634961, 0.9797609844832964, 0.1941989287812642, 0.79343007555494, 0.4863798079453081, 0.5551031964753423, 0.1976164684936882, 0.3303829177717619, 0.5130403732385073, 0.8963937829814235, 0.13661509260340632, 0.19653078718590278, 0.22574166609108748, 0.6794171016505037, 0.23732800696159984, 0.9378844295043073, 0.12171979395877097, 0.5687068384755245, 0.5944640938968451, 0.5390704310463801, 0.06000576701126348, 0.7883688123900865, 0.5531230630621755, 0.10258446679019972, 0.6733023882660187, 0.6480698304598124, 0.7717071355983769, 0.8612976084698857, 0.03401806184512013, 0.11521757764755902, 0.5721469016286939, 0.5170413933821388, 0.11717821308346621, 0.3760121576011386, 0.4511921682817326, 0.887559804266018, 0.6742879850742893, 0.22216842936471348, 0.6511042385367134, 0.5837657100831344, 0.27935499183749546, 0.6554349755192593, 0.43798377403073285, 0.2713676440950191, 0.9648416889054933, 0.4840308972957319, 0.6024871553466362, 0.41003086517252707, 0.46735340826077676, 0.05466015979196248, 0.21479358821623762, 0.8787172067655754, 0.4481262039552453, 0.7704544457240257, 0.08850603394587198, 0.02936630768814419, 0.16744137788864677, 0.5105667223256865, 0.27880563333928776, 0.39024146439752594], [0.19535158016260268, 0.8580816300579772, 0.18272913323771922, 0.5903095934600608, 0.10796903480924258, 0.3584646349587337, 0.5972566707405474, 0.7619246293711402, 0.848166047371129, 0.2679836871571215, 0.06344675476007289, 0.6236674115079759, 0.9097478939824821, 0.016329453280874318, 0.4134816257441418, 0.044279255533925754, 0.09183421070739972, 0.3039502357170105, 0.7686049767866585, 0.8875396363951107, 0.6545769659297056, 0.07574632739231313, 0.7087422801806533, 0.3180203865312541, 0.11323833234086089, 0.698140724264588, 0.7362210053089739, 0.18492138891799148, 0.6425891162848326, 0.5709360185972094, 0.5576208124643292, 0.1433454855005697, 0.3055013571139825, 0.6194981404384113, 0.847279574598229, 0.8048079055860268, 0.8471875836416023, 0.3928595051958865, 0.6800600462351265, 0.5959680959350443, 0.22074764835310912, 0.03413290772035871, 0.9259183827447341, 0.14649369716435456, 0.15046966865270162, 0.07998152654171042, 0.9165478177959402, 0.31635203503696396, 0.8981193291335272, 0.07873298687013497, 0.20243642172037168, 0.36445249645271216, 0.7929545801027236, 0.8755093729764273, 0.2482307157524295, 0.07875241769288832, 0.5743700973279281, 0.04419927319384642, 0.33569014526105445, 0.15004116783964194, 0.3727859351245687, 0.371078620065724, 0.47207253296299123, 0.8962443784997401, 0.12923003343441297, 0.7815458105802999, 0.6958626903529359, 0.4777508762193434, 0.1462046680050073, 0.5828269237975487, 0.3826280119107256, 0.7226192128415215, 0.5303073530191322, 0.3533733015412477, 0.2805014403952075, 0.8004779088335582, 0.4021663712165473, 0.5070243556712211, 0.6196307401710146, 0.605531972656143, 0.5473953660323659, 0.4832225519858323, 0.41820081339448, 0.7671389180125706, 0.19880350008041436, 0.9335557514720043, 0.7317267199807683, 0.10564321566179713, 0.910725943218761], [0.06173814051485338, 0.5994819789515876, 0.4985090433062135, 0.3481744222228068, 0.2930826260982543, 0.14599576181759555, 0.5147272414678341, 0.058052806789734124, 0.28987373727446786, 0.13216682374978606, 0.16478707837704887, 0.49789067321736824, 0.1302001677222554, 0.9917392354558564, 0.8387073662836838, 0.4731251471985226, 0.5129812048141357, 0.3433870640605823, 0.94639437620672, 0.7150857199624557, 0.21530954828780635, 0.4738539796396666, 0.16322950780565504, 0.32375555905662456, 0.050803790740591825, 0.7864937201789873, 0.9712590752086738, 0.4677320223197242, 0.20840795904363463, 0.4429352901258954, 0.8572268966955164, 0.36594232366381585, 0.580490449121416, 0.3687558418615624, 0.14522619565068606, 0.38147550905638894, 0.13209996187955075, 0.2610971939548822, 0.9591611632495901, 0.879573326848693, 0.8149858471661953, 0.00912974392000554, 0.0894528962251746, 0.18811813232673702, 0.21435406360632137, 0.30546279920663644, 0.9954415604785714, 0.9066273613746969, 0.5886945735714764, 0.06612017127891234, 0.6515374875971671, 0.7486126038480159, 0.9198079624170253, 0.5203340286525656, 0.47706998909592646, 0.5069195511928342, 0.9015051332529426, 0.03754608183309549, 0.43014839489669143, 0.5913549161393707, 0.9714970086378905, 0.8416369322963175, 0.15187295920775257, 0.2628194484865487, 0.26095415706930314, 0.5835928704412813, 0.49436629867591997, 0.6132373057739182, 0.31996668024355424, 0.010654891534005673, 0.901339372399253, 0.7390306056967024, 0.4988149723973383, 0.21751203139342978, 0.7685392178338261, 0.8569459177710408, 0.10140352222920779, 0.6095616061454283, 0.6762400648731661, 0.6030279506499625, 0.23433944746102564, 0.5725050462140842, 0.9615093269055793, 0.768751279409903, 0.6834490317195652, 0.18409086592922141, 0.6454160053237774, 0.9505479509879916, 0.5663839227290637], [0.7327549407874815, 0.6733671166650326, 0.8367646570853996, 0.018478359073776485, 0.6584731376680405, 0.31387759704581875, 0.15006813721916, 0.7346599911193442, 0.4127468651983599, 0.8548796293081616, 0.7807309369399827, 0.23207212998060778, 0.31191421276089504, 0.5923704644595996, 0.7887083432835394, 0.5935012603646707, 0.9110162037380435, 0.872946869781296, 0.9400400754134192, 0.6734571622743758, 0.8806654143045911, 0.5139032367115736, 0.7775313197564813, 0.681957396902388, 0.2624102301990351, 0.17841889615318052, 0.9387378053067176, 0.30100094988835613, 0.06491053294487226, 0.1645763260844808, 0.7990769622462853, 0.7800933536336111, 0.3932483442076554, 0.7960087195323606, 0.03320381930262495, 0.8221923615521812, 0.679228078401437, 0.6556837310390313, 0.5295752068380779, 0.37023091948706877, 0.1606207586111339, 0.15930061552475927, 0.2521126626883953, 0.6791450420857855, 0.1308518325747926, 0.6077982045468908, 0.2920489416380635, 0.9613638300835251, 0.6625797654649798, 0.586441999284505, 0.6364595494679566, 0.8538927554504315, 0.290126493784877, 0.9020750521266359, 0.9454733341398092, 0.006262228998793806, 0.3093492103495019, 0.6496551925100745, 0.3803705466672138, 0.8238161541904785, 0.4284359253159221, 0.6731695834982708, 0.2403308752322607, 0.054984859309370804, 0.0438610095816121, 0.31555673858810607, 0.7549538450536584, 0.3660365286666589, 0.3992526366062008, 0.3789048530250587, 0.22004211645090177, 0.9911983732940806, 0.4274534000048409, 0.2798807183816536, 0.24336211679897812, 0.9867104898164227, 0.307401498084926, 0.04331856121731226, 0.4703927644421433, 0.10822427544742119, 0.8161922615961262, 0.07566841479777608, 0.3880359302461226, 0.36615618964694896, 0.13696628736053296, 0.9073489881075049, 0.28853851451873624, 0.204022607160826, 0.725786769099369], [0.8780214767824338, 0.9775350101935294, 0.91875583021429, 0.5233918463240823, 0.22286859237694978, 0.9257294651561544, 0.08870162887099686, 0.8794829821812786, 0.41933866193626446, 0.2611065857239181, 0.7068972779705096, 0.8913492830861586, 0.03404717545529701, 0.5589494115993408, 0.8082257596653473, 0.9328309501276061, 0.9611939352938693, 0.32290439737389665, 0.6494030364179499, 0.14673475182438678, 0.2513487181230678, 0.28029769393794546, 0.8644282724515687, 0.9248173982808549, 0.7311834095850062, 0.7179852602747963, 0.43137872243008224, 0.9604095804692698, 0.9191159909008216, 0.7873092796158728, 0.1895542294785808, 0.5358636195716269, 0.4316543167190512, 0.07782199732913164, 0.23299231608467252, 0.534040811148236, 0.7435670057961906, 0.010975504955095583, 0.7670632878750768, 0.28966996882145424, 0.3276478808698776, 0.1437081585258274, 0.5603719672113965, 0.5343910811834202, 0.500322368284791, 0.30990097651951753, 0.26844479921362163, 0.5986541565136185, 0.8325911480572753, 0.582615585186586, 0.2100137494252733, 0.6313635845425847, 0.041970860236079655, 0.8745895441408162, 0.534830352686939, 0.6566475423897831, 0.8392886596850275, 0.5003433612505988, 0.32199955276490444, 0.8331878329028906, 0.023351224637420342, 0.10650425276014697, 0.049117318633950746, 0.5959049036806815, 0.7727706572304512, 0.47677437731513683, 0.2930505018107986, 0.6832355371967054, 0.9973346581209166, 0.17087358455061297, 0.6382327186413007, 0.7734663473948582, 0.6294640921813314, 0.33293781193082894, 0.04823936670985063, 0.5093524186507031, 0.4221438139413901, 0.5764459543177793, 0.7604211220227889, 0.7895731400933353, 0.10379627996020468, 0.1644755566386884, 0.9458085703542594, 0.047809023693736075, 0.6187327738514409, 0.9940685058728169, 0.9972088498036871, 0.09346821963160457, 0.2629879971713506], [0.5921795726907094, 0.5236691846219622, 0.5706087804198934, 0.5493111002890881, 0.2836598131336685, 0.0954378022007677, 0.3503362379744419, 0.417516677670125, 0.3584659795963766, 0.15331314351957293, 0.4895697077188811, 0.24161979094295538, 0.31659640135940736, 0.80313425939084, 0.5876016750144017, 0.6077538204506213, 0.6473472953658501, 0.9681337454032949, 0.8938292042257076, 0.8129331154958093, 0.6271089971822903, 0.0932431915990466, 0.7298615788836794, 0.31501622819680597, 0.6995327704225717, 0.944877528923261, 0.060769716260844264, 0.5575449023970561, 0.5273510594640575, 0.3332883527894366, 0.3269866660098121, 0.7448209577224162, 0.8077250244589677, 0.4254645351989046, 0.18821103798156924, 0.834828789093044, 0.010161752678862657, 0.932672371563232, 0.0025626739858252146, 0.31105876388482523, 0.9896237493853334, 0.9784578144135792, 0.34538641282293714, 0.5566278514963338, 0.9387083569566761, 0.08085833180887414, 0.1766372894063155, 0.7306442803865707, 0.21856381825283078, 0.9837976573764479, 0.35021098045489285, 0.238740352707009, 0.5240772002341829, 0.7116383602930043, 0.7861881112237322, 0.6629642222831407, 0.46506130281016234, 0.09066914762821421, 0.3888845808866649, 0.19628722818868427, 0.9871961385279713, 0.20504639317148698, 0.8528265141339012, 0.9926010729506202, 0.2215686898936261, 0.44284172924297616, 0.45341048624997315, 0.6228330862744844, 0.9153029004139825, 0.8852140495961042, 0.20134622555631188, 0.6139262219396837, 0.9820304614458683, 0.5112030029308969, 0.14226658117820112, 0.4924853156715747, 0.6867308050564731, 0.7717458356459538, 0.2833717755304891, 0.3378354315618708, 0.604218729083199, 0.13168735129710318, 0.8078483924953729, 0.39310191456886123, 0.8959029330438014, 0.8765062622831602, 0.8084051073485089, 0.1989209389802673, 0.12452717076357189], [0.6389272709951754, 0.9413323314590839, 0.6392682442556196, 0.3747564334170669, 0.5610491777675694, 0.3677375136856096, 0.6539718062171969, 0.6285203926978007, 0.5631279416110686, 0.18950519311441782, 0.7226698238454713, 0.5652110899881859, 0.3792926731019707, 0.029594200095853784, 0.09399677346324997, 0.8535795809670471, 0.5307822159792509, 0.03289671258906823, 0.28834787661294137, 0.9224076912780182, 0.42111215543273117, 0.6217460955199156, 0.5840074278960433, 0.3359889115026239, 0.07308412921826535, 0.015926798519617646, 0.33326952586846514, 0.6612086577290672, 0.027444339287311825, 0.07610808388148904, 0.2001590547797084, 0.23236950700950454, 0.2860597957358797, 0.5655149654876299, 0.3716213996992688, 0.7987541104359092, 0.04290000624539958, 0.4648803189964196, 0.46894435702453685, 0.33744906524652585, 0.43347740872170704, 0.5375944861877426, 0.8545079594662517, 0.7318851233857124, 0.08376365709845546, 0.08740863136776555, 0.6069295445577177, 0.5047941141255023, 0.869766638397423, 0.48124520264386306, 0.564429601362776, 0.8798299053693893, 0.5357997346075069, 0.8580643375265533, 0.3464444716730323, 0.006886678355234377, 0.30530796145266137, 0.30266077166140337, 0.9970749689070376, 0.13711644351912156, 0.6728784945829647, 0.04774777371460448, 0.382511935312022, 0.10964130524720017, 0.7065378935177645, 0.3030434070330994, 0.1706391857404591, 0.5039343241986278, 0.6432202812149216, 0.4056816565095903, 0.5715674655432016, 0.5739705187395138, 0.1521471773171892, 0.5520750872252749, 0.8380021197693478, 0.31311938582365184, 0.41432742769572184, 0.8681468762606518, 0.9338785126727056, 0.9526850842398418, 0.9566992856115509, 0.6337531601181717, 0.1198263501164829, 0.36912369101788867, 0.9251018533396869, 0.012333178755327912, 0.628859550281964, 0.7111794364925131, 0.9523258915283581], [0.08255942296955898, 0.8364406404009156, 0.6443597653879414, 0.618876343638427, 0.21690113732047345, 0.5424362023228411, 0.26532261027544757, 0.9165123575981962, 0.10818484233328651, 0.5279545430955032, 0.7406435520839232, 0.09290488776997552, 0.4268406861816698, 0.534445016547474, 0.5078470067153872, 0.837186932354647, 0.22618694038636233, 0.2749739208646602, 0.04124588447155242, 0.500941070589734, 0.638393423573852, 0.44645482971654205, 0.3221218720779543, 0.8060727703795892, 0.26771156744793867, 0.1294089732740381, 0.8928705572179015, 0.6426155112565274, 0.6477105785525474, 0.8719736177933894, 0.07511232017599778, 0.5578247570964093, 0.4336062233005, 0.5204551035483137, 0.5734323923141249, 0.4165770949494264, 0.46113142617425407, 0.34593531268113453, 0.880560050833618, 0.3674867389817813, 0.9678445346813193, 0.6906914123994115, 0.6164771301538566, 0.6410061189901073, 0.8833562326916368, 0.33620228656437356, 0.10339538586492647, 0.7514800088700307, 0.468360439971496, 0.8566120048830741, 0.8903489139643902, 0.2333772787005245, 0.6245684885117978, 0.8619105274508512, 0.65117545784051, 0.8695910526742259, 0.5955684853763866, 0.7641191092905754, 0.5022010708718065, 0.3711771933961687, 0.7602477686656227, 0.1589550274440913, 0.2206737846936151, 0.22454116104030653, 0.6491502450666584, 0.32554646385551866, 0.33552877503857814, 0.7407249088243756, 0.47770538637969995, 0.18885362763505043, 0.2963936339948595, 0.9175194891467573, 0.44117580258211364, 0.6368607209246854, 0.9287685275332186, 0.5108162786522749, 0.664113783933174, 0.5267359669735451, 0.5099162636570373, 0.48203671127749037, 0.22663926227034403, 0.8477521447490141, 0.6056736643160574, 0.9586180747459554, 0.5508540613810617, 0.5628828822056122, 0.030267822093533847, 0.2037835742643762, 0.8108518754004513], [0.21155243148657088, 0.6644654413792157, 0.33965411099121623, 0.8365859427675942, 0.5373295049026847, 0.4024289490255798, 0.637869826327398, 0.9787821318651106, 0.7671253125558877, 0.29084406432070864, 0.9374444360848144, 0.9233485335459986, 0.5647031067561276, 0.6258798647167488, 0.07173599696811461, 0.41460635803007795, 0.41365136373067035, 0.5910338588908807, 0.24932420981706693, 0.40647130050038516, 0.7369275040233074, 0.13132870516155892, 0.11823856777036057, 0.4922020372138822, 0.9356193149323445, 0.11074745284010834, 0.43431582101487864, 0.6126840979202538, 0.6528075486723843, 0.25384824497903413, 0.8155441197535044, 0.790228464004852, 0.006367849032681838, 0.6752885017908047, 0.07837191806408605, 0.643734462809796, 0.3089919539956698, 0.14268334077559175, 0.02333344249943803, 0.7913721713376612, 0.08503723198525148, 0.07083620394498613, 0.7338731257419842, 0.1361828146017685, 0.9237501364773881, 0.6071192131696413, 0.8940648492257888, 0.7516744846094192, 0.8798201247105508, 0.8050025832709191, 0.27851867477676695, 0.2216857312014402, 0.0317009294224162, 0.042357505725324596, 0.6880672564703674, 0.07649047704924539, 0.445234972369588, 0.07490951795444634, 0.03519617887552828, 0.05313114132620944, 0.458584248512257, 0.9617791982512968, 0.38567069521071384, 0.7378487045440475, 0.8770164693045296, 0.02593481620046134, 0.03379814231224998, 0.732484308700405, 0.6956833048882093, 0.8143272631056954, 0.10773567391588301, 0.5798689061752423, 0.1399314535230094, 0.09381427773014528, 0.8842924777588432, 0.47722707027690126, 0.315319779227365, 0.060897362651439635, 0.41308962201032196, 0.04221961025837295, 0.6702500049536841, 0.48658929188546296, 0.6174217789408062, 0.17947304802249198, 0.09401047021059583, 0.2052479762273307, 0.24539766891550652, 0.5241059501745857, 0.8182553351268695], [0.31452367682044724, 0.5868325600853366, 0.7287101135309413, 0.239834371051856, 0.7976352842569927, 0.3393975307939674, 0.6588920760598261, 0.6574173422067107, 0.9970389925241413, 0.48112019186097765, 0.6370673008292129, 0.1108771586905265, 0.8472267110432655, 0.1191264383096039, 0.07065159598283166, 0.6279527100509459, 0.1227099784746688, 0.6278848691531841, 0.5855895690384797, 0.8706582106527907, 0.12306059454601048, 0.7150710824982769, 0.15727289237075426, 0.08716276836493586, 0.029410421565433054, 0.23171440762738837, 0.806725612167363, 0.5645227665347009, 0.9346790648093313, 0.2981045743463927, 0.2106855152681092, 0.3541377434117331, 0.47825877290253316, 0.4740634750569691, 0.3593085788483745, 0.15205549213801173, 0.8831152012438578, 0.9607932116402454, 0.0629186994222124, 0.13818701668580347, 0.8478539135787282, 0.7164013323558655, 0.7691986503155324, 0.7617286299576547, 0.24386934817106232, 0.6601724276501543, 0.2844291522130691, 0.2776012394821613, 0.009473490202790313, 0.47490264651986136, 0.34173778505361707, 0.49871538648134517, 0.8055420771484197, 0.4948261689799439, 0.32893443560628466, 0.883597675636965, 0.2448830396084355, 0.3233109350588036, 0.9065310563755257, 0.06466770870175764, 0.033173445828154624, 0.7081075780693497, 0.523696031755392, 0.8961886474949768, 0.979508039015024, 0.6751973456272038, 0.435988321736673, 0.8769871617593884, 0.6364685692723667, 0.09363382743434279, 0.7961923138191327, 0.1222145421574733, 0.6127258374010938, 0.9601000470634415, 0.9823769517667279, 0.8852544880429071, 0.948838665324486, 0.33370414393860937, 0.3020680396183294, 0.47290775836012033, 0.9778842489357462, 0.40655350675003166, 0.704488918384738, 0.0463995689293113, 0.8618107612833837, 0.0068906318791801535, 0.648591178524924, 0.10276738086828707, 0.18319787678899602], [0.47067966180364806, 0.17335125746842184, 0.07744775396161985, 0.38252180008427694, 0.8197924346522685, 0.5483008120586852, 0.4686804265263619, 0.1539866771428755, 0.22153786593390468, 0.8734083259320837, 0.8468800559832983, 0.8573704870424338, 0.5978843491460601, 0.6573706267275655, 0.34923933852218114, 0.0008623054519518725, 0.13770399142325407, 0.5793767377834176, 0.08626785297252415, 0.5236962403785748, 0.6529960402692727, 0.8689956701803011, 0.8408283752829668, 0.09139908738275904, 0.06216875404817823, 0.42522144925254746, 0.07464216917141231, 0.9816717387998705, 0.3339039787628718, 0.5259962217760854, 0.6269149030568393, 0.3586305593047865, 0.3164548143546416, 0.2888286815708798, 0.21500262949077364, 0.7051242756258971, 0.33111254570009396, 0.34608436684274035, 0.5883664242973607, 0.5741621593481716, 0.29640008630010795, 0.8873432809066879, 0.8236596603663815, 0.6876688395980347, 0.259368990423799, 0.6431969923436753, 0.07243000762121932, 0.6758695316450778, 0.8088707558248815, 0.024833311085503684, 0.4346719629376975, 0.150073901699334, 0.5565799714601368, 0.8017668605985727, 0.15563580163293, 0.9972349970914597, 0.27259923221911586, 0.8974658780894798, 0.633770460507187, 0.9810796821898161, 0.2252420548245001, 0.17514053822361864, 0.18095045285782607, 0.48873493669559886, 0.3732840421783872, 0.8396550758913048, 0.12459361518904422, 0.007402020256916386, 0.8218382845226191, 0.26107450726579695, 0.08332859261851666, 0.2401961546656689, 0.3140416098097739, 0.5323311545795972, 0.3307553851597447, 0.3302694108996672, 0.39839160401049456, 0.852778519438578, 0.6198753149565817, 0.32871497788692616, 0.30032665294347427, 0.9645704505396206, 0.7221962344527919, 0.5529777935580016, 0.48195672168247394, 0.2909584318362054, 0.10684095787299486, 0.524251873582422, 0.9042033499231357], [0.6786718890894536, 0.9360848893226597, 0.9195942174229267, 0.9050438058077476, 0.3866620452477443, 0.13861966688885707, 0.9726013467704148, 0.7445330862698136, 0.27990222957385114, 0.7272471222199449, 0.12912938656509332, 0.3392570590442723, 0.7105490778899618, 0.3244856667953624, 0.37235193213945106, 0.13114728092464212, 0.7306220734742386, 0.7472235920523959, 0.8272559031730156, 0.527401859281813, 0.6555094148512521, 0.15174980727739606, 0.15293729784513466, 0.7702024077837781, 0.10228670774693349, 0.9252585619911088, 0.5038493657510967, 0.5508450364623523, 0.32010384418714755, 0.004402347541819784, 0.45309743837515404, 0.20076517918388548, 0.42737555872594246, 0.061618716493492265, 0.9060111071829697, 0.5652648124552704, 0.42795194792807545, 0.4074923483602284, 0.9572720595873383, 0.02821005538264565, 0.9029660440189707, 0.45383740614750223, 0.09664408982394113, 0.375284572184006, 0.46023832786950225, 0.9026842364635288, 0.3673434254224319, 0.499854549940266, 0.7362197820026027, 0.7863011694766673, 0.7645168153710346, 0.5777389978030208, 0.5603642813182397, 0.8192211912911636, 0.07789770693030273, 0.9678697382355035, 0.9717305532827434, 0.7763002527111937, 0.44842663909597247, 0.6089530116193439, 0.24856797278371823, 0.5860977337761667, 0.5208146859613425, 0.04921325089951356, 0.6035307221768036, 0.11252946449835854, 0.6220921750329035, 0.7738425149465435, 0.4997925100819619, 0.5388794970026483, 0.5121084503931655, 0.829673460867087, 0.5447132288725038, 0.7576693171978315, 0.19969417070203554, 0.530010989009563, 0.9765117295842283, 0.1589841293623515, 0.5476260654218397, 0.6697235959644398, 0.7312887799501441, 0.7845009504534269, 0.3414972796381559, 0.8969270020049198, 0.5149079772937352, 0.2137781750411043, 0.5011275223966584, 0.8196612107551579, 0.2706041484235385], [0.4689308044364561, 0.1592556256794917, 0.9643780737731674, 0.8580466528549477, 0.4024694598433667, 0.2997172313428942, 0.3694937298956771, 0.3609730208757731, 0.4728834605823844, 0.12405069235498734, 0.15240143704170372, 0.05845121167210077, 0.33082653064261236, 0.07218041893047822, 0.5432172732382614, 0.5212810087061834, 0.8303126006156486, 0.37160056670780117, 0.06491011686162085, 0.5454536669473815, 0.9744187952138066, 0.06384529087785062, 0.08009384803027564, 0.2579340056331765, 0.15778212329070784, 0.7473197508644865, 0.3814228680429942, 0.4037678696565862, 0.10699822396335412, 0.46017934267500493, 0.47218106196198695, 0.9084659025086295, 0.0482039177742738, 0.34210296411122376, 0.656743812274937, 0.16210293032809675, 0.9420638115007246, 0.8442764596373619, 0.5864495420660558, 0.2917875934454687, 0.18755631468287493, 0.8613719731543936, 0.335756163400315, 0.9325148962280047, 0.136283745590831, 0.15622701986306387, 0.923266141274925, 0.3141061820873364, 0.1624860259090396, 0.9309266785428646, 0.7234357672281464, 0.3011736723147692, 0.41713642589039035, 0.673700575588811, 0.21945262242070307, 0.1894773421690913, 0.15872241329670522, 0.8219109989134571, 0.6541281097306036, 0.2682821213100599, 0.7620821086425906, 0.37059333063585864, 0.2884303240782722, 0.5939508418841956, 0.33525732803729824, 0.7739505071057788, 0.5018983644136475, 0.7980893918864033, 0.09443284072662816, 0.9860760173155696, 0.40858388106463794, 0.4864780749413562, 0.05549379398971632, 0.9675349098349951, 0.8312538123960729, 0.9548965995550719, 0.49128007981505384, 0.2628928097691403, 0.42613298539832756, 0.47688039931279014, 0.7988326140612175, 0.6048712486505857, 0.7222594145085502, 0.6277470546093541, 0.6396106581578065, 0.9110284011325437, 0.269015304289253, 0.2727367221229253, 0.5623917387689411], [0.06207368181253137, 0.8370436179713142, 0.48312662621517455, 0.0839684303328534, 0.3639542295946939, 0.8817848525065376, 0.19561607709505346, 0.0662299775784333, 0.026098488002490816, 0.7012680411405539, 0.11488462152887191, 0.24128554302387284, 0.08409165212711567, 0.6787143743621306, 0.9846325375618924, 0.2481236616907121, 0.9928643140488921, 0.6772794691295502, 0.8553512498972905, 0.9256497792829562, 0.7073198188707865, 0.3318958767790757, 0.5954477983896375, 0.43015925766395346, 0.592542146167197, 0.17017805771774097, 0.7782793303043051, 0.3201161904824189, 0.44258424081202874, 0.7854559700230879, 0.9359021933216592, 0.9113528684167422, 0.8432766294881009, 0.47003159489589186, 0.7014247262828015, 0.042331700768487246, 0.12133463830875357, 0.9377589119360252, 0.7859357872647528, 0.09077601742499608, 0.28227710718203747, 0.8407391173602563, 0.7585466079656884, 0.7512028631590524, 0.6635000556842259, 0.1556965080293603, 0.6570864005007412, 0.12503681134054612, 0.6406152452206803, 0.6758482002012092, 0.2306561977184285, 0.5733566011535653, 0.38058493346790967, 0.26442980252537407, 0.3490119286653077, 0.41276017230650675, 0.15880067232865602, 0.36882219630712876, 0.6872329559258853, 0.49133252565317753, 0.4087221443656218, 0.917179959188718, 0.4696648068807755, 0.20992187909599902, 0.5662947885325013, 0.7248048371865745, 0.09568829255460676, 0.2990779691560773, 0.22757222573079716, 0.22777103393428888, 0.7499322249421724, 0.8210241633365614, 0.41862562824831406, 0.11645864659695715, 0.3505090447148935, 0.5938006331878736, 0.6978305974531012, 0.006354086984557306, 0.853434599853247, 0.013336680791795952, 0.37654952636626493, 0.8291228964229043, 0.9505215175314558, 0.22473069862537642, 0.9794342044228075, 0.3153700314639908, 0.9796838334254855, 0.6497144205834879, 0.9586031718526422], [0.6881935059123235, 0.2857992287935922, 0.5392420101962055, 0.8350066987074207, 0.7303004418850774, 0.023353583485674845, 0.5008778991669215, 0.900666519677886, 0.09414888188276216, 0.9255305518592748, 0.2848651437705376, 0.9879988994837561, 0.04729513792236273, 0.978503916808745, 0.015854454121602246, 0.20754984606004256, 0.23798773629771486, 0.08786809693491282, 0.9332995422524655, 0.018706575442957396, 0.06962141094729002, 0.36166499182372236, 0.008747905466303885, 0.26157266302878435, 0.1894090099739213, 0.15179911421151782, 0.783614566688397, 0.27873509980652156, 0.8942961067519903, 0.6488329622419126, 0.9238515205030657, 0.40394892913301306, 0.3823929411589585, 0.34674416515745066, 0.1893219592695965, 0.8873464401764113, 0.6473529835381948, 0.6221172446037629, 0.2769379220583347, 0.8548147184985623, 0.07642509329234703, 0.24400219828391945, 0.1365173035023176, 0.09774337974630865, 0.002519332902520044, 0.9619829586467429, 0.40208809594872985, 0.41680666846505543, 0.34117535843219127, 0.8054346306887744, 0.2485595047314203, 0.2977778844154042, 0.13200108624991602, 0.9145154250826253, 0.202247386723575, 0.12441930234588239, 0.2973504492587933, 0.9958047433961651, 0.592781407959969, 0.12826703732226752, 0.8744820929414956, 0.5003084093962786, 0.08936914210658387, 0.9140146055759077, 0.3371323815458802, 0.6315068362695981, 0.8016436873511674, 0.9816054913540524, 0.8697230111665605, 0.5542056159981029, 0.3292414709704321, 0.7063512806867938, 0.9452308170656275, 0.6181952723414077, 0.008232380034881137, 0.7877212770537909, 0.4641297034186822, 0.26164905457919063, 0.7006945817854182, 0.5797628767348308, 0.6057958412465118, 0.9206111305371159, 0.6727209067362293, 0.34076973015576284, 0.11367771698835705, 0.5665426015965426, 0.9101063026701217, 0.6988045760298637, 0.3446407165432771], [0.13209898449907387, 0.8591820721439712, 0.23264769274951536, 0.5494409431494077, 0.5056577790849632, 0.6096995082660097, 0.2025865081587821, 0.853929482299894, 0.8129492820384435, 0.9643914894118122, 0.3818545628207023, 0.12610097526987218, 0.7187353948510398, 0.2529644734248725, 0.023835280293614813, 0.4047845950868322, 0.5857883176509316, 0.5625227193030454, 0.806067884599265, 0.5643153409091569, 0.18134193667665643, 0.7863930918450893, 0.3795569175888398, 0.8181221544064358, 0.7218523321677016, 0.6086041201529591, 0.09938267198501893, 0.04730470566524447, 0.8247083110800993, 0.29238549038863704, 0.881480162244677, 0.6091740589947264, 0.017565110142120033, 0.7911592205277027, 0.3098739932463861, 0.3412705809617139, 0.16608373852504266, 0.3554281772417399, 0.6544349564591172, 0.7583142794769326, 0.11625386291804274, 0.7134549473592855, 0.7956625306550962, 0.5735391733840018, 0.7619424221804528, 0.8340549029344104, 0.1875444575435773, 0.8125981788926016, 0.15659298178971914, 0.8508970393773135, 0.662651718809134, 0.8264293659400063, 0.44654931593845604, 0.4192470099308526, 0.15204053565388387, 0.5882697893583749, 0.4345750278109809, 0.09850760819608229, 0.14091628310360893, 0.7308356532091398, 0.04632373619085439, 0.04166825094847926, 0.5657733359686105, 0.3565686197171115, 0.29199348598331254, 0.9308198084512485, 0.4164861445655177, 0.37436957003707994, 0.9299614066098547, 0.921072815762624, 0.7844264358582574, 0.7815715867233785, 0.6693043174998956, 0.15659082325122564, 0.4420305345052975, 0.0999317462754773, 0.6361892417304719, 0.6741873029627578, 0.014161401778511773, 0.09920296136152107, 0.012898324994366939, 0.14255823490573805, 0.7807655092348627, 0.7867100013334126, 0.5897416519021162, 0.8881221961877112, 0.6319432163259534, 0.1721146831114031, 0.41851313338925467], [0.252434453523269, 0.7954220007575719, 0.8355626764439885, 0.472234139407964, 0.6243517262861522, 0.2694438440278515, 0.22903198902248845, 0.2329227844025229, 0.4284079854798485, 0.7465560532095887, 0.09597258880634019, 0.7236160891180348, 0.21615813747321178, 0.6724723642222807, 0.47745135678609396, 0.6557756126170944, 0.3904095435752697, 0.7005613666038595, 0.8814535629884822, 0.039361788348419524, 0.9422486006540367, 0.962916636550417, 0.21863719656006708, 0.6357381020664425, 0.5153123402372074, 0.676126376145128, 0.39515279131402314, 0.5473514030285309, 0.9694287069353724, 0.9484295289314618, 0.41797358508676674, 0.9658662276951205, 0.4924340260368536, 0.8321526647001873, 0.49333131871191827, 0.7515903231088801, 0.5889097698041315, 0.07469728882495463, 0.8187710393543329, 0.9323377450462531, 0.5034100862931311, 0.13780069607074752, 0.09805047864948602, 0.9569741916403658, 0.13336495550183802, 0.9674891285115923, 0.9150695648196562, 0.8002684616879204, 0.45998303248397776, 0.11646282258026686, 0.7043419294537379, 0.0883526216937085, 0.8332662676730971, 0.2989902681300709, 0.26682296377521264, 0.09847431947023522, 0.4394968160391255, 0.12484257685664446, 0.9149785171857033, 0.03831032073295826, 0.5310997515792331, 0.8930414369602175, 0.6057140973109642, 0.010091579897061553, 0.1530969089899501, 0.18236002754178693, 0.0756023381039953, 0.03800954438108184, 0.24286716129106078, 0.8970595508914099, 0.8377174607490453, 0.8054043198615143, 0.13623945495272394, 0.9372329803014297, 0.5888848274317262, 0.4782811177940697, 0.4703474640139015, 0.11152381012300239, 0.4116058870595396, 0.5828729233648039, 0.7743832826218837, 0.1068337021296405, 0.642621764358944, 0.5805774051680093, 0.15770075438202258, 0.7200736226978128, 0.6331195416745554, 0.12076014677465885, 0.8012667732753368], [0.3365304409413027, 0.14392071131485873, 0.12616880058186652, 0.666261463179179, 0.03505173305806475, 0.3004406422081958, 0.38081838352397623, 0.1607126336238035, 0.6644508088707728, 0.6254815644618223, 0.25987632159794005, 0.860800691094763, 0.24161663852075144, 0.6818716422089769, 0.6671936932908322, 0.7859869701286273, 0.6457634227357135, 0.6869864401335857, 0.08364116390953724, 0.8150746246640079, 0.16768394402251363, 0.34754921454825827, 0.530339486773835, 0.7231598125733801, 0.8609144927072642, 0.861006275303955, 0.2285713439913789, 0.6149726401368069, 0.01231398005621731, 0.5848894472840563, 0.06666740403261784, 0.8555982328339365, 0.5493449144437244, 0.6468223884622942, 0.3543093886065287, 0.939562402685706, 0.31421190219994155, 0.7888209364987551, 0.49440375004131176, 0.9744077854852387, 0.4116150312957748, 0.8738671332681629, 0.6072721498136605, 0.265388333850899, 0.45738093947055025, 0.8256869616748419, 0.721085705756952, 0.4334084699929295, 0.949615133534841, 0.8996870116215431, 0.05708484345585452, 0.9340081600429128, 0.28832551488773006, 0.6248405658001157, 0.8435635323087313, 0.20511058206857868, 0.716625093817508, 0.22897390129677253, 0.5645161303557658, 0.42595583213969546, 0.03701500453747719, 0.5307593691044159, 0.5195193731283735, 0.411774200850194, 0.1782469096509215, 0.45708152591613327, 0.11635087267063904, 0.5711953681512103, 0.9896163469392834, 0.9976788198241433, 0.09676599801320906, 0.5667969209758633, 0.580860296104861, 0.07621649464152747, 0.09739288026583415, 0.8121563283708785, 0.35775963032242775, 0.3166762519764812, 0.7933510251288189, 0.7836940475846617, 0.11283645662143171, 0.36044471007854206, 0.7869946351089331, 0.16788304635785745, 0.15686120338363319, 0.7503466843720341, 0.9572808773901921, 0.14746514419999013, 0.5770532353582984], [0.2628669137226328, 0.6800081978417578, 0.7763517715941253, 0.7040279533266568, 0.9819123431096654, 0.09225562353590078, 0.5990469726496388, 0.2670846305332927, 0.263353053451049, 0.9395011953221185, 0.5322945870243897, 0.0589637046567032, 0.468547952134055, 0.9522856257983144, 0.030736065609641372, 0.8756846833625386, 0.1886567122929469, 0.4774289970121488, 0.7739990749060096, 0.3363101899556781, 0.28779697864287856, 0.7070104123105668, 0.8067172081181191, 0.7781826035958227, 0.6474314781575093, 0.9078622496031485, 0.4801069557527373, 0.9078743526535095, 0.34512708056788166, 0.4195813497896367, 0.03681337410864649, 0.5764867502894847, 0.30069837869921434, 0.9084613389176335, 0.7956112020642767, 0.30553339074168706, 0.20141412465624087, 0.28873922835925225, 0.3449993384569592, 0.6820545947527211, 0.8414726585769976, 0.7879661940194789, 0.9387231118352586, 0.6600690572106689, 0.18604849147094826, 0.4287595767638829, 0.8543788305160122, 0.12364207418956907, 0.07961084884529279, 0.38768769773713496, 0.22181532469329268, 0.14144861257542207, 0.28619475443157427, 0.6716525736906024, 0.7843257799407813, 0.4491035960424977, 0.3346705241987816, 0.5974685341952795, 0.45283699364588725, 0.4220947184215712, 0.15180502856632938, 0.5673552337213482, 0.5119161650056073, 0.7233069508567747, 0.33884138819917364, 0.31447243117989676, 0.09133140139763496, 0.6605414226609609, 0.5979576526860947, 0.38775896329475223, 0.41695940271811827, 0.8776631385742134, 0.20592362713950774, 0.9264905713893674, 0.8640614257380739, 0.6212957819374371, 0.9072545517931139, 0.7639222058637363, 0.7384163186100242, 0.686828110286536, 0.43140415405941845, 0.050303317272339165, 0.70465667242147, 0.16170969626367715, 0.6804595984353261, 0.7652531390124648, 0.06525003870293067, 0.08078080463573456, 0.9939968163746431], [0.28925355045426215, 0.06424132386427284, 0.20616183122343967, 0.7816931071024372, 0.8074493422619707, 0.3621851668734921, 0.12295169097359893, 0.3912305406024943, 0.7615932837818259, 0.1399689312498814, 0.6951196087564081, 0.2816763595883942, 0.16432500200984756, 0.6523296713772749, 0.6916097411651497, 0.16299325652745356, 0.82612895879277, 0.17809753786872473, 0.06354368226310836, 0.22661991272975035, 0.2564473022178476, 0.618757986316576, 0.619442050292151, 0.02893192533307576, 0.1583965632411125, 0.6178281405949388, 0.8095611348905557, 0.5855393783667587, 0.778913273147202, 0.47771125364057077, 0.5203470033334937, 0.30355020340616623, 0.5914302193871241, 0.0895391065491048, 0.862816774443246, 0.43052691880988825, 0.23609350322699452, 0.2583102677628425, 0.5592309517182706, 0.8318790237127104, 0.530895227361225, 0.5638096814327156, 0.03669074062006872, 0.06547077387612998, 0.07708838979653321, 0.7714174232265827, 0.7907373573522265, 0.2383972676440831, 0.178592916500802, 0.25434579898609033, 0.42131916303663675, 0.6808163894318169, 0.5732246057845333, 0.17050380415576616, 0.014066851686452275, 0.46013944891235314, 0.8792921741527701, 0.31349188804739414, 0.5359769659141723, 0.8642526699289402, 0.9389017821798217, 0.9848904822309308, 0.8112546769860313, 0.883510372121539, 0.14889645462031809, 0.9245955182044697, 0.6002791381279725, 0.7301237728969817, 0.6955917132795392, 0.5194955454241297, 0.3027461293815653, 0.22876447842362357, 0.7995609860063836, 0.34832197614495475, 0.8527448115207769, 0.14108493219773277, 0.5317164958111085, 0.5524996124804241, 0.3896645448686268, 0.9389473017472979, 0.5352665439868651, 0.21197779142504647, 0.27908812145721207, 0.3333916622546378, 0.1910709427101388, 0.605190710384604, 0.30264038335795884, 0.2778559161160814, 0.04900078995727486], [0.43574902525568604, 0.6045458446877167, 0.4514933371599622, 0.2793260540272785, 0.747203930100166, 0.44187238758336544, 0.48658535472718467, 0.7552044515698407, 0.4671669484407136, 0.7555546613366457, 0.5805601479048851, 0.6178598809365065, 0.6027729493886048, 0.327879102489257, 0.09279270184573019, 0.8819452818108663, 0.4396717532116259, 0.1849731596440649, 0.7410614050988614, 0.5597379105323653, 0.6340777878044821, 0.3252266687553933, 0.8118980414448913, 0.7216343079074736, 0.4711830539978159, 0.7784894231871892, 0.5134205219662721, 0.876601086690635, 0.7723178752283386, 0.6689948433327629, 0.021785867509779844, 0.1970817002299743, 0.5947523991946674, 0.3465184446630891, 0.2983911097566109, 0.568543438925438, 0.9657677316583253, 0.7893712022462439, 0.12663885633788108, 0.31345558877044444, 0.3584616329209809, 0.2884447917517644, 0.0835277168778975, 0.8547518502808011, 0.7859027061063103, 0.37254275226433176, 0.8767353431485406, 0.4910859048508104, 0.258058419111198, 0.20232573367659112, 0.16526056194598748, 0.46266128478816093, 0.3383860165626956, 0.6709203519149725, 0.5831460623419354, 0.45102193264919166, 0.5538623235881542, 0.3788436997415008, 0.9574885409898504, 0.9322074667963394, 0.6019351616344683, 0.9080539403016465, 0.1592817290291464, 0.9922539643929387, 0.2967755234887638, 0.27913134705028064, 0.5948772256531719, 0.0008083411521653261, 0.7757946827071842, 0.9095775291386413, 0.9196114739426864, 0.048072922971673204, 0.7112035782992928, 0.4468453982822268, 0.9707321557711286, 0.06540959554748194, 0.5805809872584886, 0.15539722025539937, 0.1454863001837161, 0.5115441869887117, 0.4287395743068756, 0.9406682239184411, 0.13005618084781934, 0.41468399809243306, 0.06718483652098994, 0.8923108417349503, 0.8689125131011822, 0.7437890570408032, 0.07670140153317773], [0.17727609970821168, 0.8334906729220842, 0.9095411010418225, 0.9989993205488631, 0.8970673646738692, 0.9706151197498212, 0.36224895171769245, 0.06386860153020857, 0.3765501211402166, 0.5127614373724284, 0.6790970699499885, 0.35099810162420486, 0.5445470674240748, 0.6949533528850375, 0.3325705568801385, 0.673817073015557, 0.8574232404210357, 0.5148512869314688, 0.4614615729429873, 0.006461436033273871, 0.17730864223353215, 0.5298121562524614, 0.7443282425637429, 0.08445082750201549, 0.12787719990991098, 0.23343292094080825, 0.5453080731033213, 0.015557237611109609, 0.38856707603804186, 0.35965042538090064, 0.4602432927015214, 0.48620353874069555, 0.5581778640170965, 0.3842359155409306, 0.9454547767720698, 0.3045732600981722, 0.8705569094267467, 0.3126924998022015, 0.7144963614725265, 0.7487091802372875, 0.9955157207596517, 0.3563941605926443, 0.07490918716826378, 0.7376690149041435, 0.5749310419810628, 0.32751927791555047, 0.21433838541116623, 0.9247420141297441, 0.3658476065215407, 0.47297054857194976, 0.10120009015345088, 0.7259350245246728, 0.15641400766250058, 0.22646443523924498, 0.6170923682502435, 0.6516860245950115, 0.4517582251163975, 0.5978015203116485, 0.97614764069387, 0.5432997863547578, 0.15712319430447685, 0.9714898227462948, 0.9106421728406239, 0.2901615044685556, 0.168052727027177, 0.8793932411362089, 0.06326058056157169, 0.8537828374365928, 0.4902475861306109, 0.38125492747973044, 0.2879272115167014, 0.2922557432370688, 0.9515492249023736, 0.3718996900247503, 0.2949768596024892, 0.1345470991043315, 0.1907648420186704, 0.3885001669344983, 0.2274679423613427, 0.0982774917151975, 0.8086524432962293, 0.9322907942988367, 0.9328392380977308, 0.7557774798893258, 0.6604105183086245, 0.3809819996352827, 0.9709068518687244, 0.37650147645524534, 0.8797040920511114], [0.3374861951438002, 0.23895713604512125, 0.7636954114817881, 0.17069531636662882, 0.3239420115018271, 0.9427477990400132, 0.4422692278131559, 0.6751235877757975, 0.35721829429012875, 0.6607823478540582, 0.6066094441418117, 0.16069355882759961, 0.3155686217327227, 0.4282035760934877, 0.7440854218738434, 0.24756429928532175, 0.6368293656517561, 0.6500061637667601, 0.73738115479139, 0.4378558931611207, 0.1333888133406973, 0.083398454816349, 0.2942558456034323, 0.31236844385939067, 0.20145379332314706, 0.8172510605807186, 0.24532422587559533, 0.9426701949582232, 0.7184260630654474, 0.08630650148674224, 0.6980936568086683, 0.3272329018792953, 0.30421169249766944, 0.8400335725521699, 0.6198063878953485, 0.8800094859782545, 0.19286215671388296, 0.9496512145936116, 0.6339870271686606, 0.5293556331945974, 0.6847459079232665, 0.0962152746701076, 0.6552257199945852, 0.32258580282124094, 0.14655179589893386, 0.16236613614450468, 0.3404328168093178, 0.8166473000392613, 0.2916503153958676, 0.9488626022554322, 0.9739398976992226, 0.9094936102304864, 0.340023053952743, 0.94927219472813, 0.7267603986926592, 0.15628411247280294, 0.7475547921201052, 0.9399124825418499, 0.09698395996076581, 0.9145300396194145, 0.6339331263883672, 0.9675565968494892, 0.3206029370501551, 0.003166775954895229, 0.5404208717506693, 0.8315024722627524, 0.3620885932042901, 0.19793631960936253, 0.6485782161383014, 0.06340753030234714, 0.4956408115278429, 0.5320670000272544, 0.6928944401977462, 0.8803839979711626, 0.26018003978773385, 0.9102643386748459, 0.7606784395716172, 0.21725220622711627, 0.7474164923073636, 0.8330909115361319, 0.38865037775179223, 0.7667293106712022, 0.19306549176661825, 0.41765610894772787, 0.4710495079612296, 0.1028967437320033, 0.1584697649298814, 0.08877602239920124, 0.43590187744717535], [0.8767798213150556, 0.7402905667550858, 0.681306101740437, 0.45065658488245486, 0.29062266706645923, 0.25345308417702306, 0.5514550566838811, 0.050190830522200414, 0.6460828894200424, 0.4868561826554825, 0.6445670394232889, 0.6030793678640611, 0.12425288063298534, 0.5870736752995857, 0.7504915669108805, 0.857217141989458, 0.886399109749027, 0.73140847977964, 0.004355311919113536, 0.20082932783358676, 0.39874613261339775, 0.5277875449404482, 0.7706425292248501, 0.7333149708195558, 0.08849558569157134, 0.7774724139089288, 0.19941096470972342, 0.43011320340660275, 0.6273527438389366, 0.7582296018784709, 0.9359218397944371, 0.48558766313110713, 0.05653466484295455, 0.573400732470097, 0.2292209281937908, 0.5658234010687759, 0.9716498895982173, 0.49894186042903665, 0.10903302922427116, 0.8266268629008727, 0.37722986164420347, 0.3428323104762473, 0.7446267589158959, 0.676502180398083, 0.6284160920823388, 0.8366088543555177, 0.4677177812732274, 0.6878998796824863, 0.5881670594614951, 0.12887120402044916, 0.49163764349433203, 0.295448703226619, 0.39262225145758767, 0.055047028497218875, 0.5065894965475476, 0.03892530571241937, 0.4433745689449372, 0.013606256136755146, 0.23893928459993152, 0.5397617115469945, 0.9416213348165522, 0.26701976446649867, 0.5297643400630333, 0.8821548405540685, 0.7749631695054328, 0.8402111923158895, 0.8158704598841227, 0.3300327414339921, 0.5532401323196249, 0.7051564871403732, 0.031775888730803614, 0.5256188013035926, 0.6474340951478574, 0.5373558789590714, 0.13714001534131304, 0.9999461597012564, 0.7545674518995963, 0.4071213476402833, 0.9821514131471437, 0.7619012877326233, 0.8106598394262263, 0.9979272406273922, 0.6964585112705692, 0.768183408123943, 0.5813731710495215, 0.7186930256322168, 0.6939490557676479, 0.1387120591335621, 0.537550224711139], [0.6445267688097679, 0.8672318584760279, 0.8646549500636769, 0.9447065826977449, 0.4396910422025644, 0.12719443711839973, 0.3889560414140969, 0.7900208639238427, 0.38379717065047336, 0.29470235282675294, 0.9685774236842468, 0.4113824947780007, 0.7256674380240695, 0.20588979190570844, 0.12531341276787156, 0.9888888364126407, 0.22757110893205545, 0.5923649144365112, 0.4049496237147986, 0.02622332756735002, 0.9646759996382085, 0.1381470385373892, 0.44089317261975747, 0.8506643131506442, 0.5214999604550182, 0.8358401369270844, 0.7362415989795644, 0.16888530251638223, 0.6760134441021778, 0.750761387398107, 0.762255679252731, 0.42315044074915453, 0.6039542803412107, 0.6914317856649209, 0.3410657284177464, 0.49439785288254146, 0.31062517287686875, 0.7641897846061854, 0.15882467110189835, 0.25461812138645523, 0.1649740754263762, 0.32906630179382335, 0.8191950654724666, 0.10078421637221235, 0.6725932529649279, 0.43655797085094505, 0.7731848255190357, 0.4266365556786753, 0.7764350436442461, 0.1856309546777276, 0.5756129982360815, 0.6620362929019004, 0.45524765498782394, 0.7659963178584408, 0.7012867386661666, 0.3990619769083322, 0.8227663914526152, 0.34235016534230367, 0.06510863728271021, 0.15439296766472377, 0.784525279227048, 0.9559773120575443, 0.83447702856797, 0.9228418033030726, 0.9316061664358751, 0.03728079226619874, 0.6827174982486444, 0.4871366356377369, 0.11539113871143225, 0.9605588318883541, 0.9211948580523726, 0.19964158936951482, 0.6725241523627675, 0.8891428024156611, 0.5862134792264311, 0.15238451067579106, 0.6667993012848721, 0.2646517026228957, 0.29246873720442257, 0.7652960582905014, 0.7669365352317316, 0.8488436944381353, 0.4143112056576901, 0.41269252932455447, 0.4044873326789723, 0.7367872066776237, 0.533409343040186, 0.8025802768205182, 0.8716147428499752], [0.4943242446049688, 0.48432463154898464, 0.894306037931377, 0.5929400017303887, 0.993488556457265, 0.25412301194639053, 0.5338947403339935, 0.10149158761464816, 0.5465568298420754, 0.36489333949654446, 0.014492587800809975, 0.5184978981072311, 0.9573761178937794, 0.6009984081899306, 0.47586151303144275, 0.6895080533128322, 0.03741734173259437, 0.169449375838306, 0.8780432296688463, 0.7798756734482564, 0.5922621453717599, 0.4149584751201749, 0.28557761486659083, 0.6219498152372738, 0.6814612917668595, 0.9065478083881379, 0.6629710783560083, 0.9702562688615158, 0.7411156572094194, 0.06481642943346688, 0.2429278386374104, 0.810134256627632, 0.883018510472257, 0.9982663002827877, 0.7650746951208215, 0.5717539684562033, 0.45339206137437116, 0.4513006342713908, 0.322638212940788, 0.28205972671018287, 0.47239713995703403, 0.7671413305150901, 0.9698633275181329, 0.08930287769997469, 0.4842708268715852, 0.6234315173124023, 0.8926791195921748, 0.9306764359495514, 0.715071664588506, 0.8392137316419902, 0.03426875567348109, 0.48825703386718855, 0.9182125164109367, 0.2106689914414296, 0.8699989152985291, 0.48764285668468366, 0.31944639691099164, 0.545841659517332, 0.7615997785482863, 0.8644133417482424, 0.8753757956803, 0.2401758478758581, 0.8711982874893084, 0.6680744860936942, 0.36684508535992566, 0.6315585172384744, 0.776232551177921, 0.03771131207438849, 0.5038616060220826, 0.10416047607666301, 0.5331552365726495, 0.7653980279933758, 0.029780132088968125, 0.6390305735052513, 0.21487559545862867, 0.2341656816406642, 0.40237821010610386, 0.03626356900791883, 0.4907588394323359, 0.10231116048239208, 0.5998601052635217, 0.4507828007926462, 0.7032876715524603, 0.4902195477218523, 0.8888403952550855, 0.48862859843840145, 0.6103631374700578, 0.38856856040573506, 0.5787301452046386], [0.1255517109014449, 0.38807620655807773, 0.4792100205969232, 0.4920099112140399, 0.22963690355205768, 0.15722522486588186, 0.6732686865178659, 0.1846418622053051, 0.19831295127875137, 0.666398054304459, 0.12023358531193684, 0.6776015744728352, 0.3072493029007951, 0.26272599818249676, 0.26987190713184805, 0.9351237850616615, 0.9403666911885091, 0.1918576402539568, 0.06165005725905903, 0.459390421915977, 0.9317338085250116, 0.9271636416096445, 0.8518646221630052, 0.6488786673790444, 0.4441428110127338, 0.11787622260255148, 0.8615756628312252, 0.19579015386452048, 0.0901574934037187, 0.4911526179487221, 0.2908841957498327, 0.296969964157506, 0.39553881447686645, 0.07681712611428759, 0.016249680322145466, 0.24230361605910877, 0.003523194689287412, 0.8599036252423059, 0.44985906886188354, 0.4970261616869798, 0.8347263178835761, 0.874352585235325, 0.9326540446460811, 0.7669945664938829, 0.5596114809752317, 0.5909784421036192, 0.7221543367652734, 0.5977027857541861, 0.07395480924420206, 0.293643942164745, 0.9899190054165836, 0.20758287674568754, 0.21646735134589468, 0.493926470822445, 0.45695685253462803, 0.6886927978441875, 0.7907337270558611, 0.36118488809350136, 0.2747325420954888, 0.9682305053679313, 0.2061986641755469, 0.09862249616225882, 0.29447970121525746, 0.1563446222979984, 0.7142444142885579, 0.27901224623904364, 0.3348413404475089, 0.024717533032736938, 0.11517121085110049, 0.8270771931011848, 0.4816199894867438, 0.8279510656350074, 0.31858555678488465, 0.26715290470317865, 0.5101839705194834, 0.03176894180005829, 0.5522684780508881, 0.9277942399032957, 0.13060249098821186, 0.8223309292381051, 0.6235324029595669, 0.6152635728504807, 0.9946889355011076, 0.1457281229719064, 0.24438717315657998, 0.8676150467071082, 0.7053145017225485, 0.3869872686855318, 0.897154769826219]]
bot1_bias_layer_one = [[0.5282374042863404, 0.8007323313652918, 0.6907877265641761, 0.7245762443884515, 0.9843443673819136, 0.6485807543265106, 0.05225336900731414, 0.7383205257600947, 0.44856317241224886, 0.1045379682319707, 0.4406046877449542, 0.7102555123655883, 0.5113748061203466, 0.7980383728641556, 0.7395317014801107, 0.4852792793358126, 0.532919138233343, 0.6144706525422695, 0.2513549201706653, 0.07432586269244412, 0.5396421667617102, 0.3169536751317228, 0.5428484104184691, 0.9688976580762136, 0.7635073206168332, 0.15879638473458735, 0.11226710166385523, 0.9783586343995047, 0.5151033400253183, 0.5308787843709262, 0.45693851611062375, 0.2416143595829653, 0.8723438111695375, 0.33898908394449656, 0.05106482052347239, 0.5167887209236562, 0.9719542083704084, 0.04173490365739163, 0.6783250191205238, 0.4648055056755612], [0.6437198038545422, 0.9917483405613948, 0.9281071623730037, 0.6724020868769381, 0.05226172818274122, 0.9610646556933303, 0.5883123806872438, 0.37723748829314974, 0.9026655940006579, 0.19869106648298018, 0.5224525606903694, 0.3269723346297789, 0.6065718326066825, 0.8664309788120428, 0.4596969520025904, 0.6693091453985626, 0.44706467657131266, 0.042578354912096716, 0.6793630721861424, 0.9508389093533054, 0.16833181611158543, 0.9003269359860947, 0.09473809854534154, 0.7384733052252871, 0.9068056428150388, 0.7653873677385669, 0.530961741180609, 0.3684465885277163, 0.8200391498140044, 0.37327128207942295, 0.9346049514955589, 0.5060598588731101, 0.5858120121551168, 0.94398552598559, 0.4451865301523843, 0.47504351902179176, 0.18015790305053403, 0.4684873184531432, 0.8104417932468928, 0.5364346775097965], [0.52472855349079, 0.9024087499726638, 0.48768699338800214, 0.6194022520988656, 0.0886858567996448, 0.4251991201600297, 0.9676568969098656, 0.6236867925826434, 0.6497055086913761, 0.9470896351789123, 0.580707420788774, 0.11867039941167934, 0.06585504858295244, 0.3386008383780995, 0.8336328993477536, 0.5490554648734383, 0.10219550406059441, 0.3407714324326281, 0.5457743932998534, 0.6030409385129596, 0.8523951575344998, 0.7980544349637834, 0.12283711245320716, 0.2396100195804558, 0.2011669733979633, 0.3776310487760113, 0.20838060076746678, 0.42585579675696617, 0.6532378478211758, 0.10675484361511434, 0.2815539917103992, 0.8346075537823006, 0.5049572820293564, 0.2568064165955368, 0.8276430468717176, 0.7814683755632481, 0.7567069054045219, 0.5779602546719758, 0.8812140586620885, 0.8596189261135361], [0.7576053372348847, 0.6125376117266595, 0.711214814163607, 0.438262380865984, 0.002532049659931923, 0.46699682515498264, 0.7320108935369988, 0.7223678494951178, 0.9385723744004828, 0.7704360638196736, 0.14482429069671143, 0.7085486171015449, 0.5750370011639848, 0.8647881444376616, 0.7685729826622748, 0.46741999196907336, 0.45906943218340124, 0.10391558768455611, 0.3055394992408642, 0.9492448037825001, 0.8605846701607707, 0.7326884430360666, 0.7486569222785744, 0.2627444904294036, 0.2541474295119921, 0.9751838893258497, 0.6493093022436812, 0.6916064980126243, 0.8365902337434984, 0.9439581642244835, 0.18124811522241757, 0.19995624825715086, 0.08114158081115563, 0.7232554675847003, 0.19476399735316652, 0.6809064207223642, 0.3314219102095959, 0.9715475930640679, 0.0940605184279707, 0.6188046043001112], [0.44162688789419013, 0.6998956352998441, 0.03886034505219915, 0.08042530853277341, 0.5408707506513485, 0.8039354835951812, 0.16526429023422962, 0.14891270751651442, 0.7112086276723384, 0.5495776914487421, 0.9228467695461018, 0.726505190685584, 0.12596778171151723, 0.8193009044015871, 0.4476944659951484, 0.015734995207615454, 0.8118308443406469, 0.18888316536655514, 0.11639297036877028, 0.5710320533749121, 0.3950524792648278, 0.714501934591881, 0.5051223069133127, 0.8642394770952276, 0.32464133092718217, 0.41661400446049235, 0.43610062314642173, 0.7710716996006635, 0.884527978627645, 0.5340829211489462, 0.709077171747681, 0.9302925427195408, 0.18178976444676587, 0.0018836523882554967, 0.9232174375276231, 0.5738487349949958, 0.2525981870883497, 0.14273696256940116, 0.4368103839200922, 0.40238189583397943], [0.10979419742424834, 0.05284721682087057, 0.8483677726825901, 0.6959499137322643, 0.07273865149706793, 0.4406796944089445, 0.5579798845228036, 0.5334095793527182, 0.3839110614450588, 0.30772608893522757, 0.4712646179926183, 0.0674866808694915, 0.9751361941588671, 0.3232761761100279, 0.8071647971365754, 0.24686603484159697, 0.01625619206634421, 0.7033952605561047, 0.7334279862389642, 0.47995270868865025, 0.508359413935169, 0.923428883082407, 0.4430556315049017, 0.4721717555910293, 0.6146816191698786, 0.13215916430522012, 0.4964023995385246, 0.8603867936291556, 0.4502701083463472, 0.26807433681778825, 0.6283170187201215, 0.5828260727173091, 0.3244542658112781, 0.8467638288756998, 0.6939280369159224, 0.21158516487071177, 0.7305394182014601, 0.34546288343323883, 0.22898529662142186, 0.4995186946165374], [0.7863750442130348, 0.46288832192932106, 0.8537304142124101, 0.06314868574013988, 0.1265890231498985, 0.9262667962639739, 0.38075087314419864, 0.8900846496736299, 0.23680988145309745, 0.008327542089045181, 0.7926834875107507, 0.9729041429678242, 0.06452539310565608, 0.5725170363511132, 0.4178235693235982, 0.7285572327055083, 0.5590531949941934, 0.9821548780032038, 0.7416867582006693, 0.9538455850546536, 0.38044262337190315, 0.7741033647765257, 0.4721328246804548, 0.9032310636301526, 0.6270670595070585, 0.950869492640897, 0.8263027653951777, 0.3329194493735198, 0.6337304769254406, 0.6759456662452645, 0.04595534402854662, 0.9102832864534441, 0.5857548307211281, 0.8175705058753707, 0.18745098366725443, 0.3517310137524525, 0.7776900680514854, 0.6684817389807713, 0.19233427520676272, 0.0862631251737872], [0.3029998500846066, 0.28935410322744937, 0.6218554486907973, 0.8420387073112087, 0.3505590207331256, 0.17059716888909038, 0.7929155849924996, 0.9301922687399469, 0.20904218564994226, 0.9053271423091368, 0.6559874824815429, 0.06825261778794134, 0.6982263083236689, 0.2444967667513155, 0.5049436444722383, 0.7339695457170737, 0.4982474626344098, 0.9639522828469195, 0.7295931853467219, 0.7492534761642515, 0.5257603259007675, 0.3525551958088887, 0.5796558730253563, 0.6177609808548299, 0.4435892068291156, 0.23588527138492033, 0.7308777534403581, 0.8912550212262936, 0.022121991638857086, 0.437885081588575, 0.0352709012239486, 0.3120209685298869, 0.9981275679919468, 0.014428328242256816, 0.9619488252724584, 0.1093546538599861, 0.6459844100065254, 0.027118754513430265, 0.07749672145525588, 0.10494186154011342], [0.36155509396613605, 0.7890087454782185, 0.5837834202625904, 0.2873696204357541, 0.01366896918030669, 0.8508083024690711, 0.2784936795590105, 0.9915823878507602, 0.13074738597706737, 0.09287053720482552, 0.07886646503368144, 0.7879075929008182, 0.25778460032148975, 0.8930425817728, 0.17727874522524334, 0.8888395867633827, 0.5861103110625878, 0.3729198408913216, 0.7422271081745749, 0.4347682889210617, 0.1989063241235577, 0.10141300611033444, 0.6416262228473784, 0.5971824695812258, 0.8669910911990809, 0.4438532034619552, 0.9775182100303129, 0.6987519060348957, 0.6335108638588863, 0.6335173639601613, 0.316177468115288, 0.8330519838304269, 0.38277838557150556, 0.888467179418893, 0.7364649940682547, 0.7337703880045546, 0.22087647689863776, 0.6671205398428391, 0.031240188370789013, 0.3693172635829167], [0.6080245103627565, 0.43829971692554126, 0.6652537781376434, 0.2541920121088903, 0.10402190152963131, 0.54799408646527, 0.26335677910183064, 0.9977211514021288, 0.9803891733486586, 0.6672690889483182, 0.3579486509803098, 0.8523772918608504, 0.5574217978194949, 0.18355678412309684, 0.11928526227430791, 0.11807880340623966, 0.4681081843045445, 0.663464813852211, 0.06599013486464511, 0.13273089089611323, 0.6124027637943724, 0.27642149450004494, 0.11244713217945279, 0.7633545590364574, 0.7476551733669871, 0.7624934118869393, 0.4575439334050335, 0.5449333841975237, 0.3051569233713072, 0.5724802086284331, 0.15178932301229442, 0.9908985128517098, 0.7614575923560923, 0.7611619968225237, 0.14688852620523685, 0.6960447028120814, 0.9575489842581474, 0.7435570302606918, 0.64255160878343, 0.5743406211691952], [0.4764187029750734, 0.8902797936988391, 0.42532216446139515, 0.27850980697787353, 0.30782112649039706, 0.32354677966530676, 0.36358544796330583, 0.41973788170505333, 0.08007962552492698, 0.42023356776709386, 0.5751497733677049, 0.907121621350938, 0.04188683347397504, 0.8232567319152595, 0.5315234415371232, 0.9412576211741531, 0.6593546086274757, 0.12797962260500506, 0.3628084962043221, 0.8600602667280222, 0.05656713402354441, 0.17786144196159537, 0.15917565808614353, 0.2931384381900478, 0.5712176257770376, 0.17061948594165333, 0.0045293149545670985, 0.45372353647457697, 0.5942497448869575, 0.5508022368338262, 0.717405676941688, 0.553223974562584, 0.551214718595, 0.8290552239101374, 0.8217797841427029, 0.47232307990221345, 0.8713066744437719, 0.5741029635053125, 0.6135659946901764, 0.1601602233765036], [0.5555195122024822, 0.11357151494849604, 0.6622829791786821, 0.527922144132917, 0.3916339412409443, 0.8684470240881991, 0.4354279966432101, 0.9317537327465877, 0.022391398190218403, 0.0847930813884854, 0.9490765810050635, 0.7456401249072926, 0.4892834195804754, 0.1902281369702058, 0.3231248476450297, 0.41250222374461365, 0.35177940068122326, 0.7987941354215241, 0.9642817417507571, 0.4351958176256788, 0.5520971122607368, 0.2662548234259856, 0.8757242147245973, 0.9174896203229823, 0.2479328412424252, 0.32595614020756947, 0.9886582270575998, 0.7114536280313782, 0.9290490999801969, 0.6160931332873637, 0.23223965033374183, 0.7493464976567716, 0.10285473871270889, 0.572432700855567, 0.8979438200123571, 0.3874618873794474, 0.38963995381753525, 0.27810813022614467, 0.2611508075621607, 0.4695642237482581], [0.09180406550313858, 0.9536432174254263, 0.331040669738237, 0.6526941835329422, 0.787370730209742, 0.4829072896362061, 0.3585516391079998, 0.8322727985864191, 0.9889645453372817, 0.15610306564099552, 0.9269410101433467, 0.7115477005925924, 0.7798198948674565, 0.2030614883944566, 0.7335814432599502, 0.9409385022063694, 0.7934233401124346, 0.17892920164157822, 0.7961286406762232, 0.38517112347482796, 0.743322406587928, 0.997000220800002, 0.16975984779004605, 0.44586506009283033, 0.3939817924540088, 0.8600888895880838, 0.13034366830347122, 0.4605835930937182, 0.21301339556803978, 0.12101687181599785, 0.6520233105014817, 0.8524109887793991, 0.581419881968457, 0.9503454548611743, 0.4724778246143172, 0.16748236756985224, 0.27086595647044587, 0.44166024230288015, 0.9100043316802258, 0.0025598283245876763], [0.036558366047447666, 0.951206863987329, 0.9276141267525767, 0.3407273112650998, 0.6402211741430154, 0.9298329099066687, 0.968353438969897, 0.8066551594096047, 0.7355451061363726, 0.18334736029708598, 0.3338819401034293, 0.3818947888756733, 0.3613621726262606, 0.09478204262897583, 0.08099784972759583, 0.12685727576246153, 0.08487369107940923, 0.9213647389791035, 0.6308133056393888, 0.2346759753327755, 0.26122527528271255, 0.3841398501841776, 0.9850088052502715, 0.40725611395547345, 0.8883515724118635, 0.10884958404106093, 0.49480167881260884, 0.2352287770921404, 0.31317729880243816, 0.6143280019507399, 0.3884607030124161, 0.8942290968801521, 0.08553382227640416, 0.07337409101915504, 0.2688612320963977, 0.3607967443802065, 0.7033981798202761, 0.9910104825604094, 0.47967595444395295, 0.07860053489887253], [0.9303694579474419, 0.65743537419524, 0.7573694174157902, 0.7900219771081194, 0.1311417990627205, 0.9017480092548321, 0.5224913881975612, 0.7805039530248696, 0.7037842690897504, 0.30243906629153716, 0.28773577358934355, 0.05515307290967464, 0.9855774357437966, 0.33319096066125775, 0.9973384883110036, 0.216727588241736, 0.9155129310029899, 0.6187685516410545, 0.7318469791973959, 0.01715984711946983, 0.4137628687836644, 0.40308731451070745, 0.9812720014417943, 0.3656736970678067, 0.7214171379352884, 0.4716830000042188, 0.3211026740213274, 0.37168268228411516, 0.24686502570160984, 0.9610048147120761, 0.31841395752072355, 0.7835617777536383, 0.4448211776237857, 0.5714326976983406, 0.30413597113583946, 0.46410791001417906, 0.7923844953662684, 0.39829548448009544, 0.7621499266965927, 0.5895525642943074], [0.5354456543140124, 0.7864646022812039, 0.986074919569088, 0.24366178501603253, 0.2838301619167105, 0.7938178697934669, 0.6063597923135704, 0.5604931570758807, 0.3091556838211519, 0.5331551041213544, 0.9642073999421401, 0.4124303185465632, 6.597819755049805e-05, 0.3846666717051227, 0.7614829078417563, 0.72557274976776, 0.21171693212164844, 0.7240133290820134, 0.1035186020998915, 0.8847814429509909, 0.24589923991797025, 0.8787268424296528, 0.9078422079491352, 0.12363931745585499, 0.42290050261952516, 0.10289176362902974, 0.9855556004300402, 0.6681638983299176, 0.7850906005278752, 0.9348934354519969, 0.6683301507451773, 0.5799549041919367, 0.4147211970428566, 0.4077616817198809, 0.939507173043615, 0.8516548803839927, 0.04822527152475575, 0.25040144120938723, 0.43300441526149325, 0.2718545965539435], [0.2886080571305464, 0.30259788346816285, 0.076927863313757, 0.6306793798933725, 0.3544977491245779, 0.7200545241810984, 0.3322555232634017, 0.5820797134542185, 0.12819724606371896, 0.2085289613857222, 0.9153705147982248, 0.1980206421111591, 0.7167259943349726, 0.9060539891306533, 0.3411130363785718, 0.10889784494761778, 0.5946134531396255, 0.9138561197049507, 0.6277954269229936, 0.48711815767818345, 0.4056593201670996, 0.8687956069662421, 0.5479504856054183, 0.6212018368461979, 0.06397172738870105, 0.04321739724030771, 0.22331199321696749, 0.752262414127651, 0.43178358536656025, 0.5075651362340445, 0.9031734925577821, 0.6441717384100485, 0.4246729178433052, 0.5741317542561614, 0.3759000600915483, 0.2543479237898948, 0.7398516864127815, 0.4319967575012372, 0.39178692880669774, 0.27018338356642746], [0.5914013802315883, 0.6966491903129953, 0.07909452092844493, 0.6429034801984461, 0.9158200498480357, 0.0457436844148964, 0.9535880986111993, 0.4036599920042603, 0.18734118570808422, 0.6052169240025779, 0.28289308248262734, 0.10043434110546012, 0.802539146842573, 0.07840856036303812, 0.04705899829589266, 0.754350070699537, 0.5224955294551503, 0.7139893428925421, 0.7341100101980763, 0.26359559179104186, 0.9680002028940262, 0.9898362748996594, 0.517795116815029, 0.530873926733039, 0.878253113362021, 0.8688823110355398, 0.6579797442071422, 0.3218990980575054, 0.3323887429834148, 0.6403553590148504, 0.8571367940398008, 0.23613465917089926, 0.9174486436898553, 0.9908927409219584, 0.45879222744231984, 0.5196651622602689, 0.903469725173193, 0.49697350058909384, 0.8090351664344424, 0.139899810413314], [0.2846962055427015, 0.12426022521901836, 0.958037733933284, 0.19645877687914148, 0.2500137159327618, 0.7775206440650362, 0.9550576011867677, 0.9753031549903538, 0.9843008005671541, 0.3579081003591803, 0.4952922599338746, 0.5168579182896426, 0.45274437268262446, 0.08947521381042667, 0.04613750388234927, 0.8782912020281504, 0.8190374546262154, 0.4875105014280313, 0.33169840558772967, 0.5317439332225594, 0.5094573843406561, 0.21940706809292365, 0.5128067969500457, 0.17441193212644246, 0.9165330896716449, 0.8067865223983669, 0.004976185692947999, 0.48186896489544206, 0.5446905397383867, 0.7273618398382723, 0.8490724329540034, 0.06281007577452324, 0.4176711873281648, 0.46531258647600493, 0.9536683841064754, 0.5320865965126607, 0.136556634909616, 0.7169702056794217, 0.8671784388553111, 0.39039123458058533], [0.11476735258921233, 0.16288624665118012, 0.07439842486356629, 0.9312333182744784, 0.025043159082211996, 0.6087385989144453, 0.18746019460359142, 0.2337589730196129, 0.6498620955665207, 0.6937234756676556, 0.4201521944936212, 0.7624725157028637, 0.13087320511585354, 0.2958778211440005, 0.35793365089052587, 0.5021550510189444, 0.04689537306515246, 0.45296987606291417, 0.7414119184375603, 0.8985357768030755, 0.9265572575706214, 0.5498323448886893, 0.229855635734454, 0.44862522998434384, 0.6088363070654847, 0.5164757571958161, 0.8747180432725382, 0.4412998428476709, 0.49674006310481267, 0.4201449375139855, 0.32191300817304414, 0.899295582238282, 0.6037374993989044, 0.5962933218180466, 0.03992835379537196, 0.3424514642094869, 0.5881582586793377, 0.5066137184538121, 0.420566137276128, 0.6204102890700302], [0.1717774816612111, 0.26473858207990064, 0.48492922227567203, 0.5221120664912278, 0.3603718065838797, 0.20561780260995555, 0.8825006852534271, 0.622586390910986, 0.15410013541518686, 0.9518884531639028, 0.5186162560662777, 0.25286378413545785, 0.07047597279543438, 0.966860485378446, 0.05402969201071395, 0.5704821671561654, 0.32415336643857806, 0.07344583430575746, 0.98382391416645, 0.4494723972669201, 0.14536968663951078, 0.9789692762169377, 0.45168736487074346, 0.2551290123037706, 0.8338071891369979, 0.19441054300789617, 0.7690854088802564, 0.3483773469451519, 0.2425143385652354, 0.007192724569955122, 0.6083091936227473, 0.32113866483604625, 0.8547169405083923, 0.9235791422469641, 0.48265128318364603, 0.7653980807738866, 0.4750875187846131, 0.531586337703901, 0.7521268909082224, 0.2607437953857553], [0.7520478560248436, 0.312252331671078, 0.557997534302579, 0.34713764955486004, 0.21411598485948347, 0.3282857229317512, 0.058232589975318994, 0.5857369263558264, 0.13761322734933812, 0.23850503763875053, 0.6491275179309179, 0.9143946836453878, 0.371049420591799, 0.04956242794051302, 0.03756142576283039, 0.19119286968911775, 0.6829784746098002, 0.6347720571655239, 0.27569685339371175, 0.2542531569148935, 0.6257528734151947, 0.012152318349204494, 0.9993719361662287, 0.0818473678533419, 0.061531103272058796, 0.899033158083912, 0.6791561506446193, 0.13113033409338137, 0.1661920563209095, 0.77441512401131, 0.7895019057822719, 0.8754692398836217, 0.815893950124527, 0.9890152250482848, 0.4084098012286115, 0.2226868918557593, 0.7544219382392489, 0.9206763667218736, 0.5361125022229081, 0.3862230275327899], [0.9664333575302647, 0.5123902273704258, 0.7900684764904468, 0.800033855557901, 0.49999356632525116, 0.968166288476215, 0.6240184591017016, 0.24172033801322335, 0.7029539248550747, 0.0523082850408374, 0.61411894421687, 0.773414910420878, 0.49797074095556937, 0.4918039247155015, 0.1352050764751267, 0.4158968299116136, 0.47942360661799166, 0.22938830875666394, 0.08145131824753826, 0.027559746466286783, 0.11930130417676721, 0.05745974729272463, 0.137905999691463, 0.3293023317618169, 0.19589697571966713, 0.33158682300629805, 0.25566404826090494, 0.41860740413134667, 0.45093765827491405, 0.6496998154230602, 0.06313804377969079, 0.8797429039361524, 0.36611492573517057, 0.7326092345284815, 0.8736804351434507, 0.22164681334595282, 0.6588868573412098, 0.9513250845403904, 0.171872516558346, 0.35232246589562344], [0.23846783912034097, 0.31289668878103727, 0.7109227249639721, 0.4413695022638833, 0.557869219656795, 0.09359174080895927, 0.8357215559543906, 0.8948289435908282, 0.9110908255495519, 0.9708069583632613, 0.7458860051379627, 0.0018037864133964021, 0.8770997098244465, 0.26176689649040263, 0.8295348541462196, 0.652023922600753, 0.015408423924661685, 0.826836800533934, 0.11948154517583998, 0.5895346638938812, 0.4306862191148738, 0.9716258605407303, 0.4029785008988722, 0.5370424890059847, 0.4020896423681467, 0.3075135619075021, 0.5548955555880424, 0.16078652060660015, 0.27738424637450965, 0.40315295518363414, 0.3894951227919209, 0.24554299747516162, 0.9333168720435372, 0.47067990687720107, 0.7024537209229025, 0.032718660149192225, 0.5729706706828684, 0.0966191442994565, 0.9853468462448844, 0.9422981403373298], [0.22681951660164024, 0.899257064349061, 0.36945067144191834, 0.3599809967991987, 0.5994287422981949, 0.47626655089359327, 0.23449042427639322, 0.23532588557235, 0.8035832642729512, 0.7315227892786735, 0.05686259464413412, 0.35870388410382237, 0.5356546508625858, 0.8561593522502731, 0.5179672915669524, 0.7512737497719101, 0.5272922735118873, 0.009344807741574424, 0.8292447410706214, 0.21955158394112906, 0.05240102877191688, 0.14671759440080023, 0.5041968577242806, 0.301573346379019, 0.028208699628502254, 0.8165421853226893, 0.8859013220406766, 0.04456043864975734, 0.042784838735421715, 0.2913070943948318, 0.19080249283614625, 0.7447629652627382, 0.05790061472251051, 0.8816807061017713, 0.42447437891187567, 0.3084264255015091, 0.5077190380502947, 0.7235180575626023, 0.8419390990488687, 0.4736272967045032], [0.3755987118040701, 0.66461704368007, 0.7770254505871378, 0.9056865086751943, 0.6993533255708103, 0.3493005532367971, 0.7035252106600669, 0.2160927646130456, 0.05606404830518652, 0.3428858958928237, 0.562421109360729, 0.21965738312702332, 0.30140712200990494, 0.15844531757771085, 0.05918852199857072, 0.4486925449387188, 0.22592048999157288, 0.7366910075323855, 0.5737185527521312, 0.23770403147010233, 0.2795070771623991, 0.7413341485903104, 0.775021668923174, 0.6188673858909581, 0.2589389696660095, 0.966634843962226, 0.5557742119511939, 0.06499762647172036, 0.9807822337246135, 0.711612921552711, 0.46017354301203894, 0.8567683385989687, 0.5185814425439282, 0.8689536612314087, 0.20069179175255292, 0.3637828734187334, 0.9817146633198706, 0.8537909496585927, 0.3616953587572328, 0.082581331311947], [0.3276162757821931, 0.8988997903702403, 0.38957251331140696, 0.7855881355356018, 0.009528863902416584, 0.02185332796084516, 0.9278117924557476, 0.25171302195676637, 0.7194104326526312, 0.28805752198030354, 0.2991785034276856, 0.9187860988136197, 0.8848164068170141, 0.22916360993333296, 0.34410968814241893, 0.9182843050747854, 0.08005953188407922, 0.9115983207764008, 0.6307708854292958, 0.8747519894017676, 0.07413030323548075, 0.81547861186985, 0.4817437745677233, 0.11796156970797089, 0.38832198230455794, 0.511320007824598, 0.7643658098517029, 0.4427674284528115, 0.7567280017362101, 0.23943709358790277, 0.5060911513316845, 0.9950357229848774, 0.13411288048136738, 0.3790139610939026, 0.9608477331140743, 0.1400489002660067, 0.5779774394417428, 0.21675595226670397, 0.9177115321128427, 0.19215939539691174], [0.7214191166388125, 0.32624555571369807, 0.48718053291358865, 0.1192852555337981, 0.368322386097127, 0.3698720746048365, 0.9772381302662888, 0.5685286317768721, 0.5219300129883295, 0.1599262917282288, 0.2760643308850298, 0.11679980417596347, 0.797398970551561, 0.007963206844745607, 0.2574767880725808, 0.20443195265753256, 0.9833616236220033, 0.5145576315349922, 0.043953560466303054, 0.23447722206211608, 0.6961966169439321, 0.6860177441330073, 0.2773153300311213, 0.7353530454694565, 0.08196548715625596, 0.2870045467358201, 0.884845076329907, 0.18897951546562253, 0.07698167440070869, 0.014235458277937485, 0.7578213640318767, 0.5124120129427492, 0.8453804291970074, 0.22423284163830637, 0.6429172510199457, 0.52951200561552, 0.2465641488902004, 0.6315677302987114, 0.977078390714113, 0.5942344352020806], [0.24172637811844888, 0.2971198366594141, 0.200651829863974, 0.3578813996454957, 0.9433322658786207, 0.5297006465577169, 0.09743859154822909, 0.5126912904860422, 0.05731539979502365, 0.405458882731057, 0.45964544480763725, 0.9665306219673531, 0.14714513531056583, 0.8251134408199273, 0.41677689625386505, 0.5351812115895918, 0.33383121662055937, 0.1993387756573366, 0.4270954202283761, 0.4340962966385311, 0.9695886606493639, 0.13498984858663843, 0.9819603543040618, 0.6223774736821508, 0.08737059135924541, 0.6147209842014804, 0.6720066661491462, 0.8641768343268659, 0.18723729595755834, 0.6470069536539051, 0.40177828033778595, 0.7401416628192257, 0.5271107447016355, 0.0755363353150712, 0.1484019885619563, 0.7035475214713459, 0.4332391789290432, 0.41647107711993736, 0.8369694462258492, 0.6694648529036997], [0.9949963398759567, 0.526264605802731, 0.638205861591911, 0.7772492828572212, 0.19963097848751576, 0.13358073331704357, 0.2754203702208603, 0.8769979732183413, 0.18113264790809347, 0.48198726846262196, 0.018347739117808848, 0.8964030245872391, 0.807719520872237, 0.8064335822845045, 0.6780468104811597, 0.46662722184802763, 0.3455400698350152, 0.03989269647596194, 0.918802834448473, 0.5039305254428137, 0.2444785184561049, 0.5008581887256347, 0.697091228823128, 0.6073491482101635, 0.6360928584324486, 0.8993022517913076, 0.028596726828495678, 0.21087216985749913, 0.5631203056361146, 0.1118239349713015, 0.46332782729130717, 0.17596194000510157, 0.6801457545188768, 0.757189289254151, 0.16556053860149744, 0.4123162769842771, 0.11372413038359053, 0.04673501857469231, 0.41911661517150167, 0.1334776199627361], [0.6092513586494025, 0.15725496181233856, 0.12590405324393983, 0.8275978169453394, 0.12723618801915448, 0.2443186709013282, 0.8011111833507533, 0.44101893082522714, 0.20496208047338627, 0.5624568412615738, 0.03974601131234945, 0.8679611356389516, 0.12326755414754587, 0.2705375230886987, 0.2606909973374183, 0.32934953014874624, 0.9222457235717407, 0.22523593534970454, 0.8590681808150307, 0.052832857299696556, 0.8166277528992428, 0.44683894316579487, 0.14956445644838456, 0.9783668889554349, 0.6169311092327765, 0.30214466797503314, 0.8175548079439096, 0.8433094405396716, 0.4596458568805649, 0.5458012341791739, 0.17159902830542473, 0.4415966187108019, 0.2772388553321268, 0.6619085527181116, 0.3945388842400118, 0.1455108223300403, 0.2674387810023967, 0.7037717079350307, 0.9889624965974706, 0.5167371634724124], [0.6774713845899429, 0.836896279265669, 0.24332278759118375, 0.5137791515230906, 0.6331956023382421, 0.9103038026834508, 0.6645765228981031, 0.3240858757045769, 0.9885647102469566, 0.3360352203028767, 0.051678916830688815, 0.42648907660681434, 0.8370922622003686, 0.756105319186261, 0.5945134531650385, 0.3393560699340892, 0.1959632741186872, 0.24468647112005637, 0.6327840151303724, 0.22668913321695272, 0.7801918749855855, 0.37316243160516605, 0.5077829430848748, 0.4687132144890598, 0.07351193586319393, 0.6897812060434317, 0.04722587514665311, 0.3568764548993437, 0.5758836032246245, 0.646762587734918, 0.27235341246362943, 0.5138033800079471, 0.9154328465635224, 0.2436478715901218, 0.14193769206520113, 0.44963018615547123, 0.6803434665689992, 0.6407284856514383, 0.6318764300786878, 0.5896609348575889], [0.17190718544188544, 0.8200454611905432, 0.1993937280347129, 0.8821580322727778, 0.8997395496809604, 0.3938076328356347, 0.003614089067500492, 0.6354634233416467, 0.17450617850385952, 0.13396283326084135, 0.9689312101837568, 0.3444336256365036, 0.1686822657944721, 0.17549665563102268, 0.7113706987241372, 0.6571131805404757, 0.9871503649929292, 0.18664123660606968, 0.885213629884068, 0.7886413531972399, 0.06121842284399315, 0.14300558258300788, 0.008752543428108939, 0.5156928636280925, 0.9537719058957079, 0.2617530691594806, 0.8130665801129765, 0.038314662122827525, 0.46740508971376526, 0.9316862588492979, 0.8415856875281552, 0.9993831936512184, 0.8781826620536864, 0.4775981225325241, 0.7135597088164792, 0.6687118221542102, 0.5049557053677877, 0.9631236299654812, 0.40293483636555827, 0.6761874554356204], [0.6467098319655639, 0.7032693710996192, 0.3626720460037317, 0.21484914163563051, 0.9184407924141559, 0.04655203444525513, 0.40474601616681893, 0.08361713168467322, 0.32100330232098473, 0.053794286601089536, 0.9336608279095288, 0.7490547445758277, 0.48619431918097455, 0.11488497431468248, 0.32718206450621945, 0.716903030856084, 0.13270395093268272, 0.23241621473798268, 0.06524351349798829, 0.5253699395755614, 0.5853115694068752, 0.48020890470975275, 0.4238352423880869, 0.5397353448255269, 0.6971755227475235, 0.7339655833669806, 0.8290657543717893, 0.4486886263549539, 0.10839516181327946, 0.06801368741633884, 0.08291877452300678, 0.24865989370148045, 0.2556938262187817, 0.10578296375965801, 0.3549477146134723, 0.5240823917031383, 0.8376458932619352, 0.3728757477169974, 0.38220238937975326, 0.06141731767602432], [0.9832108722362318, 0.3779293910941709, 0.6804952458388146, 0.22987586644208402, 0.7561438754243436, 0.5932177308952423, 0.9047003041419597, 0.24551344102110506, 0.554994851412291, 0.6190356695362655, 0.598911337181588, 0.018779164142332272, 0.1618921967973358, 0.3791512543341613, 0.355759289370573, 0.37896057076122547, 0.1127444287809719, 0.9522948036052805, 0.28438664547490855, 0.21441035011263698, 0.5114081424534971, 0.16545962073676623, 0.8738162897276447, 0.30582733314629884, 0.9658758260763181, 0.1762622383329694, 0.46294028288763844, 0.16626039549465232, 0.4211349676411442, 0.500051149073675, 0.6066239970392665, 0.3291447280262204, 0.8920203992973339, 0.551870312045204, 0.30870701448300486, 0.9834734806861527, 0.26894806614222244, 0.11859975216670493, 0.5284550820741946, 0.6748735043198242], [0.6450377201188152, 0.43053091965050816, 0.1783586589988927, 0.572208374170269, 0.6873689611862636, 0.5734817589756572, 0.04753144630176187, 0.7213787328550061, 0.5075439384079886, 0.9949468929464709, 0.17917568889717195, 0.754177489933067, 0.5027232407266575, 0.25953137631224177, 0.5964403010970668, 0.8007994025985303, 0.011799513308295317, 0.052912302080494134, 0.6809640196248827, 0.09691295868510108, 0.8017324667233471, 0.4349730933411128, 0.006911115725534711, 0.962759978209515, 0.7596278045615403, 0.9398228983488089, 0.027011814239984333, 0.0771530920049095, 0.08194366748763282, 0.9352315011098186, 0.8932821877495932, 0.8986656492600367, 0.7083726407081292, 0.2389968715686901, 0.5378362083427726, 0.33320187842727345, 0.40192317526152255, 0.17441673468465857, 0.740129287739041, 0.7901442537455176], [0.326738205170362, 0.756767749791562, 0.5971516499831208, 0.30144150927132773, 0.6989608712244655, 0.9467264470886341, 0.2488718174918133, 0.7391040650197364, 0.15237075338203498, 0.12335143473812482, 0.43200558236773445, 0.6733909976606801, 0.7491889353791865, 0.6997029267001967, 0.8834734516946482, 0.1761433852731069, 0.8798777157910298, 0.4759319615950359, 0.8397700343014783, 0.4625806286716255, 0.16990842485037427, 0.08750558017552823, 0.4671984565853913, 0.8582779384199715, 0.8365578386383689, 0.8143775726467016, 0.8544966498608376, 0.793507692369757, 0.2038359429843275, 0.15037688051220288, 0.11188175119932275, 0.7529853531833388, 0.2140638554980525, 0.4754210559078519, 0.4843798203268166, 0.9280878710519552, 0.39730113768041786, 0.4406359868480413, 0.11810038112617716, 0.09797530086865547], [0.42556042866446486, 0.16295823727634107, 0.06500778162778476, 0.7349568914232298, 0.8398850589172584, 0.7122572793373432, 0.8739470440463255, 0.854048167301086, 0.5082312937552903, 0.0988943628886697, 0.17447857432369196, 0.5925573539619443, 0.8176331325049689, 0.7886222959732644, 0.9011212677325275, 0.8670420145782344, 0.7309403995800507, 0.01886803046228891, 0.13003163925578032, 0.37761202149015605, 0.4668333006075892, 0.4728837915826314, 0.2623931245891815, 0.8924176472313725, 0.07417071919518936, 0.1480276689267298, 0.030231902806799993, 0.38169501360464175, 0.6130840668969509, 0.908970623539551, 0.5979567214343731, 0.054960560490365906, 0.9841408022496942, 0.5503587798406868, 0.884039783905665, 0.47096115652367887, 0.21919154027116738, 0.8885688280474321, 0.7685753079343106, 0.05446351657257387], [0.040387576356510135, 0.7088319397054356, 0.5546803196014922, 0.7259687271460956, 0.145798537456581, 0.8663027253397662, 0.7060734969393972, 0.7969049341528956, 0.08740561967412064, 0.8970452770304629, 0.07199266846390195, 0.8287134808850785, 0.9172819906766946, 0.24221141593830775, 0.8977853779219266, 0.8245526701232444, 0.9422293414335923, 0.49770387797453475, 0.9268496521362725, 0.730233268190579, 0.002832310611083466, 0.038864116182108166, 0.7439010463081545, 0.6517251724150827, 0.8971633950577387, 0.5870857916999253, 0.9970510910386452, 0.14841021616715167, 0.4420806738733257, 0.7955286522568907, 0.8215336036945504, 0.3027349450210822, 0.0006501426374789787, 0.4293479133740381, 0.7692358030405718, 0.5388509437467256, 0.6422792584520928, 0.8092022551254392, 0.5609122911438457, 0.22962585968656413], [0.9094301989801878, 0.6575456138981004, 0.16621313574782914, 0.5244120109615658, 0.2466152489447384, 0.7759345488290827, 0.9567060923852674, 0.752666572512363, 0.22254428498944245, 0.5891802990129962, 0.9576975179279983, 0.04661219141758777, 0.3894482628512198, 0.1271024118432016, 0.07844469656176634, 0.4235581749007732, 0.2510009963894956, 0.125801432681511, 0.37445668181383196, 0.4136430995565231, 0.9818039595145034, 0.5032619116331586, 0.4886268541569613, 0.4899593262299302, 0.4729100916932426, 0.8489041773026731, 0.589274481222488, 0.46055284632374305, 0.4239938032848132, 0.9972725461111954, 0.18246524288079313, 0.7575566100897623, 0.36305758358030926, 0.17897471369948026, 0.23505159968216105, 0.031007448035939134, 0.6249636786788976, 0.8268153833927993, 0.8653406398342298, 0.20695297511958155]]
bot1_wieght_layer_two = [[0.6665196860661599, 0.8481771583763376, 0.07726852187332567, 0.4076612936474281, 0.6801241739839177, 0.4324281764916259, 0.7920573029749063, 0.6695824126739598, 0.72764202717719, 0.4368907605055562, 0.41199851138955057, 0.11754338749703352, 0.7738687592679276, 0.609948012752974, 0.03513613880809463, 0.17718900138840188, 0.15461800832273598, 0.47335210240169945, 0.5451749096558407, 0.8571399278899893, 0.44234065019440916, 0.5034124018610292, 0.6485375506365091, 0.29807522225215677, 0.6185066351700109, 0.4399443001408194, 0.6524525398896217, 0.05908370670791474, 0.838627440395335, 0.44389665587170635, 0.19585031506596629, 0.5798226877447776, 0.09987698920293919, 0.83762487110238, 0.03580907507283504, 0.6626698671401646, 0.8227294257347237, 0.6476394607448163, 0.1842460082505356, 0.283328775331815], [0.40474277047501694, 0.16076412725654188, 0.7544121673074636, 0.6326962892406167, 0.042119598518534196, 0.3857272114276967, 0.07155701631767009, 0.26859468502899253, 0.5618450092167772, 0.3150077028332705, 0.5505491333727801, 0.5525090345223052, 0.15486593588460018, 0.7187076375507572, 0.578286305979075, 0.039136238696212744, 0.37214214832366765, 0.9104394173049062, 0.21272251730263536, 0.6850966406946472, 0.1727992844699897, 0.7264144467310562, 0.6248258758405187, 0.5190696285679706, 0.7978152687257978, 0.2085750271609954, 0.2685009900743477, 0.6207406914304479, 0.7982580008166668, 0.7376779368426966, 0.12124910277652978, 0.3581777100684088, 0.2950345840466353, 0.5883659490676034, 0.7999840802144952, 0.6600945516982931, 0.9779803784894753, 0.28867112267931105, 0.7233348134283624, 0.9516280205956392], [0.8788429575256413, 0.6240909157340729, 0.257633661887153, 0.27280193755175974, 0.2039022146429348, 0.31783074347048634, 0.7779101424887137, 0.3612162628590171, 0.7454135013554919, 0.17651720039512242, 0.8686225519736198, 0.5901063553605768, 0.5285329921421419, 0.02100423354493497, 0.734047385167553, 0.3134283435734887, 0.6379264939876061, 0.6377947255249657, 0.020085114466928844, 0.2619126215910974, 0.33949872266376435, 0.9727486460033935, 0.912485107076961, 0.0023396680349867527, 0.8688175837431675, 0.8152045658724784, 0.9975323840260591, 0.9135289122196727, 0.9036528227658676, 0.15803776373710088, 0.6283100805726034, 0.6488323197518102, 0.14497917405561056, 0.85374944567469, 0.27545303859866643, 0.48470972071058305, 0.8883695941370073, 0.8523079985026628, 0.742611149255975, 0.22363803423337725], [0.5785837830860099, 0.7432914907370645, 0.13018676467746992, 0.5223142443725408, 0.7195189279531476, 0.772640792421348, 0.14327621964512316, 0.6878829043185156, 0.055148280727183474, 0.8676040054543029, 0.48642135136869813, 0.30302851629800986, 0.9228633066490742, 0.667418229322695, 0.4777650552484912, 0.31537473096370805, 0.7700808697761502, 0.7960825672157771, 0.07249937731173295, 0.29899721239280774, 0.22179935581659127, 0.22273872676775142, 0.8764042515281045, 0.4366391448529726, 0.5478426436326207, 0.8314815849605053, 0.7549992548812183, 0.10936866387806565, 0.00910480845136652, 0.8084386256361511, 0.8166844640961154, 0.7313462564948571, 0.9959804810391605, 0.379523919185773, 0.6995967653492718, 0.8556104883245215, 0.9650033347051147, 0.18733000156715507, 0.4266888620654947, 0.07133812296022024], [0.7875953823075772, 0.048326692977263, 0.6878467941077652, 0.7531952401170053, 0.1558136040327478, 0.24307431692944004, 0.36153377164447553, 0.5487397481159532, 0.2755151330503123, 0.9266893099869177, 0.14615611701269082, 0.3560843408398615, 0.436443462902138, 0.7102764507205671, 0.18129364036624473, 0.38322340811115996, 0.15569544999933282, 0.15621497631267722, 0.55678174104075, 0.3401026392668376, 0.679928790269094, 0.08653086603130078, 0.6006734337150899, 0.9215754829197332, 0.3043813432254693, 0.5622410331187045, 0.09614694997099149, 0.4764624730311171, 0.7345611971372603, 0.5108499127618724, 0.654746711987487, 0.5557444311516856, 0.6852308206138262, 0.6543865122015662, 0.629658940606578, 0.044031977277485757, 0.7088084836606233, 0.06107386886067778, 0.04794948328013904, 0.0012119198186545388], [0.9873189624796332, 0.27669438975668836, 0.2966661605787152, 0.4139209966023878, 0.7497354718500084, 0.7542696882524106, 0.00047323287009148896, 0.28730378667067424, 0.7002811162039493, 0.8911910805889037, 0.7721344980447392, 0.47105119592884437, 0.373075838742169, 0.6032608233856785, 0.2139192273308207, 0.9319543355860133, 0.7269956643405344, 0.4034038337286081, 0.2585252420078713, 0.30834958635077747, 0.7334934229247756, 0.3310362628624629, 0.3757338129837905, 0.5376537254283258, 0.10018251675931056, 0.5596408768846562, 0.5148348651496074, 0.21777504252094781, 0.7054121319095489, 0.5984424196600101, 0.7603507020760363, 0.6434851532447466, 0.7793360816630102, 0.6791377750819247, 0.8874939483155643, 0.020297431321990134, 0.7877588152594723, 0.6825344779265455, 0.441631266772038, 0.7799358378043548], [0.14948070809461733, 0.6977752887489436, 0.5634986541181175, 0.38736488579116424, 0.1796681809180415, 0.18478666703628643, 0.9620236762440904, 0.4964269350799757, 0.6930587049586162, 0.708399807879856, 0.5134398465585625, 0.21393537446142608, 0.2602216489930229, 0.6837769252814112, 0.48595998832884835, 0.7237548539290024, 0.5536057526377521, 0.9142678952472156, 0.6407298133232981, 0.584126792744114, 0.4820710811205783, 0.3504942970905538, 0.6883168343596142, 0.8462933225924858, 0.4180247400964584, 0.5665180278641676, 0.8897732971718966, 0.8364818856148337, 0.7265938868603569, 0.5112350504417468, 0.03991181239209585, 0.072054980230297, 0.29923288318823416, 0.26160244227878526, 0.7902954979262191, 0.6789474159144181, 0.05402719615844953, 0.01288405023914263, 0.9858435071632456, 0.49550313163016246], [0.6814128052540557, 0.6857591462474116, 0.17342028359449235, 0.05198456664141582, 0.09253968414262181, 0.6361262726691442, 0.6310776794858192, 0.8264686540690918, 0.15536853521783067, 0.11365547163341394, 0.8741173383962068, 0.6431090470198938, 0.34886604214094474, 0.5841128943565191, 0.1306826318025598, 0.4755713452380752, 0.8934737037194166, 0.14880757216831608, 0.34448841790338536, 0.5426574181929463, 0.45282331001343046, 0.34496344066027285, 0.8355456308073075, 0.6467171865039304, 0.9828190934106459, 0.25020939133138687, 0.17359383174806498, 0.6414283048549022, 0.47943336037935724, 0.7910623150001057, 0.0836370290846139, 0.6806298932145972, 0.6162814930918981, 0.04744051039144781, 0.8151539617310978, 0.3762036323742327, 0.7318338145244138, 0.19441096162641314, 0.9256087655217963, 0.7843727099817441]]
bot1_bias_layer_two = [0.9406758857641467, 0.2126300180227927, 0.331421320987095, 0.6544606649999443, 0.2590151001820765, 0.08833035527361466, 0.4011952057788569, 0.44027479425504645, 0.42029806024477445, 0.5533297661090261, 0.3002221256295219, 0.7862574899592699, 0.3823932166902484, 0.06760529143192306, 0.8904817529085136, 0.2574363071108112, 0.9442652930673417, 0.8638464662536666, 0.9976792804834141, 0.08161112639543766, 0.8274457390637798, 0.06122431173779852, 0.30150861649483907, 0.9149791640899687, 0.6020251233163026, 0.39163356768437085, 0.3071120702029102, 0.9926591632450795, 0.308554239450762, 0.05802603153354935, 0.8493015772384627, 0.9817798648175765, 0.8871207805059099, 0.5548975481126734, 0.3695821803629423, 0.11344073506325347, 0.6326004241760085, 0.18922738053612775, 0.8335478543097846, 0.873969649479351]
bot1_wieght_layer_three = [0.7706324920831208, 0.4063910281084029, 0.2674792952177699, 0.43250967613182023, 0.612819122412578, 0.5903832494962349, 0.32915418215488546, 0.7434764512130551, 0.3377554418516807, 0.04299585439686038, 0.7203935879359235, 0.10166762979556576, 0.32301210307652384, 0.1252640719699869, 0.7500335966851666, 0.7566998032956905, 0.7678225469600396, 0.10952170159380425, 0.9805573962843176, 0.5779722827213246, 0.5908026476984574, 0.8924849290572959, 0.17075043196157114, 0.12926979033332275, 0.9819466259288311, 0.32978141701528274, 0.9651996134918539, 0.8438254105458438, 0.5511668691700664, 0.08296071500756907, 0.31100584604157344, 0.7878835121381841, 0.8410458785821329, 0.8566297235828838, 0.5073891786969, 0.7462087871999677, 0.8550172205512508, 0.15640742681071018, 0.19677970287277002, 0.5522731191600392]
bot1_bias_layer_three = [0.6469845616746536, 0.8286284260749673, 0.6801201252488618, 0.17433357165597319, 0.18834517979902088, 0.7638133663899956, 0.19825026476233243, 0.5542303268791007]
bot1_fitness = 61.10234434690874
bot1_num = 1 |
# Copyright (c) 2018, WSO2 Inc. (http://wso2.com) 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.
NS = {'d': 'http://maven.apache.org/POM/4.0.0'}
ZIP_FILE_EXTENSION = ".zip"
CARBON_NAME = "carbon.zip"
WSO2SERVER = "bin/wso2server"
VALUE_TAG = "{http://maven.apache.org/POM/4.0.0}value"
SURFACE_PLUGIN_ARTIFACT_ID = "maven-surefire-plugin"
PRODUCT_STORAGE_DIR_NAME = "storage"
DEPLOYMENT_PROPERTY_FILE_NAME = "deployment.properties"
LOG_FILE_NAME = "integration.log"
ORACLE_DB_ENGINE = "ORACLE-SE2"
MSSQL_DB_ENGINE = "SQLSERVER-SE"
MYSQL_DB_ENGINE = "MYSQL"
DEFAULT_ORACLE_SID = "orcl"
DEFAULT_DB_USERNAME = "wso2carbon"
LOG_STORAGE = "logs"
TEST_OUTPUT_DIR_NAME = "surefire-reports"
| ns = {'d': 'http://maven.apache.org/POM/4.0.0'}
zip_file_extension = '.zip'
carbon_name = 'carbon.zip'
wso2_server = 'bin/wso2server'
value_tag = '{http://maven.apache.org/POM/4.0.0}value'
surface_plugin_artifact_id = 'maven-surefire-plugin'
product_storage_dir_name = 'storage'
deployment_property_file_name = 'deployment.properties'
log_file_name = 'integration.log'
oracle_db_engine = 'ORACLE-SE2'
mssql_db_engine = 'SQLSERVER-SE'
mysql_db_engine = 'MYSQL'
default_oracle_sid = 'orcl'
default_db_username = 'wso2carbon'
log_storage = 'logs'
test_output_dir_name = 'surefire-reports' |
class A:
def __init__(self):
self.l=[1,2,3,4,5,6,7,8,9]
def __getitem__(self,i):
if isinstance(i,int):
return self.l[i]
else:
print(i.start,i.stop,i.step)
return self.l[i]
a=A()
#for i in a.l:
# print(i,end='\t')
print(a[4])
print(a[:])
print(a[2:])
print(a[:5])
print(a[3:8])
print(a[::2])
print(a[:4:3])
print(a[4::3])
print(a[2:9:2])
'''
output:
5
None None None
[1, 2, 3, 4, 5, 6, 7, 8, 9]
2 None None
[3, 4, 5, 6, 7, 8, 9]
None 5 None
[1, 2, 3, 4, 5]
3 8 None
[4, 5, 6, 7, 8]
None None 2
[1, 3, 5, 7, 9]
None 4 3
[1, 4]
4 None 3
[5, 8]
2 9 2
[3, 5, 7, 9]
'''
| class A:
def __init__(self):
self.l = [1, 2, 3, 4, 5, 6, 7, 8, 9]
def __getitem__(self, i):
if isinstance(i, int):
return self.l[i]
else:
print(i.start, i.stop, i.step)
return self.l[i]
a = a()
print(a[4])
print(a[:])
print(a[2:])
print(a[:5])
print(a[3:8])
print(a[::2])
print(a[:4:3])
print(a[4::3])
print(a[2:9:2])
'\noutput:\n5\nNone None None\n[1, 2, 3, 4, 5, 6, 7, 8, 9]\n2 None None\n[3, 4, 5, 6, 7, 8, 9]\nNone 5 None\n[1, 2, 3, 4, 5]\n3 8 None\n[4, 5, 6, 7, 8]\nNone None 2\n[1, 3, 5, 7, 9]\nNone 4 3\n[1, 4]\n4 None 3\n[5, 8]\n2 9 2\n[3, 5, 7, 9]\n' |
NAME = 'diary.py'
ORIGINAL_AUTHORS = [
'Angelo Giacco'
]
ABOUT = '''
Keeps a record of your diary
'''
COMMANDS = '''
>>>.diary record <diary entry>
Adds to that day's diary entry
>>>.diary show <date>
Will show the diary entry of specified date (can also accept "today", "yesterday")
>>>.diary delete
Will delete today's entry
>>>.diary help
Gives help about how to use the plugin
'''
WEBSITE = ''
| name = 'diary.py'
original_authors = ['Angelo Giacco']
about = '\nKeeps a record of your diary\n'
commands = '\n>>>.diary record <diary entry>\nAdds to that day\'s diary entry\n\n>>>.diary show <date>\nWill show the diary entry of specified date (can also accept "today", "yesterday")\n\n>>>.diary delete\nWill delete today\'s entry\n\n>>>.diary help\nGives help about how to use the plugin\n'
website = '' |
#
# PySNMP MIB module DLINK-3100-SOCKET-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/DLINK-3100-SOCKET-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:49:02 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ValueRangeConstraint, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ValueRangeConstraint", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsUnion")
rnd, = mibBuilder.importSymbols("DLINK-3100-MIB", "rnd")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
IpAddress, Bits, Counter32, NotificationType, ObjectIdentity, TimeTicks, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, ModuleIdentity, MibIdentifier, Gauge32, Counter64, iso, Integer32 = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "Bits", "Counter32", "NotificationType", "ObjectIdentity", "TimeTicks", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "ModuleIdentity", "MibIdentifier", "Gauge32", "Counter64", "iso", "Integer32")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
rlSocket = ModuleIdentity((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85))
rlSocket.setRevisions(('2007-01-02 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: rlSocket.setRevisionsDescriptions(('Initial revision.',))
if mibBuilder.loadTexts: rlSocket.setLastUpdated('200701020000Z')
if mibBuilder.loadTexts: rlSocket.setOrganization('Dlink, Inc. Dlink Semiconductor, Inc.')
if mibBuilder.loadTexts: rlSocket.setContactInfo('www.dlink.com')
if mibBuilder.loadTexts: rlSocket.setDescription('This private MIB module defines socket private MIBs.')
rlSocketMibVersion = MibScalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlSocketMibVersion.setStatus('current')
if mibBuilder.loadTexts: rlSocketMibVersion.setDescription("MIB's version, the current version is 1.")
rlSocketTable = MibTable((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2), )
if mibBuilder.loadTexts: rlSocketTable.setStatus('current')
if mibBuilder.loadTexts: rlSocketTable.setDescription('The (conceptual) table listing the sockets which are currently open in the system.')
rlSocketEntry = MibTableRow((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1), ).setIndexNames((0, "DLINK-3100-SOCKET-MIB", "rlSocketId"))
if mibBuilder.loadTexts: rlSocketEntry.setStatus('current')
if mibBuilder.loadTexts: rlSocketEntry.setDescription('An entry (conceptual row) in the SocketTable.')
rlSocketId = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlSocketId.setStatus('current')
if mibBuilder.loadTexts: rlSocketId.setDescription('The value of the id of the socket. ')
rlSocketType = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("stream", 1), ("dgram", 2), ("raw", 3)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlSocketType.setStatus('current')
if mibBuilder.loadTexts: rlSocketType.setDescription('Specifies the type of the socket. ')
rlSocketState = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("connected", 1), ("notConnected", 2), ("recvClosed", 3), ("sendClosed", 4), ("closed", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlSocketState.setStatus('current')
if mibBuilder.loadTexts: rlSocketState.setDescription('Specifies the state in which the socket is in. ')
rlSocketBlockMode = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("blocking", 1), ("nonBlocking", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlSocketBlockMode.setStatus('current')
if mibBuilder.loadTexts: rlSocketBlockMode.setDescription('Specifies the blocking mode of the socket. ')
rlSocketUpTime = MibTableColumn((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1, 5), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: rlSocketUpTime.setStatus('current')
if mibBuilder.loadTexts: rlSocketUpTime.setDescription('The time elapsed since this socket was created.')
mibBuilder.exportSymbols("DLINK-3100-SOCKET-MIB", PYSNMP_MODULE_ID=rlSocket, rlSocketMibVersion=rlSocketMibVersion, rlSocket=rlSocket, rlSocketId=rlSocketId, rlSocketBlockMode=rlSocketBlockMode, rlSocketState=rlSocketState, rlSocketEntry=rlSocketEntry, rlSocketUpTime=rlSocketUpTime, rlSocketTable=rlSocketTable, rlSocketType=rlSocketType)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, value_range_constraint, value_size_constraint, single_value_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsUnion')
(rnd,) = mibBuilder.importSymbols('DLINK-3100-MIB', 'rnd')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(ip_address, bits, counter32, notification_type, object_identity, time_ticks, mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32, module_identity, mib_identifier, gauge32, counter64, iso, integer32) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'Bits', 'Counter32', 'NotificationType', 'ObjectIdentity', 'TimeTicks', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32', 'ModuleIdentity', 'MibIdentifier', 'Gauge32', 'Counter64', 'iso', 'Integer32')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
rl_socket = module_identity((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85))
rlSocket.setRevisions(('2007-01-02 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
rlSocket.setRevisionsDescriptions(('Initial revision.',))
if mibBuilder.loadTexts:
rlSocket.setLastUpdated('200701020000Z')
if mibBuilder.loadTexts:
rlSocket.setOrganization('Dlink, Inc. Dlink Semiconductor, Inc.')
if mibBuilder.loadTexts:
rlSocket.setContactInfo('www.dlink.com')
if mibBuilder.loadTexts:
rlSocket.setDescription('This private MIB module defines socket private MIBs.')
rl_socket_mib_version = mib_scalar((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rlSocketMibVersion.setStatus('current')
if mibBuilder.loadTexts:
rlSocketMibVersion.setDescription("MIB's version, the current version is 1.")
rl_socket_table = mib_table((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2))
if mibBuilder.loadTexts:
rlSocketTable.setStatus('current')
if mibBuilder.loadTexts:
rlSocketTable.setDescription('The (conceptual) table listing the sockets which are currently open in the system.')
rl_socket_entry = mib_table_row((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1)).setIndexNames((0, 'DLINK-3100-SOCKET-MIB', 'rlSocketId'))
if mibBuilder.loadTexts:
rlSocketEntry.setStatus('current')
if mibBuilder.loadTexts:
rlSocketEntry.setDescription('An entry (conceptual row) in the SocketTable.')
rl_socket_id = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rlSocketId.setStatus('current')
if mibBuilder.loadTexts:
rlSocketId.setDescription('The value of the id of the socket. ')
rl_socket_type = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('stream', 1), ('dgram', 2), ('raw', 3)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rlSocketType.setStatus('current')
if mibBuilder.loadTexts:
rlSocketType.setDescription('Specifies the type of the socket. ')
rl_socket_state = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('connected', 1), ('notConnected', 2), ('recvClosed', 3), ('sendClosed', 4), ('closed', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rlSocketState.setStatus('current')
if mibBuilder.loadTexts:
rlSocketState.setDescription('Specifies the state in which the socket is in. ')
rl_socket_block_mode = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('blocking', 1), ('nonBlocking', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rlSocketBlockMode.setStatus('current')
if mibBuilder.loadTexts:
rlSocketBlockMode.setDescription('Specifies the blocking mode of the socket. ')
rl_socket_up_time = mib_table_column((1, 3, 6, 1, 4, 1, 171, 10, 94, 89, 89, 85, 2, 1, 5), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
rlSocketUpTime.setStatus('current')
if mibBuilder.loadTexts:
rlSocketUpTime.setDescription('The time elapsed since this socket was created.')
mibBuilder.exportSymbols('DLINK-3100-SOCKET-MIB', PYSNMP_MODULE_ID=rlSocket, rlSocketMibVersion=rlSocketMibVersion, rlSocket=rlSocket, rlSocketId=rlSocketId, rlSocketBlockMode=rlSocketBlockMode, rlSocketState=rlSocketState, rlSocketEntry=rlSocketEntry, rlSocketUpTime=rlSocketUpTime, rlSocketTable=rlSocketTable, rlSocketType=rlSocketType) |
class DirectedEdge:
def __init__(self, v, w, weight):
self.v = v
self.w = w
self.weight = weight
def from_v(self):
return self.v
def to_v(self):
return self.w
def get_weight(self):
return self.weight
def compare_to(self, that):
return self.get_weight() - that.get_weight()
def __str__(self):
return f'{self.from_v()} -- {self.weight} --> {self.to_v()}'
def test_directed_graph():
print(DirectedEdge(3, 7, 10.7))
if __name__ == '__main__':
test_directed_graph()
| class Directededge:
def __init__(self, v, w, weight):
self.v = v
self.w = w
self.weight = weight
def from_v(self):
return self.v
def to_v(self):
return self.w
def get_weight(self):
return self.weight
def compare_to(self, that):
return self.get_weight() - that.get_weight()
def __str__(self):
return f'{self.from_v()} -- {self.weight} --> {self.to_v()}'
def test_directed_graph():
print(directed_edge(3, 7, 10.7))
if __name__ == '__main__':
test_directed_graph() |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#---------------------------------------------------------------------------------
#
# ,--.
# | |-. ,---. ,---. ,--.--.,--,--,
# | .-. '| .-. :| .-. || .--'| \
# | `-' |\ --.' '-' '| | | || |
# `---' `----' `---' `--' `--''--'
#
# file: version
# desc: This file contains the versions of the library.
#
# author: Peter Antoine
# date: 23/05/2015
#---------------------------------------------------------------------------------
# Copyright (c) 2015 Peter Antoine
# All rights Reserved.
# Released Under the MIT Licence
#---------------------------------------------------------------------------------
#---------------------------------------------------------------------------------
# Python Standard Header
#---------------------------------------------------------------------------------
__author__ = "Peter Antoine"
__copyright__ = "Copyright 2014-2021, Peter Antoine"
__credits__ = ["Peter Antoine"]
__license__ = "MIT"
__version__ = "1.5.0"
__maintainer__ = "Peter Antoine"
__email__ = "github@peterantoine.me.uk"
__url__ = "https://github.com/PAntoine/BeornLib"
__status__ = "Development"
# vim: ts=4 sw=4 noexpandtab nocin ai
| __author__ = 'Peter Antoine'
__copyright__ = 'Copyright 2014-2021, Peter Antoine'
__credits__ = ['Peter Antoine']
__license__ = 'MIT'
__version__ = '1.5.0'
__maintainer__ = 'Peter Antoine'
__email__ = 'github@peterantoine.me.uk'
__url__ = 'https://github.com/PAntoine/BeornLib'
__status__ = 'Development' |
# Copyright 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module provides the global variable options_for_unittests.
This is set to a BrowserOptions object by the test harness, or None
if unit tests are not running.
This allows multiple unit tests to use a specific
browser, in face of multiple options."""
_options = []
def Push(options):
_options.append(options)
def Pop():
return _options.pop()
def GetCopy():
if not AreSet():
return None
return _options[-1].Copy()
def AreSet():
return bool(_options)
| """This module provides the global variable options_for_unittests.
This is set to a BrowserOptions object by the test harness, or None
if unit tests are not running.
This allows multiple unit tests to use a specific
browser, in face of multiple options."""
_options = []
def push(options):
_options.append(options)
def pop():
return _options.pop()
def get_copy():
if not are_set():
return None
return _options[-1].Copy()
def are_set():
return bool(_options) |
# Ali
# Adobis's Mission I: The Room of Tragedy
# not sure what function this room has but it has no portals
sm.sendNext("Why are you here? You shouldn't be here..")
sm.warp(211000000) # warps to El Nath | sm.sendNext("Why are you here? You shouldn't be here..")
sm.warp(211000000) |
class DuplicateCategoryException(Exception):
"""Exception indicating a Category of the same name exists."""
class DuplicateTallyException(Exception):
"""Exception for creating a tally that exists under the same category."""
| class Duplicatecategoryexception(Exception):
"""Exception indicating a Category of the same name exists."""
class Duplicatetallyexception(Exception):
"""Exception for creating a tally that exists under the same category.""" |
# Input
boss = {'h': 58, 'd': 9}
play = {'h': 50, 'm': 500}
spell = [
{'m': 53, 'd': 4, 'a': 0, 't': 1, 'h': 0},
{'m': 73, 'd': 2, 'a': 0, 't': 1, 'h': 2},
{'m': 113, 'd': 0, 'a': 7, 't': 6, 'h': 0},
{'m': 173, 'd': 3, 'a': 0, 't': 6, 'h': 0},
{'m': 229, 'd': 0, 'a': 0, 't': 5, 'h': 101}
]
| boss = {'h': 58, 'd': 9}
play = {'h': 50, 'm': 500}
spell = [{'m': 53, 'd': 4, 'a': 0, 't': 1, 'h': 0}, {'m': 73, 'd': 2, 'a': 0, 't': 1, 'h': 2}, {'m': 113, 'd': 0, 'a': 7, 't': 6, 'h': 0}, {'m': 173, 'd': 3, 'a': 0, 't': 6, 'h': 0}, {'m': 229, 'd': 0, 'a': 0, 't': 5, 'h': 101}] |
def permutations(s):
if len(s) == 1:
return [s]
result = []
for char in s:
tail_list = permutations(s.replace(char, ''))
mapped = list(map(lambda x : char + x, tail_list))
result += mapped
return result
if __name__ == '__main__':
print(permutations('abc')) | def permutations(s):
if len(s) == 1:
return [s]
result = []
for char in s:
tail_list = permutations(s.replace(char, ''))
mapped = list(map(lambda x: char + x, tail_list))
result += mapped
return result
if __name__ == '__main__':
print(permutations('abc')) |
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
load("//dotnet/private:copy_files.bzl", "copy_files")
load(
"//dotnet:selenium-dotnet-version.bzl",
"SUPPORTED_NET_FRAMEWORKS",
"SUPPORTED_NET_STANDARD_VERSIONS",
)
def _nuget_push_impl(ctx):
args = [
"push",
]
apikey = ctx.attr.api_key[BuildSettingInfo].value
package_to_publish = ctx.attr.src.files.to_list()[0].path
output_file = ctx.actions.declare_file("done.txt")
args.append(ctx.expand_location(ctx.attr.src.files.to_list()[0].path))
args.append("-Source")
args.append(ctx.attr.package_repository_url)
args.append("-SkipDuplicate")
args.append("-ApiKey")
args.append(apikey)
args.append("> {}".format(output_file.path))
ctx.actions.run(
executable = ctx.executable.nuget_exe,
progress_message = "Publishing {}".format(package_to_publish),
arguments = args,
inputs = ctx.attr.src.files.to_list() + ctx.files.deps,
outputs = [output_file],
)
return DefaultInfo(files = depset([
output_file,
]))
nuget_push = rule(
implementation = _nuget_push_impl,
attrs = {
"src": attr.label(
allow_single_file = True,
),
"deps": attr.label_list(),
"package_repository_url": attr.string(
default = "https://nuget.org",
),
"api_key": attr.label(default = ":nuget-api-key"),
"nuget_exe": attr.label(
executable = True,
cfg = "host",
default = Label("//third_party/dotnet/nuget:nuget.exe"),
allow_single_file = True,
),
},
)
def _get_relative_destination_file(src_file):
src_file_dirs = src_file.dirname.split("/")
framework_dir = src_file_dirs[-1]
for src_file_dir in reversed(src_file_dirs):
if src_file_dir in SUPPORTED_NET_FRAMEWORKS or src_file_dir in SUPPORTED_NET_STANDARD_VERSIONS:
framework_dir = src_file_dir
break
return "{}/{}".format(framework_dir, src_file.basename)
def _stage_files_for_packaging(ctx, staging_dir):
src_list = []
for dep in ctx.attr.deps:
src_file = dep.files.to_list()[0]
relative_dest_file = _get_relative_destination_file(src_file)
src_list.append((src_file, relative_dest_file))
if (ctx.attr.create_symbol_package):
symbol_file = dep.default_runfiles.files.to_list()[0]
relative_dest_symbol_file =_get_relative_destination_file(symbol_file)
src_list.append((symbol_file, relative_dest_symbol_file))
return copy_files(ctx, src_list, staging_dir, ctx.attr.is_windows)
def _nuget_package_impl(ctx):
args = [
"pack",
]
package_id = ctx.attr.package_id
package_version = ctx.attr.package_version
package_file = ctx.actions.declare_file("{}.{}.nupkg".format(package_id, package_version))
output_path = ctx.expand_location(package_file.dirname)
output_files = [package_file]
if (ctx.attr.create_symbol_package):
symbol_file = ctx.actions.declare_file("{}.{}.snupkg".format(package_id, package_version))
output_files.append(symbol_file)
# The dependencies are assembly output compiled into directories
# with the appropriate target framework moniker ("<base>/net45",
# "<base>/net46", etc.). The base path for creating the NuGet
# package should be the "<base>" directory, which we need to
# hard-code with the parent operator, because Bazel doesn't
# provide proper path traversal for custom rules.
base_path = ctx.files.deps[0].dirname + "/.."
packaging_file_list = _stage_files_for_packaging(ctx, ctx.label.name)
base_path = packaging_file_list[0].dirname + "/.."
args.append(ctx.expand_location(ctx.attr.src.files.to_list()[0].path))
args.append("-Properties")
args.append("packageid={}".format(package_id))
args.append("-Version")
args.append(package_version)
args.append("-BasePath")
args.append(base_path)
if (ctx.attr.create_symbol_package):
args.append("-Symbols")
args.append("-SymbolPackageFormat")
args.append("snupkg")
args.append("-OutputDirectory")
args.append(output_path)
ctx.actions.run(
executable = ctx.executable.nuget_exe,
progress_message = "Packaging {}".format(package_file.path),
arguments = args,
inputs = ctx.attr.src.files.to_list() + ctx.files.deps,
outputs = output_files,
)
return DefaultInfo(files = depset(output_files), runfiles = ctx.runfiles(files = packaging_file_list))
nuget_package = rule(
implementation = _nuget_package_impl,
attrs = {
"src": attr.label(
allow_single_file = True,
),
"deps": attr.label_list(),
"package_id": attr.string(),
"package_version": attr.string(),
"create_symbol_package": attr.bool(default = False),
"is_windows": attr.bool(default = False),
"nuget_exe": attr.label(
executable = True,
cfg = "host",
default = Label("//third_party/dotnet/nuget:nuget.exe"),
allow_single_file = True,
),
},
)
| load('@bazel_skylib//rules:common_settings.bzl', 'BuildSettingInfo')
load('//dotnet/private:copy_files.bzl', 'copy_files')
load('//dotnet:selenium-dotnet-version.bzl', 'SUPPORTED_NET_FRAMEWORKS', 'SUPPORTED_NET_STANDARD_VERSIONS')
def _nuget_push_impl(ctx):
args = ['push']
apikey = ctx.attr.api_key[BuildSettingInfo].value
package_to_publish = ctx.attr.src.files.to_list()[0].path
output_file = ctx.actions.declare_file('done.txt')
args.append(ctx.expand_location(ctx.attr.src.files.to_list()[0].path))
args.append('-Source')
args.append(ctx.attr.package_repository_url)
args.append('-SkipDuplicate')
args.append('-ApiKey')
args.append(apikey)
args.append('> {}'.format(output_file.path))
ctx.actions.run(executable=ctx.executable.nuget_exe, progress_message='Publishing {}'.format(package_to_publish), arguments=args, inputs=ctx.attr.src.files.to_list() + ctx.files.deps, outputs=[output_file])
return default_info(files=depset([output_file]))
nuget_push = rule(implementation=_nuget_push_impl, attrs={'src': attr.label(allow_single_file=True), 'deps': attr.label_list(), 'package_repository_url': attr.string(default='https://nuget.org'), 'api_key': attr.label(default=':nuget-api-key'), 'nuget_exe': attr.label(executable=True, cfg='host', default=label('//third_party/dotnet/nuget:nuget.exe'), allow_single_file=True)})
def _get_relative_destination_file(src_file):
src_file_dirs = src_file.dirname.split('/')
framework_dir = src_file_dirs[-1]
for src_file_dir in reversed(src_file_dirs):
if src_file_dir in SUPPORTED_NET_FRAMEWORKS or src_file_dir in SUPPORTED_NET_STANDARD_VERSIONS:
framework_dir = src_file_dir
break
return '{}/{}'.format(framework_dir, src_file.basename)
def _stage_files_for_packaging(ctx, staging_dir):
src_list = []
for dep in ctx.attr.deps:
src_file = dep.files.to_list()[0]
relative_dest_file = _get_relative_destination_file(src_file)
src_list.append((src_file, relative_dest_file))
if ctx.attr.create_symbol_package:
symbol_file = dep.default_runfiles.files.to_list()[0]
relative_dest_symbol_file = _get_relative_destination_file(symbol_file)
src_list.append((symbol_file, relative_dest_symbol_file))
return copy_files(ctx, src_list, staging_dir, ctx.attr.is_windows)
def _nuget_package_impl(ctx):
args = ['pack']
package_id = ctx.attr.package_id
package_version = ctx.attr.package_version
package_file = ctx.actions.declare_file('{}.{}.nupkg'.format(package_id, package_version))
output_path = ctx.expand_location(package_file.dirname)
output_files = [package_file]
if ctx.attr.create_symbol_package:
symbol_file = ctx.actions.declare_file('{}.{}.snupkg'.format(package_id, package_version))
output_files.append(symbol_file)
base_path = ctx.files.deps[0].dirname + '/..'
packaging_file_list = _stage_files_for_packaging(ctx, ctx.label.name)
base_path = packaging_file_list[0].dirname + '/..'
args.append(ctx.expand_location(ctx.attr.src.files.to_list()[0].path))
args.append('-Properties')
args.append('packageid={}'.format(package_id))
args.append('-Version')
args.append(package_version)
args.append('-BasePath')
args.append(base_path)
if ctx.attr.create_symbol_package:
args.append('-Symbols')
args.append('-SymbolPackageFormat')
args.append('snupkg')
args.append('-OutputDirectory')
args.append(output_path)
ctx.actions.run(executable=ctx.executable.nuget_exe, progress_message='Packaging {}'.format(package_file.path), arguments=args, inputs=ctx.attr.src.files.to_list() + ctx.files.deps, outputs=output_files)
return default_info(files=depset(output_files), runfiles=ctx.runfiles(files=packaging_file_list))
nuget_package = rule(implementation=_nuget_package_impl, attrs={'src': attr.label(allow_single_file=True), 'deps': attr.label_list(), 'package_id': attr.string(), 'package_version': attr.string(), 'create_symbol_package': attr.bool(default=False), 'is_windows': attr.bool(default=False), 'nuget_exe': attr.label(executable=True, cfg='host', default=label('//third_party/dotnet/nuget:nuget.exe'), allow_single_file=True)}) |
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required 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.
#
# Author: jasonstredwick@google.com (Jason Stredwick)
#
# Common build definitions for packages within BITE's client code base.
subinclude('//javascript/externs/builddefs:BUILD');
subinclude('//javascript/closure/builddefs:BUILD');
DEBUG_COMPILER_DEFS = CLOSURE_COMPILER_FLAGS_UNOBFUSCATED + [
'--generate_exports',
]
OPTIMIZED_COMPILER_DEFS = CLOSURE_COMPILER_FLAGS_STRICT + [
'--generate_exports',
]
COMPILER_DEFS = DEBUG_COMPILER_DEFS + [
'--aggressive_var_check_level=ERROR',
'--check_global_names_level=ERROR',
'--check_provides=ERROR',
'--jscomp_error=accessControls',
'--jscomp_error=checkRegExp',
'--jscomp_error=checkTypes',
'--jscomp_error=checkVars',
'--jscomp_error=deprecated',
'--jscomp_error=fileoverviewTags',
'--jscomp_error=invalidCasts',
'--jscomp_error=missingProperties',
'--jscomp_error=nonStandardJsDocs',
'--jscomp_error=strictModuleDepCheck',
'--jscomp_error=undefinedVars',
'--jscomp_error=unknownDefines',
'--jscomp_error=visibility',
'--strict',
]
CSS_COMPILER_DEFS = [
'--add_copyright',
'--allow_unrecognized_functions',
'--allowed_non_standard_function=color-stop',
'--allowed_non_standard_pseudo_type=nth-child',
'--allowed_non_standard_function=-moz-linear-gradient',
'--allowed_non_standard_function=-webkit-gradient',
'--allowed_non_standard_function=from',
'--allowed_non_standard_function=to',
'--allowed_non_standard_function=alpha',
'--allow_ie_function_syntax',
'--allow_unrecognized_pseudo_types',
'--simplify_css',
'--eliminate_dead_styles',
]
| subinclude('//javascript/externs/builddefs:BUILD')
subinclude('//javascript/closure/builddefs:BUILD')
debug_compiler_defs = CLOSURE_COMPILER_FLAGS_UNOBFUSCATED + ['--generate_exports']
optimized_compiler_defs = CLOSURE_COMPILER_FLAGS_STRICT + ['--generate_exports']
compiler_defs = DEBUG_COMPILER_DEFS + ['--aggressive_var_check_level=ERROR', '--check_global_names_level=ERROR', '--check_provides=ERROR', '--jscomp_error=accessControls', '--jscomp_error=checkRegExp', '--jscomp_error=checkTypes', '--jscomp_error=checkVars', '--jscomp_error=deprecated', '--jscomp_error=fileoverviewTags', '--jscomp_error=invalidCasts', '--jscomp_error=missingProperties', '--jscomp_error=nonStandardJsDocs', '--jscomp_error=strictModuleDepCheck', '--jscomp_error=undefinedVars', '--jscomp_error=unknownDefines', '--jscomp_error=visibility', '--strict']
css_compiler_defs = ['--add_copyright', '--allow_unrecognized_functions', '--allowed_non_standard_function=color-stop', '--allowed_non_standard_pseudo_type=nth-child', '--allowed_non_standard_function=-moz-linear-gradient', '--allowed_non_standard_function=-webkit-gradient', '--allowed_non_standard_function=from', '--allowed_non_standard_function=to', '--allowed_non_standard_function=alpha', '--allow_ie_function_syntax', '--allow_unrecognized_pseudo_types', '--simplify_css', '--eliminate_dead_styles'] |
encoded_colors = {
'black': 0,
'brown': 1,
'red': 2,
'orange': 3,
'yellow': 4,
'green': 5,
'blue': 6,
'violet': 7,
'grey': 8,
'white': 9
}
def color_code(color):
"""
Resistors have color coded bands, where each color maps to a number.
The first 2 bands of a resistor have a simple encoding scheme:
each color maps to a single number.
:param color:
:return:
"""
if color not in encoded_colors.keys():
raise Exception('Invalid color: {}'.format(color))
return encoded_colors[color]
def colors():
"""
Mnemonics map the colors to the numbers, that, when stored as an array,
happen to map to their index in the array:
Better Be Right Or Your Great Big Values Go Wrong.
['black', 'brown', 'red', 'orange', 'yellow',
'green', 'blue', 'violet', 'grey', 'white']
:return:
"""
result = []
indexes = sorted(list(encoded_colors.values()))
for i in indexes:
for key, value in encoded_colors.items():
if value == i:
result.append(key)
break
return result
| encoded_colors = {'black': 0, 'brown': 1, 'red': 2, 'orange': 3, 'yellow': 4, 'green': 5, 'blue': 6, 'violet': 7, 'grey': 8, 'white': 9}
def color_code(color):
"""
Resistors have color coded bands, where each color maps to a number.
The first 2 bands of a resistor have a simple encoding scheme:
each color maps to a single number.
:param color:
:return:
"""
if color not in encoded_colors.keys():
raise exception('Invalid color: {}'.format(color))
return encoded_colors[color]
def colors():
"""
Mnemonics map the colors to the numbers, that, when stored as an array,
happen to map to their index in the array:
Better Be Right Or Your Great Big Values Go Wrong.
['black', 'brown', 'red', 'orange', 'yellow',
'green', 'blue', 'violet', 'grey', 'white']
:return:
"""
result = []
indexes = sorted(list(encoded_colors.values()))
for i in indexes:
for (key, value) in encoded_colors.items():
if value == i:
result.append(key)
break
return result |
def get_conclusion_page_number(doc):
for i in reversed(range(doc.pageCount)):
page = doc.loadPage(i)
text = page.getText()
text_lowered = text.lower()
if 'conclusion' in text_lowered:
return i
else:
# Page before the last page which is usually the Printing Specifications Statement
# This would be difference if the brief was an appellants brief.
return doc.pageCount - 1
| def get_conclusion_page_number(doc):
for i in reversed(range(doc.pageCount)):
page = doc.loadPage(i)
text = page.getText()
text_lowered = text.lower()
if 'conclusion' in text_lowered:
return i
else:
return doc.pageCount - 1 |
'''
Created on Feb 26, 2014
@author: efarhan
'''
physics_events = []
def add_physics_event(event):
global physics_events
physics_events.append(event)
def get_physics_event():
global physics_events
return physics_events
def clear_physics_event():
global physics_events
del physics_events[:]
class PhysicsEvent:
def __init__(self,a,b,begin):
self.a=a
self.b=b
self.begin=begin
| """
Created on Feb 26, 2014
@author: efarhan
"""
physics_events = []
def add_physics_event(event):
global physics_events
physics_events.append(event)
def get_physics_event():
global physics_events
return physics_events
def clear_physics_event():
global physics_events
del physics_events[:]
class Physicsevent:
def __init__(self, a, b, begin):
self.a = a
self.b = b
self.begin = begin |
class SumRow(object):
"""A list that keeps track of tableQa info: db, name, type, statistics, and error status."""
def __init__(self, db, table, tableType):
if tableType == None:
tableType = 'none'
self.__row = [db, table, tableType, '', 'n/a', 'n/a', 'no']
def __repr__(self):
return str(self.__row)
def setCount(self, count):
self.__row[3] = count
def setFeatureBits(self, fbOut):
self.__row[4] = fbOut
def setFeatureBitsGaps(self, fbGapOut):
self.__row[5] = fbGapOut
def setError(self):
self.__row[6] = 'YES'
class SumTable(object):
"""A list of SumRows, plus a header line."""
def __init__(self):
self.header = ["Database", "Table", "Type", "Row count", "featureBits", "Overlap with gap",
"Errors"]
self.table = [self.header]
def __repr__(self):
return str(self.table)
def addRow(self, sumRowToAdd):
self.table.append(sumRowToAdd._SumRow__row)
def tabSeparated(self):
"""Returns a tab-separated version of the SumTable."""
return '\n'.join('\t'.join(item for item in row) for row in self.table) + '\n'
| class Sumrow(object):
"""A list that keeps track of tableQa info: db, name, type, statistics, and error status."""
def __init__(self, db, table, tableType):
if tableType == None:
table_type = 'none'
self.__row = [db, table, tableType, '', 'n/a', 'n/a', 'no']
def __repr__(self):
return str(self.__row)
def set_count(self, count):
self.__row[3] = count
def set_feature_bits(self, fbOut):
self.__row[4] = fbOut
def set_feature_bits_gaps(self, fbGapOut):
self.__row[5] = fbGapOut
def set_error(self):
self.__row[6] = 'YES'
class Sumtable(object):
"""A list of SumRows, plus a header line."""
def __init__(self):
self.header = ['Database', 'Table', 'Type', 'Row count', 'featureBits', 'Overlap with gap', 'Errors']
self.table = [self.header]
def __repr__(self):
return str(self.table)
def add_row(self, sumRowToAdd):
self.table.append(sumRowToAdd._SumRow__row)
def tab_separated(self):
"""Returns a tab-separated version of the SumTable."""
return '\n'.join(('\t'.join((item for item in row)) for row in self.table)) + '\n' |
def sum(a):
if a <= 1:
return 1
else:
return a+sum(a-1)
print(sum(5))
| def sum(a):
if a <= 1:
return 1
else:
return a + sum(a - 1)
print(sum(5)) |
# class Solution:
# ## with division
# def productExceptSelf(self, nums: List[int]) -> List[int]:
# N = len(nums)
# # traverse the list
# ## 1st pass, get the total product
# total_prod = 1
# zero_counter = 0
# for num in nums:
# if zero_counter>1:
# return [0 for i in range(N)]
# if num==0:
# zero_counter += 1
# else:
# total_prod = total_prod*num
# ## 2nd pass, generate the output
# if zero_counter==0:
# return [total_prod//num for num in nums]
# elif zero_counter>1:
# return [0 for i in range(N)]
# else:
# return [0 if num!=0 else total_prod for num in nums]
class Solution:
## without division
def productExceptSelf(self, nums: List[int]) -> List[int]:
N = len(nums)
# 1st pass get the left side prod
output = []
zero_counter = 0
for idx in range(N):
if nums[idx]==0:
zero_counter += 1
if zero_counter>1:
return [0 for i in range(N)]
if idx==0:
output.append(1)
else:
output.append(nums[idx-1]*output[-1])
# 2nd pass get the right side prod
rprod = 1
for idx in range(N-1,-1,-1):
if idx<N-1:
rprod = rprod*nums[idx+1]
output[idx] = output[idx]*rprod
return output
| class Solution:
def product_except_self(self, nums: List[int]) -> List[int]:
n = len(nums)
output = []
zero_counter = 0
for idx in range(N):
if nums[idx] == 0:
zero_counter += 1
if zero_counter > 1:
return [0 for i in range(N)]
if idx == 0:
output.append(1)
else:
output.append(nums[idx - 1] * output[-1])
rprod = 1
for idx in range(N - 1, -1, -1):
if idx < N - 1:
rprod = rprod * nums[idx + 1]
output[idx] = output[idx] * rprod
return output |
#!/usr/bin/env python3
def read_list_from_file(file_name):
f = open(file_name)
list = []
dict={}
for x in f:
list.append(x.strip())
f.close()
i=0
while i< len(list):
dict[list[i]] = list[i+1]
i=i+2
return dict
def is_verified(vin, password) -> bool:
dict = read_list_from_file("vin_pass.txt")
#print(dict)
ans=False
if(dict.get(vin)== password):
ans=True
else:
ans=False
return(ans)
| def read_list_from_file(file_name):
f = open(file_name)
list = []
dict = {}
for x in f:
list.append(x.strip())
f.close()
i = 0
while i < len(list):
dict[list[i]] = list[i + 1]
i = i + 2
return dict
def is_verified(vin, password) -> bool:
dict = read_list_from_file('vin_pass.txt')
ans = False
if dict.get(vin) == password:
ans = True
else:
ans = False
return ans |
class KaraboException(Exception):
"""
Base Exception thrown by the Karabo Pipeline
"""
| class Karaboexception(Exception):
"""
Base Exception thrown by the Karabo Pipeline
""" |
class Solution(object):
def numUniqueEmails(self, emails):
"""
:type emails: List[str]
:rtype: int
"""
seen = set()
for em in emails:
local,domain = em.split("@")
local = local.split("+")[0].replace(".","")
seen.add(local+"@"+domain)
return len(seen) | class Solution(object):
def num_unique_emails(self, emails):
"""
:type emails: List[str]
:rtype: int
"""
seen = set()
for em in emails:
(local, domain) = em.split('@')
local = local.split('+')[0].replace('.', '')
seen.add(local + '@' + domain)
return len(seen) |
class StringHash:
def __init__(self, text, base=997, mod=10 ** 18 + 3):
n = len(text)
self.text = text
self.base = base
self.mod = mod
self.power = [1] * (n + 2)
self.prefix_hash = [0] * (n + 2)
for i in range(1, n + 1):
self.power[i] = self.power[i - 1] * self.base % self.mod
self.prefix_hash[i] = (self.prefix_hash[i - 1] * self.base + ord(self.text[i - 1]) + 13) % self.mod
def get_hash(self, l, r):
return (self.prefix_hash[r + 1] - self.power[r - l + 1] * self.prefix_hash[l]) % self.mod
def main():
sh = StringHash('abracadabra')
assert sh.get_hash(0, 0) == sh.get_hash(3, 3)
assert sh.get_hash(0, 3) == sh.get_hash(7, 10)
assert sh.get_hash(0, 4) != sh.get_hash(5, 9)
if __name__ == '__main__':
main()
| class Stringhash:
def __init__(self, text, base=997, mod=10 ** 18 + 3):
n = len(text)
self.text = text
self.base = base
self.mod = mod
self.power = [1] * (n + 2)
self.prefix_hash = [0] * (n + 2)
for i in range(1, n + 1):
self.power[i] = self.power[i - 1] * self.base % self.mod
self.prefix_hash[i] = (self.prefix_hash[i - 1] * self.base + ord(self.text[i - 1]) + 13) % self.mod
def get_hash(self, l, r):
return (self.prefix_hash[r + 1] - self.power[r - l + 1] * self.prefix_hash[l]) % self.mod
def main():
sh = string_hash('abracadabra')
assert sh.get_hash(0, 0) == sh.get_hash(3, 3)
assert sh.get_hash(0, 3) == sh.get_hash(7, 10)
assert sh.get_hash(0, 4) != sh.get_hash(5, 9)
if __name__ == '__main__':
main() |
# !/usr/bin/env python3
# Author: C.K
# Email: theck17@163.com
# DateTime:2021-09-23 22:21:37
# Description:
class Solution:
def kthSmallest(self, matrix: List[List[int]], k: int) -> int:
m, n = len(matrix), len(
matrix[0]) # For general, the matrix need not be a square
def countLessOrEqual(x):
cnt = 0
c = n - 1 # start with the rightmost column
for r in range(m):
while c >= 0 and matrix[r][c] > x:
c -= 1 # decrease column until matrix[r][c] <= x
cnt += (c + 1)
return cnt
left, right = matrix[0][0], matrix[-1][-1]
ans = -1
while left <= right:
mid = (left + right) // 2
if countLessOrEqual(mid) >= k:
ans = mid
right = mid - 1 # try to looking for a smaller value in the left side
else:
left = mid + 1 # try to looking for a bigger value in the right side
return ans
if __name__ == "__main__":
pass
| class Solution:
def kth_smallest(self, matrix: List[List[int]], k: int) -> int:
(m, n) = (len(matrix), len(matrix[0]))
def count_less_or_equal(x):
cnt = 0
c = n - 1
for r in range(m):
while c >= 0 and matrix[r][c] > x:
c -= 1
cnt += c + 1
return cnt
(left, right) = (matrix[0][0], matrix[-1][-1])
ans = -1
while left <= right:
mid = (left + right) // 2
if count_less_or_equal(mid) >= k:
ans = mid
right = mid - 1
else:
left = mid + 1
return ans
if __name__ == '__main__':
pass |
# John McDonough
# github - movinalot
# Advent of Code 2015
testing = 0
debug = 0
day = "02"
year = "2015"
part = "1"
answer = None
with open("puzzle_data_" + day + "_" + year + ".txt") as f:
puzzle_data = f.read()
if testing:
puzzle_data = "2x3x4\n"\
"1x1x10\n"
if debug:
print(puzzle_data)
puzzle_data = puzzle_data.splitlines()
wrapping_paper = 0
for dimensions in puzzle_data:
sides = dimensions.split('x')
sq_feet_sides = [int(sides[0])* int(sides[1]),
int(sides[0])* int(sides[2]),
int(sides[1])* int(sides[2])]
sq_feet_sides.sort()
for sq_feet_side in sq_feet_sides:
wrapping_paper += sq_feet_side * 2
wrapping_paper += sq_feet_sides[0]
if debug:
print(sq_feet_sides, wrapping_paper)
answer = wrapping_paper
print("AoC Day: " + day + " Year: " + year + " part " + part + ", this is the answer:", answer)
| testing = 0
debug = 0
day = '02'
year = '2015'
part = '1'
answer = None
with open('puzzle_data_' + day + '_' + year + '.txt') as f:
puzzle_data = f.read()
if testing:
puzzle_data = '2x3x4\n1x1x10\n'
if debug:
print(puzzle_data)
puzzle_data = puzzle_data.splitlines()
wrapping_paper = 0
for dimensions in puzzle_data:
sides = dimensions.split('x')
sq_feet_sides = [int(sides[0]) * int(sides[1]), int(sides[0]) * int(sides[2]), int(sides[1]) * int(sides[2])]
sq_feet_sides.sort()
for sq_feet_side in sq_feet_sides:
wrapping_paper += sq_feet_side * 2
wrapping_paper += sq_feet_sides[0]
if debug:
print(sq_feet_sides, wrapping_paper)
answer = wrapping_paper
print('AoC Day: ' + day + ' Year: ' + year + ' part ' + part + ', this is the answer:', answer) |
class UserProfile:
def __init__(self, name: str = None):
self.name = name
def __str__(self):
return f"name:{self.name}" | class Userprofile:
def __init__(self, name: str=None):
self.name = name
def __str__(self):
return f'name:{self.name}' |
# Guess the encoding in .sav files created with SPSS v14 or earlier.
# Encoding information was added to the .sav file header in SPSS v15. Unicode support appeared in SPSS v16
# If the file is created on Windows [1], with SPSS v14 or older [2], and then opened on Linux/MacOS, the dict
# below is used to look up the Windows codepage that was most likely used to encode that file [3]
#
# [1] generic.Generic.systemString
# [2] generic.Generic.spssVersion
# [3] locale.getlocale()[0]
# source: https://www.microsoft.com/resources/msdn/goglobal/default.mspx?OS=Windows%20Vista
locale2codepage = \
{'af': '1252',
'af_ZA': '1252',
'am_ET': None,
'ar': '1256',
'arn_CL': '1252',
'ar_AE': '1256',
'ar_BH': '1256',
'ar_DZ': '1256',
'ar_EG': '1256',
'ar_IQ': '1256',
'ar_JO': '1256',
'ar_KW': '1256',
'ar_LB': '1256',
'ar_LY': '1256',
'ar_MA': '1256',
'ar_OM': '1256',
'ar_QA': '1256',
'ar_SA': '1256',
'ar_SY': '1256',
'ar_TN': '1256',
'ar_YE': '1256',
'as_IN': None,
'az': '1254',
'az_AZ@cyrl': '1251',
'az_AZ@latn': '1254',
'ba_RU': '1251',
'be': '1251',
'be_BY': '1251',
'bg': '1251',
'bg_BG': '1251',
'bn_BD': None,
'bn_IN': None,
'bo_CN': None,
'br_FR': '1252',
'bs_BA@cyrl': '1251',
'bs_BA@latn': '1250',
'ca': '1252',
'ca_ES': '1252',
'co_FR': '1252',
'cs': '1250',
'cs_CZ': '1250',
'cy_GB': '1252',
'da': '1252',
'da_DK': '1252',
'de': '1252',
'de_AT': '1252',
'de_CH': '1252',
'de_DE': '1252',
'de_LI': '1252',
'de_LU': '1252',
'div_MV': None,
'div': None,
'el': '1253',
'el_GR': '1253',
'en': '1252',
'en_029': '1252',
'en_AU': '1252',
'en_BZ': '1252',
'en_CA': '1252',
'en_GB': '1252',
'en_IE': '1252',
'en_IN': '1252',
'en_JM': '1252',
'en_MY': '1252',
'en_NZ': '1252',
'en_PH': '1252',
'en_SG': '1252',
'en_TT': '1252',
'en_US': '1252',
'en_ZA': '1252',
'en_ZW': '1252',
'es': '1252',
'es_AR': '1252',
'es_BO': '1252',
'es_CL': '1252',
'es_CO': '1252',
'es_CR': '1252',
'es_DO': '1252',
'es_EC': '1252',
'es_ES': '1252',
'es_GT': '1252',
'es_HN': '1252',
'es_MX': '1252',
'es_NI': '1252',
'es_PA': '1252',
'es_PE': '1252',
'es_PR': '1252',
'es_PY': '1252',
'es_SV': '1252',
'es_US': '1252',
'es_UY': '1252',
'es_VE': '1252',
'et': '1257',
'et_EE': '1257',
'eu': '1252',
'eu_ES': '1252',
'fa': '1256',
'fa_IR': '1256',
'fi': '1252',
'fiL_PH': '1252',
'fi_FI': '1252',
'fo': '1252',
'fo_FO': '1252',
'fr': '1252',
'fr_BE': '1252',
'fr_CA': '1252',
'fr_CH': '1252',
'fr_FR': '1252',
'fr_LU': '1252',
'fr_MC': '1252',
'fy_NL': '1252',
'ga_IE': '1252',
'gl': '1252',
'gl_ES': '1252',
'gsw_FR': '1252',
'gu': None,
'gu_IN': None,
'ha_NG@latn': '1252',
'he': '1255',
'he_IL': '1255',
'hi': None,
'hi_IN': None,
'hr': '1250',
'hr_BA': '1250',
'hr_HR': '1250',
'hu': '1250',
'hu_HU': '1250',
'hy': None,
'hy_AM': None,
'id': '1252',
'id_ID': '1252',
'ig_NG': '1252',
'ii_CN': None,
'is': '1252',
'is_IS': '1252',
'it': '1252',
'it_CH': '1252',
'it_IT': '1252',
'iu_CA@cans': None,
'iu_CA@latn': '1252',
'ja': '932',
'ja_JP': '932',
'ka': None,
'ka_GE': None,
'kk': '1251',
'kk_KZ': '1251',
'kl_GL': '1252',
'km_KH': None,
'kn': None,
'kn_IN': None,
'ko': '949',
'koK_IN': None,
'ko_KR': '949',
'kok': None,
'ky': '1251',
'ky_KG': '1251',
'lb_LU': '1252',
'lo_LA': None,
'lt': '1257',
'lt_LT': '1257',
'lv': '1257',
'lv_LV': '1257',
'mi_NZ': None,
'mk': '1251',
'mk_MK': '1251',
'ml_IN': None,
'mn': '1251',
'mn_CN@mong': None,
'mn_MN': '1251',
'moh_CA': '1252',
'mr': None,
'mr_IN': None,
'ms': '1252',
'ms_BN': '1252',
'ms_MY': '1252',
'mt_MT': None,
'nb_NO': '1252',
'ne_NP': None,
'nl': '1252',
'nl_BE': '1252',
'nl_NL': '1252',
'nn_NO': '1252',
'no': '1252',
'nsO_ZA': '1252',
'oc_FR': '1252',
'or_IN': None,
'pa': None,
'pa_IN': None,
'pl': '1250',
'pl_PL': '1250',
'prs_AF': '1256',
'ps_AF': None,
'pt': '1252',
'pt_BR': '1252',
'pt_PT': '1252',
'qut_GT': '1252',
'quz_BO': '1252',
'quz_EC': '1252',
'quz_PE': '1252',
'rm_CH': '1252',
'ro': '1250',
'ro_RO': '1250',
'ru': '1251',
'ru_RU': '1251',
'rw_RW': '1252',
'sa': None,
'sah_RU': '1251',
'sa_IN': None,
'se_FI': '1252',
'se_NO': '1252',
'se_SE': '1252',
'si_LK': None,
'sk': '1250',
'sk_SK': '1250',
'sl': '1250',
'sl_SI': '1250',
'sma_NO': '1252',
'sma_SE': '1252',
'smj_NO': '1252',
'smj_SE': '1252',
'smn_FI': '1252',
'sms_FI': '1252',
'sq': '1250',
'sq_AL': '1250',
'sr': '1251',
'sr_BA@cyrl': '1251',
'sr_BA@latn': '1250',
'sr_SP@cyrl': '1251',
'sr_SP@latn': '1250',
'sv': '1252',
'sv_FI': '1252',
'sv_SE': '1252',
'sw': '1252',
'sw_KE': '1252',
'syr_SY': None,
'syr': None,
'ta': None,
'ta_IN': None,
'te': None,
'te_IN': None,
'tg_TJ@cyrl': '1251',
'th': '874',
'th_TH': '874',
'tk_TM': '1250',
'tn_ZA': '1252',
'tr': '1254',
'tr_TR': '1254',
'tt': '1251',
'tt_RU': '1251',
'tzm_DZ@latn': '1252',
'ug_CN': '1256',
'uk': '1251',
'uk_UA': '1251',
'ur': '1256',
'ur_PK': '1256',
'uz': '1254',
'uz_UZ@cyrl': '1251',
'uz_UZ@latn': '1254',
'vi': '1258',
'vi_VN': '1258',
'wee_DE': '1252',
'wen_DE': '1252',
'wo_SN': '1252',
'xh_ZA': '1252',
'yo_NG': '1252',
'zh_CN': '936',
'zh_HANS': '936',
'zh_HANT': '950',
'zh_HK': '950',
'zh_MO': '950',
'zh_SG': '936',
'zh_TW': '950',
'zu_ZA': '1252'}
| locale2codepage = {'af': '1252', 'af_ZA': '1252', 'am_ET': None, 'ar': '1256', 'arn_CL': '1252', 'ar_AE': '1256', 'ar_BH': '1256', 'ar_DZ': '1256', 'ar_EG': '1256', 'ar_IQ': '1256', 'ar_JO': '1256', 'ar_KW': '1256', 'ar_LB': '1256', 'ar_LY': '1256', 'ar_MA': '1256', 'ar_OM': '1256', 'ar_QA': '1256', 'ar_SA': '1256', 'ar_SY': '1256', 'ar_TN': '1256', 'ar_YE': '1256', 'as_IN': None, 'az': '1254', 'az_AZ@cyrl': '1251', 'az_AZ@latn': '1254', 'ba_RU': '1251', 'be': '1251', 'be_BY': '1251', 'bg': '1251', 'bg_BG': '1251', 'bn_BD': None, 'bn_IN': None, 'bo_CN': None, 'br_FR': '1252', 'bs_BA@cyrl': '1251', 'bs_BA@latn': '1250', 'ca': '1252', 'ca_ES': '1252', 'co_FR': '1252', 'cs': '1250', 'cs_CZ': '1250', 'cy_GB': '1252', 'da': '1252', 'da_DK': '1252', 'de': '1252', 'de_AT': '1252', 'de_CH': '1252', 'de_DE': '1252', 'de_LI': '1252', 'de_LU': '1252', 'div_MV': None, 'div': None, 'el': '1253', 'el_GR': '1253', 'en': '1252', 'en_029': '1252', 'en_AU': '1252', 'en_BZ': '1252', 'en_CA': '1252', 'en_GB': '1252', 'en_IE': '1252', 'en_IN': '1252', 'en_JM': '1252', 'en_MY': '1252', 'en_NZ': '1252', 'en_PH': '1252', 'en_SG': '1252', 'en_TT': '1252', 'en_US': '1252', 'en_ZA': '1252', 'en_ZW': '1252', 'es': '1252', 'es_AR': '1252', 'es_BO': '1252', 'es_CL': '1252', 'es_CO': '1252', 'es_CR': '1252', 'es_DO': '1252', 'es_EC': '1252', 'es_ES': '1252', 'es_GT': '1252', 'es_HN': '1252', 'es_MX': '1252', 'es_NI': '1252', 'es_PA': '1252', 'es_PE': '1252', 'es_PR': '1252', 'es_PY': '1252', 'es_SV': '1252', 'es_US': '1252', 'es_UY': '1252', 'es_VE': '1252', 'et': '1257', 'et_EE': '1257', 'eu': '1252', 'eu_ES': '1252', 'fa': '1256', 'fa_IR': '1256', 'fi': '1252', 'fiL_PH': '1252', 'fi_FI': '1252', 'fo': '1252', 'fo_FO': '1252', 'fr': '1252', 'fr_BE': '1252', 'fr_CA': '1252', 'fr_CH': '1252', 'fr_FR': '1252', 'fr_LU': '1252', 'fr_MC': '1252', 'fy_NL': '1252', 'ga_IE': '1252', 'gl': '1252', 'gl_ES': '1252', 'gsw_FR': '1252', 'gu': None, 'gu_IN': None, 'ha_NG@latn': '1252', 'he': '1255', 'he_IL': '1255', 'hi': None, 'hi_IN': None, 'hr': '1250', 'hr_BA': '1250', 'hr_HR': '1250', 'hu': '1250', 'hu_HU': '1250', 'hy': None, 'hy_AM': None, 'id': '1252', 'id_ID': '1252', 'ig_NG': '1252', 'ii_CN': None, 'is': '1252', 'is_IS': '1252', 'it': '1252', 'it_CH': '1252', 'it_IT': '1252', 'iu_CA@cans': None, 'iu_CA@latn': '1252', 'ja': '932', 'ja_JP': '932', 'ka': None, 'ka_GE': None, 'kk': '1251', 'kk_KZ': '1251', 'kl_GL': '1252', 'km_KH': None, 'kn': None, 'kn_IN': None, 'ko': '949', 'koK_IN': None, 'ko_KR': '949', 'kok': None, 'ky': '1251', 'ky_KG': '1251', 'lb_LU': '1252', 'lo_LA': None, 'lt': '1257', 'lt_LT': '1257', 'lv': '1257', 'lv_LV': '1257', 'mi_NZ': None, 'mk': '1251', 'mk_MK': '1251', 'ml_IN': None, 'mn': '1251', 'mn_CN@mong': None, 'mn_MN': '1251', 'moh_CA': '1252', 'mr': None, 'mr_IN': None, 'ms': '1252', 'ms_BN': '1252', 'ms_MY': '1252', 'mt_MT': None, 'nb_NO': '1252', 'ne_NP': None, 'nl': '1252', 'nl_BE': '1252', 'nl_NL': '1252', 'nn_NO': '1252', 'no': '1252', 'nsO_ZA': '1252', 'oc_FR': '1252', 'or_IN': None, 'pa': None, 'pa_IN': None, 'pl': '1250', 'pl_PL': '1250', 'prs_AF': '1256', 'ps_AF': None, 'pt': '1252', 'pt_BR': '1252', 'pt_PT': '1252', 'qut_GT': '1252', 'quz_BO': '1252', 'quz_EC': '1252', 'quz_PE': '1252', 'rm_CH': '1252', 'ro': '1250', 'ro_RO': '1250', 'ru': '1251', 'ru_RU': '1251', 'rw_RW': '1252', 'sa': None, 'sah_RU': '1251', 'sa_IN': None, 'se_FI': '1252', 'se_NO': '1252', 'se_SE': '1252', 'si_LK': None, 'sk': '1250', 'sk_SK': '1250', 'sl': '1250', 'sl_SI': '1250', 'sma_NO': '1252', 'sma_SE': '1252', 'smj_NO': '1252', 'smj_SE': '1252', 'smn_FI': '1252', 'sms_FI': '1252', 'sq': '1250', 'sq_AL': '1250', 'sr': '1251', 'sr_BA@cyrl': '1251', 'sr_BA@latn': '1250', 'sr_SP@cyrl': '1251', 'sr_SP@latn': '1250', 'sv': '1252', 'sv_FI': '1252', 'sv_SE': '1252', 'sw': '1252', 'sw_KE': '1252', 'syr_SY': None, 'syr': None, 'ta': None, 'ta_IN': None, 'te': None, 'te_IN': None, 'tg_TJ@cyrl': '1251', 'th': '874', 'th_TH': '874', 'tk_TM': '1250', 'tn_ZA': '1252', 'tr': '1254', 'tr_TR': '1254', 'tt': '1251', 'tt_RU': '1251', 'tzm_DZ@latn': '1252', 'ug_CN': '1256', 'uk': '1251', 'uk_UA': '1251', 'ur': '1256', 'ur_PK': '1256', 'uz': '1254', 'uz_UZ@cyrl': '1251', 'uz_UZ@latn': '1254', 'vi': '1258', 'vi_VN': '1258', 'wee_DE': '1252', 'wen_DE': '1252', 'wo_SN': '1252', 'xh_ZA': '1252', 'yo_NG': '1252', 'zh_CN': '936', 'zh_HANS': '936', 'zh_HANT': '950', 'zh_HK': '950', 'zh_MO': '950', 'zh_SG': '936', 'zh_TW': '950', 'zu_ZA': '1252'} |
#!/usr/bin/env python3
"""
Program purpose: Splits a string on ' ' and join same string with '-'
Program author : Happi Yvan
Author email :
"""
def split_and_join(some_str):
_list = some_str.split(' ')
return '-'.join(_list)
def main():
data = input("\n\tEnter a string: ")
data_joined = split_and_join(data)
print("\tJoined data : %s" % data_joined)
if __name__ == "__main__":
print("\n\t=========[ PROGRAM: Split a string on ' ' and join on '-']======")
main()
| """
Program purpose: Splits a string on ' ' and join same string with '-'
Program author : Happi Yvan
Author email :
"""
def split_and_join(some_str):
_list = some_str.split(' ')
return '-'.join(_list)
def main():
data = input('\n\tEnter a string: ')
data_joined = split_and_join(data)
print('\tJoined data : %s' % data_joined)
if __name__ == '__main__':
print("\n\t=========[ PROGRAM: Split a string on ' ' and join on '-']======")
main() |
class Result:
def __init__(self, text, value):
self.text = text
self.value = value
| class Result:
def __init__(self, text, value):
self.text = text
self.value = value |
# Small alphabet r using fucntion
def for_r():
""" *'s printed in the shape of r """
for row in range(5):
for col in range(5):
if col ==1 and row !=0 or row ==0 and col in (0,2,3) or row ==1 and col ==4:
print('*',end=' ')
else:
print(' ',end=' ')
print()
def while_r():
""" *'s printed in the Shape of Small r """
row =0
while row <5:
col =0
while col <5:
if col ==1 and row !=0 or row ==0 and col in (0,2,3) or row ==1 and col ==4:
print('*',end=' ')
else:
print(' ',end=' ')
col+=1
print()
row +=1
| def for_r():
""" *'s printed in the shape of r """
for row in range(5):
for col in range(5):
if col == 1 and row != 0 or (row == 0 and col in (0, 2, 3)) or (row == 1 and col == 4):
print('*', end=' ')
else:
print(' ', end=' ')
print()
def while_r():
""" *'s printed in the Shape of Small r """
row = 0
while row < 5:
col = 0
while col < 5:
if col == 1 and row != 0 or (row == 0 and col in (0, 2, 3)) or (row == 1 and col == 4):
print('*', end=' ')
else:
print(' ', end=' ')
col += 1
print()
row += 1 |
expected_output = {
'our_address': {
'10.229.1.2': {
'neighbor_address': {
'10.229.1.1': {
'demand_mode': 0,
'elapsed_time_watermarks': '0 0',
'elapsed_time_watermarks_last': 0,
'handle': 1,
'hello': 500,
'hello_hits': 544,
'holddown': 2561,
'holddown_hits': 0,
'interface': 'GigabitEthernet2',
'last_packet': {
'c_bit': 1,
'demand_bit': 0,
'diagnostic': 0,
'final_bit': 0,
'length': 24,
'min_echo_int': 0,
'min_rx_int': 500000,
'min_tx_int': 500000,
'multiplier': 6,
'my_discr': 16,
'poll_bit': 0,
'state_bit': 'Up',
'version': 1,
'your_discr': 4097,
},
'ld_rd': '4097/16',
'local_diag': 0,
'min_rx_int': 300000,
'min_tx_int': 500000,
'multiplier': 6,
'poll_bit': 0,
'received_min_rx_int': 500000,
'received_multiplier': 6,
'registered_protocols': ['OSPF', 'CEF'],
'rh_rs': 'Up',
'rx': {
'avg_int_ms': 503,
'count': 388,
'last_ms_ago': 439,
'max_int_ms': 1997,
'min_int_ms': 499,
},
'session': {
'echo_function': False,
'state': 'UP',
},
'session_host': 'Software',
'state': 'Up',
'tx': {
'avg_int_ms': 443,
'count': 442,
'last_ms_ago': 76,
'max_int_ms': 1823,
'min_int_ms': 3,
},
'up_time': '00:03:15',
},
},
},
},
}
| expected_output = {'our_address': {'10.229.1.2': {'neighbor_address': {'10.229.1.1': {'demand_mode': 0, 'elapsed_time_watermarks': '0 0', 'elapsed_time_watermarks_last': 0, 'handle': 1, 'hello': 500, 'hello_hits': 544, 'holddown': 2561, 'holddown_hits': 0, 'interface': 'GigabitEthernet2', 'last_packet': {'c_bit': 1, 'demand_bit': 0, 'diagnostic': 0, 'final_bit': 0, 'length': 24, 'min_echo_int': 0, 'min_rx_int': 500000, 'min_tx_int': 500000, 'multiplier': 6, 'my_discr': 16, 'poll_bit': 0, 'state_bit': 'Up', 'version': 1, 'your_discr': 4097}, 'ld_rd': '4097/16', 'local_diag': 0, 'min_rx_int': 300000, 'min_tx_int': 500000, 'multiplier': 6, 'poll_bit': 0, 'received_min_rx_int': 500000, 'received_multiplier': 6, 'registered_protocols': ['OSPF', 'CEF'], 'rh_rs': 'Up', 'rx': {'avg_int_ms': 503, 'count': 388, 'last_ms_ago': 439, 'max_int_ms': 1997, 'min_int_ms': 499}, 'session': {'echo_function': False, 'state': 'UP'}, 'session_host': 'Software', 'state': 'Up', 'tx': {'avg_int_ms': 443, 'count': 442, 'last_ms_ago': 76, 'max_int_ms': 1823, 'min_int_ms': 3}, 'up_time': '00:03:15'}}}}} |
# https://leetcode.com/problems/check-if-a-string-is-a-valid-sequence-from-root-to-leaves-path-in-a-binary-tree
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def __init__(self):
self.ans = False
def backtrack(self, node, index):
if self.ans:
return
if index == len(self.arr) - 1:
if not node.left and not node.right:
self.ans = True
return
return
if node.left and node.left.val == self.arr[index + 1]:
self.backtrack(node.left, index + 1)
if node.right and node.right.val == self.arr[index + 1]:
self.backtrack(node.right, index + 1)
def isValidSequence(self, root, arr):
if not root or arr[0] != root.val:
return False
self.arr = arr
self.backtrack(root, 0)
return self.ans
| class Treenode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
class Solution:
def __init__(self):
self.ans = False
def backtrack(self, node, index):
if self.ans:
return
if index == len(self.arr) - 1:
if not node.left and (not node.right):
self.ans = True
return
return
if node.left and node.left.val == self.arr[index + 1]:
self.backtrack(node.left, index + 1)
if node.right and node.right.val == self.arr[index + 1]:
self.backtrack(node.right, index + 1)
def is_valid_sequence(self, root, arr):
if not root or arr[0] != root.val:
return False
self.arr = arr
self.backtrack(root, 0)
return self.ans |
SECRET_KEY = '00000000'
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'news'
]
| secret_key = '00000000'
installed_apps = ['django.contrib.auth', 'django.contrib.contenttypes', 'news'] |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
a = [1, 2, 3]
b = [*a, 4, 5, 6]
if __name__ == '__main__':
print(b)
| a = [1, 2, 3]
b = [*a, 4, 5, 6]
if __name__ == '__main__':
print(b) |
difference_list=[]
prime_num=open("/home/grey/Desktop/Primenum/prime.txt","r")
prime_list = prime_num.readlines()
length_of_primelist=len(prime_list)
def get_patterns(prime_list):
size_of_list=len(prime_list)
i=0
while(i<size_of_list-1):
d=int(prime_list[i+1])-int(prime_list[i])
difference_list.append(d)
i+=1
return(difference_list)
prime_num=open("/home/grey/Desktop/Primenum/prime.txt","r")
prime_list = prime_num.readlines()
prime_num.close()
get_patterns(prime_list)
#These are some random stats that you might find interesting
print(difference_list)
| difference_list = []
prime_num = open('/home/grey/Desktop/Primenum/prime.txt', 'r')
prime_list = prime_num.readlines()
length_of_primelist = len(prime_list)
def get_patterns(prime_list):
size_of_list = len(prime_list)
i = 0
while i < size_of_list - 1:
d = int(prime_list[i + 1]) - int(prime_list[i])
difference_list.append(d)
i += 1
return difference_list
prime_num = open('/home/grey/Desktop/Primenum/prime.txt', 'r')
prime_list = prime_num.readlines()
prime_num.close()
get_patterns(prime_list)
print(difference_list) |
DEPS = [
'depot_tools/depot_tools',
'depot_tools/gsutil',
'flutter/os_utils',
'flutter/zip',
'recipe_engine/buildbucket',
'recipe_engine/file',
'recipe_engine/path',
'recipe_engine/properties',
'recipe_engine/runtime',
'recipe_engine/step',
'recipe_engine/uuid',
]
| deps = ['depot_tools/depot_tools', 'depot_tools/gsutil', 'flutter/os_utils', 'flutter/zip', 'recipe_engine/buildbucket', 'recipe_engine/file', 'recipe_engine/path', 'recipe_engine/properties', 'recipe_engine/runtime', 'recipe_engine/step', 'recipe_engine/uuid'] |
class Solution:
def minTransfers(self, transactions: List[List[int]]) -> int:
balance = [0] * 21
for u, v, amount in transactions:
balance[u] -= amount
balance[v] += amount
debt = [b for b in balance if b]
def dfs(s: int) -> int:
while s < len(debt) and not debt[s]:
s += 1
if s == len(debt):
return 0
ans = math.inf
for i in range(s + 1, len(debt)):
if debt[i] * debt[s] < 0:
debt[i] += debt[s] # debt[s] is settled
ans = min(ans, 1 + dfs(s + 1))
debt[i] -= debt[s] # backtrack
return ans
return dfs(0)
| class Solution:
def min_transfers(self, transactions: List[List[int]]) -> int:
balance = [0] * 21
for (u, v, amount) in transactions:
balance[u] -= amount
balance[v] += amount
debt = [b for b in balance if b]
def dfs(s: int) -> int:
while s < len(debt) and (not debt[s]):
s += 1
if s == len(debt):
return 0
ans = math.inf
for i in range(s + 1, len(debt)):
if debt[i] * debt[s] < 0:
debt[i] += debt[s]
ans = min(ans, 1 + dfs(s + 1))
debt[i] -= debt[s]
return ans
return dfs(0) |
_base_ = [
'../common/mstrain-poly_3x_coco_instance.py',
'../_base_/models/mask_rcnn_r50_fpn.py'
]
model = dict(pretrained='torchvision://resnet101', backbone=dict(depth=101))
| _base_ = ['../common/mstrain-poly_3x_coco_instance.py', '../_base_/models/mask_rcnn_r50_fpn.py']
model = dict(pretrained='torchvision://resnet101', backbone=dict(depth=101)) |
# Definition for singly-linked list.
class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution:
def reverseBetween(self, head: ListNode, m: int, n: int) -> ListNode:
if not head:
return head
prevNode, curr = None, head
while m > 1:
prevNode = curr
curr = curr.next
m -= 1
n -= 1
prevTargetNode = prevNode
targetNode = curr
while n > 0:
nextNode = curr.next
curr.next = prevNode
prevNode = curr
curr = nextNode
n -= 1
if prevTargetNode:
prevTargetNode.next = prevNode
else:
head = prevNode
targetNode.next = curr
return head
| class Listnode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
class Solution:
def reverse_between(self, head: ListNode, m: int, n: int) -> ListNode:
if not head:
return head
(prev_node, curr) = (None, head)
while m > 1:
prev_node = curr
curr = curr.next
m -= 1
n -= 1
prev_target_node = prevNode
target_node = curr
while n > 0:
next_node = curr.next
curr.next = prevNode
prev_node = curr
curr = nextNode
n -= 1
if prevTargetNode:
prevTargetNode.next = prevNode
else:
head = prevNode
targetNode.next = curr
return head |
class FrontEnd:
def dropdown_from_dataframe(self, name, df, chosen_col):
"""
Create text to use for rendering an HTML dropdown from a DataFrame.
Render by using {{ df|safe }} in your HTML file.
Parameters
--------
name: str
Name you'd like for the dropdown
df: DataFrame
chosen_col: str
Which column's values will populate the dropdown
Returns
--------
html_choices: str
String you can use to render HTML
"""
html_choices = f"""<select id="{name}" name="{name}" width: 400px;><option value="---">---</option>"""
df.sort_values(by=chosen_col, inplace=True, ascending=True)
for option in df[chosen_col].unique():
html_choices += f"""<option value="{option}">{option}</option>"""
html_choices += """</select>"""
return html_choices
| class Frontend:
def dropdown_from_dataframe(self, name, df, chosen_col):
"""
Create text to use for rendering an HTML dropdown from a DataFrame.
Render by using {{ df|safe }} in your HTML file.
Parameters
--------
name: str
Name you'd like for the dropdown
df: DataFrame
chosen_col: str
Which column's values will populate the dropdown
Returns
--------
html_choices: str
String you can use to render HTML
"""
html_choices = f'<select id="{name}" name="{name}" width: 400px;><option value="---">---</option>'
df.sort_values(by=chosen_col, inplace=True, ascending=True)
for option in df[chosen_col].unique():
html_choices += f'<option value="{option}">{option}</option>'
html_choices += '</select>'
return html_choices |
# 103. Binary Tree Zigzag Level Order Traversal
# Runtime: 28 ms, faster than 91.36% of Python3 online submissions for Binary Tree Zigzag Level Order Traversal.
# Memory Usage: 14.5 MB, less than 42.40% of Python3 online submissions for Binary Tree Zigzag Level Order Traversal.
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
# Depth-First Search
def zigzagLevelOrder(self, root: TreeNode) -> list[list[int]]:
if root is None:
return []
ans = []
def dfs(node: TreeNode, lvl: int) -> None:
if lvl >= len(ans):
ans.append([node.val])
elif lvl % 2 == 0:
ans[lvl].append(node.val)
else:
ans[lvl].insert(0, node.val)
for next in [node.left, node.right]:
if next:
dfs(next, lvl + 1)
dfs(root, 0)
return ans | class Solution:
def zigzag_level_order(self, root: TreeNode) -> list[list[int]]:
if root is None:
return []
ans = []
def dfs(node: TreeNode, lvl: int) -> None:
if lvl >= len(ans):
ans.append([node.val])
elif lvl % 2 == 0:
ans[lvl].append(node.val)
else:
ans[lvl].insert(0, node.val)
for next in [node.left, node.right]:
if next:
dfs(next, lvl + 1)
dfs(root, 0)
return ans |
def extractEachKth(inputArray, k):
index = []
z = [x for x in range(0,len(inputArray)) if (x+1)%k!=0]
[index.append(inputArray[z[y]]) for y in range(len(z))]
return(index)
| def extract_each_kth(inputArray, k):
index = []
z = [x for x in range(0, len(inputArray)) if (x + 1) % k != 0]
[index.append(inputArray[z[y]]) for y in range(len(z))]
return index |
class intCodeVM():
def __init__(self, inp : str):
self.__input = inp
self.__instructionList = [int(i) for i in open(inp).read().split(",")]
self.__programCounter = 0
self.__correspondingInputs = {
1:3,
2:3,
3:1,
4:1,
5:2,
6:2,
7:3,
8:3,
99:0
}
def add(inp):
self.__instructionList[inp[2]] = inp[0]+inp[1]
def multiply(inp):
self.__instructionList[inp[2]] = inp[0]*inp[1]
def takeInput(inp):
self.__instructionList[inp[0]] = int(input("Please give an input:\n"))
def output(inp):
if (inp[1] != "lit"):
print(self.__instructionList[inp[0]])
else:
print(inp[0])
def jump_if_true(inp):
if inp[0] != 0:
self.__programCounter = inp[1]
def jump_if_false(inp):
if inp[0] == 0:
self.__programCounter = inp[1]
def less_than(inp):
self.__instructionList[inp[2]] = 1 if inp[0] < inp[1] else 0
def equals(inp):
self.__instructionList[inp[2]] = 1 if inp[0] == inp[1] else 0
def halt(inp):
self.__finished = True
return
self.__correspondingFunctions = {
1:add,
2:multiply,
3:takeInput,
4:output,
5:jump_if_true,
6:jump_if_false,
7:less_than,
8:equals,
99:halt
}
def getInstructions(self):
return self.__instructionList
def executeCurrentInstruction(self):
instruction = str(self.__instructionList[self.__programCounter])
while len(instruction) != 5:
instruction = "0"+instruction
addressingModes = instruction[0:-2]
opcode = (int(instruction[-2:]))
noInputs = self.__correspondingInputs[opcode]
self.__programCounter += 1
inp = []
for i in range(noInputs):
mode = int(addressingModes[-(i+1)])
if (mode == 0):
if i == noInputs - 1:
inp.append(self.__instructionList[self.__programCounter])
else:
inp.append(self.__instructionList[self.__instructionList[self.__programCounter]])
if opcode == 4:
inp.append("pos")
else:
inp.append(self.__instructionList[self.__programCounter])
if opcode == 4:
inp.append("lit")
self.__programCounter += 1
print(opcode, inp)
self.__correspondingFunctions[opcode](inp)
def executeUntilEnd(self):
self.__finished, self.__error = False, False
while (not self.__finished and not self.__error):
self.executeCurrentInstruction()
def getLocation(self, n : int):
return self.__instructionList[n]
def replaceInstruction(self, pos : int, newVal : int):
self.__instructionList[pos] = newVal
def reset(self):
self.__init__(self.__input)
comp = intCodeVM("input2.txt")
#comp.replaceInstruction(1, 12); comp.replaceInstruction(2, 2)
comp.executeUntilEnd()
#print(comp.getLocation(0))
comp.reset()
| class Intcodevm:
def __init__(self, inp: str):
self.__input = inp
self.__instructionList = [int(i) for i in open(inp).read().split(',')]
self.__programCounter = 0
self.__correspondingInputs = {1: 3, 2: 3, 3: 1, 4: 1, 5: 2, 6: 2, 7: 3, 8: 3, 99: 0}
def add(inp):
self.__instructionList[inp[2]] = inp[0] + inp[1]
def multiply(inp):
self.__instructionList[inp[2]] = inp[0] * inp[1]
def take_input(inp):
self.__instructionList[inp[0]] = int(input('Please give an input:\n'))
def output(inp):
if inp[1] != 'lit':
print(self.__instructionList[inp[0]])
else:
print(inp[0])
def jump_if_true(inp):
if inp[0] != 0:
self.__programCounter = inp[1]
def jump_if_false(inp):
if inp[0] == 0:
self.__programCounter = inp[1]
def less_than(inp):
self.__instructionList[inp[2]] = 1 if inp[0] < inp[1] else 0
def equals(inp):
self.__instructionList[inp[2]] = 1 if inp[0] == inp[1] else 0
def halt(inp):
self.__finished = True
return
self.__correspondingFunctions = {1: add, 2: multiply, 3: takeInput, 4: output, 5: jump_if_true, 6: jump_if_false, 7: less_than, 8: equals, 99: halt}
def get_instructions(self):
return self.__instructionList
def execute_current_instruction(self):
instruction = str(self.__instructionList[self.__programCounter])
while len(instruction) != 5:
instruction = '0' + instruction
addressing_modes = instruction[0:-2]
opcode = int(instruction[-2:])
no_inputs = self.__correspondingInputs[opcode]
self.__programCounter += 1
inp = []
for i in range(noInputs):
mode = int(addressingModes[-(i + 1)])
if mode == 0:
if i == noInputs - 1:
inp.append(self.__instructionList[self.__programCounter])
else:
inp.append(self.__instructionList[self.__instructionList[self.__programCounter]])
if opcode == 4:
inp.append('pos')
else:
inp.append(self.__instructionList[self.__programCounter])
if opcode == 4:
inp.append('lit')
self.__programCounter += 1
print(opcode, inp)
self.__correspondingFunctions[opcode](inp)
def execute_until_end(self):
(self.__finished, self.__error) = (False, False)
while not self.__finished and (not self.__error):
self.executeCurrentInstruction()
def get_location(self, n: int):
return self.__instructionList[n]
def replace_instruction(self, pos: int, newVal: int):
self.__instructionList[pos] = newVal
def reset(self):
self.__init__(self.__input)
comp = int_code_vm('input2.txt')
comp.executeUntilEnd()
comp.reset() |
DATA_DIR = "C:/Users/udiyo/OneDrive - mail.tau.ac.il/Research/data"
EXTENSION = "csv.gz"
COMPRESSION = "infer"
COL_NAMES = {
0: "_id",
1: "raw_time",
2: "temperature",
3: "pressure",
4: "humidity",
5: "light",
6: "magnetic_tot",
7: "magnetic_x",
8: "magnetic_y",
9: "magnetic_z",
10: "acc_tot",
11: "acc_x",
12: "acc_y",
13: "acc_z",
14: "lat",
15: "lng",
16: "model",
17: "tz_offset"
} | data_dir = 'C:/Users/udiyo/OneDrive - mail.tau.ac.il/Research/data'
extension = 'csv.gz'
compression = 'infer'
col_names = {0: '_id', 1: 'raw_time', 2: 'temperature', 3: 'pressure', 4: 'humidity', 5: 'light', 6: 'magnetic_tot', 7: 'magnetic_x', 8: 'magnetic_y', 9: 'magnetic_z', 10: 'acc_tot', 11: 'acc_x', 12: 'acc_y', 13: 'acc_z', 14: 'lat', 15: 'lng', 16: 'model', 17: 'tz_offset'} |
class Settings():
class QQ():
position_a = (10,10)
position_c = (1500,10)
size = (300,400)
| class Settings:
class Qq:
position_a = (10, 10)
position_c = (1500, 10)
size = (300, 400) |
# CollatzSequence
# Objective: When entering in any number, the Collatz Sequence will evaluate down to 1.
def collatz():
try:
number = int(input("Enter number: "))
while True:
if number == 1 or number == 0:
break
elif number % 2 == 0:
number = number // 2
print(number)
elif number % 2 == 1:
number = 3 * number + 1
print(number)
except:
print("Enter in a valid number")
collatz()
| def collatz():
try:
number = int(input('Enter number: '))
while True:
if number == 1 or number == 0:
break
elif number % 2 == 0:
number = number // 2
print(number)
elif number % 2 == 1:
number = 3 * number + 1
print(number)
except:
print('Enter in a valid number')
collatz() |
"""
Entradas
Chelines--->float--->CHA
Dracmas--->float-DRG
Pesetas--->float--->PST
Salidas
Pesetas--->float---PST
Francos Franceses--->float--->FRA
dolares--->float--->USD
Liras--->float--->LIR
"""
print("Chelines a Pesetas: ")
CHA=float(input("Ingrese el valor en chelines: "))
PST=((CHA*956871)/100)
print("El valor en pesetas es: "+str(PST))
print("Dracmas a francos: ")
DRA=float(input("Ingrese el valor en dracmas: "))
PST=((DRA*88607)/100)
FRA=(PST/20110)
print("El valor en francos es: "+str(FRA))
print("Pesetas a dolares y liras italianas: ")
PST=float(input("Escriba el valor en pesetas: "))
USD=(PST/122499)
LIR=((PST*100)/9289)
print("El valor en dolares es: "+str(USD))
print("El valor en liras es: "+str(LIR)) | """
Entradas
Chelines--->float--->CHA
Dracmas--->float-DRG
Pesetas--->float--->PST
Salidas
Pesetas--->float---PST
Francos Franceses--->float--->FRA
dolares--->float--->USD
Liras--->float--->LIR
"""
print('Chelines a Pesetas: ')
cha = float(input('Ingrese el valor en chelines: '))
pst = CHA * 956871 / 100
print('El valor en pesetas es: ' + str(PST))
print('Dracmas a francos: ')
dra = float(input('Ingrese el valor en dracmas: '))
pst = DRA * 88607 / 100
fra = PST / 20110
print('El valor en francos es: ' + str(FRA))
print('Pesetas a dolares y liras italianas: ')
pst = float(input('Escriba el valor en pesetas: '))
usd = PST / 122499
lir = PST * 100 / 9289
print('El valor en dolares es: ' + str(USD))
print('El valor en liras es: ' + str(LIR)) |
class Solution:
def exclusiveTime(self, n: int, logs: List[str]) -> List[int]:
ftimes = [0]*n
stack = []
pre_start_time = 0
for log in logs:
f_id, which, f_time = log.split(":")
f_id, f_time = int(f_id), int(f_time)
if which == "start":
if stack:
ftimes[stack[-1]] += f_time - pre_start_time
stack.append(f_id)
pre_start_time = f_time
else:
ftimes[stack.pop()] += f_time - pre_start_time + 1
pre_start_time = f_time + 1
return ftimes
| class Solution:
def exclusive_time(self, n: int, logs: List[str]) -> List[int]:
ftimes = [0] * n
stack = []
pre_start_time = 0
for log in logs:
(f_id, which, f_time) = log.split(':')
(f_id, f_time) = (int(f_id), int(f_time))
if which == 'start':
if stack:
ftimes[stack[-1]] += f_time - pre_start_time
stack.append(f_id)
pre_start_time = f_time
else:
ftimes[stack.pop()] += f_time - pre_start_time + 1
pre_start_time = f_time + 1
return ftimes |
def count_chars(s: str) -> dict:
"""Checking the chars number in a str example
:param s: {str}
:return: {dict}
"""
count_dict = {}
for c in s:
if c in count_dict:
count_dict[c] += 1
else:
count_dict[c] = 1
return count_dict
| def count_chars(s: str) -> dict:
"""Checking the chars number in a str example
:param s: {str}
:return: {dict}
"""
count_dict = {}
for c in s:
if c in count_dict:
count_dict[c] += 1
else:
count_dict[c] = 1
return count_dict |
# Copyright 2013-2021 Aerospike, 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.
QUERIES = """
/***************************************************
* System Resource *
****************************************************/
// SET CONSTRAINT VERSION <= 3.8.4;
// SET CONSTRAINT VERSION < 3.8.4;
// SET CONSTRAINT VERSION >= 3.8.4;
// SET CONSTRAINT VERSION > 3.8.4;
// SET CONSTRAINT VERSION = 3.8.4;
// SET CONSTRAINT VERSION 3.8.4;
// SET CONSTRAINT VERSION IN [3.8.4, 3.10.0];
/* Variables */
error_pct_threshold = 1;
SET CONSTRAINT VERSION ALL;
/* System checks */
limit = select "Soft_Max_open_files" as "fd" from SYSTEM.LIMITS save;
limit = group by CLUSTER, NODE, KEY do SUM(limit);
config = select "proto-fd-max" as "fd" from SERVICE.CONFIG save;
r = do config < limit;
ASSERT(r, True, "File descriptor is configured higher than limit.", "LIMITS", INFO,
"Listed node[s] have proto-fd-limit set higher than system soft limit of Max open files. Aerospike process may run out of file descriptor, Possible misconfiguration.",
"System open file descriptor limit check.");
s = select * from SYSTEM.HDPARM save;
r = group by KEY do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different Disk Hardware in cluster.", "OPERATIONS", INFO,
"Different disk hardware configuration across multiple nodes in cluster.", "Disk hardware check.");
s = select "OOM" from SYSTEM.DMESG save;
ASSERT(s, False, "DMESG: Process Out of Memory kill.", "OPERATIONS", INFO,
"Certain process was killed due to Out Of Memory. Check dmesg or system log.",
"System OOM kill check.");
s = select "Blocked" from SYSTEM.DMESG save;
ASSERT(s, False, "DMESG: Process blocking.", "OPERATIONS", INFO,
"Certain process was blocked for more than 120sec. Check dmesg or system log.",
"System process blocking Check.");
s = select "OS" from SYSTEM.DMESG save;
r = group by NODE do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different OS version in cluster.", "OPERATIONS", INFO,
"Different version of OS running across multiple nodes in cluster.", "OS version check.");
s = select * from SYSTEM.LSCPU save;
r = group by KEY do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "CPU configuration mismatch.", "OPERATIONS", INFO,
"Listed node[s] in the cluster are running with different CPU or CPU setting, performance may be skewed. Please run 'lscpu' to check CPU configuration.",
"CPU config check.");
s = select "vm_drop_caches", "vm_nr_hugepages", "vm_nr_hugepages_policy", "vm_numa_zonelist_order", "vm_oom_dump_tasks", "vm_oom_kill_allocating_task", "vm_zone_reclaim_mode", "vm_swapiness",
"vm_nr_overcommit_hugepages", "kernel_shmmax", "kernel_shmall", "kernel_version" from SYSTEM.SYSCTLALL save;
r = group by KEY do NO_MATCH(s, ==, MAJORITY);
ASSERT(r, False, "Sysctl configuration mismatch.", "OPERATIONS", INFO,
"Listed node[s] in the cluster are running with different Sysctl setting. Please run 'sysctl -a' to check CPU configuration.",
"Sysctl config check.");
s = select "has_firewall" from SYSTEM.IPTABLES;
ASSERT(s, False, "Node in cluster have firewall setting.", "OPERATIONS", INFO,
"Listed node[s] have firewall setting. Could cause cluster formation issue if misconfigured. Please run 'iptables -L' to check firewall rules.",
"Firewall Check.");
s = select "AnonHugePages" from SYSTEM.MEMINFO save;
r = do s < 102400;
ASSERT(r, True, "THP may be enabled.", "OPERATIONS", WARNING,
"Listed node[s] have AnonHugePages higher than 102400KiB. Node[s] may have THP enabled which may cause higher memory usage. See https://discuss.aerospike.com/t/disabling-transparent-huge-pages-thp-for-aerospike/5233 for more info.",
"System THP enabled check");
/* AWS */
l = select "os_age_months" from SYSTEM.LSB save;
r = do l > 12;
ASSERT(r, False, "Old Amazon Linux AMI.", "OPERATIONS", WARNING,
"Amazon Linux AMI is older than 12 months. It might causes periodic latency spikes probably due to a driver issue.",
"Amazon Linux AMI version check.");
s = select "ENA_enabled" from SYSTEM.DMESG;
aws_enabled = select "platform" from SYSTEM.ENVIRONMENT;
aws_enabled = do aws_enabled == "aws";
aws_enabled = group by CLUSTER, NODE do OR(aws_enabled);
ASSERT(s, True, "ENA not enabled.", "OPERATIONS", INFO,
"ENA is not enabled on AWS instance. Please check with Aerospike support team.",
"ENA enable check.", aws_enabled);
/* Disk */
s = select "%util" from SYSTEM.IOSTAT save;
r = do s > 90;
ASSERT(r, False, "High system disk utilization.", "PERFORMANCE", CRITICAL,
"Listed disks show higher than normal (> 90%) disk utilization at the time of sampling. Please run 'iostat' command to check disk utilization. Possible causes can be disk overload due to undersized cluster or some issue with disk hardware itself. If running on cloud, can be a problem with cloud instance itself.",
"Disk utilization check.");
r1 = group by DEVICE do SD_ANOMALY(s, ==, 3);
ASSERT(r1, False, "Skewed cluster disk utilization.", "ANOMALY", WARNING,
"Listed disks show different disk utilization compared to other node[s]. Please run 'iostat' command on those node[s] to confirm such behavior. Possible causes can be skew in workload (e.g hotkey) and/or issue with disk on the specific node[s] which show anomalistic behavior.",
"Disk utilization Anomaly.");
avail=select like(".*available_pct") as "free_disk" from NAMESPACE.STATISTICS save;
disk_free = select "device_free_pct" as "free_disk", "free-pct-disk" as "free_disk" from NAMESPACE.STATISTICS save;
r = do disk_free - avail save as "fragmented blocks pct";
r = do r <= 30;
r = group by CLUSTER, NAMESPACE r;
ASSERT(r, True, "High (> 30%) fragmented blocks.", "PERFORMANCE", WARNING,
"Listed namespace[s] have higher than normal (>30%) fragmented blocks at the time of sampling. Please run 'show config namespace like defrag' to check defrag configurations. Possible cause can be Aerospike disk defragmentation not keeping up with write rate and/or large record sizes causing fragmentation. Refer to knowledge base article discuss.aerospike.com/t/defragmentation for more details.",
"Fragmented Blocks check.");
s = select "%iowait" from SYSTEM.IOSTAT save;
r = do s > 10;
ASSERT(r, False, "High (> 10%) CPU IO wait time.", "PERFORMANCE", WARNING,
"Listed nodes show higher than normal (> 10%) CPU spent in io wait. Please run 'iostat' command to check utilization. Possible cause can be slow disk or network leading to lot of CPU time spent waiting for IO.",
"CPU IO wait time check.");
r1 = group by NODE do SD_ANOMALY(s, ==, 3);
ASSERT(r1, False, "Skewed CPU IO wait time.", "ANOMALY", WARNING,
"Listed nodes show skew in CPU IO wait time compared to other nodes in cluster. Please run 'iostat' command to check utilization. Possible cause can be skew in workload (e.g hotkey) and/or slow network/disk on the specific node[s] which show anomalistic behavior.",
"CPU IO wait time anomaly.");
s = select "await" from SYSTEM.IOSTAT save;
r = do s > 4;
ASSERT(r, False, "High system disk average wait time.", "PERFORMANCE", WARNING,
"Listed disks show higher than normal (> 4ms) disk average wait time. Please run 'iostat' command to check average wait time (await). Possible cause can be issue with disk hardware or VM instance in case you are running in cloud environment. This may also be caused by having storage over network like say SAN device or EBS.",
"Disk average wait time check.");
r1 = group by DEVICE do SD_ANOMALY(s, ==, 3);
ASSERT(r1, False, "Skewed cluster disk average wait time", "ANOMALY", WARNING,
"Listed disks show different average wait time characteristic compared to other node[s]. Please run 'iostat' command on those node[s] to confirm such behavior. Possible can be skew in workload (e.g hotkey) and/or disk issue on the specific node[s] which should anomalistic behavior.",
"Disk average wait time anomaly check.");
s = select "avgqu-sz" from SYSTEM.IOSTAT save;
r = do s > 7;
ASSERT(r, False, "High disk average queue size.", "PERFORMANCE", INFO,
"Listed disks show higher than normal (> 7) disk average queue size. This is not a issue if using NVME drives which support more queues. Please run 'iostat' command to check average wait time (avgqu-sz). Possible disk overload. This may be non-issue of disk has more than 7 queues. Please analyze this number in conjunction with utilization.",
"Disk avg queue size check.");
r1 = group by DEVICE do SD_ANOMALY(s, ==, 3);
ASSERT(r1, False, "Skewed cluster disk avg queue size.", "ANOMALY", WARNING,
"Listed disks show different average queue size characteristic compared to other node[s]. Please run 'iostat' command on those node[s] to confirm such behavior. Possible issue can be differential load on these node[s] or issue with disk.",
"Disk avg queue size anomaly check.");
s = select "id" as "cpu_use" from SYSTEM.TOP.CPU_UTILIZATION save as "cpu_idle_pct";
s = do 100 - s save as "cpu utilization pct";
r = do s > 70;
ASSERT(r, False, "High system CPU utilization.", "PERFORMANCE", CRITICAL,
"Listed node[s] are showing higher than normal (> 70%) CPU utilization. Please check top output. Possible system overload.",
"CPU utilization check.");
r1 = group by CLUSTER, KEY do SD_ANOMALY(s, ==, 3);
ASSERT(r1, False, "Skewed cluster CPU utilization.", "ANOMALY", WARNING,
"Listed node[s] show different CPU utilization characteristic compared to other node[s]. Please run top command on those node[s] to confirm such behavior. Possible skew in workload.",
"CPU utilization anomaly check.");
s = select "resident_memory" from SYSTEM.TOP save;
r = group by KEY do SD_ANOMALY(s, ==, 3);
ASSERT(r, False, "Skewed cluster resident memory utilization.", "ANOMALY", WARNING,
"Listed node[s] show different resident memory usage compared to other node[s]. Please run top command on those node[s] to confirm such behavior. Possible skewed data distribution. This may be non-issue in case migrations are going on.",
"Resident memory utilization anomaly.");
s = select "system_swapping" from SERVICE.STATISTICS save;
r = do s == true;
ASSERT(r, False, "System memory swapping.", "LIMITS", INFO,
"Listed node[s] are swapping. Please run 'show statistics service like system_swapping' to confirm such behaviour. Possible misconfiguration. This may be non-issue if amount of swap is small and good amount of memory available.",
"System swap check.");
/* TODO - is it really actually an issue */
s = select "system_free_mem_pct" from SERVICE.STATISTICS save;
r = do s < 20;
ASSERT(r, False, "Low system memory percentage.", "LIMITS", CRITICAL,
"Listed node[s] have lower than normal (< 20%) system free memory percentage. Please run 'show statistics service like system_free_mem_pct' to get actual values. Possible misconfiguration.",
"System memory percentage check.");
f = select "memory_free_pct" as "stats", "free-pct-memory" as "stats" from NAMESPACE.STATISTICS save;
s = select "stop-writes-pct" as "stats" from NAMESPACE.CONFIG save;
u = do 100 - f save as "memory_used_pct";
r = do u <= s;
ASSERT(r, True, "Low namespace memory available pct (stop-write enabled).", "OPERATIONS", CRITICAL,
"Listed namespace[s] have lower than normal (< (100 - memory_free_pct)) available memory space. Probable cause - namespace size misconfiguration.",
"Critical Namespace memory available pct check.");
/* NB : ADD CHECKS IF NODES ARE NOT HOMOGENOUS MEM / NUM CPU etc */
s = select "available_bin_names", "available-bin-names" from NAMESPACE save;
r = group by NAMESPACE do s > 3200;
ASSERT(r, True, "Low namespace available bin names.", "LIMITS", WARNING,
"Listed node[s] have low available bin name (< 3200) for corresponding namespace[s]. Maximum unique bin names allowed per namespace are 32k. Please run 'show statistics namespace like available' to get actual values. Possible improperly modeled data.",
"Namespace available bin names check.");
/* Holds only upto 4B key */
SET CONSTRAINT VERSION < 3.12;
s = select "memory-size" from NAMESPACE.CONFIG save;
r = group by CLUSTER, NODE, NAMESPACE do SUM(s);
e = do r <= 274877906944;
ASSERT(e, True, "Namespace configured to use more than 256G.", "LIMITS", WARNING,
"On listed nodes namespace as mentioned have configured more than 256G of memory. Namespace with data not in memory can have max upto 4 billion keys and can utilize only up to 256G. Please run 'show statistics namespace like memory-size' to check configured memory.",
"Namespace per node memory limit check.");
SET CONSTRAINT VERSION ALL;
/*
Following query selects assigned memory-size from namespace config and total ram size from system statistics.
group by for namespace stats sums all memory size and gives node level memory size.
group by for system stats helps to remove key, this is requirement for proper matching for simple operations.
*/
s = select "memory-size" from NAMESPACE.CONFIG save;
n = group by NODE do SUM(s) save as "sum of memory-size";
s = select "total" from SYSTEM.FREE.MEM;
m = group by NODE do SUM(s) save as "total physical memory";
r = do n <= m on common;
ASSERT(r, True, "Namespace memory misconfiguration.", "LIMITS", WARNING,
"Listed node[s] have more namespace memory configured than available physical memory. Please run 'show statistics namespace like memory-size' to check configured memory and check output of 'free' for system memory. Possible namespace misconfiguration.",
"Namespace memory configuration check.");
r = do m - n on common save as "runtime memory";
r = do r >= 5368709120;
ASSERT(r, True, "Aerospike runtime memory configured < 5G.", "LIMITS", INFO,
"Listed node[s] have less than 5G free memory available for Aerospike runtime. Please run 'show statistics namespace like memory-size' to check configured memory and check output of 'free' for system memory. Possible misconfiguration.",
"Runtime memory configuration check.");
/*
Current configurations and config file values difference check
*/
oc = select * from SERVICE.ORIGINAL_CONFIG save;
c = select * from SERVICE.CONFIG save;
r = do oc == c on common;
ASSERT(r, True, "Service configurations different than config file values.", "OPERATIONS", INFO,
"Listed Service configuration[s] are different than actual initial value set in aerospike.conf file.",
"Service config runtime and conf file difference check.");
oc = select * from NETWORK.ORIGINAL_CONFIG save;
c = select * from NETWORK.CONFIG save;
r = do oc == c on common;
ASSERT(r, True, "Network configurations different than config file values.", "OPERATIONS", INFO,
"Listed Network configuration[s] are different than actual initial value set in aerospike.conf file.",
"Network config runtime and conf file difference check.");
oc = select * from NAMESPACE.ORIGINAL_CONFIG save;
c = select * from NAMESPACE.CONFIG save;
r = do oc == c on common;
ASSERT(r, True, "Namespace configurations different than config file values.", "OPERATIONS", INFO,
"Listed namespace configuration[s] are different than actual initial value set in aerospike.conf file.",
"Namespace config runtime and conf file difference check.");
oc = select * from XDR.ORIGINAL_CONFIG save;
c = select * from XDR.CONFIG save;
r = do oc == c on common;
ASSERT(r, True, "XDR configurations different than config file values.", "OPERATIONS", INFO,
"Listed XDR configuration[s] are different than actual initial value set in aerospike.conf file.",
"XDR config runtime and conf file difference check.");
oc = select * from DC.ORIGINAL_CONFIG save;
c = select * from DC.CONFIG save;
r = do oc == c on common;
ASSERT(r, True, "DC configurations different than config file values.", "OPERATIONS", INFO,
"Listed DC configuration[s] are different than actual initial value set in aerospike.conf file.",
"DC config runtime and conf file difference check.");
/*
Following query selects proto-fd-max from service config and client_connections from service statistics.
It uses as clause to get proper matching structure for simple operation.
*/
max = select "proto-fd-max" as "fd" from SERVICE.CONFIG save;
conn = select "client_connections" as "fd" from SERVICE.STATISTICS save;
bound = do 80 %% max;
r = do conn > bound;
ASSERT(r, False, "High system client connections.", "OPERATIONS", WARNING,
"Listed node[s] show higher than normal client-connections (> 80% of the max configured proto-fd-max). Please run 'show config like proto-fd-max' and 'show statistics like client_connections' for actual values. Possible can be network issue / improper client behavior / FD leak.",
"Client connections check.");
s = select like(".*available_pct") as "stats" from NAMESPACE.STATISTICS save;
m = select like(".*min-avail-pct") as "stats" from NAMESPACE.CONFIG save;
critical_check = do s >= m;
ASSERT(critical_check, True, "Low namespace disk available pct (stop-write enabled).", "OPERATIONS", CRITICAL,
"Listed namespace[s] have lower than normal (< min-avail-pct) available disk space. Probable cause - namespace size misconfiguration.",
"Critical Namespace disk available pct check.");
critical_check = do s < m;
r = do s >= 20;
r = do r || critical_check;
ASSERT(r, True, "Low namespace disk available pct.", "OPERATIONS", WARNING,
"Listed namespace[s] have lower than normal (< 20 %) available disk space. Probable cause - namespace size misconfiguration.",
"Namespace disk available pct check.");
s = select * from SERVICE.CONFIG ignore "heartbeat.mtu", "node-id-interface", "node-id", "pidfile", like(".*address"), like(".*port") save;
r = group by CLUSTER, KEY do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different service configurations.", "OPERATIONS", WARNING,
"Listed Service configuration[s] are different across multiple nodes in cluster. Please run 'show config service diff' to check different configuration values. Probable cause - config file misconfiguration.",
"Service configurations difference check.");
multicast_mode_enabled = select like(".*mode") from NETWORK.CONFIG;
multicast_mode_enabled = do multicast_mode_enabled == "multicast";
multicast_mode_enabled = group by CLUSTER, NODE do OR(multicast_mode_enabled);
s = select like(".*mtu") from SERVICE.CONFIG save;
r = group by CLUSTER do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different heartbeat.mtu.", "OPERATIONS", WARNING,
"Listed node[s] have a different heartbeat.mtu configured. A multicast packet can only be as large as the interface mtu. Different mtu values might create cluster stability issue. Please contact Aerospike Support team.",
"heartbeat.mtu check.",
multicast_mode_enabled);
interval = select "heartbeat.interval" from NETWORK.CONFIG save;
r1 = do interval < 150;
r2 = do interval > 250;
r = do r1 || r2;
ASSERT(r, False, "Heartbeat interval is not in expected range (150 <= p <= 250)", "OPERATIONS", INFO,
"Listed nodes(s) have heartbeat interval value not in expected range (150 <= p <= 250). New node might fail to join cluster.",
"Heartbeat interval Check (150 <= p <= 250)");
timeout = select "heartbeat.timeout" from NETWORK.CONFIG save;
r1 = do timeout < 10;
r2 = do timeout > 15;
r = do r1 || r2;
ASSERT(r, False, "Heartbeat timeout is not in expected range (10 <= p <= 15)", "OPERATIONS", INFO,
"Listed nodes(s) have heartbeat timeout value not in expected range (10 <= p <= 15). New node might fail to join cluster.",
"Heartbeat timeout Check (10 <= p <= 15)");
s = select "migrate-threads", "migrate_threads" from SERVICE.CONFIG save;
r = do s > 1;
ASSERT(r, False, "> 1 migrate thread configured.", "OPERATIONS", INFO,
"Listed node[s] are running with higher than normal (> 1) migrate threads. Please run 'show config service like migrate-threads' to check migration configuration. Is a non-issue if requirement is to run migration aggressively. Otherwise possible operational misconfiguration.",
"Migration thread configuration check.");
/* Device Configuration */
s = select "scheduler" from SYSTEM.SCHEDULER save;
r = do s == "noop";
ASSERT(r, True, "Non-recommended IO scheduler.", "OPERATIONS", WARNING,
"Listed device[s] have not configured with noop scheduler. This might create situation like slow data migrations. Please contact Aerospike Support team. Ignore if device is not used in any namespace.",
"Device IO scheduler check.");
f = select "name" from SYSTEM.DF;
d = select like(".*device.*") from NAMESPACE.CONFIG save;
r = do APPLY_TO_ANY(d, IN, f);
ASSERT(r, False, "Device name misconfigured.", "OPERATIONS", WARNING,
"Listed device[s] have partitions on same node. This might create situation like data corruption where data written to main drive gets overwritten/corrupted from data written to or deleted from the partition with the same name.",
"Device name misconfiguration check.");
s = select "device_total_bytes", "device-total-bytes", "total-bytes-disk" from NAMESPACE.STATISTICS save;
r = group by CLUSTER, NAMESPACE do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different namespace device size configuration.", "OPERATIONS", WARNING,
"Listed namespace[s] have difference in configured disk size. Please run 'show statistics namespace like bytes' to check total device size. Probable cause - config file misconfiguration.",
"Namespace device size configuration difference check.");
hwm = select "high-water-disk-pct" from NAMESPACE.CONFIG save;
hwm = group by CLUSTER, NAMESPACE hwm;
r = do hwm == 50;
ASSERT(r, True, "Non-default namespace device high water mark configuration.", "OPERATIONS", INFO,
"Listed namespace[s] have non-default high water mark configuration. Please run 'show config namespace like high-water-disk-pct' to check value. Probable cause - config file misconfiguration.",
"Non-default namespace device high water mark check.");
lwm = select like(".*defrag-lwm-pct") from NAMESPACE.CONFIG save;
lwm = group by CLUSTER, NAMESPACE lwm;
r = do lwm == 50;
ASSERT(r, True, "Non-default namespace device low water mark configuration.", "OPERATIONS", INFO,
"Listed namespace[s] have non-default low water mark configuration. Probable cause - config file misconfiguration.",
"Non-default namespace device low water mark check.");
hwm = select "high-water-disk-pct" as "defrag-lwm-pct" from NAMESPACE.CONFIG save;
lwm = select like(".*defrag-lwm-pct") as "defrag-lwm-pct" from NAMESPACE.CONFIG save;
r = do lwm < hwm on common;
r = group by CLUSTER, NAMESPACE r;
ASSERT(r, False, "Defrag low water mark misconfigured.", "OPERATIONS", WARNING,
"Listed namespace[s] have defrag-lwm-pct lower than high-water-disk-pct. This might create situation like no block to write, no eviction and no defragmentation. Please run 'show config namespace like high-water-disk-pct defrag-lwm-pct' to check configured values. Probable cause - namespace watermark misconfiguration.",
"Defrag low water mark misconfiguration check.");
commit_to_device = select "storage-engine.commit-to-device" from NAMESPACE.CONFIG;
commit_to_device = group by CLUSTER, NAMESPACE commit_to_device;
ASSERT(commit_to_device, False, "Namespace has COMMIT-TO-DEVICE", "OPERATIONS" , INFO,
"Listed namespace(s) have commit-to-device=true. Please run 'show config namespace like commit-to-device' for details.",
"Namespace COMMIT-TO-DEVICE check.");
number_of_sets = select "set" from SET.STATISTICS;
number_of_sets = GROUP BY CLUSTER, NAMESPACE, NODE do COUNT_ALL(number_of_sets);
p = GROUP BY CLUSTER, NAMESPACE do MAX(number_of_sets) save as "sets_count";
warning_check = do p >= 1000;
ASSERT(warning_check, False, "High set count per namespace", "LIMITS", WARNING,
"Listed namespace(s) have high number of set count (>=1000). Please run in AQL 'show sets' for details",
"Critical Namespace Set Count Check (>=1000)");
correct_range_check = do p < 750;
r = do warning_check || correct_range_check;
ASSERT(r, True, "Number of Sets equal to or above 750", "LIMITS", INFO,
"Listed namespace(s) have high number of set count (>=750). Please run in AQL 'show sets' for details",
"Basic Set Count Check (750 <= p < 1000)");
stop_writes = select "stop_writes" from NAMESPACE.STATISTICS;
stop_writes = group by CLUSTER, NAMESPACE stop_writes;
ASSERT(stop_writes, False, "Namespace has hit stop-writes (stop_writes = true)", "OPERATIONS" , CRITICAL,
"Listed namespace(s) have hit stop-write. Please run 'show statistics namespace like stop_writes' for details.",
"Namespace stop-writes flag check.");
clock_skew_stop_writes = select "clock_skew_stop_writes" from NAMESPACE.STATISTICS;
clock_skew_stop_writes = group by CLUSTER, NAMESPACE clock_skew_stop_writes;
ASSERT(clock_skew_stop_writes, False, "Namespace has hit clock-skew-stop-writes (clock_skew_stop_writes = true)", "OPERATIONS" , CRITICAL,
"Listed namespace(s) have hit clock-skew-stop-writes. Please run 'show statistics namespace like clock_skew_stop_writes' for details.",
"Namespace clock-skew-stop-writes flag check.");
SET CONSTRAINT VERSION < 4.3;
device = select "file", "storage-engine.file" as "file", "device", "storage-engine.device" as "device" from NAMESPACE.CONFIG save;
device = do SPLIT(device);
r = do UNIQUE(device);
ASSERT(r, True, "Duplicate device/file configured.", "OPERATIONS", CRITICAL,
"Listed namespace[s] have duplication in device/file configuration. This might corrupt data. Please configure device/file names carefully.",
"Duplicate device/file check.");
SET CONSTRAINT VERSION ALL;
/*
Following query collects used device space and total device space and computes available free space on each node per namespace per cluster (group by CLUSTER, NAMESPACE, NODE).
It collects cluster-size and uses it to find out expected data distribution for each node in case that node is down. It checks max of this computed value per namespace
with available space per node per namespace.
*/
t = select "device_total_bytes" as "disk_space", "device-total-bytes" as "disk_space", "total-bytes-disk" as "disk_space" from NAMESPACE.STATISTICS;
u = select "used-bytes-disk" as "disk_space", "device_used_bytes" as "disk_space" from NAMESPACE.STATISTICS;
/* Available extra space */
e = do t - u;
e = group by CLUSTER, NAMESPACE, NODE do SUM(e) save as "available device space";
s = select "cluster_size" as "size" from SERVICE;
n = do MAX(s);
n = do n - 1;
/* Extra space need if 1 node goes down */
e1 = do u / n;
e1 = group by CLUSTER, NAMESPACE do MAX(e1) save as "distribution share of used device space per node";
r = do e > e1;
ASSERT(r, True, "Namespace under configured (disk) for single node failure.", "OPERATIONS", WARNING,
"Listed namespace[s] does not have enough disk space configured to deal with increase in data per node in case of 1 node failure. Please run 'show statistics namespace like bytes' to check device space. It is non-issue if single replica limit is set to larger values, i.e if number of replica copies are reduced in case of node loss.",
"Namespace single node failure disk config check.");
/*
Same as above query but for memory
*/
t = select "memory-size" as "mem" from NAMESPACE.CONFIG;
u = select "used-bytes-memory" as "mem", "memory_used_bytes" as "mem" from NAMESPACE.STATISTICS;
/* Available extra space */
e = do t - u;
e = group by CLUSTER, NAMESPACE, NODE do SUM(e) save as "available memory space";
s = select "cluster_size" as "size" from SERVICE;
n = do MAX(s);
n = do n - 1;
/* Extra space need if 1 node goes down */
e1 = do u / n;
e1 = group by CLUSTER, NAMESPACE do MAX(e1) save as "distribution share of used memory space per node";
r = do e > e1;
ASSERT(r, True, "Namespace under configured (memory) for single node failure.", "OPERATIONS", WARNING,
"Listed namespace[s] does not have enough memory space configured to deal with increase in data per node in case of 1 node failure. Please run 'show statistics namespace like bytes' to check memory space. It is non-issue if single replica limit is set to larger values, i.e number of replica copies reduce.",
"Namespace single node failure memory config check.");
/* Namespace Configuration */
SET CONSTRAINT VERSION < 3.13;
nsid = select "nsid" from NAMESPACE.CONFIG;
r = group by CLUSTER, NAMESPACE do NO_MATCH(nsid, ==, MAJORITY) save;
ASSERT(r, False, "Different namespace order in aerospike conf.", "OPERATIONS", CRITICAL,
"Listed namespace[s] have different order on different nodes. Please check aerospike conf file on all nodes and change configuration to make namespace order same.",
"Namespace order check.");
SET CONSTRAINT VERSION ALL;
repl = select "replication-factor", "repl-factor" from NAMESPACE.CONFIG;
repl = group by CLUSTER, NAMESPACE repl;
ns_count = group by CLUSTER do COUNT(repl) save as "total available namespaces for cluster";
ns_count_per_node = group by CLUSTER, NODE do COUNT(repl) save as "namespace count";
r = do ns_count_per_node == ns_count;
ASSERT(r, True, "Disparate namespaces.", "OPERATIONS", WARNING,
"Listed node[s] do not have all namespaces configured. Please check aerospike conf file on all nodes and change namespace configuration as per requirement.",
"Namespaces per node count check.");
r = select "replication-factor", "repl-factor" from NAMESPACE.CONFIG save;
r = group by CLUSTER, NAMESPACE r;
r = do r == 2;
ASSERT(r, True, "Non-default namespace replication-factor configuration.", "OPERATIONS", INFO,
"Listed namespace[s] have non-default replication-factor configuration. Please run 'show config namespace like repl' to check value. It may be non-issue in case namespace are configured for user requirement. Ignore those.",
"Non-default namespace replication-factor check.");
s = select * from NAMESPACE.CONFIG ignore "rack-id", like(".*device"), like(".*file") save;
r = group by CLUSTER, NAMESPACE, KEY do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different namespace configurations.", "OPERATIONS", WARNING,
"Listed namespace configuration[s] are different across multiple nodes in cluster. Please run 'show config namespace diff' to get actual difference. It may be non-issue in case namespace are configured with different device or file name etc. Ignore those.",
"Namespace configurations difference check.");
/* Errors */
s = select like(".*_err.*") from SERVICE.STATISTICS save;
u = select "uptime" from SERVICE.STATISTICS;
u = group by CLUSTER, NODE do MAX(u);
s = do s / u;
r = group by KEY do SD_ANOMALY(s, ==, 3);
ASSERT(r, False, "Skewed cluster service errors count.", "ANOMALY", INFO,
"Listed service errors[s] show skew in error count patterns (for listed node[s]). Please run 'show statistics service like err' for details.",
"Service errors count anomaly check.");
e = select "hwm_breached", "hwm-breached" from NAMESPACE.STATISTICS;
e = group by CLUSTER, NAMESPACE e;
r = do e == False;
ASSERT(r, True, "Namespace HWM breached.", "OPERATIONS", WARNING,
"Listed namespace[s] show HWM breached for memory or Disks.",
"Namespace HWM breach check.");
/*
Following query collects master_objects, prole_objects and replication_factor, and computes proles for one replication (prole_objects/(replication_factor-1)).
After that it find out master and prole distribution is in correct range with each other or not,
this last result will 'AND' with replication_enabled and migration_in_progress bools to avoid wrong assert failure
*/
m = select "master_objects" as "cnt", "master-objects" as "cnt" from NAMESPACE.STATISTICS;
p = select "prole_objects" as "cnt", "prole-objects" as "cnt" from NAMESPACE.STATISTICS;
r = select "effective_replication_factor", "repl-factor" from NAMESPACE.STATISTICS;
mg = select "migrate_rx_partitions_active", "migrate_progress_recv", "migrate-rx-partitions-active" from NAMESPACE.STATISTICS;
mt = group by NAMESPACE do SUM(m) save as "master_objects";
pt = group by NAMESPACE do SUM(p);
r = group by NAMESPACE do MAX(r);
mg = group by NAMESPACE do MAX(mg);
no_migration = do mg == 0;
replication_enabled = do r > 1;
r = do r - 1;
pt = do pt / r save as "unique prole_objects";
discounted_pt = do 95 %% pt save as "95% of unique prole_objects";
d = do discounted_pt > mt;
d = do d && replication_enabled;
d = do d && no_migration;
ASSERT(d, False, "Skewed namespace data distribution, prole objects exceed master objects by > 5%.", "DATA", INFO,
"Listed namespace[s] show abnormal object distribution. It may not be an issue if migrations are in progress. Please run 'show statistics namespace like object' for actual counts.",
"Namespace data distribution check (prole objects exceed master objects by > 5%).");
discounted_mt = do 95 %% mt save as "95% of master_objects";
d = group by NAMESPACE do discounted_mt > pt;
d = do d && replication_enabled;
d = do d && no_migration;
ASSERT(d, False, "Skewed namespace data distribution, master objects exceed prole objects by > 5%.", "DATA", INFO,
"Listed namespace[s] show abnormal object distribution. It may not be an issue if migrations are in progress. Please run 'show statistics namespace like object' for actual counts.",
"Namespace data distribution check (master objects exceed prole objects by > 5%).");
s = select "set-delete", "deleting" as "set-delete" from SET save;
r = group by CLUSTER, NAMESPACE, SET do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different set delete status.", "OPERATIONS", INFO,
"Listed set[s] have different set delete status across multiple nodes in cluster. This is non-issue if set-delete is being performed. Nodes reset the status asynchronously. Please check if nsup is still delete data for the set.",
"Set delete status check.");
s = select like ("disable-eviction") from SET save;
r = group by CLUSTER, NAMESPACE, SET do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different set eviction configuration.", "OPERATIONS", WARNING,
"Listed set[s] have different eviction setting across multiple nodes in cluster. Please run 'show statistics set like disable-eviction' to check values. Possible operational misconfiguration.",
"Set eviction configuration difference check.");
s = select "n_objects", "objects" from SET save;
r = group by CLUSTER, NAMESPACE, SET do SD_ANOMALY(s, ==, 3);
ASSERT(r, False, "Skewed cluster set object count.", "ANOMALY", WARNING,
"Listed set[s] have skewed object distribution. Please run 'show statistics set like object' to check counts. It may be non-issue if cluster is undergoing migrations.",
"Set object count anomaly check.");
/* XDR < 5 */
SET CONSTRAINT VERSION < 5.0;
s = select like ("set-enable-xdr") from SET save;
r = group by CLUSTER, NAMESPACE, SET do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different set xdr configuration.", "OPERATIONS", WARNING,
"Listed set[s] have different XDR replication setting across multiple nodes in cluster. Please run 'show statistics set like set-enable-xdr' to check values. Possible operational misconfiguration.",
"Set xdr configuration difference check.");
s = select * from XDR.CONFIG save;
r = GROUP by CLUSTER, KEY do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different XDR configurations.", "OPERATIONS", WARNING,
"Listed XDR configuration[s] are different across multiple nodes in cluster. Please run 'show config xdr diff' to get difference. Possible operational misconfiguration.",
"XDR configurations difference check.");
s = select * from XDR.STATISTICS save;
u = select "uptime" from SERVICE.STATISTICS;
u = group by CLUSTER, NODE do MAX(u);
s = do s / u;
r = group by CLUSTER, KEY do SD_ANOMALY(s, ==, 3);
ASSERT(r, False, "Skewed cluster XDR statistics.", "ANOMALY", WARNING,
"Listed XDR statistic[s] show skew for the listed node[s]. It may or may not be an issue depending on the statistic type.",
"XDR statistics anomaly check.");
s = select * from DC.STATISTICS ignore "dc_size", "dc_state" save;
u = select "uptime" from SERVICE.STATISTICS;
u = group by CLUSTER, NODE do MAX(u);
s = do s / u on common;
r = group by CLUSTER, DC, KEY do SD_ANOMALY(s, ==, 3);
ASSERT(r, False, "Skewed cluster remote DC statistics.", "ANOMALY", WARNING,
"Listed DC statistic[s] show skew for the listed node[s]. Please run 'show statistics dc' to get all DC stats. May be non-issue if remote Data center connectivity behavior for nodes is not same.",
"Remote DC statistics anomaly check.");
/*
Following xdr queries are example of assert level check condition. We are considering assert only if provided condition is true (at least for one key).
Also we use same condition variable to filter keys for output. So we are using group by (CLUSTER, NODE), it makes condition variable values matching with
assert input data structure, only exceptions are data which grouped by DC, in that case key filtration will not be possible.
*/
xdr_enabled = select "enable-xdr" from XDR.CONFIG;
xdr_enabled = group by CLUSTER, NODE do OR(xdr_enabled);
cluster_xdr_enabled = group by CLUSTER do OR(xdr_enabled);
s = select "xdr-dc-state", "dc_state" from DC.STATISTICS save;
r = group by CLUSTER, DC do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different remote DC states.", "OPERATIONS", WARNING,
"Listed DC[s] have a different remote DC visibility. Please run 'show statistics dc like state' to see DC state. Possible network issue between data centers.",
"Remote DC state check.",
xdr_enabled);
s = select "dc_size" from DC.STATISTICS save;
r = group by CLUSTER, DC do NO_MATCH(s, ==, MAJORITY) save;
ASSERT(r, False, "Different remote DC sizes.", "OPERATIONS", WARNING,
"Listed DC[s] have a different remote DC size. Please run 'show statistics dc like size' to see DC size. Possible network issue between data centers.",
"Remote DC size check.");
s = select "free-dlog-pct", "dlog_free_pct", "free_dlog_pct" from XDR save;
r = do s < 95;
ASSERT(r, False, "Low XDR free digest log space.", "OPERATIONS", INFO,
"Listed node[s] have lower than ideal (95%) free digest log space. Please run 'show statistics xdr like free' to see digest log space. Probable cause - low XDR throughput or a failed node processing in progress.",
"XDR free digest log space check.",
xdr_enabled);
r = group by CLUSTER do SD_ANOMALY(s, ==, 3);
ASSERT(r, False, "Skewed cluster XDR free digest log space.", "ANOMALY", WARNING,
"Listed node[s] have different digest log free size pattern. Please run 'show statistics xdr like free' to see digest log space. May not be an issue if the nodes are newly added or have been restarted with noresume or if remote Datacenter connectivity behavior differs for nodes.",
"XDR free digest log space anomaly check.",
cluster_xdr_enabled);
/* Needs normalization but not sure on what ?? */
s = select "timediff_lastship_cur_secs", "xdr_timelag" from XDR.STATISTICS save;
r = do s > 10;
ASSERT(r, False, "High XDR shipping lag (> 10s).", "PERFORMANCE", WARNING,
"Listed node[s] have higher than healthy ( > 10 sec) ship lag to remote data center. Please run 'show statistics xdr like time' to see shipping lag. Probable cause - connectivity issue to remote datacenter or spike in write throughput on the local cluster.",
"XDR shipping lag check.",
xdr_enabled);
r = group by CLUSTER do SD_ANOMALY(s, ==, 3);
ASSERT(r, False, "Cluster XDR shipping lag skewed.", "ANOMALY", WARNING,
"Listed node[s] have different ship lag patterns. Please run 'show statistics xdr like time' to see shipping lag. May not be an issue if the nodes are newly added or have been restarted with noresume or if remote Datacenter connectivity behavior differs for nodes.",
"XDR shipping lag anomaly check.",
cluster_xdr_enabled);
s = select "xdr-dc-timelag", "dc_timelag" from DC.STATISTICS save;
r = group by CLUSTER, DC do SD_ANOMALY(s, ==, 3);
ASSERT(r, False, "Skewed cluster remote DC Lag.", "ANOMALY", WARNING,
"Listed node[s] have different latency to remote data center. Please run 'show statistics dc like timelag' to see timelag. Possible Data center connectivity issue.",
"Remote DC lag anomaly check.",
cluster_xdr_enabled);
/* XDR xdr_read_latency_avg check */
s = select "xdr_read_latency_avg", "local_recs_fetch_avg_latency" from XDR.STATISTICS save;
r = do s > 2;
ASSERT(r, False, "High XDR average read latency (>2 sec).", "PERFORMANCE", WARNING,
"Listed node[s] have higher than normal (> 2sec) local read latencies. Please run 'show statistics xdr like latency' to see XDR read latency. Probable cause - system overload causing transaction queue to back up.",
"XDR average read latency check.",
xdr_enabled);
s = select "dc_open_conn" as "conn" from DC.STATISTICS save;
ds = select "dc_size" as "conn" from DC.STATISTICS save;
ds = do ds * 64 save as "max expected dc connections";
r = do s > ds;
ASSERT(r, False, "High remote DC connections.", "LIMITS", WARNING,
"Listed node[s] have higher than normal remote datacenter connections. Generally accepted number is (64*No of nodes in remote DC) per node. Please run 'show statistics dc like dc_open_conn dc_size' to see DC connection statistics. Ignore if XDR is not pipelined.",
"Remote DC connections check.",
xdr_enabled);
s = select "xdr_uninitialized_destination_error", "noship_recs_uninitialized_destination" from XDR.STATISTICS save;
r = do s > 0;
ASSERT(r, False, "Uninitialized destination cluster.", "OPERATIONS", WARNING,
"Listed node[s] have a non zero value for this uninitialized DC. Please check the configuration.",
"Uninitialized destination cluster check.",
xdr_enabled);
s = select "xdr_unknown_namespace_error", "noship_recs_unknown_namespace" from XDR.STATISTICS save;
r = do s > 0;
ASSERT(r, False, "Missing namespace in remote data center.", "OPERATIONS", WARNING,
"Certain namespace not found in remote DC. Please check the configuration to ascertain if remote DC has all the namespace being shipped.",
"Remote DC namespace check.",
xdr_enabled);
/* XDR failednode_sessions_pending check */
s = select "failednode_sessions_pending", "xdr_active_failed_node_sessions" from XDR.STATISTICS save;
r = do s > 0;
ASSERT(r, False, "Active failed node sessions.", "OPERATIONS", INFO,
"Listed node[s] have failed node sessions pending. Please check if there are any failed nodes on the source cluster.",
"Active failed node sessions check.",
xdr_enabled);
/* XDR linkdown_sessions_pending check */
s = select "linkdown_sessions_pending", "xdr_active_link_down_sessions" from XDR.STATISTICS save;
r = do s > 0;
ASSERT(r, False, "Active linkdown sessions.", "OPERATIONS", INFO,
"Listed node[s] have link down sessions pending. Please check the connectivity of remote datacenter.",
"Active linkdown sessions check.",
xdr_enabled);
/* XDR xdr_ship_outstanding_objects check */
s = select "xdr_ship_outstanding_objects", "stat_recs_outstanding" from XDR.STATISTICS save;
r = do s > 10000;
ASSERT(r, False, "Too many outstanding objects (>10000) to ship !!.", "OPERATIONS", WARNING,
"Listed node[s] have too many records outstanding. Please check relogging and error statistics.",
"XDR outstanding objects check.",
xdr_enabled);
/* XDR xdr_ship_inflight_objects check */
s = select "xdr_ship_inflight_objects", "stat_recs_inflight" from XDR.STATISTICS save;
r = do s > 5000;
ASSERT(r, False, "Too many inflight objects (>5000).", "PERFORMANCE", WARNING,
"Listed node[s] have too many objects inflight. This might lead to XDR throttling itself, consider tuning this parameter to a lower value.",
"Crossing xdr-max-ship-throughput check.",
xdr_enabled);
/* XDR xdr_ship_latency_avg check */
s = select "xdr_ship_latency_avg", "latency_avg_ship" from XDR.STATISTICS save;
// Following value is not fixed yet
r = do s > 5000;
ASSERT(r, False, "Record shipping takes too long (>5 sec).", "PERFORMANCE", WARNING,
"Listed node[s] have more than normal (>5sec) average shipping latency to remote data center. Possible high connectivity latency or performance issue at the remote data center.",
"XDR average ship latency check.",
xdr_enabled);
/* XDR dlog_overwritten_error check */
s = select "dlog_overwritten_error" from XDR.STATISTICS save;
r = do s > 0;
ASSERT(r, False, "XDR digest log entries got overwritten.", "PERFORMANCE", WARNING,
"Listed node[s] have a non zero value for XDR digest log entries that got overwritten.",
"XDR dlog overwritten error check.",
xdr_enabled);
/* XDR xdr_queue_overflow_error check */
s = select "xdr_queue_overflow_error" from XDR.STATISTICS save;
r = do s > 0;
ASSERT(r, False, "XDR queue overflows.", "PERFORMANCE", WARNING,
"Listed node[s] have a non zero value for XDR queue overflow errors. Typically happens when there are no physical space available on the storage holding the digest log, or if the writes are happening at such a rate that elements are not written fast enough to the digest log. The number of entries this queue can hold is 1 million.",
"XDR queue overflow error check.",
xdr_enabled);
/* XDR > 5 */
SET CONSTRAINT VERSION ALL;
/* CLUSTER STATE */
r = select "cluster_integrity" from SERVICE.STATISTICS save;
r = do r == True;
ASSERT(r, True, "Cluster integrity fault.", "OPERATIONS", CRITICAL,
"Listed node[s] have cluster integrity fault. This indicates cluster is not completely wellformed. Please check server logs for more information. Probable cause - issue with network.",
"Cluster integrity fault check.");
r = select "cluster_key" from SERVICE.STATISTICS;
r = do NO_MATCH(r, ==, MAJORITY) save;
ASSERT(r, False, "Different Cluster Key.", "OPERATIONS", CRITICAL,
"Listed cluster[s] have different cluster keys for nodes. This indicates cluster is not completely wellformed. Please check server logs for more information. Probable cause - issue with network.",
"Cluster Key difference check.");
u = select "uptime" from SERVICE.STATISTICS;
total_nodes = group by CLUSTER do COUNT(u) save as "total nodes";
r = select "cluster_size" from SERVICE.STATISTICS save;
r = do r == total_nodes;
ASSERT(r, True, "Unstable Cluster.", "OPERATIONS", CRITICAL,
"Listed node[s] have cluster size not matching total number of available nodes. This indicates cluster is not completely wellformed. Please check server logs for more information. Probable cause - issue with network.",
"Cluster stability check.");
paxos_replica_limit = select "paxos-single-replica-limit" from SERVICE.CONFIG save as "paxos-single-replica-limit";
paxos_replica_limit = group by CLUSTER paxos_replica_limit;
cluster_size = select "cluster_size" from SERVICE.STATISTICS;
cluster_size = group by CLUSTER do MAX(cluster_size);
replication_factor_check = select "replication-factor", "repl-factor" from NAMESPACE.CONFIG;
replication_factor_check = group by CLUSTER, NODE do MAX(replication_factor_check);
replication_factor_check = do replication_factor_check >=2;
r = do cluster_size <= paxos_replica_limit;
r = do r && replication_factor_check;
ASSERT(r, False, "Critical Cluster State - Only one copy of data exists", "OPERATIONS", CRITICAL,
"Listed node[s] have cluster size less than or equal to paxos-single-replica-limit. Only one copy of the data (no replicas) will be kept in the cluster",
"Paxos single replica limit check");
/* UDF */
u = select * from UDF.METADATA;
r = group by FILENAME, KEY do NO_MATCH(u, ==, MAJORITY) save;
ASSERT(r, False, "UDF not in sync (file not matching).", "OPERATIONS", CRITICAL,
"Listed UDF definitions do not match across the nodes. This may lead to incorrect UDF behavior. Run command 'asinfo -v udf-list' to see list of UDF. Re-register the latest version of the not in sync UDF[s].",
"UDF sync (file not matching) check.");
total_nodes = group by CLUSTER do COUNT(u) save as "expected node count";
c = group by CLUSTER, FILENAME do COUNT(u) save as "node count";
r = do c == total_nodes;
ASSERT(r, True, "UDF not in sync (not available on all node).", "OPERATIONS", CRITICAL,
"Listed UDF[s] are not available on all the nodes. This may lead to incorrect UDF behavior. Run command 'asinfo -v udf-list' to see list of UDF. Re-register missing UDF in cluster.",
"UDF sync (availability on all node) check.");
/* SINDEX */
s = select "sync_state" as "val", "state" as "val" from SINDEX.STATISTICS save;
s = group by CLUSTER, NAMESPACE, SET, SINDEX s;
r1 = do s == "synced";
r2 = do s == "WO";
r = do r1 || r2;
ASSERT(r, True, "SINDEX not in sync with primary.", "OPERATIONS", CRITICAL,
"Listed sindex[es] are not in sync with primary. This can lead to wrong query results. Consider dropping and recreating secondary index[es].",
"SINDEX sync state check.");
u = select "uptime" from SERVICE.STATISTICS;
total_nodes = group by CLUSTER do COUNT(u) save as "cluster node count";
c = group by CLUSTER, NAMESPACE, SET, SINDEX do COUNT(s) save as "nodes with SINDEX";
r = do c == total_nodes;
ASSERT(r, True, "SINDEX not in sync (not available on all node).", "OPERATIONS", CRITICAL,
"Listed sindex[es] not available on all nodes. This can lead to wrong query results. Consider dropping and recreating missing secondary index[es].",
"SINDEX metadata sync (availability on all node) check.");
/* LDT */
l = select like("ldt_.*");
r = do l > 0;
ASSERT(r, False, "Deprecated feature LDT in use.", "OPERATIONS", WARNING,
"Listed nodes[s] have non-zero LDT statistics. This feature is deprecated. Please visit Aerospike Homepage for details.",
"LDT statistics check.");
/* ENDPOINTS */
service = select "endpoints" as "e" from METADATA.ENDPOINTS;
services = select "services" as "e" from METADATA.SERVICES;
all_endpoints = do service + services;
r = group by CLUSTER do EQUAL(all_endpoints);
ASSERT(r, True, "Services list discrepancy.", "OPERATIONS", WARNING,
"Listed Cluster[s] shows different services list for different nodes. Please run 'asinfo -v services' to get all services.",
"Services list discrepancy test.");
/* RACKS */
rackid = select "rack-id" from NAMESPACE.CONFIG;
r = group by CLUSTER, NAMESPACE do VALUE_UNIFORM(rackid);
ASSERT(r, True, "Wrong rack-id distribution.", "OPERATIONS", WARNING,
"Listed namespace[s] does not have uniform rack distribution. It might cause extra traffic on c with less nodes assigned. Please set rack-id properly.",
"Roster misconfiguration test.");
node_rackid = select "rack-id" from NAMESPACE.CONFIG;
node_rackid = group by CLUSTER, NODE, NAMESPACE do FIRST(node_rackid);
node_id = select "node-id" from METADATA;
node_id = group by CLUSTER, NODE do FIRST(node_id);
rack_rackid = select "rack-id" from RACKS.CONFIG;
rack_rackid = group by CLUSTER, NODE, NAMESPACE, RACKS do FIRST(rack_rackid);
rack_nodes = select "nodes" from RACKS.CONFIG;
rack_nodes = group by CLUSTER, NODE, NAMESPACE, RACKS do FIRST(rack_nodes);
r1 = do node_rackid == rack_rackid;
r2 = do node_id IN rack_nodes;
r = do r1 && r2;
r = group by CLUSTER, NODE, NAMESPACE do OR(r);
ASSERT(r, True, "Node is not part of configured rack.", "OPERATIONS", WARNING,
"Listed node[s] is not part of configured rack. Probable cause - missed to re-cluster after changing rack-id.",
"Node rack membership check");
rack_nodes = select "nodes" from RACKS.CONFIG;
r = group by CLUSTER, NAMESPACE, RACKS do EQUAL(rack_nodes);
ASSERT(r, True, "Rack configuration mismatch.", "OPERATIONS", WARNING,
"Listed namespace[s] having different rack configurations across multiple nodes in cluster. Please check rack configurations.",
"Rack configuration check");
/*
Different queries for different versions. All version constraint sections should be at the bottom of file, it will avoid extra version reset at the end.
*/
SET CONSTRAINT VERSION >= 3.9;
// Uptime
u = select "uptime" from SERVICE.STATISTICS;
u = GROUP BY CLUSTER, NODE do MAX(u);
// Read statistics
nf = select "client_read_not_found" as "cnt" from NAMESPACE.STATISTICS;
s = select "client_read_success" as "cnt" from NAMESPACE.STATISTICS;
t = select "client_read_timeout" as "cnt" from NAMESPACE.STATISTICS;
e = select "client_read_error" as "cnt" from NAMESPACE.STATISTICS;
total_reads = do s + nf;
total_reads = do total_reads + t;
total_reads = do total_reads + e save as "total client reads";
total_reads_per_sec = do total_reads/u;
total_reads = group by CLUSTER, NAMESPACE, NODE do MAX(total_reads);
total_reads_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_reads_per_sec);
e = select "client_read_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_reads_per_sec;
p = do p * 100 save as "client_read_error % of total reads";
r = do p <= 5;
ASSERT(r, True, "High client read errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal read errors (> 5% client reads). Please run 'show statistics namespace like client_read' to see values.",
"High read error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero client read errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero read errors. Please run 'show statistics namespace like client_read' to see values.",
"Non-zero read error check");
t = select "client_read_timeout" from NAMESPACE.STATISTICS save;
t = group by CLUSTER, NAMESPACE t;
r = do t/total_reads;
r = do r * 100 save as "client_read_timeout % of total reads";
r = do r <= 5;
ASSERT(r, True, "High client read timeouts", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal read timeouts (> 5% client reads). Please run 'show statistics namespace like client_read' to see values.",
"High read timeouts check");
c = select "client_read_not_found" from NAMESPACE.STATISTICS save;
c = group by CLUSTER, NAMESPACE c;
r = do c / total_reads;
r = do r * 100 save as "client_read_not_found % of total reads";
r = do r <= 20;
ASSERT(r, True, "High read not found errors", "OPERATIONS", INFO,
"Listed namespace[s] show higher than normal read not found errors (> 20% client reads). Please run 'show statistics namespace like client_read' to see values.",
"High read not found error check");
// Delete statistics
nf = select "client_delete_not_found" as "cnt" from NAMESPACE.STATISTICS;
s = select "client_delete_success" as "cnt" from NAMESPACE.STATISTICS;
t = select "client_delete_timeout" as "cnt" from NAMESPACE.STATISTICS;
e = select "client_delete_error" as "cnt" from NAMESPACE.STATISTICS;
total_deletes = do s + nf;
total_deletes = do total_deletes + t;
total_deletes = do total_deletes + e save as "total client deletes";
total_deletes_per_sec = do total_deletes/u;
total_deletes = group by CLUSTER, NAMESPACE, NODE do MAX(total_deletes);
total_deletes_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_deletes_per_sec);
e = select "client_delete_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_deletes_per_sec;
p = do p * 100 save as "client_delete_error % of total deletes";
r = do p <= 5;
ASSERT(r, True, "High client delete errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal delete errors (> 5% client deletes). Please run 'show statistics namespace like client_delete' to see values.",
"High delete error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero client delete errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero delete errors. Please run 'show statistics namespace like client_delete' to see values.",
"Non-zero delete error check");
t = select "client_delete_timeout" from NAMESPACE.STATISTICS save;
t = group by CLUSTER, NAMESPACE t;
r = do t/total_deletes;
r = do r * 100 save as "client_delete_timeout % of total deletes";
r = do r <= 5;
ASSERT(r, True, "High client delete timeouts", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal delete timeouts (> 5% client deletes). Please run 'show statistics namespace like client_delete' to see values.",
"High delete timeouts check");
c = select "client_delete_not_found" from NAMESPACE.STATISTICS save;
c = group by CLUSTER, NAMESPACE c;
r = do c / total_deletes;
r = do r * 100 save as "client_delete_not_found % of total deletes";
r = do r <= 20;
ASSERT(r, True, "High delete not found errors", "OPERATIONS", INFO,
"Listed namespace[s] show higher than normal delete not found errors (> 20% client deletes). Please run 'show statistics namespace like client_delete' to see values.",
"High delete not found error check");
// Write statistics
s = select "client_write_success" as "cnt" from NAMESPACE.STATISTICS;
t = select "client_write_timeout" as "cnt" from NAMESPACE.STATISTICS;
e = select "client_write_error" as "cnt" from NAMESPACE.STATISTICS;
total_writes = do s + t;
total_writes = do total_writes + e save as "total client writes";
total_writes_per_sec = do total_writes/u;
total_writes = group by CLUSTER, NAMESPACE, NODE do MAX(total_writes);
total_writes_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_writes_per_sec);
e = select "client_write_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_writes_per_sec;
p = do p * 100 save as "client_write_error % of total writes";
r = do p <= 5;
ASSERT(r, True, "High client write errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal write errors (> 5% client writes). Please run 'show statistics namespace like client_write' to see values.",
"High write error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero client write errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero write errors. Please run 'show statistics namespace like client_write' to see values.",
"Non-zero write error check");
t = select "client_write_timeout" from NAMESPACE.STATISTICS save;
t = group by CLUSTER, NAMESPACE t;
r = do t/total_writes;
r = do r * 100 save as "client_write_timeout % of total writes";
r = do r <= 5;
ASSERT(r, True, "High client write timeouts", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal write timeouts (> 5% client writes). Please run 'show statistics namespace like client_write' to see values.",
"High write timeouts check");
// Client Proxy transaction statistics
s = select "client_proxy_complete" as "cnt" from NAMESPACE.STATISTICS;
t = select "client_proxy_timeout" as "cnt" from NAMESPACE.STATISTICS;
e = select "client_proxy_error" as "cnt" from NAMESPACE.STATISTICS;
total_client_proxy = do s + t;
total_client_proxy = do total_client_proxy + e save as "total client proxy transactions";
total_client_proxy_per_sec = do total_client_proxy/u;
total_client_proxy = group by CLUSTER, NAMESPACE, NODE do MAX(total_client_proxy);
total_client_proxy_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_client_proxy_per_sec);
e = select "client_proxy_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_client_proxy_per_sec;
p = do p * 100 save as "client_proxy_error % of total proxy transactions";
r = do p <= 5;
ASSERT(r, True, "High client proxy transaction errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal proxy transaction errors (> 5% client proxy transactions). Please run 'show statistics namespace like client_proxy' to see values.",
"High proxy transaction error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero client proxy transaction errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero proxy transaction errors. Please run 'show statistics namespace like client_proxy' to see values.",
"Non-zero proxy transaction error check");
t = select "client_proxy_timeout" from NAMESPACE.STATISTICS save;
t = group by CLUSTER, NAMESPACE t;
r = do t/total_client_proxy;
r = do r * 100 save as "client_proxy_timeout % of total proxy transactions";
r = do r <= 5;
ASSERT(r, True, "High client proxy transaction timeouts", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal proxy transaction timeouts (> 5% client proxy transactions). Please run 'show statistics namespace like client_proxy' to see values.",
"High proxy transaction timeouts check");
// UDF Transaction statistics
s = select "client_udf_complete" as "cnt" from NAMESPACE.STATISTICS;
t = select "client_udf_timeout" as "cnt" from NAMESPACE.STATISTICS;
e = select "client_udf_error" as "cnt" from NAMESPACE.STATISTICS;
total_udf_transactions = do s + t;
total_udf_transactions = do total_udf_transactions + e save as "total udf transactions";
total_udf_transactions_per_sec = do total_udf_transactions/u;
total_udf_transactions = group by CLUSTER, NAMESPACE, NODE do MAX(total_udf_transactions);
total_udf_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_udf_transactions_per_sec);
e = select "client_udf_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_udf_transactions_per_sec;
p = do p * 100 save as "client_udf_error % of total udf transactions";
r = do p <= 5;
ASSERT(r, True, "High udf transaction errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal udf transaction errors (> 5% udf transactions). Please run 'show statistics namespace like client_udf' to see values.",
"High udf transaction error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero udf transaction errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero udf transaction errors. Please run 'show statistics namespace like client_udf' to see values.",
"Non-zero udf transaction error check");
t = select "client_udf_timeout" from NAMESPACE.STATISTICS save;
t = group by CLUSTER, NAMESPACE t;
r = do t/total_udf_transactions;
r = do r * 100 save as "client_udf_timeout % of total udf transactions";
r = do r <= 5;
ASSERT(r, True, "High udf transaction timeouts", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal udf transaction timeouts (> 5% udf transaction). Please run 'show statistics namespace like client_udf' to see values.",
"High udf transaction timeouts check");
// UDF Sub-Transaction statistics
s = select "udf_sub_udf_complete" as "cnt" from NAMESPACE.STATISTICS;
t = select "udf_sub_udf_timeout" as "cnt" from NAMESPACE.STATISTICS;
e = select "udf_sub_udf_error" as "cnt" from NAMESPACE.STATISTICS;
total_udf_sub_transactions = do s + t;
total_udf_sub_transactions = do total_udf_sub_transactions + e save as "total udf sub-transactions";
total_udf_sub_transactions_per_sec = do total_udf_sub_transactions/u;
total_udf_sub_transactions = group by CLUSTER, NAMESPACE, NODE do MAX(total_udf_sub_transactions);
total_udf_sub_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_udf_sub_transactions_per_sec);
e = select "udf_sub_udf_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_udf_sub_transactions_per_sec;
p = do p * 100 save as "udf_sub_udf_error % of total udf sub-transactions";
r = do p <= 5;
ASSERT(r, True, "High udf sub-transaction errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal udf sub-transaction errors (> 5% udf sub-transactions). Please run 'show statistics namespace like udf_sub_udf' to see values.",
"High udf sub-transaction error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero udf sub-transaction errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero udf sub-transaction errors. Please run 'show statistics namespace like udf_sub_udf' to see values.",
"Non-zero udf sub-transaction error check");
t = select "udf_sub_udf_timeout" from NAMESPACE.STATISTICS save;
t = group by CLUSTER, NAMESPACE t;
r = do t/total_udf_sub_transactions;
r = do r * 100 save as "udf_sub_udf_timeout % of total udf sub-transactions";
r = do r <= 5;
ASSERT(r, True, "High udf sub-transaction timeouts", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal udf sub-transaction timeouts (> 5% udf sub-transaction). Please run 'show statistics namespace like udf_sub_udf' to see values.",
"High udf sub-transaction timeouts check");
// Proxied Batch-index Sub-Transaction statistics
s = select "batch_sub_proxy_complete" as "cnt" from NAMESPACE.STATISTICS;
t = select "batch_sub_proxy_error" as "cnt" from NAMESPACE.STATISTICS;
e = select "batch_sub_proxy_timeout" as "cnt" from NAMESPACE.STATISTICS;
total_transactions = do s + t;
total_transactions = do total_transactions + e save as "total batch-index sub-transactions";
total_transactions_per_sec = do total_transactions/u;
total_transactions = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions);
total_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);
e = select "batch_sub_proxy_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_transactions_per_sec;
p = do p * 100 save as "batch_sub_proxy_error % of total batch-index sub-transactions";
r = do p <= 5;
ASSERT(r, True, "High batch-index sub-transaction errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal batch-index sub-transaction errors (> 5% batch-index sub-transactions). Please run 'show statistics namespace like batch_sub_proxy' to see values.",
"High batch-index sub-transaction error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero batch-index sub-transaction errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero batch-index sub-transaction errors. Please run 'show statistics namespace like batch_sub_proxy' to see values.",
"Non-zero batch-index sub-transaction error check");
t = select "batch_sub_proxy_timeout" from NAMESPACE.STATISTICS save;
t = group by CLUSTER, NAMESPACE t;
r = do t/total_transactions;
r = do r * 100 save as "batch_sub_proxy_timeout % of total batch-index sub-transactions";
r = do r <= 5;
ASSERT(r, True, "High batch-index sub-transaction timeouts", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal batch-index sub-transaction timeouts (> 5% batch-index sub-transaction). Please run 'show statistics namespace like batch_sub_proxy' to see values.",
"High batch-index sub-transaction timeouts check");
// Batch-index read Sub-Transaction statistics
nf = select "batch_sub_read_not_found" as "cnt" from NAMESPACE.STATISTICS;
s = select "batch_sub_read_success" as "cnt" from NAMESPACE.STATISTICS;
t = select "batch_sub_read_timeout" as "cnt" from NAMESPACE.STATISTICS;
e = select "batch_sub_read_error" as "cnt" from NAMESPACE.STATISTICS;
total_transactions = do s + nf;
total_transactions = do total_transactions + t;
total_transactions = do total_transactions + e save as "total batch-index read sub-transactions";
total_transactions_per_sec = do total_transactions/u;
total_transactions = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions);
total_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);
e = select "batch_sub_read_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_transactions_per_sec;
p = do p * 100 save as "batch_sub_read_error % of total reads";
r = do p <= 5;
ASSERT(r, True, "High batch-index read sub-transaction errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal batch-index read sub-transaction errors (> 5% batch-index read sub-transactions). Please run 'show statistics namespace like batch_sub_read' to see values.",
"High batch-index read sub-transaction error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero batch-index read sub-transaction errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero batch-index read sub-transaction errors. Please run 'show statistics namespace like batch_sub_read' to see values.",
"Non-zero batch-index read sub-transaction error check");
t = select "batch_sub_read_timeout" from NAMESPACE.STATISTICS save;
t = group by CLUSTER, NAMESPACE t;
r = do t/total_transactions;
r = do r * 100 save as "batch_sub_read_timeout % of total batch-index read sub-transactions";
r = do r <= 5;
ASSERT(r, True, "High batch-index read sub-transaction timeouts", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal batch-index read sub-transaction timeouts (> 5% batch-index read sub-transactions). Please run 'show statistics namespace like batch_sub_read' to see values.",
"High batch-index read sub-transaction timeouts check");
c = select "batch_sub_read_not_found" from NAMESPACE.STATISTICS save;
c = group by CLUSTER, NAMESPACE c;
r = do c / total_transactions;
r = do r * 100 save as "batch_sub_read_not_found % of total batch-index read sub-transactions";
r = do r <= 20;
ASSERT(r, True, "High batch-index read sub-transaction not found errors", "OPERATIONS", INFO,
"Listed namespace[s] show higher than normal batch-index read sub-transaction not found errors (> 20% batch-index read sub-transactions). Please run 'show statistics namespace like batch_sub_read' to see values.",
"High batch-index read sub-transaction not found error check");
// Client UDF Transaction statistics
rs = select "client_lang_read_success" as "cnt" from NAMESPACE.STATISTICS;
ds = select "client_lang_delete_success" as "cnt" from NAMESPACE.STATISTICS;
ws = select "client_lang_write_success" as "cnt" from NAMESPACE.STATISTICS;
e = select "client_lang_error" as "cnt" from NAMESPACE.STATISTICS;
total_client_udf_transactions = do rs + ds;
total_client_udf_transactions = do total_client_udf_transactions + ws;
total_client_udf_transactions = do total_client_udf_transactions + e save as "total client_lang";
total_client_udf_transactions_per_sec = do total_client_udf_transactions/u;
total_client_udf_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_client_udf_transactions_per_sec);
e = select "client_lang_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_client_udf_transactions_per_sec;
p = do p * 100 save as "client_lang_error % of total client_lang";
r = do p <= 5;
ASSERT(r, True, "High client initiated udf transactions errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal client initiated udf transactions errors (> 5% client initiated udf transactions). Please run 'show statistics namespace like client_lang' to see values.",
"High client initiated udf transactions error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero client initiated udf transaction errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero client initiated udf transaction errors. Please run 'show statistics namespace like client_lang' to see values.",
"Non-zero client initiated udf transaction error check");
// UDF Sub-Transaction statistics
rs = select "udf_sub_lang_read_success" as "cnt" from NAMESPACE.STATISTICS;
ds = select "udf_sub_lang_delete_success" as "cnt" from NAMESPACE.STATISTICS;
ws = select "udf_sub_lang_write_success" as "cnt" from NAMESPACE.STATISTICS;
e = select "udf_sub_lang_error" as "cnt" from NAMESPACE.STATISTICS;
total_transactions = do rs + ds;
total_transactions = do total_transactions + ws;
total_transactions = do total_transactions + e save as "total udf_sub_lang";
total_transactions_per_sec = do total_transactions/u;
total_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);
e = select "udf_sub_lang_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_transactions_per_sec;
p = do p * 100 save as "udf_sub_lang_error % of total udf_sub_lang";
r = do p <= 5;
ASSERT(r, True, "High udf sub-transaction errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal udf sub-transaction errors (> 5% udf sub-transactions). Please run 'show statistics namespace like udf_sub_lang' to see values.",
"High udf sub-transaction error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero udf sub-transaction errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero udf sub-transaction errors. Please run 'show statistics namespace like udf_sub_lang' to see values.",
"Non-zero udf sub-transaction error check");
// Query Agg statistics
s = select "query_aggr_complete" as "val", "query_agg_success" as "val" from NAMESPACE.STATISTICS save;
e = select "query_aggr_error" as "val", "query_agg_error" as "val" from NAMESPACE.STATISTICS save;
a = select "query_aggr_abort" as "val", "query_agg_abort" as "val" from NAMESPACE.STATISTICS save;
total_transactions = do s + e;
total_transaction = do total_transactions + a save as "total query aggregations";
total_transactions_per_sec = do total_transactions/u;
total_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_transactions_per_sec;
p = do p * 100 save as "query_aggr_error % of total query aggregations";
r = do p <= 5;
ASSERT(r, True, "High query aggregation errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal query aggregation errors (> 5% query aggregations). Please run 'show statistics namespace like query_agg' to see values.",
"High query aggregation error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero query aggregation errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero query aggregation errors. Please run 'show statistics namespace like query_agg' to see values.",
"Non-zero query aggregation error check");
// Query Lookup statistics
c = select "query_basic_complete" as "val", "query_lookup_success" as "val" from NAMESPACE.STATISTICS save;
e = select "query_basic_error" as "val", "query_lookup_error" as "val" from NAMESPACE.STATISTICS save;
a = select "query_basic_abort" as "val", "query_lookup_abort" as "val" from NAMESPACE.STATISTICS save;
total_transactions = do c + e;
total_transactions = do total_transactions + a save as "total query lookups";
total_transactions_per_sec = do total_transactions/u;
total_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_transactions_per_sec;
p = do p * 100 save as "query_basic_error % of total query lookups";
r = do p <= 5;
ASSERT(r, True, "High query lookup errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal query lookup errors (> 5% query lookups). Please run 'show statistics namespace like query_basic' (=> 5.7) or 'show statistics namespace like query_lookup' (< 5.7) to see values.",
"High query lookup error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero query lookup errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero query lookup errors. Please run 'show statistics namespace like query_basic' (=> 5.7) or 'show statistics namespace like query_lookup' (< 5.7) to see values.",
"Non-zero query lookup error check");
// Scan Agg statistics
s = select "scan_aggr_complete" as "cnt" from NAMESPACE.STATISTICS;
e = select "scan_aggr_error" as "cnt" from NAMESPACE.STATISTICS;
total_transactions = do s + e save as "total scan aggregations";
total_transactions_per_sec = do total_transactions/u;
total_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);
e = select "scan_aggr_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_transactions_per_sec;
p = do p * 100 save as "scan_aggr_error % of total scan aggregations";
r = do p <= 5;
ASSERT(r, True, "High scan aggregation errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal scan aggregation errors (> 5% scan aggregations). Please run 'show statistics namespace like scan_agg' to see values.",
"High scan aggregation error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero scan aggregation errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero scan aggregation errors. Please run 'show statistics namespace like scan_agg' to see values.",
"Non-zero scan aggregation error check");
// Scan Basic statistics
s = select "scan_basic_complete" as "cnt" from NAMESPACE.STATISTICS;
e = select "scan_basic_error" as "cnt" from NAMESPACE.STATISTICS;
total_transactions = do s + e save as "total basic scans";
total_transactions_per_sec = do total_transactions/u;
total_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);
e = select "scan_basic_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_transactions_per_sec;
p = do p * 100 save as "scan_basic_error % of total basic scans";
r = do p <= 5;
ASSERT(r, True, "High basic scan errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal basic scan errors (> 5% basic scans). Please run 'show statistics namespace like scan_basic' to see values.",
"High basic scan error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero basic scan errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero basic scan errors. Please run 'show statistics namespace like scan_basic' to see values.",
"Non-zero basic scan error check");
// Scan Background UDF statistics
s = select "scan_udf_bg_complete" as "cnt" from NAMESPACE.STATISTICS;
e = select "scan_udf_bg_error" as "cnt" from NAMESPACE.STATISTICS;
total_transactions = do s + e save as "total scan background udf";
total_transactions_per_sec = do total_transactions/u;
total_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);
e = select "scan_udf_bg_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_transactions_per_sec;
p = do p * 100 save as "scan_udf_bg_error % of total scan background udf";
r = do p <= 5;
ASSERT(r, True, "High scan background udf errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal scan background udf errors (> 5% scan background udf). Please run 'show statistics namespace like scan_udf_bg' to see values.",
"High scan background udf error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero scan background udf errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero scan background udf errors. Please run 'show statistics namespace like scan_udf_bg' to see values.",
"Non-zero scan background udf error check");
// Client transaction statistics
e = select "client_tsvc_error" from NAMESPACE.STATISTICS save;
e = do e/u on common save as "errors per second";
e = group by CLUSTER, NAMESPACE e;
r = do e > 0;
ASSERT(r, False, "Non-zero client transaction error.", "OPERATIONS", INFO,
"Listed namespace[s] have non-zero client transaction errors (for nodes). Please run 'show statistics namespace like client_tsvc_error' to see values. Probable cause - protocol errors or security permission mismatch.",
"Namespace client transaction error count check");
// UDF Sub-Transactions (transaction service) statistics
e = select "udf_sub_tsvc_error" from NAMESPACE.STATISTICS save;
e = do e/u on common save as "errors per second";
e = group by CLUSTER, NAMESPACE e;
r = do e > 0;
ASSERT(r, False, "Non-zero udf sub-transaction error in the transaction service.", "OPERATIONS", INFO,
"Listed namespace[s] have non-zero udf sub-transaction errors in the transaction service (for nodes). Probable cause - protocol errors or security permission mismatch.",
"Namespace udf sub-transaction transaction service error count check");
// Batch-index read Sub-Transaction (transaction service) statistics
e = select "batch_sub_tsvc_error" from NAMESPACE.STATISTICS save;
e = do e/u on common save as "errors per second";
e = group by CLUSTER, NAMESPACE e;
r = do e > 0;
ASSERT(r, False, "Non-zero batch-index read sub-transaction errors in the transaction service.", "OPERATIONS", INFO,
"Listed namespace[s] have non-zero batch-index read sub-transaction errors in the transaction service across the nodes. Please run 'show statistics namespace like batch_sub_tsvc_error' to see the values.",
"Namespace batch-index read sub-transaction transaction service error count check");
/* Key busy error */
s = select "fail_key_busy" from NAMESPACE.STATISTICS save;
u = select "uptime" from SERVICE.STATISTICS;
u = group by CLUSTER, NODE do MAX(u);
s = do s / u;
r = group by KEY do SD_ANOMALY(s, ==, 3);
ASSERT(r, False, "Skewed Fail Key Busy count.", "ANOMALY", INFO,
"fail_key_busy show skew count patterns (for listed node[s]). Please run 'show statistics namespace like fail_key_busy' for details.",
"Key Busy errors count anomaly check.");
// XDR Write statistics
SET CONSTRAINT VERSION < 4.5.1
s = select "xdr_write_success" as "cnt", "xdr_client_write_success" as "cnt" from NAMESPACE.STATISTICS;
t = select "xdr_write_timeout" as "cnt" from NAMESPACE.STATISTICS;
e = select "xdr_write_error" as "cnt" from NAMESPACE.STATISTICS;
total_xdr_writes = do s + t;
total_xdr_writes = do total_xdr_writes + e save as "total xdr writes";
total_xdr_writes_per_sec = do total_xdr_writes/u;
total_xdr_writes = group by CLUSTER, NAMESPACE, NODE do MAX(total_xdr_writes);
total_xdr_writes_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_xdr_writes_per_sec);
e = select "xdr_write_error" from NAMESPACE.STATISTICS save;
e = do e/u save as "errors per second (by using uptime)";
e = group by CLUSTER, NAMESPACE e;
p = do e/total_xdr_writes_per_sec;
p = do p * 100 save as "xdr_write_error % of total xdr writes";
r = do p <= 5;
ASSERT(r, True, "High xdr write errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal xdr write errors (> 5% xdr writes). Please run 'show statistics namespace like xdr_write' to see values.",
"High xdr write error check");
warning_breached = do p > 5;
r = do p <= error_pct_threshold;
r = do r || warning_breached;
ASSERT(r, True, "Non-zero xdr write errors", "OPERATIONS", INFO,
"Listed namespace[s] show non-zero xdr write errors. Please run 'show statistics namespace like xdr_write' to see values.",
"Non-zero xdr write error check");
t = select "xdr_write_timeout" from NAMESPACE.STATISTICS save;
t = group by CLUSTER, NAMESPACE t;
r = do t/total_xdr_writes;
r = do r * 100 save as "xdr_write_timeout % of total xdr writes";
r = do r <= 5;
ASSERT(r, True, "High xdr write timeouts", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal xdr write timeouts (> 5% xdr writes). Please run 'show statistics namespace like xdr_write' to see values.",
"High xdr write timeouts check");
SET CONSTRAINT VERSION < 3.14;
/* CLUSTER STATE */
hp = select "heartbeat.protocol", "heartbeat-protocol" from NETWORK.CONFIG;
heartbeat_proto_v2 = do hp == "v2";
heartbeat_proto_v2 = group by CLUSTER, NODE do OR(heartbeat_proto_v2);
cs = select "cluster_size" from SERVICE.STATISTICS save;
mcs = select "paxos-max-cluster-size" as "cluster_size" from SERVICE.CONFIG save;
cs_without_saved_value = select "cluster_size" from SERVICE.STATISTICS;
mcs_without_saved_value = select "paxos-max-cluster-size" as "cluster_size" from SERVICE.CONFIG;
r = do cs < mcs;
ASSERT(r, True, "Critical cluster size.", "OPERATIONS", CRITICAL,
"Listed node[s] have cluster size higher than configured paxos-max-cluster-size. Please run 'show config service like paxos-max-cluster-size' to check configured max cluster size.",
"Critical cluster size check.",
heartbeat_proto_v2);
small_max_configured = do mcs_without_saved_value < 20;
critical_size = do cs >= mcs;
correct_size = do mcs_without_saved_value - 10;
correct_size = do cs_without_saved_value <= correct_size;
r = do small_max_configured || critical_size;
r = do r || correct_size;
ASSERT(r, True, "Cluster size is near the max configured cluster size.", "OPERATIONS", WARNING,
"Listed node[s] have cluster size near the configured paxos-max-cluster-size. Please run 'show config service like paxos-max-cluster-size' to check configured max cluster size.",
"Cluster size check.",
heartbeat_proto_v2);
SET CONSTRAINT VERSION < 3.9;
/* Key busy error */
s = select "err_rw_pending_limit" from SERVICE.STATISTICS save;
u = select "uptime" from SERVICE.STATISTICS;
u = group by CLUSTER, NODE do MAX(u);
s = do s / u;
r = group by KEY do SD_ANOMALY(s, ==, 3);
ASSERT(r, False, "Skewed Fail Key Busy count.", "ANOMALY", INFO,
"err_rw_pending_limit show skew count patterns (for listed node[s]). Please run 'show statistics like err_rw_pending_limit' for details.",
"Key Busy errors count anomaly check.");
// Read statistics
t = select "stat_read_reqs" as "cnt" from SERVICE.STATISTICS save;
e = select "stat_read_errs_other" from SERVICE.STATISTICS save;
r = do e/t;
r = do r * 100 save as "stat_read_errs_other % of total reads";
r = do r <= 5;
ASSERT(r, True, "High read errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal read errors (> 5% reads). Please run 'show statistics service like stat_read' to see values.",
"High read error check");
nf = select "stat_read_errs_notfound" from SERVICE.STATISTICS save;
r = do nf/t;
r = do r * 100 save as "stat_read_errs_notfound % of total reads";
r = do r <= 20;
ASSERT(r, True, "High read not found errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal read not found errors (> 20% reads). Please run 'show statistics service like stat_read' to see values.",
"High read not found error check");
// Write statistics
t = select "stat_write_reqs" as "cnt" from SERVICE.STATISTICS save;
e = select "stat_write_errs" from SERVICE.STATISTICS save;
r = do e/t;
r = do r * 100 save as "stat_write_errs % of total writes";
r = do r <= 5;
ASSERT(r, True, "High write errors", "OPERATIONS", WARNING,
"Listed namespace[s] show higher than normal write errors (> 5% writes). Please run 'show statistics service like stat_write' to see values.",
"High write error check");
e = select "stat_read_errs_other" from SERVICE.STATISTICS save;
s = select "stat_read_success" from SERVICE.STATISTICS;
s = GROUP BY CLUSTER, NODE do SUM(s);
r = do e / s;
r = do r/u on common;
r = do r == 0;
ASSERT(r, True, "Non-zero node read errors count", "OPERATIONS", INFO,
"Listed read error[s] show skew in count (for nodes). It may or may not be an issue depending on the error type. Please run 'show statistics service like stat_read' to see values.",
"Node read errors count check");
SET CONSTRAINT VERSION >= 3.3.17;
defslp= select "defrag-sleep", "storage-engine.defrag-sleep" from NAMESPACE.CONFIG save;
defslp = group by CLUSTER, NAMESPACE defslp;
r = do defslp == 1000;
ASSERT(r, True, "Non-default namespace defrag-sleep configuration.", "OPERATIONS",INFO,
"Listed namespace[s] have non-default defrag-sleep configuration. Please run 'show config namespace like defrag' to check value. It may be a non-issue in case namespaces are configured for aggressive defrag. Ignore those.",
"Non-default namespace defrag-sleep check.");
SET CONSTRAINT VERSION ALL;
/*
Queries Requested by SA Team (Ronen)
*/
SET CONSTRAINT VERSION >= 3.9;
crp = select "cache_read_pct" as "post-write-queue", "cache-read-pct" as "post-write-queue" from NAMESPACE.STATISTICS save;
pwq = select "post-write-queue", "storage-engine.post-write-queue" as "post-write-queue" from NAMESPACE.CONFIG save;
crp = do crp >= 10;
pwq = do pwq == 256;
r = do crp && pwq;
r = group by CLUSTER, NAMESPACE, NODE r;
ASSERT(r, False, "Sub-optimal post-write-queue", "OPERATIONS", INFO,
"Listed namespace[s] show high cache hit rate (> 10%) but post-write-queue value is default. It might be sub-optimal. Please contact Aerospike support team or SA team.",
"Namespace post-write-queue check");
SET CONSTRAINT VERSION < 4.2;
ptl = select "partition-tree-locks" from NAMESPACE.CONFIG save;
cs = select "cluster_size" from SERVICE.STATISTICS;
cs = group by CLUSTER do MAX(cs) save as "cluster_size";
r = do cs/ptl;
r = group by CLUSTER, NAMESPACE, NODE r;
r = do r < 2;
ASSERT(r, True, "Non-recommended partition-tree-locks", "OPERATIONS", WARNING,
"Listed namespace[s] show low value for partition-tree-locks with respect to cluster size. It should be 8 for cluster-size < 16, 16 for cluster sizes 16 to 31, 32 for cluster sizes 32 to 63, etc. Please contact Aerospike support team or SA team.",
"Namespace partition-tree-locks check");
m = select "memory-size" as "cnt" from NAMESPACE.CONFIG;
s = select "stop-writes-pct" as "cnt" from NAMESPACE.CONFIG;
s = do 100 - s;
s = do s/100;
extra_space = do m * s save as "breathing space (over stop-write)";
extra_space = group by CLUSTER, NODE, NAMESPACE do SUM(extra_space);
p = select "partition-tree-sprigs" as "cnt" from NAMESPACE.CONFIG save as "partition-tree-sprigs";
p = do p/16;
// sprig overhead: 1M per 16 partition-tree-sprigs
sprig_overhead = do 1024 * 1024;
all_sprig_overhead = do p * sprig_overhead;
// lock overhead: 320K per partition-tree-locks
lock_overhead = do 320 * 1024;
all_lock_overhead = do ptl * lock_overhead;
// base overhead
base_overhead = do 64 * 1024;
total_overhead = do base_overhead + all_sprig_overhead;
total_overhead = do total_overhead + all_lock_overhead save as "partition-tree-sprigs overhead";
r = do total_overhead < extra_space;
e = select "edition" from METADATA;
e = do e == "Community";
e = group by CLUSTER, NODE do OR(e);
ASSERT(r, False, "Non-recommended partition-tree-sprigs for Community edition", "OPERATIONS", INFO,
"Listed namespace[s] show low value for partition-tree-sprigs with respect to memory-size. partition-tree-sprigs overhead is less than (100 - stop-write-pct) % memory-size. It should be increased. Please contact Aerospike support team or SA team.",
"Namespace partition-tree-sprigs check for Community edition",
e);
SET CONSTRAINT VERSION >= 4.2;
cs = select "cluster_size" from SERVICE.STATISTICS;
cs = group by CLUSTER do MAX(cs);
repl = select "effective_replication_factor" as "cnt" from NAMESPACE.STATISTICS;
m = select "memory-size" as "cnt" from NAMESPACE.CONFIG;
s = select "stop-writes-pct" as "cnt" from NAMESPACE.CONFIG;
s = do 100 - s;
s = do s/100;
extra_space = do m * s save as "breathing space (over stop-write)";
extra_space = group by CLUSTER, NODE, NAMESPACE do SUM(extra_space);
// sprig overhead: 8bytes per partition-tree-sprigs
sprigs = select "partition-tree-sprigs" as "cnt" from NAMESPACE.CONFIG save as "partition-tree-sprigs";
sprig_overhead = do 8 * sprigs;
all_sprig_overhead = do sprig_overhead * 4096;
all_sprig_overhead = do all_sprig_overhead / cs;
all_sprig_overhead = do all_sprig_overhead * repl;
// lock overhead: 8bytes per partition-tree-locks
ptl = 256;
lock_overhead = do 8 * 256;
all_lock_overhead = do lock_overhead * 4096;
all_lock_overhead = do all_lock_overhead / cs;
all_lock_overhead = do all_lock_overhead * repl;
// base overhead
base_overhead = do 64 * 1024;
total_overhead = do base_overhead + all_sprig_overhead;
total_overhead = do total_overhead + all_lock_overhead save as "partition-tree-sprigs overhead";
r = do total_overhead < extra_space;
e = select "edition" from METADATA;
e = do e == "Community";
e = group by CLUSTER, NODE do OR(e);
ASSERT(r, False, "Non-recommended partition-tree-sprigs for Community edition", "OPERATIONS", INFO,
"Listed namespace[s] show low value for partition-tree-sprigs with respect to memory-size. partition-tree-sprigs overhead is less than (100 - stop-write-pct) % memory-size. It should be increased. Please contact Aerospike support team or SA team.",
"Namespace partition-tree-sprigs check for Community edition",
e);
SET CONSTRAINT VERSION >= 4.3.0.2;
// sprig mounts-size-limit checks
// critical case
cluster_size = select "cluster_size" as "sprig_limit_critical" from SERVICE.STATISTICS;
cluster_size = group by CLUSTER do MAX(cluster_size) save as "cluster-size";
repl = select "effective_replication_factor" as "sprig_limit_critical" from NAMESPACE.STATISTICS save as "effective_repl_factor";
pts = select "partition-tree-sprigs" as "sprig_limit_critical" from NAMESPACE.CONFIG save as "partition-tree-sprigs";
size_limit = select "index-type.mounts-size-limit" as "sprig_limit_critical" from NAMESPACE.CONFIG;
// below statement adds thousand delimiter to mounts-size-limiter when it prints
size_limit = do size_limit * 1 save as "mounts-size-limit";
// check for enterprise edition
edition = select "edition" from METADATA;
is_enterprise = do edition == "Enterprise";
is_enterprise = group by CLUSTER, NODE do OR(is_enterprise);
// check for all flash
index_type = select "index-type" from NAMESPACE.STATISTICS;
is_flash = do index_type == "flash";
// combine enterprise and all flash conditions
dont_skip = do is_enterprise && is_flash;
dont_skip = group by CLUSTER, NODE, NAMESPACE do OR(dont_skip);
// calculate sprig overhead
num_partitions = do 4096 * repl;
partitions_per_node = do num_partitions/cluster_size;
pts_per_node = do partitions_per_node * pts;
total_pts = do pts_per_node * 4096 save as "Minimum space required";
result = do total_pts > size_limit;
ASSERT(result, False, "ALL FLASH - Too many sprigs per partition for current available index mounted space. Some records are likely failing to be created.", "OPERATIONS", CRITICAL,
"Minimum space required for sprig overhead at current cluster size exceeds mounts-size-limit.
See: https://www.aerospike.com/docs/operations/configure/namespace/index/#flash-index and https://www.aerospike.com/docs/operations/plan/capacity/#aerospike-all-flash",
"Check for too many sprigs for current cluster size.",
dont_skip);
// warning case
mcs = select "min-cluster-size" as "sprig_limit_warning" from SERVICE;
mcs = group by CLUSTER do MAX(mcs) save as "min-cluster-size";
repl = select "replication-factor" as "sprig_limit_warning" from NAMESPACE.STATISTICS;
pts = select "partition-tree-sprigs" as "sprig_limit_warning" from NAMESPACE.CONFIG;
msl = select "index-type.mounts-size-limit" as "sprig_limit_warning" from NAMESPACE.CONFIG;
// below statement adds thousand delimiter to mounts-size-limiter when it prints
msl = do msl * 1 save as "mounts-size-limit";
// calculate sprig overhead
// The replication factor should be min(repl, mcs)
r1 = do 4096 * repl;
r1 = do r1/mcs;
r1 = do r1 * pts;
r1 = do r1 * 4096 save as "Minimum space required";
r1 = do r1 > msl;
repl_smaller = do repl < mcs;
e1 = do repl_smaller && dont_skip;
ASSERT(r1, False, "ALL FLASH - Too many sprigs per partition for configured min-cluster-size.", "OPERATIONS", WARNING,
"Minimum space required for sprig overhead at min-cluster-size exceeds mounts-size-limit.
See: https://www.aerospike.com/docs/operations/configure/namespace/index/#flash-index and https://www.aerospike.com/docs/operations/plan/capacity/#aerospike-all-flash",
"Check for too many sprigs for minimum cluster size.",
e1);
// same as calculation above but with min-cluster-size
// Only is asserted if min-cluster-size is smaller than replication-factor.
// r2 = do 4096 * mcs;
// r2 = do r2/mcs;
r2 = 4096;
r2 = do r2 * pts;
r2 = do r2 * 4096 save as "Minimum space required";
r2 = do r2 > msl;
mcs_smaller = do mcs <= repl;
e2 = do mcs_smaller && dont_skip;
ASSERT(r2, False, "ALL FLASH - Too many sprigs per partition for configured min-cluster-size.", "OPERATIONS", WARNING,
"Minimum space required for sprig overhead at min-cluster-size exceeds mounts-size-limit.
See: https://www.aerospike.com/docs/operations/configure/namespace/index/#flash-index and https://www.aerospike.com/docs/operations/plan/capacity/#aerospike-all-flash",
"Check for too many sprigs for minimum cluster size.",
e2);
SET CONSTRAINT VERSION >= 4.0.0.1;
// SC mode rules
s = select "strong-consistency" from NAMESPACE.CONFIG;
// Find out atleast one namespace in SC mode
s = group by CLUSTER do OR(s);
r = select "clock_skew_stop_writes" from NAMESPACE.STATISTICS;
ASSERT(r, False, "Wrong clock skew for SC mode", "OPERATIONS", WARNING,
"For listed namespace[s], clock skew is outside of tolerance for strong-consistency. So writes are not allowed.",
"Namespace clock_skew_stop_writes check",
s);
r = select "dead_partitions" from NAMESPACE.STATISTICS save;
ASSERT(r, 0, "Non-zero dead partitions", "OPERATIONS", WARNING,
"Listed namespace[s] shows non-zero dead partitions. This is the number of partitions that are unavailable when all roster nodes are present. Will require the use of the revive command to make them available again.",
"Namespace dead partitions check",
s);
r = select "unavailable_partitions" from NAMESPACE.STATISTICS save;
ASSERT(r, 0, "Non-zero unavailable partitions", "OPERATIONS", WARNING,
"Listed namespace[s] shows non-zero unavailable partitions. This is the number of partitions that are unavailable when roster nodes are missing. Will turn into dead_partitions if still unavailable when all roster nodes are present. Probable cause - nodes more than or equal to replication-factor are either 'untrusted' or out of the cluster.",
"Namespace unavailable partitions check",
s);
csw = select "cluster_clock_skew_stop_writes_sec" as "skew_val" from SERVICE.STATISTICS save;
// convert to milliseconds
csw = do csw * 1000;
cs_warning = do 0.75 * csw;
cs = select "cluster_clock_skew_ms" as "skew_val", "cluster_clock_skew" as "skew_val" from SERVICE.STATISTICS save;
r = do cs > cs_warning;
ASSERT(r, False, "Cluster clock_skew breached warning level", "OPERATIONS", WARNING,
"Listed cluster[s] shows clock_skew more than 3/4th of cluster_clock_skew_stop_writes_sec. If it crossed cluster_clock_skew_stop_writes_sec then cluster will stop accepting writes.",
"Cluster clock_skew check",
s);
size = select "cluster_size" from SERVICE.STATISTICS;
p = group by CLUSTER do MAX(size) save as "cluster_size";
repl = select "replication-factor", "repl-factor" from NAMESPACE.CONFIG save as "replication_factor";
r = do p == repl;
ASSERT(r, False, "Nodes equal to replication factor.", "OPERATIONS", WARNING,
"Number of nodes is equal to replication factor, rolling restart not possible",
"Node / replication factor check", s);
sc_check = select "strong-consistency" from NAMESPACE.CONFIG;
sc_check = group by CLUSTER, NAMESPACE do OR(sc_check);
roster = select "roster", "observed_nodes" from ROSTER.CONFIG;
r = group by CLUSTER, NAMESPACE, NODE do EQUAL(roster);
ASSERT(r, True, "Roster misconfigured.", "OPERATIONS", WARNING,
"Listed namespace[s] shows difference between set roster nodes and observe nodes. Please set roster properly.",
"Roster misconfiguration check.", sc_check);
roster_null_check = select "roster" from ROSTER.CONFIG;
roster_null_check = group by CLUSTER, NAMESPACE, NODE roster_null_check;
roster_null_check = do "null" IN roster_null_check;
r = do roster_null_check && sc_check;
ASSERT(r, False, "Roster is null or NOT set.", "OPERATIONS", CRITICAL,
"Listed namespace[s] shows ROSTER as NULL or NOT SET. Please check and set roster properly.",
"Roster null check.");
SET CONSTRAINT VERSION ALL;
/*
Server Health Check
*/
SET CONSTRAINT VERSION >= 4.3.1;
m = select * from METADATA.HEALTH save;
ASSERT(m, False, "Outlier[s] detected by the server health check.", "OPERATIONS", WARNING,
"Listed outlier[s] have been reported by the server health check and they might be misbehaving.",
"Server health check outlier detection. Run command 'asinfo -v health-outliers' to see list of outliers");
SET CONSTRAINT VERSION ALL;
"""
| queries = '\n/***************************************************\n* System Resource *\n****************************************************/\n// SET CONSTRAINT VERSION <= 3.8.4;\n// SET CONSTRAINT VERSION < 3.8.4;\n// SET CONSTRAINT VERSION >= 3.8.4;\n// SET CONSTRAINT VERSION > 3.8.4;\n// SET CONSTRAINT VERSION = 3.8.4;\n// SET CONSTRAINT VERSION 3.8.4;\n// SET CONSTRAINT VERSION IN [3.8.4, 3.10.0];\n\n/* Variables */\n\nerror_pct_threshold = 1;\n\nSET CONSTRAINT VERSION ALL;\n\n/* System checks */\n\nlimit = select "Soft_Max_open_files" as "fd" from SYSTEM.LIMITS save;\nlimit = group by CLUSTER, NODE, KEY do SUM(limit);\nconfig = select "proto-fd-max" as "fd" from SERVICE.CONFIG save;\nr = do config < limit;\nASSERT(r, True, "File descriptor is configured higher than limit.", "LIMITS", INFO,\n\t\t\t "Listed node[s] have proto-fd-limit set higher than system soft limit of Max open files. Aerospike process may run out of file descriptor, Possible misconfiguration.",\n\t\t\t "System open file descriptor limit check.");\n\ns = select * from SYSTEM.HDPARM save;\nr = group by KEY do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different Disk Hardware in cluster.", "OPERATIONS", INFO,\n "Different disk hardware configuration across multiple nodes in cluster.", "Disk hardware check.");\n\ns = select "OOM" from SYSTEM.DMESG save;\nASSERT(s, False, "DMESG: Process Out of Memory kill.", "OPERATIONS", INFO,\n "Certain process was killed due to Out Of Memory. Check dmesg or system log.",\n "System OOM kill check.");\n\ns = select "Blocked" from SYSTEM.DMESG save;\nASSERT(s, False, "DMESG: Process blocking.", "OPERATIONS", INFO,\n "Certain process was blocked for more than 120sec. Check dmesg or system log.",\n "System process blocking Check.");\n\ns = select "OS" from SYSTEM.DMESG save;\nr = group by NODE do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different OS version in cluster.", "OPERATIONS", INFO,\n "Different version of OS running across multiple nodes in cluster.", "OS version check.");\n\ns = select * from SYSTEM.LSCPU save;\nr = group by KEY do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "CPU configuration mismatch.", "OPERATIONS", INFO,\n "Listed node[s] in the cluster are running with different CPU or CPU setting, performance may be skewed. Please run \'lscpu\' to check CPU configuration.",\n "CPU config check.");\n\ns = select "vm_drop_caches", "vm_nr_hugepages", "vm_nr_hugepages_policy", "vm_numa_zonelist_order", "vm_oom_dump_tasks", "vm_oom_kill_allocating_task", "vm_zone_reclaim_mode", "vm_swapiness",\n "vm_nr_overcommit_hugepages", "kernel_shmmax", "kernel_shmall", "kernel_version" from SYSTEM.SYSCTLALL save;\nr = group by KEY do NO_MATCH(s, ==, MAJORITY);\nASSERT(r, False, "Sysctl configuration mismatch.", "OPERATIONS", INFO,\n "Listed node[s] in the cluster are running with different Sysctl setting. Please run \'sysctl -a\' to check CPU configuration.",\n "Sysctl config check.");\n\ns = select "has_firewall" from SYSTEM.IPTABLES;\nASSERT(s, False, "Node in cluster have firewall setting.", "OPERATIONS", INFO,\n "Listed node[s] have firewall setting. Could cause cluster formation issue if misconfigured. Please run \'iptables -L\' to check firewall rules.",\n\t\t\t\t"Firewall Check.");\n\ns = select "AnonHugePages" from SYSTEM.MEMINFO save;\nr = do s < 102400;\nASSERT(r, True, "THP may be enabled.", "OPERATIONS", WARNING,\n\t\t\t\t\t\t"Listed node[s] have AnonHugePages higher than 102400KiB. Node[s] may have THP enabled which may cause higher memory usage. See https://discuss.aerospike.com/t/disabling-transparent-huge-pages-thp-for-aerospike/5233 for more info.", \n\t\t\t\t\t\t"System THP enabled check");\n\n\n/* AWS */\n\nl = select "os_age_months" from SYSTEM.LSB save;\nr = do l > 12;\nASSERT(r, False, "Old Amazon Linux AMI.", "OPERATIONS", WARNING,\n "Amazon Linux AMI is older than 12 months. It might causes periodic latency spikes probably due to a driver issue.",\n "Amazon Linux AMI version check.");\n\ns = select "ENA_enabled" from SYSTEM.DMESG;\naws_enabled = select "platform" from SYSTEM.ENVIRONMENT;\naws_enabled = do aws_enabled == "aws";\naws_enabled = group by CLUSTER, NODE do OR(aws_enabled);\nASSERT(s, True, "ENA not enabled.", "OPERATIONS", INFO,\n "ENA is not enabled on AWS instance. Please check with Aerospike support team.",\n "ENA enable check.", aws_enabled);\n\n/* Disk */\ns = select "%util" from SYSTEM.IOSTAT save;\nr = do s > 90;\nASSERT(r, False, "High system disk utilization.", "PERFORMANCE", CRITICAL,\n\t\t\t\t"Listed disks show higher than normal (> 90%) disk utilization at the time of sampling. Please run \'iostat\' command to check disk utilization. Possible causes can be disk overload due to undersized cluster or some issue with disk hardware itself. If running on cloud, can be a problem with cloud instance itself.",\n\t\t\t\t"Disk utilization check.");\nr1 = group by DEVICE do SD_ANOMALY(s, ==, 3);\nASSERT(r1, False, "Skewed cluster disk utilization.", "ANOMALY", WARNING,\n\t\t\t\t"Listed disks show different disk utilization compared to other node[s]. Please run \'iostat\' command on those node[s] to confirm such behavior. Possible causes can be skew in workload (e.g hotkey) and/or issue with disk on the specific node[s] which show anomalistic behavior.",\n\t\t\t\t "Disk utilization Anomaly.");\n\n\navail=select like(".*available_pct") as "free_disk" from NAMESPACE.STATISTICS save;\ndisk_free = select "device_free_pct" as "free_disk", "free-pct-disk" as "free_disk" from NAMESPACE.STATISTICS save;\nr = do disk_free - avail save as "fragmented blocks pct";\nr = do r <= 30;\nr = group by CLUSTER, NAMESPACE r;\nASSERT(r, True, "High (> 30%) fragmented blocks.", "PERFORMANCE", WARNING,\n\t\t\t\t"Listed namespace[s] have higher than normal (>30%) fragmented blocks at the time of sampling. Please run \'show config namespace like defrag\' to check defrag configurations. Possible cause can be Aerospike disk defragmentation not keeping up with write rate and/or large record sizes causing fragmentation. Refer to knowledge base article discuss.aerospike.com/t/defragmentation for more details.",\n\t\t\t\t"Fragmented Blocks check.");\n\n\ns = select "%iowait" from SYSTEM.IOSTAT save;\nr = do s > 10;\nASSERT(r, False, "High (> 10%) CPU IO wait time.", "PERFORMANCE", WARNING,\n\t\t\t\t"Listed nodes show higher than normal (> 10%) CPU spent in io wait. Please run \'iostat\' command to check utilization. Possible cause can be slow disk or network leading to lot of CPU time spent waiting for IO.",\n\t\t\t\t"CPU IO wait time check.");\nr1 = group by NODE do SD_ANOMALY(s, ==, 3);\nASSERT(r1, False, "Skewed CPU IO wait time.", "ANOMALY", WARNING,\n\t\t\t\t"Listed nodes show skew in CPU IO wait time compared to other nodes in cluster. Please run \'iostat\' command to check utilization. Possible cause can be skew in workload (e.g hotkey) and/or slow network/disk on the specific node[s] which show anomalistic behavior.",\n\t\t\t\t "CPU IO wait time anomaly.");\n\n\ns = select "await" from SYSTEM.IOSTAT save;\nr = do s > 4;\nASSERT(r, False, "High system disk average wait time.", "PERFORMANCE", WARNING,\n\t\t\t\t"Listed disks show higher than normal (> 4ms) disk average wait time. Please run \'iostat\' command to check average wait time (await). Possible cause can be issue with disk hardware or VM instance in case you are running in cloud environment. This may also be caused by having storage over network like say SAN device or EBS.",\n\t\t\t\t"Disk average wait time check.");\nr1 = group by DEVICE do SD_ANOMALY(s, ==, 3);\nASSERT(r1, False, "Skewed cluster disk average wait time", "ANOMALY", WARNING,\n\t\t\t\t"Listed disks show different average wait time characteristic compared to other node[s]. Please run \'iostat\' command on those node[s] to confirm such behavior. Possible can be skew in workload (e.g hotkey) and/or disk issue on the specific node[s] which should anomalistic behavior.",\n\t\t\t\t"Disk average wait time anomaly check.");\n\n\ns = select "avgqu-sz" from SYSTEM.IOSTAT save;\nr = do s > 7;\nASSERT(r, False, "High disk average queue size.", "PERFORMANCE", INFO,\n\t\t\t\t"Listed disks show higher than normal (> 7) disk average queue size. This is not a issue if using NVME drives which support more queues. Please run \'iostat\' command to check average wait time (avgqu-sz). Possible disk overload. This may be non-issue of disk has more than 7 queues. Please analyze this number in conjunction with utilization.",\n\t\t\t\t"Disk avg queue size check.");\nr1 = group by DEVICE do SD_ANOMALY(s, ==, 3);\nASSERT(r1, False, "Skewed cluster disk avg queue size.", "ANOMALY", WARNING,\n\t\t\t\t"Listed disks show different average queue size characteristic compared to other node[s]. Please run \'iostat\' command on those node[s] to confirm such behavior. Possible issue can be differential load on these node[s] or issue with disk.",\n\t\t\t\t"Disk avg queue size anomaly check.");\n\n\ns = select "id" as "cpu_use" from SYSTEM.TOP.CPU_UTILIZATION save as "cpu_idle_pct";\ns = do 100 - s save as "cpu utilization pct";\nr = do s > 70;\nASSERT(r, False, "High system CPU utilization.", "PERFORMANCE", CRITICAL,\n\t\t\t\t"Listed node[s] are showing higher than normal (> 70%) CPU utilization. Please check top output. Possible system overload.",\n\t\t\t\t"CPU utilization check.");\nr1 = group by CLUSTER, KEY do SD_ANOMALY(s, ==, 3);\nASSERT(r1, False, "Skewed cluster CPU utilization.", "ANOMALY", WARNING,\n\t\t\t\t"Listed node[s] show different CPU utilization characteristic compared to other node[s]. Please run top command on those node[s] to confirm such behavior. Possible skew in workload.",\n\t\t\t\t"CPU utilization anomaly check.");\n\n\ns = select "resident_memory" from SYSTEM.TOP save;\nr = group by KEY do SD_ANOMALY(s, ==, 3);\nASSERT(r, False, "Skewed cluster resident memory utilization.", "ANOMALY", WARNING,\n\t\t\t\t"Listed node[s] show different resident memory usage compared to other node[s]. Please run top command on those node[s] to confirm such behavior. Possible skewed data distribution. This may be non-issue in case migrations are going on.",\n\t\t\t\t"Resident memory utilization anomaly.");\n\n\ns = select "system_swapping" from SERVICE.STATISTICS save;\nr = do s == true;\nASSERT(r, False, "System memory swapping.", "LIMITS", INFO,\n\t\t\t\t"Listed node[s] are swapping. Please run \'show statistics service like system_swapping\' to confirm such behaviour. Possible misconfiguration. This may be non-issue if amount of swap is small and good amount of memory available.",\n\t\t\t\t"System swap check.");\n\n/* TODO - is it really actually an issue */\ns = select "system_free_mem_pct" from SERVICE.STATISTICS save;\nr = do s < 20;\nASSERT(r, False, "Low system memory percentage.", "LIMITS", CRITICAL,\n\t\t\t\t"Listed node[s] have lower than normal (< 20%) system free memory percentage. Please run \'show statistics service like system_free_mem_pct\' to get actual values. Possible misconfiguration.",\n\t\t\t\t"System memory percentage check.");\n\nf = select "memory_free_pct" as "stats", "free-pct-memory" as "stats" from NAMESPACE.STATISTICS save;\ns = select "stop-writes-pct" as "stats" from NAMESPACE.CONFIG save;\nu = do 100 - f save as "memory_used_pct";\nr = do u <= s;\nASSERT(r, True, "Low namespace memory available pct (stop-write enabled).", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed namespace[s] have lower than normal (< (100 - memory_free_pct)) available memory space. Probable cause - namespace size misconfiguration.",\n\t\t\t\t"Critical Namespace memory available pct check.");\n\n/* NB : ADD CHECKS IF NODES ARE NOT HOMOGENOUS MEM / NUM CPU etc */\n\n\ns = select "available_bin_names", "available-bin-names" from NAMESPACE save;\nr = group by NAMESPACE do s > 3200;\nASSERT(r, True, "Low namespace available bin names.", "LIMITS", WARNING,\n\t\t\t\t"Listed node[s] have low available bin name (< 3200) for corresponding namespace[s]. Maximum unique bin names allowed per namespace are 32k. Please run \'show statistics namespace like available\' to get actual values. Possible improperly modeled data.",\n\t\t\t\t"Namespace available bin names check.");\n\n\n/* Holds only upto 4B key */\nSET CONSTRAINT VERSION < 3.12;\ns = select "memory-size" from NAMESPACE.CONFIG save;\nr = group by CLUSTER, NODE, NAMESPACE do SUM(s);\ne = do r <= 274877906944;\nASSERT(e, True, "Namespace configured to use more than 256G.", "LIMITS", WARNING,\n\t\t\t\t"On listed nodes namespace as mentioned have configured more than 256G of memory. Namespace with data not in memory can have max upto 4 billion keys and can utilize only up to 256G. Please run \'show statistics namespace like memory-size\' to check configured memory.",\n\t\t\t\t"Namespace per node memory limit check.");\nSET CONSTRAINT VERSION ALL;\n\n/*\nFollowing query selects assigned memory-size from namespace config and total ram size from system statistics.\ngroup by for namespace stats sums all memory size and gives node level memory size.\ngroup by for system stats helps to remove key, this is requirement for proper matching for simple operations.\n*/\ns = select "memory-size" from NAMESPACE.CONFIG save;\nn = group by NODE do SUM(s) save as "sum of memory-size";\ns = select "total" from SYSTEM.FREE.MEM;\nm = group by NODE do SUM(s) save as "total physical memory";\nr = do n <= m on common;\nASSERT(r, True, "Namespace memory misconfiguration.", "LIMITS", WARNING,\n\t\t\t\t"Listed node[s] have more namespace memory configured than available physical memory. Please run \'show statistics namespace like memory-size\' to check configured memory and check output of \'free\' for system memory. Possible namespace misconfiguration.",\n\t\t\t\t"Namespace memory configuration check.");\n\nr = do m - n on common save as "runtime memory";\nr = do r >= 5368709120;\nASSERT(r, True, "Aerospike runtime memory configured < 5G.", "LIMITS", INFO,\n\t\t\t\t"Listed node[s] have less than 5G free memory available for Aerospike runtime. Please run \'show statistics namespace like memory-size\' to check configured memory and check output of \'free\' for system memory. Possible misconfiguration.",\n\t\t\t\t"Runtime memory configuration check.");\n\n\n/*\nCurrent configurations and config file values difference check\n*/\n\noc = select * from SERVICE.ORIGINAL_CONFIG save;\nc = select * from SERVICE.CONFIG save;\nr = do oc == c on common;\nASSERT(r, True, "Service configurations different than config file values.", "OPERATIONS", INFO,\n "Listed Service configuration[s] are different than actual initial value set in aerospike.conf file.",\n "Service config runtime and conf file difference check.");\n\noc = select * from NETWORK.ORIGINAL_CONFIG save;\nc = select * from NETWORK.CONFIG save;\nr = do oc == c on common;\nASSERT(r, True, "Network configurations different than config file values.", "OPERATIONS", INFO,\n "Listed Network configuration[s] are different than actual initial value set in aerospike.conf file.",\n "Network config runtime and conf file difference check.");\n\noc = select * from NAMESPACE.ORIGINAL_CONFIG save;\nc = select * from NAMESPACE.CONFIG save;\nr = do oc == c on common;\nASSERT(r, True, "Namespace configurations different than config file values.", "OPERATIONS", INFO,\n "Listed namespace configuration[s] are different than actual initial value set in aerospike.conf file.",\n "Namespace config runtime and conf file difference check.");\n\noc = select * from XDR.ORIGINAL_CONFIG save;\nc = select * from XDR.CONFIG save;\nr = do oc == c on common;\nASSERT(r, True, "XDR configurations different than config file values.", "OPERATIONS", INFO,\n "Listed XDR configuration[s] are different than actual initial value set in aerospike.conf file.",\n "XDR config runtime and conf file difference check.");\n\noc = select * from DC.ORIGINAL_CONFIG save;\nc = select * from DC.CONFIG save;\nr = do oc == c on common;\nASSERT(r, True, "DC configurations different than config file values.", "OPERATIONS", INFO,\n "Listed DC configuration[s] are different than actual initial value set in aerospike.conf file.",\n "DC config runtime and conf file difference check.");\n\n\n/*\nFollowing query selects proto-fd-max from service config and client_connections from service statistics.\nIt uses as clause to get proper matching structure for simple operation.\n*/\nmax = select "proto-fd-max" as "fd" from SERVICE.CONFIG save;\nconn = select "client_connections" as "fd" from SERVICE.STATISTICS save;\nbound = do 80 %% max;\nr = do conn > bound;\nASSERT(r, False, "High system client connections.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed node[s] show higher than normal client-connections (> 80% of the max configured proto-fd-max). Please run \'show config like proto-fd-max\' and \'show statistics like client_connections\' for actual values. Possible can be network issue / improper client behavior / FD leak.",\n\t\t\t\t"Client connections check.");\n\ns = select like(".*available_pct") as "stats" from NAMESPACE.STATISTICS save;\nm = select like(".*min-avail-pct") as "stats" from NAMESPACE.CONFIG save;\ncritical_check = do s >= m;\nASSERT(critical_check, True, "Low namespace disk available pct (stop-write enabled).", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed namespace[s] have lower than normal (< min-avail-pct) available disk space. Probable cause - namespace size misconfiguration.",\n\t\t\t\t"Critical Namespace disk available pct check.");\n\ncritical_check = do s < m;\nr = do s >= 20;\nr = do r || critical_check;\nASSERT(r, True, "Low namespace disk available pct.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] have lower than normal (< 20 %) available disk space. Probable cause - namespace size misconfiguration.",\n\t\t\t\t"Namespace disk available pct check.");\n\ns = select * from SERVICE.CONFIG ignore "heartbeat.mtu", "node-id-interface", "node-id", "pidfile", like(".*address"), like(".*port") save;\nr = group by CLUSTER, KEY do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different service configurations.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed Service configuration[s] are different across multiple nodes in cluster. Please run \'show config service diff\' to check different configuration values. Probable cause - config file misconfiguration.",\n\t\t\t\t"Service configurations difference check.");\n\nmulticast_mode_enabled = select like(".*mode") from NETWORK.CONFIG;\nmulticast_mode_enabled = do multicast_mode_enabled == "multicast";\nmulticast_mode_enabled = group by CLUSTER, NODE do OR(multicast_mode_enabled);\ns = select like(".*mtu") from SERVICE.CONFIG save;\nr = group by CLUSTER do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different heartbeat.mtu.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed node[s] have a different heartbeat.mtu configured. A multicast packet can only be as large as the interface mtu. Different mtu values might create cluster stability issue. Please contact Aerospike Support team.",\n\t\t\t\t"heartbeat.mtu check.",\n\t\t\t\tmulticast_mode_enabled);\n\ninterval = select "heartbeat.interval" from NETWORK.CONFIG save;\nr1 = do interval < 150;\nr2 = do interval > 250;\nr = do r1 || r2;\nASSERT(r, False, "Heartbeat interval is not in expected range (150 <= p <= 250)", "OPERATIONS", INFO,\n "Listed nodes(s) have heartbeat interval value not in expected range (150 <= p <= 250). New node might fail to join cluster.",\n "Heartbeat interval Check (150 <= p <= 250)");\n\ntimeout = select "heartbeat.timeout" from NETWORK.CONFIG save;\nr1 = do timeout < 10;\nr2 = do timeout > 15;\nr = do r1 || r2;\nASSERT(r, False, "Heartbeat timeout is not in expected range (10 <= p <= 15)", "OPERATIONS", INFO,\n "Listed nodes(s) have heartbeat timeout value not in expected range (10 <= p <= 15). New node might fail to join cluster.",\n "Heartbeat timeout Check (10 <= p <= 15)");\n\n\ns = select "migrate-threads", "migrate_threads" from SERVICE.CONFIG save;\nr = do s > 1;\nASSERT(r, False, "> 1 migrate thread configured.", "OPERATIONS", INFO,\n\t\t\t\t"Listed node[s] are running with higher than normal (> 1) migrate threads. Please run \'show config service like migrate-threads\' to check migration configuration. Is a non-issue if requirement is to run migration aggressively. Otherwise possible operational misconfiguration.",\n\t\t\t\t"Migration thread configuration check.");\n\n\n/* Device Configuration */\ns = select "scheduler" from SYSTEM.SCHEDULER save;\nr = do s == "noop";\nASSERT(r, True, "Non-recommended IO scheduler.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed device[s] have not configured with noop scheduler. This might create situation like slow data migrations. Please contact Aerospike Support team. Ignore if device is not used in any namespace.",\n\t\t\t\t"Device IO scheduler check.");\n\nf = select "name" from SYSTEM.DF;\nd = select like(".*device.*") from NAMESPACE.CONFIG save;\nr = do APPLY_TO_ANY(d, IN, f);\nASSERT(r, False, "Device name misconfigured.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed device[s] have partitions on same node. This might create situation like data corruption where data written to main drive gets overwritten/corrupted from data written to or deleted from the partition with the same name.",\n\t\t\t\t"Device name misconfiguration check.");\n\ns = select "device_total_bytes", "device-total-bytes", "total-bytes-disk" from NAMESPACE.STATISTICS save;\nr = group by CLUSTER, NAMESPACE do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different namespace device size configuration.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] have difference in configured disk size. Please run \'show statistics namespace like bytes\' to check total device size. Probable cause - config file misconfiguration.",\n\t\t\t\t"Namespace device size configuration difference check.");\n\nhwm = select "high-water-disk-pct" from NAMESPACE.CONFIG save;\nhwm = group by CLUSTER, NAMESPACE hwm;\nr = do hwm == 50;\nASSERT(r, True, "Non-default namespace device high water mark configuration.", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] have non-default high water mark configuration. Please run \'show config namespace like high-water-disk-pct\' to check value. Probable cause - config file misconfiguration.",\n\t\t\t\t"Non-default namespace device high water mark check.");\n\nlwm = select like(".*defrag-lwm-pct") from NAMESPACE.CONFIG save;\nlwm = group by CLUSTER, NAMESPACE lwm;\nr = do lwm == 50;\nASSERT(r, True, "Non-default namespace device low water mark configuration.", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] have non-default low water mark configuration. Probable cause - config file misconfiguration.",\n\t\t\t\t"Non-default namespace device low water mark check.");\n\nhwm = select "high-water-disk-pct" as "defrag-lwm-pct" from NAMESPACE.CONFIG save;\nlwm = select like(".*defrag-lwm-pct") as "defrag-lwm-pct" from NAMESPACE.CONFIG save;\nr = do lwm < hwm on common;\nr = group by CLUSTER, NAMESPACE r;\nASSERT(r, False, "Defrag low water mark misconfigured.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] have defrag-lwm-pct lower than high-water-disk-pct. This might create situation like no block to write, no eviction and no defragmentation. Please run \'show config namespace like high-water-disk-pct defrag-lwm-pct\' to check configured values. Probable cause - namespace watermark misconfiguration.",\n\t\t\t\t"Defrag low water mark misconfiguration check.");\n\ncommit_to_device = select "storage-engine.commit-to-device" from NAMESPACE.CONFIG;\ncommit_to_device = group by CLUSTER, NAMESPACE commit_to_device;\nASSERT(commit_to_device, False, "Namespace has COMMIT-TO-DEVICE", "OPERATIONS" , INFO,\n\t\t\t\t"Listed namespace(s) have commit-to-device=true. Please run \'show config namespace like commit-to-device\' for details.",\n\t\t\t\t"Namespace COMMIT-TO-DEVICE check.");\n\nnumber_of_sets = select "set" from SET.STATISTICS;\nnumber_of_sets = GROUP BY CLUSTER, NAMESPACE, NODE do COUNT_ALL(number_of_sets);\np = GROUP BY CLUSTER, NAMESPACE do MAX(number_of_sets) save as "sets_count";\nwarning_check = do p >= 1000;\nASSERT(warning_check, False, "High set count per namespace", "LIMITS", WARNING,\n "Listed namespace(s) have high number of set count (>=1000). Please run in AQL \'show sets\' for details",\n "Critical Namespace Set Count Check (>=1000)");\ncorrect_range_check = do p < 750;\nr = do warning_check || correct_range_check;\nASSERT(r, True, "Number of Sets equal to or above 750", "LIMITS", INFO,\n "Listed namespace(s) have high number of set count (>=750). Please run in AQL \'show sets\' for details",\n "Basic Set Count Check (750 <= p < 1000)");\n\nstop_writes = select "stop_writes" from NAMESPACE.STATISTICS;\nstop_writes = group by CLUSTER, NAMESPACE stop_writes;\nASSERT(stop_writes, False, "Namespace has hit stop-writes (stop_writes = true)", "OPERATIONS" , CRITICAL,\n\t\t\t\t"Listed namespace(s) have hit stop-write. Please run \'show statistics namespace like stop_writes\' for details.",\n\t\t\t\t"Namespace stop-writes flag check.");\n\nclock_skew_stop_writes = select "clock_skew_stop_writes" from NAMESPACE.STATISTICS;\nclock_skew_stop_writes = group by CLUSTER, NAMESPACE clock_skew_stop_writes;\nASSERT(clock_skew_stop_writes, False, "Namespace has hit clock-skew-stop-writes (clock_skew_stop_writes = true)", "OPERATIONS" , CRITICAL,\n\t\t\t\t"Listed namespace(s) have hit clock-skew-stop-writes. Please run \'show statistics namespace like clock_skew_stop_writes\' for details.",\n\t\t\t\t"Namespace clock-skew-stop-writes flag check.");\n\nSET CONSTRAINT VERSION < 4.3;\n\ndevice = select "file", "storage-engine.file" as "file", "device", "storage-engine.device" as "device" from NAMESPACE.CONFIG save;\ndevice = do SPLIT(device);\nr = do UNIQUE(device);\nASSERT(r, True, "Duplicate device/file configured.", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed namespace[s] have duplication in device/file configuration. This might corrupt data. Please configure device/file names carefully.",\n\t\t\t\t"Duplicate device/file check.");\n\nSET CONSTRAINT VERSION ALL;\n\n/*\nFollowing query collects used device space and total device space and computes available free space on each node per namespace per cluster (group by CLUSTER, NAMESPACE, NODE).\nIt collects cluster-size and uses it to find out expected data distribution for each node in case that node is down. It checks max of this computed value per namespace\nwith available space per node per namespace.\n*/\n\nt = select "device_total_bytes" as "disk_space", "device-total-bytes" as "disk_space", "total-bytes-disk" as "disk_space" from NAMESPACE.STATISTICS;\nu = select "used-bytes-disk" as "disk_space", "device_used_bytes" as "disk_space" from NAMESPACE.STATISTICS;\n/* Available extra space */\ne = do t - u;\ne = group by CLUSTER, NAMESPACE, NODE do SUM(e) save as "available device space";\ns = select "cluster_size" as "size" from SERVICE;\nn = do MAX(s);\nn = do n - 1;\n/* Extra space need if 1 node goes down */\ne1 = do u / n;\ne1 = group by CLUSTER, NAMESPACE do MAX(e1) save as "distribution share of used device space per node";\nr = do e > e1;\nASSERT(r, True, "Namespace under configured (disk) for single node failure.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] does not have enough disk space configured to deal with increase in data per node in case of 1 node failure. Please run \'show statistics namespace like bytes\' to check device space. It is non-issue if single replica limit is set to larger values, i.e if number of replica copies are reduced in case of node loss.",\n\t\t\t\t"Namespace single node failure disk config check.");\n\n/*\nSame as above query but for memory\n*/\nt = select "memory-size" as "mem" from NAMESPACE.CONFIG;\nu = select "used-bytes-memory" as "mem", "memory_used_bytes" as "mem" from NAMESPACE.STATISTICS;\n/* Available extra space */\ne = do t - u;\ne = group by CLUSTER, NAMESPACE, NODE do SUM(e) save as "available memory space";\ns = select "cluster_size" as "size" from SERVICE;\nn = do MAX(s);\nn = do n - 1;\n/* Extra space need if 1 node goes down */\ne1 = do u / n;\ne1 = group by CLUSTER, NAMESPACE do MAX(e1) save as "distribution share of used memory space per node";\nr = do e > e1;\nASSERT(r, True, "Namespace under configured (memory) for single node failure.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] does not have enough memory space configured to deal with increase in data per node in case of 1 node failure. Please run \'show statistics namespace like bytes\' to check memory space. It is non-issue if single replica limit is set to larger values, i.e number of replica copies reduce.",\n\t\t\t\t"Namespace single node failure memory config check.");\n\n\n/* Namespace Configuration */\n\nSET CONSTRAINT VERSION < 3.13;\n\nnsid = select "nsid" from NAMESPACE.CONFIG;\nr = group by CLUSTER, NAMESPACE do NO_MATCH(nsid, ==, MAJORITY) save;\nASSERT(r, False, "Different namespace order in aerospike conf.", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed namespace[s] have different order on different nodes. Please check aerospike conf file on all nodes and change configuration to make namespace order same.",\n\t\t\t\t"Namespace order check.");\n\nSET CONSTRAINT VERSION ALL;\n\nrepl = select "replication-factor", "repl-factor" from NAMESPACE.CONFIG;\nrepl = group by CLUSTER, NAMESPACE repl;\nns_count = group by CLUSTER do COUNT(repl) save as "total available namespaces for cluster";\nns_count_per_node = group by CLUSTER, NODE do COUNT(repl) save as "namespace count";\nr = do ns_count_per_node == ns_count;\nASSERT(r, True, "Disparate namespaces.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed node[s] do not have all namespaces configured. Please check aerospike conf file on all nodes and change namespace configuration as per requirement.",\n\t\t\t\t"Namespaces per node count check.");\n\nr = select "replication-factor", "repl-factor" from NAMESPACE.CONFIG save;\nr = group by CLUSTER, NAMESPACE r;\nr = do r == 2;\nASSERT(r, True, "Non-default namespace replication-factor configuration.", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] have non-default replication-factor configuration. Please run \'show config namespace like repl\' to check value. It may be non-issue in case namespace are configured for user requirement. Ignore those.",\n\t\t\t\t"Non-default namespace replication-factor check.");\n\ns = select * from NAMESPACE.CONFIG ignore "rack-id", like(".*device"), like(".*file") save;\nr = group by CLUSTER, NAMESPACE, KEY do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different namespace configurations.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace configuration[s] are different across multiple nodes in cluster. Please run \'show config namespace diff\' to get actual difference. It may be non-issue in case namespace are configured with different device or file name etc. Ignore those.",\n\t\t\t\t"Namespace configurations difference check.");\n\n/* Errors */\ns = select like(".*_err.*") from SERVICE.STATISTICS save;\nu = select "uptime" from SERVICE.STATISTICS;\nu = group by CLUSTER, NODE do MAX(u);\ns = do s / u;\nr = group by KEY do SD_ANOMALY(s, ==, 3);\nASSERT(r, False, "Skewed cluster service errors count.", "ANOMALY", INFO,\n\t\t\t\t"Listed service errors[s] show skew in error count patterns (for listed node[s]). Please run \'show statistics service like err\' for details.",\n\t\t\t\t"Service errors count anomaly check.");\n\n\ne = select "hwm_breached", "hwm-breached" from NAMESPACE.STATISTICS;\ne = group by CLUSTER, NAMESPACE e;\nr = do e == False;\nASSERT(r, True, "Namespace HWM breached.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show HWM breached for memory or Disks.",\n\t\t\t\t"Namespace HWM breach check.");\n\n/*\nFollowing query collects master_objects, prole_objects and replication_factor, and computes proles for one replication (prole_objects/(replication_factor-1)).\nAfter that it find out master and prole distribution is in correct range with each other or not,\nthis last result will \'AND\' with replication_enabled and migration_in_progress bools to avoid wrong assert failure\n*/\n\nm = select "master_objects" as "cnt", "master-objects" as "cnt" from NAMESPACE.STATISTICS;\np = select "prole_objects" as "cnt", "prole-objects" as "cnt" from NAMESPACE.STATISTICS;\nr = select "effective_replication_factor", "repl-factor" from NAMESPACE.STATISTICS;\nmg = select "migrate_rx_partitions_active", "migrate_progress_recv", "migrate-rx-partitions-active" from NAMESPACE.STATISTICS;\nmt = group by NAMESPACE do SUM(m) save as "master_objects";\npt = group by NAMESPACE do SUM(p);\nr = group by NAMESPACE do MAX(r);\nmg = group by NAMESPACE do MAX(mg);\nno_migration = do mg == 0;\n\nreplication_enabled = do r > 1;\nr = do r - 1;\npt = do pt / r save as "unique prole_objects";\ndiscounted_pt = do 95 %% pt save as "95% of unique prole_objects";\nd = do discounted_pt > mt;\nd = do d && replication_enabled;\nd = do d && no_migration;\nASSERT(d, False, "Skewed namespace data distribution, prole objects exceed master objects by > 5%.", "DATA", INFO,\n\t\t\t\t"Listed namespace[s] show abnormal object distribution. It may not be an issue if migrations are in progress. Please run \'show statistics namespace like object\' for actual counts.",\n\t\t\t\t"Namespace data distribution check (prole objects exceed master objects by > 5%).");\ndiscounted_mt = do 95 %% mt save as "95% of master_objects";\nd = group by NAMESPACE do discounted_mt > pt;\nd = do d && replication_enabled;\nd = do d && no_migration;\nASSERT(d, False, "Skewed namespace data distribution, master objects exceed prole objects by > 5%.", "DATA", INFO,\n\t\t\t\t"Listed namespace[s] show abnormal object distribution. It may not be an issue if migrations are in progress. Please run \'show statistics namespace like object\' for actual counts.",\n\t\t\t\t"Namespace data distribution check (master objects exceed prole objects by > 5%).");\n\n\ns = select "set-delete", "deleting" as "set-delete" from SET save;\nr = group by CLUSTER, NAMESPACE, SET do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different set delete status.", "OPERATIONS", INFO,\n\t\t\t\t"Listed set[s] have different set delete status across multiple nodes in cluster. This is non-issue if set-delete is being performed. Nodes reset the status asynchronously. Please check if nsup is still delete data for the set.",\n\t\t\t\t"Set delete status check.");\n\n\ns = select like ("disable-eviction") from SET save;\nr = group by CLUSTER, NAMESPACE, SET do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different set eviction configuration.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed set[s] have different eviction setting across multiple nodes in cluster. Please run \'show statistics set like disable-eviction\' to check values. Possible operational misconfiguration.",\n\t\t\t\t"Set eviction configuration difference check.");\n\n\n\n\ns = select "n_objects", "objects" from SET save;\nr = group by CLUSTER, NAMESPACE, SET do SD_ANOMALY(s, ==, 3);\nASSERT(r, False, "Skewed cluster set object count.", "ANOMALY", WARNING,\n\t\t\t\t"Listed set[s] have skewed object distribution. Please run \'show statistics set like object\' to check counts. It may be non-issue if cluster is undergoing migrations.",\n\t\t\t\t"Set object count anomaly check.");\n\n/* XDR < 5 */\nSET CONSTRAINT VERSION < 5.0;\n\ns = select like ("set-enable-xdr") from SET save;\nr = group by CLUSTER, NAMESPACE, SET do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different set xdr configuration.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed set[s] have different XDR replication setting across multiple nodes in cluster. Please run \'show statistics set like set-enable-xdr\' to check values. Possible operational misconfiguration.",\n\t\t\t\t"Set xdr configuration difference check.");\n\ns = select * from XDR.CONFIG save;\nr = GROUP by CLUSTER, KEY do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different XDR configurations.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed XDR configuration[s] are different across multiple nodes in cluster. Please run \'show config xdr diff\' to get difference. Possible operational misconfiguration.",\n\t\t\t\t"XDR configurations difference check.");\n\n\ns = select * from XDR.STATISTICS save;\nu = select "uptime" from SERVICE.STATISTICS;\nu = group by CLUSTER, NODE do MAX(u);\ns = do s / u;\nr = group by CLUSTER, KEY do SD_ANOMALY(s, ==, 3);\nASSERT(r, False, "Skewed cluster XDR statistics.", "ANOMALY", WARNING,\n\t\t\t\t"Listed XDR statistic[s] show skew for the listed node[s]. It may or may not be an issue depending on the statistic type.",\n\t\t\t\t"XDR statistics anomaly check.");\n\ns = select * from DC.STATISTICS ignore "dc_size", "dc_state" save;\nu = select "uptime" from SERVICE.STATISTICS;\nu = group by CLUSTER, NODE do MAX(u);\ns = do s / u on common;\nr = group by CLUSTER, DC, KEY do SD_ANOMALY(s, ==, 3);\nASSERT(r, False, "Skewed cluster remote DC statistics.", "ANOMALY", WARNING,\n\t\t\t\t"Listed DC statistic[s] show skew for the listed node[s]. Please run \'show statistics dc\' to get all DC stats. May be non-issue if remote Data center connectivity behavior for nodes is not same.",\n\t\t\t\t"Remote DC statistics anomaly check.");\n\n/*\nFollowing xdr queries are example of assert level check condition. We are considering assert only if provided condition is true (at least for one key).\nAlso we use same condition variable to filter keys for output. So we are using group by (CLUSTER, NODE), it makes condition variable values matching with\nassert input data structure, only exceptions are data which grouped by DC, in that case key filtration will not be possible.\n*/\nxdr_enabled = select "enable-xdr" from XDR.CONFIG;\nxdr_enabled = group by CLUSTER, NODE do OR(xdr_enabled);\ncluster_xdr_enabled = group by CLUSTER do OR(xdr_enabled);\n\ns = select "xdr-dc-state", "dc_state" from DC.STATISTICS save;\nr = group by CLUSTER, DC do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different remote DC states.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed DC[s] have a different remote DC visibility. Please run \'show statistics dc like state\' to see DC state. Possible network issue between data centers.",\n\t\t\t\t"Remote DC state check.",\n\t\t\t\txdr_enabled);\n\ns = select "dc_size" from DC.STATISTICS save;\nr = group by CLUSTER, DC do NO_MATCH(s, ==, MAJORITY) save;\nASSERT(r, False, "Different remote DC sizes.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed DC[s] have a different remote DC size. Please run \'show statistics dc like size\' to see DC size. Possible network issue between data centers.",\n\t\t\t\t"Remote DC size check.");\n\ns = select "free-dlog-pct", "dlog_free_pct", "free_dlog_pct" from XDR save;\nr = do s < 95;\nASSERT(r, False, "Low XDR free digest log space.", "OPERATIONS", INFO,\n\t\t\t\t"Listed node[s] have lower than ideal (95%) free digest log space. Please run \'show statistics xdr like free\' to see digest log space. Probable cause - low XDR throughput or a failed node processing in progress.",\n\t\t\t\t"XDR free digest log space check.",\n\t\t\t\txdr_enabled);\nr = group by CLUSTER do SD_ANOMALY(s, ==, 3);\nASSERT(r, False, "Skewed cluster XDR free digest log space.", "ANOMALY", WARNING,\n\t\t\t\t"Listed node[s] have different digest log free size pattern. Please run \'show statistics xdr like free\' to see digest log space. May not be an issue if the nodes are newly added or have been restarted with noresume or if remote Datacenter connectivity behavior differs for nodes.",\n\t\t\t\t"XDR free digest log space anomaly check.",\n\t\t\t\tcluster_xdr_enabled);\n\n\n/* Needs normalization but not sure on what ?? */\ns = select "timediff_lastship_cur_secs", "xdr_timelag" from XDR.STATISTICS save;\nr = do s > 10;\nASSERT(r, False, "High XDR shipping lag (> 10s).", "PERFORMANCE", WARNING,\n\t\t\t\t"Listed node[s] have higher than healthy ( > 10 sec) ship lag to remote data center. Please run \'show statistics xdr like time\' to see shipping lag. Probable cause - connectivity issue to remote datacenter or spike in write throughput on the local cluster.",\n\t\t\t\t"XDR shipping lag check.",\n\t\t\t\txdr_enabled);\nr = group by CLUSTER do SD_ANOMALY(s, ==, 3);\nASSERT(r, False, "Cluster XDR shipping lag skewed.", "ANOMALY", WARNING,\n\t\t\t\t"Listed node[s] have different ship lag patterns. Please run \'show statistics xdr like time\' to see shipping lag. May not be an issue if the nodes are newly added or have been restarted with noresume or if remote Datacenter connectivity behavior differs for nodes.",\n\t\t\t\t"XDR shipping lag anomaly check.",\n\t\t\t\tcluster_xdr_enabled);\n\n\ns = select "xdr-dc-timelag", "dc_timelag" from DC.STATISTICS save;\nr = group by CLUSTER, DC do SD_ANOMALY(s, ==, 3);\nASSERT(r, False, "Skewed cluster remote DC Lag.", "ANOMALY", WARNING,\n\t\t\t\t"Listed node[s] have different latency to remote data center. Please run \'show statistics dc like timelag\' to see timelag. Possible Data center connectivity issue.",\n\t\t\t\t"Remote DC lag anomaly check.",\n\t\t\t\tcluster_xdr_enabled);\n\n\n/* XDR xdr_read_latency_avg check */\ns = select "xdr_read_latency_avg", "local_recs_fetch_avg_latency" from XDR.STATISTICS save;\nr = do s > 2;\nASSERT(r, False, "High XDR average read latency (>2 sec).", "PERFORMANCE", WARNING,\n\t\t\t\t"Listed node[s] have higher than normal (> 2sec) local read latencies. Please run \'show statistics xdr like latency\' to see XDR read latency. Probable cause - system overload causing transaction queue to back up.",\n\t\t\t\t"XDR average read latency check.",\n\t\t\t\txdr_enabled);\n\n\ns = select "dc_open_conn" as "conn" from DC.STATISTICS save;\nds = select "dc_size" as "conn" from DC.STATISTICS save;\nds = do ds * 64 save as "max expected dc connections";\nr = do s > ds;\nASSERT(r, False, "High remote DC connections.", "LIMITS", WARNING,\n\t\t\t\t"Listed node[s] have higher than normal remote datacenter connections. Generally accepted number is (64*No of nodes in remote DC) per node. Please run \'show statistics dc like dc_open_conn dc_size\' to see DC connection statistics. Ignore if XDR is not pipelined.",\n\t\t\t\t"Remote DC connections check.",\n\t\t\t\txdr_enabled);\n\n\ns = select "xdr_uninitialized_destination_error", "noship_recs_uninitialized_destination" from XDR.STATISTICS save;\nr = do s > 0;\nASSERT(r, False, "Uninitialized destination cluster.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed node[s] have a non zero value for this uninitialized DC. Please check the configuration.",\n\t\t\t\t"Uninitialized destination cluster check.",\n\t\t\t\txdr_enabled);\n\n\ns = select "xdr_unknown_namespace_error", "noship_recs_unknown_namespace" from XDR.STATISTICS save;\nr = do s > 0;\nASSERT(r, False, "Missing namespace in remote data center.", "OPERATIONS", WARNING,\n\t\t\t\t"Certain namespace not found in remote DC. Please check the configuration to ascertain if remote DC has all the namespace being shipped.",\n\t\t\t\t"Remote DC namespace check.",\n\t\t\t\txdr_enabled);\n\n/* XDR failednode_sessions_pending check */\ns = select "failednode_sessions_pending", "xdr_active_failed_node_sessions" from XDR.STATISTICS save;\nr = do s > 0;\nASSERT(r, False, "Active failed node sessions.", "OPERATIONS", INFO,\n "Listed node[s] have failed node sessions pending. Please check if there are any failed nodes on the source cluster.",\n "Active failed node sessions check.",\n xdr_enabled);\n\n/* XDR linkdown_sessions_pending check */\ns = select "linkdown_sessions_pending", "xdr_active_link_down_sessions" from XDR.STATISTICS save;\nr = do s > 0;\nASSERT(r, False, "Active linkdown sessions.", "OPERATIONS", INFO,\n "Listed node[s] have link down sessions pending. Please check the connectivity of remote datacenter.",\n "Active linkdown sessions check.",\n xdr_enabled);\n\n/* XDR xdr_ship_outstanding_objects check */\ns = select "xdr_ship_outstanding_objects", "stat_recs_outstanding" from XDR.STATISTICS save;\nr = do s > 10000;\nASSERT(r, False, "Too many outstanding objects (>10000) to ship !!.", "OPERATIONS", WARNING,\n "Listed node[s] have too many records outstanding. Please check relogging and error statistics.",\n "XDR outstanding objects check.",\n xdr_enabled);\n\n/* XDR xdr_ship_inflight_objects check */\ns = select "xdr_ship_inflight_objects", "stat_recs_inflight" from XDR.STATISTICS save;\nr = do s > 5000;\nASSERT(r, False, "Too many inflight objects (>5000).", "PERFORMANCE", WARNING,\n "Listed node[s] have too many objects inflight. This might lead to XDR throttling itself, consider tuning this parameter to a lower value.",\n "Crossing xdr-max-ship-throughput check.",\n xdr_enabled);\n\n/* XDR xdr_ship_latency_avg check */\ns = select "xdr_ship_latency_avg", "latency_avg_ship" from XDR.STATISTICS save;\n// Following value is not fixed yet\nr = do s > 5000;\nASSERT(r, False, "Record shipping takes too long (>5 sec).", "PERFORMANCE", WARNING,\n\t\t\t\t"Listed node[s] have more than normal (>5sec) average shipping latency to remote data center. Possible high connectivity latency or performance issue at the remote data center.",\n\t\t\t\t"XDR average ship latency check.",\n\t\t\t\txdr_enabled);\n\n/* XDR dlog_overwritten_error check */\ns = select "dlog_overwritten_error" from XDR.STATISTICS save;\nr = do s > 0;\nASSERT(r, False, "XDR digest log entries got overwritten.", "PERFORMANCE", WARNING,\n\t\t\t\t"Listed node[s] have a non zero value for XDR digest log entries that got overwritten.",\n\t\t\t\t"XDR dlog overwritten error check.",\n\t\t\t\txdr_enabled);\n\n/* XDR xdr_queue_overflow_error check */\ns = select "xdr_queue_overflow_error" from XDR.STATISTICS save;\nr = do s > 0;\nASSERT(r, False, "XDR queue overflows.", "PERFORMANCE", WARNING,\n\t\t\t\t"Listed node[s] have a non zero value for XDR queue overflow errors. Typically happens when there are no physical space available on the storage holding the digest log, or if the writes are happening at such a rate that elements are not written fast enough to the digest log. The number of entries this queue can hold is 1 million.",\n\t\t\t\t"XDR queue overflow error check.",\n\t\t\t\txdr_enabled);\n\n/* XDR > 5 */\n\nSET CONSTRAINT VERSION ALL;\n/* CLUSTER STATE */\n\nr = select "cluster_integrity" from SERVICE.STATISTICS save;\nr = do r == True;\nASSERT(r, True, "Cluster integrity fault.", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed node[s] have cluster integrity fault. This indicates cluster is not completely wellformed. Please check server logs for more information. Probable cause - issue with network.",\n\t\t\t\t"Cluster integrity fault check.");\n\nr = select "cluster_key" from SERVICE.STATISTICS;\nr = do NO_MATCH(r, ==, MAJORITY) save;\nASSERT(r, False, "Different Cluster Key.", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed cluster[s] have different cluster keys for nodes. This indicates cluster is not completely wellformed. Please check server logs for more information. Probable cause - issue with network.",\n\t\t\t\t"Cluster Key difference check.");\n\nu = select "uptime" from SERVICE.STATISTICS;\ntotal_nodes = group by CLUSTER do COUNT(u) save as "total nodes";\nr = select "cluster_size" from SERVICE.STATISTICS save;\nr = do r == total_nodes;\nASSERT(r, True, "Unstable Cluster.", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed node[s] have cluster size not matching total number of available nodes. This indicates cluster is not completely wellformed. Please check server logs for more information. Probable cause - issue with network.",\n\t\t\t\t"Cluster stability check.");\n\npaxos_replica_limit = select "paxos-single-replica-limit" from SERVICE.CONFIG save as "paxos-single-replica-limit";\npaxos_replica_limit = group by CLUSTER paxos_replica_limit;\n\ncluster_size = select "cluster_size" from SERVICE.STATISTICS;\ncluster_size = group by CLUSTER do MAX(cluster_size);\n\nreplication_factor_check = select "replication-factor", "repl-factor" from NAMESPACE.CONFIG;\nreplication_factor_check = group by CLUSTER, NODE do MAX(replication_factor_check);\nreplication_factor_check = do replication_factor_check >=2;\n\nr = do cluster_size <= paxos_replica_limit;\nr = do r && replication_factor_check;\n\nASSERT(r, False, "Critical Cluster State - Only one copy of data exists", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed node[s] have cluster size less than or equal to paxos-single-replica-limit. Only one copy of the data (no replicas) will be kept in the cluster",\n\t\t\t\t"Paxos single replica limit check");\n\n\n/* UDF */\n\nu = select * from UDF.METADATA;\nr = group by FILENAME, KEY do NO_MATCH(u, ==, MAJORITY) save;\nASSERT(r, False, "UDF not in sync (file not matching).", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed UDF definitions do not match across the nodes. This may lead to incorrect UDF behavior. Run command \'asinfo -v udf-list\' to see list of UDF. Re-register the latest version of the not in sync UDF[s].",\n\t\t\t\t"UDF sync (file not matching) check.");\ntotal_nodes = group by CLUSTER do COUNT(u) save as "expected node count";\nc = group by CLUSTER, FILENAME do COUNT(u) save as "node count";\nr = do c == total_nodes;\nASSERT(r, True, "UDF not in sync (not available on all node).", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed UDF[s] are not available on all the nodes. This may lead to incorrect UDF behavior. Run command \'asinfo -v udf-list\' to see list of UDF. Re-register missing UDF in cluster.",\n\t\t\t\t"UDF sync (availability on all node) check.");\n\n/* SINDEX */\n\ns = select "sync_state" as "val", "state" as "val" from SINDEX.STATISTICS save;\ns = group by CLUSTER, NAMESPACE, SET, SINDEX s;\nr1 = do s == "synced";\nr2 = do s == "WO";\nr = do r1 || r2;\nASSERT(r, True, "SINDEX not in sync with primary.", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed sindex[es] are not in sync with primary. This can lead to wrong query results. Consider dropping and recreating secondary index[es].",\n\t\t\t\t"SINDEX sync state check.");\nu = select "uptime" from SERVICE.STATISTICS;\ntotal_nodes = group by CLUSTER do COUNT(u) save as "cluster node count";\nc = group by CLUSTER, NAMESPACE, SET, SINDEX do COUNT(s) save as "nodes with SINDEX";\nr = do c == total_nodes;\nASSERT(r, True, "SINDEX not in sync (not available on all node).", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed sindex[es] not available on all nodes. This can lead to wrong query results. Consider dropping and recreating missing secondary index[es].",\n\t\t\t\t"SINDEX metadata sync (availability on all node) check.");\n\n\n/* LDT */\n\nl = select like("ldt_.*");\nr = do l > 0;\nASSERT(r, False, "Deprecated feature LDT in use.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed nodes[s] have non-zero LDT statistics. This feature is deprecated. Please visit Aerospike Homepage for details.",\n\t\t\t\t"LDT statistics check.");\n\n\n/* ENDPOINTS */\n\nservice = select "endpoints" as "e" from METADATA.ENDPOINTS;\nservices = select "services" as "e" from METADATA.SERVICES;\nall_endpoints = do service + services;\n\nr = group by CLUSTER do EQUAL(all_endpoints);\nASSERT(r, True, "Services list discrepancy.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed Cluster[s] shows different services list for different nodes. Please run \'asinfo -v services\' to get all services.",\n\t\t\t\t"Services list discrepancy test.");\n\n\n/* RACKS */\n\nrackid = select "rack-id" from NAMESPACE.CONFIG;\nr = group by CLUSTER, NAMESPACE do VALUE_UNIFORM(rackid);\nASSERT(r, True, "Wrong rack-id distribution.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] does not have uniform rack distribution. It might cause extra traffic on c with less nodes assigned. Please set rack-id properly.",\n\t\t\t\t"Roster misconfiguration test.");\n\nnode_rackid = select "rack-id" from NAMESPACE.CONFIG;\nnode_rackid = group by CLUSTER, NODE, NAMESPACE do FIRST(node_rackid);\n\nnode_id = select "node-id" from METADATA;\nnode_id = group by CLUSTER, NODE do FIRST(node_id);\n\nrack_rackid = select "rack-id" from RACKS.CONFIG;\nrack_rackid = group by CLUSTER, NODE, NAMESPACE, RACKS do FIRST(rack_rackid);\n\nrack_nodes = select "nodes" from RACKS.CONFIG;\nrack_nodes = group by CLUSTER, NODE, NAMESPACE, RACKS do FIRST(rack_nodes);\n\nr1 = do node_rackid == rack_rackid;\nr2 = do node_id IN rack_nodes;\nr = do r1 && r2;\nr = group by CLUSTER, NODE, NAMESPACE do OR(r);\n\nASSERT(r, True, "Node is not part of configured rack.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed node[s] is not part of configured rack. Probable cause - missed to re-cluster after changing rack-id.",\n\t\t\t\t"Node rack membership check");\n\nrack_nodes = select "nodes" from RACKS.CONFIG;\nr = group by CLUSTER, NAMESPACE, RACKS do EQUAL(rack_nodes);\nASSERT(r, True, "Rack configuration mismatch.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] having different rack configurations across multiple nodes in cluster. Please check rack configurations.",\n\t\t\t\t"Rack configuration check");\n\n/*\n\tDifferent queries for different versions. All version constraint sections should be at the bottom of file, it will avoid extra version reset at the end.\n*/\n\nSET CONSTRAINT VERSION >= 3.9;\n// Uptime\n\nu = select "uptime" from SERVICE.STATISTICS;\nu = GROUP BY CLUSTER, NODE do MAX(u);\n\n\n// Read statistics\n\nnf = select "client_read_not_found" as "cnt" from NAMESPACE.STATISTICS;\ns = select "client_read_success" as "cnt" from NAMESPACE.STATISTICS;\nt = select "client_read_timeout" as "cnt" from NAMESPACE.STATISTICS;\ne = select "client_read_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_reads = do s + nf;\ntotal_reads = do total_reads + t;\ntotal_reads = do total_reads + e save as "total client reads";\ntotal_reads_per_sec = do total_reads/u;\ntotal_reads = group by CLUSTER, NAMESPACE, NODE do MAX(total_reads);\ntotal_reads_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_reads_per_sec);\n\ne = select "client_read_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_reads_per_sec;\np = do p * 100 save as "client_read_error % of total reads";\nr = do p <= 5;\nASSERT(r, True, "High client read errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal read errors (> 5% client reads). Please run \'show statistics namespace like client_read\' to see values.",\n\t\t\t\t"High read error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero client read errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero read errors. Please run \'show statistics namespace like client_read\' to see values.",\n\t\t\t\t"Non-zero read error check");\n\nt = select "client_read_timeout" from NAMESPACE.STATISTICS save;\nt = group by CLUSTER, NAMESPACE t;\nr = do t/total_reads;\nr = do r * 100 save as "client_read_timeout % of total reads";\nr = do r <= 5;\nASSERT(r, True, "High client read timeouts", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal read timeouts (> 5% client reads). Please run \'show statistics namespace like client_read\' to see values.",\n\t\t\t\t"High read timeouts check");\n\nc = select "client_read_not_found" from NAMESPACE.STATISTICS save;\nc = group by CLUSTER, NAMESPACE c;\n\nr = do c / total_reads;\nr = do r * 100 save as "client_read_not_found % of total reads";\nr = do r <= 20;\nASSERT(r, True, "High read not found errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show higher than normal read not found errors (> 20% client reads). Please run \'show statistics namespace like client_read\' to see values.",\n\t\t\t\t"High read not found error check");\n\n\n// Delete statistics\n\nnf = select "client_delete_not_found" as "cnt" from NAMESPACE.STATISTICS;\ns = select "client_delete_success" as "cnt" from NAMESPACE.STATISTICS;\nt = select "client_delete_timeout" as "cnt" from NAMESPACE.STATISTICS;\ne = select "client_delete_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_deletes = do s + nf;\ntotal_deletes = do total_deletes + t;\ntotal_deletes = do total_deletes + e save as "total client deletes";\ntotal_deletes_per_sec = do total_deletes/u;\ntotal_deletes = group by CLUSTER, NAMESPACE, NODE do MAX(total_deletes);\ntotal_deletes_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_deletes_per_sec);\n\ne = select "client_delete_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_deletes_per_sec;\np = do p * 100 save as "client_delete_error % of total deletes";\nr = do p <= 5;\nASSERT(r, True, "High client delete errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal delete errors (> 5% client deletes). Please run \'show statistics namespace like client_delete\' to see values.",\n\t\t\t\t"High delete error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero client delete errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero delete errors. Please run \'show statistics namespace like client_delete\' to see values.",\n\t\t\t\t"Non-zero delete error check");\n\nt = select "client_delete_timeout" from NAMESPACE.STATISTICS save;\nt = group by CLUSTER, NAMESPACE t;\nr = do t/total_deletes;\nr = do r * 100 save as "client_delete_timeout % of total deletes";\nr = do r <= 5;\nASSERT(r, True, "High client delete timeouts", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal delete timeouts (> 5% client deletes). Please run \'show statistics namespace like client_delete\' to see values.",\n\t\t\t\t"High delete timeouts check");\n\nc = select "client_delete_not_found" from NAMESPACE.STATISTICS save;\nc = group by CLUSTER, NAMESPACE c;\nr = do c / total_deletes;\nr = do r * 100 save as "client_delete_not_found % of total deletes";\nr = do r <= 20;\nASSERT(r, True, "High delete not found errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show higher than normal delete not found errors (> 20% client deletes). Please run \'show statistics namespace like client_delete\' to see values.",\n\t\t\t\t"High delete not found error check");\n\n\n// Write statistics\n\ns = select "client_write_success" as "cnt" from NAMESPACE.STATISTICS;\nt = select "client_write_timeout" as "cnt" from NAMESPACE.STATISTICS;\ne = select "client_write_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_writes = do s + t;\ntotal_writes = do total_writes + e save as "total client writes";\ntotal_writes_per_sec = do total_writes/u;\ntotal_writes = group by CLUSTER, NAMESPACE, NODE do MAX(total_writes);\ntotal_writes_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_writes_per_sec);\n\ne = select "client_write_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_writes_per_sec;\np = do p * 100 save as "client_write_error % of total writes";\nr = do p <= 5;\nASSERT(r, True, "High client write errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal write errors (> 5% client writes). Please run \'show statistics namespace like client_write\' to see values.",\n\t\t\t\t"High write error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero client write errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero write errors. Please run \'show statistics namespace like client_write\' to see values.",\n\t\t\t\t"Non-zero write error check");\n\nt = select "client_write_timeout" from NAMESPACE.STATISTICS save;\nt = group by CLUSTER, NAMESPACE t;\nr = do t/total_writes;\nr = do r * 100 save as "client_write_timeout % of total writes";\nr = do r <= 5;\nASSERT(r, True, "High client write timeouts", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal write timeouts (> 5% client writes). Please run \'show statistics namespace like client_write\' to see values.",\n\t\t\t\t"High write timeouts check");\n\n\n// Client Proxy transaction statistics\n\ns = select "client_proxy_complete" as "cnt" from NAMESPACE.STATISTICS;\nt = select "client_proxy_timeout" as "cnt" from NAMESPACE.STATISTICS;\ne = select "client_proxy_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_client_proxy = do s + t;\ntotal_client_proxy = do total_client_proxy + e save as "total client proxy transactions";\ntotal_client_proxy_per_sec = do total_client_proxy/u;\ntotal_client_proxy = group by CLUSTER, NAMESPACE, NODE do MAX(total_client_proxy);\ntotal_client_proxy_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_client_proxy_per_sec);\n\ne = select "client_proxy_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_client_proxy_per_sec;\np = do p * 100 save as "client_proxy_error % of total proxy transactions";\nr = do p <= 5;\nASSERT(r, True, "High client proxy transaction errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal proxy transaction errors (> 5% client proxy transactions). Please run \'show statistics namespace like client_proxy\' to see values.",\n\t\t\t\t"High proxy transaction error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero client proxy transaction errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero proxy transaction errors. Please run \'show statistics namespace like client_proxy\' to see values.",\n\t\t\t\t"Non-zero proxy transaction error check");\n\n\nt = select "client_proxy_timeout" from NAMESPACE.STATISTICS save;\nt = group by CLUSTER, NAMESPACE t;\nr = do t/total_client_proxy;\nr = do r * 100 save as "client_proxy_timeout % of total proxy transactions";\nr = do r <= 5;\nASSERT(r, True, "High client proxy transaction timeouts", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal proxy transaction timeouts (> 5% client proxy transactions). Please run \'show statistics namespace like client_proxy\' to see values.",\n\t\t\t\t"High proxy transaction timeouts check");\n\n\n// UDF Transaction statistics\n\ns = select "client_udf_complete" as "cnt" from NAMESPACE.STATISTICS;\nt = select "client_udf_timeout" as "cnt" from NAMESPACE.STATISTICS;\ne = select "client_udf_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_udf_transactions = do s + t;\ntotal_udf_transactions = do total_udf_transactions + e save as "total udf transactions";\ntotal_udf_transactions_per_sec = do total_udf_transactions/u;\ntotal_udf_transactions = group by CLUSTER, NAMESPACE, NODE do MAX(total_udf_transactions);\ntotal_udf_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_udf_transactions_per_sec);\n\ne = select "client_udf_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_udf_transactions_per_sec;\np = do p * 100 save as "client_udf_error % of total udf transactions";\nr = do p <= 5;\nASSERT(r, True, "High udf transaction errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal udf transaction errors (> 5% udf transactions). Please run \'show statistics namespace like client_udf\' to see values.",\n\t\t\t\t"High udf transaction error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero udf transaction errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero udf transaction errors. Please run \'show statistics namespace like client_udf\' to see values.",\n\t\t\t\t"Non-zero udf transaction error check");\n\nt = select "client_udf_timeout" from NAMESPACE.STATISTICS save;\nt = group by CLUSTER, NAMESPACE t;\nr = do t/total_udf_transactions;\nr = do r * 100 save as "client_udf_timeout % of total udf transactions";\nr = do r <= 5;\nASSERT(r, True, "High udf transaction timeouts", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal udf transaction timeouts (> 5% udf transaction). Please run \'show statistics namespace like client_udf\' to see values.",\n\t\t\t\t"High udf transaction timeouts check");\n\n\n// UDF Sub-Transaction statistics\n\ns = select "udf_sub_udf_complete" as "cnt" from NAMESPACE.STATISTICS;\nt = select "udf_sub_udf_timeout" as "cnt" from NAMESPACE.STATISTICS;\ne = select "udf_sub_udf_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_udf_sub_transactions = do s + t;\ntotal_udf_sub_transactions = do total_udf_sub_transactions + e save as "total udf sub-transactions";\ntotal_udf_sub_transactions_per_sec = do total_udf_sub_transactions/u;\ntotal_udf_sub_transactions = group by CLUSTER, NAMESPACE, NODE do MAX(total_udf_sub_transactions);\ntotal_udf_sub_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_udf_sub_transactions_per_sec);\n\ne = select "udf_sub_udf_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_udf_sub_transactions_per_sec;\np = do p * 100 save as "udf_sub_udf_error % of total udf sub-transactions";\nr = do p <= 5;\nASSERT(r, True, "High udf sub-transaction errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal udf sub-transaction errors (> 5% udf sub-transactions). Please run \'show statistics namespace like udf_sub_udf\' to see values.",\n\t\t\t\t"High udf sub-transaction error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero udf sub-transaction errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero udf sub-transaction errors. Please run \'show statistics namespace like udf_sub_udf\' to see values.",\n\t\t\t\t"Non-zero udf sub-transaction error check");\n\nt = select "udf_sub_udf_timeout" from NAMESPACE.STATISTICS save;\nt = group by CLUSTER, NAMESPACE t;\nr = do t/total_udf_sub_transactions;\nr = do r * 100 save as "udf_sub_udf_timeout % of total udf sub-transactions";\nr = do r <= 5;\nASSERT(r, True, "High udf sub-transaction timeouts", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal udf sub-transaction timeouts (> 5% udf sub-transaction). Please run \'show statistics namespace like udf_sub_udf\' to see values.",\n\t\t\t\t"High udf sub-transaction timeouts check");\n\n\n// Proxied Batch-index Sub-Transaction statistics\n\ns = select "batch_sub_proxy_complete" as "cnt" from NAMESPACE.STATISTICS;\nt = select "batch_sub_proxy_error" as "cnt" from NAMESPACE.STATISTICS;\ne = select "batch_sub_proxy_timeout" as "cnt" from NAMESPACE.STATISTICS;\ntotal_transactions = do s + t;\ntotal_transactions = do total_transactions + e save as "total batch-index sub-transactions";\ntotal_transactions_per_sec = do total_transactions/u;\ntotal_transactions = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions);\ntotal_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);\n\ne = select "batch_sub_proxy_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_transactions_per_sec;\np = do p * 100 save as "batch_sub_proxy_error % of total batch-index sub-transactions";\nr = do p <= 5;\nASSERT(r, True, "High batch-index sub-transaction errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal batch-index sub-transaction errors (> 5% batch-index sub-transactions). Please run \'show statistics namespace like batch_sub_proxy\' to see values.",\n\t\t\t\t"High batch-index sub-transaction error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero batch-index sub-transaction errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero batch-index sub-transaction errors. Please run \'show statistics namespace like batch_sub_proxy\' to see values.",\n\t\t\t\t"Non-zero batch-index sub-transaction error check");\n\nt = select "batch_sub_proxy_timeout" from NAMESPACE.STATISTICS save;\nt = group by CLUSTER, NAMESPACE t;\nr = do t/total_transactions;\nr = do r * 100 save as "batch_sub_proxy_timeout % of total batch-index sub-transactions";\nr = do r <= 5;\nASSERT(r, True, "High batch-index sub-transaction timeouts", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal batch-index sub-transaction timeouts (> 5% batch-index sub-transaction). Please run \'show statistics namespace like batch_sub_proxy\' to see values.",\n\t\t\t\t"High batch-index sub-transaction timeouts check");\n\n\n// Batch-index read Sub-Transaction statistics\n\nnf = select "batch_sub_read_not_found" as "cnt" from NAMESPACE.STATISTICS;\ns = select "batch_sub_read_success" as "cnt" from NAMESPACE.STATISTICS;\nt = select "batch_sub_read_timeout" as "cnt" from NAMESPACE.STATISTICS;\ne = select "batch_sub_read_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_transactions = do s + nf;\ntotal_transactions = do total_transactions + t;\ntotal_transactions = do total_transactions + e save as "total batch-index read sub-transactions";\ntotal_transactions_per_sec = do total_transactions/u;\ntotal_transactions = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions);\ntotal_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);\n\ne = select "batch_sub_read_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_transactions_per_sec;\np = do p * 100 save as "batch_sub_read_error % of total reads";\nr = do p <= 5;\nASSERT(r, True, "High batch-index read sub-transaction errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal batch-index read sub-transaction errors (> 5% batch-index read sub-transactions). Please run \'show statistics namespace like batch_sub_read\' to see values.",\n\t\t\t\t"High batch-index read sub-transaction error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero batch-index read sub-transaction errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero batch-index read sub-transaction errors. Please run \'show statistics namespace like batch_sub_read\' to see values.",\n\t\t\t\t"Non-zero batch-index read sub-transaction error check");\n\nt = select "batch_sub_read_timeout" from NAMESPACE.STATISTICS save;\nt = group by CLUSTER, NAMESPACE t;\nr = do t/total_transactions;\nr = do r * 100 save as "batch_sub_read_timeout % of total batch-index read sub-transactions";\nr = do r <= 5;\nASSERT(r, True, "High batch-index read sub-transaction timeouts", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal batch-index read sub-transaction timeouts (> 5% batch-index read sub-transactions). Please run \'show statistics namespace like batch_sub_read\' to see values.",\n\t\t\t\t"High batch-index read sub-transaction timeouts check");\n\nc = select "batch_sub_read_not_found" from NAMESPACE.STATISTICS save;\nc = group by CLUSTER, NAMESPACE c;\nr = do c / total_transactions;\nr = do r * 100 save as "batch_sub_read_not_found % of total batch-index read sub-transactions";\nr = do r <= 20;\nASSERT(r, True, "High batch-index read sub-transaction not found errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show higher than normal batch-index read sub-transaction not found errors (> 20% batch-index read sub-transactions). Please run \'show statistics namespace like batch_sub_read\' to see values.",\n\t\t\t\t"High batch-index read sub-transaction not found error check");\n\n\n// Client UDF Transaction statistics\n\nrs = select "client_lang_read_success" as "cnt" from NAMESPACE.STATISTICS;\nds = select "client_lang_delete_success" as "cnt" from NAMESPACE.STATISTICS;\nws = select "client_lang_write_success" as "cnt" from NAMESPACE.STATISTICS;\ne = select "client_lang_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_client_udf_transactions = do rs + ds;\ntotal_client_udf_transactions = do total_client_udf_transactions + ws;\ntotal_client_udf_transactions = do total_client_udf_transactions + e save as "total client_lang";\ntotal_client_udf_transactions_per_sec = do total_client_udf_transactions/u;\ntotal_client_udf_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_client_udf_transactions_per_sec);\n\ne = select "client_lang_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_client_udf_transactions_per_sec;\np = do p * 100 save as "client_lang_error % of total client_lang";\nr = do p <= 5;\nASSERT(r, True, "High client initiated udf transactions errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal client initiated udf transactions errors (> 5% client initiated udf transactions). Please run \'show statistics namespace like client_lang\' to see values.",\n\t\t\t\t"High client initiated udf transactions error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero client initiated udf transaction errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero client initiated udf transaction errors. Please run \'show statistics namespace like client_lang\' to see values.",\n\t\t\t\t"Non-zero client initiated udf transaction error check");\n\n\n// UDF Sub-Transaction statistics\n\nrs = select "udf_sub_lang_read_success" as "cnt" from NAMESPACE.STATISTICS;\nds = select "udf_sub_lang_delete_success" as "cnt" from NAMESPACE.STATISTICS;\nws = select "udf_sub_lang_write_success" as "cnt" from NAMESPACE.STATISTICS;\ne = select "udf_sub_lang_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_transactions = do rs + ds;\ntotal_transactions = do total_transactions + ws;\ntotal_transactions = do total_transactions + e save as "total udf_sub_lang";\ntotal_transactions_per_sec = do total_transactions/u;\ntotal_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);\n\ne = select "udf_sub_lang_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_transactions_per_sec;\np = do p * 100 save as "udf_sub_lang_error % of total udf_sub_lang";\nr = do p <= 5;\nASSERT(r, True, "High udf sub-transaction errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal udf sub-transaction errors (> 5% udf sub-transactions). Please run \'show statistics namespace like udf_sub_lang\' to see values.",\n\t\t\t\t"High udf sub-transaction error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero udf sub-transaction errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero udf sub-transaction errors. Please run \'show statistics namespace like udf_sub_lang\' to see values.",\n\t\t\t\t"Non-zero udf sub-transaction error check");\n\n\n// Query Agg statistics\ns = select "query_aggr_complete" as "val", "query_agg_success" as "val" from NAMESPACE.STATISTICS save;\ne = select "query_aggr_error" as "val", "query_agg_error" as "val" from NAMESPACE.STATISTICS save;\na = select "query_aggr_abort" as "val", "query_agg_abort" as "val" from NAMESPACE.STATISTICS save;\ntotal_transactions = do s + e; \ntotal_transaction = do total_transactions + a save as "total query aggregations";\ntotal_transactions_per_sec = do total_transactions/u;\ntotal_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);\n\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_transactions_per_sec;\np = do p * 100 save as "query_aggr_error % of total query aggregations";\nr = do p <= 5;\nASSERT(r, True, "High query aggregation errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal query aggregation errors (> 5% query aggregations). Please run \'show statistics namespace like query_agg\' to see values.",\n\t\t\t\t"High query aggregation error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero query aggregation errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero query aggregation errors. Please run \'show statistics namespace like query_agg\' to see values.",\n\t\t\t\t"Non-zero query aggregation error check");\n\n\n// Query Lookup statistics\nc = select "query_basic_complete" as "val", "query_lookup_success" as "val" from NAMESPACE.STATISTICS save;\ne = select "query_basic_error" as "val", "query_lookup_error" as "val" from NAMESPACE.STATISTICS save;\na = select "query_basic_abort" as "val", "query_lookup_abort" as "val" from NAMESPACE.STATISTICS save;\ntotal_transactions = do c + e;\ntotal_transactions = do total_transactions + a save as "total query lookups";\ntotal_transactions_per_sec = do total_transactions/u;\ntotal_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);\n\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_transactions_per_sec;\np = do p * 100 save as "query_basic_error % of total query lookups";\nr = do p <= 5;\nASSERT(r, True, "High query lookup errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal query lookup errors (> 5% query lookups). Please run \'show statistics namespace like query_basic\' (=> 5.7) or \'show statistics namespace like query_lookup\' (< 5.7) to see values.",\n\t\t\t\t"High query lookup error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero query lookup errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero query lookup errors. Please run \'show statistics namespace like query_basic\' (=> 5.7) or \'show statistics namespace like query_lookup\' (< 5.7) to see values.",\n\t\t\t\t"Non-zero query lookup error check");\n\n\n// Scan Agg statistics\ns = select "scan_aggr_complete" as "cnt" from NAMESPACE.STATISTICS;\ne = select "scan_aggr_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_transactions = do s + e save as "total scan aggregations";\ntotal_transactions_per_sec = do total_transactions/u;\ntotal_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);\n\ne = select "scan_aggr_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_transactions_per_sec;\np = do p * 100 save as "scan_aggr_error % of total scan aggregations";\nr = do p <= 5;\nASSERT(r, True, "High scan aggregation errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal scan aggregation errors (> 5% scan aggregations). Please run \'show statistics namespace like scan_agg\' to see values.",\n\t\t\t\t"High scan aggregation error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero scan aggregation errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero scan aggregation errors. Please run \'show statistics namespace like scan_agg\' to see values.",\n\t\t\t\t"Non-zero scan aggregation error check");\n\n\n// Scan Basic statistics\ns = select "scan_basic_complete" as "cnt" from NAMESPACE.STATISTICS;\ne = select "scan_basic_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_transactions = do s + e save as "total basic scans";\ntotal_transactions_per_sec = do total_transactions/u;\ntotal_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);\n\ne = select "scan_basic_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_transactions_per_sec;\np = do p * 100 save as "scan_basic_error % of total basic scans";\nr = do p <= 5;\nASSERT(r, True, "High basic scan errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal basic scan errors (> 5% basic scans). Please run \'show statistics namespace like scan_basic\' to see values.",\n\t\t\t\t"High basic scan error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero basic scan errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero basic scan errors. Please run \'show statistics namespace like scan_basic\' to see values.",\n\t\t\t\t"Non-zero basic scan error check");\n\n\n// Scan Background UDF statistics\ns = select "scan_udf_bg_complete" as "cnt" from NAMESPACE.STATISTICS;\ne = select "scan_udf_bg_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_transactions = do s + e save as "total scan background udf";\ntotal_transactions_per_sec = do total_transactions/u;\ntotal_transactions_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_transactions_per_sec);\n\ne = select "scan_udf_bg_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_transactions_per_sec;\np = do p * 100 save as "scan_udf_bg_error % of total scan background udf";\nr = do p <= 5;\nASSERT(r, True, "High scan background udf errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal scan background udf errors (> 5% scan background udf). Please run \'show statistics namespace like scan_udf_bg\' to see values.",\n\t\t\t\t"High scan background udf error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero scan background udf errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero scan background udf errors. Please run \'show statistics namespace like scan_udf_bg\' to see values.",\n\t\t\t\t"Non-zero scan background udf error check");\n\n\n// Client transaction statistics\n\ne = select "client_tsvc_error" from NAMESPACE.STATISTICS save;\ne = do e/u on common save as "errors per second";\ne = group by CLUSTER, NAMESPACE e;\nr = do e > 0;\nASSERT(r, False, "Non-zero client transaction error.", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] have non-zero client transaction errors (for nodes). Please run \'show statistics namespace like client_tsvc_error\' to see values. Probable cause - protocol errors or security permission mismatch.",\n\t\t\t\t"Namespace client transaction error count check");\n\n\n// UDF Sub-Transactions (transaction service) statistics\n\ne = select "udf_sub_tsvc_error" from NAMESPACE.STATISTICS save;\ne = do e/u on common save as "errors per second";\ne = group by CLUSTER, NAMESPACE e;\nr = do e > 0;\nASSERT(r, False, "Non-zero udf sub-transaction error in the transaction service.", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] have non-zero udf sub-transaction errors in the transaction service (for nodes). Probable cause - protocol errors or security permission mismatch.",\n\t\t\t\t"Namespace udf sub-transaction transaction service error count check");\n\n\n// Batch-index read Sub-Transaction (transaction service) statistics\n\ne = select "batch_sub_tsvc_error" from NAMESPACE.STATISTICS save;\ne = do e/u on common save as "errors per second";\ne = group by CLUSTER, NAMESPACE e;\nr = do e > 0;\nASSERT(r, False, "Non-zero batch-index read sub-transaction errors in the transaction service.", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] have non-zero batch-index read sub-transaction errors in the transaction service across the nodes. Please run \'show statistics namespace like batch_sub_tsvc_error\' to see the values.",\n\t\t\t\t"Namespace batch-index read sub-transaction transaction service error count check");\n\n\n/* Key busy error */\ns = select "fail_key_busy" from NAMESPACE.STATISTICS save;\nu = select "uptime" from SERVICE.STATISTICS;\nu = group by CLUSTER, NODE do MAX(u);\ns = do s / u;\nr = group by KEY do SD_ANOMALY(s, ==, 3);\nASSERT(r, False, "Skewed Fail Key Busy count.", "ANOMALY", INFO,\n\t\t\t\t"fail_key_busy show skew count patterns (for listed node[s]). Please run \'show statistics namespace like fail_key_busy\' for details.",\n\t\t\t\t"Key Busy errors count anomaly check.");\n\n// XDR Write statistics\n\nSET CONSTRAINT VERSION < 4.5.1\n\ns = select "xdr_write_success" as "cnt", "xdr_client_write_success" as "cnt" from NAMESPACE.STATISTICS;\nt = select "xdr_write_timeout" as "cnt" from NAMESPACE.STATISTICS;\ne = select "xdr_write_error" as "cnt" from NAMESPACE.STATISTICS;\ntotal_xdr_writes = do s + t;\ntotal_xdr_writes = do total_xdr_writes + e save as "total xdr writes";\ntotal_xdr_writes_per_sec = do total_xdr_writes/u;\ntotal_xdr_writes = group by CLUSTER, NAMESPACE, NODE do MAX(total_xdr_writes);\ntotal_xdr_writes_per_sec = group by CLUSTER, NAMESPACE, NODE do MAX(total_xdr_writes_per_sec);\n\ne = select "xdr_write_error" from NAMESPACE.STATISTICS save;\ne = do e/u save as "errors per second (by using uptime)";\ne = group by CLUSTER, NAMESPACE e;\np = do e/total_xdr_writes_per_sec;\np = do p * 100 save as "xdr_write_error % of total xdr writes";\nr = do p <= 5;\nASSERT(r, True, "High xdr write errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal xdr write errors (> 5% xdr writes). Please run \'show statistics namespace like xdr_write\' to see values.",\n\t\t\t\t"High xdr write error check");\nwarning_breached = do p > 5;\nr = do p <= error_pct_threshold;\nr = do r || warning_breached;\nASSERT(r, True, "Non-zero xdr write errors", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show non-zero xdr write errors. Please run \'show statistics namespace like xdr_write\' to see values.",\n\t\t\t\t"Non-zero xdr write error check");\n\nt = select "xdr_write_timeout" from NAMESPACE.STATISTICS save;\nt = group by CLUSTER, NAMESPACE t;\nr = do t/total_xdr_writes;\nr = do r * 100 save as "xdr_write_timeout % of total xdr writes";\nr = do r <= 5;\nASSERT(r, True, "High xdr write timeouts", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal xdr write timeouts (> 5% xdr writes). Please run \'show statistics namespace like xdr_write\' to see values.",\n\t\t\t\t"High xdr write timeouts check");\n\nSET CONSTRAINT VERSION < 3.14;\n/* CLUSTER STATE */\n\nhp = select "heartbeat.protocol", "heartbeat-protocol" from NETWORK.CONFIG;\nheartbeat_proto_v2 = do hp == "v2";\nheartbeat_proto_v2 = group by CLUSTER, NODE do OR(heartbeat_proto_v2);\ncs = select "cluster_size" from SERVICE.STATISTICS save;\nmcs = select "paxos-max-cluster-size" as "cluster_size" from SERVICE.CONFIG save;\ncs_without_saved_value = select "cluster_size" from SERVICE.STATISTICS;\nmcs_without_saved_value = select "paxos-max-cluster-size" as "cluster_size" from SERVICE.CONFIG;\nr = do cs < mcs;\nASSERT(r, True, "Critical cluster size.", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed node[s] have cluster size higher than configured paxos-max-cluster-size. Please run \'show config service like paxos-max-cluster-size\' to check configured max cluster size.",\n\t\t\t\t"Critical cluster size check.",\n\t\t\t\theartbeat_proto_v2);\n\nsmall_max_configured = do mcs_without_saved_value < 20;\ncritical_size = do cs >= mcs;\ncorrect_size = do mcs_without_saved_value - 10;\ncorrect_size = do cs_without_saved_value <= correct_size;\nr = do small_max_configured || critical_size;\nr = do r || correct_size;\nASSERT(r, True, "Cluster size is near the max configured cluster size.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed node[s] have cluster size near the configured paxos-max-cluster-size. Please run \'show config service like paxos-max-cluster-size\' to check configured max cluster size.",\n\t\t\t\t"Cluster size check.",\n\t\t\t\theartbeat_proto_v2);\n\nSET CONSTRAINT VERSION < 3.9;\n\n/* Key busy error */\ns = select "err_rw_pending_limit" from SERVICE.STATISTICS save;\nu = select "uptime" from SERVICE.STATISTICS;\nu = group by CLUSTER, NODE do MAX(u);\ns = do s / u;\nr = group by KEY do SD_ANOMALY(s, ==, 3);\nASSERT(r, False, "Skewed Fail Key Busy count.", "ANOMALY", INFO,\n\t\t\t\t"err_rw_pending_limit show skew count patterns (for listed node[s]). Please run \'show statistics like err_rw_pending_limit\' for details.",\n\t\t\t\t"Key Busy errors count anomaly check.");\n\n\n// Read statistics\n\nt = select "stat_read_reqs" as "cnt" from SERVICE.STATISTICS save;\n\ne = select "stat_read_errs_other" from SERVICE.STATISTICS save;\nr = do e/t;\nr = do r * 100 save as "stat_read_errs_other % of total reads";\nr = do r <= 5;\nASSERT(r, True, "High read errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal read errors (> 5% reads). Please run \'show statistics service like stat_read\' to see values.",\n\t\t\t\t"High read error check");\n\nnf = select "stat_read_errs_notfound" from SERVICE.STATISTICS save;\nr = do nf/t;\nr = do r * 100 save as "stat_read_errs_notfound % of total reads";\nr = do r <= 20;\nASSERT(r, True, "High read not found errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal read not found errors (> 20% reads). Please run \'show statistics service like stat_read\' to see values.",\n\t\t\t\t"High read not found error check");\n\n\n// Write statistics\n\nt = select "stat_write_reqs" as "cnt" from SERVICE.STATISTICS save;\n\ne = select "stat_write_errs" from SERVICE.STATISTICS save;\nr = do e/t;\nr = do r * 100 save as "stat_write_errs % of total writes";\nr = do r <= 5;\nASSERT(r, True, "High write errors", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show higher than normal write errors (> 5% writes). Please run \'show statistics service like stat_write\' to see values.",\n\t\t\t\t"High write error check");\n\n\ne = select "stat_read_errs_other" from SERVICE.STATISTICS save;\ns = select "stat_read_success" from SERVICE.STATISTICS;\ns = GROUP BY CLUSTER, NODE do SUM(s);\nr = do e / s;\nr = do r/u on common;\nr = do r == 0;\nASSERT(r, True, "Non-zero node read errors count", "OPERATIONS", INFO,\n\t\t\t\t"Listed read error[s] show skew in count (for nodes). It may or may not be an issue depending on the error type. Please run \'show statistics service like stat_read\' to see values.",\n\t\t\t\t"Node read errors count check");\n\n\nSET CONSTRAINT VERSION >= 3.3.17;\n\ndefslp= select "defrag-sleep", "storage-engine.defrag-sleep" from NAMESPACE.CONFIG save;\ndefslp = group by CLUSTER, NAMESPACE defslp;\nr = do defslp == 1000;\nASSERT(r, True, "Non-default namespace defrag-sleep configuration.", "OPERATIONS",INFO,\n "Listed namespace[s] have non-default defrag-sleep configuration. Please run \'show config namespace like defrag\' to check value. It may be a non-issue in case namespaces are configured for aggressive defrag. Ignore those.",\n "Non-default namespace defrag-sleep check.");\n\nSET CONSTRAINT VERSION ALL;\n\n\n/*\nQueries Requested by SA Team (Ronen)\n*/\n\nSET CONSTRAINT VERSION >= 3.9;\n\ncrp = select "cache_read_pct" as "post-write-queue", "cache-read-pct" as "post-write-queue" from NAMESPACE.STATISTICS save;\npwq = select "post-write-queue", "storage-engine.post-write-queue" as "post-write-queue" from NAMESPACE.CONFIG save;\ncrp = do crp >= 10;\npwq = do pwq == 256;\nr = do crp && pwq;\nr = group by CLUSTER, NAMESPACE, NODE r;\nASSERT(r, False, "Sub-optimal post-write-queue", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show high cache hit rate (> 10%) but post-write-queue value is default. It might be sub-optimal. Please contact Aerospike support team or SA team.",\n\t\t\t\t"Namespace post-write-queue check");\n\n\nSET CONSTRAINT VERSION < 4.2;\n\nptl = select "partition-tree-locks" from NAMESPACE.CONFIG save;\ncs = select "cluster_size" from SERVICE.STATISTICS;\ncs = group by CLUSTER do MAX(cs) save as "cluster_size";\nr = do cs/ptl;\nr = group by CLUSTER, NAMESPACE, NODE r;\nr = do r < 2;\n\nASSERT(r, True, "Non-recommended partition-tree-locks", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] show low value for partition-tree-locks with respect to cluster size. It should be 8 for cluster-size < 16, 16 for cluster sizes 16 to 31, 32 for cluster sizes 32 to 63, etc. Please contact Aerospike support team or SA team.",\n\t\t\t\t"Namespace partition-tree-locks check");\n\nm = select "memory-size" as "cnt" from NAMESPACE.CONFIG;\ns = select "stop-writes-pct" as "cnt" from NAMESPACE.CONFIG;\ns = do 100 - s;\ns = do s/100;\nextra_space = do m * s save as "breathing space (over stop-write)";\nextra_space = group by CLUSTER, NODE, NAMESPACE do SUM(extra_space);\n\np = select "partition-tree-sprigs" as "cnt" from NAMESPACE.CONFIG save as "partition-tree-sprigs";\np = do p/16;\n\n// sprig overhead: 1M per 16 partition-tree-sprigs\nsprig_overhead = do 1024 * 1024;\nall_sprig_overhead = do p * sprig_overhead;\n\n// lock overhead: 320K per partition-tree-locks\nlock_overhead = do 320 * 1024;\nall_lock_overhead = do ptl * lock_overhead;\n\n// base overhead\nbase_overhead = do 64 * 1024;\n\ntotal_overhead = do base_overhead + all_sprig_overhead;\ntotal_overhead = do total_overhead + all_lock_overhead save as "partition-tree-sprigs overhead";\n\nr = do total_overhead < extra_space;\ne = select "edition" from METADATA;\ne = do e == "Community";\ne = group by CLUSTER, NODE do OR(e);\nASSERT(r, False, "Non-recommended partition-tree-sprigs for Community edition", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show low value for partition-tree-sprigs with respect to memory-size. partition-tree-sprigs overhead is less than (100 - stop-write-pct) % memory-size. It should be increased. Please contact Aerospike support team or SA team.",\n\t\t\t\t"Namespace partition-tree-sprigs check for Community edition",\n\t\t\t\te);\n\nSET CONSTRAINT VERSION >= 4.2;\n\ncs = select "cluster_size" from SERVICE.STATISTICS;\ncs = group by CLUSTER do MAX(cs);\nrepl = select "effective_replication_factor" as "cnt" from NAMESPACE.STATISTICS;\n\nm = select "memory-size" as "cnt" from NAMESPACE.CONFIG;\ns = select "stop-writes-pct" as "cnt" from NAMESPACE.CONFIG;\ns = do 100 - s;\ns = do s/100;\nextra_space = do m * s save as "breathing space (over stop-write)";\nextra_space = group by CLUSTER, NODE, NAMESPACE do SUM(extra_space);\n\n// sprig overhead: 8bytes per partition-tree-sprigs\nsprigs = select "partition-tree-sprigs" as "cnt" from NAMESPACE.CONFIG save as "partition-tree-sprigs";\nsprig_overhead = do 8 * sprigs;\nall_sprig_overhead = do sprig_overhead * 4096;\nall_sprig_overhead = do all_sprig_overhead / cs;\nall_sprig_overhead = do all_sprig_overhead * repl;\n\n// lock overhead: 8bytes per partition-tree-locks\nptl = 256;\nlock_overhead = do 8 * 256;\nall_lock_overhead = do lock_overhead * 4096;\nall_lock_overhead = do all_lock_overhead / cs;\nall_lock_overhead = do all_lock_overhead * repl;\n\n// base overhead\nbase_overhead = do 64 * 1024;\ntotal_overhead = do base_overhead + all_sprig_overhead;\ntotal_overhead = do total_overhead + all_lock_overhead save as "partition-tree-sprigs overhead";\n\nr = do total_overhead < extra_space;\ne = select "edition" from METADATA;\ne = do e == "Community";\ne = group by CLUSTER, NODE do OR(e);\nASSERT(r, False, "Non-recommended partition-tree-sprigs for Community edition", "OPERATIONS", INFO,\n\t\t\t\t"Listed namespace[s] show low value for partition-tree-sprigs with respect to memory-size. partition-tree-sprigs overhead is less than (100 - stop-write-pct) % memory-size. It should be increased. Please contact Aerospike support team or SA team.",\n\t\t\t\t"Namespace partition-tree-sprigs check for Community edition",\n\t\t\t\te);\n\nSET CONSTRAINT VERSION >= 4.3.0.2;\n// sprig mounts-size-limit checks\n\n// critical case\ncluster_size = select "cluster_size" as "sprig_limit_critical" from SERVICE.STATISTICS;\ncluster_size = group by CLUSTER do MAX(cluster_size) save as "cluster-size";\nrepl = select "effective_replication_factor" as "sprig_limit_critical" from NAMESPACE.STATISTICS save as "effective_repl_factor";\npts = select "partition-tree-sprigs" as "sprig_limit_critical" from NAMESPACE.CONFIG save as "partition-tree-sprigs";\nsize_limit = select "index-type.mounts-size-limit" as "sprig_limit_critical" from NAMESPACE.CONFIG;\n// below statement adds thousand delimiter to mounts-size-limiter when it prints\nsize_limit = do size_limit * 1 save as "mounts-size-limit";\n\n// check for enterprise edition\nedition = select "edition" from METADATA;\nis_enterprise = do edition == "Enterprise";\nis_enterprise = group by CLUSTER, NODE do OR(is_enterprise);\n\n// check for all flash\nindex_type = select "index-type" from NAMESPACE.STATISTICS;\nis_flash = do index_type == "flash";\n\n// combine enterprise and all flash conditions\ndont_skip = do is_enterprise && is_flash;\ndont_skip = group by CLUSTER, NODE, NAMESPACE do OR(dont_skip);\n\n// calculate sprig overhead\nnum_partitions = do 4096 * repl;\npartitions_per_node = do num_partitions/cluster_size;\npts_per_node = do partitions_per_node * pts;\ntotal_pts = do pts_per_node * 4096 save as "Minimum space required";\nresult = do total_pts > size_limit;\n\nASSERT(result, False, "ALL FLASH - Too many sprigs per partition for current available index mounted space. Some records are likely failing to be created.", "OPERATIONS", CRITICAL,\n\t\t\t\t"Minimum space required for sprig overhead at current cluster size exceeds mounts-size-limit.\n\t\t\t\t See: https://www.aerospike.com/docs/operations/configure/namespace/index/#flash-index and https://www.aerospike.com/docs/operations/plan/capacity/#aerospike-all-flash",\n\t\t\t\t"Check for too many sprigs for current cluster size.",\n\t\t\t\tdont_skip);\n\n\n// warning case\nmcs = select "min-cluster-size" as "sprig_limit_warning" from SERVICE;\nmcs = group by CLUSTER do MAX(mcs) save as "min-cluster-size";\nrepl = select "replication-factor" as "sprig_limit_warning" from NAMESPACE.STATISTICS;\npts = select "partition-tree-sprigs" as "sprig_limit_warning" from NAMESPACE.CONFIG;\nmsl = select "index-type.mounts-size-limit" as "sprig_limit_warning" from NAMESPACE.CONFIG;\n// below statement adds thousand delimiter to mounts-size-limiter when it prints\nmsl = do msl * 1 save as "mounts-size-limit";\n\n// calculate sprig overhead\n// The replication factor should be min(repl, mcs)\nr1 = do 4096 * repl;\nr1 = do r1/mcs;\nr1 = do r1 * pts;\nr1 = do r1 * 4096 save as "Minimum space required";\nr1 = do r1 > msl;\n\nrepl_smaller = do repl < mcs;\ne1 = do repl_smaller && dont_skip;\n\nASSERT(r1, False, "ALL FLASH - Too many sprigs per partition for configured min-cluster-size.", "OPERATIONS", WARNING,\n\t\t\t\t"Minimum space required for sprig overhead at min-cluster-size exceeds mounts-size-limit. \n\t\t\t\t See: https://www.aerospike.com/docs/operations/configure/namespace/index/#flash-index and https://www.aerospike.com/docs/operations/plan/capacity/#aerospike-all-flash",\n\t\t\t\t"Check for too many sprigs for minimum cluster size.",\n\t\t\t\te1);\n\n// same as calculation above but with min-cluster-size\n// Only is asserted if min-cluster-size is smaller than replication-factor.\n// r2 = do 4096 * mcs;\n// r2 = do r2/mcs;\nr2 = 4096;\nr2 = do r2 * pts;\nr2 = do r2 * 4096 save as "Minimum space required";\nr2 = do r2 > msl;\n\nmcs_smaller = do mcs <= repl;\ne2 = do mcs_smaller && dont_skip;\n\nASSERT(r2, False, "ALL FLASH - Too many sprigs per partition for configured min-cluster-size.", "OPERATIONS", WARNING,\n\t\t\t\t"Minimum space required for sprig overhead at min-cluster-size exceeds mounts-size-limit. \n\t\t\t\t See: https://www.aerospike.com/docs/operations/configure/namespace/index/#flash-index and https://www.aerospike.com/docs/operations/plan/capacity/#aerospike-all-flash",\n\t\t\t\t"Check for too many sprigs for minimum cluster size.",\n\t\t\t\te2);\n\nSET CONSTRAINT VERSION >= 4.0.0.1;\n// SC mode rules\n\ns = select "strong-consistency" from NAMESPACE.CONFIG;\n// Find out atleast one namespace in SC mode\ns = group by CLUSTER do OR(s);\n\nr = select "clock_skew_stop_writes" from NAMESPACE.STATISTICS;\nASSERT(r, False, "Wrong clock skew for SC mode", "OPERATIONS", WARNING,\n\t\t\t\t"For listed namespace[s], clock skew is outside of tolerance for strong-consistency. So writes are not allowed.",\n\t\t\t\t"Namespace clock_skew_stop_writes check",\n\t\t\t\ts);\n\nr = select "dead_partitions" from NAMESPACE.STATISTICS save;\nASSERT(r, 0, "Non-zero dead partitions", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] shows non-zero dead partitions. This is the number of partitions that are unavailable when all roster nodes are present. Will require the use of the revive command to make them available again.",\n\t\t\t\t"Namespace dead partitions check",\n\t\t\t\ts);\n\nr = select "unavailable_partitions" from NAMESPACE.STATISTICS save;\nASSERT(r, 0, "Non-zero unavailable partitions", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] shows non-zero unavailable partitions. This is the number of partitions that are unavailable when roster nodes are missing. Will turn into dead_partitions if still unavailable when all roster nodes are present. Probable cause - nodes more than or equal to replication-factor are either \'untrusted\' or out of the cluster.",\n\t\t\t\t"Namespace unavailable partitions check",\n\t\t\t\ts);\n\ncsw = select "cluster_clock_skew_stop_writes_sec" as "skew_val" from SERVICE.STATISTICS save;\n// convert to milliseconds\ncsw = do csw * 1000;\ncs_warning = do 0.75 * csw;\ncs = select "cluster_clock_skew_ms" as "skew_val", "cluster_clock_skew" as "skew_val" from SERVICE.STATISTICS save;\nr = do cs > cs_warning;\nASSERT(r, False, "Cluster clock_skew breached warning level", "OPERATIONS", WARNING,\n\t\t\t\t"Listed cluster[s] shows clock_skew more than 3/4th of cluster_clock_skew_stop_writes_sec. If it crossed cluster_clock_skew_stop_writes_sec then cluster will stop accepting writes.",\n\t\t\t\t"Cluster clock_skew check",\n\t\t\t\ts);\n\nsize = select "cluster_size" from SERVICE.STATISTICS;\np = group by CLUSTER do MAX(size) save as "cluster_size";\nrepl = select "replication-factor", "repl-factor" from NAMESPACE.CONFIG save as "replication_factor";\nr = do p == repl;\nASSERT(r, False, "Nodes equal to replication factor.", "OPERATIONS", WARNING,\n "Number of nodes is equal to replication factor, rolling restart not possible",\n "Node / replication factor check", s);\n\nsc_check = select "strong-consistency" from NAMESPACE.CONFIG;\nsc_check = group by CLUSTER, NAMESPACE do OR(sc_check);\n\nroster = select "roster", "observed_nodes" from ROSTER.CONFIG;\nr = group by CLUSTER, NAMESPACE, NODE do EQUAL(roster);\nASSERT(r, True, "Roster misconfigured.", "OPERATIONS", WARNING,\n\t\t\t\t"Listed namespace[s] shows difference between set roster nodes and observe nodes. Please set roster properly.",\n\t\t\t\t"Roster misconfiguration check.", sc_check);\n\nroster_null_check = select "roster" from ROSTER.CONFIG;\nroster_null_check = group by CLUSTER, NAMESPACE, NODE roster_null_check;\nroster_null_check = do "null" IN roster_null_check;\n\nr = do roster_null_check && sc_check;\n\nASSERT(r, False, "Roster is null or NOT set.", "OPERATIONS", CRITICAL,\n\t\t\t\t"Listed namespace[s] shows ROSTER as NULL or NOT SET. Please check and set roster properly.",\n\t\t\t\t"Roster null check.");\n\nSET CONSTRAINT VERSION ALL;\n\n/*\nServer Health Check\n*/\n\nSET CONSTRAINT VERSION >= 4.3.1;\n\nm = select * from METADATA.HEALTH save;\nASSERT(m, False, "Outlier[s] detected by the server health check.", "OPERATIONS", WARNING,\n\t\t\t "Listed outlier[s] have been reported by the server health check and they might be misbehaving.",\n\t\t\t "Server health check outlier detection. Run command \'asinfo -v health-outliers\' to see list of outliers");\n\nSET CONSTRAINT VERSION ALL;\n\n' |
def part1(rows):
return go(rows, 1)
def part2(rows):
return go(rows, 2)
def go(rows, part):
position = 0
depth = 0
aim = 0
for row in rows:
command, arg = row.split()
match command, int(arg):
case "forward", value:
position += value
depth += aim * value
case "down", value:
aim += value
case "up", value:
aim -= value
return aim * position if part == 1 else depth * position
| def part1(rows):
return go(rows, 1)
def part2(rows):
return go(rows, 2)
def go(rows, part):
position = 0
depth = 0
aim = 0
for row in rows:
(command, arg) = row.split()
match (command, int(arg)):
case ['forward', value]:
position += value
depth += aim * value
case ['down', value]:
aim += value
case ['up', value]:
aim -= value
return aim * position if part == 1 else depth * position |
class Solution:
# @param A : list of integers
# @return an integer
def merge(self,A, aux, low, mid, high):
k = i = low
j=mid+1
inversionCount = 0
while i <= mid and j <= high:
if A[i] <= A[j]:
aux[k] = A[i]
i = i + 1
else:
aux[k] = A[j]
j = j + 1
inversionCount += (mid - i + 1)
k = k + 1
while i <= mid:
aux[k] = A[i]
k = k + 1
i = i + 1
for i in range(low, high + 1):
A[i] = aux[i]
return inversionCount%1000000007
def mergesort(self,A, aux, low, high):
if high <= low:
return 0
mid = low + ((high - low) >> 1)
inversionCount = 0
inversionCount += self.mergesort(A, aux, low, mid)
inversionCount += self.mergesort(A, aux, mid + 1, high)
inversionCount += self.merge(A, aux, low, mid, high)
return inversionCount%1000000007
def solve(self, A):
n=len(A)
aux=A.copy()
return (self.mergesort(A,aux,0,n-1))
cat=Solution()
arr=[3, 2, 1]
count=cat.solve(arr)
print("Inversion Count is:",count)
| class Solution:
def merge(self, A, aux, low, mid, high):
k = i = low
j = mid + 1
inversion_count = 0
while i <= mid and j <= high:
if A[i] <= A[j]:
aux[k] = A[i]
i = i + 1
else:
aux[k] = A[j]
j = j + 1
inversion_count += mid - i + 1
k = k + 1
while i <= mid:
aux[k] = A[i]
k = k + 1
i = i + 1
for i in range(low, high + 1):
A[i] = aux[i]
return inversionCount % 1000000007
def mergesort(self, A, aux, low, high):
if high <= low:
return 0
mid = low + (high - low >> 1)
inversion_count = 0
inversion_count += self.mergesort(A, aux, low, mid)
inversion_count += self.mergesort(A, aux, mid + 1, high)
inversion_count += self.merge(A, aux, low, mid, high)
return inversionCount % 1000000007
def solve(self, A):
n = len(A)
aux = A.copy()
return self.mergesort(A, aux, 0, n - 1)
cat = solution()
arr = [3, 2, 1]
count = cat.solve(arr)
print('Inversion Count is:', count) |
lista_Itens = ['a', 'b', 'c'] #Lista Criada
for itens in lista_Itens: #for para imprimir itens da lista
print (itens)
lista_Itens.append('d')
lista_Itens.extend(['e', 'f', 'g'])
for itens in lista_Itens:
print (itens)
print ("Resultado final: {}, {}, {}, {}, {}, {}, {}.".format(lista_Itens[0], lista_Itens[1], lista_Itens[2], lista_Itens[3], lista_Itens[4],
lista_Itens[5], lista_Itens[6]))
lista_Itens.extend(['h', 'i', 'j'])
for i, itens in enumerate(lista_Itens):
print (i + 1, '=>', itens)
| lista__itens = ['a', 'b', 'c']
for itens in lista_Itens:
print(itens)
lista_Itens.append('d')
lista_Itens.extend(['e', 'f', 'g'])
for itens in lista_Itens:
print(itens)
print('Resultado final: {}, {}, {}, {}, {}, {}, {}.'.format(lista_Itens[0], lista_Itens[1], lista_Itens[2], lista_Itens[3], lista_Itens[4], lista_Itens[5], lista_Itens[6]))
lista_Itens.extend(['h', 'i', 'j'])
for (i, itens) in enumerate(lista_Itens):
print(i + 1, '=>', itens) |
# generated from genmsg/cmake/pkg-genmsg.context.in
messages_str = "/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/msg/TypeDef.msg"
services_str = "/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/DeleteParam.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/GetActionServers.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/GetParam.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/GetParamNames.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/GetTime.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/HasParam.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/MessageDetails.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/Nodes.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/NodeDetails.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/Publishers.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/SearchParam.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceHost.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceNode.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceProviders.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceRequestDetails.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceResponseDetails.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/Services.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServicesForType.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceType.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/SetParam.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/Subscribers.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/Topics.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/TopicsForType.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/TopicType.srv"
pkg_name = "rosapi"
dependencies_str = ""
langs = "gencpp;geneus;genlisp;gennodejs;genpy"
dep_include_paths_str = "rosapi;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/msg"
PYTHON_EXECUTABLE = "/usr/bin/python"
package_has_static_sources = 'TRUE' == 'TRUE'
genmsg_check_deps_script = "/opt/ros/kinetic/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py"
| messages_str = '/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/msg/TypeDef.msg'
services_str = '/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/DeleteParam.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/GetActionServers.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/GetParam.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/GetParamNames.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/GetTime.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/HasParam.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/MessageDetails.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/Nodes.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/NodeDetails.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/Publishers.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/SearchParam.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceHost.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceNode.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceProviders.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceRequestDetails.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceResponseDetails.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/Services.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServicesForType.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/ServiceType.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/SetParam.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/Subscribers.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/Topics.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/TopicsForType.srv;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/srv/TopicType.srv'
pkg_name = 'rosapi'
dependencies_str = ''
langs = 'gencpp;geneus;genlisp;gennodejs;genpy'
dep_include_paths_str = 'rosapi;/home/abiantorres/Documentos/tfg/autonomous-vehicles-system-simulation/low_level_simulation/src/rosbridge_suite/rosapi/msg'
python_executable = '/usr/bin/python'
package_has_static_sources = 'TRUE' == 'TRUE'
genmsg_check_deps_script = '/opt/ros/kinetic/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py' |
"""
The SSJ dataset has an unusual bug: all of the sentences end with SpaceAfter=no
This script fixes them and writes the fixed files to the given location.
"""
def process(input_txt, input_conllu, input_txt_copy, input_conllu_copy):
conllu_lines = open(input_conllu).readlines()
txt_lines = open(input_txt).readlines()
inserts = []
new_conllu_lines = list(conllu_lines)
line_idx = 0
text_idx = 0
# invariant: conllu_lines[line_idx] is
# # sent_id
# at the start of a loop
while line_idx < len(conllu_lines):
# extract the text from the comments before each sentence
line_idx = line_idx + 1
text_line = conllu_lines[line_idx]
assert text_line.startswith("# text = "), "Unexpected format: %s,%d is not # text" % (input_txt, line_idx)
text_line = text_line[9:-1]
# use that text to keep track of an index in the text where we might need to put new spaces
text_idx = text_idx + len(text_line)
# advance to the end of the sentence
line_idx = line_idx + 1
assert conllu_lines[line_idx].startswith("1"), "Unexpected format: %s,%d is not a word" % (input_txt, line_idx)
while conllu_lines[line_idx].strip():
line_idx = line_idx + 1
last_word_idx = line_idx - 1
# check if the end of the sentence has SpaceAfter or not
new_line = conllu_lines[last_word_idx].replace("SpaceAfter=No|", "")
assert new_line.find("SpaceAfter=") < 0, "Unexpected format: %s,%d has unusual SpaceAfter" % (input_txt, line_idx)
# if not, need to add a new space
if new_line != conllu_lines[last_word_idx]:
inserts.append(text_idx)
conllu_lines[last_word_idx] = new_line
text_idx = text_idx + 1
# done with a sentence. skip to the start of the next sentence
# or the end of the document
while line_idx < len(conllu_lines) and not conllu_lines[line_idx].strip():
line_idx = line_idx + 1
current_txt_len = 0
current_txt_idx = 0
for insert in inserts:
line = txt_lines[current_txt_idx]
while len(line) + current_txt_len < insert:
current_txt_len = current_txt_len + len(line)
current_txt_idx = current_txt_idx + 1
line = txt_lines[current_txt_idx]
new_line = line[:insert-current_txt_len] + " " + line[insert-current_txt_len:]
txt_lines[current_txt_idx] = new_line
with open(input_txt_copy, "w") as fout:
for line in txt_lines:
fout.write(line)
with open(input_conllu_copy, "w") as fout:
for line in conllu_lines:
fout.write(line)
| """
The SSJ dataset has an unusual bug: all of the sentences end with SpaceAfter=no
This script fixes them and writes the fixed files to the given location.
"""
def process(input_txt, input_conllu, input_txt_copy, input_conllu_copy):
conllu_lines = open(input_conllu).readlines()
txt_lines = open(input_txt).readlines()
inserts = []
new_conllu_lines = list(conllu_lines)
line_idx = 0
text_idx = 0
while line_idx < len(conllu_lines):
line_idx = line_idx + 1
text_line = conllu_lines[line_idx]
assert text_line.startswith('# text = '), 'Unexpected format: %s,%d is not # text' % (input_txt, line_idx)
text_line = text_line[9:-1]
text_idx = text_idx + len(text_line)
line_idx = line_idx + 1
assert conllu_lines[line_idx].startswith('1'), 'Unexpected format: %s,%d is not a word' % (input_txt, line_idx)
while conllu_lines[line_idx].strip():
line_idx = line_idx + 1
last_word_idx = line_idx - 1
new_line = conllu_lines[last_word_idx].replace('SpaceAfter=No|', '')
assert new_line.find('SpaceAfter=') < 0, 'Unexpected format: %s,%d has unusual SpaceAfter' % (input_txt, line_idx)
if new_line != conllu_lines[last_word_idx]:
inserts.append(text_idx)
conllu_lines[last_word_idx] = new_line
text_idx = text_idx + 1
while line_idx < len(conllu_lines) and (not conllu_lines[line_idx].strip()):
line_idx = line_idx + 1
current_txt_len = 0
current_txt_idx = 0
for insert in inserts:
line = txt_lines[current_txt_idx]
while len(line) + current_txt_len < insert:
current_txt_len = current_txt_len + len(line)
current_txt_idx = current_txt_idx + 1
line = txt_lines[current_txt_idx]
new_line = line[:insert - current_txt_len] + ' ' + line[insert - current_txt_len:]
txt_lines[current_txt_idx] = new_line
with open(input_txt_copy, 'w') as fout:
for line in txt_lines:
fout.write(line)
with open(input_conllu_copy, 'w') as fout:
for line in conllu_lines:
fout.write(line) |
"""Ambra exceptions."""
class AmbraException(Exception):
"""Base ambra exception."""
class AmbraResponseException(AmbraException):
"""Ambra response exception."""
def __init__(self, code, description=None, response_text=None):
"""Init.
:param code: response code
:param description: error description
:param response_text: response text
"""
message = '{code}. {description}'.format(
code=code,
description=description,
)
if response_text:
message = '{base_message}\n{text}'.format(
base_message=message,
text=response_text,
)
super().__init__(message)
self.code = code
self.description = description
self.response_text = response_text
| """Ambra exceptions."""
class Ambraexception(Exception):
"""Base ambra exception."""
class Ambraresponseexception(AmbraException):
"""Ambra response exception."""
def __init__(self, code, description=None, response_text=None):
"""Init.
:param code: response code
:param description: error description
:param response_text: response text
"""
message = '{code}. {description}'.format(code=code, description=description)
if response_text:
message = '{base_message}\n{text}'.format(base_message=message, text=response_text)
super().__init__(message)
self.code = code
self.description = description
self.response_text = response_text |
# https://leetcode.com/contest/weekly-contest-68/problems/reorganize-string/
class Solution:
def reorganizeString(self, S):
"""
:type S: str
:rtype: str
"""
# sort S by character occurrence, return value is a list
S = sorted(sorted(S), key=S.count, reverse=True)
# find the middle point
length = len(S)
middle = int((length-1)/2)+1
# i start from 0, j start from middle point. append S[i] and S[j] in turn
res = []
i,j=0,middle
while i<middle and j<length:
if S[i] == S[j]:
return ''
else:
res.append(S[i])
res.append(S[j])
i += 1
j += 1
# if the length is even number, append the one just before middle point
if i == middle-1:
res.append(S[i])
return ''.join(i for i in res)
s='aaabb'
s='aab'
s='ksdalkjfkldsjfl'
s="abbabbaaab"
solution = Solution()
print(solution.reorganizeString(s))
| class Solution:
def reorganize_string(self, S):
"""
:type S: str
:rtype: str
"""
s = sorted(sorted(S), key=S.count, reverse=True)
length = len(S)
middle = int((length - 1) / 2) + 1
res = []
(i, j) = (0, middle)
while i < middle and j < length:
if S[i] == S[j]:
return ''
else:
res.append(S[i])
res.append(S[j])
i += 1
j += 1
if i == middle - 1:
res.append(S[i])
return ''.join((i for i in res))
s = 'aaabb'
s = 'aab'
s = 'ksdalkjfkldsjfl'
s = 'abbabbaaab'
solution = solution()
print(solution.reorganizeString(s)) |
# -*- coding: utf-8 -*-
def sample() -> str:
return "hoge"
def main() -> None:
print("Hello Python")
if __name__ == "__main__":
main()
| def sample() -> str:
return 'hoge'
def main() -> None:
print('Hello Python')
if __name__ == '__main__':
main() |
class Context(object):
@staticmethod
def click(x, y, new_context, ctrl):
ctrl.move(x=x, y=y)
ctrl.click()
return new_context
class MainMenu(Context):
@classmethod
def click_play(cls, ctrl):
return cls.click(x=270, y=210, new_context=LevelMenu, ctrl=ctrl)
class LevelMenu(Context):
@classmethod
def click_play(cls, ctrl):
return cls.click(x=750, y=500, new_context=GamePlay, ctrl=ctrl)
@classmethod
def click_mode(cls, ctrl):
return cls.click(x=750, y=540, new_context=ModeMenu, ctrl=ctrl)
class ModeMenu(Context):
@classmethod
def click_normal(cls, ctrl):
return cls.click(x=400, y=180, new_context=cls, ctrl=ctrl)
@classmethod
def click_extreme(cls, ctrl):
return cls.click(x=400, y=220, new_context=cls, ctrl=ctrl)
@classmethod
def click_endless(cls, ctrl):
return cls.click(x=400, y=260, new_context=cls, ctrl=ctrl)
@classmethod
def click_creative(cls, ctrl):
return cls.click(x=400, y=300, new_context=cls, ctrl=ctrl)
@classmethod
def click_return(cls, ctrl):
return cls.click(x=30, y=20, new_context=LevelMenu, ctrl=ctrl)
class GamePlay(Context):
pass
| class Context(object):
@staticmethod
def click(x, y, new_context, ctrl):
ctrl.move(x=x, y=y)
ctrl.click()
return new_context
class Mainmenu(Context):
@classmethod
def click_play(cls, ctrl):
return cls.click(x=270, y=210, new_context=LevelMenu, ctrl=ctrl)
class Levelmenu(Context):
@classmethod
def click_play(cls, ctrl):
return cls.click(x=750, y=500, new_context=GamePlay, ctrl=ctrl)
@classmethod
def click_mode(cls, ctrl):
return cls.click(x=750, y=540, new_context=ModeMenu, ctrl=ctrl)
class Modemenu(Context):
@classmethod
def click_normal(cls, ctrl):
return cls.click(x=400, y=180, new_context=cls, ctrl=ctrl)
@classmethod
def click_extreme(cls, ctrl):
return cls.click(x=400, y=220, new_context=cls, ctrl=ctrl)
@classmethod
def click_endless(cls, ctrl):
return cls.click(x=400, y=260, new_context=cls, ctrl=ctrl)
@classmethod
def click_creative(cls, ctrl):
return cls.click(x=400, y=300, new_context=cls, ctrl=ctrl)
@classmethod
def click_return(cls, ctrl):
return cls.click(x=30, y=20, new_context=LevelMenu, ctrl=ctrl)
class Gameplay(Context):
pass |
class Atoi():
def myatoi(self, s: str) -> int:
start = True
ret = ""
for i in list(s):
if i == " ":
if not start:
break
elif i == "+" or i == "-":
if start:
start = False
ret = ret + i
else:
break
elif i.isdigit():
start = False
ret = ret + i
else:
break
try:
ret = int(ret)
except:
ret = "0"
if -2**31 >= int(ret):
ret = -2147483648
elif int(ret) > 2**31 - 1:
ret = 2**31 - 1
return int(ret)
s = "42"
s = " -42-"
# s = "4193 with words"
# s = "words and 987"
# s = "-91283472332"
# s = "3.14159"
# s = " "
# s = "+-2"
a = Atoi()
print(a.myatoi(s))
| class Atoi:
def myatoi(self, s: str) -> int:
start = True
ret = ''
for i in list(s):
if i == ' ':
if not start:
break
elif i == '+' or i == '-':
if start:
start = False
ret = ret + i
else:
break
elif i.isdigit():
start = False
ret = ret + i
else:
break
try:
ret = int(ret)
except:
ret = '0'
if -2 ** 31 >= int(ret):
ret = -2147483648
elif int(ret) > 2 ** 31 - 1:
ret = 2 ** 31 - 1
return int(ret)
s = '42'
s = ' -42-'
a = atoi()
print(a.myatoi(s)) |
def get_patient_names(self):
"""
get the list of patient names, if self.data_names id not None, then load patient
names from that file, otherwise search all the names automatically in data_root
"""
# use pre-defined patient names
if (self.data_names is not None):
assert (os.path.isfile(self.data_names))
with open(self.data_names) as f:
content = f.readlines()
patient_names = [x.strip() for x in content]
# use all the patient names in data_root
else:
patient_names = os.listdir(self.data_root[0])
patient_names = [name for name in patient_names if 'brats' in name.lower()]
return patient_names
def load_one_volume(self, patient_name, mod):
patient_dir = os.path.join(self.data_root[0], patient_name)
# for bats17
if ('nii' in self.file_postfix):
image_names = os.listdir(patient_dir)
volume_name = None
for image_name in image_names:
if (mod + '.' in image_name):
volume_name = image_name
break
# for brats15
else:
img_file_dirs = os.listdir(patient_dir)
volume_name = None
for img_file_dir in img_file_dirs:
if (mod + '.' in img_file_dir):
volume_name = img_file_dir + '/' + img_file_dir + '.' + self.file_postfix
break
assert (volume_name is not None)
# print('patient_dir: ', patient_dir)
# print('volume_name: ', volume_name)
volume_name = os.path.join(patient_dir, volume_name)
volume = load_3d_volume_as_array(volume_name)
return volume, volume_name
def load_3d_volume_as_array(filename):
if('.nii' in filename):
return load_nifty_volume_as_array(filename)
elif('.mha' in filename):
return load_mha_volume_as_array(filename)
raise ValueError('{0:} unspported file format'.format(filename))
def load_mha_volume_as_array(filename):
img = sitk.ReadImage(filename)
nda = sitk.GetArrayFromImage(img)
return nda
def load_nifty_volume_as_array(filename, with_header = False):
"""
load nifty image into numpy array, and transpose it based on the [z,y,x] axis order
The output array shape is like [Depth, Height, Width]
inputs:
filename: the input file name, should be *.nii or *.nii.gz
with_header: return affine and hearder infomation
outputs:
data: a numpy data array
"""
img = nibabel.load(filename)
data = img.get_data()
data = np.transpose(data, [2,1,0])
if(with_header):
return data, img.affine, img.header
else:
return data
| def get_patient_names(self):
"""
get the list of patient names, if self.data_names id not None, then load patient
names from that file, otherwise search all the names automatically in data_root
"""
if self.data_names is not None:
assert os.path.isfile(self.data_names)
with open(self.data_names) as f:
content = f.readlines()
patient_names = [x.strip() for x in content]
else:
patient_names = os.listdir(self.data_root[0])
patient_names = [name for name in patient_names if 'brats' in name.lower()]
return patient_names
def load_one_volume(self, patient_name, mod):
patient_dir = os.path.join(self.data_root[0], patient_name)
if 'nii' in self.file_postfix:
image_names = os.listdir(patient_dir)
volume_name = None
for image_name in image_names:
if mod + '.' in image_name:
volume_name = image_name
break
else:
img_file_dirs = os.listdir(patient_dir)
volume_name = None
for img_file_dir in img_file_dirs:
if mod + '.' in img_file_dir:
volume_name = img_file_dir + '/' + img_file_dir + '.' + self.file_postfix
break
assert volume_name is not None
volume_name = os.path.join(patient_dir, volume_name)
volume = load_3d_volume_as_array(volume_name)
return (volume, volume_name)
def load_3d_volume_as_array(filename):
if '.nii' in filename:
return load_nifty_volume_as_array(filename)
elif '.mha' in filename:
return load_mha_volume_as_array(filename)
raise value_error('{0:} unspported file format'.format(filename))
def load_mha_volume_as_array(filename):
img = sitk.ReadImage(filename)
nda = sitk.GetArrayFromImage(img)
return nda
def load_nifty_volume_as_array(filename, with_header=False):
"""
load nifty image into numpy array, and transpose it based on the [z,y,x] axis order
The output array shape is like [Depth, Height, Width]
inputs:
filename: the input file name, should be *.nii or *.nii.gz
with_header: return affine and hearder infomation
outputs:
data: a numpy data array
"""
img = nibabel.load(filename)
data = img.get_data()
data = np.transpose(data, [2, 1, 0])
if with_header:
return (data, img.affine, img.header)
else:
return data |
LIST_OF_STATES = ["AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DC", "DE", "FL", "GA",
"HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD",
"MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ",
"NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC",
"SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY"]
FAKE_DB = {}
# (emr)###################################################
db.define_table(
"account_created",
YES_NO_FIELD,
)
FAKE_DB.update({"emr_credentials": [
Field("username", requires=IS_NOT_EMPTY()),
Field("password", requires=IS_NOT_EMPTY(), widget=SQLFORM.widgets.password.widget),
Field("verify_password", requires=[IS_EQUAL_TO(request.vars.password), IS_NOT_EMPTY()],
widget=SQLFORM.widgets.password.widget),
Field("website"),
NOTE_FIELD,
auth.signature
]})
db.define_table("emr_credentials",
Field("gpg_encrypted", "text"),
auth.signature
)
# (credit_card)###################################################
db.define_table(
"payment_type",
Field("please_choose",
requires=IS_IN_SET(["Credit Card", "Check"], zero=None)),
)
FAKE_DB.update({"credit_card": [
Field("account_holder", requires=IS_NOT_EMPTY(), comment="Must match exact name on card."),
Field("expiration_month", requires=IS_IN_SET(range(1, 13), zero=None)),
Field("expiration_year", requires=IS_INT_IN_RANGE(2000, 2100, error_message='Non-expired 4-digit year required!')),
Field("card_number", requires=IS_NOT_EMPTY(), widget=SQLFORM.widgets.password.widget),
Field("verify_card_number", requires=[IS_EQUAL_TO(request.vars.card_number), IS_NOT_EMPTY()],
widget=SQLFORM.widgets.password.widget),
Field("cvv_code", requires=IS_NOT_EMPTY(), widget=SQLFORM.widgets.password.widget),
auth.signature
]})
db.define_table(
"credit_card",
Field("gpg_encrypted", "text"),
auth.signature
)
db.define_table(
'baa',
Field('choose_file', 'upload', uploadfield='file_data'),
Field('file_data', 'blob'),
Field('file_description', requires=IS_NOT_EMPTY()),
)
db.define_table(
'tpa',
Field('choose_file', 'upload', uploadfield='file_data'),
Field('file_data', 'blob'),
Field('file_description', requires=IS_NOT_EMPTY()),
)
| list_of_states = ['AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DC', 'DE', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY']
fake_db = {}
db.define_table('account_created', YES_NO_FIELD)
FAKE_DB.update({'emr_credentials': [field('username', requires=is_not_empty()), field('password', requires=is_not_empty(), widget=SQLFORM.widgets.password.widget), field('verify_password', requires=[is_equal_to(request.vars.password), is_not_empty()], widget=SQLFORM.widgets.password.widget), field('website'), NOTE_FIELD, auth.signature]})
db.define_table('emr_credentials', field('gpg_encrypted', 'text'), auth.signature)
db.define_table('payment_type', field('please_choose', requires=is_in_set(['Credit Card', 'Check'], zero=None)))
FAKE_DB.update({'credit_card': [field('account_holder', requires=is_not_empty(), comment='Must match exact name on card.'), field('expiration_month', requires=is_in_set(range(1, 13), zero=None)), field('expiration_year', requires=is_int_in_range(2000, 2100, error_message='Non-expired 4-digit year required!')), field('card_number', requires=is_not_empty(), widget=SQLFORM.widgets.password.widget), field('verify_card_number', requires=[is_equal_to(request.vars.card_number), is_not_empty()], widget=SQLFORM.widgets.password.widget), field('cvv_code', requires=is_not_empty(), widget=SQLFORM.widgets.password.widget), auth.signature]})
db.define_table('credit_card', field('gpg_encrypted', 'text'), auth.signature)
db.define_table('baa', field('choose_file', 'upload', uploadfield='file_data'), field('file_data', 'blob'), field('file_description', requires=is_not_empty()))
db.define_table('tpa', field('choose_file', 'upload', uploadfield='file_data'), field('file_data', 'blob'), field('file_description', requires=is_not_empty())) |
# Given the head of a linked list and an integer val, remove all the nodes of the linked list that has Node.val == val, and return the new head.
# def removeElements(head,val):
# while head and head.val == val:
# head = head.next
# q = head
# p = q.next
# while p:
# if p.val == val:
# q.next = p.next
# else:
# q = q.next
# p = p.next
# return head
class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
def removeElements(head, val):
starter = ListNode()
starter.next = head
prev = starter
curr = head
while curr:
if curr.val == val:
prev.next = curr.next
else:
prev = prev.next
curr = curr.next
return starter.next
# start = ListNode(None)
# start.next = head
#
# prev = start
# cur = head
#
# while cur:
# if cur.val == val:
# prev.next = cur.next
# else:
# prev = prev.next
# cur = cur.next
#
# return start.next
| class Listnode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
def remove_elements(head, val):
starter = list_node()
starter.next = head
prev = starter
curr = head
while curr:
if curr.val == val:
prev.next = curr.next
else:
prev = prev.next
curr = curr.next
return starter.next |
def main() -> None:
print("Yes" if sorted(input()) < sorted(input(), reverse=1) else "No")
if __name__ == "__main__":
main()
| def main() -> None:
print('Yes' if sorted(input()) < sorted(input(), reverse=1) else 'No')
if __name__ == '__main__':
main() |
# What are Functions?
#
# Functions are a convenient way to divide your code into useful blocks.
# That way we can reuse the code.
# Python uses indentation to define code blocks, instead of brackets
# def myFunction():
# print("Hello From My Function!")
# print("Hi")
#
# myFunction()
# def myFunctionWithArgs(username, greeting):
# print("Hello, {} , From My Function!, I wish you {}".format(username, greeting))
#
# myFunctionWithArgs("Dalon", "Good morning")
# Functions may return a value to the caller, using the keyword- 'return'
def sumTwoNumbers(a, b):
return a + b
# The 'is' operator
#
# Unlike the double equals operator "==", the "is" operator
# does not match the values of the variables, but the instances themselves.
# x = [1, 2, 3]
# y = [1, 2, 3]
# print(x == y) # Prints out True
# print(x is y) # Prints out False
# The "not" operator
#
# Using "not" before a boolean expression inverts it:
# print(not False) # Prints out True
# print((not False) == (False)) # Prints out False
if __name__ == "__main__":
result = sumTwoNumbers(5, 3)
print(result)
print(not False) # Prints out True
print((not False) == (False)) # Prints out False | def sum_two_numbers(a, b):
return a + b
if __name__ == '__main__':
result = sum_two_numbers(5, 3)
print(result)
print(not False)
print((not False) == False) |
# A collection of functions to create displays of different ABI RGB
# products and band subtractions.
# abitrucol is derived from McIDAS-X's ABITRUCOL function
# which creates an ABI RGB by deriving a green band
# McIDAS-X's ABITRUCOL is based on the CIMSS Natural True Color method
# http://cimss.ssec.wisc.edu/goes/OCLOFactSheetPDFs/ABIQuickGuide_CIMSSRGB_v2.pdf
def ABITruColRGB(red, grn, blu):
# red = band 2
# grn = band 3
# blu = band 1
# multiply bands by coefficient and add together
# to make corrected RGB
redCoef = red * 0.45
grnCoef = grn * 0.1
bluCoef = blu * 0.45
combGrn = redCoef + grnCoef + bluCoef
# mask values greater than those passed through the first
# rescale below. If this isn't done, then anything outside
# of the range set by the first rescale will be set to the
# max value of the rescaling (10)
redMasked = mask(red, '<', 33, 0) * red
combGrnMasked = mask(combGrn, '<', 40, 0) * combGrn
bluMasked = mask(blu, '<', 50, 0) * blu
# first rescale for the lower end values
redScaled1 = rescale(redMasked, 0, 33, 0, 10)
grnScaled1 = rescale(combGrnMasked, 0, 40, 0, 10)
bluScaled1 = rescale(bluMasked, 0, 50, 0, 10)
# second rescale for higher end values
redScaled2 = rescale(red, 33, 255, 10, 255)
grnScaled2 = rescale(combGrn, 40, 255, 10, 255)
bluScaled2 = rescale(blu, 50, 255, 10, 255)
# sum the two rescaled objects together
final_red = redScaled1 + redScaled2
final_grn = grnScaled1 + grnScaled2
final_blu = bluScaled1 + bluScaled2
# create rgb object
rgb = combineRGB(final_red, final_grn, final_blu)
return rgb
# The functions below were created using the Quick Guides
# linked from CIRA's VISIT Quick Guides page:
# http://rammb.cira.colostate.edu/training/visit/quick_guides/
# Information about each RGB/band subtraction below can be
# found on the above webpage. Note that these RGBs and band
# subtractions were submitted by a variety of sources, all of
# which are referenced on each individual product's page.
# ABI Airmass RGB
def ABIAirmassRGB(b8T, b10T, b12T, b13T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_GOESR_AirMassRGB_final.pdf
# red = band8 - band10; -26.2C to 0.6C rescalled to 0 to 255
# grn = band12 - band13; -43.2C to 6.7C rescalled to 0 to 255
# blu = band8; 243.9K to 208.5K rescalled to 0 to 255
red = rescale(b8T-b10T, -26.2, 0.6, 0, 255)
grn = rescale(b12T-b13T, -43.2, 6.7, 0, 255)
blu = rescale(b8T, 243.9, 208.5, 0, 255)
return combineRGB(red, grn, blu)
# ABI SO2 RGB
def ABISo2RGB(b9T, b10T, b11T, b13T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/Quick_Guide_SO2_RGB.pdf
# red = band9 - band10; -4C to 2C rescaled to 0 to 255
# grn = band13 - band11; -4C to 5C rescaled to 0 to 255
# blu = band13; 243.05K to 302.95K rescaled to 0 to 255
red = rescale(b9T-b10T, -4, 2, 0, 255)
grn = rescale(b13T-b11T, -4, 5, 0, 255)
blu = rescale(b13T, 243.05, 302.95, 0, 255)
return combineRGB(red, grn, blu)
# ABI Day Cloud Phase Distinction RGB
def ABIDayCloudPhaseRGB(b2A, b5A, b13T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/Day_Cloud_Phase_Distinction.pdf
# red = band 13; 280.65K to 219.56K rescaled to 0 to 255
# grn = band 2; 0% to 78% rescaled to 0 to 255
# blu = band 5; 1% to 59% rescaled to 0 to 255
red = rescale(b13T, 280.65, 219.65, 0, 255)
grn = rescale(b2A, 0, 78, 0, 255)
blu = rescale(b5A, 1, 59, 0, 255)
return combineRGB(red, grn, blu)
# ABI Ash RGB
def ABIAshRGB(b11T, b13T, b14T, b15T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/GOES_Ash_RGB.pdf
# red = band15 - band13; -6.7C to 2.6C rescaled to 0 to 255
# grn = band14 - band11; -6.0C to 6.3C rescaled to 0 to 255
# blu = band13; 246.3K to 302.4K rescaled to 0 to 255
red = rescale(b15T-b13T, -6.7, 2.6, 0, 255)
grn = rescale(b14T-b11T, -6.0, 6.3, 0, 255)
blu = rescale(b13T, 246.3, 302.4, 0, 255)
return combineRGB(red, grn, blu)
# ABI Day Land Cloud RGB
def ABIDayLandCloudRGB(b2A, b3A, b5A):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_GOESR_daylandcloudRGB_final.pdf
# red = band5; 0% to 97.5% rescaled to 0 to 255
# grn = band3; 0% to 108.6% rescaled to 0 to 255
# blu = band2; 0% to 100% rescaled to 0 to 255
red = rescale(b5A, 0, 97.5, 0, 255)
grn = rescale(b3A, 0, 108.6, 0, 255)
blu = rescale(b2A, 0, 100, 0, 255)
return combineRGB(red, grn, blu)
# ABI Day Land Cloud Fire RGB
def ABIDayLandCloudFireRGB(b2A, b3A, b6A):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_GOESR_DayLandCloudFireRGB_final.pdf
# red = band6; 0% to 100% rescaled to 0 to 255
# grn = band3; 0% to 100% rescaled to 0 to 255
# blu = band2; 0% to 100% rescaled to 0 to 255
red = rescale(b6A, 0, 100, 0, 255)
grn = rescale(b3A, 0, 100, 0, 255)
blu = rescale(b2A, 0, 100, 0, 255)
return combineRGB(red, grn, blu)
# ABI Night-time Microphysics RGB
def ABINightMicrophysicsRGB(b7T, b13T, b15T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_GOESR_NtMicroRGB_final.pdf
# red = band15 - band13; -6.7C to 2.6C rescalled to 0 to 255
# grn = band13 - band7; -3.1C to 5.2C rescalled to 0 to 255
# blu = band13; 243.55K to 292.65K rescalled to 0 to 255
red = rescale(b15T-b13T, -6.7, 2.6, 0, 255)
grn = rescale(b13T-b7T, -3.1, 5.2, 0, 255)
blu = rescale(b13T, 243.55, 292.65, 0, 255)
return combineRGB(red, grn, blu)
# ABI Simple Water Vapor RGB
def ABISimpleWaterVaporRGB(b8T, b10T, b13T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/Simple_Water_Vapor_RGB.pdf
# red = band13; 278.96K to 202.29K rescalled to 0 to 255
# grn = band8; 242.67K to 214.66K rescalled to 0 to 255
# blu = band10; 261.03K to 245.12K rescalled to 0 to 255
red = rescale(b13T, 278.96, 202.29, 0, 255)
grn = rescale(b8T, 242.67, 214.66, 0, 255)
blu = rescale(b10T, 261.03, 245.12, 0, 255)
return combineRGB(red, grn, blu)
# ABI Day Snow Fog RGB
def ABIDaySnowFogRGB(b3A, b5A, b7T, b13T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_DaySnowFog.pdf
# red = band3; 0% to 100% rescalled to 0 to 255; gamma 1.7
# grn = band5; 0% to 70% rescalled to 0 to 255; gamma 1.7
# blu = band7 - band13; 0C to 30C rescalled to 0 to 255; gamma 1.7
red = 255*(rescale(b3A, 0, 100, 0, 1)**0.5882)
grn = 255*(rescale(b5A, 0, 70, 0, 1)**0.5882)
blu = 255*(rescale(b7T-b13T, 0, 30, 0, 1)**0.5882)
return combineRGB(red, grn, blu)
# ABI Day Cloud Convection RGB
def ABIDayCloudConvectionRGB(b2A, b13T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_DayCloudConvectionRGB_final.pdf
# red = band2; 0% to 100% rescalled to 0 to 255; gamma 1.7
# grn = band2; 0% to 100% rescalled to 0 to 255; gamma 1.7
# blu = band13; 323K to 203K rescalled to 0 to 255; gamma 1.0
red = 255*(rescale(b2A, 0, 100, 0, 1)**0.5882)
grn = 255*(rescale(b2A, 0, 100, 0, 1)**0.5882)
blu = rescale(b13T, 323, 203, 0, 255)
return combineRGB(red, grn, blu)
# ABI Fire Temperature RGB
def ABIFireTemperatureRGB(b5A, b6A, b7T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/Fire_Temperature_RGB.pdf
# red = band7; 0C to 60C rescalled to 0 to 255; gamma 0.4
# grn = band6; 0% to 100% rescalled to 0 to 255; gamma 1.0
# blu = band5; 0% to 75% rescalled to 0 to 255; gamma 1.0
red = 255*(rescale(b7T, 273.15, 333.15, 0, 1)**2.5)
grn = rescale(b6A, 0, 100, 0, 255)
blu = rescale(b5A, 0, 75, 0, 255)
return combineRGB(red, grn, blu)
# ABI Dust RGB
def ABIDustRGB(b11T, b13T, b14T, b15T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/Dust_RGB_Quick_Guide.pdf
# red = band15 - band13; -6.7C to 2.6C rescalled to 0 to 255; gamma 1.0
# grn = band14 - band11; -0.5C to 20.0C rescalled to 0 to 255; gamma 2.5
# blu = band13; -11.95C to 15.55C rescalled to 0 to 255; gamma 1.0
red = rescale(b15T-b13T, -6.7, 2.5, 0, 255)
grn = 255*(rescale(b14T-b11T, -0.5, 20, 0, 1)**0.4)
blu = rescale(b13T, 261.2, 288.7, 0, 255)
return combineRGB(red, grn, blu)
# ABI Differential Water Vapor RGB
def ABIDifferentialWaterVaporRGB(b8T, b10T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_GOESR_DifferentialWaterVaporRGB_final.pdf
# red = band10 - band8; 30C to -3C rescalled to 0 to 255; gamma 0.2587
# grn = band10; 5C to -60C rescalled to 0 to 255; gamma 0.4
# blu = band8; -29.25C to -64.65C rescalled to 0 to 255; gamma 0.4
red = 255*(rescale(b10T-b8T, 30, -3, 0, 1)**3.8655)
grn = 255*(rescale(b10T, 278.15, 213.15, 0, 1)**2.5)
blu = 255*(rescale(b8T, 243.9, 208.5, 0, 1)**2.5)
return combineRGB(red, grn, blu)
# ABI Day Convection RGB
def ABIDayConvectionRGB(b2A, b5A, b7T, b8T, b10T, b13T):
# http://rammb.cira.colostate.edu/training/visit/quick_guides/QuickGuide_GOESR_DayConvectionRGB_final.pdf
# red = band8 - band10; -35C to 5C rescalled to 0 to 255; gamma 1.0
# grn = band7 - band13; -5C to 60C rescalled to 0 to 255; gamma 1.0
# blu = band5 - band2; -0.75% to 0.25% rescalled to 0 to 255; gamma 1.0
red = rescale(b8T-b10T, -35, 5, 0, 255)
grn = rescale(b7T-b13T, -5, 60, 0, 255)
blu = rescale(b5A-b2A, -0.75, 0.25, 0, 255)
return combineRGB(red, grn, blu)
# Split Ozone Channel Difference
def ABIOzoneDifference(b12T, b13T):
# http://cimss.ssec.wisc.edu/goes/OCLOFactSheetPDFs/ABIQuickGuide_SplitOzoneDiff.pdf
# band12 temperature - band13 temperature
return sub(b12T, b13T)
# Split Water Vapor Channel Difference
def ABISplitWaterVaporDifference(b8T, b10T):
# http://cimss.ssec.wisc.edu/goes/OCLOFactSheetPDFs/ABIQuickGuide_SplitWV_BTDiffv2.pdf
# band8 temperature - band10 temperature
return sub(b8T, b10T)
# Split Snow Channel Difference
def ABISplitSnowDifference(b5B, b2B):
# http://cimss.ssec.wisc.edu/goes/OCLOFactSheetPDFs/ABIQuickGuide_SplitSnowv2.pdf
# band5 brit - band2 brit
return sub(b5B, b2B)
# Split Cloud Phase Channel Difference
def ABISplitCloudPhaseDifference(b14T, b11T):
# http://cimss.ssec.wisc.edu/goes/OCLOFactSheetPDFs/ABIQuickGuide_G16_CloudPhaseBTD.pdf
# band14 temperature - band11 temperature
return sub(b14T, b11T)
# Split Window Channel Difference
def ABISplitWindowDifference(b15T, b13T):
# http://cimss.ssec.wisc.edu/goes/OCLOFactSheetPDFs/ABIQuickGuide_SplitWV_BTDiffv2.pdf
# band15 temperature - band13 temperature
return sub(b15T, b13T)
# Night Fog Difference
def ABINightFogDifference(b13T, b7T):
# http://cimss.ssec.wisc.edu/goes/OCLOFactSheetPDFs/ABIQuickGuide_NightFogBTD.pdf
# band13 temperature - band7 temperature
return sub(b13T, b7T) | def abi_tru_col_rgb(red, grn, blu):
red_coef = red * 0.45
grn_coef = grn * 0.1
blu_coef = blu * 0.45
comb_grn = redCoef + grnCoef + bluCoef
red_masked = mask(red, '<', 33, 0) * red
comb_grn_masked = mask(combGrn, '<', 40, 0) * combGrn
blu_masked = mask(blu, '<', 50, 0) * blu
red_scaled1 = rescale(redMasked, 0, 33, 0, 10)
grn_scaled1 = rescale(combGrnMasked, 0, 40, 0, 10)
blu_scaled1 = rescale(bluMasked, 0, 50, 0, 10)
red_scaled2 = rescale(red, 33, 255, 10, 255)
grn_scaled2 = rescale(combGrn, 40, 255, 10, 255)
blu_scaled2 = rescale(blu, 50, 255, 10, 255)
final_red = redScaled1 + redScaled2
final_grn = grnScaled1 + grnScaled2
final_blu = bluScaled1 + bluScaled2
rgb = combine_rgb(final_red, final_grn, final_blu)
return rgb
def abi_airmass_rgb(b8T, b10T, b12T, b13T):
red = rescale(b8T - b10T, -26.2, 0.6, 0, 255)
grn = rescale(b12T - b13T, -43.2, 6.7, 0, 255)
blu = rescale(b8T, 243.9, 208.5, 0, 255)
return combine_rgb(red, grn, blu)
def abi_so2_rgb(b9T, b10T, b11T, b13T):
red = rescale(b9T - b10T, -4, 2, 0, 255)
grn = rescale(b13T - b11T, -4, 5, 0, 255)
blu = rescale(b13T, 243.05, 302.95, 0, 255)
return combine_rgb(red, grn, blu)
def abi_day_cloud_phase_rgb(b2A, b5A, b13T):
red = rescale(b13T, 280.65, 219.65, 0, 255)
grn = rescale(b2A, 0, 78, 0, 255)
blu = rescale(b5A, 1, 59, 0, 255)
return combine_rgb(red, grn, blu)
def abi_ash_rgb(b11T, b13T, b14T, b15T):
red = rescale(b15T - b13T, -6.7, 2.6, 0, 255)
grn = rescale(b14T - b11T, -6.0, 6.3, 0, 255)
blu = rescale(b13T, 246.3, 302.4, 0, 255)
return combine_rgb(red, grn, blu)
def abi_day_land_cloud_rgb(b2A, b3A, b5A):
red = rescale(b5A, 0, 97.5, 0, 255)
grn = rescale(b3A, 0, 108.6, 0, 255)
blu = rescale(b2A, 0, 100, 0, 255)
return combine_rgb(red, grn, blu)
def abi_day_land_cloud_fire_rgb(b2A, b3A, b6A):
red = rescale(b6A, 0, 100, 0, 255)
grn = rescale(b3A, 0, 100, 0, 255)
blu = rescale(b2A, 0, 100, 0, 255)
return combine_rgb(red, grn, blu)
def abi_night_microphysics_rgb(b7T, b13T, b15T):
red = rescale(b15T - b13T, -6.7, 2.6, 0, 255)
grn = rescale(b13T - b7T, -3.1, 5.2, 0, 255)
blu = rescale(b13T, 243.55, 292.65, 0, 255)
return combine_rgb(red, grn, blu)
def abi_simple_water_vapor_rgb(b8T, b10T, b13T):
red = rescale(b13T, 278.96, 202.29, 0, 255)
grn = rescale(b8T, 242.67, 214.66, 0, 255)
blu = rescale(b10T, 261.03, 245.12, 0, 255)
return combine_rgb(red, grn, blu)
def abi_day_snow_fog_rgb(b3A, b5A, b7T, b13T):
red = 255 * rescale(b3A, 0, 100, 0, 1) ** 0.5882
grn = 255 * rescale(b5A, 0, 70, 0, 1) ** 0.5882
blu = 255 * rescale(b7T - b13T, 0, 30, 0, 1) ** 0.5882
return combine_rgb(red, grn, blu)
def abi_day_cloud_convection_rgb(b2A, b13T):
red = 255 * rescale(b2A, 0, 100, 0, 1) ** 0.5882
grn = 255 * rescale(b2A, 0, 100, 0, 1) ** 0.5882
blu = rescale(b13T, 323, 203, 0, 255)
return combine_rgb(red, grn, blu)
def abi_fire_temperature_rgb(b5A, b6A, b7T):
red = 255 * rescale(b7T, 273.15, 333.15, 0, 1) ** 2.5
grn = rescale(b6A, 0, 100, 0, 255)
blu = rescale(b5A, 0, 75, 0, 255)
return combine_rgb(red, grn, blu)
def abi_dust_rgb(b11T, b13T, b14T, b15T):
red = rescale(b15T - b13T, -6.7, 2.5, 0, 255)
grn = 255 * rescale(b14T - b11T, -0.5, 20, 0, 1) ** 0.4
blu = rescale(b13T, 261.2, 288.7, 0, 255)
return combine_rgb(red, grn, blu)
def abi_differential_water_vapor_rgb(b8T, b10T):
red = 255 * rescale(b10T - b8T, 30, -3, 0, 1) ** 3.8655
grn = 255 * rescale(b10T, 278.15, 213.15, 0, 1) ** 2.5
blu = 255 * rescale(b8T, 243.9, 208.5, 0, 1) ** 2.5
return combine_rgb(red, grn, blu)
def abi_day_convection_rgb(b2A, b5A, b7T, b8T, b10T, b13T):
red = rescale(b8T - b10T, -35, 5, 0, 255)
grn = rescale(b7T - b13T, -5, 60, 0, 255)
blu = rescale(b5A - b2A, -0.75, 0.25, 0, 255)
return combine_rgb(red, grn, blu)
def abi_ozone_difference(b12T, b13T):
return sub(b12T, b13T)
def abi_split_water_vapor_difference(b8T, b10T):
return sub(b8T, b10T)
def abi_split_snow_difference(b5B, b2B):
return sub(b5B, b2B)
def abi_split_cloud_phase_difference(b14T, b11T):
return sub(b14T, b11T)
def abi_split_window_difference(b15T, b13T):
return sub(b15T, b13T)
def abi_night_fog_difference(b13T, b7T):
return sub(b13T, b7T) |
class SolutionHashTableNaive:
def findLength(self, nums1: List[int], nums2: List[int]) -> int:
num_index1 = defaultdict(list)
for index1, num in enumerate(nums1):
num_index1[num].append(index1)
max_len = 0
for index2, num in enumerate(nums2):
for index1 in num_index1[num]:
new_len = 0
p1, p2 = index1, index2
while p1 < len(nums1) and p2 < len(nums2) and nums1[p1] == nums2[p2]:
new_len += 1
p1 += 1
p2 += 1
max_len = max(max_len, new_len)
# early break, but still TLE
if max_len in [len(nums1), len(nums2)]:
break
return max_len
class Solution:
def findLength(self, nums1: List[int], nums2: List[int]) -> int:
""""
DP to find the maximum length of common prefixes
"""
num1_len, num2_len = len(nums1), len(nums2)
# max length of common prefixes
# e.g. dp[i][j] = max length of prefixes between num1[i:] and nums2[j:]
dp = [[0] * (num2_len + 1) for _ in range(num1_len+1)]
# iterate through the strings in reversed order
for index1 in range(num1_len - 1, -1, -1):
for index2 in range(num2_len - 1, -1, -1):
if nums1[index1] == nums2[index2]:
dp[index1][index2] = dp[index1+1][index2+1] + 1
# the maximum of all common prefixes
return max([max(row) for row in dp])
class SolutionDPwithTable:
def findLength(self, nums1: List[int], nums2: List[int]) -> int:
"""
Simpler than the DP version with array,
but much slower due to the expensive operations in hashtable
"""
nums1_len, nums2_len = len(nums1), len(nums2)
dp = defaultdict(int)
max_prefix = 0
for index_1 in range(nums1_len-1, -1, -1):
for index_2 in range(nums2_len-1, -1, -1):
if nums1[index_1] == nums2[index_2]:
dp[(index_1, index_2)] = dp[(index_1+1, index_2+1)] + 1
max_prefix = max(max_prefix, dp[(index_1, index_2)])
return max_prefix | class Solutionhashtablenaive:
def find_length(self, nums1: List[int], nums2: List[int]) -> int:
num_index1 = defaultdict(list)
for (index1, num) in enumerate(nums1):
num_index1[num].append(index1)
max_len = 0
for (index2, num) in enumerate(nums2):
for index1 in num_index1[num]:
new_len = 0
(p1, p2) = (index1, index2)
while p1 < len(nums1) and p2 < len(nums2) and (nums1[p1] == nums2[p2]):
new_len += 1
p1 += 1
p2 += 1
max_len = max(max_len, new_len)
if max_len in [len(nums1), len(nums2)]:
break
return max_len
class Solution:
def find_length(self, nums1: List[int], nums2: List[int]) -> int:
""""
DP to find the maximum length of common prefixes
"""
(num1_len, num2_len) = (len(nums1), len(nums2))
dp = [[0] * (num2_len + 1) for _ in range(num1_len + 1)]
for index1 in range(num1_len - 1, -1, -1):
for index2 in range(num2_len - 1, -1, -1):
if nums1[index1] == nums2[index2]:
dp[index1][index2] = dp[index1 + 1][index2 + 1] + 1
return max([max(row) for row in dp])
class Solutiondpwithtable:
def find_length(self, nums1: List[int], nums2: List[int]) -> int:
"""
Simpler than the DP version with array,
but much slower due to the expensive operations in hashtable
"""
(nums1_len, nums2_len) = (len(nums1), len(nums2))
dp = defaultdict(int)
max_prefix = 0
for index_1 in range(nums1_len - 1, -1, -1):
for index_2 in range(nums2_len - 1, -1, -1):
if nums1[index_1] == nums2[index_2]:
dp[index_1, index_2] = dp[index_1 + 1, index_2 + 1] + 1
max_prefix = max(max_prefix, dp[index_1, index_2])
return max_prefix |
"""
Validate if a given string is numeric.
Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true
Note: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one.
Update (2015-02-10):
The signature of the C++ function had been updated. If you still see your function signature accepts a const char * argument,
please click the reload button to reset your code definition.
"""
class Solution:
def isNumber(self, s):
try:
float(s)
except ValueError:
return False
return True | """
Validate if a given string is numeric.
Some examples:
"0" => true
" 0.1 " => true
"abc" => false
"1 a" => false
"2e10" => true
Note: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one.
Update (2015-02-10):
The signature of the C++ function had been updated. If you still see your function signature accepts a const char * argument,
please click the reload button to reset your code definition.
"""
class Solution:
def is_number(self, s):
try:
float(s)
except ValueError:
return False
return True |
class Category:
def __init__(self, categoryId, name):
self.categoryId = categoryId
self.name = name
| class Category:
def __init__(self, categoryId, name):
self.categoryId = categoryId
self.name = name |
#########
# Copyright (c) 2017 GigaSpaces Technologies Ltd. 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.
def attr(*args, **kwargs):
"""Decorator that adds attributes to classes or functions
for use with unit tests runner.
"""
def wrapped(element):
for name in args:
setattr(element, name, True)
for name, value in kwargs.items():
setattr(element, name, value)
return element
return wrapped
| def attr(*args, **kwargs):
"""Decorator that adds attributes to classes or functions
for use with unit tests runner.
"""
def wrapped(element):
for name in args:
setattr(element, name, True)
for (name, value) in kwargs.items():
setattr(element, name, value)
return element
return wrapped |
# demonstrate function scope
spam = "global spam"
# local scope
def do_local():
spam = "local spam"
print(spam)
do_local()
print(spam) | spam = 'global spam'
def do_local():
spam = 'local spam'
print(spam)
do_local()
print(spam) |
class RecentCounter(object):
def __init__(self):
self.p = []
def ping(self, t):
"""
:type t: int
:rtype: int
"""
self.p.append(t)
res = 0
for s in self.p[::-1]:
if t - s > 3000:
break;
res += 1
return res
# Your RecentCounter object will be instantiated and called as such:
# obj = RecentCounter()
# param_1 = obj.ping(t) | class Recentcounter(object):
def __init__(self):
self.p = []
def ping(self, t):
"""
:type t: int
:rtype: int
"""
self.p.append(t)
res = 0
for s in self.p[::-1]:
if t - s > 3000:
break
res += 1
return res |
class NCoverage(): # Model under test
def __init__(self, threshold = 0.2, exclude_layer=['pool', 'fc', 'flatten'], only_layer = ""):
self.cov_dict = {}
self.threshold = threshold
def scale(self, layer_outputs, rmax=1, rmin=0):
'''
scale the intermediate layer's output between 0 and 1
:param layer_outputs: the layer's output tensor
:param rmax: the upper bound of scale
:param rmin: the lower bound of scale
:return:
'''
divider = (layer_outputs.max() - layer_outputs.min())
if divider == 0:
return np.zeros(shape=layer_outputs.shape)
X_std = (layer_outputs - layer_outputs.min()) / divider
X_scaled = X_std * (rmax - rmin) + rmin
return X_scaled
def get_channel_coverage(self, layer_outputs):
covered_channel = []
#print("debug")
#print(layer_outputs.shape)
for layer_output in layer_outputs:
scaled = self.scale(layer_output)
for channel_idx in xrange(len(scaled)):
#print(scaled[channel_idx].mean())
if scaled[channel_idx].mean() > self.threshold:
if (channel_idx) not in covered_channel:
covered_channel.append(channel_idx)
return covered_channel
def get_channel_coverage_group(self, layer_outputs):
covered_group = []
#print("debug")
#print(layer_outputs.shape)
for layer_output in layer_outputs:
covered_channel = []
scaled = self.scale(layer_output)
for channel_idx in xrange(len(scaled)):
#print(scaled[channel_idx].mean())
if scaled[channel_idx].mean() > self.threshold:
if (channel_idx) not in covered_channel:
covered_channel.append(channel_idx)
covered_group.append(covered_channel)
return covered_group | class Ncoverage:
def __init__(self, threshold=0.2, exclude_layer=['pool', 'fc', 'flatten'], only_layer=''):
self.cov_dict = {}
self.threshold = threshold
def scale(self, layer_outputs, rmax=1, rmin=0):
"""
scale the intermediate layer's output between 0 and 1
:param layer_outputs: the layer's output tensor
:param rmax: the upper bound of scale
:param rmin: the lower bound of scale
:return:
"""
divider = layer_outputs.max() - layer_outputs.min()
if divider == 0:
return np.zeros(shape=layer_outputs.shape)
x_std = (layer_outputs - layer_outputs.min()) / divider
x_scaled = X_std * (rmax - rmin) + rmin
return X_scaled
def get_channel_coverage(self, layer_outputs):
covered_channel = []
for layer_output in layer_outputs:
scaled = self.scale(layer_output)
for channel_idx in xrange(len(scaled)):
if scaled[channel_idx].mean() > self.threshold:
if channel_idx not in covered_channel:
covered_channel.append(channel_idx)
return covered_channel
def get_channel_coverage_group(self, layer_outputs):
covered_group = []
for layer_output in layer_outputs:
covered_channel = []
scaled = self.scale(layer_output)
for channel_idx in xrange(len(scaled)):
if scaled[channel_idx].mean() > self.threshold:
if channel_idx not in covered_channel:
covered_channel.append(channel_idx)
covered_group.append(covered_channel)
return covered_group |
"""
Dla pobranej liczby, sprawdz czy liczba jest ujemna, dodatnia, czy jest zerem.
"""
if __name__ == "__main__":
print("podaj liczbe")
a = int(input())
if a < 0:
print("libczba jest ujemna")
elif a > 0:
print("liczba jest dodatnia")
else:
print("liczba jest zerem")
| """
Dla pobranej liczby, sprawdz czy liczba jest ujemna, dodatnia, czy jest zerem.
"""
if __name__ == '__main__':
print('podaj liczbe')
a = int(input())
if a < 0:
print('libczba jest ujemna')
elif a > 0:
print('liczba jest dodatnia')
else:
print('liczba jest zerem') |
class Question:
# Defines the init function that is called each time a new object is created
def __init__(self, text, correct_answer):
# The attribute text is initialized with the value of the parameter text
self.text = text
# The attribute answer is initialized with the value of the parameter correct_answer
self.answer = correct_answer
| class Question:
def __init__(self, text, correct_answer):
self.text = text
self.answer = correct_answer |
'''
This is the __init__.py file for the PyCSW common scripts.
author :kballantyne
date :20190304
version :1.1
python_version :2.7.5
#================================================================================================================
'''
__all__ = ['pycsw_func'] | """
This is the __init__.py file for the PyCSW common scripts.
author :kballantyne
date :20190304
version :1.1
python_version :2.7.5
#================================================================================================================
"""
__all__ = ['pycsw_func'] |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def sortList(self, head: Optional[ListNode]) -> Optional[ListNode]:
if not head or not head.next:
return head
arr = []
while head:
arr.append(head.val)
head = head.next
arr.sort()
new = cur = ListNode()
for ele in arr:
cur.next = ListNode(ele)
cur = cur.next
return new.next
| class Solution:
def sort_list(self, head: Optional[ListNode]) -> Optional[ListNode]:
if not head or not head.next:
return head
arr = []
while head:
arr.append(head.val)
head = head.next
arr.sort()
new = cur = list_node()
for ele in arr:
cur.next = list_node(ele)
cur = cur.next
return new.next |
i = 10
while i >= 0:
print(i)
i = i - 1
| i = 10
while i >= 0:
print(i)
i = i - 1 |
"""
Contains the EnzymeLookup class.
"""
class EnzymeLookup():
"""
This is the enzyme lookup class. It is a reverse lookup table that loads
an enzyme data from the path given to its initialize operator. In turn a
find method is supplied that looks up any matching names.
"""
#######################
# PUBLIC - Initialize #
#######################
def __init__(self, path):
"""
Initializes this new enzyme lookup table with the given path to the
enzyme data file. The enzyme data file's ID, DE, and DR lines are
loaded into this new table.
Parameters
----------
path : string
File path to the enzyme data file this new table loads into memory.
"""
self.__links = {}
with open(path,"r") as ifile:
READ_NODE = 0
READ_LINKS = 1
state = READ_LINKS
node = None
while True:
line = ifile.readline()
if not line:
break
if state == READ_NODE:
if line[:2] == "DE":
node["de"] = line[5:-1]
state = READ_LINKS
elif state == READ_LINKS:
if line[:2] == "DR":
for segment in line[5:-1].split():
if segment.endswith(";"):
l = self.__links.get(segment[:-1],[])
l.append(node)
self.__links[segment[:-1]] = l
elif line[:2] == "ID":
node = {"id": line[5:-1], "de": None}
state = READ_NODE
####################
# PUBLIC - Methods #
####################
def find(self, gene, id_, name):
"""
Getter method.
Parameters
----------
gene : string
The gene that is matched. This is only used to add to returned
tuples and not matched against.
id_ : string
The protein id that is matched. This is only used to add to
returned tuples and not matched against.
name : string
The protein name that is matched. This is the value actually
used to reverse lookup any EC numbers and descriptions that
contain this protein name.
Returns
-------
ret0 : list
Tuples that contain any matches found. Each tuple contains the
given gene, given protein id, given protein name, matched EC id,
and matched EC description.
"""
ret = []
if name in self.__links:
for node in self.__links[name]:
ret.append((gene, id_, name, node["id"], node["de"]))
return ret
| """
Contains the EnzymeLookup class.
"""
class Enzymelookup:
"""
This is the enzyme lookup class. It is a reverse lookup table that loads
an enzyme data from the path given to its initialize operator. In turn a
find method is supplied that looks up any matching names.
"""
def __init__(self, path):
"""
Initializes this new enzyme lookup table with the given path to the
enzyme data file. The enzyme data file's ID, DE, and DR lines are
loaded into this new table.
Parameters
----------
path : string
File path to the enzyme data file this new table loads into memory.
"""
self.__links = {}
with open(path, 'r') as ifile:
read_node = 0
read_links = 1
state = READ_LINKS
node = None
while True:
line = ifile.readline()
if not line:
break
if state == READ_NODE:
if line[:2] == 'DE':
node['de'] = line[5:-1]
state = READ_LINKS
elif state == READ_LINKS:
if line[:2] == 'DR':
for segment in line[5:-1].split():
if segment.endswith(';'):
l = self.__links.get(segment[:-1], [])
l.append(node)
self.__links[segment[:-1]] = l
elif line[:2] == 'ID':
node = {'id': line[5:-1], 'de': None}
state = READ_NODE
def find(self, gene, id_, name):
"""
Getter method.
Parameters
----------
gene : string
The gene that is matched. This is only used to add to returned
tuples and not matched against.
id_ : string
The protein id that is matched. This is only used to add to
returned tuples and not matched against.
name : string
The protein name that is matched. This is the value actually
used to reverse lookup any EC numbers and descriptions that
contain this protein name.
Returns
-------
ret0 : list
Tuples that contain any matches found. Each tuple contains the
given gene, given protein id, given protein name, matched EC id,
and matched EC description.
"""
ret = []
if name in self.__links:
for node in self.__links[name]:
ret.append((gene, id_, name, node['id'], node['de']))
return ret |
""" Contains Event class """
class Event:
""" Represents a LoTLan Event instance """
def __init__(self, logical_name, physical_name, event_type, comparator=None, value=None):
self.logical_name = logical_name
self.physical_name = physical_name
self.event_type = event_type
self.comparator = comparator
self.value = value
def __repr__(self):
return (("Logical_Name: {}, Physical_Name: {}, Event_Type: {}, Comparator: {}, Value: {}")
.format(self.logical_name, self.physical_name, self.event_type,
self.comparator, self.value))
| """ Contains Event class """
class Event:
""" Represents a LoTLan Event instance """
def __init__(self, logical_name, physical_name, event_type, comparator=None, value=None):
self.logical_name = logical_name
self.physical_name = physical_name
self.event_type = event_type
self.comparator = comparator
self.value = value
def __repr__(self):
return 'Logical_Name: {}, Physical_Name: {}, Event_Type: {}, Comparator: {}, Value: {}'.format(self.logical_name, self.physical_name, self.event_type, self.comparator, self.value) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.