hexsha stringlengths 40 40 | size int64 2 1.02M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 245 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 245 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 245 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.02M | avg_line_length float64 1 417k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 1
class | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f7271ea3544f50197b3f61177d0ffc065eca8731 | 9,227 | py | Python | deep_learning.py | ice-blaze/simple-captcha-deeplearning | 16960249bf316bef8fe6b9d86113c902309b36c5 | [
"MIT"
] | 2 | 2018-02-20T14:41:59.000Z | 2018-03-02T20:52:26.000Z | deep_learning.py | ice-blaze/simple-captcha-deeplearning | 16960249bf316bef8fe6b9d86113c902309b36c5 | [
"MIT"
] | null | null | null | deep_learning.py | ice-blaze/simple-captcha-deeplearning | 16960249bf316bef8fe6b9d86113c902309b36c5 | [
"MIT"
] | null | null | null | from generate_captchas import CHAR_POSSIBILITIES
from generate_captchas import generate_captcha
from generate_captchas import get_random_captcha_names_and_lines
from digital_processing_image_approach import clean_image_kernel4
import keras
from keras.models import Sequential, load_model
from keras.layers import Dense, Conv2D, MaxPooling2D, Flatten, Dropout
import os
import imageio
import random
import numpy as np
np.random.seed(123) # for reproducibility
def add_dict(a, b):
"""
:param a dict: Dictionary we will merge with b
:param b dict: Dictionary that will be merged into a
:return a dict: Merged dictionary of a and b
"""
for key in b:
a[key] = a.get(key, 0) + b[key]
return a
def similar(real, predicted):
"""
Compare if the captcha code predicted is close to the real one
:param real string: Real captcha string
:param predicted string: Predicted captcha string
:return
wrong_letter_count float: Percentage of wrong letter
wrong_letter_dict dict: Dict of all wrong letters as key and a counter
of failed as value
"""
wrong_letter_count = 0
wrong_letter_dict = {}
for real_letter, preddicted_letter in zip(real, predicted):
if real_letter != preddicted_letter:
wrong_letter_dict[real_letter] = \
wrong_letter_dict.get(real_letter, 0) + 1
wrong_letter_count += 1
wrong_letter_count /= len(real)
wrong_letter_count = 1.0 - wrong_letter_count
return wrong_letter_count, wrong_letter_dict
def create_model(input_shape, number_of_classes):
"""
:param input_shape numpy1d: Shape of the image
:param number_of_classes int: Class number the model should handle
:return model Model: Keras model
"""
model = Sequential()
model.add(Conv2D(
20,
kernel_size=(5, 5),
padding="same",
strides=(1, 1),
activation='relu',
input_shape=(input_shape)
))
model.add(Conv2D(32, (3, 3), padding="same", activation='relu'))
model.add(Conv2D(32, (3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(4, 4), strides=(4, 4)))
model.add(Dropout(0.25))
model.add(Conv2D(64, (3, 3), padding="same", activation='relu'))
model.add(Conv2D(64, (3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
model.add(Dropout(0.25))
model.add(Conv2D(128, (3, 3), padding="same", activation='relu'))
model.add(Conv2D(128, (3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
model.add(Dropout(0.25))
model.add(Flatten())
model.add(Dense(64*8*8, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(number_of_classes, activation='softmax'))
model.compile(
loss=keras.losses.categorical_crossentropy,
optimizer="Adamax",
metrics=['accuracy']
)
return model
def chunks(array, chunk_size):
"""
Convert a 1D list into a 2D list with length of the array of array equal
to chunk_size
:param array list: list of object
:param chunk_size int: length of the chunks
:return 2d list:
"""
for i in range(0, len(array), chunk_size):
yield array[i:i + chunk_size]
def one_label(char):
"""
Convert one char into a binarized label
:param char string: one character
:return zeros list int: binarized label
"""
zeros = [0.0] * len(CHAR_POSSIBILITIES)
char_index = CHAR_POSSIBILITIES.index(char)
zeros[char_index] = 1.0
return zeros
def char_to_num(captcha_name):
"""
Convert catpcha character to binarized labels
:param captcha_name string: code of the captcha
:return all_labels list int: name transform into binarized labels
"""
all_labels = []
for char in captcha_name:
all_labels += one_label(char)
return all_labels
def num_to_char(captcha_binarized_label, char_count):
"""
Convert catpcha binarized labels to char
:param captcha_binarized_label list int: captcha binarized
:param char_count int: length of the original captcha name
:return captcha_name string: captcha code
"""
captcha_name = ""
for x in range(char_count):
length = len(CHAR_POSSIBILITIES)
char_range = captcha_binarized_label[x * length:(x + 1) * length]
char_index = np.argmax(char_range)
captcha_name += CHAR_POSSIBILITIES[char_index]
return captcha_name
def load_data_no_generator(generated_captcha_path, captchas, char_count):
"""
:param generated_captcha_path strig: folder containing captchas
:param catpchas list string: All captcha names
:param char_count int: Length of the catpcha name
"""
x = np.array([
clean_image_kernel4(imageio.imread(generated_captcha_path + captcha))
for captcha in captchas
])
# Binarizide the labels (multi class)
label_in_list = [
list(captcha[:char_count])
for captcha in captchas
]
label_in_numlist = [
char_to_num(label)
for label in label_in_list
]
# label need to be list [0,1,0,0,1,...]
y = np.array(label_in_numlist)
# 5. Preprocess input data
x = x.astype(float)
x /= np.max(x) # normalize
return x, y
def load_data(captchas):
"""
:param captchas list string: Captcha names
:return list tuple numpy2d,labels: Tuple of image and labels binarized
"""
while True:
for captcha_chunk in captchas:
x = np.array([
# TODO opti possible
clean_image_kernel4(generate_captcha(
captcha.split("-")[0], captcha.split("-")[1])
)
for captcha in captcha_chunk
])
# Binarizide the labels (multi class)
label_in_list = [
list(captcha.split("-")[0])
for captcha in captcha_chunk
]
label_in_numlist = [
char_to_num(label)
for label in label_in_list
]
# label need to be list [0,1,0,0,1,...]
y = np.array(label_in_numlist)
# 5. Preprocess input data
x = x.astype(float)
x /= np.max(x) # normalize
yield x, y
def train_and_test_model(number_of_captchas=10, model_path=None):
"""
:param number_of_captchas int: Number of captcha we want to for the train
:param model_path string: Path of the model if it exist
:return None: Print test result
"""
number_of_classes = len(CHAR_POSSIBILITIES)
captchas = list(get_random_captcha_names_and_lines(number_of_captchas))
random.shuffle(captchas)
char_count = len(captchas[0].split("-")[0])
batch_size = 250
pivot = int(len(captchas) / 10)
x_five, y_five = next(load_data([captchas[:1]]))
captchas_train = list(chunks(captchas[pivot:], batch_size))
captchas_test = list(chunks(captchas[:pivot], batch_size))
if os.path.exists(model_path):
model = load_model(model_path)
else:
model = create_model(x_five[0].shape, number_of_classes * char_count)
epochs = 1
model.fit_generator(
load_data(captchas_train),
steps_per_epoch=len(captchas_train),
epochs=epochs,
verbose=1,
)
# Save model
model.save(model_path)
score = model.evaluate_generator(
load_data(captchas_test),
steps=batch_size,
)
print(score)
print('Test loss:', score[0])
print('Test accuracy:', score[1])
# Test with real captchas
path = "./real-captchas/"
real_captchas = os.listdir(path)
print_test(model, path, real_captchas, char_count, 100)
def print_test(model, path, captchas, char_count, max_size=100):
"""
:param model Model: Keras model to read captchas
:param path string: Path where are stored real captchas
:param catpchas list string: All captcha names
:param char_count int: Length of the catpcha name
:param max_size int: Number of captcha we want to test
:return None: Print captcha test results
"""
print("Real captcha test")
data = load_data_no_generator(path, captchas, char_count)
x = data[0]
y = data[1]
allx = model.predict(x)
predicted = [
num_to_char(predict, char_count) for predict in allx[:max_size]
]
real = [num_to_char(real_label, char_count) for real_label in y[:max_size]]
ziper = zip(real, predicted)
correct = 0
mean_similar = 0
error_dict = {}
for z in ziper:
sim, sim_dict = similar(z[0], z[1])
mean_similar += sim
error_dict = add_dict(error_dict, sim_dict)
if z[0] == z[1]:
correct += 1
print(str(z[0] == z[1]) + " " + str(z) + " simili: " + str(sim))
print("overall: " + str(correct/len(predicted)))
print("overall similarity: " + str(mean_similar / len(predicted)))
print(error_dict)
print(sorted(error_dict.keys()))
if __name__ == "__main__":
model_path = "model.h5"
# train_and_test_model(1600000, model_path)
train_and_test_model(800000, model_path)
| 30.452145 | 79 | 0.645605 | from generate_captchas import CHAR_POSSIBILITIES
from generate_captchas import generate_captcha
from generate_captchas import get_random_captcha_names_and_lines
from digital_processing_image_approach import clean_image_kernel4
import keras
from keras.models import Sequential, load_model
from keras.layers import Dense, Conv2D, MaxPooling2D, Flatten, Dropout
import os
import imageio
import random
import numpy as np
np.random.seed(123)
def add_dict(a, b):
for key in b:
a[key] = a.get(key, 0) + b[key]
return a
def similar(real, predicted):
wrong_letter_count = 0
wrong_letter_dict = {}
for real_letter, preddicted_letter in zip(real, predicted):
if real_letter != preddicted_letter:
wrong_letter_dict[real_letter] = \
wrong_letter_dict.get(real_letter, 0) + 1
wrong_letter_count += 1
wrong_letter_count /= len(real)
wrong_letter_count = 1.0 - wrong_letter_count
return wrong_letter_count, wrong_letter_dict
def create_model(input_shape, number_of_classes):
model = Sequential()
model.add(Conv2D(
20,
kernel_size=(5, 5),
padding="same",
strides=(1, 1),
activation='relu',
input_shape=(input_shape)
))
model.add(Conv2D(32, (3, 3), padding="same", activation='relu'))
model.add(Conv2D(32, (3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(4, 4), strides=(4, 4)))
model.add(Dropout(0.25))
model.add(Conv2D(64, (3, 3), padding="same", activation='relu'))
model.add(Conv2D(64, (3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
model.add(Dropout(0.25))
model.add(Conv2D(128, (3, 3), padding="same", activation='relu'))
model.add(Conv2D(128, (3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2), strides=(2, 2)))
model.add(Dropout(0.25))
model.add(Flatten())
model.add(Dense(64*8*8, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(number_of_classes, activation='softmax'))
model.compile(
loss=keras.losses.categorical_crossentropy,
optimizer="Adamax",
metrics=['accuracy']
)
return model
def chunks(array, chunk_size):
for i in range(0, len(array), chunk_size):
yield array[i:i + chunk_size]
def one_label(char):
zeros = [0.0] * len(CHAR_POSSIBILITIES)
char_index = CHAR_POSSIBILITIES.index(char)
zeros[char_index] = 1.0
return zeros
def char_to_num(captcha_name):
all_labels = []
for char in captcha_name:
all_labels += one_label(char)
return all_labels
def num_to_char(captcha_binarized_label, char_count):
captcha_name = ""
for x in range(char_count):
length = len(CHAR_POSSIBILITIES)
char_range = captcha_binarized_label[x * length:(x + 1) * length]
char_index = np.argmax(char_range)
captcha_name += CHAR_POSSIBILITIES[char_index]
return captcha_name
def load_data_no_generator(generated_captcha_path, captchas, char_count):
x = np.array([
clean_image_kernel4(imageio.imread(generated_captcha_path + captcha))
for captcha in captchas
])
label_in_list = [
list(captcha[:char_count])
for captcha in captchas
]
label_in_numlist = [
char_to_num(label)
for label in label_in_list
]
y = np.array(label_in_numlist)
x = x.astype(float)
x /= np.max(x)
return x, y
def load_data(captchas):
while True:
for captcha_chunk in captchas:
x = np.array([
clean_image_kernel4(generate_captcha(
captcha.split("-")[0], captcha.split("-")[1])
)
for captcha in captcha_chunk
])
label_in_list = [
list(captcha.split("-")[0])
for captcha in captcha_chunk
]
label_in_numlist = [
char_to_num(label)
for label in label_in_list
]
y = np.array(label_in_numlist)
x = x.astype(float)
x /= np.max(x)
yield x, y
def train_and_test_model(number_of_captchas=10, model_path=None):
number_of_classes = len(CHAR_POSSIBILITIES)
captchas = list(get_random_captcha_names_and_lines(number_of_captchas))
random.shuffle(captchas)
char_count = len(captchas[0].split("-")[0])
batch_size = 250
pivot = int(len(captchas) / 10)
x_five, y_five = next(load_data([captchas[:1]]))
captchas_train = list(chunks(captchas[pivot:], batch_size))
captchas_test = list(chunks(captchas[:pivot], batch_size))
if os.path.exists(model_path):
model = load_model(model_path)
else:
model = create_model(x_five[0].shape, number_of_classes * char_count)
epochs = 1
model.fit_generator(
load_data(captchas_train),
steps_per_epoch=len(captchas_train),
epochs=epochs,
verbose=1,
)
model.save(model_path)
score = model.evaluate_generator(
load_data(captchas_test),
steps=batch_size,
)
print(score)
print('Test loss:', score[0])
print('Test accuracy:', score[1])
path = "./real-captchas/"
real_captchas = os.listdir(path)
print_test(model, path, real_captchas, char_count, 100)
def print_test(model, path, captchas, char_count, max_size=100):
print("Real captcha test")
data = load_data_no_generator(path, captchas, char_count)
x = data[0]
y = data[1]
allx = model.predict(x)
predicted = [
num_to_char(predict, char_count) for predict in allx[:max_size]
]
real = [num_to_char(real_label, char_count) for real_label in y[:max_size]]
ziper = zip(real, predicted)
correct = 0
mean_similar = 0
error_dict = {}
for z in ziper:
sim, sim_dict = similar(z[0], z[1])
mean_similar += sim
error_dict = add_dict(error_dict, sim_dict)
if z[0] == z[1]:
correct += 1
print(str(z[0] == z[1]) + " " + str(z) + " simili: " + str(sim))
print("overall: " + str(correct/len(predicted)))
print("overall similarity: " + str(mean_similar / len(predicted)))
print(error_dict)
print(sorted(error_dict.keys()))
if __name__ == "__main__":
model_path = "model.h5"
train_and_test_model(800000, model_path)
| true | true |
f7271f75be46e1387690682014cc916246b65748 | 8,007 | py | Python | pepper_variant/modules/python/models/predict_distributed_cpu.py | Samteymoori/pepper | 734d226de47a855952e3b58145c1fcfbe221d3b4 | [
"MIT"
] | null | null | null | pepper_variant/modules/python/models/predict_distributed_cpu.py | Samteymoori/pepper | 734d226de47a855952e3b58145c1fcfbe221d3b4 | [
"MIT"
] | null | null | null | pepper_variant/modules/python/models/predict_distributed_cpu.py | Samteymoori/pepper | 734d226de47a855952e3b58145c1fcfbe221d3b4 | [
"MIT"
] | null | null | null | import sys
import os
import torch
import torch.onnx
import torch.distributed as dist
import torch.nn as nn
import onnxruntime
from datetime import datetime
from torch.utils.data import DataLoader
import torch.multiprocessing as mp
from pepper_variant.modules.python.models.dataloader_predict import SequenceDataset
from pepper_variant.modules.python.models.ModelHander import ModelHandler
from pepper_variant.modules.python.Options import ImageSizeOptions, TrainOptions
from pepper_variant.modules.python.DataStorePredict import DataStore
def predict(input_filepath, file_chunks, output_filepath, model_path, batch_size, num_workers, threads, thread_id):
# session options
sess_options = onnxruntime.SessionOptions()
sess_options.intra_op_num_threads = threads
sess_options.execution_mode = onnxruntime.ExecutionMode.ORT_SEQUENTIAL
sess_options.graph_optimization_level = onnxruntime.GraphOptimizationLevel.ORT_ENABLE_ALL
ort_session = onnxruntime.InferenceSession(model_path + ".onnx", sess_options=sess_options)
torch.set_num_threads(threads)
# create output file
output_filename = output_filepath + "pepper_prediction_" + str(thread_id) + ".hdf"
prediction_data_file = DataStore(output_filename, mode='w')
# data loader
input_data = SequenceDataset(input_filepath, file_chunks)
data_loader = DataLoader(input_data,
batch_size=batch_size,
shuffle=False,
num_workers=num_workers)
batch_completed = 0
total_batches = len(data_loader)
with torch.no_grad():
for contig, contig_start, contig_end, chunk_id, images, position, index in data_loader:
images = images.type(torch.FloatTensor)
hidden = torch.zeros(images.size(0), 2 * TrainOptions.GRU_LAYERS, TrainOptions.HIDDEN_SIZE)
prediction_base_tensor = torch.zeros((images.size(0), images.size(1), ImageSizeOptions.TOTAL_LABELS))
for i in range(0, ImageSizeOptions.SEQ_LENGTH, TrainOptions.WINDOW_JUMP):
if i + TrainOptions.TRAIN_WINDOW > ImageSizeOptions.SEQ_LENGTH:
break
chunk_start = i
chunk_end = i + TrainOptions.TRAIN_WINDOW
# chunk all the data
image_chunk = images[:, chunk_start:chunk_end]
# run inference on onnx mode, which takes numpy inputs
ort_inputs = {ort_session.get_inputs()[0].name: image_chunk.cpu().numpy(),
ort_session.get_inputs()[1].name: hidden.cpu().numpy()}
output_base, hidden = ort_session.run(None, ort_inputs)
output_base = torch.from_numpy(output_base)
hidden = torch.from_numpy(hidden)
# now calculate how much padding is on the top and bottom of this chunk so we can do a simple
# add operation
top_zeros = chunk_start
bottom_zeros = ImageSizeOptions.SEQ_LENGTH - chunk_end
# do softmax and get prediction
# we run a softmax a padding to make the output tensor compatible for adding
inference_layers = nn.Sequential(
nn.Softmax(dim=2),
nn.ZeroPad2d((0, 0, top_zeros, bottom_zeros))
)
# run the softmax and padding layers
base_prediction = (inference_layers(output_base) * 10).type(torch.IntTensor)
# now simply add the tensor to the global counter
prediction_base_tensor = torch.add(prediction_base_tensor, base_prediction)
# base_values, base_labels = torch.max(prediction_base_tensor, 2)
#
# predicted_base_labels = base_labels.cpu().numpy()
prediction_base_tensor = prediction_base_tensor.cpu().numpy().astype(int)
for i in range(images.size(0)):
prediction_data_file.write_prediction(contig[i],
contig_start[i],
contig_end[i],
chunk_id[i],
position[i],
index[i],
prediction_base_tensor[i])
batch_completed += 1
if thread_id == 0 and batch_completed % 5 == 0:
sys.stderr.write("[" + str(datetime.now().strftime('%m-%d-%Y %H:%M:%S')) + "] " +
"INFO: BATCHES PROCESSED " + str(batch_completed) + "/" + str(total_batches) + ".\n")
sys.stderr.flush()
def cleanup():
dist.destroy_process_group()
def setup(rank, total_callers, args, all_input_files):
os.environ['MASTER_ADDR'] = 'localhost'
os.environ['MASTER_PORT'] = '12355'
# initialize the process group
dist.init_process_group("gloo", rank=rank, world_size=total_callers)
filepath, output_filepath, model_path, batch_size, threads, num_workers = args
# Explicitly setting seed to make sure that models created in two processes
# start from same random weights and biases.
predict(filepath, all_input_files[rank], output_filepath, model_path, batch_size, num_workers, threads, rank)
cleanup()
def predict_distributed_cpu(filepath, file_chunks, output_filepath, model_path, batch_size, callers, threads, num_workers):
"""
Create a prediction table/dictionary of an images set using a trained model.
:param filepath: Path to image files to predict on
:param file_chunks: Path to chunked files
:param batch_size: Batch size used for prediction
:param model_path: Path to a trained model
:param output_filepath: Path to output directory
:param callers: Number of callers to start
:param threads: Number of threads per caller.
:param num_workers: Number of workers to be used by the dataloader
:return: Prediction dictionary
"""
transducer_model, hidden_size, gru_layers, prev_ite = \
ModelHandler.load_simple_model_for_training(model_path,
input_channels=ImageSizeOptions.IMAGE_CHANNELS,
image_features=ImageSizeOptions.IMAGE_HEIGHT,
seq_len=ImageSizeOptions.SEQ_LENGTH,
num_classes=ImageSizeOptions.TOTAL_LABELS)
transducer_model.eval()
sys.stderr.write("[" + str(datetime.now().strftime('%m-%d-%Y %H:%M:%S')) + "] INFO: MODEL LOADING TO ONNX\n")
x = torch.zeros(1, TrainOptions.TRAIN_WINDOW, ImageSizeOptions.IMAGE_HEIGHT)
h = torch.zeros(1, 2 * TrainOptions.GRU_LAYERS, TrainOptions.HIDDEN_SIZE)
if not os.path.isfile(model_path + ".onnx"):
sys.stderr.write("[" + str(datetime.now().strftime('%m-%d-%Y %H:%M:%S')) + "] INFO: SAVING MODEL TO ONNX\n")
torch.onnx.export(transducer_model, (x, h),
model_path + ".onnx",
training=False,
opset_version=10,
do_constant_folding=True,
input_names=['input_image', 'input_hidden'],
output_names=['output_pred', 'output_hidden'],
dynamic_axes={'input_image': {0: 'batch_size'},
'input_hidden': {0: 'batch_size'},
'output_pred': {0: 'batch_size'},
'output_hidden': {0: 'batch_size'}})
transducer_model.eval()
args = (filepath, output_filepath, model_path, batch_size, threads, num_workers)
mp.spawn(setup,
args=(callers, args, file_chunks),
nprocs=callers,
join=True)
| 47.378698 | 123 | 0.608842 | import sys
import os
import torch
import torch.onnx
import torch.distributed as dist
import torch.nn as nn
import onnxruntime
from datetime import datetime
from torch.utils.data import DataLoader
import torch.multiprocessing as mp
from pepper_variant.modules.python.models.dataloader_predict import SequenceDataset
from pepper_variant.modules.python.models.ModelHander import ModelHandler
from pepper_variant.modules.python.Options import ImageSizeOptions, TrainOptions
from pepper_variant.modules.python.DataStorePredict import DataStore
def predict(input_filepath, file_chunks, output_filepath, model_path, batch_size, num_workers, threads, thread_id):
sess_options = onnxruntime.SessionOptions()
sess_options.intra_op_num_threads = threads
sess_options.execution_mode = onnxruntime.ExecutionMode.ORT_SEQUENTIAL
sess_options.graph_optimization_level = onnxruntime.GraphOptimizationLevel.ORT_ENABLE_ALL
ort_session = onnxruntime.InferenceSession(model_path + ".onnx", sess_options=sess_options)
torch.set_num_threads(threads)
output_filename = output_filepath + "pepper_prediction_" + str(thread_id) + ".hdf"
prediction_data_file = DataStore(output_filename, mode='w')
input_data = SequenceDataset(input_filepath, file_chunks)
data_loader = DataLoader(input_data,
batch_size=batch_size,
shuffle=False,
num_workers=num_workers)
batch_completed = 0
total_batches = len(data_loader)
with torch.no_grad():
for contig, contig_start, contig_end, chunk_id, images, position, index in data_loader:
images = images.type(torch.FloatTensor)
hidden = torch.zeros(images.size(0), 2 * TrainOptions.GRU_LAYERS, TrainOptions.HIDDEN_SIZE)
prediction_base_tensor = torch.zeros((images.size(0), images.size(1), ImageSizeOptions.TOTAL_LABELS))
for i in range(0, ImageSizeOptions.SEQ_LENGTH, TrainOptions.WINDOW_JUMP):
if i + TrainOptions.TRAIN_WINDOW > ImageSizeOptions.SEQ_LENGTH:
break
chunk_start = i
chunk_end = i + TrainOptions.TRAIN_WINDOW
image_chunk = images[:, chunk_start:chunk_end]
ort_inputs = {ort_session.get_inputs()[0].name: image_chunk.cpu().numpy(),
ort_session.get_inputs()[1].name: hidden.cpu().numpy()}
output_base, hidden = ort_session.run(None, ort_inputs)
output_base = torch.from_numpy(output_base)
hidden = torch.from_numpy(hidden)
top_zeros = chunk_start
bottom_zeros = ImageSizeOptions.SEQ_LENGTH - chunk_end
inference_layers = nn.Sequential(
nn.Softmax(dim=2),
nn.ZeroPad2d((0, 0, top_zeros, bottom_zeros))
)
base_prediction = (inference_layers(output_base) * 10).type(torch.IntTensor)
prediction_base_tensor = torch.add(prediction_base_tensor, base_prediction)
prediction_base_tensor = prediction_base_tensor.cpu().numpy().astype(int)
for i in range(images.size(0)):
prediction_data_file.write_prediction(contig[i],
contig_start[i],
contig_end[i],
chunk_id[i],
position[i],
index[i],
prediction_base_tensor[i])
batch_completed += 1
if thread_id == 0 and batch_completed % 5 == 0:
sys.stderr.write("[" + str(datetime.now().strftime('%m-%d-%Y %H:%M:%S')) + "] " +
"INFO: BATCHES PROCESSED " + str(batch_completed) + "/" + str(total_batches) + ".\n")
sys.stderr.flush()
def cleanup():
dist.destroy_process_group()
def setup(rank, total_callers, args, all_input_files):
os.environ['MASTER_ADDR'] = 'localhost'
os.environ['MASTER_PORT'] = '12355'
dist.init_process_group("gloo", rank=rank, world_size=total_callers)
filepath, output_filepath, model_path, batch_size, threads, num_workers = args
predict(filepath, all_input_files[rank], output_filepath, model_path, batch_size, num_workers, threads, rank)
cleanup()
def predict_distributed_cpu(filepath, file_chunks, output_filepath, model_path, batch_size, callers, threads, num_workers):
transducer_model, hidden_size, gru_layers, prev_ite = \
ModelHandler.load_simple_model_for_training(model_path,
input_channels=ImageSizeOptions.IMAGE_CHANNELS,
image_features=ImageSizeOptions.IMAGE_HEIGHT,
seq_len=ImageSizeOptions.SEQ_LENGTH,
num_classes=ImageSizeOptions.TOTAL_LABELS)
transducer_model.eval()
sys.stderr.write("[" + str(datetime.now().strftime('%m-%d-%Y %H:%M:%S')) + "] INFO: MODEL LOADING TO ONNX\n")
x = torch.zeros(1, TrainOptions.TRAIN_WINDOW, ImageSizeOptions.IMAGE_HEIGHT)
h = torch.zeros(1, 2 * TrainOptions.GRU_LAYERS, TrainOptions.HIDDEN_SIZE)
if not os.path.isfile(model_path + ".onnx"):
sys.stderr.write("[" + str(datetime.now().strftime('%m-%d-%Y %H:%M:%S')) + "] INFO: SAVING MODEL TO ONNX\n")
torch.onnx.export(transducer_model, (x, h),
model_path + ".onnx",
training=False,
opset_version=10,
do_constant_folding=True,
input_names=['input_image', 'input_hidden'],
output_names=['output_pred', 'output_hidden'],
dynamic_axes={'input_image': {0: 'batch_size'},
'input_hidden': {0: 'batch_size'},
'output_pred': {0: 'batch_size'},
'output_hidden': {0: 'batch_size'}})
transducer_model.eval()
args = (filepath, output_filepath, model_path, batch_size, threads, num_workers)
mp.spawn(setup,
args=(callers, args, file_chunks),
nprocs=callers,
join=True)
| true | true |
f7271f7b24dfad40337af89fa46c4ae330c1b315 | 2,394 | py | Python | neuroballad/neuroballad_execute.py | KathyFeiyang/Neuroballad | e02506f81a2af4125b58b34849135ef8eead314c | [
"BSD-3-Clause"
] | null | null | null | neuroballad/neuroballad_execute.py | KathyFeiyang/Neuroballad | e02506f81a2af4125b58b34849135ef8eead314c | [
"BSD-3-Clause"
] | null | null | null | neuroballad/neuroballad_execute.py | KathyFeiyang/Neuroballad | e02506f81a2af4125b58b34849135ef8eead314c | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import h5py
import networkx as nx
import argparse
import itertools
import random
import pickle
import neurokernel.mpi_relaunch
import neurokernel.core_gpu as core
from neurokernel.LPU.InputProcessors.StepInputProcessor import StepInputProcessor
from neurokernel.LPU.InputProcessors.FileInputProcessor import FileInputProcessor
from neurokernel.tools.logging import setup_logger
from neurokernel.LPU.LPU import LPU
(comp_dict, conns) = LPU.lpu_parser('neuroballad_temp_model.gexf.gz')
with open('run_parameters.pickle', 'rb') as f:
run_parameters = pickle.load(f)
with open('record_parameters.pickle', 'rb') as f:
record_parameters = pickle.load(f)
dur = 1.0
dt = 1e-4
dur = run_parameters[0]
dt = run_parameters[1]
fl_input_processor = FileInputProcessor('neuroballad_temp_model_input.h5')
from neurokernel.LPU.OutputProcessors.FileOutputProcessor import FileOutputProcessor
output_processor = FileOutputProcessor(record_parameters, 'neuroballad_temp_model_output.h5', sample_interval=1)
#Parse extra arguments
parser = argparse.ArgumentParser()
parser.add_argument('--debug', default=True,
dest='debug', action='store_true',
help='Write connectivity structures and inter-LPU routed data in debug folder')
parser.add_argument('-l', '--log', default='both', type=str,
help='Log output to screen [file, screen, both, or none; default:none]')
parser.add_argument('-r', '--time_sync', default=False, action='store_true',
help='Time data reception throughput [default: False]')
parser.add_argument('-g', '--gpu_dev', default=[0], type=int, nargs='+',
help='GPU device numbers [default: 0]')
parser.add_argument('-d', '--disconnect', default=False, action='store_true',
help='Run with disconnected LPUs [default: False]')
args = parser.parse_args()
file_name = None
screen = False
if args.log.lower() in ['file', 'both']:
file_name = 'neurokernel.log'
if args.log.lower() in ['screen', 'both']:
screen = True
logger = setup_logger(file_name=file_name, screen=screen)
man = core.Manager()
man.add(LPU, 'lpu', dt, comp_dict, conns,
input_processors=[fl_input_processor],
output_processors=[output_processor], device=args.gpu_dev[0],
debug=True)
steps = int(dur/dt)
man.spawn()
man.start(steps = steps)
man.wait()
| 36.272727 | 112 | 0.724728 | import numpy as np
import h5py
import networkx as nx
import argparse
import itertools
import random
import pickle
import neurokernel.mpi_relaunch
import neurokernel.core_gpu as core
from neurokernel.LPU.InputProcessors.StepInputProcessor import StepInputProcessor
from neurokernel.LPU.InputProcessors.FileInputProcessor import FileInputProcessor
from neurokernel.tools.logging import setup_logger
from neurokernel.LPU.LPU import LPU
(comp_dict, conns) = LPU.lpu_parser('neuroballad_temp_model.gexf.gz')
with open('run_parameters.pickle', 'rb') as f:
run_parameters = pickle.load(f)
with open('record_parameters.pickle', 'rb') as f:
record_parameters = pickle.load(f)
dur = 1.0
dt = 1e-4
dur = run_parameters[0]
dt = run_parameters[1]
fl_input_processor = FileInputProcessor('neuroballad_temp_model_input.h5')
from neurokernel.LPU.OutputProcessors.FileOutputProcessor import FileOutputProcessor
output_processor = FileOutputProcessor(record_parameters, 'neuroballad_temp_model_output.h5', sample_interval=1)
parser = argparse.ArgumentParser()
parser.add_argument('--debug', default=True,
dest='debug', action='store_true',
help='Write connectivity structures and inter-LPU routed data in debug folder')
parser.add_argument('-l', '--log', default='both', type=str,
help='Log output to screen [file, screen, both, or none; default:none]')
parser.add_argument('-r', '--time_sync', default=False, action='store_true',
help='Time data reception throughput [default: False]')
parser.add_argument('-g', '--gpu_dev', default=[0], type=int, nargs='+',
help='GPU device numbers [default: 0]')
parser.add_argument('-d', '--disconnect', default=False, action='store_true',
help='Run with disconnected LPUs [default: False]')
args = parser.parse_args()
file_name = None
screen = False
if args.log.lower() in ['file', 'both']:
file_name = 'neurokernel.log'
if args.log.lower() in ['screen', 'both']:
screen = True
logger = setup_logger(file_name=file_name, screen=screen)
man = core.Manager()
man.add(LPU, 'lpu', dt, comp_dict, conns,
input_processors=[fl_input_processor],
output_processors=[output_processor], device=args.gpu_dev[0],
debug=True)
steps = int(dur/dt)
man.spawn()
man.start(steps = steps)
man.wait()
| true | true |
f7272096c7c7419d953f812ee3f5ff9bf5aca83f | 674 | py | Python | apis/task/serializers.py | computablelabs/capi | 44e349fa3c71c8d2d390cdf2a5b7b8892807b40a | [
"MIT"
] | null | null | null | apis/task/serializers.py | computablelabs/capi | 44e349fa3c71c8d2d390cdf2a5b7b8892807b40a | [
"MIT"
] | 43 | 2019-09-03T14:50:23.000Z | 2019-12-18T17:30:11.000Z | apis/task/serializers.py | computablelabs/capi | 44e349fa3c71c8d2d390cdf2a5b7b8892807b40a | [
"MIT"
] | 1 | 2019-10-15T14:41:28.000Z | 2019-10-15T14:41:28.000Z | from flask_restplus import Model, fields
NewTaskResult = Model('NewTaskResult', {
'message': fields.String(required=True, description='Server response when an anyschronous task is created'),
'task_id': fields.String(required=True, description='UUID of the created asynchronous task')
})
TaskResult = Model('TaskResult', {
'message': fields.String(required=True, description='Server response when an anyschronous task is fetched'),
'status': fields.String(required=True, description='One of [STARTED, PENDING, FAILURE, SUCCESS]'),
'result': fields.String(description='The result of the task if finished, likely an Ethereum transaction hash')
})
| 51.846154 | 114 | 0.743323 | from flask_restplus import Model, fields
NewTaskResult = Model('NewTaskResult', {
'message': fields.String(required=True, description='Server response when an anyschronous task is created'),
'task_id': fields.String(required=True, description='UUID of the created asynchronous task')
})
TaskResult = Model('TaskResult', {
'message': fields.String(required=True, description='Server response when an anyschronous task is fetched'),
'status': fields.String(required=True, description='One of [STARTED, PENDING, FAILURE, SUCCESS]'),
'result': fields.String(description='The result of the task if finished, likely an Ethereum transaction hash')
})
| true | true |
f727210386943796d9c7b108e0c2ae73b4a71275 | 1,325 | py | Python | azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diagnostics_profile.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diagnostics_profile.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/diagnostics_profile.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
class DiagnosticsProfile(Model):
"""Specifies the boot diagnostic settings state. <br><br>Minimum api-version:
2015-06-15.
:param boot_diagnostics: Boot Diagnostics is a debugging feature which
allows you to view Console Output and Screenshot to diagnose VM status.
<br><br> You can easily view the output of your console log. <br><br>
Azure also enables you to see a screenshot of the VM from the hypervisor.
:type boot_diagnostics:
~azure.mgmt.compute.v2018_06_01.models.BootDiagnostics
"""
_attribute_map = {
'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'},
}
def __init__(self, **kwargs):
super(DiagnosticsProfile, self).__init__(**kwargs)
self.boot_diagnostics = kwargs.get('boot_diagnostics', None)
| 38.970588 | 82 | 0.640755 |
from msrest.serialization import Model
class DiagnosticsProfile(Model):
_attribute_map = {
'boot_diagnostics': {'key': 'bootDiagnostics', 'type': 'BootDiagnostics'},
}
def __init__(self, **kwargs):
super(DiagnosticsProfile, self).__init__(**kwargs)
self.boot_diagnostics = kwargs.get('boot_diagnostics', None)
| true | true |
f7272115b89aaed7d8a829a174cfd5a6199d6efc | 2,425 | py | Python | 19th/ads-insert/solution.py | WooJin1993/coding_test | ec9dc2dc768fe45700b4c0695b16535c0a824f6e | [
"MIT"
] | null | null | null | 19th/ads-insert/solution.py | WooJin1993/coding_test | ec9dc2dc768fe45700b4c0695b16535c0a824f6e | [
"MIT"
] | null | null | null | 19th/ads-insert/solution.py | WooJin1993/coding_test | ec9dc2dc768fe45700b4c0695b16535c0a824f6e | [
"MIT"
] | null | null | null | # 문제: https://programmers.co.kr/learn/courses/30/lessons/72414
# --- 첫 풀이 ---
# 31개 테스트 케이스 중 시간초과 18개
from bisect import bisect_left, bisect_right
def solution(play_time, adv_time, logs):
adv_time = 3600*int(adv_time[:2]) + 60*int(adv_time[3:5]) + int(adv_time[6:])
starts, ends = [], []
for log in logs:
start, end = log.split("-")
start = 3600*int(start[:2]) + 60*int(start[3:5]) + int(start[6:])
end = 3600*int(end[:2]) + 60*int(end[3:5]) + int(end[6:])
starts.append(start)
ends.append(end)
starts.sort()
ends.sort()
result = []
for start, end in zip(starts, ends):
play_time = 0
start_time = start
end_time = start + adv_time
idx1 = bisect_left(ends, start_time)
idx2 = bisect_right(starts, end_time)
for s, e in zip(starts[idx1:idx2], ends[idx1:idx2]):
play_time += min(end_time, e) - max(start_time, s)
result.append((start_time, play_time))
play_time = 0
start_time = start - adv_time
end_time = start
idx1 = bisect_left(ends, start_time)
idx2 = bisect_right(starts, end_time)
for s, e in zip(starts[idx1:idx2], ends[idx1:idx2]):
play_time += min(end_time, e) - max(start_time, s)
result.append((start_time, play_time))
play_time = 0
start_time = end
end_time = end + adv_time
idx1 = bisect_left(ends, start_time)
idx2 = bisect_right(starts, end_time)
for s, e in zip(starts[idx1:idx2], ends[idx1:idx2]):
play_time += min(end_time, e) - max(start_time, s)
result.append((start_time, play_time))
play_time = 0
start_time = end - adv_time
end_time = end
idx1 = bisect_left(ends, start_time)
idx2 = bisect_right(starts, end_time)
for s, e in zip(starts[idx1:idx2], ends[idx1:idx2]):
play_time += min(end_time, e) - max(start_time, s)
result.append((start_time, play_time))
answer = max(result, key=lambda x: (x[1], -x[0]))[0]
if answer <= 0:
return "00:00:00"
else:
q1, r1 = divmod(answer, 3600)
q2, r2 = divmod(r1, 60)
return f"{str(q1).zfill(2)}:{str(q2).zfill(2)}:{str(r2).zfill(2)}" | 31.493506 | 81 | 0.547216 |
from bisect import bisect_left, bisect_right
def solution(play_time, adv_time, logs):
adv_time = 3600*int(adv_time[:2]) + 60*int(adv_time[3:5]) + int(adv_time[6:])
starts, ends = [], []
for log in logs:
start, end = log.split("-")
start = 3600*int(start[:2]) + 60*int(start[3:5]) + int(start[6:])
end = 3600*int(end[:2]) + 60*int(end[3:5]) + int(end[6:])
starts.append(start)
ends.append(end)
starts.sort()
ends.sort()
result = []
for start, end in zip(starts, ends):
play_time = 0
start_time = start
end_time = start + adv_time
idx1 = bisect_left(ends, start_time)
idx2 = bisect_right(starts, end_time)
for s, e in zip(starts[idx1:idx2], ends[idx1:idx2]):
play_time += min(end_time, e) - max(start_time, s)
result.append((start_time, play_time))
play_time = 0
start_time = start - adv_time
end_time = start
idx1 = bisect_left(ends, start_time)
idx2 = bisect_right(starts, end_time)
for s, e in zip(starts[idx1:idx2], ends[idx1:idx2]):
play_time += min(end_time, e) - max(start_time, s)
result.append((start_time, play_time))
play_time = 0
start_time = end
end_time = end + adv_time
idx1 = bisect_left(ends, start_time)
idx2 = bisect_right(starts, end_time)
for s, e in zip(starts[idx1:idx2], ends[idx1:idx2]):
play_time += min(end_time, e) - max(start_time, s)
result.append((start_time, play_time))
play_time = 0
start_time = end - adv_time
end_time = end
idx1 = bisect_left(ends, start_time)
idx2 = bisect_right(starts, end_time)
for s, e in zip(starts[idx1:idx2], ends[idx1:idx2]):
play_time += min(end_time, e) - max(start_time, s)
result.append((start_time, play_time))
answer = max(result, key=lambda x: (x[1], -x[0]))[0]
if answer <= 0:
return "00:00:00"
else:
q1, r1 = divmod(answer, 3600)
q2, r2 = divmod(r1, 60)
return f"{str(q1).zfill(2)}:{str(q2).zfill(2)}:{str(r2).zfill(2)}" | true | true |
f72721e58066887b759506095186097135e7d354 | 379,524 | py | Python | Data/scigrid-de/pypower/scigrid_2011_01_07_01.py | thanever/SOC | 9f30d1a9c7610a68de9c178a1170bdf1c8ca11d4 | [
"MIT"
] | null | null | null | Data/scigrid-de/pypower/scigrid_2011_01_07_01.py | thanever/SOC | 9f30d1a9c7610a68de9c178a1170bdf1c8ca11d4 | [
"MIT"
] | null | null | null | Data/scigrid-de/pypower/scigrid_2011_01_07_01.py | thanever/SOC | 9f30d1a9c7610a68de9c178a1170bdf1c8ca11d4 | [
"MIT"
] | null | null | null | from numpy import array
def scigrid_2011_01_07_01():
ppc = {"version": '2'}
ppc["baseMVA"] = 100.0
ppc["bus"] = array([
[586, 3, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[589, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[590, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[593, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[595, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[598, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[599, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[602, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[603, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[607, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[608, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[609, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[612, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[614, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[616, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[617, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[618, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[619, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[624, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[629, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[632, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[637, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[638, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[640, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[641, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[642, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[643, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[647, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[652, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[655, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[663, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[666, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[670, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[672, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[676, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[681, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[683, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[687, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[694, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[695, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[697, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[698, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[702, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[705, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[707, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[714, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[716, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[717, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[722, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[724, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[730, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[732, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[735, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[741, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[742, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[743, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[747, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[749, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[750, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[753, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[761, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[762, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[765, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[767, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[772, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[774, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[777, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[778, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[781, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[784, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[785, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[788, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[789, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[791, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[792, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[795, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[800, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[801, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[802, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[805, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[806, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[808, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[809, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[811, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[814, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[816, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[817, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[821, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[826, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[834, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[835, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[836, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[837, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[839, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[841, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[843, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[844, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[850, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[851, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[853, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[856, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[857, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[858, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[860, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[865, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[867, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[869, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[870, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[872, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[874, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[875, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[882, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[883, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[885, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[886, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[889, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[890, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[893, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[894, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[895, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[896, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[898, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[902, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[903, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[905, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[906, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[907, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[909, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[917, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[918, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[920, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[921, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[922, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[923, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[925, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[931, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[936, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[937, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[939, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[940, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[944, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[950, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[952, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[958, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[959, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[960, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[963, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[965, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[967, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[969, 2, 0, 0, 0, 0, 0, 0.999644, 0, 220.0, 0, 1.1, 0.9 ],
[971, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[978, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[982, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[983, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[984, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[985, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[986, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[987, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[988, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[993, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[994, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[995, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[997, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[999, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1002, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1007, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1010, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1011, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1012, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1014, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1027, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1028, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1029, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1030, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1031, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1032, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1033, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1034, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1035, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1036, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1037, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1038, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1039, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1040, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1041, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1042, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1043, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1044, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1045, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1046, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1047, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1048, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1049, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1050, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1051, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1052, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1053, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1054, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1055, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1056, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1057, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1058, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1059, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1060, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1061, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1062, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1063, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1064, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1065, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1066, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1067, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1068, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1069, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1070, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1071, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1072, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1073, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1074, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1075, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1076, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1077, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1078, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1079, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1080, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1081, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1082, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1083, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1084, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1085, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1086, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1087, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1088, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1089, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1090, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1091, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1092, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1093, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1096, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1097, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1098, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1099, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1100, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1101, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1102, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1103, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1105, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1106, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1107, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1108, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1109, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1110, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1111, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1113, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1114, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1115, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1116, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1117, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1118, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1119, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1120, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1121, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1122, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1123, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1124, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1125, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1126, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1127, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1128, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1129, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1130, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1131, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1133, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1134, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1135, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1136, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1137, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1138, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1139, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1140, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1142, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1143, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1144, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1145, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1146, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1147, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1148, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1149, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1150, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1151, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1152, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1155, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1157, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1160, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1161, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1162, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1163, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1164, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1165, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1166, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1168, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1169, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1171, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1172, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1173, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1175, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1176, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1177, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1178, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1179, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1181, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1182, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1183, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1184, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1186, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1187, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1188, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1189, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1190, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1191, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1192, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1193, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1194, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1195, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1196, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1197, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1198, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1199, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1200, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1201, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1202, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1203, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1204, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1205, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1206, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1207, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1208, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1209, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1210, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1211, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1212, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1213, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1214, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1215, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1216, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1217, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1218, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1219, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1220, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1221, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1222, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1223, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1224, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1225, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1226, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1227, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1228, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1229, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1230, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1231, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1232, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1233, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1235, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1236, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1237, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1238, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1239, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1240, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1241, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1242, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1243, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1244, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1245, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1246, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1247, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1248, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1249, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1250, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1251, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1252, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1253, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1254, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1255, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1256, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1257, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1258, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1259, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1260, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1261, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1262, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1263, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1264, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1265, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1266, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1267, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1268, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1269, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1270, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1271, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1272, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1273, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1274, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1275, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1276, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1277, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1278, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1279, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1280, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1281, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1282, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1283, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1284, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1285, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1286, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1287, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1288, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1289, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1290, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1291, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1292, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1293, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1294, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1295, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1296, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1297, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1298, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1299, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1300, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1301, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1302, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1303, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1304, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1305, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1306, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1307, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1308, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1309, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1310, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1311, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1312, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1313, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1314, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1315, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1316, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1317, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1318, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1319, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1320, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1321, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1322, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1323, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1324, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1325, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1326, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1327, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1328, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1329, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1330, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1332, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1333, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1334, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1335, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1336, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1337, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1338, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1339, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1340, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1341, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1342, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1343, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1344, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1345, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1346, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1347, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1348, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1349, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1350, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1351, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1352, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1355, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1356, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1357, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1358, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1359, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1363, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1364, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1365, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1366, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1367, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1368, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1369, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1370, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1371, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1372, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1373, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1374, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1375, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1376, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1377, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1378, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1379, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1381, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1382, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1383, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1387, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1390, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1391, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1393, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1394, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1395, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1396, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1397, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1398, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1399, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1400, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1401, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1402, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1403, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1404, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1405, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1406, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1407, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1408, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1409, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1410, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1411, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1412, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1413, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1414, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1415, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1416, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1417, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1418, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1419, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1420, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1421, 2, 0, 0, 0, 0, 0, 0.999644, 0, 220.0, 0, 1.1, 0.9 ],
[1422, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1423, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1424, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1425, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1426, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1427, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1428, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1429, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1430, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1431, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1432, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1433, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1434, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1435, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1436, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1437, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1438, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1439, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1440, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1441, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1442, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1443, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1444, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1445, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1446, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1447, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1448, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1449, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1450, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1451, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1452, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1453, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1454, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1455, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1456, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1459, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1460, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1461, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1463, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1464, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1466, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1467, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1468, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1469, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1470, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1471, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1472, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1473, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1474, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1475, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1476, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1477, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1479, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1480, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1481, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1482, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1483, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1484, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1485, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1486, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1487, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1488, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1489, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1490, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1491, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1492, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1493, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1494, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1495, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1496, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1497, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1498, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1499, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1500, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1501, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1502, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1503, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1504, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1505, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1506, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1507, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1508, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1510, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1511, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1512, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1513, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1514, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1516, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1517, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1518, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1519, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1, 1, 231.535683, 46.307137, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[2, 1, 0, 0, 0, 0, 0, 1.000015, 0, 380.0, 0, 1.1, 0.9 ],
[3, 1, 40.581977, 8.116395, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[4, 1, 66.738408, 13.347682, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[5, 1, 0, 0, 0, 0, 0, 0.998829, 0, 380.0, 0, 1.1, 0.9 ],
[6, 1, 195.97163, 39.194326, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[7, 1, 147.688993, 29.537799, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[8, 1, 123.575597, 24.715119, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[9, 1, 83.572245, 16.714449, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[10, 1, 0, 0, 0, 0, 0, 1.001864, 0, 380.0, 0, 1.1, 0.9 ],
[11, 1, 73.223533, 14.644707, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[12, 1, 0, 0, 0, 0, 0, 1.000997, 0, 380.0, 0, 1.1, 0.9 ],
[13, 1, 0, 0, 0, 0, 0, 1.000519, 0, 380.0, 0, 1.1, 0.9 ],
[14, 1, 175.12383, 35.024766, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[15, 1, 0, 0, 0, 0, 0, 1.000477, 0, 380.0, 0, 1.1, 0.9 ],
[16, 1, 298.667302, 59.73346, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[17, 1, 70.343995, 14.068799, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[18, 1, 0, 0, 0, 0, 0, 1.002785, 0, 380.0, 0, 1.1, 0.9 ],
[19, 1, 173.793495, 34.758699, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[20, 1, 0, 0, 0, 0, 0, 0.998624, 0, 380.0, 0, 1.1, 0.9 ],
[21, 1, 747.338688, 149.467738, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[22, 1, 0, 0, 0, 0, 0, 1.000541, 0, 380.0, 0, 1.1, 0.9 ],
[23, 1, 97.851973, 19.570395, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[24, 1, 0, 0, 0, 0, 0, 0.999995, 0, 380.0, 0, 1.1, 0.9 ],
[25, 1, 46.803281, 9.360656, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[26, 1, 0, 0, 0, 0, 0, 1.000745, 0, 380.0, 0, 1.1, 0.9 ],
[27, 1, 57.452323, 11.490465, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[28, 1, 169.754403, 33.950881, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[29, 1, 62.354326, 12.470865, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[30, 1, 0, 0, 0, 0, 0, 0.999264, 0, 380.0, 0, 1.1, 0.9 ],
[31, 1, 122.711704, 24.542341, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[32, 1, 0, 0, 0, 0, 0, 0.995193, 0, 380.0, 0, 1.1, 0.9 ],
[33, 1, 153.857417, 30.771483, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[34, 1, 30.52459, 6.104918, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[35, 1, 2.020889, 0.404178, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[36, 1, 6.690873, 1.338175, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[37, 1, 0, 0, 0, 0, 0, 1.002691, 0, 380.0, 0, 1.1, 0.9 ],
[38, 1, 161.19808, 32.239616, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[39, 1, 52.784066, 10.556813, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[40, 1, 55.134608, 11.026922, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[41, 1, 59.257208, 11.851442, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[42, 1, 0, 0, 0, 0, 0, 1.001586, 0, 380.0, 0, 1.1, 0.9 ],
[43, 1, 90.873598, 18.17472, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[44, 1, 116.259296, 23.251859, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[45, 1, 61.713034, 12.342607, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[46, 1, 0, 0, 0, 0, 0, 1.000336, 0, 380.0, 0, 1.1, 0.9 ],
[47, 1, 268.333226, 53.666645, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[48, 1, 184.443359, 36.888672, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[49, 1, 46.654864, 9.330973, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[50, 1, 67.93578, 13.587156, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[51, 1, 88.040336, 17.608067, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[52, 1, 0, 0, 0, 0, 0, 1.0001, 0, 380.0, 0, 1.1, 0.9 ],
[53, 1, 133.58711, 26.717422, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[54, 1, 67.87003, 13.574006, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[55, 1, 66.560665, 13.312133, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[56, 1, 0, 0, 0, 0, 0, 0.999841, 0, 380.0, 0, 1.1, 0.9 ],
[57, 1, 79.452642, 15.890528, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[58, 1, 181.99836, 36.399672, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[59, 1, 51.979844, 10.395969, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[60, 1, 27.405216, 5.481043, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[61, 1, 0, 0, 0, 0, 0, 0.999477, 0, 380.0, 0, 1.1, 0.9 ],
[62, 1, 208.931319, 41.786264, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[63, 1, 123.330369, 24.666074, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[64, 1, 1308.785147, 261.757029, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[65, 1, 4.360894, 0.872179, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[66, 1, 138.366196, 27.673239, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[67, 1, 296.818798, 59.36376, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[68, 1, 0, 0, 0, 0, 0, 0.998332, 0, 380.0, 0, 1.1, 0.9 ],
[69, 1, 0, 0, 0, 0, 0, 1.00075, 0, 380.0, 0, 1.1, 0.9 ],
[70, 1, 561.513466, 112.302693, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[71, 1, 130.488497, 26.097699, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[72, 1, 213.722252, 42.74445, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[73, 1, 68.420546, 13.684109, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[74, 1, 0, 0, 0, 0, 0, 1.003789, 0, 380.0, 0, 1.1, 0.9 ],
[75, 1, 85.276082, 17.055216, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[76, 1, 82.310129, 16.462026, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[77, 1, 79.722985, 15.944597, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[78, 1, 0, 0, 0, 0, 0, 0.995035, 0, 380.0, 0, 1.1, 0.9 ],
[79, 1, 82.320126, 16.464025, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[80, 1, 87.436676, 17.487335, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[81, 1, 98.704099, 19.74082, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[82, 1, 3.28493, 0.656986, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[83, 1, 219.786066, 43.957213, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[84, 1, 21.636582, 4.327316, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[85, 1, 75.031466, 15.006293, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[86, 1, 0, 0, 0, 0, 0, 0.999969, 0, 380.0, 0, 1.1, 0.9 ],
[87, 1, 0, 0, 0, 0, 0, 0.999273, 0, 380.0, 0, 1.1, 0.9 ],
[88, 1, 60.560337, 12.112067, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[89, 1, 75.134368, 15.026874, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[90, 1, 86.776878, 17.355376, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[91, 1, 30.141967, 6.028393, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[92, 1, 32.89546, 6.579092, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[93, 1, 32.263856, 6.452771, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[94, 1, 0, 0, 0, 0, 0, 0.999174, 0, 380.0, 0, 1.1, 0.9 ],
[95, 1, 0, 0, 0, 0, 0, 1.000263, 0, 380.0, 0, 1.1, 0.9 ],
[96, 1, 0, 0, 0, 0, 0, 0.999998, 0, 380.0, 0, 1.1, 0.9 ],
[97, 1, 4.53767, 0.907534, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[98, 1, 83.429506, 16.685901, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[99, 1, 0, 0, 0, 0, 0, 1.001151, 0, 380.0, 0, 1.1, 0.9 ],
[100, 1, 0, 0, 0, 0, 0, 1.001527, 0, 380.0, 0, 1.1, 0.9 ],
[101, 1, 59.076598, 11.81532, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[102, 1, 114.34551, 22.869102, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[103, 1, 133.692027, 26.738405, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[104, 1, 0, 0, 0, 0, 0, 0.999922, 0, 380.0, 0, 1.1, 0.9 ],
[105, 1, 0, 0, 0, 0, 0, 0.999928, 0, 380.0, 0, 1.1, 0.9 ],
[106, 1, 0, 0, 0, 0, 0, 0.99986, 0, 380.0, 0, 1.1, 0.9 ],
[107, 1, 0, 0, 0, 0, 0, 0.999995, 0, 380.0, 0, 1.1, 0.9 ],
[108, 1, 94.303426, 18.860685, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[109, 1, 38.181848, 7.63637, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[110, 1, 49.561569, 9.912314, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[111, 1, 87.340876, 17.468175, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[112, 1, 44.205493, 8.841099, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[113, 1, 69.683871, 13.936774, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[114, 1, 102.627302, 20.52546, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[115, 1, 66.157788, 13.231558, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[116, 1, 110.70596, 22.141192, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[117, 1, 0, 0, 0, 0, 0, 1.000816, 0, 380.0, 0, 1.1, 0.9 ],
[118, 1, 171.412339, 34.282468, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[119, 1, 33.22675, 6.64535, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[120, 1, 0, 0, 0, 0, 0, 1.001279, 0, 380.0, 0, 1.1, 0.9 ],
[121, 1, 45.121942, 9.024388, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[122, 1, 39.503802, 7.90076, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[123, 1, 0, 0, 0, 0, 0, 1.000268, 0, 380.0, 0, 1.1, 0.9 ],
[124, 1, 0, 0, 0, 0, 0, 1.000006, 0, 380.0, 0, 1.1, 0.9 ],
[125, 1, 0, 0, 0, 0, 0, 0.999914, 0, 380.0, 0, 1.1, 0.9 ],
[126, 1, 207.119414, 41.423883, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[127, 1, 160.125097, 32.025019, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[128, 1, 0, 0, 0, 0, 0, 1.001323, 0, 380.0, 0, 1.1, 0.9 ],
[129, 1, 0, 0, 0, 0, 0, 0.999999, 0, 380.0, 0, 1.1, 0.9 ],
[130, 1, 220.78338, 44.156676, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[131, 1, 48.748779, 9.749756, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[132, 1, 126.934451, 25.38689, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[133, 1, 42.518068, 8.503614, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[134, 1, 42.343957, 8.468791, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[135, 1, 42.400098, 8.48002, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[136, 1, 41.074226, 8.214845, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[137, 1, 32.8556, 6.57112, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[138, 1, 0, 0, 0, 0, 0, 0.999263, 0, 380.0, 0, 1.1, 0.9 ],
[139, 1, 64.360791, 12.872158, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[140, 1, 44.508243, 8.901649, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[141, 1, 52.734412, 10.546882, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[142, 1, 58.026678, 11.605336, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[143, 1, 0, 0, 0, 0, 0, 0.99998, 0, 380.0, 0, 1.1, 0.9 ],
[144, 1, 52.856304, 10.571261, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[145, 1, 153.760388, 30.752078, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[146, 1, 198.226065, 39.645213, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[147, 1, 121.500905, 24.300181, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[148, 1, 171.460082, 34.292016, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[149, 1, 110.539074, 22.107815, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[150, 1, 144.320239, 28.864048, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[151, 1, 34.008844, 6.801769, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[152, 1, 70.598833, 14.119767, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[153, 1, 125.9598, 25.19196, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[154, 1, 129.385711, 25.877142, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[155, 1, 134.766653, 26.953331, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[156, 1, 0, 0, 0, 0, 0, 0.999992, 0, 380.0, 0, 1.1, 0.9 ],
[157, 1, 0, 0, 0, 0, 0, 1.000087, 0, 380.0, 0, 1.1, 0.9 ],
[158, 1, 35.506525, 7.101305, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[159, 1, 0, 0, 0, 0, 0, 1.001066, 0, 380.0, 0, 1.1, 0.9 ],
[160, 1, 0, 0, 0, 0, 0, 0.999999, 0, 380.0, 0, 1.1, 0.9 ],
[161, 1, 110.227427, 22.045485, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[162, 1, 164.757336, 32.951467, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[163, 1, 32.949911, 6.589982, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[164, 1, 33.082423, 6.616485, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[165, 1, 0, 0, 0, 0, 0, 0.999998, 0, 380.0, 0, 1.1, 0.9 ],
[166, 1, 38.678704, 7.735741, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[167, 1, 54.411201, 10.88224, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[168, 1, 37.13495, 7.42699, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[169, 1, 127.123641, 25.424728, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[170, 1, 95.522697, 19.104539, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[171, 1, 81.528586, 16.305717, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[172, 1, 40.012009, 8.002402, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[173, 1, 38.223311, 7.644662, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[174, 1, 57.359494, 11.471899, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[175, 1, 38.198259, 7.639652, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[176, 1, 133.106751, 26.62135, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[177, 1, 21.704995, 4.340999, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[178, 1, 114.954978, 22.990996, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[179, 1, 42.356942, 8.471388, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[180, 1, 37.232836, 7.446567, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[181, 1, 28.102272, 5.620454, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[182, 1, 1.273046, 0.254609, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[183, 1, 381.062729, 76.212546, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[184, 1, 0, 0, 0, 0, 0, 0.999954, 0, 380.0, 0, 1.1, 0.9 ],
[185, 1, 81.488061, 16.297612, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[186, 1, 43.880897, 8.776179, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[187, 1, 25.665856, 5.133171, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[188, 1, 38.198259, 7.639652, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[189, 1, 140.163669, 28.032734, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[190, 1, 185.392677, 37.078535, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[191, 1, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[192, 1, 44.648172, 8.929634, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[193, 1, 38.136642, 7.627328, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[194, 1, 26.326335, 5.265267, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[195, 1, 0, 0, 0, 0, 0, 0.999999, 0, 380.0, 0, 1.1, 0.9 ],
[196, 1, 36.934313, 7.386863, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[197, 1, 58.517517, 11.703503, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[198, 1, 34.627533, 6.925507, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[199, 1, 44.581796, 8.916359, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[200, 1, 38.199146, 7.639829, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[201, 1, 0, 0, 0, 0, 0, 0.997871, 0, 380.0, 0, 1.1, 0.9 ],
[202, 1, 39.143281, 7.828656, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[203, 1, 5.157478, 1.031496, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[204, 1, 151.164654, 30.232931, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[205, 1, 75.589132, 15.117826, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[206, 1, 36.277501, 7.2555, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[207, 1, 107.873663, 21.574733, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[208, 1, 31.76454, 6.352908, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[209, 1, 44.14161, 8.828322, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[210, 1, 50.710449, 10.14209, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[211, 1, 178.207882, 35.641576, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[212, 1, 44.665292, 8.933058, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[213, 1, 209.380904, 41.876181, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[214, 1, 140.886808, 28.177362, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[215, 1, 297.912187, 59.582437, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[216, 1, 100.452037, 20.090407, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[217, 1, 32.1884, 6.43768, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[218, 1, 98.063081, 19.612616, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[219, 1, 157.599323, 31.519865, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[220, 1, 0, 0, 0, 0, 0, 0.999672, 0, 380.0, 0, 1.1, 0.9 ],
[221, 1, 89.903024, 17.980605, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[222, 1, 0.0, 0.0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[223, 1, 89.099462, 17.819892, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[224, 1, 103.6104, 20.72208, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[225, 1, 186.038417, 37.207683, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[226, 1, 64.988967, 12.997793, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[227, 1, 80.963073, 16.192615, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[228, 1, 79.38182, 15.876364, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[229, 1, 175.658429, 35.131686, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[230, 1, 42.132923, 8.426585, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[231, 1, 0, 0, 0, 0, 0, 1.000936, 0, 380.0, 0, 1.1, 0.9 ],
[232, 1, 0, 0, 0, 0, 0, 0.999991, 0, 380.0, 0, 1.1, 0.9 ],
[233, 1, 0, 0, 0, 0, 0, 0.999606, 0, 380.0, 0, 1.1, 0.9 ],
[234, 1, 150.082157, 30.016431, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[235, 1, 48.804717, 9.760943, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[236, 1, 0, 0, 0, 0, 0, 0.999981, 0, 380.0, 0, 1.1, 0.9 ],
[237, 1, 0.403914, 0.080783, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[238, 1, 55.223425, 11.044685, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[239, 1, 76.298087, 15.259617, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[240, 1, 481.273697, 96.254739, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[241, 1, 356.125818, 71.225164, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[242, 1, 129.671855, 25.934371, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[243, 1, 104.619329, 20.923866, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[244, 1, 124.646159, 24.929232, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[245, 1, 0, 0, 0, 0, 0, 1.001786, 0, 380.0, 0, 1.1, 0.9 ],
[246, 1, 0, 0, 0, 0, 0, 0.999913, 0, 380.0, 0, 1.1, 0.9 ],
[247, 1, 24.735326, 4.947065, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[248, 1, 0, 0, 0, 0, 0, 0.999998, 0, 380.0, 0, 1.1, 0.9 ],
[249, 1, 0, 0, 0, 0, 0, 0.999997, 0, 380.0, 0, 1.1, 0.9 ],
[250, 1, 0, 0, 0, 0, 0, 0.999995, 0, 380.0, 0, 1.1, 0.9 ],
[251, 1, 61.387468, 12.277494, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[252, 1, 157.430773, 31.486155, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[253, 1, 69.118117, 13.823623, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[254, 1, 22.068268, 4.413654, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[255, 1, 108.529902, 21.70598, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[256, 1, 124.464912, 24.892982, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[257, 1, 60.06952, 12.013904, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[258, 1, 195.759311, 39.151862, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[259, 1, 0, 0, 0, 0, 0, 0.999581, 0, 380.0, 0, 1.1, 0.9 ],
[260, 1, 121.832905, 24.366581, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[261, 1, 0, 0, 0, 0, 0, 1.002014, 0, 380.0, 0, 1.1, 0.9 ],
[262, 1, 0, 0, 0, 0, 0, 0.99968, 0, 380.0, 0, 1.1, 0.9 ],
[263, 1, 174.769144, 34.953829, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[264, 1, 226.248083, 45.249617, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[265, 1, 0, 0, 0, 0, 0, 1.000009, 0, 380.0, 0, 1.1, 0.9 ],
[266, 1, 109.036505, 21.807301, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[267, 1, 137.907521, 27.581504, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[268, 1, 47.956289, 9.591258, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[269, 1, 38.510698, 7.70214, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[270, 1, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[271, 1, 0.0, 0.0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[272, 1, 0.78576, 0.157152, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[273, 1, 107.453062, 21.490612, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[274, 1, 208.874596, 41.774919, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[275, 1, 39.102465, 7.820493, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[276, 1, 152.431348, 30.48627, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[277, 1, 0, 0, 0, 0, 0, 0.998577, 0, 380.0, 0, 1.1, 0.9 ],
[278, 1, 118.997587, 23.799517, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[279, 1, 0, 0, 0, 0, 0, 0.998164, 0, 380.0, 0, 1.1, 0.9 ],
[280, 1, 0, 0, 0, 0, 0, 0.999529, 0, 380.0, 0, 1.1, 0.9 ],
[281, 1, 157.181561, 31.436312, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[282, 1, 222.279069, 44.455814, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[283, 1, 89.099103, 17.819821, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[284, 1, 135.167465, 27.033493, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[285, 1, 60.279948, 12.05599, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[286, 1, 126.337034, 25.267407, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[287, 1, 77.649516, 15.529903, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[288, 1, 49.943628, 9.988726, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[289, 1, 78.546842, 15.709368, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[290, 1, 0, 0, 0, 0, 0, 1.004907, 0, 380.0, 0, 1.1, 0.9 ],
[291, 1, 51.690749, 10.33815, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[292, 1, 101.905943, 20.381189, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[293, 1, 89.813561, 17.962712, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[294, 1, 23.933957, 4.786791, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[295, 1, 50.078174, 10.015635, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[296, 1, 142.172054, 28.434411, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[297, 1, 149.424424, 29.884885, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[298, 1, 78.899066, 15.779813, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[299, 1, 76.413221, 15.282644, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[300, 1, 208.170304, 41.634061, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[301, 1, 0, 0, 0, 0, 0, 0.999525, 0, 380.0, 0, 1.1, 0.9 ],
[302, 1, 175.358016, 35.071603, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[303, 1, 90.068963, 18.013793, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[304, 1, 77.342281, 15.468456, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[305, 1, 0, 0, 0, 0, 0, 0.99979, 0, 380.0, 0, 1.1, 0.9 ],
[306, 1, 0, 0, 0, 0, 0, 0.999891, 0, 380.0, 0, 1.1, 0.9 ],
[307, 1, 91.735133, 18.347027, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[308, 1, 113.097197, 22.619439, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[309, 1, 185.042919, 37.008584, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[310, 1, 0, 0, 0, 0, 0, 1.000041, 0, 380.0, 0, 1.1, 0.9 ],
[311, 1, 157.177116, 31.435423, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[312, 1, 70.686923, 14.137385, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[313, 1, 0, 0, 0, 0, 0, 1.001149, 0, 380.0, 0, 1.1, 0.9 ],
[314, 1, 218.943091, 43.788618, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[315, 1, 0, 0, 0, 0, 0, 1.001529, 0, 380.0, 0, 1.1, 0.9 ],
[316, 1, 85.78475, 17.15695, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[317, 1, 115.506023, 23.101205, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[318, 1, 189.819037, 37.963807, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[319, 1, 6.800077, 1.360015, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[320, 1, 0, 0, 0, 0, 0, 0.999995, 0, 380.0, 0, 1.1, 0.9 ],
[321, 1, 160.858437, 32.171687, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[322, 1, 20.478315, 4.095663, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[323, 1, 2.130594, 0.426119, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[324, 1, 376.637527, 75.327505, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[325, 1, 122.691298, 24.53826, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[326, 1, 9.94743, 1.989486, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[327, 1, 85.604424, 17.120885, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[328, 1, 145.883095, 29.176619, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[329, 1, 219.42118, 43.884236, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[330, 1, 0, 0, 0, 0, 0, 1.001641, 0, 380.0, 0, 1.1, 0.9 ],
[331, 1, 17.421295, 3.484259, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[332, 1, 0, 0, 0, 0, 0, 0.994883, 0, 380.0, 0, 1.1, 0.9 ],
[333, 1, 183.050164, 36.610033, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[334, 1, 0, 0, 0, 0, 0, 0.99946, 0, 380.0, 0, 1.1, 0.9 ],
[335, 1, 186.816503, 37.363301, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[336, 1, 0, 0, 0, 0, 0, 0.998019, 0, 380.0, 0, 1.1, 0.9 ],
[337, 1, 74.310127, 14.862025, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[338, 1, 201.688244, 40.337649, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[339, 1, 124.74139, 24.948278, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[340, 1, 105.466324, 21.093265, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[341, 1, 95.343664, 19.068733, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[342, 1, 165.389884, 33.077977, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[343, 1, 90.735302, 18.14706, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[344, 1, 227.495134, 45.499027, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[345, 1, 248.756971, 49.751394, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[346, 1, 246.952253, 49.390451, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[347, 1, 86.363489, 17.272698, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[348, 1, 225.759849, 45.15197, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[349, 1, 0, 0, 0, 0, 0, 1.001361, 0, 380.0, 0, 1.1, 0.9 ],
[350, 1, 118.436912, 23.687382, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[351, 1, 0, 0, 0, 0, 0, 1.001141, 0, 380.0, 0, 1.1, 0.9 ],
[352, 1, 783.968775, 156.793755, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[353, 1, 2.356872, 0.471374, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[354, 1, 16.012385, 3.202477, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[355, 1, 0.0, 0.0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[356, 1, 0.0, 0.0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[357, 1, 0.040138, 0.008028, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[358, 1, 0, 0, 0, 0, 0, 1.00082, 0, 380.0, 0, 1.1, 0.9 ],
[359, 1, 2.343515, 0.468703, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[360, 1, 0, 0, 0, 0, 0, 1.000685, 0, 380.0, 0, 1.1, 0.9 ],
[361, 1, 59.980163, 11.996033, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[362, 1, 170.974507, 34.194901, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[363, 1, 251.729885, 50.345977, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[364, 1, 59.3922, 11.87844, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[365, 1, 53.307654, 10.661531, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[366, 1, 105.6556, 21.13112, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[367, 1, 51.069528, 10.213906, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[368, 1, 25.147475, 5.029495, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[369, 1, 20.664524, 4.132905, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[370, 1, 60.836949, 12.16739, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[371, 1, 306.104743, 61.220949, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[372, 1, 177.514538, 35.502908, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[373, 1, 119.786939, 23.957388, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[374, 1, 61.424714, 12.284943, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[375, 1, 201.49439, 40.298878, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[376, 1, 221.001397, 44.200279, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[377, 1, 158.145186, 31.629037, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[378, 1, 157.840789, 31.568158, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[379, 1, 54.400959, 10.880192, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[380, 1, 0, 0, 0, 0, 0, 0.999989, 0, 380.0, 0, 1.1, 0.9 ],
[381, 1, 181.920125, 36.384025, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[382, 1, 0, 0, 0, 0, 0, 1.000287, 0, 380.0, 0, 1.1, 0.9 ],
[383, 1, 0, 0, 0, 0, 0, 0.999356, 0, 380.0, 0, 1.1, 0.9 ],
[384, 1, 64.195093, 12.839019, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[385, 1, 81.026806, 16.205361, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[386, 1, 65.10261, 13.020522, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[387, 1, 132.584124, 26.516825, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[388, 1, 711.974806, 142.394961, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[389, 1, 0, 0, 0, 0, 0, 0.999953, 0, 380.0, 0, 1.1, 0.9 ],
[390, 1, 58.786094, 11.757219, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[391, 1, 66.962375, 13.392475, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[392, 1, 128.500124, 25.700025, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[393, 1, 160.472614, 32.094523, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[394, 1, 57.717386, 11.543477, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[395, 1, 79.99273, 15.998546, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[396, 1, 56.658032, 11.331606, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[397, 1, 454.335008, 90.867002, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[398, 1, 196.782306, 39.356461, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[399, 1, 83.843594, 16.768719, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[400, 1, 44.670462, 8.934092, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[401, 1, 0, 0, 0, 0, 0, 1.000557, 0, 380.0, 0, 1.1, 0.9 ],
[402, 1, 0, 0, 0, 0, 0, 1.000356, 0, 380.0, 0, 1.1, 0.9 ],
[403, 1, 22.179923, 4.435985, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[404, 1, 78.141243, 15.628249, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[405, 1, 589.107715, 117.821543, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[406, 1, 44.635096, 8.927019, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[407, 1, 88.356151, 17.67123, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[408, 1, 255.47644, 51.095288, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[409, 1, 0, 0, 0, 0, 0, 0.999926, 0, 380.0, 0, 1.1, 0.9 ],
[410, 1, 33.07651, 6.615302, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[411, 1, 31.275194, 6.255039, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[412, 1, 2.19674, 0.439348, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[413, 1, 109.665229, 21.933046, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[414, 1, 9.311764, 1.862353, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[415, 1, 0, 0, 0, 0, 0, 0.999523, 0, 380.0, 0, 1.1, 0.9 ],
[416, 1, 132.609322, 26.521864, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[417, 1, 5.18875, 1.03775, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[418, 1, 108.130419, 21.626084, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[419, 1, 57.79494, 11.558988, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[420, 1, 58.18776, 11.637552, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[421, 1, 83.817984, 16.763597, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[422, 1, 61.407864, 12.281573, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[423, 1, 128.970085, 25.794017, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[424, 1, 9.298411, 1.859682, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[425, 1, 76.363415, 15.272683, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[426, 1, 6.326944, 1.265389, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[427, 1, 53.17174, 10.634348, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[428, 1, 23.840558, 4.768112, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[429, 1, 269.035043, 53.807009, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[430, 1, 143.305714, 28.661143, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[431, 1, 95.830732, 19.166146, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[432, 1, 112.020247, 22.404049, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[433, 1, 57.261764, 11.452353, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[434, 1, 29.801811, 5.960362, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[435, 1, 119.188482, 23.837696, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[436, 1, 63.632731, 12.726546, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[437, 1, 14.491687, 2.898337, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[438, 1, 38.891719, 7.778344, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[439, 1, 72.411353, 14.482271, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[440, 1, 61.194993, 12.238999, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[441, 1, 46.914161, 9.382832, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[442, 1, 62.083316, 12.416663, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[443, 1, 134.602474, 26.920495, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[444, 1, 0, 0, 0, 0, 0, 0.999997, 0, 380.0, 0, 1.1, 0.9 ],
[445, 1, 61.161808, 12.232362, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[446, 1, 28.360182, 5.672036, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[447, 1, 53.918247, 10.783649, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[448, 1, 39.624436, 7.924887, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[449, 1, 199.799824, 39.959965, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[450, 1, 122.267959, 24.453592, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[451, 1, 52.245702, 10.44914, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[452, 1, 0, 0, 0, 0, 0, 0.999998, 0, 380.0, 0, 1.1, 0.9 ],
[453, 1, 35.014757, 7.002951, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[454, 1, 24.428604, 4.885721, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[455, 1, 39.828783, 7.965757, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[456, 1, 39.828783, 7.965757, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[457, 1, 122.144889, 24.428978, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[458, 1, 116.175191, 23.235038, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[459, 1, 141.38953, 28.277906, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[460, 1, 185.814973, 37.162995, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[461, 1, 193.287865, 38.657573, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[462, 1, 59.12776, 11.825552, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[463, 1, 30.297434, 6.059487, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[464, 1, 30.334057, 6.066811, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[465, 1, 48.997793, 9.799559, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[466, 1, 39.780009, 7.956002, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[467, 1, 36.710361, 7.342072, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[468, 1, 60.190482, 12.038096, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[469, 1, 37.298836, 7.459767, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[470, 1, 94.98582, 18.997164, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[471, 1, 93.522105, 18.704421, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[472, 1, 32.711213, 6.542243, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[473, 1, 60.065587, 12.013117, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[474, 1, 31.023248, 6.20465, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[475, 1, 30.444615, 6.088923, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[476, 1, 34.407424, 6.881485, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[477, 1, 55.52614, 11.105228, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[478, 1, 69.750952, 13.95019, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[479, 1, 126.404216, 25.280843, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[480, 1, 55.405258, 11.081052, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[481, 1, 48.116491, 9.623298, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[482, 1, 54.634205, 10.926841, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[483, 1, 46.462388, 9.292478, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[484, 1, 36.424252, 7.28485, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[485, 1, 54.408192, 10.881638, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[486, 1, 500.528791, 100.105758, 0, 0, 0, 0.999644, 0, 220.0, 0, 1.1, 0.9 ],
[487, 1, 126.831682, 25.366336, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[488, 1, 365.459497, 73.091899, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[489, 1, 96.1879, 19.23758, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[490, 1, 29.930087, 5.986017, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[491, 1, 41.154254, 8.230851, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[492, 1, 64.176373, 12.835275, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[493, 1, 82.715663, 16.543133, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[494, 1, 113.049619, 22.609924, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[495, 1, 88.990255, 17.798051, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[496, 1, 6.303328, 1.260666, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[497, 1, 788.229231, 157.645846, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[498, 1, 36.96724, 7.393448, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[499, 1, 51.600211, 10.320042, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[500, 1, 28.250508, 5.650102, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[501, 1, 47.794989, 9.558998, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[502, 1, 188.636924, 37.727385, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[503, 1, 57.772131, 11.554426, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[504, 1, 37.831905, 7.566381, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[505, 1, 268.333226, 53.666645, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[506, 1, 84.226497, 16.845299, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[507, 1, 80.117224, 16.023445, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[508, 1, 116.472908, 23.294582, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[509, 1, 153.488191, 30.697638, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[510, 1, 96.96766, 19.393532, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[511, 1, 84.585425, 16.917085, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[512, 1, 55.873895, 11.174779, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[513, 1, 30.780554, 6.156111, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[514, 1, 76.60982, 15.321964, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[515, 1, 68.340511, 13.668102, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[516, 1, 76.45695, 15.29139, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[517, 1, 35.91366, 7.182732, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[518, 1, 202.268006, 40.453601, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[519, 1, 19.906875, 3.981375, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[520, 1, 80.37176, 16.074352, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[521, 1, 72.602992, 14.520598, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[522, 1, 62.16327, 12.432654, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[523, 1, 33.461781, 6.692356, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[524, 1, 97.122526, 19.424505, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[525, 1, 115.705825, 23.141165, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[526, 1, 35.07983, 7.015966, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[527, 1, 38.515188, 7.703038, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[528, 1, 84.063, 16.8126, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[529, 1, 107.756318, 21.551264, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[530, 1, 45.662726, 9.132545, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[531, 1, 46.426928, 9.285386, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[532, 1, 44.561758, 8.912352, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[533, 1, 39.932712, 7.986542, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[534, 1, 110.156768, 22.031354, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[535, 1, 137.909203, 27.581841, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[536, 1, 108.702172, 21.740434, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[537, 1, 36.160733, 7.232147, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[538, 1, 27.031297, 5.406259, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[539, 1, 28.681868, 5.736374, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[540, 1, 25.826762, 5.165352, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[541, 1, 66.712756, 13.342551, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[542, 1, 91.642706, 18.328541, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[543, 1, 50.054795, 10.010959, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[544, 1, 93.227759, 18.645552, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[545, 1, 200.734654, 40.146931, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[546, 1, 100.61124, 20.122248, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[547, 1, 130.046639, 26.009328, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[548, 1, 42.096635, 8.419327, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[549, 1, 35.996222, 7.199244, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[550, 1, 29.703005, 5.940601, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[551, 1, 28.63298, 5.726596, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[552, 1, 142.188155, 28.437631, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[553, 1, 0.983722, 0.196744, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[554, 1, 144.051445, 28.810289, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[555, 1, 54.885195, 10.977039, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[556, 1, 84.909223, 16.981845, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[557, 1, 180.401553, 36.080311, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[558, 1, 106.375344, 21.275069, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[559, 1, 56.93106, 11.386212, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[560, 1, 88.939784, 17.787957, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[561, 1, 48.771981, 9.754396, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[562, 1, 133.241398, 26.64828, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[563, 1, 93.679562, 18.735912, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[564, 1, 184.970556, 36.994111, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[565, 1, 139.56945, 27.91389, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[566, 1, 0.224178, 0.044836, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[567, 1, 226.8764, 45.37528, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[568, 1, 209.805777, 41.961155, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[569, 1, 147.620818, 29.524164, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[570, 1, 230.46268, 46.092536, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[571, 1, 169.684163, 33.936833, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[572, 1, 299.294532, 59.858906, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[573, 1, 87.120714, 17.424143, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[574, 1, 165.99823, 33.199646, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[575, 1, 3.119404, 0.623881, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[576, 1, 201.852734, 40.370547, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[577, 1, 222.521596, 44.504319, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[578, 1, 212.456169, 42.491234, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[579, 1, 77.509809, 15.501962, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[580, 1, 16.136389, 3.227278, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[581, 1, 0.092721, 0.018544, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[582, 1, 58.381537, 11.676307, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[583, 1, 66.961478, 13.392296, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[584, 1, 38.419289, 7.683858, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[585, 1, 66.700613, 13.340123, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ]
])
ppc["gen"] = array([
[586, 0.0, 0, 9999, -9999, 1.0, 100, 1, 272.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[589, 63.1, 0, 9999, -9999, 1.0, 100, 1, 63.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[590, 38.0, 0, 9999, -9999, 1.0, 100, 1, 38.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[593, 11.1, 0, 9999, -9999, 1.0, 100, 1, 11.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[595, 1466.614612, 0, 9999, -9999, 1.0, 100, 1, 4730.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[598, 12.0, 0, 9999, -9999, 1.0, 100, 1, 12.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[599, 9.3, 0, 9999, -9999, 1.0, 100, 1, 9.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[602, 24.6, 0, 9999, -9999, 1.0, 100, 1, 24.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[603, 1363.789945, 0, 9999, -9999, 1.0, 100, 1, 3455.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[607, 1800.0, 0, 9999, -9999, 1.0, 100, 1, 1800.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[608, 24.0, 0, 9999, -9999, 1.0, 100, 1, 24.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[609, 36.4, 0, 9999, -9999, 1.0, 100, 1, 36.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[612, 30.0, 0, 9999, -9999, 1.0, 100, 1, 30.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[614, 30.0, 0, 9999, -9999, 1.0, 100, 1, 30.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[616, 29.0, 0, 9999, -9999, 1.0, 100, 1, 29.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[617, 137.0, 0, 9999, -9999, 1.0, 100, 1, 137.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[618, 33.4, 0, 9999, -9999, 1.0, 100, 1, 33.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[619, 118.0, 0, 9999, -9999, 1.0, 100, 1, 118.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[624, 27.0, 0, 9999, -9999, 1.0, 100, 1, 27.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[629, 75.3, 0, 9999, -9999, 1.0, 100, 1, 75.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[632, 45.1, 0, 9999, -9999, 1.0, 100, 1, 45.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[637, 53.7, 0, 9999, -9999, 1.0, 100, 1, 53.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[638, 128.7, 0, 9999, -9999, 1.0, 100, 1, 128.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[640, 12.0, 0, 9999, -9999, 1.0, 100, 1, 12.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[641, 12.6, 0, 9999, -9999, 1.0, 100, 1, 12.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[642, 28.9, 0, 9999, -9999, 1.0, 100, 1, 28.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[643, 857.0, 0, 9999, -9999, 1.0, 100, 1, 857.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[647, 14.0, 0, 9999, -9999, 1.0, 100, 1, 14.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[652, 46.9, 0, 9999, -9999, 1.0, 100, 1, 46.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[655, 61.5, 0, 9999, -9999, 1.0, 100, 1, 61.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[663, 15.0, 0, 9999, -9999, 1.0, 100, 1, 15.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[666, 28.9, 0, 9999, -9999, 1.0, 100, 1, 28.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[670, 24.0, 0, 9999, -9999, 1.0, 100, 1, 24.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[672, 33.1, 0, 9999, -9999, 1.0, 100, 1, 33.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[676, 370.0, 0, 9999, -9999, 1.0, 100, 1, 370.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[681, 40.1, 0, 9999, -9999, 1.0, 100, 1, 40.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[683, 27.5, 0, 9999, -9999, 1.0, 100, 1, 27.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[687, 1329.0, 0, 9999, -9999, 1.0, 100, 1, 1329.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[694, 16.4, 0, 9999, -9999, 1.0, 100, 1, 16.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[695, 14.7, 0, 9999, -9999, 1.0, 100, 1, 14.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[697, 11.6, 0, 9999, -9999, 1.0, 100, 1, 11.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[698, 24.0, 0, 9999, -9999, 1.0, 100, 1, 24.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[702, 73.4, 0, 9999, -9999, 1.0, 100, 1, 73.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[705, 17.0, 0, 9999, -9999, 1.0, 100, 1, 17.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[707, 34.0, 0, 9999, -9999, 1.0, 100, 1, 34.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[714, 15.0, 0, 9999, -9999, 1.0, 100, 1, 15.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[716, 0.1, 0, 9999, -9999, 1.0, 100, 1, 0.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[717, 11.0, 0, 9999, -9999, 1.0, 100, 1, 11.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[722, 20.7, 0, 9999, -9999, 1.0, 100, 1, 20.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[724, 12.1, 0, 9999, -9999, 1.0, 100, 1, 12.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[730, 633.2, 0, 9999, -9999, 1.0, 100, 1, 633.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[732, 14.6, 0, 9999, -9999, 1.0, 100, 1, 14.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[735, 84.8, 0, 9999, -9999, 1.0, 100, 1, 84.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[741, 214.0, 0, 9999, -9999, 1.0, 100, 1, 214.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[742, 9.0, 0, 9999, -9999, 1.0, 100, 1, 9.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[743, 1227.688539, 0, 9999, -9999, 1.0, 100, 1, 1410.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[747, 12.5, 0, 9999, -9999, 1.0, 100, 1, 12.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[749, 16.0, 0, 9999, -9999, 1.0, 100, 1, 16.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[750, 90.8, 0, 9999, -9999, 1.0, 100, 1, 90.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[753, 311.8, 0, 9999, -9999, 1.0, 100, 1, 311.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[761, 15.7, 0, 9999, -9999, 1.0, 100, 1, 15.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[762, 1076.088882, 0, 9999, -9999, 1.0, 100, 1, 1105.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[765, 59.0, 0, 9999, -9999, 1.0, 100, 1, 59.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[767, 11.2, 0, 9999, -9999, 1.0, 100, 1, 11.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[772, 18.8, 0, 9999, -9999, 1.0, 100, 1, 18.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[774, 33.5, 0, 9999, -9999, 1.0, 100, 1, 33.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[777, 79.0, 0, 9999, -9999, 1.0, 100, 1, 79.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[778, 14.7, 0, 9999, -9999, 1.0, 100, 1, 14.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[781, 945.392426, 0, 9999, -9999, 1.0, 100, 1, 1310.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[784, 1059.960906, 0, 9999, -9999, 1.0, 100, 1, 1275.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[785, 3.0, 0, 9999, -9999, 1.0, 100, 1, 3.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[788, 700.494671, 0, 9999, -9999, 1.0, 100, 1, 875.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[789, 77.4, 0, 9999, -9999, 1.0, 100, 1, 77.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[791, 10.0, 0, 9999, -9999, 1.0, 100, 1, 10.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[792, 62.7, 0, 9999, -9999, 1.0, 100, 1, 62.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[795, 13.6, 0, 9999, -9999, 1.0, 100, 1, 13.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[800, 36.5, 0, 9999, -9999, 1.0, 100, 1, 36.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[801, 50.0, 0, 9999, -9999, 1.0, 100, 1, 50.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[802, 500.0, 0, 9999, -9999, 1.0, 100, 1, 500.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[805, 693.813273, 0, 9999, -9999, 1.0, 100, 1, 1410.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[806, 35.8, 0, 9999, -9999, 1.0, 100, 1, 35.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[808, 217.5, 0, 9999, -9999, 1.0, 100, 1, 217.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[809, 12.5, 0, 9999, -9999, 1.0, 100, 1, 12.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[811, 25.2, 0, 9999, -9999, 1.0, 100, 1, 25.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[814, 89.0, 0, 9999, -9999, 1.0, 100, 1, 89.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[816, 80.1, 0, 9999, -9999, 1.0, 100, 1, 80.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[817, 54.0, 0, 9999, -9999, 1.0, 100, 1, 54.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[821, 82.5, 0, 9999, -9999, 1.0, 100, 1, 82.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[826, 58.0, 0, 9999, -9999, 1.0, 100, 1, 58.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[834, 23.3, 0, 9999, -9999, 1.0, 100, 1, 23.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[835, 63.7, 0, 9999, -9999, 1.0, 100, 1, 63.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[836, 25.5, 0, 9999, -9999, 1.0, 100, 1, 25.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[837, 472.0, 0, 9999, -9999, 1.0, 100, 1, 472.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[839, 73.3, 0, 9999, -9999, 1.0, 100, 1, 73.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[841, 23.3, 0, 9999, -9999, 1.0, 100, 1, 23.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[843, 333.0, 0, 9999, -9999, 1.0, 100, 1, 333.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[844, 40.0, 0, 9999, -9999, 1.0, 100, 1, 40.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[850, 16.0, 0, 9999, -9999, 1.0, 100, 1, 16.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[851, 79.5, 0, 9999, -9999, 1.0, 100, 1, 79.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[853, 11.6, 0, 9999, -9999, 1.0, 100, 1, 11.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[856, 36.0, 0, 9999, -9999, 1.0, 100, 1, 36.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[857, 1402.0, 0, 9999, -9999, 1.0, 100, 1, 1402.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[858, 56.8, 0, 9999, -9999, 1.0, 100, 1, 56.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[860, 25.0, 0, 9999, -9999, 1.0, 100, 1, 25.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[865, 11.0, 0, 9999, -9999, 1.0, 100, 1, 11.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[867, 264.697826, 0, 9999, -9999, 1.0, 100, 1, 769.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[869, 1360.0, 0, 9999, -9999, 1.0, 100, 1, 1360.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[870, 58.4, 0, 9999, -9999, 1.0, 100, 1, 58.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[872, 22.5, 0, 9999, -9999, 1.0, 100, 1, 22.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[874, 20.7, 0, 9999, -9999, 1.0, 100, 1, 20.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[875, 24.4, 0, 9999, -9999, 1.0, 100, 1, 24.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[882, 17.4, 0, 9999, -9999, 1.0, 100, 1, 17.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[883, 18.0, 0, 9999, -9999, 1.0, 100, 1, 18.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[885, 34.740146, 0, 9999, -9999, 1.0, 100, 1, 490.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[886, 2572.0, 0, 9999, -9999, 1.0, 100, 1, 2572.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[889, 9.5, 0, 9999, -9999, 1.0, 100, 1, 9.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[890, 48.0, 0, 9999, -9999, 1.0, 100, 1, 48.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[893, 60.0, 0, 9999, -9999, 1.0, 100, 1, 60.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[894, 158.0, 0, 9999, -9999, 1.0, 100, 1, 158.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[895, 19.0, 0, 9999, -9999, 1.0, 100, 1, 19.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[896, 24.0, 0, 9999, -9999, 1.0, 100, 1, 24.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[898, 84.6, 0, 9999, -9999, 1.0, 100, 1, 84.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[902, 19.5, 0, 9999, -9999, 1.0, 100, 1, 19.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[903, 20.1, 0, 9999, -9999, 1.0, 100, 1, 20.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[905, 137.3, 0, 9999, -9999, 1.0, 100, 1, 137.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[906, 66.0, 0, 9999, -9999, 1.0, 100, 1, 66.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[907, 67.3, 0, 9999, -9999, 1.0, 100, 1, 67.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[909, 36.8, 0, 9999, -9999, 1.0, 100, 1, 36.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[917, 17.0, 0, 9999, -9999, 1.0, 100, 1, 17.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[918, 38.5, 0, 9999, -9999, 1.0, 100, 1, 38.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[920, 12.8, 0, 9999, -9999, 1.0, 100, 1, 12.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[921, 124.0, 0, 9999, -9999, 1.0, 100, 1, 124.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[922, 164.0, 0, 9999, -9999, 1.0, 100, 1, 164.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[923, 146.0, 0, 9999, -9999, 1.0, 100, 1, 146.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[925, 26.0, 0, 9999, -9999, 1.0, 100, 1, 26.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[931, 217.1, 0, 9999, -9999, 1.0, 100, 1, 217.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[936, 104.4, 0, 9999, -9999, 1.0, 100, 1, 104.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[937, 30.0, 0, 9999, -9999, 1.0, 100, 1, 30.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[939, 0.1, 0, 9999, -9999, 1.0, 100, 1, 0.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[940, 29.6, 0, 9999, -9999, 1.0, 100, 1, 29.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[944, 25.4, 0, 9999, -9999, 1.0, 100, 1, 25.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[950, 16.0, 0, 9999, -9999, 1.0, 100, 1, 16.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[952, 31.7, 0, 9999, -9999, 1.0, 100, 1, 31.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[958, 66.7, 0, 9999, -9999, 1.0, 100, 1, 66.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[959, 45.5, 0, 9999, -9999, 1.0, 100, 1, 45.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[960, 26.5, 0, 9999, -9999, 1.0, 100, 1, 26.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[963, 687.931579, 0, 9999, -9999, 1.0, 100, 1, 875.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[965, 352.0, 0, 9999, -9999, 1.0, 100, 1, 352.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[967, 37.5, 0, 9999, -9999, 1.0, 100, 1, 37.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[969, 56.9, 0, 9999, -9999, 0.999644, 100, 1, 56.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[971, 20.0, 0, 9999, -9999, 1.0, 100, 1, 20.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[978, 4.6, 0, 9999, -9999, 1.0, 100, 1, 4.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[982, 9.9, 0, 9999, -9999, 1.0, 100, 1, 9.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[983, 44.0, 0, 9999, -9999, 1.0, 100, 1, 44.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[984, 465.0, 0, 9999, -9999, 1.0, 100, 1, 465.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[985, 22.0, 0, 9999, -9999, 1.0, 100, 1, 22.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[986, 11.2, 0, 9999, -9999, 1.0, 100, 1, 11.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[987, 164.5, 0, 9999, -9999, 1.0, 100, 1, 164.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[988, 5.1, 0, 9999, -9999, 1.0, 100, 1, 5.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[993, 392.0, 0, 9999, -9999, 1.0, 100, 1, 392.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[994, 33.0, 0, 9999, -9999, 1.0, 100, 1, 33.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[995, 4.2, 0, 9999, -9999, 1.0, 100, 1, 4.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[997, 18.8, 0, 9999, -9999, 1.0, 100, 1, 18.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[999, 15.6, 0, 9999, -9999, 1.0, 100, 1, 15.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1002, 9.9, 0, 9999, -9999, 1.0, 100, 1, 9.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1007, 23.3, 0, 9999, -9999, 1.0, 100, 1, 23.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1010, 750.0, 0, 9999, -9999, 1.0, 100, 1, 750.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1011, 18.7, 0, 9999, -9999, 1.0, 100, 1, 18.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1012, 810.029779, 0, 9999, -9999, 1.0, 100, 1, 2835.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1014, 599.602726, 0, 9999, -9999, 1.0, 100, 1, 750.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1027, 10.460207, 0, 9999, -9999, 1.0, 100, 1, 48.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1028, 292.918282, 0, 9999, -9999, 1.0, 100, 1, 400.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1029, 27.465302, 0, 9999, -9999, 1.0, 100, 1, 60.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1030, 533.877229, 0, 9999, -9999, 1.0, 100, 1, 1018.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1031, 1002.917112, 0, 9999, -9999, 1.0, 100, 1, 1447.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1032, 79.932691, 0, 9999, -9999, 1.0, 100, 1, 153.510391, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1033, 20.55676, 0, 9999, -9999, 1.0, 100, 1, 50.164506, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1034, 36.699953, 0, 9999, -9999, 1.0, 100, 1, 84.262779, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1035, 35.271451, 0, 9999, -9999, 1.0, 100, 1, 49.886469, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1036, 46.753001, 0, 9999, -9999, 1.0, 100, 1, 67.223077, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1037, 40.25786, 0, 9999, -9999, 1.0, 100, 1, 94.684044, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1038, 37.755525, 0, 9999, -9999, 1.0, 100, 1, 85.798525, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1039, 101.893155, 0, 9999, -9999, 1.0, 100, 1, 132.724114, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1040, 0.018424, 0, 9999, -9999, 1.0, 100, 1, 0.064179, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1041, 153.223357, 0, 9999, -9999, 1.0, 100, 1, 204.187624, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1042, 40.87186, 0, 9999, -9999, 1.0, 100, 1, 52.70053, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1043, 1.823835, 0, 9999, -9999, 1.0, 100, 1, 6.035538, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1044, 11.076386, 0, 9999, -9999, 1.0, 100, 1, 36.163532, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1045, 12.693234, 0, 9999, -9999, 1.0, 100, 1, 61.836204, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1046, 18.636555, 0, 9999, -9999, 1.0, 100, 1, 106.787063, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1047, 2.990521, 0, 9999, -9999, 1.0, 100, 1, 13.029581, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1048, 13.95159, 0, 9999, -9999, 1.0, 100, 1, 71.656883, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1049, 198.425639, 0, 9999, -9999, 1.0, 100, 1, 293.755375, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1050, 39.486108, 0, 9999, -9999, 1.0, 100, 1, 52.781606, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1051, 285.38149, 0, 9999, -9999, 1.0, 100, 1, 304.42978, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1052, 5.143615, 0, 9999, -9999, 1.0, 100, 1, 20.66869, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1053, 4.192271, 0, 9999, -9999, 1.0, 100, 1, 16.368087, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1054, 65.843261, 0, 9999, -9999, 1.0, 100, 1, 273.855776, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1055, 2.569306, 0, 9999, -9999, 1.0, 100, 1, 2.856069, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1056, 432.936564, 0, 9999, -9999, 1.0, 100, 1, 603.943953, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1057, 130.808026, 0, 9999, -9999, 1.0, 100, 1, 426.979979, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1058, 549.489833, 0, 9999, -9999, 1.0, 100, 1, 1055.735174, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1059, 360.823263, 0, 9999, -9999, 1.0, 100, 1, 414.871332, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1060, 9.16295, 0, 9999, -9999, 1.0, 100, 1, 10.351632, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1061, 154.755519, 0, 9999, -9999, 1.0, 100, 1, 161.862597, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1062, 2.358253, 0, 9999, -9999, 1.0, 100, 1, 2.878561, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1063, 6.654734, 0, 9999, -9999, 1.0, 100, 1, 8.670916, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1064, 154.89402, 0, 9999, -9999, 1.0, 100, 1, 209.786524, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1065, 250.621857, 0, 9999, -9999, 1.0, 100, 1, 339.421643, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1066, 68.904322, 0, 9999, -9999, 1.0, 100, 1, 134.399019, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1067, 6.260048, 0, 9999, -9999, 1.0, 100, 1, 32.653526, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1068, 2.977816, 0, 9999, -9999, 1.0, 100, 1, 5.009022, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1069, 1.620267, 0, 9999, -9999, 1.0, 100, 1, 3.190759, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1070, 0.473903, 0, 9999, -9999, 1.0, 100, 1, 0.788599, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1071, 2.394921, 0, 9999, -9999, 1.0, 100, 1, 4.328696, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1072, 36.154158, 0, 9999, -9999, 1.0, 100, 1, 112.606433, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1073, 20.275153, 0, 9999, -9999, 1.0, 100, 1, 77.81765, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1074, 48.536291, 0, 9999, -9999, 1.0, 100, 1, 153.592986, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1075, 8.668695, 0, 9999, -9999, 1.0, 100, 1, 15.783448, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1076, 0.719805, 0, 9999, -9999, 1.0, 100, 1, 2.29551, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1077, 18.059078, 0, 9999, -9999, 1.0, 100, 1, 26.120041, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1078, 14.921952, 0, 9999, -9999, 1.0, 100, 1, 34.413246, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1079, 22.955211, 0, 9999, -9999, 1.0, 100, 1, 72.327992, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1080, 44.741318, 0, 9999, -9999, 1.0, 100, 1, 132.149983, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1081, 388.316194, 0, 9999, -9999, 1.0, 100, 1, 405.642115, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1082, 485.516098, 0, 9999, -9999, 1.0, 100, 1, 510.054159, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1083, 613.766095, 0, 9999, -9999, 1.0, 100, 1, 633.681488, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1084, 522.770891, 0, 9999, -9999, 1.0, 100, 1, 602.719371, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1085, 37.272877, 0, 9999, -9999, 1.0, 100, 1, 113.714399, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1086, 69.300753, 0, 9999, -9999, 1.0, 100, 1, 225.59917, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1087, 107.585832, 0, 9999, -9999, 1.0, 100, 1, 116.66597, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1088, 35.327353, 0, 9999, -9999, 1.0, 100, 1, 36.782492, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1089, 297.558685, 0, 9999, -9999, 1.0, 100, 1, 384.449592, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1090, 23.576709, 0, 9999, -9999, 1.0, 100, 1, 89.140897, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1091, 7.850455, 0, 9999, -9999, 1.0, 100, 1, 45.7939, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1092, 5.88887, 0, 9999, -9999, 1.0, 100, 1, 54.002032, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1093, 10.655098, 0, 9999, -9999, 1.0, 100, 1, 155.605298, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1096, 7.860251, 0, 9999, -9999, 1.0, 100, 1, 84.50612, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1097, 0.394111, 0, 9999, -9999, 1.0, 100, 1, 4.601122, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1098, 9.296361, 0, 9999, -9999, 1.0, 100, 1, 71.025499, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1099, 54.610258, 0, 9999, -9999, 1.0, 100, 1, 290.937198, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1100, 0.003509, 0, 9999, -9999, 1.0, 100, 1, 0.026696, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1101, 24.535269, 0, 9999, -9999, 1.0, 100, 1, 83.930665, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1102, 117.607859, 0, 9999, -9999, 1.0, 100, 1, 350.979988, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1103, 93.242905, 0, 9999, -9999, 1.0, 100, 1, 245.381701, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1105, 0.002734, 0, 9999, -9999, 1.0, 100, 1, 2.178593, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1106, 0.001842, 0, 9999, -9999, 1.0, 100, 1, 2.289793, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1107, 7.627584, 0, 9999, -9999, 1.0, 100, 1, 76.221615, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1108, 84.395325, 0, 9999, -9999, 1.0, 100, 1, 320.422751, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1109, 0.005786, 0, 9999, -9999, 1.0, 100, 1, 0.77821, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1110, 0.001346, 0, 9999, -9999, 1.0, 100, 1, 1.654557, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1111, 11.638705, 0, 9999, -9999, 1.0, 100, 1, 89.637993, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1113, 0.000435, 0, 9999, -9999, 1.0, 100, 1, 3.536361, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1114, 2.594751, 0, 9999, -9999, 1.0, 100, 1, 13.446889, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1115, 0.024181, 0, 9999, -9999, 1.0, 100, 1, 50.575278, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1116, 0.003557, 0, 9999, -9999, 1.0, 100, 1, 32.601142, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1117, 1.0211, 0, 9999, -9999, 1.0, 100, 1, 90.792541, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1118, 0.126568, 0, 9999, -9999, 1.0, 100, 1, 8.725012, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1119, 0.06487, 0, 9999, -9999, 1.0, 100, 1, 43.254023, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1120, 0.003805, 0, 9999, -9999, 1.0, 100, 1, 2.416001, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1121, 0.000463, 0, 9999, -9999, 1.0, 100, 1, 0.540589, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1122, 0.001107, 0, 9999, -9999, 1.0, 100, 1, 1.462883, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1123, 0.000619, 0, 9999, -9999, 1.0, 100, 1, 1.464336, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1124, 0.001002, 0, 9999, -9999, 1.0, 100, 1, 1.288283, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1125, 0.961999, 0, 9999, -9999, 1.0, 100, 1, 25.818899, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1126, 1.24405, 0, 9999, -9999, 1.0, 100, 1, 29.154893, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1127, 0.204465, 0, 9999, -9999, 1.0, 100, 1, 105.296621, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1128, 0.003399, 0, 9999, -9999, 1.0, 100, 1, 3.06139, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1129, 0.004899, 0, 9999, -9999, 1.0, 100, 1, 4.738747, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1130, 0.00018, 0, 9999, -9999, 1.0, 100, 1, 1.025754, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1131, 0.002931, 0, 9999, -9999, 1.0, 100, 1, 2.897078, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1133, 0.000617, 0, 9999, -9999, 1.0, 100, 1, 0.719597, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1134, 0.000436, 0, 9999, -9999, 1.0, 100, 1, 0.508453, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1135, 0.027822, 0, 9999, -9999, 1.0, 100, 1, 8.117819, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1136, 0.000284, 0, 9999, -9999, 1.0, 100, 1, 0.4027, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1137, 0.098149, 0, 9999, -9999, 1.0, 100, 1, 3.669012, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1138, 0.002053, 0, 9999, -9999, 1.0, 100, 1, 1.254278, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1139, 0.000241, 0, 9999, -9999, 1.0, 100, 1, 19.822769, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1140, 4.49627, 0, 9999, -9999, 1.0, 100, 1, 28.389457, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1142, 0.00236, 0, 9999, -9999, 1.0, 100, 1, 1.215733, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1143, 0.502306, 0, 9999, -9999, 1.0, 100, 1, 25.239356, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1144, 0.030776, 0, 9999, -9999, 1.0, 100, 1, 52.527382, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1145, 40.324835, 0, 9999, -9999, 1.0, 100, 1, 175.889627, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1146, 0.000738, 0, 9999, -9999, 1.0, 100, 1, 0.861317, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1147, 0.011916, 0, 9999, -9999, 1.0, 100, 1, 45.703707, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1148, 0.651323, 0, 9999, -9999, 1.0, 100, 1, 17.645529, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1149, 0.135893, 0, 9999, -9999, 1.0, 100, 1, 8.556784, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1150, 0.021433, 0, 9999, -9999, 1.0, 100, 1, 3.62256, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1151, 0.019427, 0, 9999, -9999, 1.0, 100, 1, 13.036113, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1152, 0.00013, 0, 9999, -9999, 1.0, 100, 1, 0.116518, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1155, 0.000865, 0, 9999, -9999, 1.0, 100, 1, 0.609451, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1157, 0.006459, 0, 9999, -9999, 1.0, 100, 1, 4.354147, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1160, 61.129181, 0, 9999, -9999, 1.0, 100, 1, 238.377761, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1161, 2.896951, 0, 9999, -9999, 1.0, 100, 1, 25.263391, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1162, 273.439171, 0, 9999, -9999, 1.0, 100, 1, 502.409178, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1163, 206.24686, 0, 9999, -9999, 1.0, 100, 1, 330.03194, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1164, 143.533861, 0, 9999, -9999, 1.0, 100, 1, 285.625412, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1165, 29.685091, 0, 9999, -9999, 1.0, 100, 1, 57.188579, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1166, 32.175395, 0, 9999, -9999, 1.0, 100, 1, 83.277163, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1168, 0.000743, 0, 9999, -9999, 1.0, 100, 1, 1.345774, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1169, 0.003458, 0, 9999, -9999, 1.0, 100, 1, 2.721845, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1171, 1.967453, 0, 9999, -9999, 1.0, 100, 1, 9.029885, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1172, 0.631482, 0, 9999, -9999, 1.0, 100, 1, 3.584043, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1173, 82.749143, 0, 9999, -9999, 1.0, 100, 1, 254.253327, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1175, 0.000868, 0, 9999, -9999, 1.0, 100, 1, 0.855454, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1176, 0.000324, 0, 9999, -9999, 1.0, 100, 1, 0.23222, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1177, 0.126674, 0, 9999, -9999, 1.0, 100, 1, 27.87401, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1178, 0.165025, 0, 9999, -9999, 1.0, 100, 1, 3.167999, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1179, 0.011629, 0, 9999, -9999, 1.0, 100, 1, 1.306293, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1181, 13.535858, 0, 9999, -9999, 1.0, 100, 1, 85.739557, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1182, 8.79188, 0, 9999, -9999, 1.0, 100, 1, 99.319579, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1183, 0.981738, 0, 9999, -9999, 1.0, 100, 1, 38.222575, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1184, 0.008347, 0, 9999, -9999, 1.0, 100, 1, 4.219005, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1186, 3.535988, 0, 9999, -9999, 1.0, 100, 1, 38.916368, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1187, 0.27759, 0, 9999, -9999, 1.0, 100, 1, 9.814574, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1188, 56.68999, 0, 9999, -9999, 1.0, 100, 1, 179.712741, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1189, 8.957888, 0, 9999, -9999, 1.0, 100, 1, 20.261805, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1190, 210.457608, 0, 9999, -9999, 1.0, 100, 1, 220.533673, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1191, 70.653669, 0, 9999, -9999, 1.0, 100, 1, 73.079413, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1192, 8.195868, 0, 9999, -9999, 1.0, 100, 1, 21.454569, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1193, 0.865781, 0, 9999, -9999, 1.0, 100, 1, 2.399953, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1194, 3.340189, 0, 9999, -9999, 1.0, 100, 1, 8.986036, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1195, 0.071729, 0, 9999, -9999, 1.0, 100, 1, 0.202359, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1196, 49.815385, 0, 9999, -9999, 1.0, 100, 1, 160.697956, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1197, 26.370587, 0, 9999, -9999, 1.0, 100, 1, 90.592266, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1198, 8.079646, 0, 9999, -9999, 1.0, 100, 1, 39.819157, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1199, 43.056892, 0, 9999, -9999, 1.0, 100, 1, 201.421956, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1200, 11.02043, 0, 9999, -9999, 1.0, 100, 1, 56.012408, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1201, 17.382661, 0, 9999, -9999, 1.0, 100, 1, 25.166667, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1202, 20.92899, 0, 9999, -9999, 1.0, 100, 1, 49.89238, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1203, 143.537583, 0, 9999, -9999, 1.0, 100, 1, 182.623256, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1204, 23.95278, 0, 9999, -9999, 1.0, 100, 1, 47.541821, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1205, 0.219444, 0, 9999, -9999, 1.0, 100, 1, 0.548843, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1206, 1.467907, 0, 9999, -9999, 1.0, 100, 1, 3.806894, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1207, 1.289842, 0, 9999, -9999, 1.0, 100, 1, 3.575453, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1208, 1.785392, 0, 9999, -9999, 1.0, 100, 1, 2.242031, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1209, 0.039688, 0, 9999, -9999, 1.0, 100, 1, 1.268261, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1210, 0.579627, 0, 9999, -9999, 1.0, 100, 1, 9.02599, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1211, 13.976304, 0, 9999, -9999, 1.0, 100, 1, 18.005229, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1212, 74.870478, 0, 9999, -9999, 1.0, 100, 1, 91.171888, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1213, 46.121501, 0, 9999, -9999, 1.0, 100, 1, 57.342704, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1214, 2.447531, 0, 9999, -9999, 1.0, 100, 1, 4.505907, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1215, 0.708893, 0, 9999, -9999, 1.0, 100, 1, 2.252965, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1216, 16.428571, 0, 9999, -9999, 1.0, 100, 1, 67.754469, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1217, 32.069234, 0, 9999, -9999, 1.0, 100, 1, 35.871617, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1218, 0.793403, 0, 9999, -9999, 1.0, 100, 1, 0.980482, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1219, 0.548688, 0, 9999, -9999, 1.0, 100, 1, 12.33953, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1220, 2.817267, 0, 9999, -9999, 1.0, 100, 1, 30.597849, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1221, 292.553779, 0, 9999, -9999, 1.0, 100, 1, 593.230436, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1222, 166.288529, 0, 9999, -9999, 1.0, 100, 1, 211.057769, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1223, 3.615447, 0, 9999, -9999, 1.0, 100, 1, 3.806101, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1224, 54.949188, 0, 9999, -9999, 1.0, 100, 1, 160.523778, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1225, 21.684328, 0, 9999, -9999, 1.0, 100, 1, 34.931481, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1226, 1.849094, 0, 9999, -9999, 1.0, 100, 1, 3.982858, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1227, 9.902281, 0, 9999, -9999, 1.0, 100, 1, 17.482807, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1228, 0.730895, 0, 9999, -9999, 1.0, 100, 1, 3.021367, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1229, 9.347805, 0, 9999, -9999, 1.0, 100, 1, 51.244222, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1230, 0.238773, 0, 9999, -9999, 1.0, 100, 1, 1.681276, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1231, 4.366652, 0, 9999, -9999, 1.0, 100, 1, 33.55478, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1232, 11.333033, 0, 9999, -9999, 1.0, 100, 1, 75.075088, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1233, 150.178408, 0, 9999, -9999, 1.0, 100, 1, 575.36828, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1235, 2.638187, 0, 9999, -9999, 1.0, 100, 1, 9.03734, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1236, 22.763423, 0, 9999, -9999, 1.0, 100, 1, 82.225035, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1237, 2.778775, 0, 9999, -9999, 1.0, 100, 1, 14.605409, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1238, 72.798024, 0, 9999, -9999, 1.0, 100, 1, 188.691049, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1239, 0.564342, 0, 9999, -9999, 1.0, 100, 1, 2.267706, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1240, 241.248703, 0, 9999, -9999, 1.0, 100, 1, 339.51051, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1241, 364.295435, 0, 9999, -9999, 1.0, 100, 1, 385.361595, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1242, 4.834243, 0, 9999, -9999, 1.0, 100, 1, 27.074038, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1243, 37.302558, 0, 9999, -9999, 1.0, 100, 1, 83.079842, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1244, 79.039372, 0, 9999, -9999, 1.0, 100, 1, 323.472536, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1245, 2.700683, 0, 9999, -9999, 1.0, 100, 1, 8.080896, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1246, 11.614519, 0, 9999, -9999, 1.0, 100, 1, 57.127825, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1247, 4.672328, 0, 9999, -9999, 1.0, 100, 1, 21.833396, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1248, 11.023432, 0, 9999, -9999, 1.0, 100, 1, 91.958275, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1249, 65.703041, 0, 9999, -9999, 1.0, 100, 1, 76.135177, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1250, 28.580821, 0, 9999, -9999, 1.0, 100, 1, 30.830519, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1251, 21.224131, 0, 9999, -9999, 1.0, 100, 1, 23.404345, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1252, 14.138152, 0, 9999, -9999, 1.0, 100, 1, 14.887727, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1253, 50.455721, 0, 9999, -9999, 1.0, 100, 1, 64.502694, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1254, 28.780508, 0, 9999, -9999, 1.0, 100, 1, 82.278695, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1255, 3.003121, 0, 9999, -9999, 1.0, 100, 1, 3.818419, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1256, 12.275602, 0, 9999, -9999, 1.0, 100, 1, 15.091842, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1257, 65.168323, 0, 9999, -9999, 1.0, 100, 1, 88.95288, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1258, 68.145193, 0, 9999, -9999, 1.0, 100, 1, 235.487329, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1259, 85.172922, 0, 9999, -9999, 1.0, 100, 1, 109.288719, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1260, 6.875991, 0, 9999, -9999, 1.0, 100, 1, 20.168717, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1261, 173.495737, 0, 9999, -9999, 1.0, 100, 1, 201.699555, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1262, 0.309635, 0, 9999, -9999, 1.0, 100, 1, 0.524108, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1263, 0.24441, 0, 9999, -9999, 1.0, 100, 1, 0.352421, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1264, 64.013359, 0, 9999, -9999, 1.0, 100, 1, 82.035361, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1265, 4.784966, 0, 9999, -9999, 1.0, 100, 1, 6.654727, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1266, 103.17248, 0, 9999, -9999, 1.0, 100, 1, 119.710849, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1267, 38.430186, 0, 9999, -9999, 1.0, 100, 1, 39.469006, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1268, 2.034979, 0, 9999, -9999, 1.0, 100, 1, 3.4295, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1269, 2.322702, 0, 9999, -9999, 1.0, 100, 1, 5.105829, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1270, 25.03907, 0, 9999, -9999, 1.0, 100, 1, 38.950511, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1271, 23.845798, 0, 9999, -9999, 1.0, 100, 1, 47.371792, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1272, 0.422069, 0, 9999, -9999, 1.0, 100, 1, 1.23166, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1273, 0.244404, 0, 9999, -9999, 1.0, 100, 1, 2.169201, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1274, 50.377516, 0, 9999, -9999, 1.0, 100, 1, 53.095629, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1275, 87.392367, 0, 9999, -9999, 1.0, 100, 1, 99.0753, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1276, 24.185119, 0, 9999, -9999, 1.0, 100, 1, 25.655641, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1277, 52.100619, 0, 9999, -9999, 1.0, 100, 1, 65.611252, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1278, 146.059023, 0, 9999, -9999, 1.0, 100, 1, 170.437781, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1279, 0.000154, 0, 9999, -9999, 1.0, 100, 1, 0.004344, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1280, 0.06616, 0, 9999, -9999, 1.0, 100, 1, 0.626494, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1281, 0.401488, 0, 9999, -9999, 1.0, 100, 1, 2.51246, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1282, 0.613544, 0, 9999, -9999, 1.0, 100, 1, 4.363037, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1283, 402.284475, 0, 9999, -9999, 1.0, 100, 1, 1297.764428, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1284, 16.498159, 0, 9999, -9999, 1.0, 100, 1, 28.426322, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1285, 0.402632, 0, 9999, -9999, 1.0, 100, 1, 2.937048, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1286, 9.779237, 0, 9999, -9999, 1.0, 100, 1, 17.872201, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1287, 90.378036, 0, 9999, -9999, 1.0, 100, 1, 93.199628, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1288, 144.534188, 0, 9999, -9999, 1.0, 100, 1, 148.402692, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1289, 165.62078, 0, 9999, -9999, 1.0, 100, 1, 184.149235, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1290, 3.310598, 0, 9999, -9999, 1.0, 100, 1, 4.901974, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1291, 91.035472, 0, 9999, -9999, 1.0, 100, 1, 98.293351, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1292, 31.980176, 0, 9999, -9999, 1.0, 100, 1, 41.682074, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1293, 2.251511, 0, 9999, -9999, 1.0, 100, 1, 2.402107, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1294, 4.500984, 0, 9999, -9999, 1.0, 100, 1, 5.39743, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1295, 5.035929, 0, 9999, -9999, 1.0, 100, 1, 5.873666, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1296, 6.542922, 0, 9999, -9999, 1.0, 100, 1, 27.356489, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1297, 69.476429, 0, 9999, -9999, 1.0, 100, 1, 177.778742, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1298, 0.892933, 0, 9999, -9999, 1.0, 100, 1, 4.014603, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1299, 0.650887, 0, 9999, -9999, 1.0, 100, 1, 2.158207, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1300, 10.924264, 0, 9999, -9999, 1.0, 100, 1, 23.74405, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1301, 29.938353, 0, 9999, -9999, 1.0, 100, 1, 60.863304, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1302, 3.756946, 0, 9999, -9999, 1.0, 100, 1, 4.877299, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1303, 3.548349, 0, 9999, -9999, 1.0, 100, 1, 4.335516, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1304, 6.98833, 0, 9999, -9999, 1.0, 100, 1, 9.594319, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1305, 0.004134, 0, 9999, -9999, 1.0, 100, 1, 0.004567, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1306, 0.013051, 0, 9999, -9999, 1.0, 100, 1, 1.827014, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1307, 0.000269, 0, 9999, -9999, 1.0, 100, 1, 0.29894, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1308, 3.092704, 0, 9999, -9999, 1.0, 100, 1, 3.278321, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1309, 1.952844, 0, 9999, -9999, 1.0, 100, 1, 3.34909, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1310, 0.96121, 0, 9999, -9999, 1.0, 100, 1, 1.64589, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1311, 0.915033, 0, 9999, -9999, 1.0, 100, 1, 11.854004, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1312, 61.692105, 0, 9999, -9999, 1.0, 100, 1, 262.264924, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1313, 23.4633, 0, 9999, -9999, 1.0, 100, 1, 30.836748, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1314, 9.723847, 0, 9999, -9999, 1.0, 100, 1, 12.003987, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1315, 7.484353, 0, 9999, -9999, 1.0, 100, 1, 7.879027, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1316, 0.342208, 0, 9999, -9999, 1.0, 100, 1, 2.757497, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1317, 2.443039, 0, 9999, -9999, 1.0, 100, 1, 23.958574, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1318, 1.145435, 0, 9999, -9999, 1.0, 100, 1, 1.956332, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1319, 5.754202, 0, 9999, -9999, 1.0, 100, 1, 17.708276, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1320, 10.408423, 0, 9999, -9999, 1.0, 100, 1, 20.75859, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1321, 0.058081, 0, 9999, -9999, 1.0, 100, 1, 0.161123, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1322, 0.553533, 0, 9999, -9999, 1.0, 100, 1, 0.929763, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1323, 111.607065, 0, 9999, -9999, 1.0, 100, 1, 199.111909, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1324, 7.765494, 0, 9999, -9999, 1.0, 100, 1, 13.063258, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1325, 55.916254, 0, 9999, -9999, 1.0, 100, 1, 90.497559, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1326, 15.960037, 0, 9999, -9999, 1.0, 100, 1, 56.928865, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1327, 14.515435, 0, 9999, -9999, 1.0, 100, 1, 50.796895, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1328, 4.734532, 0, 9999, -9999, 1.0, 100, 1, 16.063343, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1329, 189.523369, 0, 9999, -9999, 1.0, 100, 1, 218.675424, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1330, 19.894995, 0, 9999, -9999, 1.0, 100, 1, 30.131028, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1332, 16.042068, 0, 9999, -9999, 1.0, 100, 1, 26.293088, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1333, 36.231617, 0, 9999, -9999, 1.0, 100, 1, 45.650254, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1334, 0.134934, 0, 9999, -9999, 1.0, 100, 1, 1.215341, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1335, 2.182146, 0, 9999, -9999, 1.0, 100, 1, 3.306939, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1336, 25.507951, 0, 9999, -9999, 1.0, 100, 1, 29.773035, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1337, 17.701639, 0, 9999, -9999, 1.0, 100, 1, 121.31241, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1338, 0.295098, 0, 9999, -9999, 1.0, 100, 1, 0.832524, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1339, 2.095095, 0, 9999, -9999, 1.0, 100, 1, 10.086482, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1340, 9.678742, 0, 9999, -9999, 1.0, 100, 1, 70.098327, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1341, 32.05516, 0, 9999, -9999, 1.0, 100, 1, 205.513321, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1342, 0.019287, 0, 9999, -9999, 1.0, 100, 1, 0.734589, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1343, 0.027263, 0, 9999, -9999, 1.0, 100, 1, 1.102108, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1344, 0.080101, 0, 9999, -9999, 1.0, 100, 1, 0.226057, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1345, 2.810638, 0, 9999, -9999, 1.0, 100, 1, 3.971188, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1346, 78.824561, 0, 9999, -9999, 1.0, 100, 1, 214.719215, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1347, 115.323366, 0, 9999, -9999, 1.0, 100, 1, 414.115976, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1348, 4.836222, 0, 9999, -9999, 1.0, 100, 1, 22.707927, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1349, 8.174869, 0, 9999, -9999, 1.0, 100, 1, 42.352342, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1350, 0.009739, 0, 9999, -9999, 1.0, 100, 1, 0.094971, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1351, 0.000376, 0, 9999, -9999, 1.0, 100, 1, 0.015958, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1352, 0.034671, 0, 9999, -9999, 1.0, 100, 1, 0.83726, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1355, 0.989078, 0, 9999, -9999, 1.0, 100, 1, 1.688324, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1356, 57.296262, 0, 9999, -9999, 1.0, 100, 1, 73.486231, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1357, 39.855184, 0, 9999, -9999, 1.0, 100, 1, 56.459913, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1358, 0.144939, 0, 9999, -9999, 1.0, 100, 1, 0.247293, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1359, 64.298242, 0, 9999, -9999, 1.0, 100, 1, 70.633589, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1363, 0.004007, 0, 9999, -9999, 1.0, 100, 1, 0.036158, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1364, 0.008183, 0, 9999, -9999, 1.0, 100, 1, 0.061068, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1365, 6.2e-05, 0, 9999, -9999, 1.0, 100, 1, 0.000456, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1366, 1.0371, 0, 9999, -9999, 1.0, 100, 1, 1.229992, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1367, 8.708215, 0, 9999, -9999, 1.0, 100, 1, 43.863891, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1368, 0.162393, 0, 9999, -9999, 1.0, 100, 1, 3.298243, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1369, 4.676329, 0, 9999, -9999, 1.0, 100, 1, 7.968859, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1370, 0.206453, 0, 9999, -9999, 1.0, 100, 1, 0.343308, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1371, 15.125702, 0, 9999, -9999, 1.0, 100, 1, 81.767208, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1372, 187.012409, 0, 9999, -9999, 1.0, 100, 1, 192.966588, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1373, 34.669274, 0, 9999, -9999, 1.0, 100, 1, 35.200257, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1374, 22.833303, 0, 9999, -9999, 1.0, 100, 1, 108.220146, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1375, 13.048539, 0, 9999, -9999, 1.0, 100, 1, 61.223816, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1376, 16.260883, 0, 9999, -9999, 1.0, 100, 1, 176.213655, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1377, 91.898696, 0, 9999, -9999, 1.0, 100, 1, 234.376272, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1378, 100.492585, 0, 9999, -9999, 1.0, 100, 1, 246.029906, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1379, 0.001688, 0, 9999, -9999, 1.0, 100, 1, 0.805984, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1381, 0.003024, 0, 9999, -9999, 1.0, 100, 1, 1.01257, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1382, 60.392773, 0, 9999, -9999, 1.0, 100, 1, 138.839906, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1383, 21.830255, 0, 9999, -9999, 1.0, 100, 1, 109.821439, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1387, 0.003612, 0, 9999, -9999, 1.0, 100, 1, 3.493561, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1390, 0.003859, 0, 9999, -9999, 1.0, 100, 1, 3.732816, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1391, 0.003146, 0, 9999, -9999, 1.0, 100, 1, 0.521719, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1393, 0.000486, 0, 9999, -9999, 1.0, 100, 1, 1.376509, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1394, 0.000481, 0, 9999, -9999, 1.0, 100, 1, 1.077886, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1395, 0.000515, 0, 9999, -9999, 1.0, 100, 1, 0.073776, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1396, 0.000342, 0, 9999, -9999, 1.0, 100, 1, 0.026112, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1397, 0.017188, 0, 9999, -9999, 1.0, 100, 1, 25.084545, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1398, 0.002611, 0, 9999, -9999, 1.0, 100, 1, 2.779641, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1399, 0.888247, 0, 9999, -9999, 1.0, 100, 1, 17.868157, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1400, 0.000449, 0, 9999, -9999, 1.0, 100, 1, 1.297197, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1401, 9.673835, 0, 9999, -9999, 1.0, 100, 1, 89.339497, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1402, 1.995463, 0, 9999, -9999, 1.0, 100, 1, 26.328902, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1403, 53.765488, 0, 9999, -9999, 1.0, 100, 1, 119.651672, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1404, 51.552063, 0, 9999, -9999, 1.0, 100, 1, 134.800518, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1405, 3.911245, 0, 9999, -9999, 1.0, 100, 1, 29.550802, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1406, 1.823208, 0, 9999, -9999, 1.0, 100, 1, 10.763987, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1407, 0.020768, 0, 9999, -9999, 1.0, 100, 1, 0.211614, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1408, 27.750555, 0, 9999, -9999, 1.0, 100, 1, 41.078698, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1409, 6.125989, 0, 9999, -9999, 1.0, 100, 1, 12.019786, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1410, 16.580102, 0, 9999, -9999, 1.0, 100, 1, 37.466518, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1411, 29.991893, 0, 9999, -9999, 1.0, 100, 1, 39.395367, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1412, 1.247754, 0, 9999, -9999, 1.0, 100, 1, 5.987601, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1413, 1.161805, 0, 9999, -9999, 1.0, 100, 1, 5.679791, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1414, 7.260981, 0, 9999, -9999, 1.0, 100, 1, 25.992489, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1415, 1.902862, 0, 9999, -9999, 1.0, 100, 1, 7.454501, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1416, 1.697076, 0, 9999, -9999, 1.0, 100, 1, 7.958002, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1417, 0.000225, 0, 9999, -9999, 1.0, 100, 1, 0.001311, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1418, 31.771568, 0, 9999, -9999, 1.0, 100, 1, 88.264613, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1419, 13.601182, 0, 9999, -9999, 1.0, 100, 1, 33.260903, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1420, 1.057952, 0, 9999, -9999, 1.0, 100, 1, 1.399757, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1421, 4.889225, 0, 9999, -9999, 0.999644, 100, 1, 6.972369, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1422, 3.591055, 0, 9999, -9999, 1.0, 100, 1, 4.730495, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1423, 1.379632, 0, 9999, -9999, 1.0, 100, 1, 1.931017, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1424, 52.568259, 0, 9999, -9999, 1.0, 100, 1, 219.092115, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1425, 7.570898, 0, 9999, -9999, 1.0, 100, 1, 21.366402, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1426, 53.646053, 0, 9999, -9999, 1.0, 100, 1, 68.762602, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1427, 426.696884, 0, 9999, -9999, 1.0, 100, 1, 480.698671, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1428, 229.292533, 0, 9999, -9999, 1.0, 100, 1, 334.885743, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1429, 4.000522, 0, 9999, -9999, 1.0, 100, 1, 13.279826, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1430, 0.00361, 0, 9999, -9999, 1.0, 100, 1, 0.034248, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1431, 82.661441, 0, 9999, -9999, 1.0, 100, 1, 227.662022, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1432, 3.068396, 0, 9999, -9999, 1.0, 100, 1, 12.058931, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1433, 353.343587, 0, 9999, -9999, 1.0, 100, 1, 1289.241188, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1434, 12.901546, 0, 9999, -9999, 1.0, 100, 1, 99.440014, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1435, 16.366899, 0, 9999, -9999, 1.0, 100, 1, 86.713217, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1436, 25.427054, 0, 9999, -9999, 1.0, 100, 1, 98.434116, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1437, 233.567574, 0, 9999, -9999, 1.0, 100, 1, 238.321958, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1438, 303.313525, 0, 9999, -9999, 1.0, 100, 1, 392.815158, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1439, 27.439294, 0, 9999, -9999, 1.0, 100, 1, 99.103164, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1440, 0.682349, 0, 9999, -9999, 1.0, 100, 1, 0.833609, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1441, 0.102576, 0, 9999, -9999, 1.0, 100, 1, 0.171578, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1442, 0.287662, 0, 9999, -9999, 1.0, 100, 1, 0.715522, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1443, 24.01603, 0, 9999, -9999, 1.0, 100, 1, 103.005076, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1444, 5.78705, 0, 9999, -9999, 1.0, 100, 1, 8.981696, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1445, 8.939839, 0, 9999, -9999, 1.0, 100, 1, 25.036799, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1446, 665.560328, 0, 9999, -9999, 1.0, 100, 1, 758.547933, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1447, 71.232954, 0, 9999, -9999, 1.0, 100, 1, 89.477411, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1448, 0.635617, 0, 9999, -9999, 1.0, 100, 1, 7.523578, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1449, 4.007945, 0, 9999, -9999, 1.0, 100, 1, 95.437673, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1450, 11.695201, 0, 9999, -9999, 1.0, 100, 1, 59.256809, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1451, 11.056834, 0, 9999, -9999, 1.0, 100, 1, 68.198838, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1452, 2.209088, 0, 9999, -9999, 1.0, 100, 1, 24.068921, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1453, 62.829218, 0, 9999, -9999, 1.0, 100, 1, 64.93775, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1454, 103.053623, 0, 9999, -9999, 1.0, 100, 1, 155.126607, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1455, 0.000929, 0, 9999, -9999, 1.0, 100, 1, 0.654438, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1456, 0.807723, 0, 9999, -9999, 1.0, 100, 1, 50.054822, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1459, 0.001899, 0, 9999, -9999, 1.0, 100, 1, 5.309059, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1460, 8.582365, 0, 9999, -9999, 1.0, 100, 1, 101.498473, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1461, 0.00048, 0, 9999, -9999, 1.0, 100, 1, 17.951737, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1463, 0.000661, 0, 9999, -9999, 1.0, 100, 1, 0.711207, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1464, 103.699065, 0, 9999, -9999, 1.0, 100, 1, 218.884211, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1466, 0.008472, 0, 9999, -9999, 1.0, 100, 1, 5.685017, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1467, 0.01035, 0, 9999, -9999, 1.0, 100, 1, 2.096155, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1468, 0.015871, 0, 9999, -9999, 1.0, 100, 1, 23.789171, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1469, 9.519658, 0, 9999, -9999, 1.0, 100, 1, 65.007467, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1470, 18.665435, 0, 9999, -9999, 1.0, 100, 1, 78.965265, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1471, 37.296985, 0, 9999, -9999, 1.0, 100, 1, 159.165074, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1472, 0.506929, 0, 9999, -9999, 1.0, 100, 1, 11.980182, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1473, 5.4e-05, 0, 9999, -9999, 1.0, 100, 1, 8.362608, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1474, 0.001949, 0, 9999, -9999, 1.0, 100, 1, 1.398948, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1475, 0.000397, 0, 9999, -9999, 1.0, 100, 1, 0.39088, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1476, 101.327203, 0, 9999, -9999, 1.0, 100, 1, 250.480113, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1477, 2.856374, 0, 9999, -9999, 1.0, 100, 1, 12.122974, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1479, 3.294063, 0, 9999, -9999, 1.0, 100, 1, 5.592606, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1480, 10.202484, 0, 9999, -9999, 1.0, 100, 1, 18.681964, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1481, 0.018812, 0, 9999, -9999, 1.0, 100, 1, 0.053146, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1482, 4.22506, 0, 9999, -9999, 1.0, 100, 1, 17.51083, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1483, 0.032046, 0, 9999, -9999, 1.0, 100, 1, 3.599649, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1484, 0.00133, 0, 9999, -9999, 1.0, 100, 1, 0.02991, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1485, 0.025059, 0, 9999, -9999, 1.0, 100, 1, 0.563547, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1486, 0.128922, 0, 9999, -9999, 1.0, 100, 1, 2.89934, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1487, 0.399374, 0, 9999, -9999, 1.0, 100, 1, 1.142917, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1488, 0.557496, 0, 9999, -9999, 1.0, 100, 1, 5.569856, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1489, 0.000102, 0, 9999, -9999, 1.0, 100, 1, 0.118938, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1490, 153.87342, 0, 9999, -9999, 1.0, 100, 1, 782.463701, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1491, 79.356319, 0, 9999, -9999, 1.0, 100, 1, 84.622838, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1492, 222.647124, 0, 9999, -9999, 1.0, 100, 1, 229.927503, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1493, 81.369208, 0, 9999, -9999, 1.0, 100, 1, 83.557175, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1494, 322.728735, 0, 9999, -9999, 1.0, 100, 1, 404.486733, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1495, 25.969556, 0, 9999, -9999, 1.0, 100, 1, 66.920717, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1496, 5.1e-05, 0, 9999, -9999, 1.0, 100, 1, 0.000282, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1497, 71.545947, 0, 9999, -9999, 1.0, 100, 1, 89.070006, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1498, 92.120695, 0, 9999, -9999, 1.0, 100, 1, 105.800802, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1499, 0.748238, 0, 9999, -9999, 1.0, 100, 1, 2.286676, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1500, 0.028955, 0, 9999, -9999, 1.0, 100, 1, 0.154817, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1501, 1.053275, 0, 9999, -9999, 1.0, 100, 1, 8.165333, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1502, 0.10328, 0, 9999, -9999, 1.0, 100, 1, 0.938928, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1503, 29.240906, 0, 9999, -9999, 1.0, 100, 1, 45.972187, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1504, 122.968061, 0, 9999, -9999, 1.0, 100, 1, 188.822836, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1505, 7.645825, 0, 9999, -9999, 1.0, 100, 1, 26.765913, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1506, 21.720319, 0, 9999, -9999, 1.0, 100, 1, 56.406717, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1507, 3.842405, 0, 9999, -9999, 1.0, 100, 1, 15.438042, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1508, 0.06199, 0, 9999, -9999, 1.0, 100, 1, 0.065259, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1510, 80.0538, 0, 9999, -9999, 1.0, 100, 1, 107.008141, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1511, 112.671979, 0, 9999, -9999, 1.0, 100, 1, 155.22192, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1512, 52.731338, 0, 9999, -9999, 1.0, 100, 1, 64.130052, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1513, 20.534213, 0, 9999, -9999, 1.0, 100, 1, 23.051786, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1514, 0.001102, 0, 9999, -9999, 1.0, 100, 1, 0.027711, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1516, 0.010731, 0, 9999, -9999, 1.0, 100, 1, 0.02881, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1517, 0.893235, 0, 9999, -9999, 1.0, 100, 1, 1.286804, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1518, 0.001327, 0, 9999, -9999, 1.0, 100, 1, 0.670542, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1519, 9.2e-05, 0, 9999, -9999, 1.0, 100, 1, 0.04654, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
])
ppc["branch"] = array([
[586, 1, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[589, 108, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[590, 108, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[593, 112, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[595, 115, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[598, 118, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[599, 119, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[602, 121, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[603, 526, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[607, 127, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[608, 127, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[609, 529, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[612, 493, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[614, 130, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[616, 132, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[617, 133, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[618, 133, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[619, 134, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[624, 14, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[629, 145, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[632, 145, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[637, 148, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[638, 149, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[640, 153, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[641, 155, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[642, 533, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[643, 534, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[647, 536, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[652, 167, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[655, 170, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[663, 178, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[666, 180, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[670, 183, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[672, 185, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[676, 19, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[681, 197, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[683, 200, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[687, 202, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[694, 21, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[695, 210, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[697, 211, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[698, 212, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[702, 215, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[705, 217, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[707, 219, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[714, 225, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[716, 226, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[717, 227, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[722, 545, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[724, 238, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[730, 547, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[732, 247, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[735, 253, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[741, 264, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[742, 264, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[743, 500, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[747, 273, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[749, 274, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[750, 557, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[753, 28, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[761, 288, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[762, 289, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[765, 560, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[767, 292, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[772, 3, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[774, 300, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[777, 300, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[778, 300, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[781, 303, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[784, 563, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[785, 501, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[788, 311, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[789, 565, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[791, 314, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[792, 316, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[795, 319, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[800, 326, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[801, 327, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[802, 327, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[805, 328, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[806, 328, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[808, 329, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[809, 329, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[811, 568, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[814, 570, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[816, 335, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[817, 571, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[821, 338, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[826, 339, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[834, 572, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[835, 572, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[836, 572, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[837, 350, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[839, 350, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[841, 573, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[843, 352, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[844, 352, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[850, 574, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[851, 575, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[853, 362, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[856, 363, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[857, 365, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[858, 368, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[860, 371, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[865, 375, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[867, 376, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[869, 503, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[870, 503, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[872, 378, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[874, 576, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[875, 381, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[882, 388, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[883, 388, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[885, 393, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[886, 394, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[889, 397, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[890, 40, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[893, 400, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[894, 400, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[895, 580, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[896, 581, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[898, 403, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[902, 405, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[903, 406, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[905, 413, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[906, 414, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[907, 583, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[909, 417, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[917, 43, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[918, 424, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[920, 428, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[921, 428, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[922, 429, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[923, 432, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[925, 44, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[931, 439, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[936, 445, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[937, 447, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[939, 450, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[940, 451, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[944, 458, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[950, 462, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[952, 47, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[958, 478, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[959, 478, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[960, 479, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[963, 481, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[965, 49, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[967, 49, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[969, 486, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[971, 51, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[978, 491, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[982, 62, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[983, 62, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[984, 63, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[985, 63, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[986, 64, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[987, 65, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[988, 66, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[993, 67, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[994, 67, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[995, 509, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[997, 510, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[999, 70, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1002, 71, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1007, 511, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1010, 79, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1011, 79, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1012, 81, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1014, 83, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1027, 218, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1028, 221, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1029, 268, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1030, 269, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1031, 498, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1032, 1, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1033, 3, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1034, 4, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1035, 6, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1036, 7, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1037, 8, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1038, 9, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1039, 11, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1040, 14, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1041, 16, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1042, 17, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1043, 19, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1044, 21, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1045, 23, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1046, 25, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1047, 27, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1048, 28, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1049, 29, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1050, 31, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1051, 33, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1052, 34, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1053, 35, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1054, 36, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1055, 38, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1056, 39, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1057, 40, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1058, 41, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1059, 43, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1060, 44, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1061, 45, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1062, 47, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1063, 48, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1064, 49, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1065, 50, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1066, 51, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1067, 53, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1068, 54, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1069, 55, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1070, 57, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1071, 58, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1072, 59, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1073, 60, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1074, 62, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1075, 63, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1076, 64, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1077, 65, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1078, 66, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1079, 67, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1080, 70, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1081, 71, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1082, 72, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1083, 73, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1084, 75, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1085, 76, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1086, 77, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1087, 79, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1088, 80, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1089, 81, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1090, 82, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1091, 83, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1092, 84, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1093, 85, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1096, 90, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1097, 91, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1098, 92, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1099, 93, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1100, 97, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1101, 98, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1102, 101, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1103, 102, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1105, 108, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1106, 109, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1107, 110, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1108, 111, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1109, 112, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1110, 113, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1111, 114, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1113, 116, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1114, 118, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1115, 119, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1116, 121, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1117, 122, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1118, 126, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1119, 127, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1120, 130, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1121, 131, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1122, 132, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1123, 133, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1124, 134, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1125, 135, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1126, 136, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1127, 137, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1128, 139, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1129, 140, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1130, 141, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1131, 142, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1133, 145, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1134, 146, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1135, 147, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1136, 148, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1137, 149, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1138, 150, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1139, 151, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1140, 152, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1142, 154, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1143, 155, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1144, 158, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1145, 161, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1146, 162, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1147, 163, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1148, 164, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1149, 166, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1150, 167, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1151, 168, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1152, 169, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1155, 172, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1157, 174, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1160, 177, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1161, 178, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1162, 179, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1163, 180, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1164, 181, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1165, 182, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1166, 183, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1168, 186, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1169, 187, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1171, 189, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1172, 190, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1173, 192, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1175, 194, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1176, 196, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1177, 197, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1178, 198, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1179, 199, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1181, 202, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1182, 203, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1183, 204, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1184, 205, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1186, 207, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1187, 208, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1188, 209, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1189, 210, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1190, 211, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1191, 212, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1192, 213, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1193, 214, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1194, 215, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1195, 216, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1196, 217, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1197, 218, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1198, 219, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1199, 221, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1200, 222, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1201, 223, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1202, 224, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1203, 225, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1204, 226, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1205, 227, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1206, 228, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1207, 229, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1208, 230, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1209, 234, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1210, 235, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1211, 237, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1212, 238, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1213, 239, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1214, 240, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1215, 241, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1216, 242, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1217, 243, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1218, 244, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1219, 247, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1220, 251, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1221, 252, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1222, 253, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1223, 254, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1224, 255, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1225, 256, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1226, 257, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1227, 258, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1228, 260, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1229, 263, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1230, 264, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1231, 266, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1232, 267, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1233, 268, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1235, 271, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1236, 272, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1237, 273, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1238, 274, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1239, 275, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1240, 276, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1241, 278, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1242, 281, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1243, 282, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1244, 283, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1245, 284, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1246, 285, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1247, 286, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1248, 287, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1249, 288, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1250, 289, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1251, 291, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1252, 292, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1253, 293, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1254, 294, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1255, 295, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1256, 296, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1257, 297, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1258, 298, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1259, 299, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1260, 300, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1261, 302, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1262, 303, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1263, 304, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1264, 307, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1265, 308, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1266, 309, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1267, 311, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1268, 312, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1269, 314, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1270, 316, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1271, 317, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1272, 318, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1273, 319, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1274, 321, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1275, 322, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1276, 323, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1277, 324, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1278, 325, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1279, 326, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1280, 327, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1281, 328, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1282, 329, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1283, 331, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1284, 333, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1285, 335, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1286, 337, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1287, 338, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1288, 339, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1289, 340, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1290, 341, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1291, 342, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1292, 343, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1293, 344, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1294, 345, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1295, 346, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1296, 347, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1297, 348, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1298, 350, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1299, 352, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1300, 353, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1301, 354, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1302, 355, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1303, 356, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1304, 357, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1305, 359, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1306, 361, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1307, 362, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1308, 363, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1309, 364, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1310, 365, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1311, 366, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1312, 367, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1313, 368, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1314, 369, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1315, 370, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1316, 371, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1317, 372, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1318, 373, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1319, 374, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1320, 375, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1321, 376, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1322, 377, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1323, 378, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1324, 379, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1325, 381, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1326, 384, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1327, 385, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1328, 386, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1329, 387, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1330, 388, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1332, 391, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1333, 392, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1334, 393, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1335, 394, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1336, 395, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1337, 396, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1338, 397, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1339, 398, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1340, 399, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1341, 400, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1342, 403, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1343, 404, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1344, 405, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1345, 406, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1346, 407, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1347, 408, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1348, 410, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1349, 411, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1350, 412, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1351, 413, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1352, 414, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1355, 418, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1356, 419, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1357, 420, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1358, 421, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1359, 422, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1363, 426, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1364, 427, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1365, 428, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1366, 429, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1367, 430, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1368, 431, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1369, 432, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1370, 433, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1371, 434, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1372, 435, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1373, 436, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1374, 437, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1375, 438, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1376, 439, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1377, 440, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1378, 441, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1379, 442, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1381, 445, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1382, 446, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1383, 447, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1387, 451, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1390, 455, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1391, 456, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1393, 458, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1394, 459, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1395, 460, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1396, 461, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1397, 462, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1398, 463, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1399, 464, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1400, 465, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1401, 466, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1402, 467, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1403, 468, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1404, 469, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1405, 470, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1406, 471, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1407, 472, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1408, 473, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1409, 474, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1410, 475, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1411, 476, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1412, 477, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1413, 478, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1414, 479, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1415, 480, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1416, 481, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1417, 482, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1418, 483, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1419, 484, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1420, 485, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1421, 486, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1422, 487, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1423, 488, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1424, 489, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1425, 490, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1426, 491, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1427, 492, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1428, 493, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1429, 494, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1430, 495, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1431, 496, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1432, 497, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1433, 498, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1434, 499, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1435, 500, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1436, 501, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1437, 502, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1438, 503, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1439, 504, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1440, 505, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1441, 506, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1442, 507, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1443, 508, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1444, 509, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1445, 510, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1446, 511, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1447, 512, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1448, 513, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1449, 514, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1450, 515, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1451, 516, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1452, 517, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1453, 518, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1454, 519, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1455, 520, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1456, 521, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1459, 524, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1460, 525, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1461, 526, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1463, 528, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1464, 529, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1466, 531, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1467, 532, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1468, 533, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1469, 534, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1470, 535, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1471, 536, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1472, 537, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1473, 538, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1474, 539, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1475, 540, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1476, 541, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1477, 542, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1479, 544, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1480, 545, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1481, 546, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1482, 547, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1483, 548, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1484, 549, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1485, 550, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1486, 551, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1487, 552, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1488, 554, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1489, 555, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1490, 556, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1491, 557, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1492, 558, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1493, 559, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1494, 560, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1495, 561, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1496, 562, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1497, 563, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1498, 564, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1499, 565, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1500, 566, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1501, 567, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1502, 568, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1503, 569, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1504, 570, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1505, 571, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1506, 572, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1507, 573, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1508, 574, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1510, 576, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1511, 577, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1512, 578, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1513, 579, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1514, 580, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1516, 582, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1517, 583, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1518, 584, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1519, 585, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1, 490, 0, 0.01433884297520661, 0.151691958358336, 991.0, 991.0, 991.0, 0, 2, 1, -360, 43.375 ],
[3, 4, 0, 0.006291637811634348, 0.903417549506624, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 72.681 ],
[491, 6, 0, 0.011200661157024791, 0.118492839955776, 991.0, 991.0, 991.0, 0, 2, 1, -360, 33.882 ],
[7, 5, 0, 0.005794840720221606, 0.20802058859584005, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 33.471 ],
[8, 9, 0, 0.0024379328254847646, 0.350063268897336, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 28.163 ],
[492, 11, 0, 0.018224793388429753, 0.0482004476327704, 495.0, 495.0, 495.0, 0, 1, 1, -360, 27.565 ],
[11, 493, 0, 0.030286942148760328, 0.08010209706571599, 495.0, 495.0, 495.0, 0, 1, 1, -360, 45.809 ],
[492, 493, 0, 0.04521652892561983, 0.11958747011094399, 495.0, 495.0, 495.0, 0, 1, 1, -360, 68.39 ],
[494, 14, 0, 0.012990743801652892, 0.137430291356512, 991.0, 991.0, 991.0, 0, 2, 1, -360, 39.297 ],
[13, 15, 0, 0.007681959833795014, 0.27576354266704156, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 44.371 ],
[16, 5, 0, 0.006275623268698061, 0.22527950450957998, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 36.248000000000005 ],
[17, 18, 0, 0.04623522622347646, 0.9335989000302801, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 200.291 ],
[17, 12, 0, 0.0056020313942728535, 0.113118303398186, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 24.268 ],
[14, 495, 0, 0.0017957024793388433, 0.018996904156819597, 991.0, 991.0, 991.0, 0, 1, 1, -360, 5.432 ],
[494, 19, 0, 0.010246611570247935, 0.10839986031771602, 991.0, 991.0, 991.0, 0, 1, 1, -360, 30.996 ],
[20, 21, 0, 0.005415685595567867, 0.19440984828307922, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 31.281 ],
[20, 22, 0, 0.0049706544321329645, 0.713737278110032, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 57.42100000000001 ],
[497, 23, 0, 0.002190413223140496, 0.005793146490362, 495.0, 495.0, 495.0, 0, 1, 1, -360, 3.313 ],
[23, 499, 0, 0.020799669421487598, 0.22004164444829602, 991.0, 991.0, 991.0, 0, 1, 1, -360, 62.919 ],
[25, 26, 0, 0.00141845567867036, 0.050919084651523595, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 8.193 ],
[25, 22, 0, 0.0035578254847645433, 0.0319293051869808, 856.0, 856.0, 856.0, 0, 1, 1, -360, 10.275 ],
[23, 27, 0, 0.027738181818181818, 0.073361203699828, 495.0, 495.0, 495.0, 0, 1, 1, -360, 41.95399999999999 ],
[28, 23, 0, 0.012841652892561981, 0.0339632611780132, 495.0, 495.0, 495.0, 0, 1, 1, -360, 19.423 ],
[8, 21, 0, 0.004948753462603878, 0.17764812836304802, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 28.584 ],
[9, 29, 0, 0.002212863573407202, 0.31774552934092004, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 25.563000000000002 ],
[30, 25, 0, 0.019958795013850415, 0.17911796401827998, 856.0, 856.0, 856.0, 0, 1, 1, -360, 57.641000000000005 ],
[31, 32, 0, 0.0299776084949446, 0.605319030583196, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 129.863 ],
[32, 33, 0, 0.016762234533725762, 0.33846927983213604, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 72.61399999999999 ],
[34, 35, 0, 0.001931900826446281, 0.020437759184893597, 991.0, 991.0, 991.0, 0, 2, 1, -360, 5.843999999999999 ],
[35, 36, 0, 0.0008730578512396695, 0.0092361605077588, 991.0, 991.0, 991.0, 0, 2, 1, -360, 2.641 ],
[490, 6, 0, 0.049352066115702475, 0.130525028606764, 495.0, 495.0, 495.0, 0, 1, 1, -360, 74.645 ],
[37, 10, 0, 0.02404639889196676, 0.485553838251812, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 104.169 ],
[10, 38, 0, 0.006848799630657894, 0.13829351176534158, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 29.669 ],
[37, 38, 0, 0.01437834718372576, 1.1613317560186958, 2567.0, 2567.0, 2567.0, 0, 1, 1, -360, 124.574 ],
[39, 40, 0, 0.04521629732222991, 0.913024308337812, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 195.877 ],
[39, 41, 0, 0.017466989843005543, 0.35269996139852006, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 75.667 ],
[42, 41, 0, 0.031145429362880884, 0.6289001042979919, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 134.922 ],
[18, 42, 0, 0.03439750692520776, 0.6945672650962679, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 149.01 ],
[492, 43, 0, 0.01819173553719008, 0.192452068436848, 991.0, 991.0, 991.0, 0, 2, 1, -360, 55.03 ],
[44, 45, 0, 0.02562314049586777, 0.067767398802972, 495.0, 495.0, 495.0, 0, 1, 1, -360, 38.755 ],
[44, 505, 0, 0.006061487603305785, 0.0160312607980052, 495.0, 495.0, 495.0, 0, 1, 1, -360, 9.168 ],
[46, 12, 0, 0.0014741170360110802, 0.2116687641962416, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 17.029 ],
[47, 48, 0, 0.005344182825484765, 0.01199019212302604, 428.0, 428.0, 428.0, 0, 1, 1, -360, 7.7170000000000005 ],
[49, 50, 0, 0.0019151662049861494, 0.0171874439892256, 856.0, 856.0, 856.0, 0, 1, 1, -360, 5.531000000000001 ],
[31, 33, 0, 0.013475992613088641, 0.27211225959163604, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 58.378 ],
[31, 51, 0, 0.003518611495844875, 0.5052381383693519, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 40.647 ],
[52, 53, 0, 0.010464421745152355, 1.5025884408875438, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 120.885 ],
[52, 54, 0, 0.0076126500461911354, 0.1537174637168, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 32.978 ],
[506, 55, 0, 0.012634380165289257, 0.133660287181212, 991.0, 991.0, 991.0, 0, 1, 1, -360, 38.219 ],
[506, 507, 0, 0.044157355371900825, 0.11678619613628, 495.0, 495.0, 495.0, 0, 1, 1, -360, 66.788 ],
[57, 506, 0, 0.004687272727272727, 0.049587095736244, 991.0, 991.0, 991.0, 0, 1, 1, -360, 14.179 ],
[57, 58, 0, 0.014436363636363634, 0.0381809096340232, 495.0, 495.0, 495.0, 0, 1, 1, -360, 21.835 ],
[58, 506, 0, 0.019797685950413223, 0.052360391943288, 495.0, 495.0, 495.0, 0, 1, 1, -360, 29.944000000000003 ],
[59, 60, 0, 0.019407548476454296, 0.174170863885556, 856.0, 856.0, 856.0, 0, 1, 1, -360, 56.049 ],
[508, 62, 0, 0.051111404958677685, 0.03379452026753001, 248.0, 248.0, 248.0, 0, 1, 1, -360, 38.653 ],
[30, 61, 0, 0.03143698060941828, 0.28212765137935203, 856.0, 856.0, 856.0, 0, 1, 1, -360, 90.79 ],
[63, 506, 0, 0.027457190082644623, 0.072618044249872, 495.0, 495.0, 495.0, 0, 1, 1, -360, 41.528999999999996 ],
[13, 64, 0, 0.0014816481994459833, 0.2127501654814608, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 17.116 ],
[65, 66, 0, 0.03778185595567867, 0.7629053006222161, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 163.671 ],
[59, 67, 0, 0.0051880193905817175, 0.046559297286324804, 856.0, 856.0, 856.0, 0, 1, 1, -360, 14.982999999999999 ],
[61, 67, 0, 0.012931440443213295, 0.1160517597580644, 856.0, 856.0, 856.0, 0, 1, 1, -360, 37.346 ],
[68, 69, 0, 0.011149584487534626, 0.4002427745096039, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 64.4 ],
[70, 69, 0, 0.009625346260387812, 0.345526355460808, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 55.596000000000004 ],
[71, 72, 0, 0.008878635734072021, 0.318721276477736, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 51.283 ],
[73, 74, 0, 0.012529547553116345, 0.253001288604392, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 54.278 ],
[37, 75, 0, 0.027459141274238225, 0.5544652029066119, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 118.95299999999999 ],
[72, 75, 0, 0.006688711911357341, 0.240108375006292, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 38.634 ],
[37, 72, 0, 0.036222068328739615, 0.7314094881920841, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 156.914 ],
[76, 77, 0, 0.004683777700831025, 0.6725445900750401, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 54.107 ],
[77, 51, 0, 0.00363183864265928, 0.5214964473447999, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 41.955 ],
[73, 72, 0, 0.025475069252077563, 0.514402082018968, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 110.35799999999999 ],
[18, 40, 0, 0.01302770083102493, 0.26306018504072, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 56.43600000000001 ],
[492, 45, 0, 0.0308703030303719, 0.18370114733484796, 743.0, 743.0, 743.0, 0, 1, 1, -360, 70.03699999999999 ],
[10, 74, 0, 0.030167359187465374, 0.609150547206812, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 130.685 ],
[45, 511, 0, 0.08203371900826446, 0.05424014819960001, 248.0, 248.0, 248.0, 0, 1, 1, -360, 62.038000000000004 ],
[78, 32, 0, 0.013458795013850415, 0.48313777647302397, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 77.738 ],
[79, 80, 0, 0.0038086911357340715, 0.1367226831743568, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 21.999000000000002 ],
[81, 79, 0, 0.010767832409972299, 0.3865388099484561, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 62.195 ],
[34, 82, 0, 0.0015497520661157025, 0.00409874294399768, 495.0, 495.0, 495.0, 0, 1, 1, -360, 2.344 ],
[83, 84, 0, 0.00902611570247934, 0.0238720301499152, 495.0, 495.0, 495.0, 0, 1, 1, -360, 13.652000000000001 ],
[83, 499, 0, 0.04179570247933885, 0.0276350398834796, 248.0, 248.0, 248.0, 0, 1, 1, -360, 31.608 ],
[85, 86, 0, 0.00802354570637119, 0.28802563884886, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 46.343999999999994 ],
[87, 86, 0, 0.01904968836565097, 0.683837154069184, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 110.031 ],
[88, 89, 0, 0.00380297520661157, 0.010058007429140002, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.752000000000001 ],
[90, 86, 0, 0.012097818559556786, 0.434282055192244, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 69.877 ],
[91, 86, 0, 9.26246537396122e-05, 0.013299992817559201, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 1.07 ],
[86, 92, 0, 0.0001852493074792244, 0.0066499964087796005, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.07 ],
[86, 93, 0, 0.008152181440443215, 0.292643346635492, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 47.086999999999996 ],
[94, 86, 0, 0.012883829639889197, 0.46249792780547194, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 74.417 ],
[86, 95, 0, 0.010421052631578947, 0.37409026526870803, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 60.192 ],
[513, 517, 0, 0.0008733884297520661, 0.0023099144321748, 495.0, 495.0, 495.0, 0, 1, 1, -360, 1.321 ],
[97, 66, 0, 0.03812777008310249, 0.34217338998058805, 856.0, 856.0, 856.0, 0, 1, 1, -360, 110.113 ],
[42, 98, 0, 0.003091759002770083, 0.44394630230884, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 35.716 ],
[99, 100, 0, 0.016371537396121884, 0.587698093837988, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 94.56200000000001 ],
[42, 101, 0, 0.008165339335180054, 0.29311568282888, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 47.163000000000004 ],
[102, 42, 0, 0.012403047091412742, 0.44523901189173193, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 71.64 ],
[103, 87, 0, 0.007073060941828254, 0.25390556381756, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 40.854 ],
[104, 103, 0, 0.0028852146814404432, 0.1035721403291428, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.665 ],
[105, 87, 0, 0.006406682825484765, 0.22998422159488002, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 37.005 ],
[106, 107, 0, 0.005714219759923823, 0.11538365264216799, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 24.754 ],
[108, 107, 0, 0.0025427631578947367, 0.09127896939786201, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 14.687000000000001 ],
[109, 106, 0, 0.003030470914127424, 0.10878648330773438, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 17.504 ],
[110, 111, 0, 0.019821849030470913, 0.7115558306889919, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 114.491 ],
[87, 112, 0, 0.006135907202216068, 0.220264039928212, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 35.441 ],
[113, 87, 0, 0.003981648199445983, 0.14293141813921081, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 22.998 ],
[87, 85, 0, 0.011046225761772853, 0.3965324494097, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 63.803000000000004 ],
[110, 114, 0, 0.011665339335180056, 0.418757110306188, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 67.37899999999999 ],
[115, 116, 0, 0.007048925619834712, 0.07457124214588401, 991.0, 991.0, 991.0, 0, 1, 1, -360, 21.323 ],
[117, 118, 0, 0.005987534626038782, 0.21493782785077598, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 34.584 ],
[117, 119, 0, 0.0038738746537396117, 0.5562504472696961, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 44.751000000000005 ],
[117, 120, 0, 0.005886686288088643, 0.8452704781039522, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 68.003 ],
[121, 122, 0, 0.0021170360110803325, 0.0759964075574972, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 12.228 ],
[123, 124, 0, 0.0018386426592797783, 0.0660027680945204, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 10.62 ],
[125, 126, 0, 0.004941135734072022, 0.17737467056702802, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 28.54 ],
[127, 119, 0, 0.0029027008310249305, 0.1041998502705648, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.766 ],
[118, 128, 0, 0.007397160664819945, 0.265539950057812, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 42.726000000000006 ],
[121, 119, 0, 0.002552458448753463, 0.0916270065931116, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 14.743 ],
[530, 527, 0, 0.022726611570247933, 0.060106736329903994, 495.0, 495.0, 495.0, 0, 1, 1, -360, 34.374 ],
[125, 130, 0, 0.002931440443213297, 0.105231531956442, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.932000000000002 ],
[125, 123, 0, 0.0019078081717451524, 0.2739425623421336, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 22.039 ],
[131, 132, 0, 0.0035744459833795014, 0.12831385593973843, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 20.646 ],
[133, 123, 0, 0.003864439058171745, 0.13872389704704202, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 22.320999999999998 ],
[524, 134, 0, 0.008092231404958678, 0.08560847143881999, 991.0, 991.0, 991.0, 0, 1, 1, -360, 24.479 ],
[135, 136, 0, 0.005242901662049862, 0.1882073282678, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 30.283 ],
[123, 131, 0, 0.003138331024930748, 0.1126583971045252, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 18.127 ],
[117, 128, 0, 0.010800034626038782, 0.38769479063117196, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 62.381 ],
[137, 521, 0, 0.013832396694214875, 0.14633421587532003, 991.0, 991.0, 991.0, 0, 2, 1, -360, 41.843 ],
[531, 514, 0, 0.0059504132231404955, 0.035409362037522, 743.0, 743.0, 743.0, 0, 1, 1, -360, 13.5 ],
[139, 521, 0, 0.021257520661157023, 0.05622132386323199, 495.0, 495.0, 495.0, 0, 1, 1, -360, 32.152 ],
[140, 514, 0, 0.018527603305785127, 0.04900131122836401, 495.0, 495.0, 495.0, 0, 1, 1, -360, 28.023000000000003 ],
[522, 141, 0, 0.012168595041322314, 0.032183175718526795, 495.0, 495.0, 495.0, 0, 1, 1, -360, 18.405 ],
[142, 523, 0, 0.007060165289256198, 0.0746901476577608, 991.0, 991.0, 991.0, 0, 2, 1, -360, 21.357 ],
[530, 526, 0, 0.020281652892561983, 0.053640374808152, 495.0, 495.0, 495.0, 0, 1, 1, -360, 30.676 ],
[140, 532, 0, 0.004669090909090909, 0.0123486871461184, 495.0, 495.0, 495.0, 0, 1, 1, -360, 7.062 ],
[142, 144, 0, 0.006678126721756199, 0.0397397958689204, 743.0, 743.0, 743.0, 0, 1, 1, -360, 15.151 ],
[140, 522, 0, 0.020450247933884298, 0.05408627047793199, 495.0, 495.0, 495.0, 0, 1, 1, -360, 30.930999999999997 ],
[145, 146, 0, 0.028527603305785125, 0.07544904460236, 495.0, 495.0, 495.0, 0, 1, 1, -360, 43.148 ],
[147, 523, 0, 0.02461289256198347, 0.0650955220034416, 495.0, 495.0, 495.0, 0, 2, 1, -360, 37.227 ],
[144, 523, 0, 0.008479338842975206, 0.0224259292904064, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.825 ],
[139, 523, 0, 0.029245619834710742, 0.0193370088934308, 248.0, 248.0, 248.0, 0, 1, 1, -360, 22.116999999999997 ],
[140, 141, 0, 0.008362975206611572, 0.022118173847506, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.649000000000001 ],
[528, 526, 0, 0.015389090909090908, 0.0407006573227188, 495.0, 495.0, 495.0, 0, 1, 1, -360, 23.276 ],
[528, 148, 0, 0.014306115702479338, 0.0378364333712244, 495.0, 495.0, 495.0, 0, 1, 1, -360, 21.638 ],
[149, 150, 0, 0.013604628099173552, 0.035981157661543604, 495.0, 495.0, 495.0, 0, 1, 1, -360, 20.576999999999998 ],
[145, 528, 0, 0.00320595041322314, 0.0084790121737992, 495.0, 495.0, 495.0, 0, 1, 1, -360, 4.849 ],
[530, 151, 0, 0.013144462809917355, 0.0347641247737036, 495.0, 495.0, 495.0, 0, 1, 1, -360, 19.881 ],
[524, 152, 0, 0.014598347107438016, 0.03860931919944, 495.0, 495.0, 495.0, 0, 1, 1, -360, 22.08 ],
[149, 525, 0, 0.016897190082644627, 0.17875695122823998, 991.0, 991.0, 991.0, 0, 2, 1, -360, 51.114 ],
[139, 514, 0, 0.007824132231404959, 0.020693056313687997, 495.0, 495.0, 495.0, 0, 1, 1, -360, 11.834000000000001 ],
[126, 120, 0, 0.012780297783933518, 0.458781387757004, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 73.819 ],
[530, 153, 0, 0.02254545454545455, 0.059627617060924, 495.0, 495.0, 495.0, 0, 1, 1, -360, 34.1 ],
[528, 147, 0, 0.15786710743801652, 0.104380679149868, 248.0, 248.0, 248.0, 0, 1, 1, -360, 119.387 ],
[528, 154, 0, 0.006528264462809917, 0.017265779790547203, 495.0, 495.0, 495.0, 0, 2, 1, -360, 9.874 ],
[130, 120, 0, 0.01450502077562327, 0.5206947188067639, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 83.781 ],
[528, 155, 0, 0.16064132231404957, 0.1062149715341, 248.0, 248.0, 248.0, 0, 1, 1, -360, 121.485 ],
[524, 533, 0, 0.004432727272727273, 0.0468942356109744, 991.0, 991.0, 991.0, 0, 1, 1, -360, 13.409 ],
[524, 149, 0, 0.0056413223140495865, 0.05968007537478799, 991.0, 991.0, 991.0, 0, 2, 1, -360, 17.065 ],
[154, 150, 0, 0.007539173553719007, 0.0199394052006688, 495.0, 495.0, 495.0, 0, 2, 1, -360, 11.402999999999999 ],
[157, 110, 0, 0.009962084487534625, 0.357614433044424, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 57.541000000000004 ],
[119, 158, 0, 0.0002490189289012004, 0.08045252664623159, 5134.0, 5134.0, 5134.0, 0, 3, 1, -360, 4.315 ],
[159, 60, 0, 0.010967451523545706, 0.0984261617997728, 856.0, 856.0, 856.0, 0, 1, 1, -360, 31.674 ],
[536, 161, 0, 0.021314380165289255, 0.056371704363524, 495.0, 495.0, 495.0, 0, 1, 1, -360, 32.238 ],
[115, 151, 0, 0.00379404958677686, 0.0401376047510724, 991.0, 991.0, 991.0, 0, 1, 1, -360, 11.477 ],
[162, 134, 0, 0.0015910743801652895, 0.016832124393744, 991.0, 991.0, 991.0, 0, 2, 1, -360, 4.813 ],
[115, 526, 0, 0.0037884297520661154, 0.010019537998747198, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.73 ],
[138, 87, 0, 0.0011838642659279777, 0.16999131006813442, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 13.675999999999998 ],
[123, 163, 0, 0.0022778739612188364, 0.08177009602828919, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.157 ],
[112, 164, 0, 0.0008672957063711912, 0.12453516639176802, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 10.019 ],
[112, 165, 0, 0.005989439058171744, 0.21500619230086396, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 34.595 ],
[166, 165, 0, 0.002632790858725762, 0.09451074335350361, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 15.207 ],
[167, 537, 0, 0.00832595041322314, 0.08808100664460242, 991.0, 991.0, 991.0, 0, 2, 1, -360, 25.186 ],
[168, 104, 0, 0.002552458448753463, 0.0916270065931116, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 14.743 ],
[531, 520, 0, 0.016156694214876033, 0.042730794079516396, 495.0, 495.0, 495.0, 0, 1, 1, -360, 24.436999999999998 ],
[139, 520, 0, 0.010682314049586776, 0.0282522993797748, 495.0, 495.0, 495.0, 0, 1, 1, -360, 16.157 ],
[520, 169, 0, 0.0011328925619834712, 0.0119849761681232, 991.0, 991.0, 991.0, 0, 2, 1, -360, 3.427 ],
[168, 105, 0, 0.007340893351800554, 0.26352009133553606, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 42.401 ],
[520, 170, 0, 0.005842644628099174, 0.015452470732151198, 495.0, 495.0, 495.0, 0, 2, 1, -360, 8.837 ],
[171, 89, 0, 0.005505454545454546, 0.058242717567848004, 991.0, 991.0, 991.0, 0, 1, 1, -360, 16.654 ],
[521, 172, 0, 0.006304793388429752, 0.06669899780522001, 991.0, 991.0, 991.0, 0, 1, 1, -360, 19.072 ],
[123, 173, 0, 0.005247403047091413, 0.18836891696656402, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 30.309 ],
[521, 174, 0, 0.013300495867768597, 0.035176796844864404, 495.0, 495.0, 495.0, 0, 1, 1, -360, 20.117 ],
[37, 39, 0, 0.004338873499549862, 0.35044859579205606, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 37.592 ],
[530, 175, 0, 0.013128595041322313, 0.0347221581224188, 495.0, 495.0, 495.0, 0, 1, 1, -360, 19.857 ],
[530, 176, 0, 0.005685289256198347, 0.01503630144005, 495.0, 495.0, 495.0, 0, 1, 1, -360, 8.599 ],
[88, 530, 0, 0.006015867768595041, 0.0159106066755372, 495.0, 495.0, 495.0, 0, 1, 1, -360, 9.099 ],
[177, 496, 0, 0.018632066115702478, 0.19711036673178398, 991.0, 991.0, 991.0, 0, 2, 1, -360, 56.361999999999995 ],
[178, 525, 0, 0.03106842975206612, 0.08216895464241199, 495.0, 495.0, 495.0, 0, 1, 1, -360, 46.99100000000001 ],
[179, 493, 0, 0.057079669421487594, 0.15096278779194802, 495.0, 495.0, 495.0, 0, 1, 1, -360, 86.333 ],
[180, 181, 0, 0.041027438016528923, 0.10850827416682, 495.0, 495.0, 495.0, 0, 1, 1, -360, 62.053999999999995 ],
[182, 180, 0, 0.00866314049586777, 0.09164817200545601, 991.0, 991.0, 991.0, 0, 2, 1, -360, 26.206 ],
[179, 181, 0, 0.01957223140495868, 0.051764115772731996, 495.0, 495.0, 495.0, 0, 1, 1, -360, 29.603 ],
[180, 493, 0, 0.06676561983471074, 0.17657993119175203, 495.0, 495.0, 495.0, 0, 1, 1, -360, 100.98299999999999 ],
[183, 30, 0, 0.0024804362880886427, 0.356166349712776, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 28.654 ],
[183, 21, 0, 0.0025647506925207757, 0.36827307214930394, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 29.628 ],
[538, 185, 0, 0.018631404958677687, 0.0123189607681008, 248.0, 248.0, 248.0, 0, 1, 1, -360, 14.09 ],
[538, 89, 0, 0.014509752066115702, 0.038375005396288, 495.0, 495.0, 495.0, 0, 1, 1, -360, 21.945999999999998 ],
[184, 186, 0, 0.0016554709141274237, 0.059427351084826, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 9.562000000000001 ],
[184, 187, 0, 0.002698753462603878, 0.09687863927102919, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 15.588 ],
[520, 172, 0, 0.0034188429752066113, 0.0361682589818792, 991.0, 991.0, 991.0, 0, 2, 1, -360, 10.342 ],
[89, 175, 0, 0.0037309090909090903, 0.0098674088877672, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.643 ],
[185, 89, 0, 0.005812892561983471, 0.0153737832609196, 495.0, 495.0, 495.0, 0, 1, 1, -360, 8.792 ],
[89, 188, 0, 0.003108760330578513, 0.008221966434607202, 495.0, 495.0, 495.0, 0, 1, 1, -360, 4.702 ],
[189, 190, 0, 0.008599492151454294, 0.17364414688031998, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 37.253 ],
[539, 172, 0, 0.0021570247933884296, 0.022819366646419197, 991.0, 991.0, 991.0, 0, 2, 1, -360, 6.525 ],
[504, 192, 0, 0.0003084297520661157, 0.00326290713886456, 991.0, 991.0, 991.0, 0, 2, 1, -360, 0.9329999999999999 ],
[105, 186, 0, 0.003273372576177285, 0.1175060580379876, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 18.907 ],
[105, 187, 0, 0.0021712257617728533, 0.0779416868808324, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 12.540999999999999 ],
[539, 193, 0, 0.005608595041322314, 0.01483346262541, 495.0, 495.0, 495.0, 0, 1, 1, -360, 8.482999999999999 ],
[187, 194, 0, 4.8649584487534626e-05, 0.0069856037041576, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 0.562 ],
[539, 540, 0, 0.004394710743801653, 0.0116230138006708, 495.0, 495.0, 495.0, 0, 1, 1, -360, 6.647 ],
[539, 196, 0, 0.00332297520661157, 0.008788516227194, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.026 ],
[197, 540, 0, 0.004737190082644629, 0.012528794024621601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 7.165 ],
[110, 198, 0, 0.00018724030470914128, 0.02688587333118328, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 2.1630000000000003 ],
[197, 539, 0, 0.009172231404958677, 0.024258473063998802, 495.0, 495.0, 495.0, 0, 1, 1, -360, 13.873 ],
[199, 537, 0, 0.03612826446280991, 0.0238877676441712, 248.0, 248.0, 248.0, 0, 1, 1, -360, 27.322 ],
[134, 526, 0, 0.007771239669421488, 0.020553167475975197, 495.0, 495.0, 495.0, 0, 1, 1, -360, 11.754000000000001 ],
[200, 193, 0, 0.0009322314049586776, 0.009862163056380801, 991.0, 991.0, 991.0, 0, 2, 1, -360, 2.82 ],
[4, 201, 0, 0.013726108033240996, 0.49273365914097605, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 79.282 ],
[202, 86, 0, 0.00013365650969529087, 0.00479794133417816, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.772 ],
[85, 203, 0, 0.0019011426592797783, 0.2729854600553416, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 21.962 ],
[147, 204, 0, 0.0073874380165289254, 0.0781523963903056, 991.0, 991.0, 991.0, 0, 2, 1, -360, 22.346999999999998 ],
[147, 205, 0, 0.005959669421487603, 0.00394049369636956, 248.0, 248.0, 248.0, 0, 1, 1, -360, 4.507 ],
[123, 206, 0, 0.0005753116343490305, 0.0826091142668064, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 6.646 ],
[537, 207, 0, 0.018456198347107437, 0.048812461297776, 495.0, 495.0, 495.0, 0, 1, 1, -360, 27.915 ],
[165, 208, 0, 0.00414612188365651, 0.14883562055771601, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 23.948 ],
[4, 94, 0, 0.013687673130193905, 0.49135394025941603, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 79.06 ],
[4, 2, 0, 5.2054478301015697e-05, 0.016817654469309, 5134.0, 5134.0, 5134.0, 0, 3, 1, -360, 0.902 ],
[209, 4, 0, 0.0022369286703601107, 0.32120104149338397, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 25.840999999999998 ],
[119, 163, 0, 0.003535145429362881, 0.12690306230914922, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 20.419 ],
[210, 3, 0, 0.0003150969529085873, 0.011311208844832242, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.82 ],
[99, 211, 0, 0.0035045013850415513, 0.1258030161741948, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 20.242 ],
[99, 69, 0, 0.021717970914127423, 0.7796219621557, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 125.443 ],
[212, 99, 0, 0.008453774238227147, 0.30346978938770003, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 48.82899999999999 ],
[213, 214, 0, 0.01490115702479339, 0.15764073118032798, 991.0, 991.0, 991.0, 0, 2, 1, -360, 45.076 ],
[510, 215, 0, 0.002174710743801653, 0.09202587186721281, 1981.0, 1981.0, 1981.0, 0, 4, 1, -360, 13.157 ],
[128, 69, 0, 0.010711651662049862, 1.538088234801848, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 123.741 ],
[216, 69, 0, 0.009628462603878117, 1.3825528982351443, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 111.228 ],
[217, 98, 0, 0.0012787396121883656, 0.045903620070299994, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 7.386 ],
[504, 218, 0, 0.027480991735537193, 0.072680994226412, 495.0, 495.0, 495.0, 0, 1, 1, -360, 41.565 ],
[177, 504, 0, 0.07054809917355372, 0.18658373169634002, 495.0, 495.0, 495.0, 0, 1, 1, -360, 106.704 ],
[219, 209, 0, 0.003938798476454294, 0.5655728721401839, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 45.501000000000005 ],
[219, 220, 0, 0.0013026315789473684, 0.1870451326342096, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 15.048 ],
[94, 95, 0, 0.01070740997229917, 0.38436979242743197, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 61.846000000000004 ],
[159, 221, 0, 0.009937153739612188, 0.356719480257712, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 57.397 ],
[34, 161, 0, 0.010965289256198347, 0.116002818645824, 991.0, 991.0, 991.0, 0, 2, 1, -360, 33.17 ],
[222, 221, 0, 0.0046457756232686975, 0.16677196601221997, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 26.834 ],
[211, 52, 0, 0.05267313019390582, 0.472709090515552, 856.0, 856.0, 856.0, 0, 1, 1, -360, 152.12 ],
[215, 223, 0, 0.04873190082644628, 0.128884831985184, 495.0, 495.0, 495.0, 0, 1, 1, -360, 73.707 ],
[224, 215, 0, 0.019086280991735535, 0.050478887076288004, 495.0, 495.0, 495.0, 0, 1, 1, -360, 28.868000000000002 ],
[225, 224, 0, 0.04200925619834711, 0.11110496071615601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 63.538999999999994 ],
[224, 223, 0, 0.031061818181818183, 0.082151468537468, 495.0, 495.0, 495.0, 0, 1, 1, -360, 46.981 ],
[226, 6, 0, 0.06420099173553719, 0.0424492677936932, 248.0, 248.0, 248.0, 0, 1, 1, -360, 48.552 ],
[7, 3, 0, 0.009332929362880887, 0.335029305054692, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 53.907 ],
[216, 227, 0, 0.01989941135734072, 0.7143401282507, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 114.939 ],
[228, 229, 0, 0.010545454545454545, 0.027890337012274, 495.0, 495.0, 495.0, 0, 1, 1, -360, 15.95 ],
[227, 230, 0, 0.003993074792243767, 0.573366419334696, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 46.128 ],
[231, 53, 0, 0.007193213296398893, 1.0328749562310842, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 83.096 ],
[544, 545, 0, 0.013061818181818181, 0.034545548464856, 495.0, 495.0, 495.0, 0, 1, 1, -360, 19.756 ],
[234, 235, 0, 0.04608859504132231, 0.121893887321888, 495.0, 495.0, 495.0, 0, 1, 1, -360, 69.709 ],
[546, 214, 0, 0.057025454545454546, 0.15081940173295602, 495.0, 495.0, 495.0, 0, 1, 1, -360, 86.251 ],
[233, 227, 0, 0.0029001038781163438, 0.1041066260218888, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.750999999999998 ],
[237, 238, 0, 0.026324628099173554, 0.06962267451304, 495.0, 495.0, 495.0, 0, 1, 1, -360, 39.816 ],
[212, 100, 0, 0.007955505540166205, 0.285583163531816, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 45.951 ],
[519, 239, 0, 0.01740429752066116, 0.046030422038308406, 495.0, 495.0, 495.0, 0, 1, 1, -360, 26.324 ],
[238, 519, 0, 0.015166280991735538, 0.040111375593995205, 495.0, 495.0, 495.0, 0, 1, 1, -360, 22.939 ],
[213, 240, 0, 0.01665388429752066, 0.04404574915373599, 1200.0, 1200.0, 1200.0, 0, 1, 1, -360, 25.189 ],
[241, 242, 0, 0.009862015235457064, 0.3540221919932281, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 56.963 ],
[70, 241, 0, 0.003819858033240997, 0.5484941897752321, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 44.126999999999995 ],
[509, 213, 0, 0.011363636363636364, 0.120216969880216, 991.0, 991.0, 991.0, 0, 2, 1, -360, 34.375 ],
[68, 243, 0, 0.003611668975069252, 0.1296500701715312, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 20.861 ],
[243, 244, 0, 0.0007699099722991691, 0.027637882270859202, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 4.447 ],
[68, 244, 0, 0.004104051246537396, 0.147325387728876, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 23.705 ],
[544, 547, 0, 0.02418776859504132, 0.255884661882476, 991.0, 991.0, 991.0, 0, 1, 1, -360, 73.168 ],
[245, 227, 0, 0.012676419667590028, 0.45505241780707606, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 73.219 ],
[246, 208, 0, 0.0010155817174515235, 0.0364568961999408, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 5.8660000000000005 ],
[112, 208, 0, 0.0017927631578947367, 0.0643558063672372, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 10.355 ],
[165, 247, 0, 0.0002113919667590028, 0.0075884538459086, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.2209999999999999 ],
[537, 549, 0, 0.00032066115702479337, 0.00084807607842936, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.485 ],
[537, 550, 0, 0.00032198347107438016, 0.0008515732993697601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.48700000000000004 ],
[537, 551, 0, 0.0002651239669421488, 0.0007011927988648, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.401 ],
[110, 251, 0, 0.00023857340720221602, 0.008564200982522441, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.3780000000000001 ],
[510, 252, 0, 0.08467702479338843, 0.055987884365424005, 248.0, 248.0, 248.0, 0, 1, 1, -360, 64.03699999999999 ],
[529, 253, 0, 0.04859504132231405, 0.12852286961777998, 495.0, 495.0, 495.0, 0, 1, 1, -360, 73.5 ],
[237, 239, 0, 0.03309421487603306, 0.08752669712542799, 495.0, 495.0, 495.0, 0, 1, 1, -360, 50.055 ],
[254, 238, 0, 0.07815008264462811, 0.05167231372274401, 248.0, 248.0, 248.0, 0, 1, 1, -360, 59.101000000000006 ],
[69, 255, 0, 0.0009369806094182826, 0.134541235754472, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 10.824000000000002 ],
[510, 225, 0, 0.021953719008264466, 0.232250442756508, 991.0, 991.0, 991.0, 0, 1, 1, -360, 66.41 ],
[256, 257, 0, 0.010125619834710746, 0.0267799693631888, 495.0, 495.0, 495.0, 0, 1, 1, -360, 15.315 ],
[258, 190, 0, 0.011717451523545707, 0.10515695255750121, 856.0, 856.0, 856.0, 0, 1, 1, -360, 33.84 ],
[258, 259, 0, 0.015782548476454293, 0.1416387085570408, 856.0, 856.0, 856.0, 0, 1, 1, -360, 45.58 ],
[260, 261, 0, 0.006791031855955679, 0.9751256416231477, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 78.45 ],
[554, 553, 0, 0.17583338842975205, 0.11625986438453201, 248.0, 248.0, 248.0, 0, 1, 1, -360, 132.974 ],
[515, 263, 0, 0.006987107438016529, 0.0739172618295936, 991.0, 991.0, 991.0, 0, 2, 1, -360, 21.136 ],
[14, 264, 0, 0.01700694214876033, 0.17991802858084, 991.0, 991.0, 991.0, 0, 1, 1, -360, 51.446000000000005 ],
[116, 555, 0, 0.0009768595041322315, 0.0103342878835768, 991.0, 991.0, 991.0, 0, 2, 1, -360, 2.955 ],
[151, 116, 0, 0.007244958677685951, 0.0191612735410668, 495.0, 495.0, 495.0, 0, 1, 1, -360, 10.958 ],
[111, 114, 0, 0.008806613573407202, 0.3161358573133961, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 50.867 ],
[77, 111, 0, 0.00288452216066482, 0.41418912211817605, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 33.321999999999996 ],
[266, 525, 0, 0.01042909090909091, 0.027582581569373602, 495.0, 495.0, 495.0, 0, 1, 1, -360, 15.774000000000001 ],
[267, 120, 0, 0.013136945983379503, 0.471584184581432, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 75.87899999999999 ],
[268, 269, 0, 0.0010327272727272726, 0.0027313295556817604, 495.0, 495.0, 495.0, 0, 1, 1, -360, 1.5619999999999998 ],
[556, 271, 0, 0.052289586776859506, 0.0345735262323792, 248.0, 248.0, 248.0, 0, 1, 1, -360, 39.544000000000004 ],
[556, 272, 0, 0.04685355371900827, 0.030979257409249603, 248.0, 248.0, 248.0, 0, 1, 1, -360, 35.433 ],
[529, 273, 0, 0.0034604958677685953, 0.009152227205140799, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.234 ],
[128, 274, 0, 0.0029350761772853184, 0.1053620459045884, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.953 ],
[34, 275, 0, 0.0008290909090909092, 0.00054818938265696, 248.0, 248.0, 248.0, 0, 1, 1, -360, 0.627 ],
[503, 276, 0, 0.006707438016528925, 0.07095861291266, 991.0, 991.0, 991.0, 0, 2, 1, -360, 20.29 ],
[503, 504, 0, 0.06432727272727272, 0.680524223098808, 991.0, 991.0, 991.0, 0, 2, 1, -360, 194.59 ],
[177, 218, 0, 0.04330380165289256, 0.114528740018308, 495.0, 495.0, 495.0, 0, 1, 1, -360, 65.497 ],
[277, 278, 0, 0.007191135734072023, 1.032576638635032, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 83.072 ],
[557, 558, 0, 0.04341289256198347, 0.258338836678648, 743.0, 743.0, 743.0, 0, 1, 1, -360, 98.493 ],
[557, 559, 0, 0.03415867768595042, 0.09034195998366001, 495.0, 495.0, 495.0, 0, 1, 1, -360, 51.665 ],
[559, 558, 0, 0.04474314049586777, 0.11833546501370001, 495.0, 495.0, 495.0, 0, 1, 1, -360, 67.67399999999999 ],
[277, 78, 0, 0.03585768698060942, 0.32180078416049196, 856.0, 856.0, 856.0, 0, 1, 1, -360, 103.557 ],
[277, 279, 0, 0.021390927977839334, 0.191970480441328, 856.0, 856.0, 856.0, 0, 1, 1, -360, 61.777 ],
[78, 279, 0, 0.015811980609418283, 0.1419028439283376, 856.0, 856.0, 856.0, 0, 1, 1, -360, 45.665 ],
[281, 282, 0, 0.0023178670360110803, 0.08320574945862161, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.388 ],
[283, 161, 0, 0.036741157024793386, 0.09717203248350399, 495.0, 495.0, 495.0, 0, 2, 1, -360, 55.571000000000005 ],
[268, 161, 0, 0.018883636363636366, 0.199771751868832, 991.0, 991.0, 991.0, 0, 2, 1, -360, 57.123000000000005 ],
[256, 284, 0, 0.010755371900826446, 0.113782083346976, 991.0, 991.0, 991.0, 0, 2, 1, -360, 32.535 ],
[515, 516, 0, 0.04071140495867769, 0.107672438361532, 495.0, 495.0, 495.0, 0, 1, 1, -360, 61.576 ],
[263, 516, 0, 0.0030355371900826445, 0.128452925198488, 1981.0, 1981.0, 1981.0, 0, 2, 1, -360, 18.365 ],
[516, 285, 0, 0.006908429752066116, 0.018271230811372, 495.0, 495.0, 495.0, 0, 1, 1, -360, 10.449000000000002 ],
[63, 286, 0, 0.019088925619834708, 0.050485881518556, 495.0, 495.0, 495.0, 0, 1, 1, -360, 28.872 ],
[287, 516, 0, 0.01732892561983471, 0.011457770111127998, 248.0, 248.0, 248.0, 0, 1, 1, -360, 13.105 ],
[8, 102, 0, 0.015100069252077563, 0.542055501663692, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 87.21799999999999 ],
[8, 101, 0, 0.019246883656509697, 0.69091598202144, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 111.17 ],
[80, 288, 0, 0.007984072022160666, 0.2866086302684072, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 46.11600000000001 ],
[80, 289, 0, 0.0003782317636201524, 0.122198345223416, 5134.0, 5134.0, 5134.0, 0, 4, 1, -360, 6.553999999999999 ],
[276, 560, 0, 0.01778314049586777, 0.047032375838192794, 495.0, 495.0, 495.0, 0, 2, 1, -360, 26.897 ],
[37, 290, 0, 0.005629501385041551, 0.4546919507138321, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 48.773999999999994 ],
[290, 74, 0, 0.02071595106187673, 1.673216783321968, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 179.483 ],
[512, 291, 0, 0.0053299173553719, 0.056385693247479204, 991.0, 991.0, 991.0, 0, 2, 1, -360, 16.123 ],
[78, 292, 0, 0.0058149815327908595, 0.469673087481408, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 50.381 ],
[199, 548, 0, 0.0015530578512396695, 0.00410748599634868, 495.0, 495.0, 495.0, 0, 1, 1, -360, 2.349 ],
[491, 293, 0, 0.014176528925619833, 0.009373426429729999, 248.0, 248.0, 248.0, 0, 1, 1, -360, 10.720999999999998 ],
[4, 294, 0, 9.669321329639889e-05, 0.013884198109531681, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 1.117 ],
[490, 541, 0, 0.050580495867768596, 0.133773946861896, 495.0, 495.0, 495.0, 0, 1, 1, -360, 76.503 ],
[491, 295, 0, 0.010613553719008264, 0.028070443890777202, 495.0, 495.0, 495.0, 0, 1, 1, -360, 16.053 ],
[491, 296, 0, 0.004400661157024794, 0.0116387512948784, 495.0, 495.0, 495.0, 0, 1, 1, -360, 6.656000000000001 ],
[295, 297, 0, 0.020297520661157024, 0.053682341459340005, 495.0, 495.0, 495.0, 0, 1, 1, -360, 30.7 ],
[508, 161, 0, 0.023239669421487603, 0.061463658055360006, 495.0, 495.0, 495.0, 0, 1, 1, -360, 35.15 ],
[117, 123, 0, 0.005876211911357341, 0.21094161505628, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 33.941 ],
[133, 117, 0, 0.004469182825484764, 0.0401081792747688, 856.0, 856.0, 856.0, 0, 1, 1, -360, 12.907 ],
[71, 74, 0, 0.03904524469065097, 0.7884161162841721, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 169.144 ],
[74, 278, 0, 0.0077122576177285325, 1.10740463560792, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 89.09200000000001 ],
[298, 515, 0, 0.021701157024793388, 0.05739464148919599, 495.0, 495.0, 495.0, 0, 1, 1, -360, 32.823 ],
[5, 299, 0, 0.0016232686980609415, 0.058271370400665996, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 9.376 ],
[32, 292, 0, 0.009679362880886427, 0.34746541983297996, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 55.908 ],
[5, 29, 0, 0.00743395083102493, 1.0674425076571843, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 85.87700000000001 ],
[503, 560, 0, 0.015140495867768593, 0.160172719142436, 991.0, 991.0, 991.0, 0, 1, 1, -360, 45.8 ],
[300, 301, 0, 0.004892053324099723, 0.7024509290644521, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 56.513000000000005 ],
[51, 300, 0, 0.002573493767313019, 0.3695284920307039, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 29.729 ],
[244, 302, 0, 0.007714508310249307, 1.107727813004004, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 89.118 ],
[31, 302, 0, 0.004369113573407203, 0.6273619041941161, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 50.472 ],
[51, 282, 0, 0.006288434903047093, 0.9029576432132521, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 72.64399999999999 ],
[303, 304, 0, 8.795013850415512e-05, 0.000789298639172312, 856.0, 856.0, 856.0, 0, 1, 1, -360, 0.254 ],
[305, 304, 0, 0.003881117266849031, 0.0783689646873844, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 16.813 ],
[305, 259, 0, 0.0025625, 0.36794989475177603, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 29.601999999999997 ],
[306, 307, 0, 0.03223268698060942, 0.289268628831688, 856.0, 856.0, 856.0, 0, 1, 1, -360, 93.088 ],
[305, 308, 0, 0.0024272853185595567, 0.0217833994511184, 856.0, 856.0, 856.0, 0, 1, 1, -360, 7.01 ],
[305, 309, 0, 0.011014773776523545, 0.22241441259921202, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 47.716 ],
[310, 309, 0, 0.009565962603878117, 0.343394627639832, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 55.253 ],
[306, 309, 0, 0.035333795013850415, 0.31709917455019604, 856.0, 856.0, 856.0, 0, 1, 1, -360, 102.044 ],
[311, 280, 0, 0.003433691135734072, 0.1232611016590444, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 19.833 ],
[280, 278, 0, 0.009749769159764544, 0.7874838737974121, 2567.0, 2567.0, 2567.0, 0, 1, 1, -360, 84.47200000000001 ],
[311, 32, 0, 0.01205909510619806, 0.9740069506375919, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 104.48 ],
[13, 312, 0, 0.0043324965373961214, 0.622104056565324, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 50.049 ],
[313, 314, 0, 0.006092624653739613, 0.218710302449316, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 35.191 ],
[312, 313, 0, 0.00893957756232687, 0.32090893884734, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 51.635 ],
[547, 566, 0, 0.027035702479338848, 0.286013220297816, 991.0, 991.0, 991.0, 0, 1, 1, -360, 81.783 ],
[245, 315, 0, 0.014162569252077564, 0.508401547875772, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 81.803 ],
[312, 316, 0, 8.803670360110802e-05, 0.01264120812658816, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 1.0170000000000001 ],
[312, 314, 0, 0.005339854570637119, 0.191687700220296, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 30.843000000000004 ],
[554, 546, 0, 0.08174743801652892, 0.21620344446439202, 495.0, 495.0, 495.0, 0, 1, 1, -360, 123.64299999999999 ],
[262, 216, 0, 0.042641966759002774, 0.38268554099981195, 856.0, 856.0, 856.0, 0, 1, 1, -360, 123.15 ],
[317, 233, 0, 0.005647276084951523, 0.114031901035644, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 24.464000000000002 ],
[318, 317, 0, 0.008311634349030471, 0.16783161497270002, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 36.006 ],
[231, 52, 0, 0.035263677285318554, 1.2658796434850879, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 203.683 ],
[319, 567, 0, 0.006089586776859504, 0.0644223069721, 991.0, 991.0, 991.0, 0, 1, 1, -360, 18.421 ],
[557, 321, 0, 0.010004628099173555, 0.10583989458750401, 991.0, 991.0, 991.0, 0, 2, 1, -360, 30.264 ],
[277, 65, 0, 0.009430170821779778, 0.7616700793261759, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 81.703 ],
[322, 288, 0, 0.006545013850415513, 0.528637424797136, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 56.706 ],
[322, 323, 0, 0.0018503000923372577, 0.14944779312484, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 16.031 ],
[277, 324, 0, 0.019719529085872576, 0.39818407235049996, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 85.425 ],
[324, 325, 0, 0.01103508771932133, 0.22282459929396403, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 47.803999999999995 ],
[277, 325, 0, 0.008665743305609418, 0.174981914850048, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 37.54 ],
[326, 327, 0, 0.007654214876033058, 0.0202436634226288, 495.0, 495.0, 495.0, 0, 1, 1, -360, 11.577 ],
[328, 326, 0, 0.10300958677685952, 0.068109252150368, 248.0, 248.0, 248.0, 0, 1, 1, -360, 77.90100000000001 ],
[328, 327, 0, 0.09827173553719008, 0.064976616491468, 248.0, 248.0, 248.0, 0, 1, 1, -360, 74.318 ],
[326, 329, 0, 0.028062148760330575, 0.07421802283046801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 42.443999999999996 ],
[568, 329, 0, 0.05699900826446282, 0.15074945731414802, 495.0, 495.0, 495.0, 0, 1, 1, -360, 86.211 ],
[568, 326, 0, 0.03218644628099173, 0.08512585494846397, 495.0, 495.0, 495.0, 0, 1, 1, -360, 48.681999999999995 ],
[332, 78, 0, 0.006471029547541551, 0.522661750455416, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 56.065 ],
[333, 306, 0, 0.008580159279778392, 0.308006702824228, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 49.559 ],
[332, 333, 0, 0.007504674515235457, 0.26939943395502003, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 43.347 ],
[332, 334, 0, 0.017124653739612188, 0.15368328149175597, 856.0, 856.0, 856.0, 0, 1, 1, -360, 49.456 ],
[66, 334, 0, 0.030625, 0.27484062260471603, 856.0, 856.0, 856.0, 0, 1, 1, -360, 88.445 ],
[330, 335, 0, 0.00550536703601108, 0.790516769355108, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 63.598 ],
[336, 66, 0, 0.015054362880886425, 0.1351036887216764, 856.0, 856.0, 856.0, 0, 1, 1, -360, 43.477 ],
[330, 336, 0, 0.039036357340720224, 0.350327404269788, 856.0, 856.0, 856.0, 0, 1, 1, -360, 112.73700000000001 ],
[68, 70, 0, 0.016314058171745152, 0.14640868261713597, 856.0, 856.0, 856.0, 0, 1, 1, -360, 47.115 ],
[509, 337, 0, 0.03494082644628099, 0.09241056617056001, 495.0, 495.0, 495.0, 0, 1, 1, -360, 52.848 ],
[324, 288, 0, 0.012627423822714683, 0.11332339674541761, 856.0, 856.0, 856.0, 0, 1, 1, -360, 36.468 ],
[338, 559, 0, 0.009228099173553718, 0.097624922595552, 991.0, 991.0, 991.0, 0, 2, 1, -360, 27.915 ],
[339, 559, 0, 0.03560595041322315, 0.023542417076125203, 248.0, 248.0, 248.0, 0, 1, 1, -360, 26.927 ],
[339, 340, 0, 0.08711537190082644, 0.23040041287850396, 495.0, 495.0, 495.0, 0, 1, 1, -360, 131.762 ],
[559, 340, 0, 0.20983272727272728, 0.138740000599684, 248.0, 248.0, 248.0, 0, 1, 1, -360, 158.686 ],
[341, 292, 0, 0.0009329409048961218, 0.07535316024134399, 2567.0, 2567.0, 2567.0, 0, 1, 1, -360, 8.083 ],
[557, 342, 0, 0.006019834710743802, 0.0636843933534336, 991.0, 991.0, 991.0, 0, 2, 1, -360, 18.21 ],
[558, 343, 0, 0.010650247933884296, 0.11266996708783199, 991.0, 991.0, 991.0, 0, 1, 1, -360, 32.217 ],
[502, 340, 0, 0.021737520661157025, 0.22996326026071198, 991.0, 991.0, 991.0, 0, 2, 1, -360, 65.756 ],
[72, 32, 0, 0.00675502077562327, 0.969954803293024, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 78.03399999999999 ],
[344, 345, 0, 0.0005762927054480609, 0.04654686738645321, 2567.0, 2567.0, 2567.0, 0, 1, 1, -360, 4.993 ],
[346, 47, 0, 0.0011340027700831024, 0.04070792194158799, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 6.55 ],
[46, 47, 0, 0.0008975069252077563, 0.0322183003580208, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 5.184 ],
[346, 345, 0, 0.0007217797783933517, 0.025910126194627202, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 4.169 ],
[347, 328, 0, 0.029905454545454544, 0.07909314882361201, 495.0, 495.0, 495.0, 0, 1, 1, -360, 45.232 ],
[347, 348, 0, 0.04883438016528925, 0.129155866607944, 495.0, 495.0, 495.0, 0, 1, 1, -360, 73.862 ],
[571, 348, 0, 0.041548429752066116, 0.10988617921762801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 62.842 ],
[347, 572, 0, 0.016052231404958678, 0.04245451362512801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 24.279 ],
[571, 570, 0, 0.17379041322314048, 0.11490906279551602, 248.0, 248.0, 248.0, 0, 1, 1, -360, 131.429 ],
[14, 350, 0, 0.02166743801652892, 0.05730546235524, 495.0, 495.0, 495.0, 0, 1, 1, -360, 32.772 ],
[350, 573, 0, 0.026277685950413226, 0.06949852316919598, 495.0, 495.0, 495.0, 0, 1, 1, -360, 39.745 ],
[15, 351, 0, 0.02639265927977839, 0.236857956201204, 856.0, 856.0, 856.0, 0, 1, 1, -360, 76.222 ],
[352, 15, 0, 0.0015260560941828254, 0.219126704094076, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 17.629 ],
[15, 335, 0, 0.0035338758079432133, 1.1417173740880242, 5134.0, 5134.0, 5134.0, 0, 1, 1, -360, 61.235 ],
[232, 227, 0, 5.5747922437673134e-05, 0.000500303468136644, 1200.0, 1200.0, 1200.0, 0, 1, 1, -360, 0.161 ],
[565, 544, 0, 0.0394803305785124, 0.10441652566461601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 59.714 ],
[235, 567, 0, 0.02391404958677686, 0.25298896294275997, 991.0, 991.0, 991.0, 0, 1, 1, -360, 72.34 ],
[567, 286, 0, 0.008068760330578512, 0.34144067500694797, 1981.0, 1981.0, 1981.0, 0, 1, 1, -360, 48.816 ],
[353, 519, 0, 0.007621818181818182, 0.080631926038356, 991.0, 991.0, 991.0, 0, 1, 1, -360, 23.055999999999997 ],
[354, 353, 0, 0.0008436363636363636, 0.00892490784392768, 991.0, 991.0, 991.0, 0, 2, 1, -360, 2.552 ],
[355, 354, 0, 0.0068502479338842966, 0.0181173530898976, 495.0, 495.0, 495.0, 0, 1, 1, -360, 10.360999999999999 ],
[354, 356, 0, 0.01855404958677686, 0.049071255647172, 495.0, 495.0, 495.0, 0, 1, 1, -360, 28.063000000000002 ],
[357, 358, 0, 0.0034823407202216067, 0.5000300103406239, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 40.228 ],
[574, 359, 0, 0.013352066115702478, 0.0353131884615884, 495.0, 495.0, 495.0, 0, 1, 1, -360, 20.195 ],
[235, 575, 0, 0.007459504132231404, 0.0789147905557, 991.0, 991.0, 991.0, 0, 1, 1, -360, 22.565 ],
[167, 361, 0, 0.000616198347107438, 0.0065188198358579995, 991.0, 991.0, 991.0, 0, 1, 1, -360, 1.864 ],
[528, 362, 0, 0.0011960330578512398, 0.012652945368078402, 991.0, 991.0, 991.0, 0, 1, 1, -360, 3.6180000000000003 ],
[363, 344, 0, 0.0002662742382271468, 0.009558592968871479, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.538 ],
[259, 364, 0, 0.013069713758102496, 0.26390852570525997, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 56.618 ],
[54, 56, 0, 0.007723337950138504, 0.0693122289241068, 856.0, 856.0, 856.0, 0, 1, 1, -360, 22.305 ],
[365, 364, 0, 0.0049974607571537395, 0.10091058802821559, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 21.649 ],
[231, 366, 0, 0.0013273891966759002, 0.0476500209962672, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 7.667000000000001 ],
[30, 367, 0, 0.01126108033240997, 0.1010613005635992, 856.0, 856.0, 856.0, 0, 1, 1, -360, 32.522 ],
[61, 367, 0, 0.020337603878116343, 0.18251754162067196, 856.0, 856.0, 856.0, 0, 1, 1, -360, 58.735 ],
[254, 368, 0, 0.0004297520661157025, 0.00454638722456732, 991.0, 991.0, 991.0, 0, 1, 1, -360, 1.3 ],
[254, 369, 0, 0.00015999999999999999, 0.00169265493591832, 991.0, 991.0, 991.0, 0, 2, 1, -360, 0.484 ],
[254, 370, 0, 0.0003669421487603306, 0.0038819152455960805, 991.0, 991.0, 991.0, 0, 2, 1, -360, 1.11 ],
[99, 358, 0, 0.0020184383656509696, 0.28982797432374396, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 23.316999999999997 ],
[354, 519, 0, 0.006762644628099174, 0.07154264880985199, 991.0, 991.0, 991.0, 0, 1, 1, -360, 20.457 ],
[571, 371, 0, 0.023726942148760328, 0.06275238397221199, 495.0, 495.0, 495.0, 0, 1, 1, -360, 35.887 ],
[207, 372, 0, 0.002329256198347108, 0.006160354689297601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 3.523 ],
[57, 373, 0, 0.0017725619834710745, 0.0046880246727212796, 495.0, 495.0, 495.0, 0, 1, 1, -360, 2.681 ],
[209, 374, 0, 0.0010122922437673131, 0.0363388121515216, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 5.847 ],
[375, 376, 0, 0.0045364727608518006, 0.0916021467933684, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 19.652 ],
[376, 377, 0, 0.0030886426592797783, 0.062367022394423606, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 13.38 ],
[16, 49, 0, 0.002266101108033241, 0.32538991773524, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 26.178 ],
[318, 377, 0, 0.004755078485685596, 0.0960163149704152, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 20.599 ],
[378, 297, 0, 0.01753917355371901, 0.046387138574374404, 495.0, 495.0, 495.0, 0, 1, 1, -360, 26.528000000000002 ],
[562, 379, 0, 0.01802314049586777, 0.047667121439141605, 495.0, 495.0, 495.0, 0, 1, 1, -360, 27.26 ],
[576, 563, 0, 0.001808264462809917, 0.004782449638150801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 2.735 ],
[576, 381, 0, 0.0034320661157024794, 0.009077036954898, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.191 ],
[577, 576, 0, 0.06004495867768594, 0.15880530575430396, 495.0, 495.0, 495.0, 0, 1, 1, -360, 90.818 ],
[244, 383, 0, 0.006845567867036011, 0.1382282547912684, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 29.655 ],
[244, 306, 0, 0.02679108956599723, 0.5409756541164079, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 116.059 ],
[383, 306, 0, 0.0300685595567867, 0.269846910348376, 856.0, 856.0, 856.0, 0, 1, 1, -360, 86.838 ],
[380, 306, 0, 0.00025605955678670365, 0.03676764369572, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 2.958 ],
[252, 225, 0, 0.062094545454545444, 0.041056499553586, 248.0, 248.0, 248.0, 0, 1, 1, -360, 46.958999999999996 ],
[220, 76, 0, 0.002772074099722992, 0.398042682239984, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 32.023 ],
[542, 384, 0, 0.007939834710743802, 0.020999063146094, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.009 ],
[385, 384, 0, 0.053734876033057856, 0.035529141854791196, 248.0, 248.0, 248.0, 0, 1, 1, -360, 40.637 ],
[542, 385, 0, 0.011306115702479337, 0.119608453436296, 991.0, 991.0, 991.0, 0, 2, 1, -360, 34.201 ],
[386, 385, 0, 0.003668760330578512, 0.0388121580140316, 991.0, 991.0, 991.0, 0, 1, 1, -360, 11.097999999999999 ],
[387, 578, 0, 0.015444628099173553, 0.16339016240905604, 991.0, 991.0, 991.0, 0, 1, 1, -360, 46.72 ],
[332, 388, 0, 0.014036184210526315, 0.5038646344377999, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 81.07300000000001 ],
[382, 332, 0, 0.017764369806094183, 0.637697365901468, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 102.60700000000001 ],
[382, 388, 0, 0.00476159972299169, 0.17092976750548, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 27.503 ],
[579, 578, 0, 0.01911074380165289, 0.050543585664, 495.0, 495.0, 495.0, 0, 1, 1, -360, 28.905 ],
[577, 387, 0, 0.07597818181818182, 0.20094506949431204, 495.0, 495.0, 495.0, 0, 1, 1, -360, 114.917 ],
[144, 390, 0, 0.0004277685950413223, 0.0011313509747276, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.647 ],
[37, 49, 0, 0.008441481994459835, 0.303028527944352, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 48.758 ],
[391, 233, 0, 0.014211218836565096, 0.1275369872004348, 856.0, 856.0, 856.0, 0, 1, 1, -360, 41.042 ],
[392, 310, 0, 0.007035318559556785, 0.06313767618386361, 856.0, 856.0, 856.0, 0, 1, 1, -360, 20.317999999999998 ],
[260, 393, 0, 0.006341412742382271, 0.0569102963692744, 856.0, 856.0, 856.0, 0, 1, 1, -360, 18.314 ],
[394, 230, 0, 0.0007590027700831025, 0.00681158510656168, 856.0, 856.0, 856.0, 0, 1, 1, -360, 2.1919999999999997 ],
[395, 282, 0, 0.008762984764542936, 0.314569689934484, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 50.615 ],
[395, 244, 0, 0.0034046052631578946, 0.12221699007344, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 19.665 ],
[25, 396, 0, 0.008809037396121884, 0.316222866612064, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 50.881 ],
[81, 74, 0, 0.0075207756232686974, 0.26997742429652244, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 43.44 ],
[278, 80, 0, 0.016286011080332407, 0.5846279085788, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 94.068 ],
[81, 278, 0, 0.021054016620498613, 0.755787629231688, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 121.60799999999999 ],
[569, 570, 0, 0.03253950413223141, 0.08605961294018, 495.0, 495.0, 495.0, 0, 1, 1, -360, 49.216 ],
[397, 552, 0, 0.006289586776859504, 0.0166345314104904, 1200.0, 1200.0, 1200.0, 0, 1, 1, -360, 9.513 ],
[542, 398, 0, 0.0005580165289256199, 0.0059033089500572, 991.0, 991.0, 991.0, 0, 1, 1, -360, 1.6880000000000002 ],
[398, 385, 0, 0.021893553719008262, 0.05790348713648401, 495.0, 495.0, 495.0, 0, 1, 1, -360, 33.114000000000004 ],
[399, 499, 0, 0.03266380165289256, 0.021597087927192803, 248.0, 248.0, 248.0, 0, 1, 1, -360, 24.701999999999998 ],
[83, 399, 0, 0.025700495867768593, 0.016992996557050798, 248.0, 248.0, 248.0, 0, 1, 1, -360, 19.436 ],
[498, 400, 0, 0.012134214876033058, 0.032092247974028, 495.0, 495.0, 495.0, 0, 1, 1, -360, 18.352999999999998 ],
[518, 239, 0, 0.04685289256198347, 0.123915281026504, 495.0, 495.0, 495.0, 0, 1, 1, -360, 70.865 ],
[575, 543, 0, 0.0030307438016528923, 0.032062521596058796, 991.0, 991.0, 991.0, 0, 1, 1, -360, 9.168 ],
[401, 360, 0, 0.007957063711911357, 0.071409774520472, 856.0, 856.0, 856.0, 0, 1, 1, -360, 22.98 ],
[580, 581, 0, 0.007134545454545454, 0.018869255592422397, 495.0, 495.0, 495.0, 0, 1, 1, -360, 10.790999999999999 ],
[401, 402, 0, 0.0033434903047091418, 0.030005778188384805, 856.0, 856.0, 856.0, 0, 1, 1, -360, 9.656 ],
[403, 231, 0, 0.009592105263157893, 0.08608327126915, 856.0, 856.0, 856.0, 0, 1, 1, -360, 27.701999999999998 ],
[189, 360, 0, 0.028456024930747923, 0.255375399471348, 856.0, 856.0, 856.0, 0, 1, 1, -360, 82.181 ],
[234, 404, 0, 0.008092561983471074, 0.0214029921648796, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.24 ],
[235, 404, 0, 0.05107504132231405, 0.13508190749437998, 495.0, 495.0, 495.0, 0, 1, 1, -360, 77.251 ],
[235, 580, 0, 0.000580495867768595, 0.00153527999352772, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.878 ],
[216, 259, 0, 0.0022115650969529088, 0.079389770210892, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 12.774000000000001 ],
[405, 259, 0, 0.0052832409972299165, 0.1896554115982928, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 30.516 ],
[405, 318, 0, 0.0066348684210526315, 0.23817552558268398, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 38.323 ],
[406, 230, 0, 8.098164819944598e-05, 0.046512685161986804, 6845.0, 6845.0, 6845.0, 0, 1, 1, -360, 1.871 ],
[542, 407, 0, 0.025569586776859506, 0.067625761355152, 495.0, 495.0, 495.0, 0, 1, 1, -360, 38.674 ],
[23, 408, 0, 0.03224528925619835, 0.08528148128033601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 48.771 ],
[577, 348, 0, 0.012999008264462809, 0.13751772188026398, 991.0, 991.0, 991.0, 0, 2, 1, -360, 39.321999999999996 ],
[562, 564, 0, 0.06921520661157024, 0.18305853298686803, 495.0, 495.0, 495.0, 0, 1, 1, -360, 104.68799999999999 ],
[582, 507, 0, 0.006357685950413223, 0.016814638289042002, 495.0, 495.0, 495.0, 0, 1, 1, -360, 9.616 ],
[27, 410, 0, 0.0030042975206611565, 0.007945685980170399, 495.0, 495.0, 495.0, 0, 1, 1, -360, 4.544 ],
[501, 27, 0, 0.003811570247933884, 0.040322957460962, 991.0, 991.0, 991.0, 0, 1, 1, -360, 11.53 ],
[27, 411, 0, 0.004648595041322314, 0.012294480221518, 495.0, 495.0, 495.0, 0, 1, 1, -360, 7.031000000000001 ],
[411, 410, 0, 0.002054214876033058, 0.0054329327333556, 495.0, 495.0, 495.0, 0, 1, 1, -360, 3.1069999999999998 ],
[403, 360, 0, 0.008191481994459833, 0.07351353506655639, 856.0, 856.0, 856.0, 0, 1, 1, -360, 23.656999999999996 ],
[412, 360, 0, 0.016761772853185596, 0.15042664773666, 856.0, 856.0, 856.0, 0, 1, 1, -360, 48.408 ],
[326, 413, 0, 0.012077024793388432, 0.12776397267356798, 991.0, 991.0, 991.0, 0, 2, 1, -360, 36.533 ],
[414, 413, 0, 0.008093223140495867, 0.08561896310149601, 991.0, 991.0, 991.0, 0, 2, 1, -360, 24.482 ],
[6, 297, 0, 0.019472396694214876, 0.0128750188978664, 248.0, 248.0, 248.0, 0, 1, 1, -360, 14.725999999999999 ],
[554, 580, 0, 0.07435371900826447, 0.196648733567264, 495.0, 495.0, 495.0, 0, 1, 1, -360, 112.46 ],
[262, 401, 0, 0.03931232686980609, 0.35280406181043206, 856.0, 856.0, 856.0, 0, 1, 1, -360, 113.53399999999999 ],
[499, 556, 0, 0.04185586776859504, 0.11069928308639199, 495.0, 495.0, 495.0, 0, 2, 1, -360, 63.306999999999995 ],
[224, 229, 0, 0.004135206611570248, 0.0437467367631624, 991.0, 991.0, 991.0, 0, 1, 1, -360, 12.509 ],
[583, 507, 0, 0.024632727272727268, 0.065147980317596, 495.0, 495.0, 495.0, 0, 1, 1, -360, 37.257 ],
[415, 307, 0, 0.015675554016620498, 0.1406784987952448, 856.0, 856.0, 856.0, 0, 1, 1, -360, 45.271 ],
[416, 507, 0, 0.0010555371900826446, 0.011166626467730801, 991.0, 991.0, 991.0, 0, 1, 1, -360, 3.193 ],
[284, 561, 0, 0.015221487603305786, 0.16102953827307598, 991.0, 991.0, 991.0, 0, 1, 1, -360, 46.045 ],
[543, 417, 0, 0.0006614876033057851, 0.027991756419545603, 1981.0, 1981.0, 1981.0, 0, 4, 1, -360, 4.002 ],
[418, 506, 0, 0.0009395041322314049, 0.009939101917118, 991.0, 991.0, 991.0, 0, 1, 1, -360, 2.842 ],
[220, 157, 0, 0.004599549861495845, 0.165112574384632, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 26.566999999999997 ],
[295, 419, 0, 0.0012023140495867769, 0.012719392565946, 991.0, 991.0, 991.0, 0, 1, 1, -360, 3.637 ],
[295, 420, 0, 0.0008003305785123967, 0.008466771900532, 991.0, 991.0, 991.0, 0, 1, 1, -360, 2.421 ],
[541, 62, 0, 0.05133355371900827, 0.0339414035471236, 248.0, 248.0, 248.0, 0, 1, 1, -360, 38.821 ],
[52, 421, 0, 0.00013885041551246538, 0.004984389831631239, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.802 ],
[60, 160, 0, 6.128808864265928e-05, 0.000550023067454096, 856.0, 856.0, 856.0, 0, 2, 1, -360, 0.177 ],
[535, 161, 0, 3.735537190082645e-05, 0.00039518596644331203, 991.0, 991.0, 991.0, 0, 2, 1, -360, 0.113 ],
[267, 282, 0, 0.0065652700831024926, 0.235677115717012, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 37.921 ],
[52, 365, 0, 0.007655586334279779, 0.15458444922992, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 33.164 ],
[28, 27, 0, 0.015726942148760328, 0.041594197273402404, 495.0, 495.0, 495.0, 0, 1, 1, -360, 23.787 ],
[30, 201, 0, 0.009128289473684211, 0.327683234253536, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 52.725 ],
[422, 81, 0, 0.0004226685133887349, 0.13655487952674, 5134.0, 5134.0, 5134.0, 0, 6, 1, -360, 7.324 ],
[119, 425, 0, 0.003579120498614958, 0.1284816595874996, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 20.673000000000002 ],
[423, 425, 0, 0.0006518351800554017, 0.0233992864289392, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 3.765 ],
[424, 425, 0, 0.005922957063711911, 0.21261965153389198, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 34.211 ],
[426, 428, 0, 0.013948429752066116, 0.14756174042535197, 991.0, 991.0, 991.0, 0, 2, 1, -360, 42.193999999999996 ],
[427, 428, 0, 0.0002664462809917355, 0.0028187600792304794, 991.0, 991.0, 991.0, 0, 2, 1, -360, 0.8059999999999999 ],
[19, 428, 0, 0.023607603305785128, 0.24974703912892798, 991.0, 991.0, 991.0, 0, 2, 1, -360, 71.413 ],
[45, 429, 0, 0.02562314049586777, 0.067767398802972, 495.0, 495.0, 495.0, 0, 1, 1, -360, 38.755 ],
[44, 429, 0, 5.289256198347107e-05, 0.00013988883767892, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.08 ],
[505, 429, 0, 0.006012561983471073, 0.015901863623161996, 495.0, 495.0, 495.0, 0, 1, 1, -360, 9.094 ],
[231, 431, 0, 0.011677285318559558, 0.4191859418495199, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 67.44800000000001 ],
[190, 431, 0, 0.009600761772853185, 0.34464383257266795, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 55.45399999999999 ],
[430, 431, 0, 0.0028100761772853187, 0.1008748520662472, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.230999999999998 ],
[286, 433, 0, 0.01568694214876033, 0.16595362535967603, 991.0, 991.0, 991.0, 0, 1, 1, -360, 47.453 ],
[432, 433, 0, 0.00010049586776859504, 0.00106315516636076, 991.0, 991.0, 991.0, 0, 1, 1, -360, 0.304 ],
[506, 433, 0, 0.0065904132231404955, 0.06972059669946801, 991.0, 991.0, 991.0, 0, 1, 1, -360, 19.936 ],
[23, 434, 0, 0.02613685950413223, 0.069126069139116, 495.0, 495.0, 495.0, 0, 2, 1, -360, 39.532 ],
[400, 434, 0, 0.008155371900826446, 0.021569110159669603, 495.0, 495.0, 495.0, 0, 2, 1, -360, 12.335 ],
[500, 434, 0, 0.006338512396694216, 0.0167639285853336, 495.0, 495.0, 495.0, 0, 2, 1, -360, 9.587 ],
[32, 436, 0, 0.0044813019390581715, 0.16086776359270402, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 25.884 ],
[435, 436, 0, 0.0006634349030470914, 0.023815688073266, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 3.832 ],
[78, 436, 0, 0.00897680055401662, 0.32224515307884394, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 51.85 ],
[86, 438, 0, 0.014693213296398892, 0.52745036936438, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 84.868 ],
[437, 438, 0, 1.0387811634349031e-05, 0.0003728969948845, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.06 ],
[221, 438, 0, 0.002280124653739612, 0.081850890377238, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.17 ],
[207, 439, 0, 0.055703801652892564, 0.0368309823503996, 248.0, 248.0, 248.0, 0, 1, 1, -360, 42.126000000000005 ],
[516, 439, 0, 0.05448462809917355, 0.03602487292327441, 248.0, 248.0, 248.0, 0, 1, 1, -360, 41.20399999999999 ],
[513, 439, 0, 0.046726611570247926, 0.0308953241066316, 248.0, 248.0, 248.0, 0, 1, 1, -360, 35.336999999999996 ],
[181, 441, 0, 0.040805289256198356, 0.10792074104825197, 495.0, 495.0, 495.0, 0, 1, 1, -360, 61.718 ],
[440, 441, 0, 0.0001322314049586777, 0.000349722094197784, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.2 ],
[504, 441, 0, 0.05916099173553719, 0.156467413554364, 495.0, 495.0, 495.0, 0, 1, 1, -360, 89.48100000000001 ],
[135, 442, 0, 0.004956890581717451, 0.177940231009092, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 28.631 ],
[109, 442, 0, 0.0015380886426592797, 0.055213615042649204, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 8.884 ],
[112, 442, 0, 0.0027304362880886425, 0.09801597510545401, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 15.770999999999999 ],
[113, 443, 0, 0.0019885734072022164, 0.07138491472072879, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 11.485999999999999 ],
[132, 443, 0, 0.006788434903047091, 0.24368818615747198, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 39.21 ],
[107, 443, 0, 2.2333795013850418e-05, 0.000801728539002036, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.129 ],
[444, 445, 0, 7.877423822714682e-05, 0.00282780221121528, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.455 ],
[112, 445, 0, 0.002816135734072022, 0.101092375313206, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.266 ],
[109, 445, 0, 0.0014354224376731304, 0.0515281497432104, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 8.291 ],
[119, 447, 0, 0.005212690443213296, 0.74849127803204, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 60.217 ],
[100, 447, 0, 0.0050695117728531865, 0.7279322237145921, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 58.563 ],
[446, 447, 0, 2.9518698060941832e-05, 0.00423859584186224, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 0.341 ],
[124, 448, 0, 6.509695290858726e-05, 0.00233682116794768, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.376 ],
[125, 448, 0, 0.00615148891966759, 0.22082338542026803, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 35.531 ],
[131, 448, 0, 3.912742382271468e-05, 0.0014045786807313759, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.226 ],
[449, 450, 0, 0.0023614958448753462, 0.08477191683710039, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.64 ],
[173, 450, 0, 0.002862361495844876, 0.10275176694050518, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.533 ],
[184, 450, 0, 0.004022853185595568, 0.14441057621844403, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 23.236 ],
[144, 451, 0, 0.007672727272727273, 0.020292624515794402, 495.0, 495.0, 495.0, 0, 1, 1, -360, 11.605 ],
[140, 451, 0, 0.006991074380165291, 0.018489807120219602, 495.0, 495.0, 495.0, 0, 1, 1, -360, 10.574000000000002 ],
[514, 451, 0, 0.01149289256198347, 0.030396095817207994, 495.0, 495.0, 495.0, 0, 1, 1, -360, 17.383 ],
[537, 585, 0, 0.05072595041322314, 0.134158641165824, 495.0, 495.0, 495.0, 0, 1, 1, -360, 76.723 ],
[141, 585, 0, 0.007994710743801653, 0.0211441978151932, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.092 ],
[584, 585, 0, 9.256198347107438e-05, 0.000244805465938352, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.14 ],
[522, 454, 0, 0.0035008264462809916, 0.0092588924438956, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.295 ],
[144, 454, 0, 0.00452892561983471, 0.011977981726290799, 495.0, 495.0, 495.0, 0, 1, 1, -360, 6.85 ],
[453, 454, 0, 0.001114710743801653, 0.0029481572540882, 495.0, 495.0, 495.0, 0, 1, 1, -360, 1.686 ],
[199, 456, 0, 0.013063140495867768, 0.0086372614214612, 248.0, 248.0, 248.0, 0, 1, 1, -360, 9.879 ],
[140, 456, 0, 0.005061818181818182, 0.013387361765852802, 495.0, 495.0, 495.0, 0, 2, 1, -360, 7.656000000000001 ],
[455, 456, 0, 0.0011365289256198346, 0.00300586139962416, 495.0, 495.0, 495.0, 0, 2, 1, -360, 1.719 ],
[537, 456, 0, 0.039058512396694216, 0.025825228046024003, 248.0, 248.0, 248.0, 0, 1, 1, -360, 29.538 ],
[538, 457, 0, 0.027927272727272728, 0.0184653265736368, 248.0, 248.0, 248.0, 0, 1, 1, -360, 21.12 ],
[153, 457, 0, 0.030093223140495867, 0.019897438549384, 248.0, 248.0, 248.0, 0, 1, 1, -360, 22.758000000000003 ],
[176, 457, 0, 0.004579173553719009, 0.0030277190305137603, 248.0, 248.0, 248.0, 0, 1, 1, -360, 3.463 ],
[524, 459, 0, 0.004318677685950414, 0.011421923596476799, 495.0, 495.0, 495.0, 0, 1, 1, -360, 6.532 ],
[458, 459, 0, 0.001993388429752066, 0.0052720605700488, 495.0, 495.0, 495.0, 0, 1, 1, -360, 3.015 ],
[134, 459, 0, 0.011813553719008265, 0.031244171895617998, 495.0, 495.0, 495.0, 0, 1, 1, -360, 17.868 ],
[460, 461, 0, 6.611570247933885e-05, 0.000174861047098892, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.1 ],
[150, 461, 0, 0.008018512396694214, 0.021207147792120403, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.128 ],
[149, 461, 0, 0.005586115702479339, 0.0147740098693748, 495.0, 495.0, 495.0, 0, 1, 1, -360, 8.449 ],
[521, 463, 0, 0.014348429752066114, 0.009487086110365599, 248.0, 248.0, 248.0, 0, 1, 1, -360, 10.850999999999999 ],
[462, 463, 0, 0.007197355371900825, 0.0047588433967958406, 248.0, 248.0, 248.0, 0, 1, 1, -360, 5.443 ],
[538, 463, 0, 0.012211570247933883, 0.0080742088497664, 248.0, 248.0, 248.0, 0, 1, 1, -360, 9.235 ],
[110, 464, 0, 0.0025753116343490306, 0.0924473799817492, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 14.875 ],
[90, 464, 0, 0.007328947368421053, 0.26309125979076, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 42.332 ],
[165, 464, 0, 0.002152527700831025, 0.0772704722900764, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 12.433 ],
[458, 465, 0, 0.002003305785123967, 0.0052982897270776, 495.0, 495.0, 495.0, 0, 1, 1, -360, 3.03 ],
[134, 465, 0, 0.011838677685950413, 0.031310619093534, 495.0, 495.0, 495.0, 0, 1, 1, -360, 17.906 ],
[524, 465, 0, 0.004293553719008264, 0.0113554763986092, 495.0, 495.0, 495.0, 0, 1, 1, -360, 6.494 ],
[466, 467, 0, 0.0023509349030470914, 0.084392804892244, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.579 ],
[110, 467, 0, 0.0025337603878116343, 0.09095579200221118, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 14.635 ],
[165, 467, 0, 0.0022891274238227145, 0.08217406777274441, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.222000000000001 ],
[468, 469, 0, 0.0005269421487603305, 0.0013936425453786, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.797 ],
[541, 469, 0, 0.022390743801652895, 0.05921844221026801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 33.866 ],
[490, 469, 0, 0.028243305785123966, 0.07469714209944801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 42.718 ],
[263, 471, 0, 0.0371900826446281, 0.0245898347482832, 248.0, 248.0, 248.0, 0, 1, 1, -360, 28.125 ],
[470, 471, 0, 0.001570909090909091, 0.0010386746197682802, 248.0, 248.0, 248.0, 0, 1, 1, -360, 1.188 ],
[534, 471, 0, 0.024497190082644622, 0.0161973787927468, 248.0, 248.0, 248.0, 0, 1, 1, -360, 18.526 ],
[136, 472, 0, 0.0007079293628808865, 0.025412930201351602, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 4.0889999999999995 ],
[110, 472, 0, 0.00019511772853185596, 0.0070042485539216805, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.127 ],
[251, 472, 0, 4.207063711911357e-05, 0.00151023282928764, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.243 ],
[226, 474, 0, 0.017639669421487602, 0.011663231841509601, 248.0, 248.0, 248.0, 0, 1, 1, -360, 13.34 ],
[473, 474, 0, 0.003467107438016529, 0.00916971330986216, 495.0, 495.0, 495.0, 0, 2, 1, -360, 5.244 ],
[257, 474, 0, 0.020264462809917356, 0.053594910935781594, 495.0, 495.0, 495.0, 0, 2, 1, -360, 30.65 ],
[6, 474, 0, 0.08066247933884299, 0.05333349367016, 248.0, 248.0, 248.0, 0, 1, 1, -360, 61.001000000000005 ],
[299, 475, 0, 0.013238227146814403, 0.47521993028123993, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 76.464 ],
[3, 475, 0, 0.0002794321329639889, 0.010030929162389441, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.614 ],
[210, 475, 0, 0.0001481994459833795, 0.00531999712702368, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.856 ],
[297, 476, 0, 0.0193500826446281, 0.05117658265464801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 29.267 ],
[296, 476, 0, 0.005596694214876033, 0.014801987636898, 495.0, 495.0, 495.0, 0, 1, 1, -360, 8.465 ],
[295, 476, 0, 0.0009474380165289256, 0.00250575880492432, 495.0, 495.0, 495.0, 0, 1, 1, -360, 1.433 ],
[313, 478, 0, 0.008696849030470914, 0.31219557906752804, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 50.233000000000004 ],
[477, 478, 0, 1.5235457063711912e-05, 0.0005469155924977479, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.08800000000000001 ],
[245, 478, 0, 0.005264542936288089, 0.188984197007248, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 30.408 ],
[479, 481, 0, 0.028420495867768597, 0.07516576970575199, 495.0, 495.0, 495.0, 0, 1, 1, -360, 42.986000000000004 ],
[565, 481, 0, 0.024842314049586776, 0.065702289836964, 495.0, 495.0, 495.0, 0, 1, 1, -360, 37.574 ],
[480, 481, 0, 7.735537190082645e-05, 0.000204587425105844, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.11699999999999999 ],
[415, 482, 0, 0.011021814404432133, 0.0989140353680364, 856.0, 856.0, 856.0, 0, 1, 1, -360, 31.831 ],
[56, 482, 0, 0.002630886426592798, 0.0236105947261788, 856.0, 856.0, 856.0, 0, 1, 1, -360, 7.598 ],
[409, 482, 0, 0.0007635041551246537, 0.0068519822810072005, 856.0, 856.0, 856.0, 0, 1, 1, -360, 2.205 ],
[483, 484, 0, 9.037396121883656e-05, 0.000811050963873968, 856.0, 856.0, 856.0, 0, 1, 1, -360, 0.261 ],
[3, 484, 0, 0.010022160664819944, 0.08994275516621358, 856.0, 856.0, 856.0, 0, 1, 1, -360, 28.944000000000003 ],
[301, 484, 0, 0.00966516620498615, 0.08673894848517479, 856.0, 856.0, 856.0, 0, 1, 1, -360, 27.913 ],
[233, 485, 0, 0.01410180055401662, 0.1265550251138996, 856.0, 856.0, 856.0, 0, 1, 1, -360, 40.726 ],
[392, 485, 0, 0.00914819944598338, 0.0820994883738036, 856.0, 856.0, 856.0, 0, 1, 1, -360, 26.42 ],
[391, 485, 0, 8.518005540166207e-05, 0.000764438839512864, 856.0, 856.0, 856.0, 0, 1, 1, -360, 0.24600000000000002 ],
[579, 488, 0, 0.004636473829194215, 0.11036180126571601, 1486.0, 1486.0, 1486.0, 0, 1, 1, -360, 21.038 ],
[486, 488, 0, 0.00016969696969690082, 0.00403929018798184, 1486.0, 1486.0, 1486.0, 0, 1, 1, -360, 0.77 ],
[487, 488, 0, 0.00014567493112954544, 0.00346749456396992, 1486.0, 1486.0, 1486.0, 0, 1, 1, -360, 0.6609999999999999 ],
[270, 489, 0, 0.0001745152354570637, 0.0062646695140596, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.008 ],
[331, 489, 0, 0.003002943213296399, 0.10779830627119119, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 17.345 ],
[396, 489, 0, 0.01124792243767313, 0.40377286606072005, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 64.968 ],
[519, 253, 0, 0.013353485337561985, 0.141267767926912, 991.0, 991.0, 991.0, 0, 1, 1, -360, 40.394293146100004 ],
[382, 349, 0, 0.009091647380263157, 1.30547149138788, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 105.02671053600001 ],
[349, 351, 0, 0.0005858117819605263, 0.0841168325920224, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 6.76729770521 ],
[459, 465, 0, 1.578788789911157e-05, 0.00016702153987596, 991.0, 991.0, 991.0, 0, 1, 1, -360, 0.047758360894800005 ],
[549, 550, 0, 3.680432518409091e-05, 0.000389356391787088, 991.0, 991.0, 991.0, 0, 1, 1, -360, 0.111333083682 ],
[550, 551, 0, 5.755645674710744e-05, 0.0006088951287918401, 991.0, 991.0, 991.0, 0, 1, 1, -360, 0.17410828165999997 ],
[194, 195, 0, 1.7560672583171745e-05, 0.00252154053805592, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.202860889681 ],
[247, 248, 0, 2.1755213937811637e-05, 0.0031238355819477198, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.25131623141 ],
[2, 294, 0, 2.3531392658518004e-05, 0.003378877444715, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.271834647991 ],
[549, 551, 0, 9.265809538429751e-05, 0.0009802386406577602, 991.0, 991.0, 991.0, 0, 1, 1, -360, 0.28029073853799996 ],
[54, 365, 0, 2.573045189134349e-05, 0.00369464080598484, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.297238180249 ],
[131, 265, 0, 2.7616389041343487e-05, 0.00396544290388756, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.319024526206 ],
[91, 92, 0, 2.8945628197853184e-05, 0.0041563086239824396, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.33437989694200004 ],
[247, 249, 0, 3.098840072160664e-05, 0.00444963074500788, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.357978005136 ],
[186, 191, 0, 3.1591661821191135e-05, 0.00453625312865552, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.36494687735799997 ],
[129, 173, 0, 3.202671277479225e-05, 0.00459872218332188, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.369972585975 ],
[96, 202, 0, 3.5971247867797784e-05, 0.00516511877739804, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.415539855369 ],
[53, 320, 0, 3.784209581142659e-05, 0.00543375421308236, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.437151890814 ],
[24, 396, 0, 4.144748602818559e-05, 0.005951452925597279, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.47880135859800005 ],
[133, 156, 0, 4.431754564044322e-05, 0.0063635653674415605, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.511956287238 ],
[442, 452, 0, 4.483572190450138e-05, 0.006437970402313801, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.517942259441 ],
[445, 452, 0, 4.490753296371191e-05, 0.0064482817668697215, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.518771820797 ],
[247, 250, 0, 4.594910768732687e-05, 0.00659784169268824, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.530804092004 ],
[187, 195, 0, 4.755760376239612e-05, 0.006828805970367921, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.549385438663 ],
[216, 236, 0, 5.03353075283241e-05, 0.00722765701751724, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.581473472567 ],
[244, 389, 0, 5.1633313019736845e-05, 0.007414037889302401, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.596468032004 ],
[394, 406, 0, 5.6346419007686985e-05, 0.008090793734075721, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.650913832377 ],
[442, 445, 0, 6.388070648310249e-05, 0.00917264360085512, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.737949921293 ],
[442, 444, 0, 6.584378362735456e-05, 0.00945452224616264, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.760627388463 ],
[198, 472, 0, 8.37554210498615e-05, 0.0120264578966664, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.967542623967 ],
[464, 467, 0, 8.460287496468144e-05, 0.01214814397621276, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.977332411594 ],
[198, 251, 0, 8.83613182396122e-05, 0.012687819608389479, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 1.0207499483 ],
[112, 143, 0, 9.049653833033241e-05, 0.012994416294241841, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 1.04541601079 ],
[2, 490, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[5, 491, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[10, 492, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[12, 493, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[13, 494, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[15, 495, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[18, 496, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[20, 497, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[22, 498, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[24, 499, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[26, 500, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[30, 501, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[32, 502, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[37, 503, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[42, 504, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[46, 505, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[52, 506, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[56, 507, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[61, 508, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[68, 509, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[69, 510, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[74, 511, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[78, 512, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[86, 513, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[87, 514, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[94, 515, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[95, 516, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[96, 517, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[99, 518, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[100, 519, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[104, 520, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[105, 521, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[106, 522, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[107, 523, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[117, 524, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[120, 525, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[123, 526, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[124, 527, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[125, 528, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[128, 529, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[129, 530, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[138, 531, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[143, 532, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[156, 533, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[157, 534, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[159, 535, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[160, 536, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[165, 537, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[184, 538, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[191, 539, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[195, 540, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[201, 541, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[220, 542, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[231, 543, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[232, 544, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[233, 545, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[236, 546, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[245, 547, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[246, 548, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[248, 549, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[249, 550, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[250, 551, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[259, 552, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[261, 553, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[262, 554, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[265, 555, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[270, 556, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[277, 557, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[279, 558, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[280, 559, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[290, 560, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[301, 561, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[305, 562, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[306, 563, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[310, 564, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[313, 565, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[315, 566, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[320, 567, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[330, 568, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[332, 569, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[334, 570, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[336, 571, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[349, 572, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[351, 573, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[358, 574, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[360, 575, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[380, 576, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[382, 577, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[383, 578, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[389, 579, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[401, 580, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[402, 581, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[409, 582, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[415, 583, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[444, 584, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[452, 585, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ]
])
ppc["gen_control"] = array([
[586, 1, 0.08658028904199107, 4.329014452099554, 0, 0, 0],
[589, 1, 0.010042676909098597, 0.5021338454549299, 0, 0, 0],
[590, 1, 0.012095775674984046, 0.6047887837492023, 0, 0, 0],
[593, 1, 0.0017666198683200384, 0.08833099341600192, 0, 0, 0],
[595, 1, 1.50560576164933, 75.2802880824665, 0, 0, 0],
[598, 1, 0.0038197186342054878, 0.1909859317102744, 0, 0, 0],
[599, 1, 0.0029602819415092537, 0.1480140970754627, 0, 0, 0],
[602, 1, 0.007830423200121252, 0.39152116000606263, 0, 0, 0],
[603, 1, 1.0997606567649967, 54.98803283824984, 0, 0, 0],
[607, 1, 0.5729577951308232, 28.64788975654116, 0, 0, 0],
[608, 1, 0.0076394372684109755, 0.3819718634205488, 0, 0, 0],
[609, 1, 0.0057932399285449895, 0.2896619964272495, 0, 0, 0],
[612, 1, 0.00954929658551372, 0.477464829275686, 0, 0, 0],
[614, 1, 0.00954929658551372, 0.477464829275686, 0, 0, 0],
[616, 1, 0.0046154933496649645, 0.23077466748324824, 0, 0, 0],
[617, 1, 0.04360845440717932, 2.1804227203589663, 0, 0, 0],
[618, 1, 0.010631550198538607, 0.5315775099269304, 0, 0, 0],
[619, 1, 0.037560566569687294, 1.8780283284843649, 0, 0, 0],
[624, 1, 0.004297183463481174, 0.21485917317405873, 0, 0, 0],
[629, 1, 0.023968734429639437, 1.198436721481972, 0, 0, 0],
[632, 1, 0.01435577586688896, 0.717788793344448, 0, 0, 0],
[637, 1, 0.017093240888069558, 0.854662044403478, 0, 0, 0],
[638, 1, 0.02048324117592693, 1.0241620587963465, 0, 0, 0],
[640, 1, 0.0038197186342054878, 0.1909859317102744, 0, 0, 0],
[641, 1, 0.0040107045659157625, 0.20053522829578813, 0, 0, 0],
[642, 1, 0.00919915571071155, 0.4599577855355775, 0, 0, 0],
[643, 1, 0.27279157245950864, 13.639578622975431, 0, 0, 0],
[647, 1, 0.00445633840657307, 0.2228169203286535, 0, 0, 0],
[652, 1, 0.00746436683100989, 0.37321834155049455, 0, 0, 0],
[655, 1, 0.019576058000303126, 0.9788029000151565, 0, 0, 0],
[663, 1, 0.00238732414637843, 0.1193662073189215, 0, 0, 0],
[666, 1, 0.00919915571071155, 0.4599577855355775, 0, 0, 0],
[670, 1, 0.0076394372684109755, 0.3819718634205488, 0, 0, 0],
[672, 1, 0.010536057232683471, 0.5268028616341736, 0, 0, 0],
[676, 1, 0.11777465788800255, 5.888732894400127, 0, 0, 0],
[681, 1, 0.0063821132179850025, 0.31910566089925013, 0, 0, 0],
[683, 1, 0.008753521870054244, 0.4376760935027122, 0, 0, 0],
[687, 1, 0.42303383873825773, 21.151691936912886, 0, 0, 0],
[694, 1, 0.005220282133414166, 0.2610141066707083, 0, 0, 0],
[695, 1, 0.004679155326901723, 0.23395776634508614, 0, 0, 0],
[697, 1, 0.0036923946797319715, 0.1846197339865986, 0, 0, 0],
[698, 1, 0.0038197186342054878, 0.1909859317102744, 0, 0, 0],
[702, 1, 0.023363945645890238, 1.168197282294512, 0, 0, 0],
[705, 1, 0.005411268065124442, 0.27056340325622213, 0, 0, 0],
[707, 1, 0.010822536130248884, 0.5411268065124443, 0, 0, 0],
[714, 1, 0.00477464829275686, 0.238732414637843, 0, 0, 0],
[716, 1, 1.5915494309189534e-05, 0.0007957747154594768, 0, 0, 0],
[717, 1, 0.0017507043740108488, 0.08753521870054244, 0, 0, 0],
[722, 1, 0.006589014644004467, 0.3294507322002233, 0, 0, 0],
[724, 1, 0.0019257748114119334, 0.09628874057059668, 0, 0, 0],
[730, 1, 0.10077690996578814, 5.038845498289407, 0, 0, 0],
[732, 1, 0.004647324338283344, 0.2323662169141672, 0, 0, 0],
[735, 1, 0.013496339174192726, 0.6748169587096363, 0, 0, 0],
[741, 1, 0.0340591578216656, 1.7029578910832803, 0, 0, 0],
[742, 1, 0.0028647889756541157, 0.14323944878270578, 0, 0, 0],
[743, 1, 0.44881693951914486, 22.440846975957243, 0, 0, 0],
[747, 1, 0.0039788735772973835, 0.1989436788648692, 0, 0, 0],
[749, 1, 0.0025464790894703256, 0.12732395447351627, 0, 0, 0],
[750, 1, 0.028902537665488188, 1.4451268832744095, 0, 0, 0],
[753, 1, 0.049624511256052974, 2.4812255628026487, 0, 0, 0],
[761, 1, 0.004997465213085514, 0.2498732606542757, 0, 0, 0],
[762, 1, 0.3517324242330887, 17.586621211654435, 0, 0, 0],
[765, 1, 0.018780283284843647, 0.9390141642421824, 0, 0, 0],
[767, 1, 0.0035650707252584553, 0.17825353626292276, 0, 0, 0],
[772, 1, 0.002992112930127632, 0.1496056465063816, 0, 0, 0],
[774, 1, 0.010663381187156987, 0.5331690593578494, 0, 0, 0],
[777, 1, 0.012573240504259732, 0.6286620252129866, 0, 0, 0],
[778, 1, 0.004679155326901723, 0.23395776634508614, 0, 0, 0],
[781, 1, 0.4169859509007658, 20.84929754503829, 0, 0, 0],
[784, 1, 0.4058451048843331, 20.292255244216655, 0, 0, 0],
[785, 1, 0.00047746482927568597, 0.0238732414637843, 0, 0, 0],
[788, 1, 0.2785211504108168, 13.926057520540843, 0, 0, 0],
[789, 1, 0.0123185925953127, 0.615929629765635, 0, 0, 0],
[791, 1, 0.0031830988618379067, 0.15915494309189535, 0, 0, 0],
[792, 1, 0.009979014931861837, 0.49895074659309185, 0, 0, 0],
[795, 1, 0.004329014452099553, 0.2164507226049777, 0, 0, 0],
[800, 1, 0.0058091554228541795, 0.290457771142709, 0, 0, 0],
[801, 1, 0.007957747154594767, 0.3978873577297384, 0, 0, 0],
[802, 1, 0.07957747154594767, 3.9788735772973833, 0, 0, 0],
[805, 1, 0.44881693951914486, 22.440846975957243, 0, 0, 0],
[806, 1, 0.005697746962689853, 0.2848873481344927, 0, 0, 0],
[808, 1, 0.034616200122487235, 1.7308100061243619, 0, 0, 0],
[809, 1, 0.0039788735772973835, 0.1989436788648692, 0, 0, 0],
[811, 1, 0.0040107045659157625, 0.20053522829578813, 0, 0, 0],
[814, 1, 0.014164789935178685, 0.7082394967589343, 0, 0, 0],
[816, 1, 0.012748310941660816, 0.6374155470830408, 0, 0, 0],
[817, 1, 0.017188733853924696, 0.8594366926962349, 0, 0, 0],
[821, 1, 0.013130282805081364, 0.6565141402540683, 0, 0, 0],
[826, 1, 0.018461973398659858, 0.9230986699329929, 0, 0, 0],
[834, 1, 0.007416620348082323, 0.37083101740411617, 0, 0, 0],
[835, 1, 0.010138169874953733, 0.5069084937476867, 0, 0, 0],
[836, 1, 0.008116902097686661, 0.4058451048843331, 0, 0, 0],
[837, 1, 0.15024226627874918, 7.512113313937459, 0, 0, 0],
[839, 1, 0.011666057328635928, 0.5833028664317964, 0, 0, 0],
[841, 1, 0.0037083101740411615, 0.18541550870205808, 0, 0, 0],
[843, 1, 0.10599719209920229, 5.2998596049601145, 0, 0, 0],
[844, 1, 0.012732395447351627, 0.6366197723675814, 0, 0, 0],
[850, 1, 0.005092958178940651, 0.25464790894703254, 0, 0, 0],
[851, 1, 0.01265281797580568, 0.632640898790284, 0, 0, 0],
[853, 1, 0.0036923946797319715, 0.1846197339865986, 0, 0, 0],
[856, 1, 0.011459155902616463, 0.5729577951308231, 0, 0, 0],
[857, 1, 0.4462704604296745, 22.313523021483725, 0, 0, 0],
[858, 1, 0.01808000153523931, 0.9040000767619655, 0, 0, 0],
[860, 1, 0.0039788735772973835, 0.1989436788648692, 0, 0, 0],
[865, 1, 0.0035014087480216977, 0.17507043740108488, 0, 0, 0],
[867, 1, 0.24478030247533505, 12.239015123766753, 0, 0, 0],
[869, 1, 0.4329014452099553, 21.645072260497766, 0, 0, 0],
[870, 1, 0.018589297353133374, 0.9294648676566688, 0, 0, 0],
[872, 1, 0.00716197243913529, 0.3580986219567645, 0, 0, 0],
[874, 1, 0.006589014644004467, 0.3294507322002233, 0, 0, 0],
[875, 1, 0.007766761222884492, 0.38833806114422464, 0, 0, 0],
[882, 1, 0.005538592019597957, 0.2769296009798979, 0, 0, 0],
[883, 1, 0.005729577951308231, 0.28647889756541156, 0, 0, 0],
[885, 1, 0.15597184423005742, 7.798592211502871, 0, 0, 0],
[886, 1, 0.8186930272647096, 40.93465136323548, 0, 0, 0],
[889, 1, 0.0030239439187460114, 0.15119719593730058, 0, 0, 0],
[890, 1, 0.0076394372684109755, 0.3819718634205488, 0, 0, 0],
[893, 1, 0.00954929658551372, 0.477464829275686, 0, 0, 0],
[894, 1, 0.025146481008519465, 1.2573240504259733, 0, 0, 0],
[895, 1, 0.0030239439187460114, 0.15119719593730058, 0, 0, 0],
[896, 1, 0.0038197186342054878, 0.1909859317102744, 0, 0, 0],
[898, 1, 0.013464508185574344, 0.6732254092787172, 0, 0, 0],
[902, 1, 0.006207042780583919, 0.31035213902919595, 0, 0, 0],
[903, 1, 0.0031990143561470966, 0.15995071780735484, 0, 0, 0],
[905, 1, 0.021851973686517232, 1.0925986843258617, 0, 0, 0],
[906, 1, 0.010504226244065093, 0.5252113122032547, 0, 0, 0],
[907, 1, 0.02142225534016911, 1.0711127670084555, 0, 0, 0],
[909, 1, 0.005856901905781748, 0.2928450952890874, 0, 0, 0],
[917, 1, 0.005411268065124442, 0.27056340325622213, 0, 0, 0],
[918, 1, 0.012254930618075942, 0.612746530903797, 0, 0, 0],
[920, 1, 0.0020371832715762603, 0.10185916357881303, 0, 0, 0],
[921, 1, 0.019735212943395024, 0.9867606471697512, 0, 0, 0],
[922, 1, 0.05220282133414166, 2.6101410667070835, 0, 0, 0],
[923, 1, 0.023236621691416718, 1.161831084570836, 0, 0, 0],
[925, 1, 0.008276057040778557, 0.4138028520389279, 0, 0, 0],
[931, 1, 0.03455253814525047, 1.7276269072625237, 0, 0, 0],
[936, 1, 0.016615776058793875, 0.8307888029396938, 0, 0, 0],
[937, 1, 0.00477464829275686, 0.238732414637843, 0, 0, 0],
[939, 1, 1.5915494309189534e-05, 0.0007957747154594768, 0, 0, 0],
[940, 1, 0.009421972631040205, 0.47109863155201026, 0, 0, 0],
[944, 1, 0.004042535554534142, 0.2021267777267071, 0, 0, 0],
[950, 1, 0.005092958178940651, 0.25464790894703254, 0, 0, 0],
[952, 1, 0.005045211696013082, 0.2522605848006541, 0, 0, 0],
[958, 1, 0.010615634704229418, 0.530781735211471, 0, 0, 0],
[959, 1, 0.007241549910681238, 0.3620774955340619, 0, 0, 0],
[960, 1, 0.004217605991935227, 0.21088029959676136, 0, 0, 0],
[963, 1, 0.2785211504108168, 13.926057520540843, 0, 0, 0],
[965, 1, 0.11204507993669433, 5.602253996834716, 0, 0, 0],
[967, 1, 0.01193662073189215, 0.5968310365946076, 0, 0, 0],
[969, 1, 0.018111832523857688, 0.9055916261928845, 0, 0, 0],
[971, 1, 0.0031830988618379067, 0.15915494309189535, 0, 0, 0],
[978, 1, 0.0007321127382227185, 0.03660563691113593, 0, 0, 0],
[982, 1, 0.0015756339366097638, 0.07878169683048819, 0, 0, 0],
[983, 1, 0.01400563499208679, 0.7002817496043395, 0, 0, 0],
[984, 1, 0.14801409707546268, 7.400704853773133, 0, 0, 0],
[985, 1, 0.0035014087480216977, 0.17507043740108488, 0, 0, 0],
[986, 1, 0.0017825353626292277, 0.08912676813146138, 0, 0, 0],
[987, 1, 0.02618098813861678, 1.3090494069308392, 0, 0, 0],
[988, 1, 0.0008116902097686662, 0.04058451048843331, 0, 0, 0],
[993, 1, 0.06238873769202297, 3.119436884601149, 0, 0, 0],
[994, 1, 0.010504226244065093, 0.5252113122032547, 0, 0, 0],
[995, 1, 0.0006684507609859605, 0.033422538049298026, 0, 0, 0],
[997, 1, 0.005984225860255264, 0.2992112930127632, 0, 0, 0],
[999, 1, 0.004965634224467135, 0.24828171122335674, 0, 0, 0],
[1002, 1, 0.0031512678732195276, 0.15756339366097638, 0, 0, 0],
[1007, 1, 0.007416620348082323, 0.37083101740411617, 0, 0, 0],
[1010, 1, 0.238732414637843, 11.93662073189215, 0, 0, 0],
[1011, 1, 0.005952394871636886, 0.2976197435818443, 0, 0, 0],
[1012, 1, 0.9024085273310466, 45.12042636655233, 0, 0, 0],
[1014, 1, 0.238732414637843, 11.93662073189215, 0, 0, 0],
[1027, 3, 0.003074873500535418, 0.15374367502677092, 2.22, 61.69, 0.004502],
[1028, 2, 0.025464790894703257, 1.273239544735163, 0, 0, 0],
[1029, 2, 0.003819718634205488, 0.19098593171027442, 0, 0, 0],
[1030, 2, 0.06480789282701978, 3.2403946413509894, 0, 0, 0],
[1031, 2, 0.0921316134570364, 4.60658067285182, 0, 0, 0],
[1032, 2, 0.009772775025341927, 0.4886387512670964, 0, 0, 0],
[1033, 2, 0.0031935716694765437, 0.15967858347382718, 0, 0, 0],
[1034, 2, 0.005364335122251813, 0.26821675611259066, 0, 0, 0],
[1035, 3, 0.00317587127473044, 0.158793563736522, 2.22, 61.69, 0.004502],
[1036, 2, 0.0042795539826391196, 0.21397769913195597, 0, 0, 0],
[1037, 2, 0.0060277734620055035, 0.3013886731002752, 0, 0, 0],
[1038, 2, 0.005462103769994554, 0.2731051884997277, 0, 0, 0],
[1039, 2, 0.008449479506347874, 0.42247397531739384, 0, 0, 0],
[1040, 3, 4.085784833929019e-06, 0.00020428924169645096, 2.22, 61.69, 0.004502],
[1041, 2, 0.012998987840239671, 0.6499493920119837, 0, 0, 0],
[1042, 2, 0.00335501991632689, 0.1677509958163445, 0, 0, 0],
[1043, 3, 0.00038423431443050963, 0.019211715721525482, 2.22, 61.69, 0.004502],
[1044, 3, 0.0023022419250361527, 0.11511209625180763, 2.22, 61.69, 0.004502],
[1045, 2, 0.003936615026511589, 0.19683075132557948, 0, 0, 0],
[1046, 2, 0.006045611128115316, 0.30228055640576584, 0, 0, 0],
[1047, 3, 0.0008294889076348922, 0.04147444538174461, 2.22, 61.69, 0.004502],
[1048, 2, 0.00445182315071625, 0.22259115753581254, 0, 0, 0],
[1049, 2, 0.01870104799381521, 0.9350523996907605, 0, 0, 0],
[1050, 2, 0.0033601814151550304, 0.1680090707577515, 0, 0, 0],
[1051, 2, 0.019380601737792977, 0.969030086889649, 0, 0, 0],
[1052, 3, 0.001315809692296204, 0.06579048461481019, 2.22, 61.69, 0.004502],
[1053, 3, 0.001042024786453249, 0.05210123932266245, 2.22, 61.69, 0.004502],
[1054, 2, 0.017434200209443074, 0.8717100104721537, 0, 0, 0],
[1055, 3, 0.0001818229987415119, 0.009091149937075596, 2.22, 61.69, 0.004502],
[1056, 2, 0.0384482661909012, 1.9224133095450602, 0, 0, 0],
[1057, 2, 0.02718238967557453, 1.3591194837787268, 0, 0, 0],
[1058, 2, 0.06721018861714274, 3.3605094308571375, 0, 0, 0],
[1059, 2, 0.02641152929543176, 1.320576464771588, 0, 0, 0],
[1060, 3, 0.0006590053340983933, 0.03295026670491967, 2.22, 61.69, 0.004502],
[1061, 2, 0.010304492946979937, 0.5152246473489969, 0, 0, 0],
[1062, 3, 0.00018325491392786168, 0.009162745696393085, 2.22, 61.69, 0.004502],
[1063, 3, 0.0005520076745724519, 0.0276003837286226, 2.22, 61.69, 0.004502],
[1064, 2, 0.013355424896304362, 0.667771244815218, 0, 0, 0],
[1065, 2, 0.021608252882636087, 1.0804126441318045, 0, 0, 0],
[1066, 2, 0.008556107291276397, 0.4278053645638199, 0, 0, 0],
[1067, 3, 0.002000933756260183, 0.10004668781300916, 2.22, 61.69, 0.004502],
[1068, 3, 0.0003188842576981683, 0.015944212884908417, 2.22, 61.69, 0.004502],
[1069, 3, 0.00020313001706596343, 0.010156500853298172, 2.22, 61.69, 0.004502],
[1070, 3, 5.020379247175116e-05, 0.0025101896235875582, 2.22, 61.69, 0.004502],
[1071, 3, 0.0002755733400308117, 0.013778667001540588, 2.22, 61.69, 0.004502],
[1072, 2, 0.007168748144119091, 0.3584374072059546, 0, 0, 0],
[1073, 2, 0.004954025493475761, 0.24770127467378808, 0, 0, 0],
[1074, 2, 0.009778033156939965, 0.48890165784699824, 0, 0, 0],
[1075, 3, 0.0010048055180333312, 0.05024027590166657, 2.22, 61.69, 0.004502],
[1076, 3, 0.00014613668285460223, 0.007306834142730112, 2.22, 61.69, 0.004502],
[1077, 3, 0.0016628534246063698, 0.08314267123031849, 2.22, 61.69, 0.004502],
[1078, 3, 0.0021908153060440304, 0.10954076530220153, 2.22, 61.69, 0.004502],
[1079, 2, 0.004604543003215469, 0.23022715016077344, 0, 0, 0],
[1080, 2, 0.008412929217414397, 0.4206464608707199, 0, 0, 0],
[1081, 2, 0.025823979083824652, 1.2911989541912325, 0, 0, 0],
[1082, 2, 0.03247105626963941, 1.623552813481971, 0, 0, 0],
[1083, 2, 0.04034141649573272, 2.017070824786636, 0, 0, 0],
[1084, 2, 0.0383703068502718, 1.9185153425135901, 0, 0, 0],
[1085, 2, 0.007239283505967098, 0.3619641752983549, 0, 0, 0],
[1086, 2, 0.01436208920263519, 0.7181044601317595, 0, 0, 0],
[1087, 2, 0.007427186304799236, 0.3713593152399618, 0, 0, 0],
[1088, 3, 0.0023416461987310717, 0.11708230993655358, 2.22, 61.69, 0.004502],
[1089, 2, 0.024474821190373128, 1.2237410595186564, 0, 0, 0],
[1090, 2, 0.005674885746854652, 0.2837442873427326, 0, 0, 0],
[1091, 3, 0.0025559246387118852, 0.12779623193559428, 2.22, 61.69, 0.004502],
[1092, 2, 0.0022614569222204907, 0.11307284611102454, 0, 0, 0],
[1093, 2, 0.005405735887485864, 0.2702867943742932, 0, 0, 0],
[1096, 2, 0.0032869739467971857, 0.16434869733985927, 0, 0, 0],
[1097, 3, 0.00017300345148886943, 0.008650172574443471, 2.22, 61.69, 0.004502],
[1098, 2, 0.003289044333560044, 0.1644522166780022, 0, 0, 0],
[1099, 2, 0.017502038182814306, 0.8751019091407154, 0, 0, 0],
[1100, 3, 1.2394935240118277e-06, 6.19746762005914e-05, 2.22, 61.69, 0.004502],
[1101, 2, 0.005343192104787693, 0.2671596052393847, 0, 0, 0],
[1102, 2, 0.02234407998394998, 1.1172039991974991, 0, 0, 0],
[1103, 2, 0.01562148424141561, 0.7810742120707805, 0, 0, 0],
[1105, 3, 5.553489395638779e-05, 0.0027767446978193898, 2.22, 61.69, 0.004502],
[1106, 3, 5.824860207634129e-05, 0.0029124301038170645, 2.22, 61.69, 0.004502],
[1107, 2, 0.0030626723973069554, 0.15313361986534774, 0, 0, 0],
[1108, 2, 0.02039874588539438, 1.019937294269719, 0, 0, 0],
[1109, 3, 2.0410230979817453e-05, 0.0010205115489908725, 2.22, 61.69, 0.004502],
[1110, 3, 4.209100319936101e-05, 0.0021045501599680503, 2.22, 61.69, 0.004502],
[1111, 2, 0.004130994840039845, 0.20654974200199225, 0, 0, 0],
[1113, 3, 8.967736039222342e-05, 0.004483868019611171, 2.22, 61.69, 0.004502],
[1114, 3, 0.0008287580610983356, 0.04143790305491678, 2.22, 61.69, 0.004502],
[1115, 2, 0.0012846199411427445, 0.06423099705713722, 0, 0, 0],
[1116, 3, 0.0008266680607579276, 0.04133340303789638, 2.22, 61.69, 0.004502],
[1117, 2, 0.002423390125278668, 0.12116950626393344, 0, 0, 0],
[1118, 3, 0.0002364061774524349, 0.011820308872621746, 2.22, 61.69, 0.004502],
[1119, 3, 0.001103839988378201, 0.05519199941891006, 2.22, 61.69, 0.004502],
[1120, 3, 6.167750655223761e-05, 0.0030838753276118814, 2.22, 61.69, 0.004502],
[1121, 3, 1.3755046233043984e-05, 0.0006877523116521993, 2.22, 61.69, 0.004502],
[1122, 3, 3.7205183102116836e-05, 0.0018602591551058418, 2.22, 61.69, 0.004502],
[1123, 3, 3.718482927877816e-05, 0.001859241463938908, 2.22, 61.69, 0.004502],
[1124, 3, 3.2767805859797654e-05, 0.0016383902929898828, 2.22, 61.69, 0.004502],
[1125, 3, 0.0007768493279403406, 0.038842466397017036, 2.22, 61.69, 0.004502],
[1126, 3, 0.0008993573657867038, 0.04496786828933519, 2.22, 61.69, 0.004502],
[1127, 2, 0.002692639158359382, 0.13463195791796911, 0, 0, 0],
[1128, 3, 7.798648051461309e-05, 0.0038993240257306546, 2.22, 61.69, 0.004502],
[1129, 3, 0.00012067336277826449, 0.006033668138913225, 2.22, 61.69, 0.004502],
[1130, 3, 2.6018013552869856e-05, 0.0013009006776434928, 2.22, 61.69, 0.004502],
[1131, 3, 7.376731283474909e-05, 0.0036883656417374547, 2.22, 61.69, 0.004502],
[1133, 3, 1.8309816678670237e-05, 0.000915490833933512, 2.22, 61.69, 0.004502],
[1134, 3, 1.2937356389347597e-05, 0.0006468678194673798, 2.22, 61.69, 0.004502],
[1135, 3, 0.0002090133345259136, 0.01045066672629568, 2.22, 61.69, 0.004502],
[1136, 3, 1.0239317808798805e-05, 0.0005119658904399403, 2.22, 61.69, 0.004502],
[1137, 3, 0.00010517941277154545, 0.005258970638577273, 2.22, 61.69, 0.004502],
[1138, 3, 3.202927158114444e-05, 0.0016014635790572223, 2.22, 61.69, 0.004502],
[1139, 3, 0.000502422140661582, 0.0251211070330791, 2.22, 61.69, 0.004502],
[1140, 3, 0.0014920849297188569, 0.07460424648594284, 2.22, 61.69, 0.004502],
[1142, 3, 3.108855958207156e-05, 0.001554427979103578, 2.22, 61.69, 0.004502],
[1143, 3, 0.0007010706467170471, 0.03505353233585236, 2.22, 61.69, 0.004502],
[1144, 2, 0.0013348659944216786, 0.06674329972108395, 0, 0, 0],
[1145, 2, 0.011197481443497569, 0.5598740721748785, 0, 0, 0],
[1146, 3, 2.1915822140241895e-05, 0.0010957911070120948, 2.22, 61.69, 0.004502],
[1147, 3, 0.0011597195411981833, 0.05798597705990917, 2.22, 61.69, 0.004502],
[1148, 3, 0.000530075604509743, 0.026503780225487154, 2.22, 61.69, 0.004502],
[1149, 3, 0.00023332074897085096, 0.011666037448542547, 2.22, 61.69, 0.004502],
[1150, 3, 9.434708716193637e-05, 0.004717354358096819, 2.22, 61.69, 0.004502],
[1151, 3, 0.00033266619332396894, 0.01663330966619845, 2.22, 61.69, 0.004502],
[1152, 3, 2.968290590764656e-06, 0.00014841452953823282, 2.22, 61.69, 0.004502],
[1155, 3, 1.5547398540825696e-05, 0.0007773699270412849, 2.22, 61.69, 0.004502],
[1157, 3, 0.00011110922316080263, 0.005555461158040131, 2.22, 61.69, 0.004502],
[1160, 2, 0.015175599618213626, 0.7587799809106813, 0, 0, 0],
[1161, 3, 0.0010857043774739259, 0.054285218873696306, 2.22, 61.69, 0.004502],
[1162, 2, 0.031984361657767045, 1.5992180828883522, 0, 0, 0],
[1163, 2, 0.021010485834812704, 1.0505242917406352, 0, 0, 0],
[1164, 2, 0.018183478445661972, 0.9091739222830987, 0, 0, 0],
[1165, 2, 0.003640738012495192, 0.18203690062475963, 0, 0, 0],
[1166, 2, 0.005301588846150501, 0.26507944230752506, 0, 0, 0],
[1168, 3, 3.419450196278286e-05, 0.0017097250981391431, 2.22, 61.69, 0.004502],
[1169, 3, 6.93880139226225e-05, 0.003469400696131125, 2.22, 61.69, 0.004502],
[1171, 3, 0.0005748603194505088, 0.02874301597252544, 2.22, 61.69, 0.004502],
[1172, 3, 0.00020447436337759674, 0.010223718168879837, 2.22, 61.69, 0.004502],
[1173, 2, 0.01618626952698487, 0.8093134763492436, 0, 0, 0],
[1175, 3, 2.1782391725402467e-05, 0.0010891195862701233, 2.22, 61.69, 0.004502],
[1176, 3, 5.923360885186837e-06, 0.0002961680442593419, 2.22, 61.69, 0.004502],
[1177, 3, 0.0007213874875701519, 0.036069374378507595, 2.22, 61.69, 0.004502],
[1178, 3, 0.00010205808100824817, 0.005102904050412409, 2.22, 61.69, 0.004502],
[1179, 3, 3.44925871051151e-05, 0.0017246293552557552, 2.22, 61.69, 0.004502],
[1181, 2, 0.004495779034217764, 0.2247889517108882, 0, 0, 0],
[1182, 2, 0.0037840530757545184, 0.1892026537877259, 0, 0, 0],
[1183, 3, 0.00109035926940026, 0.054517963470013, 2.22, 61.69, 0.004502],
[1184, 3, 0.00010790631226403063, 0.005395315613201532, 2.22, 61.69, 0.004502],
[1186, 3, 0.001498769521577056, 0.0749384760788528, 2.22, 61.69, 0.004502],
[1187, 3, 0.0002833468274902024, 0.01416734137451012, 2.22, 61.69, 0.004502],
[1188, 2, 0.011440868435801076, 0.5720434217900537, 0, 0, 0],
[1189, 3, 0.001289906586581014, 0.06449532932905071, 2.22, 61.69, 0.004502],
[1190, 2, 0.01403960969000889, 0.7019804845004446, 0, 0, 0],
[1191, 2, 0.004652379906159672, 0.23261899530798363, 0, 0, 0],
[1192, 3, 0.0013658402687938922, 0.06829201343969461, 2.22, 61.69, 0.004502],
[1193, 3, 0.00015278576957249078, 0.007639288478624539, 2.22, 61.69, 0.004502],
[1194, 3, 0.0005720688022791215, 0.028603440113956075, 2.22, 61.69, 0.004502],
[1195, 3, 1.2882573563174789e-05, 0.0006441286781587394, 2.22, 61.69, 0.004502],
[1196, 2, 0.010230349597894291, 0.5115174798947145, 0, 0, 0],
[1197, 2, 0.005767282789943071, 0.2883641394971536, 0, 0, 0],
[1198, 3, 0.002534966273924786, 0.12674831369623932, 2.22, 61.69, 0.004502],
[1199, 2, 0.012822920004466005, 0.6411460002233003, 0, 0, 0],
[1200, 2, 0.003512885294685969, 0.17564426473429848, 0, 0, 0],
[1201, 3, 0.0016021597716395785, 0.08010798858197893, 2.22, 61.69, 0.004502],
[1202, 3, 0.0031762475555186724, 0.15881237777593363, 2.22, 61.69, 0.004502],
[1203, 2, 0.011626157559117188, 0.5813078779558594, 0, 0, 0],
[1204, 3, 0.0030266063343556363, 0.15133031671778183, 2.22, 61.69, 0.004502],
[1205, 3, 3.4940417699210975e-05, 0.0017470208849605492, 2.22, 61.69, 0.004502],
[1206, 3, 0.00024235441128435216, 0.012117720564217609, 2.22, 61.69, 0.004502],
[1207, 3, 0.00022762038155293296, 0.011381019077646649, 2.22, 61.69, 0.004502],
[1208, 3, 0.0001427321512302434, 0.007136607561512171, 2.22, 61.69, 0.004502],
[1209, 3, 3.712569506330662e-05, 0.0018562847531653312, 2.22, 61.69, 0.004502],
[1210, 3, 0.00030747517943711223, 0.015373758971855613, 2.22, 61.69, 0.004502],
[1211, 3, 0.0011462484513341364, 0.057312422566706815, 2.22, 61.69, 0.004502],
[1212, 2, 0.005804182676892941, 0.290209133844647, 0, 0, 0],
[1213, 2, 0.0036505499187602444, 0.18252749593801224, 0, 0, 0],
[1214, 3, 0.0002868549194435664, 0.014342745972178321, 2.22, 61.69, 0.004502],
[1215, 3, 0.00014342822681200328, 0.0071714113406001635, 2.22, 61.69, 0.004502],
[1216, 2, 0.00431338348440427, 0.21566917422021353, 0, 0, 0],
[1217, 3, 0.0022836580531031417, 0.11418290265515707, 2.22, 61.69, 0.004502],
[1218, 3, 6.241945072080783e-05, 0.003120972536040392, 2.22, 61.69, 0.004502],
[1219, 3, 0.00038380486709714475, 0.01919024335485724, 2.22, 61.69, 0.004502],
[1220, 3, 0.0011850020268110609, 0.05925010134055305, 2.22, 61.69, 0.004502],
[1221, 2, 0.0377662225422596, 1.88831112711298, 0, 0, 0],
[1222, 2, 0.013436354905899806, 0.6718177452949904, 0, 0, 0],
[1223, 3, 0.00024230393037435297, 0.01211519651871765, 2.22, 61.69, 0.004502],
[1224, 2, 0.010219261097938644, 0.5109630548969322, 0, 0, 0],
[1225, 3, 0.0022238071565315737, 0.1111903578265787, 2.22, 61.69, 0.004502],
[1226, 3, 0.0002535566380389208, 0.012677831901946041, 2.22, 61.69, 0.004502],
[1227, 3, 0.0011129900410750567, 0.05564950205375283, 2.22, 61.69, 0.004502],
[1228, 3, 0.00019234621639044032, 0.009617310819522017, 2.22, 61.69, 0.004502],
[1229, 2, 0.0030085590951324306, 0.15042795475662155, 0, 0, 0],
[1230, 3, 8.1951485973486e-05, 0.0040975742986743, 2.22, 61.69, 0.004502],
[1231, 3, 0.00154847626324508, 0.077423813162254, 2.22, 61.69, 0.004502],
[1232, 2, 0.003813185361664286, 0.19065926808321432, 0, 0, 0],
[1233, 2, 0.03662908231521014, 1.831454115760507, 0, 0, 0],
[1235, 3, 0.0005753349157073776, 0.028766745785368877, 2.22, 61.69, 0.004502],
[1236, 2, 0.005234608320670995, 0.26173041603354974, 0, 0, 0],
[1237, 3, 0.0008890105844342532, 0.04445052922171266, 2.22, 61.69, 0.004502],
[1238, 2, 0.012012445276594919, 0.600622263829746, 0, 0, 0],
[1239, 3, 0.0001443666373276477, 0.007218331866382386, 2.22, 61.69, 0.004502],
[1240, 2, 0.021613910382114798, 1.08069551910574, 0, 0, 0],
[1241, 2, 0.024532881090784327, 1.2266440545392163, 0, 0, 0],
[1242, 3, 0.0015615143972363894, 0.07807571986181946, 2.22, 61.69, 0.004502],
[1243, 2, 0.005289026999236673, 0.26445134996183367, 0, 0, 0],
[1244, 2, 0.020592901244747865, 1.0296450622373932, 0, 0, 0],
[1245, 3, 0.0005144458090049472, 0.025722290450247362, 2.22, 61.69, 0.004502],
[1246, 2, 0.003636870278584459, 0.18184351392922293, 0, 0, 0],
[1247, 3, 0.0013899571448864774, 0.06949785724432388, 2.22, 61.69, 0.004502],
[1248, 2, 0.004047804296417853, 0.2023902148208927, 0, 0, 0],
[1249, 2, 0.004846915908139961, 0.24234579540699805, 0, 0, 0],
[1250, 3, 0.0019627317861894665, 0.09813658930947333, 2.22, 61.69, 0.004502],
[1251, 3, 0.0014899668826355728, 0.07449834413177864, 2.22, 61.69, 0.004502],
[1252, 3, 0.0009477821555247328, 0.047389107776236644, 2.22, 61.69, 0.004502],
[1253, 2, 0.004106369053307717, 0.20531845266538587, 0, 0, 0],
[1254, 2, 0.005238024431161238, 0.2619012215580619, 0, 0, 0],
[1255, 3, 0.0002430881191708174, 0.01215440595854087, 2.22, 61.69, 0.004502],
[1256, 3, 0.0009607764830526361, 0.048038824152631804, 2.22, 61.69, 0.004502],
[1257, 2, 0.005662916214121937, 0.28314581070609685, 0, 0, 0],
[1258, 2, 0.014991588973313675, 0.7495794486656838, 0, 0, 0],
[1259, 2, 0.00695753592752513, 0.34787679637625657, 0, 0, 0],
[1260, 3, 0.0012839803779623614, 0.06419901889811806, 2.22, 61.69, 0.004502],
[1261, 2, 0.012840592447306919, 0.6420296223653459, 0, 0, 0],
[1262, 3, 3.3365758929065435e-05, 0.0016682879464532717, 2.22, 61.69, 0.004502],
[1263, 3, 2.243579925674327e-05, 0.0011217899628371635, 2.22, 61.69, 0.004502],
[1264, 2, 0.005222533303161435, 0.2611266651580718, 0, 0, 0],
[1265, 3, 0.0004236530619172327, 0.021182653095861634, 2.22, 61.69, 0.004502],
[1266, 2, 0.007621029313600565, 0.38105146568002835, 0, 0, 0],
[1267, 3, 0.002512674942558201, 0.12563374712791006, 2.22, 61.69, 0.004502],
[1268, 3, 0.0002183287451274897, 0.010916437256374485, 2.22, 61.69, 0.004502],
[1269, 3, 0.0003250471975980552, 0.01625235987990276, 2.22, 61.69, 0.004502],
[1270, 3, 0.0024796665722395645, 0.12398332861197821, 2.22, 61.69, 0.004502],
[1271, 3, 0.0030157819134425234, 0.15078909567212617, 2.22, 61.69, 0.004502],
[1272, 3, 7.840992648188318e-05, 0.003920496324094159, 2.22, 61.69, 0.004502],
[1273, 3, 9.236768632941541e-05, 0.00461838431647077, 2.22, 61.69, 0.004502],
[1274, 2, 0.0033801727100761705, 0.1690086355038085, 0, 0, 0],
[1275, 2, 0.006307329492962109, 0.3153664746481055, 0, 0, 0],
[1276, 3, 0.001633288835647369, 0.08166444178236844, 2.22, 61.69, 0.004502],
[1277, 2, 0.004176942042758357, 0.20884710213791788, 0, 0, 0],
[1278, 2, 0.010850406134369231, 0.5425203067184615, 0, 0, 0],
[1279, 3, 1.2957727984992993e-07, 6.478863992496497e-06, 2.22, 61.69, 0.004502],
[1280, 3, 2.5822901719599235e-05, 0.001291145085979962, 2.22, 61.69, 0.004502],
[1281, 3, 0.00013291594727662026, 0.006645797363831013, 2.22, 61.69, 0.004502],
[1282, 3, 0.00021130763141584551, 0.010565381570792277, 2.22, 61.69, 0.004502],
[1283, 2, 0.08261824948992594, 4.130912474496298, 0, 0, 0],
[1284, 3, 0.0018096758437742202, 0.09048379218871101, 2.22, 61.69, 0.004502],
[1285, 3, 0.0001399477244734882, 0.006997386223674409, 2.22, 61.69, 0.004502],
[1286, 3, 0.0011377796471657795, 0.05688898235828898, 2.22, 61.69, 0.004502],
[1287, 2, 0.005933272587501368, 0.29666362937506835, 0, 0, 0],
[1288, 2, 0.00944760882155904, 0.472380441077952, 0, 0, 0],
[1289, 2, 0.011723304434111076, 0.5861652217055537, 0, 0, 0],
[1290, 3, 0.0003120693634598793, 0.015603468172993969, 2.22, 61.69, 0.004502],
[1291, 2, 0.0062575490505418305, 0.31287745252709154, 0, 0, 0],
[1292, 3, 0.002653563231501149, 0.13267816157505744, 2.22, 61.69, 0.004502],
[1293, 3, 0.00015292290721046804, 0.007646145360523402, 2.22, 61.69, 0.004502],
[1294, 3, 0.0003436110439431119, 0.017180552197155596, 2.22, 61.69, 0.004502],
[1295, 3, 0.00037392918854889465, 0.01869645942744473, 2.22, 61.69, 0.004502],
[1296, 3, 0.0017415681822428924, 0.08707840911214464, 2.22, 61.69, 0.004502],
[1297, 2, 0.011317746197608284, 0.5658873098804141, 0, 0, 0],
[1298, 3, 0.00025557758136610396, 0.0127788790683052, 2.22, 61.69, 0.004502],
[1299, 3, 0.00013739570556443013, 0.006869785278221508, 2.22, 61.69, 0.004502],
[1300, 3, 0.001511593201166196, 0.07557966005830981, 2.22, 61.69, 0.004502],
[1301, 2, 0.0038746782543149596, 0.193733912715748, 0, 0, 0],
[1302, 3, 0.0003104985267932093, 0.015524926339660468, 2.22, 61.69, 0.004502],
[1303, 3, 0.00027600750632746427, 0.013800375316373212, 2.22, 61.69, 0.004502],
[1304, 3, 0.000610793340517708, 0.030539667025885397, 2.22, 61.69, 0.004502],
[1305, 3, 2.9075695387122924e-07, 1.4537847693561463e-05, 2.22, 61.69, 0.004502],
[1306, 3, 4.785298727192918e-05, 0.002392649363596459, 2.22, 61.69, 0.004502],
[1307, 3, 7.607863985215967e-06, 0.0003803931992607984, 2.22, 61.69, 0.004502],
[1308, 3, 0.00020870441847665842, 0.010435220923832922, 2.22, 61.69, 0.004502],
[1309, 3, 0.0002132096944766602, 0.01066048472383301, 2.22, 61.69, 0.004502],
[1310, 3, 0.00010478060392325507, 0.005239030196162754, 2.22, 61.69, 0.004502],
[1311, 3, 0.00042867578463455237, 0.02143378923172762, 2.22, 61.69, 0.004502],
[1312, 2, 0.016696303623916272, 0.8348151811958137, 0, 0, 0],
[1313, 3, 0.0019631283227609974, 0.09815641613804986, 2.22, 61.69, 0.004502],
[1314, 3, 0.0007641975650906521, 0.038209878254532606, 2.22, 61.69, 0.004502],
[1315, 3, 0.0005015944131679134, 0.02507972065839567, 2.22, 61.69, 0.004502],
[1316, 3, 0.00012376478287903607, 0.006188239143951804, 2.22, 61.69, 0.004502],
[1317, 3, 0.0009711351173103039, 0.048556755865515194, 2.22, 61.69, 0.004502],
[1318, 3, 0.00012454395408676328, 0.0062271977043381645, 2.22, 61.69, 0.004502],
[1319, 3, 0.001127343871228203, 0.05636719356141015, 2.22, 61.69, 0.004502],
[1320, 3, 0.0013215329138219017, 0.06607664569109509, 2.22, 61.69, 0.004502],
[1321, 3, 1.025741798764967e-05, 0.0005128708993824835, 2.22, 61.69, 0.004502],
[1322, 3, 5.919056262068799e-05, 0.0029595281310344, 2.22, 61.69, 0.004502],
[1323, 2, 0.012675857799799822, 0.6337928899899912, 0, 0, 0],
[1324, 3, 0.0008316328586631403, 0.04158164293315702, 2.22, 61.69, 0.004502],
[1325, 2, 0.0057612535388438385, 0.2880626769421919, 0, 0, 0],
[1326, 2, 0.0036242041289439157, 0.1812102064471958, 0, 0, 0],
[1327, 2, 0.0032338308031027566, 0.16169154015513784, 0, 0, 0],
[1328, 3, 0.0010226241895011407, 0.05113120947505704, 2.22, 61.69, 0.004502],
[1329, 2, 0.013921309839652627, 0.6960654919826315, 0, 0, 0],
[1330, 3, 0.0019182008434651947, 0.09591004217325974, 2.22, 61.69, 0.004502],
[1332, 3, 0.0016738699394560756, 0.08369349697280379, 2.22, 61.69, 0.004502],
[1333, 3, 0.0029061854047842247, 0.14530927023921122, 2.22, 61.69, 0.004502],
[1334, 3, 5.136054459913027e-05, 0.0025680272299565135, 2.22, 61.69, 0.004502],
[1335, 3, 0.00021052629514022267, 0.010526314757011134, 2.22, 61.69, 0.004502],
[1336, 3, 0.0018954102795459078, 0.0947705139772954, 2.22, 61.69, 0.004502],
[1337, 2, 0.006020338798098282, 0.3010169399049141, 0, 0, 0],
[1338, 3, 5.300015004820578e-05, 0.0026500075024102894, 2.22, 61.69, 0.004502],
[1339, 3, 0.0006421253879349708, 0.032106269396748544, 2.22, 61.69, 0.004502],
[1340, 2, 0.003355330861775994, 0.1677665430887997, 0, 0, 0],
[1341, 2, 0.010682483732650976, 0.5341241866325488, 0, 0, 0],
[1342, 3, 2.101043175532592e-05, 0.0010505215877662961, 2.22, 61.69, 0.004502],
[1343, 3, 3.130239915703848e-05, 0.0015651199578519243, 2.22, 61.69, 0.004502],
[1344, 3, 1.4391232894862565e-05, 0.0007195616447431282, 2.22, 61.69, 0.004502],
[1345, 3, 0.00025281368060892654, 0.012640684030446329, 2.22, 61.69, 0.004502],
[1346, 2, 0.013669449762218379, 0.6834724881109189, 0, 0, 0],
[1347, 2, 0.02636344185792537, 1.3181720928962688, 0, 0, 0],
[1348, 3, 0.0014456315404578254, 0.07228157702289127, 2.22, 61.69, 0.004502],
[1349, 3, 0.002610949541382524, 0.13054747706912617, 2.22, 61.69, 0.004502],
[1350, 3, 3.859851934953823e-06, 0.00019299259674769115, 2.22, 61.69, 0.004502],
[1351, 3, 4.5085071524642273e-07, 2.2542535762321137e-05, 2.22, 61.69, 0.004502],
[1352, 3, 2.5677954031977487e-05, 0.0012838977015988745, 2.22, 61.69, 0.004502],
[1355, 3, 0.0001074820707981226, 0.005374103539906131, 2.22, 61.69, 0.004502],
[1356, 2, 0.004678278776831856, 0.23391393884159278, 0, 0, 0],
[1357, 2, 0.003594349677217709, 0.17971748386088549, 0, 0, 0],
[1358, 3, 1.57431431082847e-05, 0.0007871571554142351, 2.22, 61.69, 0.004502],
[1359, 2, 0.004496673943395517, 0.22483369716977586, 0, 0, 0],
[1363, 3, 1.5265322222078787e-06, 7.632661111039394e-05, 2.22, 61.69, 0.004502],
[1364, 3, 2.8687227851091924e-06, 0.0001434361392554596, 2.22, 61.69, 0.004502],
[1365, 3, 2.1560465484574657e-08, 1.078023274228733e-06, 2.22, 61.69, 0.004502],
[1366, 3, 7.830373844390861e-05, 0.003915186922195431, 2.22, 61.69, 0.004502],
[1367, 3, 0.0027735977386081564, 0.1386798869304078, 2.22, 61.69, 0.004502],
[1368, 3, 0.0001048661049437223, 0.0052433052471861155, 2.22, 61.69, 0.004502],
[1369, 3, 0.0005073133310147165, 0.025365666550735824, 2.22, 61.69, 0.004502],
[1370, 3, 2.185563890765493e-05, 0.0010927819453827466, 2.22, 61.69, 0.004502],
[1371, 2, 0.004857683053723355, 0.24288415268616778, 0, 0, 0],
[1372, 2, 0.012284634505654547, 0.6142317252827274, 0, 0, 0],
[1373, 3, 0.0022409179594482334, 0.11204589797241167, 2.22, 61.69, 0.004502],
[1374, 2, 0.006889508467327262, 0.3444754233663631, 0, 0, 0],
[1375, 2, 0.003897629175102736, 0.1948814587551368, 0, 0, 0],
[1376, 2, 0.006830907337989802, 0.3415453668994901, 0, 0, 0],
[1377, 2, 0.01492085689824784, 0.7460428449123921, 0, 0, 0],
[1378, 2, 0.01566275025445262, 0.783137512722631, 0, 0, 0],
[1379, 3, 2.062505175023466e-05, 0.001031252587511733, 2.22, 61.69, 0.004502],
[1381, 3, 2.601825872991241e-05, 0.0013009129364956204, 2.22, 61.69, 0.004502],
[1382, 2, 0.008838822964419164, 0.4419411482209583, 0, 0, 0],
[1383, 2, 0.0069522653092041085, 0.34761326546020543, 0, 0, 0],
[1387, 3, 8.89643885212391e-05, 0.0044482194260619555, 2.22, 61.69, 0.004502],
[1390, 3, 9.505708471011321e-05, 0.004752854235505661, 2.22, 61.69, 0.004502],
[1391, 3, 1.3594941515348555e-05, 0.0006797470757674278, 2.22, 61.69, 0.004502],
[1393, 3, 3.4943392392534786e-05, 0.0017471696196267393, 2.22, 61.69, 0.004502],
[1394, 3, 2.737439864388922e-05, 0.001368719932194461, 2.22, 61.69, 0.004502],
[1395, 3, 1.9308633391493333e-06, 9.654316695746669e-05, 2.22, 61.69, 0.004502],
[1396, 3, 7.028796859200431e-07, 3.514398429600216e-05, 2.22, 61.69, 0.004502],
[1397, 3, 0.0006377592842944558, 0.03188796421472279, 2.22, 61.69, 0.004502],
[1398, 3, 7.075339318186764e-05, 0.003537669659093382, 2.22, 61.69, 0.004502],
[1399, 3, 0.0005693538555165958, 0.02846769277582979, 2.22, 61.69, 0.004502],
[1400, 3, 3.292902158897971e-05, 0.0016464510794489857, 2.22, 61.69, 0.004502],
[1401, 2, 0.0037280958540986705, 0.18640479270493354, 0, 0, 0],
[1402, 3, 0.0009460030317753202, 0.047300151588766014, 2.22, 61.69, 0.004502],
[1403, 2, 0.007617262031172502, 0.38086310155862513, 0, 0, 0],
[1404, 2, 0.008581667499251882, 0.42908337496259413, 0, 0, 0],
[1405, 3, 0.0013777254553245623, 0.06888627276622811, 2.22, 61.69, 0.004502],
[1406, 3, 0.0005951329463718105, 0.029756647318590523, 2.22, 61.69, 0.004502],
[1407, 3, 8.42762798103069e-06, 0.00042138139905153457, 2.22, 61.69, 0.004502],
[1408, 3, 0.002615151153581973, 0.13075755767909866, 2.22, 61.69, 0.004502],
[1409, 3, 0.0007652033584917757, 0.038260167924588785, 2.22, 61.69, 0.004502],
[1410, 3, 0.002385192626051519, 0.11925963130257596, 2.22, 61.69, 0.004502],
[1411, 3, 0.0025079869254713357, 0.1253993462735668, 2.22, 61.69, 0.004502],
[1412, 3, 0.0003811825487857675, 0.01905912743928838, 2.22, 61.69, 0.004502],
[1413, 3, 0.0003615867173212219, 0.018079335866061096, 2.22, 61.69, 0.004502],
[1414, 3, 0.001654733253695335, 0.08273666268476676, 2.22, 61.69, 0.004502],
[1415, 3, 0.0004745682686545623, 0.023728413432728118, 2.22, 61.69, 0.004502],
[1416, 3, 0.0005066221121186196, 0.025331105605930982, 2.22, 61.69, 0.004502],
[1417, 3, 7.324966052452151e-08, 3.662483026226075e-06, 2.22, 61.69, 0.004502],
[1418, 2, 0.005619099755523237, 0.28095498777616185, 0, 0, 0],
[1419, 3, 0.00211745485704481, 0.10587274285224049, 2.22, 61.69, 0.004502],
[1420, 3, 8.91112970779674e-05, 0.00445556485389837, 2.22, 61.69, 0.004502],
[1421, 3, 0.00044387476697737416, 0.02219373834886871, 2.22, 61.69, 0.004502],
[1422, 3, 0.00030115264331514286, 0.015057632165757144, 2.22, 61.69, 0.004502],
[1423, 3, 0.00012293234040278847, 0.006146617020139425, 2.22, 61.69, 0.004502],
[1424, 2, 0.01394783725195249, 0.6973918625976245, 0, 0, 0],
[1425, 3, 0.0013602274146640447, 0.06801137073320224, 2.22, 61.69, 0.004502],
[1426, 2, 0.004377563184547638, 0.2188781592273819, 0, 0, 0],
[1427, 2, 0.03060222784928668, 1.5301113924643341, 0, 0, 0],
[1428, 2, 0.021319488529000553, 1.0659744264500277, 0, 0, 0],
[1429, 3, 0.000845419991215321, 0.04227099956076605, 2.22, 61.69, 0.004502],
[1430, 3, 1.4103786308871584e-06, 7.051893154435792e-05, 2.22, 61.69, 0.004502],
[1431, 2, 0.014493414492796078, 0.724670724639804, 0, 0, 0],
[1432, 3, 0.0007676953741931287, 0.03838476870965644, 2.22, 61.69, 0.004502],
[1433, 2, 0.08207564315805406, 4.103782157902703, 0, 0, 0],
[1434, 2, 0.004580630870615056, 0.2290315435307528, 0, 0, 0],
[1435, 2, 0.005241557112195593, 0.2620778556097797, 0, 0, 0],
[1436, 2, 0.006266510483771511, 0.31332552418857557, 0, 0, 0],
[1437, 2, 0.015172047044780135, 0.7586023522390068, 0, 0, 0],
[1438, 2, 0.025007389641183632, 1.2503694820591817, 0, 0, 0],
[1439, 2, 0.0063091033600462575, 0.3154551680023129, 0, 0, 0],
[1440, 3, 5.306917668409132e-05, 0.0026534588342045657, 2.22, 61.69, 0.004502],
[1441, 3, 1.0923020560921105e-05, 0.0005461510280460552, 2.22, 61.69, 0.004502],
[1442, 3, 4.555157486056611e-05, 0.0022775787430283057, 2.22, 61.69, 0.004502],
[1443, 2, 0.006557506818224797, 0.3278753409112398, 0, 0, 0],
[1444, 3, 0.0005717925297728792, 0.028589626488643962, 2.22, 61.69, 0.004502],
[1445, 3, 0.0015938921576921367, 0.07969460788460683, 2.22, 61.69, 0.004502],
[1446, 2, 0.04829066125331256, 2.414533062665628, 0, 0, 0],
[1447, 2, 0.005696308888305882, 0.2848154444152941, 0, 0, 0],
[1448, 3, 0.0002813656970216781, 0.014068284851083905, 2.22, 61.69, 0.004502],
[1449, 2, 0.0029348829924128405, 0.14674414962064206, 0, 0, 0],
[1450, 2, 0.003726900047088699, 0.18634500235443496, 0, 0, 0],
[1451, 2, 0.0036467833176776375, 0.18233916588388188, 0, 0, 0],
[1452, 3, 0.0009308941175129764, 0.046544705875648816, 2.22, 61.69, 0.004502],
[1453, 2, 0.004134065549943135, 0.20670327749715672, 0, 0, 0],
[1454, 2, 0.009875666531734596, 0.49378332658672985, 0, 0, 0],
[1455, 3, 1.66950830801293e-05, 0.000834754154006465, 2.22, 61.69, 0.004502],
[1456, 2, 0.0013664683513056725, 0.06832341756528364, 0, 0, 0],
[1459, 3, 0.00013477613298625794, 0.006738806649312897, 2.22, 61.69, 0.004502],
[1460, 2, 0.0037971068076197746, 0.18985534038098878, 0, 0, 0],
[1461, 3, 0.00045503010222392685, 0.022751505111196346, 2.22, 61.69, 0.004502],
[1463, 3, 1.810231431840124e-05, 0.0009051157159200621, 2.22, 61.69, 0.004502],
[1464, 2, 0.013934601684842136, 0.6967300842421068, 0, 0, 0],
[1466, 3, 0.0001450748986048064, 0.00725374493024032, 2.22, 61.69, 0.004502],
[1467, 3, 5.434743301684746e-05, 0.0027173716508423736, 2.22, 61.69, 0.004502],
[1468, 3, 0.0006047748176593424, 0.03023874088296712, 2.22, 61.69, 0.004502],
[1469, 2, 0.003233867943910748, 0.16169339719553738, 0, 0, 0],
[1470, 2, 0.005027084884666319, 0.2513542442333159, 0, 0, 0],
[1471, 2, 0.010132763321185349, 0.5066381660592674, 0, 0, 0],
[1472, 3, 0.00036895330016970505, 0.018447665008485253, 2.22, 61.69, 0.004502],
[1473, 3, 0.00021195071858909128, 0.010597535929454565, 2.22, 61.69, 0.004502],
[1474, 3, 3.568357370609641e-05, 0.0017841786853048205, 2.22, 61.69, 0.004502],
[1475, 3, 9.952961021421813e-06, 0.0004976480510710907, 2.22, 61.69, 0.004502],
[1476, 2, 0.015946059282369706, 0.7973029641184852, 0, 0, 0],
[1477, 3, 0.0007717725169969112, 0.03858862584984556, 2.22, 61.69, 0.004502],
[1479, 3, 0.00035603636123413484, 0.01780181806170674, 2.22, 61.69, 0.004502],
[1480, 3, 0.0011893307912248102, 0.05946653956124052, 2.22, 61.69, 0.004502],
[1481, 3, 3.3833873695351113e-06, 0.00016916936847675558, 2.22, 61.69, 0.004502],
[1482, 3, 0.0011147740798471094, 0.055738703992355476, 2.22, 61.69, 0.004502],
[1483, 3, 9.504850518132428e-05, 0.004752425259066214, 2.22, 61.69, 0.004502],
[1484, 3, 9.303002951875421e-07, 4.651501475937711e-05, 2.22, 61.69, 0.004502],
[1485, 3, 1.7528399459215098e-05, 0.000876419972960755, 2.22, 61.69, 0.004502],
[1486, 3, 9.018017162430775e-05, 0.0045090085812153876, 2.22, 61.69, 0.004502],
[1487, 3, 7.276038526853737e-05, 0.0036380192634268686, 2.22, 61.69, 0.004502],
[1488, 3, 0.00022382432076245898, 0.01119121603812295, 2.22, 61.69, 0.004502],
[1489, 3, 3.0263189463062935e-06, 0.0001513159473153147, 2.22, 61.69, 0.004502],
[1490, 2, 0.04905115781427449, 2.4525578907137247, 0, 0, 0],
[1491, 2, 0.005387257187745477, 0.26936285938727383, 0, 0, 0],
[1492, 2, 0.014637639488319377, 0.7318819744159688, 0, 0, 0],
[1493, 2, 0.005319414988695112, 0.26597074943475557, 0, 0, 0],
[1494, 2, 0.0257504251653254, 1.28752125826627, 0, 0, 0],
[1495, 2, 0.004260305180484296, 0.2130152590242148, 0, 0, 0],
[1496, 3, 1.641562267503393e-08, 8.207811337516965e-07, 2.22, 61.69, 0.004502],
[1497, 2, 0.005670372667342641, 0.28351863336713207, 0, 0, 0],
[1498, 2, 0.006735488235440387, 0.3367744117720194, 0, 0, 0],
[1499, 3, 0.00014557430965896176, 0.0072787154829480885, 2.22, 61.69, 0.004502],
[1500, 3, 9.284328907409222e-06, 0.0004642164453704611, 2.22, 61.69, 0.004502],
[1501, 3, 0.00037483587777994396, 0.018741793888997202, 2.22, 61.69, 0.004502],
[1502, 3, 3.9491818320371174e-05, 0.0019745909160185583, 2.22, 61.69, 0.004502],
[1503, 3, 0.0029266803181735935, 0.14633401590867967, 2.22, 61.69, 0.004502],
[1504, 2, 0.012020835078490423, 0.6010417539245212, 0, 0, 0],
[1505, 3, 0.0017039709532498102, 0.08519854766249052, 2.22, 61.69, 0.004502],
[1506, 2, 0.0035909631390018642, 0.17954815695009319, 0, 0, 0],
[1507, 3, 0.000982816273068341, 0.04914081365341705, 2.22, 61.69, 0.004502],
[1508, 3, 4.154538017488063e-06, 0.00020772690087440316, 2.22, 61.69, 0.004502],
[1510, 2, 0.00681234986437375, 0.34061749321868756, 0, 0, 0],
[1511, 2, 0.00988173435818505, 0.4940867179092525, 0, 0, 0],
[1512, 2, 0.004082645917281524, 0.20413229586407625, 0, 0, 0],
[1513, 3, 0.001467522271804366, 0.07337611359021831, 2.22, 61.69, 0.004502],
[1514, 3, 8.434708679035484e-07, 4.217354339517742e-05, 2.22, 61.69, 0.004502],
[1516, 3, 1.8340973111507537e-06, 9.170486555753769e-05, 2.22, 61.69, 0.004502],
[1517, 3, 8.192048507877762e-05, 0.0040960242539388805, 2.22, 61.69, 0.004502],
[1518, 3, 1.7149947944714273e-05, 0.0008574973972357136, 2.22, 61.69, 0.004502],
[1519, 3, 1.1903058584033917e-06, 5.951529292016959e-05, 2.22, 61.69, 0.004502]
])
ppc["branch_switch"] = array([
[586, 1, 0 ],
[589, 108, 0 ],
[590, 108, 0 ],
[593, 112, 0 ],
[595, 115, 0 ],
[598, 118, 0 ],
[599, 119, 0 ],
[602, 121, 0 ],
[603, 526, 0 ],
[607, 127, 0 ],
[608, 127, 0 ],
[609, 529, 0 ],
[612, 493, 0 ],
[614, 130, 0 ],
[616, 132, 0 ],
[617, 133, 0 ],
[618, 133, 0 ],
[619, 134, 0 ],
[624, 14, 0 ],
[629, 145, 0 ],
[632, 145, 0 ],
[637, 148, 0 ],
[638, 149, 0 ],
[640, 153, 0 ],
[641, 155, 0 ],
[642, 533, 0 ],
[643, 534, 0 ],
[647, 536, 0 ],
[652, 167, 0 ],
[655, 170, 0 ],
[663, 178, 0 ],
[666, 180, 0 ],
[670, 183, 0 ],
[672, 185, 0 ],
[676, 19, 0 ],
[681, 197, 0 ],
[683, 200, 0 ],
[687, 202, 0 ],
[694, 21, 0 ],
[695, 210, 0 ],
[697, 211, 0 ],
[698, 212, 0 ],
[702, 215, 0 ],
[705, 217, 0 ],
[707, 219, 0 ],
[714, 225, 0 ],
[716, 226, 0 ],
[717, 227, 0 ],
[722, 545, 0 ],
[724, 238, 0 ],
[730, 547, 0 ],
[732, 247, 0 ],
[735, 253, 0 ],
[741, 264, 0 ],
[742, 264, 0 ],
[743, 500, 0 ],
[747, 273, 0 ],
[749, 274, 0 ],
[750, 557, 0 ],
[753, 28, 0 ],
[761, 288, 0 ],
[762, 289, 0 ],
[765, 560, 0 ],
[767, 292, 0 ],
[772, 3, 0 ],
[774, 300, 0 ],
[777, 300, 0 ],
[778, 300, 0 ],
[781, 303, 0 ],
[784, 563, 0 ],
[785, 501, 0 ],
[788, 311, 0 ],
[789, 565, 0 ],
[791, 314, 0 ],
[792, 316, 0 ],
[795, 319, 0 ],
[800, 326, 0 ],
[801, 327, 0 ],
[802, 327, 0 ],
[805, 328, 0 ],
[806, 328, 0 ],
[808, 329, 0 ],
[809, 329, 0 ],
[811, 568, 0 ],
[814, 570, 0 ],
[816, 335, 0 ],
[817, 571, 0 ],
[821, 338, 0 ],
[826, 339, 0 ],
[834, 572, 0 ],
[835, 572, 0 ],
[836, 572, 0 ],
[837, 350, 0 ],
[839, 350, 0 ],
[841, 573, 0 ],
[843, 352, 0 ],
[844, 352, 0 ],
[850, 574, 0 ],
[851, 575, 0 ],
[853, 362, 0 ],
[856, 363, 0 ],
[857, 365, 0 ],
[858, 368, 0 ],
[860, 371, 0 ],
[865, 375, 0 ],
[867, 376, 0 ],
[869, 503, 0 ],
[870, 503, 0 ],
[872, 378, 0 ],
[874, 576, 0 ],
[875, 381, 0 ],
[882, 388, 0 ],
[883, 388, 0 ],
[885, 393, 0 ],
[886, 394, 0 ],
[889, 397, 0 ],
[890, 40, 0 ],
[893, 400, 0 ],
[894, 400, 0 ],
[895, 580, 0 ],
[896, 581, 0 ],
[898, 403, 0 ],
[902, 405, 0 ],
[903, 406, 0 ],
[905, 413, 0 ],
[906, 414, 0 ],
[907, 583, 0 ],
[909, 417, 0 ],
[917, 43, 0 ],
[918, 424, 0 ],
[920, 428, 0 ],
[921, 428, 0 ],
[922, 429, 0 ],
[923, 432, 0 ],
[925, 44, 0 ],
[931, 439, 0 ],
[936, 445, 0 ],
[937, 447, 0 ],
[939, 450, 0 ],
[940, 451, 0 ],
[944, 458, 0 ],
[950, 462, 0 ],
[952, 47, 0 ],
[958, 478, 0 ],
[959, 478, 0 ],
[960, 479, 0 ],
[963, 481, 0 ],
[965, 49, 0 ],
[967, 49, 0 ],
[969, 486, 0 ],
[971, 51, 0 ],
[978, 491, 0 ],
[982, 62, 0 ],
[983, 62, 0 ],
[984, 63, 0 ],
[985, 63, 0 ],
[986, 64, 0 ],
[987, 65, 0 ],
[988, 66, 0 ],
[993, 67, 0 ],
[994, 67, 0 ],
[995, 509, 0 ],
[997, 510, 0 ],
[999, 70, 0 ],
[1002, 71, 0 ],
[1007, 511, 0 ],
[1010, 79, 0 ],
[1011, 79, 0 ],
[1012, 81, 0 ],
[1014, 83, 0 ],
[1027, 218, 0 ],
[1028, 221, 0 ],
[1029, 268, 0 ],
[1030, 269, 0 ],
[1031, 498, 0 ],
[1032, 1, 0 ],
[1033, 3, 0 ],
[1034, 4, 0 ],
[1035, 6, 0 ],
[1036, 7, 0 ],
[1037, 8, 0 ],
[1038, 9, 0 ],
[1039, 11, 0 ],
[1040, 14, 0 ],
[1041, 16, 0 ],
[1042, 17, 0 ],
[1043, 19, 0 ],
[1044, 21, 0 ],
[1045, 23, 0 ],
[1046, 25, 0 ],
[1047, 27, 0 ],
[1048, 28, 0 ],
[1049, 29, 0 ],
[1050, 31, 0 ],
[1051, 33, 0 ],
[1052, 34, 0 ],
[1053, 35, 0 ],
[1054, 36, 0 ],
[1055, 38, 0 ],
[1056, 39, 0 ],
[1057, 40, 0 ],
[1058, 41, 0 ],
[1059, 43, 0 ],
[1060, 44, 0 ],
[1061, 45, 0 ],
[1062, 47, 0 ],
[1063, 48, 0 ],
[1064, 49, 0 ],
[1065, 50, 0 ],
[1066, 51, 0 ],
[1067, 53, 0 ],
[1068, 54, 0 ],
[1069, 55, 0 ],
[1070, 57, 0 ],
[1071, 58, 0 ],
[1072, 59, 0 ],
[1073, 60, 0 ],
[1074, 62, 0 ],
[1075, 63, 0 ],
[1076, 64, 0 ],
[1077, 65, 0 ],
[1078, 66, 0 ],
[1079, 67, 0 ],
[1080, 70, 0 ],
[1081, 71, 0 ],
[1082, 72, 0 ],
[1083, 73, 0 ],
[1084, 75, 0 ],
[1085, 76, 0 ],
[1086, 77, 0 ],
[1087, 79, 0 ],
[1088, 80, 0 ],
[1089, 81, 0 ],
[1090, 82, 0 ],
[1091, 83, 0 ],
[1092, 84, 0 ],
[1093, 85, 0 ],
[1096, 90, 0 ],
[1097, 91, 0 ],
[1098, 92, 0 ],
[1099, 93, 0 ],
[1100, 97, 0 ],
[1101, 98, 0 ],
[1102, 101, 0 ],
[1103, 102, 0 ],
[1105, 108, 0 ],
[1106, 109, 0 ],
[1107, 110, 0 ],
[1108, 111, 0 ],
[1109, 112, 0 ],
[1110, 113, 0 ],
[1111, 114, 0 ],
[1113, 116, 0 ],
[1114, 118, 0 ],
[1115, 119, 0 ],
[1116, 121, 0 ],
[1117, 122, 0 ],
[1118, 126, 0 ],
[1119, 127, 0 ],
[1120, 130, 0 ],
[1121, 131, 0 ],
[1122, 132, 0 ],
[1123, 133, 0 ],
[1124, 134, 0 ],
[1125, 135, 0 ],
[1126, 136, 0 ],
[1127, 137, 0 ],
[1128, 139, 0 ],
[1129, 140, 0 ],
[1130, 141, 0 ],
[1131, 142, 0 ],
[1133, 145, 0 ],
[1134, 146, 0 ],
[1135, 147, 0 ],
[1136, 148, 0 ],
[1137, 149, 0 ],
[1138, 150, 0 ],
[1139, 151, 0 ],
[1140, 152, 0 ],
[1142, 154, 0 ],
[1143, 155, 0 ],
[1144, 158, 0 ],
[1145, 161, 0 ],
[1146, 162, 0 ],
[1147, 163, 0 ],
[1148, 164, 0 ],
[1149, 166, 0 ],
[1150, 167, 0 ],
[1151, 168, 0 ],
[1152, 169, 0 ],
[1155, 172, 0 ],
[1157, 174, 0 ],
[1160, 177, 0 ],
[1161, 178, 0 ],
[1162, 179, 0 ],
[1163, 180, 0 ],
[1164, 181, 0 ],
[1165, 182, 0 ],
[1166, 183, 0 ],
[1168, 186, 0 ],
[1169, 187, 0 ],
[1171, 189, 0 ],
[1172, 190, 0 ],
[1173, 192, 0 ],
[1175, 194, 0 ],
[1176, 196, 0 ],
[1177, 197, 0 ],
[1178, 198, 0 ],
[1179, 199, 0 ],
[1181, 202, 0 ],
[1182, 203, 0 ],
[1183, 204, 0 ],
[1184, 205, 0 ],
[1186, 207, 0 ],
[1187, 208, 0 ],
[1188, 209, 0 ],
[1189, 210, 0 ],
[1190, 211, 0 ],
[1191, 212, 0 ],
[1192, 213, 0 ],
[1193, 214, 0 ],
[1194, 215, 0 ],
[1195, 216, 0 ],
[1196, 217, 0 ],
[1197, 218, 0 ],
[1198, 219, 0 ],
[1199, 221, 0 ],
[1200, 222, 0 ],
[1201, 223, 0 ],
[1202, 224, 0 ],
[1203, 225, 0 ],
[1204, 226, 0 ],
[1205, 227, 0 ],
[1206, 228, 0 ],
[1207, 229, 0 ],
[1208, 230, 0 ],
[1209, 234, 0 ],
[1210, 235, 0 ],
[1211, 237, 0 ],
[1212, 238, 0 ],
[1213, 239, 0 ],
[1214, 240, 0 ],
[1215, 241, 0 ],
[1216, 242, 0 ],
[1217, 243, 0 ],
[1218, 244, 0 ],
[1219, 247, 0 ],
[1220, 251, 0 ],
[1221, 252, 0 ],
[1222, 253, 0 ],
[1223, 254, 0 ],
[1224, 255, 0 ],
[1225, 256, 0 ],
[1226, 257, 0 ],
[1227, 258, 0 ],
[1228, 260, 0 ],
[1229, 263, 0 ],
[1230, 264, 0 ],
[1231, 266, 0 ],
[1232, 267, 0 ],
[1233, 268, 0 ],
[1235, 271, 0 ],
[1236, 272, 0 ],
[1237, 273, 0 ],
[1238, 274, 0 ],
[1239, 275, 0 ],
[1240, 276, 0 ],
[1241, 278, 0 ],
[1242, 281, 0 ],
[1243, 282, 0 ],
[1244, 283, 0 ],
[1245, 284, 0 ],
[1246, 285, 0 ],
[1247, 286, 0 ],
[1248, 287, 0 ],
[1249, 288, 0 ],
[1250, 289, 0 ],
[1251, 291, 0 ],
[1252, 292, 0 ],
[1253, 293, 0 ],
[1254, 294, 0 ],
[1255, 295, 0 ],
[1256, 296, 0 ],
[1257, 297, 0 ],
[1258, 298, 0 ],
[1259, 299, 0 ],
[1260, 300, 0 ],
[1261, 302, 0 ],
[1262, 303, 0 ],
[1263, 304, 0 ],
[1264, 307, 0 ],
[1265, 308, 0 ],
[1266, 309, 0 ],
[1267, 311, 0 ],
[1268, 312, 0 ],
[1269, 314, 0 ],
[1270, 316, 0 ],
[1271, 317, 0 ],
[1272, 318, 0 ],
[1273, 319, 0 ],
[1274, 321, 0 ],
[1275, 322, 0 ],
[1276, 323, 0 ],
[1277, 324, 0 ],
[1278, 325, 0 ],
[1279, 326, 0 ],
[1280, 327, 0 ],
[1281, 328, 0 ],
[1282, 329, 0 ],
[1283, 331, 0 ],
[1284, 333, 0 ],
[1285, 335, 0 ],
[1286, 337, 0 ],
[1287, 338, 0 ],
[1288, 339, 0 ],
[1289, 340, 0 ],
[1290, 341, 0 ],
[1291, 342, 0 ],
[1292, 343, 0 ],
[1293, 344, 0 ],
[1294, 345, 0 ],
[1295, 346, 0 ],
[1296, 347, 0 ],
[1297, 348, 0 ],
[1298, 350, 0 ],
[1299, 352, 0 ],
[1300, 353, 0 ],
[1301, 354, 0 ],
[1302, 355, 0 ],
[1303, 356, 0 ],
[1304, 357, 0 ],
[1305, 359, 0 ],
[1306, 361, 0 ],
[1307, 362, 0 ],
[1308, 363, 0 ],
[1309, 364, 0 ],
[1310, 365, 0 ],
[1311, 366, 0 ],
[1312, 367, 0 ],
[1313, 368, 0 ],
[1314, 369, 0 ],
[1315, 370, 0 ],
[1316, 371, 0 ],
[1317, 372, 0 ],
[1318, 373, 0 ],
[1319, 374, 0 ],
[1320, 375, 0 ],
[1321, 376, 0 ],
[1322, 377, 0 ],
[1323, 378, 0 ],
[1324, 379, 0 ],
[1325, 381, 0 ],
[1326, 384, 0 ],
[1327, 385, 0 ],
[1328, 386, 0 ],
[1329, 387, 0 ],
[1330, 388, 0 ],
[1332, 391, 0 ],
[1333, 392, 0 ],
[1334, 393, 0 ],
[1335, 394, 0 ],
[1336, 395, 0 ],
[1337, 396, 0 ],
[1338, 397, 0 ],
[1339, 398, 0 ],
[1340, 399, 0 ],
[1341, 400, 0 ],
[1342, 403, 0 ],
[1343, 404, 0 ],
[1344, 405, 0 ],
[1345, 406, 0 ],
[1346, 407, 0 ],
[1347, 408, 0 ],
[1348, 410, 0 ],
[1349, 411, 0 ],
[1350, 412, 0 ],
[1351, 413, 0 ],
[1352, 414, 0 ],
[1355, 418, 0 ],
[1356, 419, 0 ],
[1357, 420, 0 ],
[1358, 421, 0 ],
[1359, 422, 0 ],
[1363, 426, 0 ],
[1364, 427, 0 ],
[1365, 428, 0 ],
[1366, 429, 0 ],
[1367, 430, 0 ],
[1368, 431, 0 ],
[1369, 432, 0 ],
[1370, 433, 0 ],
[1371, 434, 0 ],
[1372, 435, 0 ],
[1373, 436, 0 ],
[1374, 437, 0 ],
[1375, 438, 0 ],
[1376, 439, 0 ],
[1377, 440, 0 ],
[1378, 441, 0 ],
[1379, 442, 0 ],
[1381, 445, 0 ],
[1382, 446, 0 ],
[1383, 447, 0 ],
[1387, 451, 0 ],
[1390, 455, 0 ],
[1391, 456, 0 ],
[1393, 458, 0 ],
[1394, 459, 0 ],
[1395, 460, 0 ],
[1396, 461, 0 ],
[1397, 462, 0 ],
[1398, 463, 0 ],
[1399, 464, 0 ],
[1400, 465, 0 ],
[1401, 466, 0 ],
[1402, 467, 0 ],
[1403, 468, 0 ],
[1404, 469, 0 ],
[1405, 470, 0 ],
[1406, 471, 0 ],
[1407, 472, 0 ],
[1408, 473, 0 ],
[1409, 474, 0 ],
[1410, 475, 0 ],
[1411, 476, 0 ],
[1412, 477, 0 ],
[1413, 478, 0 ],
[1414, 479, 0 ],
[1415, 480, 0 ],
[1416, 481, 0 ],
[1417, 482, 0 ],
[1418, 483, 0 ],
[1419, 484, 0 ],
[1420, 485, 0 ],
[1421, 486, 0 ],
[1422, 487, 0 ],
[1423, 488, 0 ],
[1424, 489, 0 ],
[1425, 490, 0 ],
[1426, 491, 0 ],
[1427, 492, 0 ],
[1428, 493, 0 ],
[1429, 494, 0 ],
[1430, 495, 0 ],
[1431, 496, 0 ],
[1432, 497, 0 ],
[1433, 498, 0 ],
[1434, 499, 0 ],
[1435, 500, 0 ],
[1436, 501, 0 ],
[1437, 502, 0 ],
[1438, 503, 0 ],
[1439, 504, 0 ],
[1440, 505, 0 ],
[1441, 506, 0 ],
[1442, 507, 0 ],
[1443, 508, 0 ],
[1444, 509, 0 ],
[1445, 510, 0 ],
[1446, 511, 0 ],
[1447, 512, 0 ],
[1448, 513, 0 ],
[1449, 514, 0 ],
[1450, 515, 0 ],
[1451, 516, 0 ],
[1452, 517, 0 ],
[1453, 518, 0 ],
[1454, 519, 0 ],
[1455, 520, 0 ],
[1456, 521, 0 ],
[1459, 524, 0 ],
[1460, 525, 0 ],
[1461, 526, 0 ],
[1463, 528, 0 ],
[1464, 529, 0 ],
[1466, 531, 0 ],
[1467, 532, 0 ],
[1468, 533, 0 ],
[1469, 534, 0 ],
[1470, 535, 0 ],
[1471, 536, 0 ],
[1472, 537, 0 ],
[1473, 538, 0 ],
[1474, 539, 0 ],
[1475, 540, 0 ],
[1476, 541, 0 ],
[1477, 542, 0 ],
[1479, 544, 0 ],
[1480, 545, 0 ],
[1481, 546, 0 ],
[1482, 547, 0 ],
[1483, 548, 0 ],
[1484, 549, 0 ],
[1485, 550, 0 ],
[1486, 551, 0 ],
[1487, 552, 0 ],
[1488, 554, 0 ],
[1489, 555, 0 ],
[1490, 556, 0 ],
[1491, 557, 0 ],
[1492, 558, 0 ],
[1493, 559, 0 ],
[1494, 560, 0 ],
[1495, 561, 0 ],
[1496, 562, 0 ],
[1497, 563, 0 ],
[1498, 564, 0 ],
[1499, 565, 0 ],
[1500, 566, 0 ],
[1501, 567, 0 ],
[1502, 568, 0 ],
[1503, 569, 0 ],
[1504, 570, 0 ],
[1505, 571, 0 ],
[1506, 572, 0 ],
[1507, 573, 0 ],
[1508, 574, 0 ],
[1510, 576, 0 ],
[1511, 577, 0 ],
[1512, 578, 0 ],
[1513, 579, 0 ],
[1514, 580, 0 ],
[1516, 582, 0 ],
[1517, 583, 0 ],
[1518, 584, 0 ],
[1519, 585, 0 ],
[1, 490, 0 ],
[3, 4, 1 ],
[491, 6, 0 ],
[7, 5, 0 ],
[8, 9, 0 ],
[492, 11, 0 ],
[11, 493, 0 ],
[492, 493, 1 ],
[494, 14, 0 ],
[13, 15, 0 ],
[16, 5, 0 ],
[17, 18, 1 ],
[17, 12, 0 ],
[14, 495, 0 ],
[494, 19, 0 ],
[20, 21, 0 ],
[20, 22, 1 ],
[497, 23, 0 ],
[23, 499, 1 ],
[25, 26, 0 ],
[25, 22, 0 ],
[23, 27, 0 ],
[28, 23, 0 ],
[8, 21, 0 ],
[9, 29, 0 ],
[30, 25, 1 ],
[31, 32, 1 ],
[32, 33, 1 ],
[34, 35, 0 ],
[35, 36, 0 ],
[490, 6, 1 ],
[37, 10, 1 ],
[10, 38, 0 ],
[37, 38, 1 ],
[39, 40, 1 ],
[39, 41, 1 ],
[42, 41, 1 ],
[18, 42, 1 ],
[492, 43, 1 ],
[44, 45, 0 ],
[44, 505, 0 ],
[46, 12, 0 ],
[47, 48, 0 ],
[49, 50, 0 ],
[31, 33, 1 ],
[31, 51, 0 ],
[52, 53, 1 ],
[52, 54, 0 ],
[506, 55, 0 ],
[506, 507, 1 ],
[57, 506, 0 ],
[57, 58, 0 ],
[58, 506, 0 ],
[59, 60, 1 ],
[508, 62, 0 ],
[30, 61, 1 ],
[63, 506, 0 ],
[13, 64, 0 ],
[65, 66, 1 ],
[59, 67, 0 ],
[61, 67, 0 ],
[68, 69, 1 ],
[70, 69, 1 ],
[71, 72, 1 ],
[73, 74, 1 ],
[37, 75, 1 ],
[72, 75, 0 ],
[37, 72, 1 ],
[76, 77, 1 ],
[77, 51, 0 ],
[73, 72, 1 ],
[18, 40, 1 ],
[492, 45, 1 ],
[10, 74, 1 ],
[45, 511, 1 ],
[78, 32, 1 ],
[79, 80, 0 ],
[81, 79, 1 ],
[34, 82, 0 ],
[83, 84, 0 ],
[83, 499, 0 ],
[85, 86, 0 ],
[87, 86, 1 ],
[88, 89, 0 ],
[90, 86, 1 ],
[91, 86, 0 ],
[86, 92, 0 ],
[86, 93, 0 ],
[94, 86, 1 ],
[86, 95, 1 ],
[513, 517, 0 ],
[97, 66, 1 ],
[42, 98, 0 ],
[99, 100, 1 ],
[42, 101, 0 ],
[102, 42, 1 ],
[103, 87, 0 ],
[104, 103, 0 ],
[105, 87, 0 ],
[106, 107, 0 ],
[108, 107, 0 ],
[109, 106, 0 ],
[110, 111, 1 ],
[87, 112, 0 ],
[113, 87, 0 ],
[87, 85, 1 ],
[110, 114, 1 ],
[115, 116, 0 ],
[117, 118, 0 ],
[117, 119, 0 ],
[117, 120, 1 ],
[121, 122, 0 ],
[123, 124, 0 ],
[125, 126, 0 ],
[127, 119, 0 ],
[118, 128, 0 ],
[121, 119, 0 ],
[530, 527, 0 ],
[125, 130, 0 ],
[125, 123, 0 ],
[131, 132, 0 ],
[133, 123, 0 ],
[524, 134, 0 ],
[135, 136, 0 ],
[123, 131, 0 ],
[117, 128, 1 ],
[137, 521, 0 ],
[531, 514, 0 ],
[139, 521, 0 ],
[140, 514, 0 ],
[522, 141, 0 ],
[142, 523, 0 ],
[530, 526, 0 ],
[140, 532, 0 ],
[142, 144, 0 ],
[140, 522, 0 ],
[145, 146, 0 ],
[147, 523, 0 ],
[144, 523, 0 ],
[139, 523, 0 ],
[140, 141, 0 ],
[528, 526, 0 ],
[528, 148, 0 ],
[149, 150, 0 ],
[145, 528, 0 ],
[530, 151, 0 ],
[524, 152, 0 ],
[149, 525, 1 ],
[139, 514, 0 ],
[126, 120, 1 ],
[530, 153, 0 ],
[528, 147, 1 ],
[528, 154, 0 ],
[130, 120, 1 ],
[528, 155, 1 ],
[524, 533, 0 ],
[524, 149, 0 ],
[154, 150, 0 ],
[157, 110, 1 ],
[119, 158, 0 ],
[159, 60, 0 ],
[536, 161, 0 ],
[115, 151, 0 ],
[162, 134, 0 ],
[115, 526, 0 ],
[138, 87, 0 ],
[123, 163, 0 ],
[112, 164, 0 ],
[112, 165, 0 ],
[166, 165, 0 ],
[167, 537, 0 ],
[168, 104, 0 ],
[531, 520, 0 ],
[139, 520, 0 ],
[520, 169, 0 ],
[168, 105, 0 ],
[520, 170, 0 ],
[171, 89, 0 ],
[521, 172, 0 ],
[123, 173, 0 ],
[521, 174, 0 ],
[37, 39, 0 ],
[530, 175, 0 ],
[530, 176, 0 ],
[88, 530, 0 ],
[177, 496, 1 ],
[178, 525, 0 ],
[179, 493, 1 ],
[180, 181, 1 ],
[182, 180, 0 ],
[179, 181, 0 ],
[180, 493, 1 ],
[183, 30, 0 ],
[183, 21, 0 ],
[538, 185, 0 ],
[538, 89, 0 ],
[184, 186, 0 ],
[184, 187, 0 ],
[520, 172, 0 ],
[89, 175, 0 ],
[185, 89, 0 ],
[89, 188, 0 ],
[189, 190, 0 ],
[539, 172, 0 ],
[504, 192, 0 ],
[105, 186, 0 ],
[105, 187, 0 ],
[539, 193, 0 ],
[187, 194, 0 ],
[539, 540, 0 ],
[539, 196, 0 ],
[197, 540, 0 ],
[110, 198, 0 ],
[197, 539, 0 ],
[199, 537, 0 ],
[134, 526, 0 ],
[200, 193, 0 ],
[4, 201, 1 ],
[202, 86, 0 ],
[85, 203, 0 ],
[147, 204, 0 ],
[147, 205, 0 ],
[123, 206, 0 ],
[537, 207, 0 ],
[165, 208, 0 ],
[4, 94, 1 ],
[4, 2, 0 ],
[209, 4, 0 ],
[119, 163, 0 ],
[210, 3, 0 ],
[99, 211, 0 ],
[99, 69, 1 ],
[212, 99, 0 ],
[213, 214, 0 ],
[510, 215, 0 ],
[128, 69, 1 ],
[216, 69, 1 ],
[217, 98, 0 ],
[504, 218, 0 ],
[177, 504, 1 ],
[219, 209, 0 ],
[219, 220, 0 ],
[94, 95, 1 ],
[159, 221, 1 ],
[34, 161, 0 ],
[222, 221, 0 ],
[211, 52, 1 ],
[215, 223, 1 ],
[224, 215, 0 ],
[225, 224, 1 ],
[224, 223, 0 ],
[226, 6, 0 ],
[7, 3, 1 ],
[216, 227, 1 ],
[228, 229, 0 ],
[227, 230, 0 ],
[231, 53, 1 ],
[544, 545, 0 ],
[234, 235, 1 ],
[546, 214, 1 ],
[233, 227, 0 ],
[237, 238, 0 ],
[212, 100, 0 ],
[519, 239, 0 ],
[238, 519, 0 ],
[213, 240, 0 ],
[241, 242, 1 ],
[70, 241, 0 ],
[509, 213, 0 ],
[68, 243, 0 ],
[243, 244, 0 ],
[68, 244, 0 ],
[544, 547, 1 ],
[245, 227, 1 ],
[246, 208, 0 ],
[112, 208, 0 ],
[165, 247, 0 ],
[537, 549, 0 ],
[537, 550, 0 ],
[537, 551, 0 ],
[110, 251, 0 ],
[510, 252, 1 ],
[529, 253, 1 ],
[237, 239, 1 ],
[254, 238, 1 ],
[69, 255, 0 ],
[510, 225, 1 ],
[256, 257, 0 ],
[258, 190, 0 ],
[258, 259, 0 ],
[260, 261, 1 ],
[554, 553, 1 ],
[515, 263, 0 ],
[14, 264, 1 ],
[116, 555, 0 ],
[151, 116, 0 ],
[111, 114, 1 ],
[77, 111, 0 ],
[266, 525, 0 ],
[267, 120, 1 ],
[268, 269, 0 ],
[556, 271, 0 ],
[556, 272, 0 ],
[529, 273, 0 ],
[128, 274, 0 ],
[34, 275, 0 ],
[503, 276, 0 ],
[503, 504, 1 ],
[177, 218, 1 ],
[277, 278, 1 ],
[557, 558, 1 ],
[557, 559, 1 ],
[559, 558, 1 ],
[277, 78, 1 ],
[277, 279, 1 ],
[78, 279, 0 ],
[281, 282, 0 ],
[283, 161, 1 ],
[268, 161, 1 ],
[256, 284, 0 ],
[515, 516, 1 ],
[263, 516, 0 ],
[516, 285, 0 ],
[63, 286, 0 ],
[287, 516, 0 ],
[8, 102, 1 ],
[8, 101, 1 ],
[80, 288, 0 ],
[80, 289, 0 ],
[276, 560, 0 ],
[37, 290, 0 ],
[290, 74, 1 ],
[512, 291, 0 ],
[78, 292, 1 ],
[199, 548, 0 ],
[491, 293, 0 ],
[4, 294, 0 ],
[490, 541, 1 ],
[491, 295, 0 ],
[491, 296, 0 ],
[295, 297, 0 ],
[508, 161, 0 ],
[117, 123, 0 ],
[133, 117, 0 ],
[71, 74, 1 ],
[74, 278, 1 ],
[298, 515, 0 ],
[5, 299, 0 ],
[32, 292, 1 ],
[5, 29, 1 ],
[503, 560, 0 ],
[300, 301, 1 ],
[51, 300, 0 ],
[244, 302, 1 ],
[31, 302, 1 ],
[51, 282, 1 ],
[303, 304, 0 ],
[305, 304, 0 ],
[305, 259, 0 ],
[306, 307, 1 ],
[305, 308, 0 ],
[305, 309, 0 ],
[310, 309, 1 ],
[306, 309, 1 ],
[311, 280, 0 ],
[280, 278, 1 ],
[311, 32, 1 ],
[13, 312, 1 ],
[313, 314, 0 ],
[312, 313, 1 ],
[547, 566, 1 ],
[245, 315, 1 ],
[312, 316, 0 ],
[312, 314, 0 ],
[554, 546, 1 ],
[262, 216, 1 ],
[317, 233, 0 ],
[318, 317, 0 ],
[231, 52, 1 ],
[319, 567, 0 ],
[557, 321, 0 ],
[277, 65, 1 ],
[322, 288, 1 ],
[322, 323, 0 ],
[277, 324, 1 ],
[324, 325, 0 ],
[277, 325, 0 ],
[326, 327, 0 ],
[328, 326, 1 ],
[328, 327, 1 ],
[326, 329, 0 ],
[568, 329, 1 ],
[568, 326, 0 ],
[332, 78, 1 ],
[333, 306, 0 ],
[332, 333, 0 ],
[332, 334, 0 ],
[66, 334, 1 ],
[330, 335, 1 ],
[336, 66, 0 ],
[330, 336, 1 ],
[68, 70, 0 ],
[509, 337, 1 ],
[324, 288, 0 ],
[338, 559, 0 ],
[339, 559, 0 ],
[339, 340, 1 ],
[559, 340, 1 ],
[341, 292, 0 ],
[557, 342, 0 ],
[558, 343, 0 ],
[502, 340, 1 ],
[72, 32, 1 ],
[344, 345, 0 ],
[346, 47, 0 ],
[46, 47, 0 ],
[346, 345, 0 ],
[347, 328, 0 ],
[347, 348, 1 ],
[571, 348, 1 ],
[347, 572, 0 ],
[571, 570, 1 ],
[14, 350, 0 ],
[350, 573, 0 ],
[15, 351, 1 ],
[352, 15, 0 ],
[15, 335, 1 ],
[232, 227, 0 ],
[565, 544, 1 ],
[235, 567, 1 ],
[567, 286, 0 ],
[353, 519, 0 ],
[354, 353, 0 ],
[355, 354, 0 ],
[354, 356, 0 ],
[357, 358, 0 ],
[574, 359, 0 ],
[235, 575, 0 ],
[167, 361, 0 ],
[528, 362, 0 ],
[363, 344, 0 ],
[259, 364, 1 ],
[54, 56, 0 ],
[365, 364, 0 ],
[231, 366, 0 ],
[30, 367, 0 ],
[61, 367, 1 ],
[254, 368, 0 ],
[254, 369, 0 ],
[254, 370, 0 ],
[99, 358, 0 ],
[354, 519, 0 ],
[571, 371, 0 ],
[207, 372, 0 ],
[57, 373, 0 ],
[209, 374, 0 ],
[375, 376, 0 ],
[376, 377, 0 ],
[16, 49, 0 ],
[318, 377, 0 ],
[378, 297, 0 ],
[562, 379, 0 ],
[576, 563, 0 ],
[576, 381, 0 ],
[577, 576, 1 ],
[244, 383, 0 ],
[244, 306, 1 ],
[383, 306, 1 ],
[380, 306, 0 ],
[252, 225, 0 ],
[220, 76, 0 ],
[542, 384, 0 ],
[385, 384, 0 ],
[542, 385, 0 ],
[386, 385, 0 ],
[387, 578, 0 ],
[332, 388, 1 ],
[382, 332, 1 ],
[382, 388, 0 ],
[579, 578, 0 ],
[577, 387, 1 ],
[144, 390, 0 ],
[37, 49, 0 ],
[391, 233, 0 ],
[392, 310, 0 ],
[260, 393, 0 ],
[394, 230, 0 ],
[395, 282, 1 ],
[395, 244, 0 ],
[25, 396, 1 ],
[81, 74, 0 ],
[278, 80, 1 ],
[81, 278, 1 ],
[569, 570, 0 ],
[397, 552, 0 ],
[542, 398, 0 ],
[398, 385, 0 ],
[399, 499, 0 ],
[83, 399, 0 ],
[498, 400, 0 ],
[518, 239, 1 ],
[575, 543, 0 ],
[401, 360, 0 ],
[580, 581, 0 ],
[401, 402, 0 ],
[403, 231, 0 ],
[189, 360, 1 ],
[234, 404, 0 ],
[235, 404, 1 ],
[235, 580, 0 ],
[216, 259, 0 ],
[405, 259, 0 ],
[405, 318, 0 ],
[406, 230, 0 ],
[542, 407, 0 ],
[23, 408, 0 ],
[577, 348, 0 ],
[562, 564, 1 ],
[582, 507, 0 ],
[27, 410, 0 ],
[501, 27, 0 ],
[27, 411, 0 ],
[411, 410, 0 ],
[403, 360, 0 ],
[412, 360, 0 ],
[326, 413, 0 ],
[414, 413, 0 ],
[6, 297, 0 ],
[554, 580, 1 ],
[262, 401, 1 ],
[499, 556, 1 ],
[224, 229, 0 ],
[583, 507, 0 ],
[415, 307, 0 ],
[416, 507, 0 ],
[284, 561, 0 ],
[543, 417, 0 ],
[418, 506, 0 ],
[220, 157, 0 ],
[295, 419, 0 ],
[295, 420, 0 ],
[541, 62, 0 ],
[52, 421, 0 ],
[60, 160, 0 ],
[535, 161, 0 ],
[267, 282, 0 ],
[52, 365, 0 ],
[28, 27, 0 ],
[30, 201, 1 ],
[422, 81, 0 ],
[119, 425, 0 ],
[423, 425, 0 ],
[424, 425, 0 ],
[426, 428, 0 ],
[427, 428, 0 ],
[19, 428, 1 ],
[45, 429, 0 ],
[44, 429, 0 ],
[505, 429, 0 ],
[231, 431, 1 ],
[190, 431, 1 ],
[430, 431, 0 ],
[286, 433, 0 ],
[432, 433, 0 ],
[506, 433, 0 ],
[23, 434, 0 ],
[400, 434, 0 ],
[500, 434, 0 ],
[32, 436, 0 ],
[435, 436, 0 ],
[78, 436, 1 ],
[86, 438, 1 ],
[437, 438, 0 ],
[221, 438, 0 ],
[207, 439, 0 ],
[516, 439, 0 ],
[513, 439, 0 ],
[181, 441, 1 ],
[440, 441, 0 ],
[504, 441, 1 ],
[135, 442, 0 ],
[109, 442, 0 ],
[112, 442, 0 ],
[113, 443, 0 ],
[132, 443, 0 ],
[107, 443, 0 ],
[444, 445, 0 ],
[112, 445, 0 ],
[109, 445, 0 ],
[119, 447, 1 ],
[100, 447, 1 ],
[446, 447, 0 ],
[124, 448, 0 ],
[125, 448, 0 ],
[131, 448, 0 ],
[449, 450, 0 ],
[173, 450, 0 ],
[184, 450, 0 ],
[144, 451, 0 ],
[140, 451, 0 ],
[514, 451, 0 ],
[537, 585, 1 ],
[141, 585, 0 ],
[584, 585, 0 ],
[522, 454, 0 ],
[144, 454, 0 ],
[453, 454, 0 ],
[199, 456, 0 ],
[140, 456, 0 ],
[455, 456, 0 ],
[537, 456, 0 ],
[538, 457, 0 ],
[153, 457, 0 ],
[176, 457, 0 ],
[524, 459, 0 ],
[458, 459, 0 ],
[134, 459, 0 ],
[460, 461, 0 ],
[150, 461, 0 ],
[149, 461, 0 ],
[521, 463, 0 ],
[462, 463, 0 ],
[538, 463, 0 ],
[110, 464, 0 ],
[90, 464, 0 ],
[165, 464, 0 ],
[458, 465, 0 ],
[134, 465, 0 ],
[524, 465, 0 ],
[466, 467, 0 ],
[110, 467, 0 ],
[165, 467, 0 ],
[468, 469, 0 ],
[541, 469, 0 ],
[490, 469, 0 ],
[263, 471, 0 ],
[470, 471, 0 ],
[534, 471, 0 ],
[136, 472, 0 ],
[110, 472, 0 ],
[251, 472, 0 ],
[226, 474, 0 ],
[473, 474, 0 ],
[257, 474, 0 ],
[6, 474, 1 ],
[299, 475, 1 ],
[3, 475, 0 ],
[210, 475, 0 ],
[297, 476, 0 ],
[296, 476, 0 ],
[295, 476, 0 ],
[313, 478, 1 ],
[477, 478, 0 ],
[245, 478, 0 ],
[479, 481, 0 ],
[565, 481, 0 ],
[480, 481, 0 ],
[415, 482, 0 ],
[56, 482, 0 ],
[409, 482, 0 ],
[483, 484, 0 ],
[3, 484, 0 ],
[301, 484, 0 ],
[233, 485, 0 ],
[392, 485, 0 ],
[391, 485, 0 ],
[579, 488, 0 ],
[486, 488, 0 ],
[487, 488, 0 ],
[270, 489, 0 ],
[331, 489, 0 ],
[396, 489, 1 ],
[519, 253, 0 ],
[382, 349, 1 ],
[349, 351, 0 ],
[459, 465, 0 ],
[549, 550, 0 ],
[550, 551, 0 ],
[194, 195, 0 ],
[247, 248, 0 ],
[2, 294, 0 ],
[549, 551, 0 ],
[54, 365, 0 ],
[131, 265, 0 ],
[91, 92, 0 ],
[247, 249, 0 ],
[186, 191, 0 ],
[129, 173, 0 ],
[96, 202, 0 ],
[53, 320, 0 ],
[24, 396, 0 ],
[133, 156, 0 ],
[442, 452, 0 ],
[445, 452, 0 ],
[247, 250, 0 ],
[187, 195, 0 ],
[216, 236, 0 ],
[244, 389, 0 ],
[394, 406, 0 ],
[442, 445, 0 ],
[442, 444, 0 ],
[198, 472, 0 ],
[464, 467, 0 ],
[198, 251, 0 ],
[112, 143, 0 ],
[2, 490, 0 ],
[5, 491, 0 ],
[10, 492, 0 ],
[12, 493, 0 ],
[13, 494, 0 ],
[15, 495, 0 ],
[18, 496, 0 ],
[20, 497, 0 ],
[22, 498, 0 ],
[24, 499, 0 ],
[26, 500, 0 ],
[30, 501, 0 ],
[32, 502, 0 ],
[37, 503, 0 ],
[42, 504, 0 ],
[46, 505, 0 ],
[52, 506, 0 ],
[56, 507, 0 ],
[61, 508, 0 ],
[68, 509, 0 ],
[69, 510, 0 ],
[74, 511, 0 ],
[78, 512, 0 ],
[86, 513, 0 ],
[87, 514, 0 ],
[94, 515, 0 ],
[95, 516, 0 ],
[96, 517, 0 ],
[99, 518, 0 ],
[100, 519, 0 ],
[104, 520, 0 ],
[105, 521, 0 ],
[106, 522, 0 ],
[107, 523, 0 ],
[117, 524, 0 ],
[120, 525, 0 ],
[123, 526, 0 ],
[124, 527, 0 ],
[125, 528, 0 ],
[128, 529, 0 ],
[129, 530, 0 ],
[138, 531, 0 ],
[143, 532, 0 ],
[156, 533, 0 ],
[157, 534, 0 ],
[159, 535, 0 ],
[160, 536, 0 ],
[165, 537, 0 ],
[184, 538, 0 ],
[191, 539, 0 ],
[195, 540, 0 ],
[201, 541, 0 ],
[220, 542, 0 ],
[231, 543, 0 ],
[232, 544, 0 ],
[233, 545, 0 ],
[236, 546, 0 ],
[245, 547, 0 ],
[246, 548, 0 ],
[248, 549, 0 ],
[249, 550, 0 ],
[250, 551, 0 ],
[259, 552, 0 ],
[261, 553, 0 ],
[262, 554, 0 ],
[265, 555, 0 ],
[270, 556, 0 ],
[277, 557, 0 ],
[279, 558, 0 ],
[280, 559, 0 ],
[290, 560, 0 ],
[301, 561, 0 ],
[305, 562, 0 ],
[306, 563, 0 ],
[310, 564, 0 ],
[313, 565, 0 ],
[315, 566, 0 ],
[320, 567, 0 ],
[330, 568, 0 ],
[332, 569, 0 ],
[334, 570, 0 ],
[336, 571, 0 ],
[349, 572, 0 ],
[351, 573, 0 ],
[358, 574, 0 ],
[360, 575, 0 ],
[380, 576, 0 ],
[382, 577, 0 ],
[383, 578, 0 ],
[389, 579, 0 ],
[401, 580, 0 ],
[402, 581, 0 ],
[409, 582, 0 ],
[415, 583, 0 ],
[444, 584, 0 ],
[452, 585, 0 ]
])
ppc["parameters"] = {
"x_trans_sg": 0.003,
"x_trans_fm": 0.001,
"x_trans_fl": 0.001,
"d_l": 1e-3,
"d_l_perturb": 1e-5,
"w_1_ij": 1,
"w_2_ij": 1,
"w_3_ij": 1,
"w_4_ij": 1,
"b_r": 238,
"b_c": 248 }
return ppc | 71.018713 | 137 | 0.464687 | from numpy import array
def scigrid_2011_01_07_01():
ppc = {"version": '2'}
ppc["baseMVA"] = 100.0
ppc["bus"] = array([
[586, 3, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[589, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[590, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[593, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[595, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[598, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[599, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[602, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[603, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[607, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[608, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[609, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[612, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[614, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[616, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[617, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[618, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[619, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[624, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[629, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[632, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[637, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[638, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[640, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[641, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[642, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[643, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[647, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[652, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[655, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[663, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[666, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[670, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[672, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[676, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[681, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[683, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[687, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[694, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[695, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[697, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[698, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[702, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[705, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[707, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[714, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[716, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[717, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[722, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[724, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[730, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[732, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[735, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[741, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[742, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[743, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[747, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[749, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[750, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[753, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[761, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[762, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[765, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[767, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[772, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[774, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[777, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[778, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[781, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[784, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[785, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[788, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[789, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[791, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[792, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[795, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[800, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[801, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[802, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[805, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[806, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[808, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[809, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[811, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[814, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[816, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[817, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[821, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[826, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[834, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[835, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[836, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[837, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[839, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[841, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[843, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[844, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[850, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[851, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[853, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[856, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[857, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[858, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[860, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[865, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[867, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[869, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[870, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[872, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[874, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[875, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[882, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[883, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[885, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[886, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[889, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[890, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[893, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[894, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[895, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[896, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[898, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[902, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[903, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[905, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[906, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[907, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[909, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[917, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[918, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[920, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[921, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[922, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[923, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[925, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[931, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[936, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[937, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[939, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[940, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[944, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[950, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[952, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[958, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[959, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[960, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[963, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[965, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[967, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[969, 2, 0, 0, 0, 0, 0, 0.999644, 0, 220.0, 0, 1.1, 0.9 ],
[971, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[978, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[982, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[983, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[984, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[985, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[986, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[987, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[988, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[993, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[994, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[995, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[997, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[999, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1002, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1007, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1010, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1011, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1012, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1014, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1027, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1028, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1029, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1030, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1031, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1032, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1033, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1034, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1035, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1036, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1037, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1038, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1039, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1040, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1041, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1042, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1043, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1044, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1045, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1046, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1047, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1048, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1049, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1050, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1051, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1052, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1053, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1054, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1055, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1056, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1057, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1058, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1059, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1060, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1061, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1062, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1063, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1064, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1065, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1066, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1067, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1068, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1069, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1070, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1071, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1072, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1073, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1074, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1075, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1076, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1077, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1078, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1079, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1080, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1081, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1082, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1083, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1084, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1085, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1086, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1087, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1088, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1089, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1090, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1091, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1092, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1093, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1096, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1097, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1098, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1099, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1100, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1101, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1102, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1103, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1105, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1106, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1107, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1108, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1109, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1110, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1111, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1113, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1114, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1115, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1116, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1117, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1118, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1119, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1120, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1121, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1122, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1123, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1124, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1125, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1126, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1127, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1128, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1129, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1130, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1131, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1133, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1134, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1135, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1136, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1137, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1138, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1139, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1140, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1142, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1143, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1144, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1145, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1146, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1147, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1148, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1149, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1150, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1151, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1152, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1155, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1157, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1160, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1161, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1162, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1163, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1164, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1165, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1166, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1168, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1169, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1171, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1172, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1173, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1175, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1176, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1177, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1178, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1179, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1181, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1182, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1183, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1184, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1186, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1187, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1188, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1189, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1190, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1191, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1192, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1193, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1194, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1195, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1196, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1197, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1198, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1199, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1200, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1201, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1202, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1203, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1204, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1205, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1206, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1207, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1208, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1209, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1210, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1211, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1212, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1213, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1214, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1215, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1216, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1217, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1218, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1219, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1220, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1221, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1222, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1223, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1224, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1225, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1226, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1227, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1228, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1229, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1230, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1231, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1232, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1233, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1235, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1236, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1237, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1238, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1239, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1240, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1241, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1242, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1243, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1244, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1245, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1246, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1247, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1248, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1249, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1250, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1251, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1252, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1253, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1254, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1255, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1256, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1257, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1258, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1259, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1260, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1261, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1262, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1263, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1264, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1265, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1266, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1267, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1268, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1269, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1270, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1271, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1272, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1273, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1274, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1275, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1276, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1277, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1278, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1279, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1280, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1281, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1282, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1283, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1284, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1285, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1286, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1287, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1288, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1289, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1290, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1291, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1292, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1293, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1294, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1295, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1296, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1297, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1298, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1299, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1300, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1301, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1302, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1303, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1304, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1305, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1306, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1307, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1308, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1309, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1310, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1311, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1312, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1313, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1314, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1315, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1316, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1317, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1318, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1319, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1320, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1321, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1322, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1323, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1324, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1325, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1326, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1327, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1328, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1329, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1330, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1332, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1333, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1334, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1335, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1336, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1337, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1338, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1339, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1340, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1341, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1342, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1343, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1344, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1345, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1346, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1347, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1348, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1349, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1350, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1351, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1352, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1355, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1356, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1357, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1358, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1359, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1363, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1364, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1365, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1366, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1367, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1368, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1369, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1370, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1371, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1372, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1373, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1374, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1375, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1376, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1377, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1378, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1379, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1381, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1382, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1383, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1387, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1390, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1391, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1393, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1394, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1395, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1396, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1397, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1398, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1399, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1400, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1401, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1402, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1403, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1404, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1405, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1406, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1407, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1408, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1409, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1410, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1411, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1412, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1413, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1414, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1415, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1416, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1417, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1418, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1419, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1420, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1421, 2, 0, 0, 0, 0, 0, 0.999644, 0, 220.0, 0, 1.1, 0.9 ],
[1422, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1423, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1424, 2, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[1425, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1426, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1427, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1428, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1429, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1430, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1431, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1432, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1433, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1434, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1435, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1436, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1437, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1438, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1439, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1440, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1441, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1442, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1443, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1444, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1445, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1446, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1447, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1448, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1449, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1450, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1451, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1452, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1453, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1454, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1455, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1456, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1459, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1460, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1461, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1463, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1464, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1466, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1467, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1468, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1469, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1470, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1471, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1472, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1473, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1474, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1475, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1476, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1477, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1479, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1480, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1481, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1482, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1483, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1484, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1485, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1486, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1487, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1488, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1489, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1490, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1491, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1492, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1493, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1494, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1495, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1496, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1497, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1498, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1499, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1500, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1501, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1502, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1503, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1504, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1505, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1506, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1507, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1508, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1510, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1511, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1512, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1513, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1514, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1516, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1517, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1518, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1519, 2, 0, 0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[1, 1, 231.535683, 46.307137, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[2, 1, 0, 0, 0, 0, 0, 1.000015, 0, 380.0, 0, 1.1, 0.9 ],
[3, 1, 40.581977, 8.116395, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[4, 1, 66.738408, 13.347682, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[5, 1, 0, 0, 0, 0, 0, 0.998829, 0, 380.0, 0, 1.1, 0.9 ],
[6, 1, 195.97163, 39.194326, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[7, 1, 147.688993, 29.537799, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[8, 1, 123.575597, 24.715119, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[9, 1, 83.572245, 16.714449, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[10, 1, 0, 0, 0, 0, 0, 1.001864, 0, 380.0, 0, 1.1, 0.9 ],
[11, 1, 73.223533, 14.644707, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[12, 1, 0, 0, 0, 0, 0, 1.000997, 0, 380.0, 0, 1.1, 0.9 ],
[13, 1, 0, 0, 0, 0, 0, 1.000519, 0, 380.0, 0, 1.1, 0.9 ],
[14, 1, 175.12383, 35.024766, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[15, 1, 0, 0, 0, 0, 0, 1.000477, 0, 380.0, 0, 1.1, 0.9 ],
[16, 1, 298.667302, 59.73346, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[17, 1, 70.343995, 14.068799, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[18, 1, 0, 0, 0, 0, 0, 1.002785, 0, 380.0, 0, 1.1, 0.9 ],
[19, 1, 173.793495, 34.758699, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[20, 1, 0, 0, 0, 0, 0, 0.998624, 0, 380.0, 0, 1.1, 0.9 ],
[21, 1, 747.338688, 149.467738, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[22, 1, 0, 0, 0, 0, 0, 1.000541, 0, 380.0, 0, 1.1, 0.9 ],
[23, 1, 97.851973, 19.570395, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[24, 1, 0, 0, 0, 0, 0, 0.999995, 0, 380.0, 0, 1.1, 0.9 ],
[25, 1, 46.803281, 9.360656, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[26, 1, 0, 0, 0, 0, 0, 1.000745, 0, 380.0, 0, 1.1, 0.9 ],
[27, 1, 57.452323, 11.490465, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[28, 1, 169.754403, 33.950881, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[29, 1, 62.354326, 12.470865, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[30, 1, 0, 0, 0, 0, 0, 0.999264, 0, 380.0, 0, 1.1, 0.9 ],
[31, 1, 122.711704, 24.542341, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[32, 1, 0, 0, 0, 0, 0, 0.995193, 0, 380.0, 0, 1.1, 0.9 ],
[33, 1, 153.857417, 30.771483, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[34, 1, 30.52459, 6.104918, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[35, 1, 2.020889, 0.404178, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[36, 1, 6.690873, 1.338175, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[37, 1, 0, 0, 0, 0, 0, 1.002691, 0, 380.0, 0, 1.1, 0.9 ],
[38, 1, 161.19808, 32.239616, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[39, 1, 52.784066, 10.556813, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[40, 1, 55.134608, 11.026922, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[41, 1, 59.257208, 11.851442, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[42, 1, 0, 0, 0, 0, 0, 1.001586, 0, 380.0, 0, 1.1, 0.9 ],
[43, 1, 90.873598, 18.17472, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[44, 1, 116.259296, 23.251859, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[45, 1, 61.713034, 12.342607, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[46, 1, 0, 0, 0, 0, 0, 1.000336, 0, 380.0, 0, 1.1, 0.9 ],
[47, 1, 268.333226, 53.666645, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[48, 1, 184.443359, 36.888672, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[49, 1, 46.654864, 9.330973, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[50, 1, 67.93578, 13.587156, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[51, 1, 88.040336, 17.608067, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[52, 1, 0, 0, 0, 0, 0, 1.0001, 0, 380.0, 0, 1.1, 0.9 ],
[53, 1, 133.58711, 26.717422, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[54, 1, 67.87003, 13.574006, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[55, 1, 66.560665, 13.312133, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[56, 1, 0, 0, 0, 0, 0, 0.999841, 0, 380.0, 0, 1.1, 0.9 ],
[57, 1, 79.452642, 15.890528, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[58, 1, 181.99836, 36.399672, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[59, 1, 51.979844, 10.395969, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[60, 1, 27.405216, 5.481043, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[61, 1, 0, 0, 0, 0, 0, 0.999477, 0, 380.0, 0, 1.1, 0.9 ],
[62, 1, 208.931319, 41.786264, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[63, 1, 123.330369, 24.666074, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[64, 1, 1308.785147, 261.757029, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[65, 1, 4.360894, 0.872179, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[66, 1, 138.366196, 27.673239, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[67, 1, 296.818798, 59.36376, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[68, 1, 0, 0, 0, 0, 0, 0.998332, 0, 380.0, 0, 1.1, 0.9 ],
[69, 1, 0, 0, 0, 0, 0, 1.00075, 0, 380.0, 0, 1.1, 0.9 ],
[70, 1, 561.513466, 112.302693, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[71, 1, 130.488497, 26.097699, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[72, 1, 213.722252, 42.74445, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[73, 1, 68.420546, 13.684109, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[74, 1, 0, 0, 0, 0, 0, 1.003789, 0, 380.0, 0, 1.1, 0.9 ],
[75, 1, 85.276082, 17.055216, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[76, 1, 82.310129, 16.462026, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[77, 1, 79.722985, 15.944597, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[78, 1, 0, 0, 0, 0, 0, 0.995035, 0, 380.0, 0, 1.1, 0.9 ],
[79, 1, 82.320126, 16.464025, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[80, 1, 87.436676, 17.487335, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[81, 1, 98.704099, 19.74082, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[82, 1, 3.28493, 0.656986, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[83, 1, 219.786066, 43.957213, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[84, 1, 21.636582, 4.327316, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[85, 1, 75.031466, 15.006293, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[86, 1, 0, 0, 0, 0, 0, 0.999969, 0, 380.0, 0, 1.1, 0.9 ],
[87, 1, 0, 0, 0, 0, 0, 0.999273, 0, 380.0, 0, 1.1, 0.9 ],
[88, 1, 60.560337, 12.112067, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[89, 1, 75.134368, 15.026874, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[90, 1, 86.776878, 17.355376, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[91, 1, 30.141967, 6.028393, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[92, 1, 32.89546, 6.579092, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[93, 1, 32.263856, 6.452771, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[94, 1, 0, 0, 0, 0, 0, 0.999174, 0, 380.0, 0, 1.1, 0.9 ],
[95, 1, 0, 0, 0, 0, 0, 1.000263, 0, 380.0, 0, 1.1, 0.9 ],
[96, 1, 0, 0, 0, 0, 0, 0.999998, 0, 380.0, 0, 1.1, 0.9 ],
[97, 1, 4.53767, 0.907534, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[98, 1, 83.429506, 16.685901, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[99, 1, 0, 0, 0, 0, 0, 1.001151, 0, 380.0, 0, 1.1, 0.9 ],
[100, 1, 0, 0, 0, 0, 0, 1.001527, 0, 380.0, 0, 1.1, 0.9 ],
[101, 1, 59.076598, 11.81532, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[102, 1, 114.34551, 22.869102, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[103, 1, 133.692027, 26.738405, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[104, 1, 0, 0, 0, 0, 0, 0.999922, 0, 380.0, 0, 1.1, 0.9 ],
[105, 1, 0, 0, 0, 0, 0, 0.999928, 0, 380.0, 0, 1.1, 0.9 ],
[106, 1, 0, 0, 0, 0, 0, 0.99986, 0, 380.0, 0, 1.1, 0.9 ],
[107, 1, 0, 0, 0, 0, 0, 0.999995, 0, 380.0, 0, 1.1, 0.9 ],
[108, 1, 94.303426, 18.860685, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[109, 1, 38.181848, 7.63637, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[110, 1, 49.561569, 9.912314, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[111, 1, 87.340876, 17.468175, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[112, 1, 44.205493, 8.841099, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[113, 1, 69.683871, 13.936774, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[114, 1, 102.627302, 20.52546, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[115, 1, 66.157788, 13.231558, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[116, 1, 110.70596, 22.141192, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[117, 1, 0, 0, 0, 0, 0, 1.000816, 0, 380.0, 0, 1.1, 0.9 ],
[118, 1, 171.412339, 34.282468, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[119, 1, 33.22675, 6.64535, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[120, 1, 0, 0, 0, 0, 0, 1.001279, 0, 380.0, 0, 1.1, 0.9 ],
[121, 1, 45.121942, 9.024388, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[122, 1, 39.503802, 7.90076, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[123, 1, 0, 0, 0, 0, 0, 1.000268, 0, 380.0, 0, 1.1, 0.9 ],
[124, 1, 0, 0, 0, 0, 0, 1.000006, 0, 380.0, 0, 1.1, 0.9 ],
[125, 1, 0, 0, 0, 0, 0, 0.999914, 0, 380.0, 0, 1.1, 0.9 ],
[126, 1, 207.119414, 41.423883, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[127, 1, 160.125097, 32.025019, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[128, 1, 0, 0, 0, 0, 0, 1.001323, 0, 380.0, 0, 1.1, 0.9 ],
[129, 1, 0, 0, 0, 0, 0, 0.999999, 0, 380.0, 0, 1.1, 0.9 ],
[130, 1, 220.78338, 44.156676, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[131, 1, 48.748779, 9.749756, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[132, 1, 126.934451, 25.38689, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[133, 1, 42.518068, 8.503614, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[134, 1, 42.343957, 8.468791, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[135, 1, 42.400098, 8.48002, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[136, 1, 41.074226, 8.214845, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[137, 1, 32.8556, 6.57112, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[138, 1, 0, 0, 0, 0, 0, 0.999263, 0, 380.0, 0, 1.1, 0.9 ],
[139, 1, 64.360791, 12.872158, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[140, 1, 44.508243, 8.901649, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[141, 1, 52.734412, 10.546882, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[142, 1, 58.026678, 11.605336, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[143, 1, 0, 0, 0, 0, 0, 0.99998, 0, 380.0, 0, 1.1, 0.9 ],
[144, 1, 52.856304, 10.571261, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[145, 1, 153.760388, 30.752078, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[146, 1, 198.226065, 39.645213, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[147, 1, 121.500905, 24.300181, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[148, 1, 171.460082, 34.292016, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[149, 1, 110.539074, 22.107815, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[150, 1, 144.320239, 28.864048, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[151, 1, 34.008844, 6.801769, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[152, 1, 70.598833, 14.119767, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[153, 1, 125.9598, 25.19196, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[154, 1, 129.385711, 25.877142, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[155, 1, 134.766653, 26.953331, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[156, 1, 0, 0, 0, 0, 0, 0.999992, 0, 380.0, 0, 1.1, 0.9 ],
[157, 1, 0, 0, 0, 0, 0, 1.000087, 0, 380.0, 0, 1.1, 0.9 ],
[158, 1, 35.506525, 7.101305, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[159, 1, 0, 0, 0, 0, 0, 1.001066, 0, 380.0, 0, 1.1, 0.9 ],
[160, 1, 0, 0, 0, 0, 0, 0.999999, 0, 380.0, 0, 1.1, 0.9 ],
[161, 1, 110.227427, 22.045485, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[162, 1, 164.757336, 32.951467, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[163, 1, 32.949911, 6.589982, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[164, 1, 33.082423, 6.616485, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[165, 1, 0, 0, 0, 0, 0, 0.999998, 0, 380.0, 0, 1.1, 0.9 ],
[166, 1, 38.678704, 7.735741, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[167, 1, 54.411201, 10.88224, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[168, 1, 37.13495, 7.42699, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[169, 1, 127.123641, 25.424728, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[170, 1, 95.522697, 19.104539, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[171, 1, 81.528586, 16.305717, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[172, 1, 40.012009, 8.002402, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[173, 1, 38.223311, 7.644662, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[174, 1, 57.359494, 11.471899, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[175, 1, 38.198259, 7.639652, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[176, 1, 133.106751, 26.62135, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[177, 1, 21.704995, 4.340999, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[178, 1, 114.954978, 22.990996, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[179, 1, 42.356942, 8.471388, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[180, 1, 37.232836, 7.446567, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[181, 1, 28.102272, 5.620454, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[182, 1, 1.273046, 0.254609, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[183, 1, 381.062729, 76.212546, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[184, 1, 0, 0, 0, 0, 0, 0.999954, 0, 380.0, 0, 1.1, 0.9 ],
[185, 1, 81.488061, 16.297612, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[186, 1, 43.880897, 8.776179, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[187, 1, 25.665856, 5.133171, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[188, 1, 38.198259, 7.639652, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[189, 1, 140.163669, 28.032734, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[190, 1, 185.392677, 37.078535, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[191, 1, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[192, 1, 44.648172, 8.929634, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[193, 1, 38.136642, 7.627328, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[194, 1, 26.326335, 5.265267, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[195, 1, 0, 0, 0, 0, 0, 0.999999, 0, 380.0, 0, 1.1, 0.9 ],
[196, 1, 36.934313, 7.386863, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[197, 1, 58.517517, 11.703503, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[198, 1, 34.627533, 6.925507, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[199, 1, 44.581796, 8.916359, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[200, 1, 38.199146, 7.639829, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[201, 1, 0, 0, 0, 0, 0, 0.997871, 0, 380.0, 0, 1.1, 0.9 ],
[202, 1, 39.143281, 7.828656, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[203, 1, 5.157478, 1.031496, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[204, 1, 151.164654, 30.232931, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[205, 1, 75.589132, 15.117826, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[206, 1, 36.277501, 7.2555, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[207, 1, 107.873663, 21.574733, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[208, 1, 31.76454, 6.352908, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[209, 1, 44.14161, 8.828322, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[210, 1, 50.710449, 10.14209, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[211, 1, 178.207882, 35.641576, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[212, 1, 44.665292, 8.933058, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[213, 1, 209.380904, 41.876181, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[214, 1, 140.886808, 28.177362, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[215, 1, 297.912187, 59.582437, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[216, 1, 100.452037, 20.090407, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[217, 1, 32.1884, 6.43768, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[218, 1, 98.063081, 19.612616, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[219, 1, 157.599323, 31.519865, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[220, 1, 0, 0, 0, 0, 0, 0.999672, 0, 380.0, 0, 1.1, 0.9 ],
[221, 1, 89.903024, 17.980605, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[222, 1, 0.0, 0.0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[223, 1, 89.099462, 17.819892, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[224, 1, 103.6104, 20.72208, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[225, 1, 186.038417, 37.207683, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[226, 1, 64.988967, 12.997793, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[227, 1, 80.963073, 16.192615, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[228, 1, 79.38182, 15.876364, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[229, 1, 175.658429, 35.131686, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[230, 1, 42.132923, 8.426585, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[231, 1, 0, 0, 0, 0, 0, 1.000936, 0, 380.0, 0, 1.1, 0.9 ],
[232, 1, 0, 0, 0, 0, 0, 0.999991, 0, 380.0, 0, 1.1, 0.9 ],
[233, 1, 0, 0, 0, 0, 0, 0.999606, 0, 380.0, 0, 1.1, 0.9 ],
[234, 1, 150.082157, 30.016431, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[235, 1, 48.804717, 9.760943, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[236, 1, 0, 0, 0, 0, 0, 0.999981, 0, 380.0, 0, 1.1, 0.9 ],
[237, 1, 0.403914, 0.080783, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[238, 1, 55.223425, 11.044685, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[239, 1, 76.298087, 15.259617, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[240, 1, 481.273697, 96.254739, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[241, 1, 356.125818, 71.225164, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[242, 1, 129.671855, 25.934371, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[243, 1, 104.619329, 20.923866, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[244, 1, 124.646159, 24.929232, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[245, 1, 0, 0, 0, 0, 0, 1.001786, 0, 380.0, 0, 1.1, 0.9 ],
[246, 1, 0, 0, 0, 0, 0, 0.999913, 0, 380.0, 0, 1.1, 0.9 ],
[247, 1, 24.735326, 4.947065, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[248, 1, 0, 0, 0, 0, 0, 0.999998, 0, 380.0, 0, 1.1, 0.9 ],
[249, 1, 0, 0, 0, 0, 0, 0.999997, 0, 380.0, 0, 1.1, 0.9 ],
[250, 1, 0, 0, 0, 0, 0, 0.999995, 0, 380.0, 0, 1.1, 0.9 ],
[251, 1, 61.387468, 12.277494, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[252, 1, 157.430773, 31.486155, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[253, 1, 69.118117, 13.823623, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[254, 1, 22.068268, 4.413654, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[255, 1, 108.529902, 21.70598, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[256, 1, 124.464912, 24.892982, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[257, 1, 60.06952, 12.013904, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[258, 1, 195.759311, 39.151862, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[259, 1, 0, 0, 0, 0, 0, 0.999581, 0, 380.0, 0, 1.1, 0.9 ],
[260, 1, 121.832905, 24.366581, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[261, 1, 0, 0, 0, 0, 0, 1.002014, 0, 380.0, 0, 1.1, 0.9 ],
[262, 1, 0, 0, 0, 0, 0, 0.99968, 0, 380.0, 0, 1.1, 0.9 ],
[263, 1, 174.769144, 34.953829, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[264, 1, 226.248083, 45.249617, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[265, 1, 0, 0, 0, 0, 0, 1.000009, 0, 380.0, 0, 1.1, 0.9 ],
[266, 1, 109.036505, 21.807301, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[267, 1, 137.907521, 27.581504, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[268, 1, 47.956289, 9.591258, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[269, 1, 38.510698, 7.70214, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[270, 1, 0, 0, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[271, 1, 0.0, 0.0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[272, 1, 0.78576, 0.157152, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[273, 1, 107.453062, 21.490612, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[274, 1, 208.874596, 41.774919, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[275, 1, 39.102465, 7.820493, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[276, 1, 152.431348, 30.48627, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[277, 1, 0, 0, 0, 0, 0, 0.998577, 0, 380.0, 0, 1.1, 0.9 ],
[278, 1, 118.997587, 23.799517, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[279, 1, 0, 0, 0, 0, 0, 0.998164, 0, 380.0, 0, 1.1, 0.9 ],
[280, 1, 0, 0, 0, 0, 0, 0.999529, 0, 380.0, 0, 1.1, 0.9 ],
[281, 1, 157.181561, 31.436312, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[282, 1, 222.279069, 44.455814, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[283, 1, 89.099103, 17.819821, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[284, 1, 135.167465, 27.033493, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[285, 1, 60.279948, 12.05599, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[286, 1, 126.337034, 25.267407, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[287, 1, 77.649516, 15.529903, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[288, 1, 49.943628, 9.988726, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[289, 1, 78.546842, 15.709368, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[290, 1, 0, 0, 0, 0, 0, 1.004907, 0, 380.0, 0, 1.1, 0.9 ],
[291, 1, 51.690749, 10.33815, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[292, 1, 101.905943, 20.381189, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[293, 1, 89.813561, 17.962712, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[294, 1, 23.933957, 4.786791, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[295, 1, 50.078174, 10.015635, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[296, 1, 142.172054, 28.434411, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[297, 1, 149.424424, 29.884885, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[298, 1, 78.899066, 15.779813, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[299, 1, 76.413221, 15.282644, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[300, 1, 208.170304, 41.634061, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[301, 1, 0, 0, 0, 0, 0, 0.999525, 0, 380.0, 0, 1.1, 0.9 ],
[302, 1, 175.358016, 35.071603, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[303, 1, 90.068963, 18.013793, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[304, 1, 77.342281, 15.468456, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[305, 1, 0, 0, 0, 0, 0, 0.99979, 0, 380.0, 0, 1.1, 0.9 ],
[306, 1, 0, 0, 0, 0, 0, 0.999891, 0, 380.0, 0, 1.1, 0.9 ],
[307, 1, 91.735133, 18.347027, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[308, 1, 113.097197, 22.619439, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[309, 1, 185.042919, 37.008584, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[310, 1, 0, 0, 0, 0, 0, 1.000041, 0, 380.0, 0, 1.1, 0.9 ],
[311, 1, 157.177116, 31.435423, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[312, 1, 70.686923, 14.137385, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[313, 1, 0, 0, 0, 0, 0, 1.001149, 0, 380.0, 0, 1.1, 0.9 ],
[314, 1, 218.943091, 43.788618, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[315, 1, 0, 0, 0, 0, 0, 1.001529, 0, 380.0, 0, 1.1, 0.9 ],
[316, 1, 85.78475, 17.15695, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[317, 1, 115.506023, 23.101205, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[318, 1, 189.819037, 37.963807, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[319, 1, 6.800077, 1.360015, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[320, 1, 0, 0, 0, 0, 0, 0.999995, 0, 380.0, 0, 1.1, 0.9 ],
[321, 1, 160.858437, 32.171687, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[322, 1, 20.478315, 4.095663, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[323, 1, 2.130594, 0.426119, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[324, 1, 376.637527, 75.327505, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[325, 1, 122.691298, 24.53826, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[326, 1, 9.94743, 1.989486, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[327, 1, 85.604424, 17.120885, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[328, 1, 145.883095, 29.176619, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[329, 1, 219.42118, 43.884236, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[330, 1, 0, 0, 0, 0, 0, 1.001641, 0, 380.0, 0, 1.1, 0.9 ],
[331, 1, 17.421295, 3.484259, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[332, 1, 0, 0, 0, 0, 0, 0.994883, 0, 380.0, 0, 1.1, 0.9 ],
[333, 1, 183.050164, 36.610033, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[334, 1, 0, 0, 0, 0, 0, 0.99946, 0, 380.0, 0, 1.1, 0.9 ],
[335, 1, 186.816503, 37.363301, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[336, 1, 0, 0, 0, 0, 0, 0.998019, 0, 380.0, 0, 1.1, 0.9 ],
[337, 1, 74.310127, 14.862025, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[338, 1, 201.688244, 40.337649, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[339, 1, 124.74139, 24.948278, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[340, 1, 105.466324, 21.093265, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[341, 1, 95.343664, 19.068733, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[342, 1, 165.389884, 33.077977, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[343, 1, 90.735302, 18.14706, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[344, 1, 227.495134, 45.499027, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[345, 1, 248.756971, 49.751394, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[346, 1, 246.952253, 49.390451, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[347, 1, 86.363489, 17.272698, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[348, 1, 225.759849, 45.15197, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[349, 1, 0, 0, 0, 0, 0, 1.001361, 0, 380.0, 0, 1.1, 0.9 ],
[350, 1, 118.436912, 23.687382, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[351, 1, 0, 0, 0, 0, 0, 1.001141, 0, 380.0, 0, 1.1, 0.9 ],
[352, 1, 783.968775, 156.793755, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[353, 1, 2.356872, 0.471374, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[354, 1, 16.012385, 3.202477, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[355, 1, 0.0, 0.0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[356, 1, 0.0, 0.0, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[357, 1, 0.040138, 0.008028, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[358, 1, 0, 0, 0, 0, 0, 1.00082, 0, 380.0, 0, 1.1, 0.9 ],
[359, 1, 2.343515, 0.468703, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[360, 1, 0, 0, 0, 0, 0, 1.000685, 0, 380.0, 0, 1.1, 0.9 ],
[361, 1, 59.980163, 11.996033, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[362, 1, 170.974507, 34.194901, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[363, 1, 251.729885, 50.345977, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[364, 1, 59.3922, 11.87844, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[365, 1, 53.307654, 10.661531, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[366, 1, 105.6556, 21.13112, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[367, 1, 51.069528, 10.213906, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[368, 1, 25.147475, 5.029495, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[369, 1, 20.664524, 4.132905, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[370, 1, 60.836949, 12.16739, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[371, 1, 306.104743, 61.220949, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[372, 1, 177.514538, 35.502908, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[373, 1, 119.786939, 23.957388, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[374, 1, 61.424714, 12.284943, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[375, 1, 201.49439, 40.298878, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[376, 1, 221.001397, 44.200279, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[377, 1, 158.145186, 31.629037, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[378, 1, 157.840789, 31.568158, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[379, 1, 54.400959, 10.880192, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[380, 1, 0, 0, 0, 0, 0, 0.999989, 0, 380.0, 0, 1.1, 0.9 ],
[381, 1, 181.920125, 36.384025, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[382, 1, 0, 0, 0, 0, 0, 1.000287, 0, 380.0, 0, 1.1, 0.9 ],
[383, 1, 0, 0, 0, 0, 0, 0.999356, 0, 380.0, 0, 1.1, 0.9 ],
[384, 1, 64.195093, 12.839019, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[385, 1, 81.026806, 16.205361, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[386, 1, 65.10261, 13.020522, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[387, 1, 132.584124, 26.516825, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[388, 1, 711.974806, 142.394961, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[389, 1, 0, 0, 0, 0, 0, 0.999953, 0, 380.0, 0, 1.1, 0.9 ],
[390, 1, 58.786094, 11.757219, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[391, 1, 66.962375, 13.392475, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[392, 1, 128.500124, 25.700025, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[393, 1, 160.472614, 32.094523, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[394, 1, 57.717386, 11.543477, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[395, 1, 79.99273, 15.998546, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[396, 1, 56.658032, 11.331606, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[397, 1, 454.335008, 90.867002, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[398, 1, 196.782306, 39.356461, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[399, 1, 83.843594, 16.768719, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[400, 1, 44.670462, 8.934092, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[401, 1, 0, 0, 0, 0, 0, 1.000557, 0, 380.0, 0, 1.1, 0.9 ],
[402, 1, 0, 0, 0, 0, 0, 1.000356, 0, 380.0, 0, 1.1, 0.9 ],
[403, 1, 22.179923, 4.435985, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[404, 1, 78.141243, 15.628249, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[405, 1, 589.107715, 117.821543, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[406, 1, 44.635096, 8.927019, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[407, 1, 88.356151, 17.67123, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[408, 1, 255.47644, 51.095288, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[409, 1, 0, 0, 0, 0, 0, 0.999926, 0, 380.0, 0, 1.1, 0.9 ],
[410, 1, 33.07651, 6.615302, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[411, 1, 31.275194, 6.255039, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[412, 1, 2.19674, 0.439348, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[413, 1, 109.665229, 21.933046, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[414, 1, 9.311764, 1.862353, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[415, 1, 0, 0, 0, 0, 0, 0.999523, 0, 380.0, 0, 1.1, 0.9 ],
[416, 1, 132.609322, 26.521864, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[417, 1, 5.18875, 1.03775, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[418, 1, 108.130419, 21.626084, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[419, 1, 57.79494, 11.558988, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[420, 1, 58.18776, 11.637552, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[421, 1, 83.817984, 16.763597, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[422, 1, 61.407864, 12.281573, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[423, 1, 128.970085, 25.794017, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[424, 1, 9.298411, 1.859682, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[425, 1, 76.363415, 15.272683, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[426, 1, 6.326944, 1.265389, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[427, 1, 53.17174, 10.634348, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[428, 1, 23.840558, 4.768112, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[429, 1, 269.035043, 53.807009, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[430, 1, 143.305714, 28.661143, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[431, 1, 95.830732, 19.166146, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[432, 1, 112.020247, 22.404049, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[433, 1, 57.261764, 11.452353, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[434, 1, 29.801811, 5.960362, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[435, 1, 119.188482, 23.837696, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[436, 1, 63.632731, 12.726546, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[437, 1, 14.491687, 2.898337, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[438, 1, 38.891719, 7.778344, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[439, 1, 72.411353, 14.482271, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[440, 1, 61.194993, 12.238999, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[441, 1, 46.914161, 9.382832, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[442, 1, 62.083316, 12.416663, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[443, 1, 134.602474, 26.920495, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[444, 1, 0, 0, 0, 0, 0, 0.999997, 0, 380.0, 0, 1.1, 0.9 ],
[445, 1, 61.161808, 12.232362, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[446, 1, 28.360182, 5.672036, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[447, 1, 53.918247, 10.783649, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[448, 1, 39.624436, 7.924887, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[449, 1, 199.799824, 39.959965, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[450, 1, 122.267959, 24.453592, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[451, 1, 52.245702, 10.44914, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[452, 1, 0, 0, 0, 0, 0, 0.999998, 0, 380.0, 0, 1.1, 0.9 ],
[453, 1, 35.014757, 7.002951, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[454, 1, 24.428604, 4.885721, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[455, 1, 39.828783, 7.965757, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[456, 1, 39.828783, 7.965757, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[457, 1, 122.144889, 24.428978, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[458, 1, 116.175191, 23.235038, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[459, 1, 141.38953, 28.277906, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[460, 1, 185.814973, 37.162995, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[461, 1, 193.287865, 38.657573, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[462, 1, 59.12776, 11.825552, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[463, 1, 30.297434, 6.059487, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[464, 1, 30.334057, 6.066811, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[465, 1, 48.997793, 9.799559, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[466, 1, 39.780009, 7.956002, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[467, 1, 36.710361, 7.342072, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[468, 1, 60.190482, 12.038096, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[469, 1, 37.298836, 7.459767, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[470, 1, 94.98582, 18.997164, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[471, 1, 93.522105, 18.704421, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[472, 1, 32.711213, 6.542243, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[473, 1, 60.065587, 12.013117, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[474, 1, 31.023248, 6.20465, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[475, 1, 30.444615, 6.088923, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[476, 1, 34.407424, 6.881485, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[477, 1, 55.52614, 11.105228, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[478, 1, 69.750952, 13.95019, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[479, 1, 126.404216, 25.280843, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[480, 1, 55.405258, 11.081052, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[481, 1, 48.116491, 9.623298, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[482, 1, 54.634205, 10.926841, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[483, 1, 46.462388, 9.292478, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[484, 1, 36.424252, 7.28485, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[485, 1, 54.408192, 10.881638, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[486, 1, 500.528791, 100.105758, 0, 0, 0, 0.999644, 0, 220.0, 0, 1.1, 0.9 ],
[487, 1, 126.831682, 25.366336, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[488, 1, 365.459497, 73.091899, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[489, 1, 96.1879, 19.23758, 0, 0, 0, 1.0, 0, 380.0, 0, 1.1, 0.9 ],
[490, 1, 29.930087, 5.986017, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[491, 1, 41.154254, 8.230851, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[492, 1, 64.176373, 12.835275, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[493, 1, 82.715663, 16.543133, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[494, 1, 113.049619, 22.609924, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[495, 1, 88.990255, 17.798051, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[496, 1, 6.303328, 1.260666, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[497, 1, 788.229231, 157.645846, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[498, 1, 36.96724, 7.393448, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[499, 1, 51.600211, 10.320042, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[500, 1, 28.250508, 5.650102, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[501, 1, 47.794989, 9.558998, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[502, 1, 188.636924, 37.727385, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[503, 1, 57.772131, 11.554426, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[504, 1, 37.831905, 7.566381, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[505, 1, 268.333226, 53.666645, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[506, 1, 84.226497, 16.845299, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[507, 1, 80.117224, 16.023445, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[508, 1, 116.472908, 23.294582, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[509, 1, 153.488191, 30.697638, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[510, 1, 96.96766, 19.393532, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[511, 1, 84.585425, 16.917085, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[512, 1, 55.873895, 11.174779, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[513, 1, 30.780554, 6.156111, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[514, 1, 76.60982, 15.321964, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[515, 1, 68.340511, 13.668102, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[516, 1, 76.45695, 15.29139, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[517, 1, 35.91366, 7.182732, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[518, 1, 202.268006, 40.453601, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[519, 1, 19.906875, 3.981375, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[520, 1, 80.37176, 16.074352, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[521, 1, 72.602992, 14.520598, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[522, 1, 62.16327, 12.432654, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[523, 1, 33.461781, 6.692356, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[524, 1, 97.122526, 19.424505, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[525, 1, 115.705825, 23.141165, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[526, 1, 35.07983, 7.015966, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[527, 1, 38.515188, 7.703038, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[528, 1, 84.063, 16.8126, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[529, 1, 107.756318, 21.551264, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[530, 1, 45.662726, 9.132545, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[531, 1, 46.426928, 9.285386, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[532, 1, 44.561758, 8.912352, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[533, 1, 39.932712, 7.986542, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[534, 1, 110.156768, 22.031354, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[535, 1, 137.909203, 27.581841, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[536, 1, 108.702172, 21.740434, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[537, 1, 36.160733, 7.232147, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[538, 1, 27.031297, 5.406259, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[539, 1, 28.681868, 5.736374, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[540, 1, 25.826762, 5.165352, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[541, 1, 66.712756, 13.342551, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[542, 1, 91.642706, 18.328541, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[543, 1, 50.054795, 10.010959, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[544, 1, 93.227759, 18.645552, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[545, 1, 200.734654, 40.146931, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[546, 1, 100.61124, 20.122248, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[547, 1, 130.046639, 26.009328, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[548, 1, 42.096635, 8.419327, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[549, 1, 35.996222, 7.199244, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[550, 1, 29.703005, 5.940601, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[551, 1, 28.63298, 5.726596, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[552, 1, 142.188155, 28.437631, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[553, 1, 0.983722, 0.196744, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[554, 1, 144.051445, 28.810289, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[555, 1, 54.885195, 10.977039, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[556, 1, 84.909223, 16.981845, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[557, 1, 180.401553, 36.080311, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[558, 1, 106.375344, 21.275069, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[559, 1, 56.93106, 11.386212, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[560, 1, 88.939784, 17.787957, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[561, 1, 48.771981, 9.754396, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[562, 1, 133.241398, 26.64828, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[563, 1, 93.679562, 18.735912, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[564, 1, 184.970556, 36.994111, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[565, 1, 139.56945, 27.91389, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[566, 1, 0.224178, 0.044836, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[567, 1, 226.8764, 45.37528, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[568, 1, 209.805777, 41.961155, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[569, 1, 147.620818, 29.524164, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[570, 1, 230.46268, 46.092536, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[571, 1, 169.684163, 33.936833, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[572, 1, 299.294532, 59.858906, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[573, 1, 87.120714, 17.424143, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[574, 1, 165.99823, 33.199646, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[575, 1, 3.119404, 0.623881, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[576, 1, 201.852734, 40.370547, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[577, 1, 222.521596, 44.504319, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[578, 1, 212.456169, 42.491234, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[579, 1, 77.509809, 15.501962, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[580, 1, 16.136389, 3.227278, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[581, 1, 0.092721, 0.018544, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[582, 1, 58.381537, 11.676307, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[583, 1, 66.961478, 13.392296, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[584, 1, 38.419289, 7.683858, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ],
[585, 1, 66.700613, 13.340123, 0, 0, 0, 1.0, 0, 220.0, 0, 1.1, 0.9 ]
])
ppc["gen"] = array([
[586, 0.0, 0, 9999, -9999, 1.0, 100, 1, 272.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[589, 63.1, 0, 9999, -9999, 1.0, 100, 1, 63.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[590, 38.0, 0, 9999, -9999, 1.0, 100, 1, 38.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[593, 11.1, 0, 9999, -9999, 1.0, 100, 1, 11.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[595, 1466.614612, 0, 9999, -9999, 1.0, 100, 1, 4730.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[598, 12.0, 0, 9999, -9999, 1.0, 100, 1, 12.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[599, 9.3, 0, 9999, -9999, 1.0, 100, 1, 9.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[602, 24.6, 0, 9999, -9999, 1.0, 100, 1, 24.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[603, 1363.789945, 0, 9999, -9999, 1.0, 100, 1, 3455.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[607, 1800.0, 0, 9999, -9999, 1.0, 100, 1, 1800.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[608, 24.0, 0, 9999, -9999, 1.0, 100, 1, 24.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[609, 36.4, 0, 9999, -9999, 1.0, 100, 1, 36.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[612, 30.0, 0, 9999, -9999, 1.0, 100, 1, 30.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[614, 30.0, 0, 9999, -9999, 1.0, 100, 1, 30.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[616, 29.0, 0, 9999, -9999, 1.0, 100, 1, 29.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[617, 137.0, 0, 9999, -9999, 1.0, 100, 1, 137.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[618, 33.4, 0, 9999, -9999, 1.0, 100, 1, 33.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[619, 118.0, 0, 9999, -9999, 1.0, 100, 1, 118.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[624, 27.0, 0, 9999, -9999, 1.0, 100, 1, 27.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[629, 75.3, 0, 9999, -9999, 1.0, 100, 1, 75.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[632, 45.1, 0, 9999, -9999, 1.0, 100, 1, 45.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[637, 53.7, 0, 9999, -9999, 1.0, 100, 1, 53.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[638, 128.7, 0, 9999, -9999, 1.0, 100, 1, 128.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[640, 12.0, 0, 9999, -9999, 1.0, 100, 1, 12.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[641, 12.6, 0, 9999, -9999, 1.0, 100, 1, 12.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[642, 28.9, 0, 9999, -9999, 1.0, 100, 1, 28.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[643, 857.0, 0, 9999, -9999, 1.0, 100, 1, 857.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[647, 14.0, 0, 9999, -9999, 1.0, 100, 1, 14.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[652, 46.9, 0, 9999, -9999, 1.0, 100, 1, 46.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[655, 61.5, 0, 9999, -9999, 1.0, 100, 1, 61.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[663, 15.0, 0, 9999, -9999, 1.0, 100, 1, 15.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[666, 28.9, 0, 9999, -9999, 1.0, 100, 1, 28.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[670, 24.0, 0, 9999, -9999, 1.0, 100, 1, 24.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[672, 33.1, 0, 9999, -9999, 1.0, 100, 1, 33.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[676, 370.0, 0, 9999, -9999, 1.0, 100, 1, 370.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[681, 40.1, 0, 9999, -9999, 1.0, 100, 1, 40.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[683, 27.5, 0, 9999, -9999, 1.0, 100, 1, 27.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[687, 1329.0, 0, 9999, -9999, 1.0, 100, 1, 1329.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[694, 16.4, 0, 9999, -9999, 1.0, 100, 1, 16.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[695, 14.7, 0, 9999, -9999, 1.0, 100, 1, 14.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[697, 11.6, 0, 9999, -9999, 1.0, 100, 1, 11.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[698, 24.0, 0, 9999, -9999, 1.0, 100, 1, 24.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[702, 73.4, 0, 9999, -9999, 1.0, 100, 1, 73.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[705, 17.0, 0, 9999, -9999, 1.0, 100, 1, 17.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[707, 34.0, 0, 9999, -9999, 1.0, 100, 1, 34.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[714, 15.0, 0, 9999, -9999, 1.0, 100, 1, 15.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[716, 0.1, 0, 9999, -9999, 1.0, 100, 1, 0.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[717, 11.0, 0, 9999, -9999, 1.0, 100, 1, 11.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[722, 20.7, 0, 9999, -9999, 1.0, 100, 1, 20.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[724, 12.1, 0, 9999, -9999, 1.0, 100, 1, 12.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[730, 633.2, 0, 9999, -9999, 1.0, 100, 1, 633.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[732, 14.6, 0, 9999, -9999, 1.0, 100, 1, 14.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[735, 84.8, 0, 9999, -9999, 1.0, 100, 1, 84.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[741, 214.0, 0, 9999, -9999, 1.0, 100, 1, 214.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[742, 9.0, 0, 9999, -9999, 1.0, 100, 1, 9.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[743, 1227.688539, 0, 9999, -9999, 1.0, 100, 1, 1410.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[747, 12.5, 0, 9999, -9999, 1.0, 100, 1, 12.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[749, 16.0, 0, 9999, -9999, 1.0, 100, 1, 16.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[750, 90.8, 0, 9999, -9999, 1.0, 100, 1, 90.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[753, 311.8, 0, 9999, -9999, 1.0, 100, 1, 311.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[761, 15.7, 0, 9999, -9999, 1.0, 100, 1, 15.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[762, 1076.088882, 0, 9999, -9999, 1.0, 100, 1, 1105.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[765, 59.0, 0, 9999, -9999, 1.0, 100, 1, 59.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[767, 11.2, 0, 9999, -9999, 1.0, 100, 1, 11.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[772, 18.8, 0, 9999, -9999, 1.0, 100, 1, 18.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[774, 33.5, 0, 9999, -9999, 1.0, 100, 1, 33.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[777, 79.0, 0, 9999, -9999, 1.0, 100, 1, 79.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[778, 14.7, 0, 9999, -9999, 1.0, 100, 1, 14.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[781, 945.392426, 0, 9999, -9999, 1.0, 100, 1, 1310.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[784, 1059.960906, 0, 9999, -9999, 1.0, 100, 1, 1275.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[785, 3.0, 0, 9999, -9999, 1.0, 100, 1, 3.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[788, 700.494671, 0, 9999, -9999, 1.0, 100, 1, 875.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[789, 77.4, 0, 9999, -9999, 1.0, 100, 1, 77.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[791, 10.0, 0, 9999, -9999, 1.0, 100, 1, 10.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[792, 62.7, 0, 9999, -9999, 1.0, 100, 1, 62.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[795, 13.6, 0, 9999, -9999, 1.0, 100, 1, 13.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[800, 36.5, 0, 9999, -9999, 1.0, 100, 1, 36.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[801, 50.0, 0, 9999, -9999, 1.0, 100, 1, 50.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[802, 500.0, 0, 9999, -9999, 1.0, 100, 1, 500.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[805, 693.813273, 0, 9999, -9999, 1.0, 100, 1, 1410.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[806, 35.8, 0, 9999, -9999, 1.0, 100, 1, 35.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[808, 217.5, 0, 9999, -9999, 1.0, 100, 1, 217.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[809, 12.5, 0, 9999, -9999, 1.0, 100, 1, 12.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[811, 25.2, 0, 9999, -9999, 1.0, 100, 1, 25.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[814, 89.0, 0, 9999, -9999, 1.0, 100, 1, 89.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[816, 80.1, 0, 9999, -9999, 1.0, 100, 1, 80.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[817, 54.0, 0, 9999, -9999, 1.0, 100, 1, 54.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[821, 82.5, 0, 9999, -9999, 1.0, 100, 1, 82.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[826, 58.0, 0, 9999, -9999, 1.0, 100, 1, 58.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[834, 23.3, 0, 9999, -9999, 1.0, 100, 1, 23.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[835, 63.7, 0, 9999, -9999, 1.0, 100, 1, 63.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[836, 25.5, 0, 9999, -9999, 1.0, 100, 1, 25.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[837, 472.0, 0, 9999, -9999, 1.0, 100, 1, 472.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[839, 73.3, 0, 9999, -9999, 1.0, 100, 1, 73.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[841, 23.3, 0, 9999, -9999, 1.0, 100, 1, 23.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[843, 333.0, 0, 9999, -9999, 1.0, 100, 1, 333.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[844, 40.0, 0, 9999, -9999, 1.0, 100, 1, 40.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[850, 16.0, 0, 9999, -9999, 1.0, 100, 1, 16.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[851, 79.5, 0, 9999, -9999, 1.0, 100, 1, 79.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[853, 11.6, 0, 9999, -9999, 1.0, 100, 1, 11.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[856, 36.0, 0, 9999, -9999, 1.0, 100, 1, 36.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[857, 1402.0, 0, 9999, -9999, 1.0, 100, 1, 1402.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[858, 56.8, 0, 9999, -9999, 1.0, 100, 1, 56.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[860, 25.0, 0, 9999, -9999, 1.0, 100, 1, 25.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[865, 11.0, 0, 9999, -9999, 1.0, 100, 1, 11.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[867, 264.697826, 0, 9999, -9999, 1.0, 100, 1, 769.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[869, 1360.0, 0, 9999, -9999, 1.0, 100, 1, 1360.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[870, 58.4, 0, 9999, -9999, 1.0, 100, 1, 58.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[872, 22.5, 0, 9999, -9999, 1.0, 100, 1, 22.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[874, 20.7, 0, 9999, -9999, 1.0, 100, 1, 20.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[875, 24.4, 0, 9999, -9999, 1.0, 100, 1, 24.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[882, 17.4, 0, 9999, -9999, 1.0, 100, 1, 17.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[883, 18.0, 0, 9999, -9999, 1.0, 100, 1, 18.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[885, 34.740146, 0, 9999, -9999, 1.0, 100, 1, 490.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[886, 2572.0, 0, 9999, -9999, 1.0, 100, 1, 2572.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[889, 9.5, 0, 9999, -9999, 1.0, 100, 1, 9.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[890, 48.0, 0, 9999, -9999, 1.0, 100, 1, 48.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[893, 60.0, 0, 9999, -9999, 1.0, 100, 1, 60.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[894, 158.0, 0, 9999, -9999, 1.0, 100, 1, 158.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[895, 19.0, 0, 9999, -9999, 1.0, 100, 1, 19.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[896, 24.0, 0, 9999, -9999, 1.0, 100, 1, 24.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[898, 84.6, 0, 9999, -9999, 1.0, 100, 1, 84.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[902, 19.5, 0, 9999, -9999, 1.0, 100, 1, 19.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[903, 20.1, 0, 9999, -9999, 1.0, 100, 1, 20.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[905, 137.3, 0, 9999, -9999, 1.0, 100, 1, 137.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[906, 66.0, 0, 9999, -9999, 1.0, 100, 1, 66.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[907, 67.3, 0, 9999, -9999, 1.0, 100, 1, 67.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[909, 36.8, 0, 9999, -9999, 1.0, 100, 1, 36.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[917, 17.0, 0, 9999, -9999, 1.0, 100, 1, 17.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[918, 38.5, 0, 9999, -9999, 1.0, 100, 1, 38.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[920, 12.8, 0, 9999, -9999, 1.0, 100, 1, 12.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[921, 124.0, 0, 9999, -9999, 1.0, 100, 1, 124.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[922, 164.0, 0, 9999, -9999, 1.0, 100, 1, 164.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[923, 146.0, 0, 9999, -9999, 1.0, 100, 1, 146.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[925, 26.0, 0, 9999, -9999, 1.0, 100, 1, 26.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[931, 217.1, 0, 9999, -9999, 1.0, 100, 1, 217.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[936, 104.4, 0, 9999, -9999, 1.0, 100, 1, 104.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[937, 30.0, 0, 9999, -9999, 1.0, 100, 1, 30.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[939, 0.1, 0, 9999, -9999, 1.0, 100, 1, 0.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[940, 29.6, 0, 9999, -9999, 1.0, 100, 1, 29.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[944, 25.4, 0, 9999, -9999, 1.0, 100, 1, 25.4, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[950, 16.0, 0, 9999, -9999, 1.0, 100, 1, 16.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[952, 31.7, 0, 9999, -9999, 1.0, 100, 1, 31.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[958, 66.7, 0, 9999, -9999, 1.0, 100, 1, 66.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[959, 45.5, 0, 9999, -9999, 1.0, 100, 1, 45.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[960, 26.5, 0, 9999, -9999, 1.0, 100, 1, 26.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[963, 687.931579, 0, 9999, -9999, 1.0, 100, 1, 875.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[965, 352.0, 0, 9999, -9999, 1.0, 100, 1, 352.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[967, 37.5, 0, 9999, -9999, 1.0, 100, 1, 37.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[969, 56.9, 0, 9999, -9999, 0.999644, 100, 1, 56.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[971, 20.0, 0, 9999, -9999, 1.0, 100, 1, 20.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[978, 4.6, 0, 9999, -9999, 1.0, 100, 1, 4.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[982, 9.9, 0, 9999, -9999, 1.0, 100, 1, 9.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[983, 44.0, 0, 9999, -9999, 1.0, 100, 1, 44.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[984, 465.0, 0, 9999, -9999, 1.0, 100, 1, 465.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[985, 22.0, 0, 9999, -9999, 1.0, 100, 1, 22.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[986, 11.2, 0, 9999, -9999, 1.0, 100, 1, 11.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[987, 164.5, 0, 9999, -9999, 1.0, 100, 1, 164.5, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[988, 5.1, 0, 9999, -9999, 1.0, 100, 1, 5.1, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[993, 392.0, 0, 9999, -9999, 1.0, 100, 1, 392.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[994, 33.0, 0, 9999, -9999, 1.0, 100, 1, 33.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[995, 4.2, 0, 9999, -9999, 1.0, 100, 1, 4.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[997, 18.8, 0, 9999, -9999, 1.0, 100, 1, 18.8, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[999, 15.6, 0, 9999, -9999, 1.0, 100, 1, 15.6, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1002, 9.9, 0, 9999, -9999, 1.0, 100, 1, 9.9, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1007, 23.3, 0, 9999, -9999, 1.0, 100, 1, 23.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1010, 750.0, 0, 9999, -9999, 1.0, 100, 1, 750.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1011, 18.7, 0, 9999, -9999, 1.0, 100, 1, 18.7, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1012, 810.029779, 0, 9999, -9999, 1.0, 100, 1, 2835.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1014, 599.602726, 0, 9999, -9999, 1.0, 100, 1, 750.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1027, 10.460207, 0, 9999, -9999, 1.0, 100, 1, 48.3, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1028, 292.918282, 0, 9999, -9999, 1.0, 100, 1, 400.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1029, 27.465302, 0, 9999, -9999, 1.0, 100, 1, 60.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1030, 533.877229, 0, 9999, -9999, 1.0, 100, 1, 1018.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1031, 1002.917112, 0, 9999, -9999, 1.0, 100, 1, 1447.2, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1032, 79.932691, 0, 9999, -9999, 1.0, 100, 1, 153.510391, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1033, 20.55676, 0, 9999, -9999, 1.0, 100, 1, 50.164506, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1034, 36.699953, 0, 9999, -9999, 1.0, 100, 1, 84.262779, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1035, 35.271451, 0, 9999, -9999, 1.0, 100, 1, 49.886469, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1036, 46.753001, 0, 9999, -9999, 1.0, 100, 1, 67.223077, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1037, 40.25786, 0, 9999, -9999, 1.0, 100, 1, 94.684044, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1038, 37.755525, 0, 9999, -9999, 1.0, 100, 1, 85.798525, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1039, 101.893155, 0, 9999, -9999, 1.0, 100, 1, 132.724114, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1040, 0.018424, 0, 9999, -9999, 1.0, 100, 1, 0.064179, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1041, 153.223357, 0, 9999, -9999, 1.0, 100, 1, 204.187624, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1042, 40.87186, 0, 9999, -9999, 1.0, 100, 1, 52.70053, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1043, 1.823835, 0, 9999, -9999, 1.0, 100, 1, 6.035538, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1044, 11.076386, 0, 9999, -9999, 1.0, 100, 1, 36.163532, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1045, 12.693234, 0, 9999, -9999, 1.0, 100, 1, 61.836204, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1046, 18.636555, 0, 9999, -9999, 1.0, 100, 1, 106.787063, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1047, 2.990521, 0, 9999, -9999, 1.0, 100, 1, 13.029581, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1048, 13.95159, 0, 9999, -9999, 1.0, 100, 1, 71.656883, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1049, 198.425639, 0, 9999, -9999, 1.0, 100, 1, 293.755375, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1050, 39.486108, 0, 9999, -9999, 1.0, 100, 1, 52.781606, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1051, 285.38149, 0, 9999, -9999, 1.0, 100, 1, 304.42978, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1052, 5.143615, 0, 9999, -9999, 1.0, 100, 1, 20.66869, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1053, 4.192271, 0, 9999, -9999, 1.0, 100, 1, 16.368087, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1054, 65.843261, 0, 9999, -9999, 1.0, 100, 1, 273.855776, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1055, 2.569306, 0, 9999, -9999, 1.0, 100, 1, 2.856069, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1056, 432.936564, 0, 9999, -9999, 1.0, 100, 1, 603.943953, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1057, 130.808026, 0, 9999, -9999, 1.0, 100, 1, 426.979979, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1058, 549.489833, 0, 9999, -9999, 1.0, 100, 1, 1055.735174, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1059, 360.823263, 0, 9999, -9999, 1.0, 100, 1, 414.871332, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1060, 9.16295, 0, 9999, -9999, 1.0, 100, 1, 10.351632, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1061, 154.755519, 0, 9999, -9999, 1.0, 100, 1, 161.862597, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1062, 2.358253, 0, 9999, -9999, 1.0, 100, 1, 2.878561, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1063, 6.654734, 0, 9999, -9999, 1.0, 100, 1, 8.670916, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1064, 154.89402, 0, 9999, -9999, 1.0, 100, 1, 209.786524, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1065, 250.621857, 0, 9999, -9999, 1.0, 100, 1, 339.421643, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1066, 68.904322, 0, 9999, -9999, 1.0, 100, 1, 134.399019, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1067, 6.260048, 0, 9999, -9999, 1.0, 100, 1, 32.653526, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1068, 2.977816, 0, 9999, -9999, 1.0, 100, 1, 5.009022, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1069, 1.620267, 0, 9999, -9999, 1.0, 100, 1, 3.190759, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1070, 0.473903, 0, 9999, -9999, 1.0, 100, 1, 0.788599, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1071, 2.394921, 0, 9999, -9999, 1.0, 100, 1, 4.328696, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1072, 36.154158, 0, 9999, -9999, 1.0, 100, 1, 112.606433, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1073, 20.275153, 0, 9999, -9999, 1.0, 100, 1, 77.81765, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1074, 48.536291, 0, 9999, -9999, 1.0, 100, 1, 153.592986, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1075, 8.668695, 0, 9999, -9999, 1.0, 100, 1, 15.783448, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1076, 0.719805, 0, 9999, -9999, 1.0, 100, 1, 2.29551, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1077, 18.059078, 0, 9999, -9999, 1.0, 100, 1, 26.120041, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1078, 14.921952, 0, 9999, -9999, 1.0, 100, 1, 34.413246, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1079, 22.955211, 0, 9999, -9999, 1.0, 100, 1, 72.327992, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1080, 44.741318, 0, 9999, -9999, 1.0, 100, 1, 132.149983, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1081, 388.316194, 0, 9999, -9999, 1.0, 100, 1, 405.642115, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1082, 485.516098, 0, 9999, -9999, 1.0, 100, 1, 510.054159, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1083, 613.766095, 0, 9999, -9999, 1.0, 100, 1, 633.681488, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1084, 522.770891, 0, 9999, -9999, 1.0, 100, 1, 602.719371, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1085, 37.272877, 0, 9999, -9999, 1.0, 100, 1, 113.714399, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1086, 69.300753, 0, 9999, -9999, 1.0, 100, 1, 225.59917, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1087, 107.585832, 0, 9999, -9999, 1.0, 100, 1, 116.66597, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1088, 35.327353, 0, 9999, -9999, 1.0, 100, 1, 36.782492, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1089, 297.558685, 0, 9999, -9999, 1.0, 100, 1, 384.449592, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1090, 23.576709, 0, 9999, -9999, 1.0, 100, 1, 89.140897, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1091, 7.850455, 0, 9999, -9999, 1.0, 100, 1, 45.7939, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1092, 5.88887, 0, 9999, -9999, 1.0, 100, 1, 54.002032, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1093, 10.655098, 0, 9999, -9999, 1.0, 100, 1, 155.605298, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1096, 7.860251, 0, 9999, -9999, 1.0, 100, 1, 84.50612, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1097, 0.394111, 0, 9999, -9999, 1.0, 100, 1, 4.601122, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1098, 9.296361, 0, 9999, -9999, 1.0, 100, 1, 71.025499, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1099, 54.610258, 0, 9999, -9999, 1.0, 100, 1, 290.937198, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1100, 0.003509, 0, 9999, -9999, 1.0, 100, 1, 0.026696, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1101, 24.535269, 0, 9999, -9999, 1.0, 100, 1, 83.930665, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1102, 117.607859, 0, 9999, -9999, 1.0, 100, 1, 350.979988, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1103, 93.242905, 0, 9999, -9999, 1.0, 100, 1, 245.381701, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1105, 0.002734, 0, 9999, -9999, 1.0, 100, 1, 2.178593, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1106, 0.001842, 0, 9999, -9999, 1.0, 100, 1, 2.289793, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1107, 7.627584, 0, 9999, -9999, 1.0, 100, 1, 76.221615, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1108, 84.395325, 0, 9999, -9999, 1.0, 100, 1, 320.422751, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1109, 0.005786, 0, 9999, -9999, 1.0, 100, 1, 0.77821, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1110, 0.001346, 0, 9999, -9999, 1.0, 100, 1, 1.654557, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1111, 11.638705, 0, 9999, -9999, 1.0, 100, 1, 89.637993, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1113, 0.000435, 0, 9999, -9999, 1.0, 100, 1, 3.536361, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1114, 2.594751, 0, 9999, -9999, 1.0, 100, 1, 13.446889, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1115, 0.024181, 0, 9999, -9999, 1.0, 100, 1, 50.575278, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1116, 0.003557, 0, 9999, -9999, 1.0, 100, 1, 32.601142, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1117, 1.0211, 0, 9999, -9999, 1.0, 100, 1, 90.792541, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1118, 0.126568, 0, 9999, -9999, 1.0, 100, 1, 8.725012, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1119, 0.06487, 0, 9999, -9999, 1.0, 100, 1, 43.254023, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1120, 0.003805, 0, 9999, -9999, 1.0, 100, 1, 2.416001, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1121, 0.000463, 0, 9999, -9999, 1.0, 100, 1, 0.540589, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1122, 0.001107, 0, 9999, -9999, 1.0, 100, 1, 1.462883, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1123, 0.000619, 0, 9999, -9999, 1.0, 100, 1, 1.464336, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1124, 0.001002, 0, 9999, -9999, 1.0, 100, 1, 1.288283, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1125, 0.961999, 0, 9999, -9999, 1.0, 100, 1, 25.818899, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1126, 1.24405, 0, 9999, -9999, 1.0, 100, 1, 29.154893, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1127, 0.204465, 0, 9999, -9999, 1.0, 100, 1, 105.296621, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1128, 0.003399, 0, 9999, -9999, 1.0, 100, 1, 3.06139, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1129, 0.004899, 0, 9999, -9999, 1.0, 100, 1, 4.738747, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1130, 0.00018, 0, 9999, -9999, 1.0, 100, 1, 1.025754, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1131, 0.002931, 0, 9999, -9999, 1.0, 100, 1, 2.897078, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1133, 0.000617, 0, 9999, -9999, 1.0, 100, 1, 0.719597, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1134, 0.000436, 0, 9999, -9999, 1.0, 100, 1, 0.508453, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1135, 0.027822, 0, 9999, -9999, 1.0, 100, 1, 8.117819, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1136, 0.000284, 0, 9999, -9999, 1.0, 100, 1, 0.4027, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1137, 0.098149, 0, 9999, -9999, 1.0, 100, 1, 3.669012, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1138, 0.002053, 0, 9999, -9999, 1.0, 100, 1, 1.254278, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1139, 0.000241, 0, 9999, -9999, 1.0, 100, 1, 19.822769, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1140, 4.49627, 0, 9999, -9999, 1.0, 100, 1, 28.389457, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1142, 0.00236, 0, 9999, -9999, 1.0, 100, 1, 1.215733, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1143, 0.502306, 0, 9999, -9999, 1.0, 100, 1, 25.239356, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1144, 0.030776, 0, 9999, -9999, 1.0, 100, 1, 52.527382, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1145, 40.324835, 0, 9999, -9999, 1.0, 100, 1, 175.889627, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1146, 0.000738, 0, 9999, -9999, 1.0, 100, 1, 0.861317, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1147, 0.011916, 0, 9999, -9999, 1.0, 100, 1, 45.703707, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1148, 0.651323, 0, 9999, -9999, 1.0, 100, 1, 17.645529, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1149, 0.135893, 0, 9999, -9999, 1.0, 100, 1, 8.556784, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1150, 0.021433, 0, 9999, -9999, 1.0, 100, 1, 3.62256, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1151, 0.019427, 0, 9999, -9999, 1.0, 100, 1, 13.036113, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1152, 0.00013, 0, 9999, -9999, 1.0, 100, 1, 0.116518, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1155, 0.000865, 0, 9999, -9999, 1.0, 100, 1, 0.609451, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1157, 0.006459, 0, 9999, -9999, 1.0, 100, 1, 4.354147, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1160, 61.129181, 0, 9999, -9999, 1.0, 100, 1, 238.377761, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1161, 2.896951, 0, 9999, -9999, 1.0, 100, 1, 25.263391, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1162, 273.439171, 0, 9999, -9999, 1.0, 100, 1, 502.409178, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1163, 206.24686, 0, 9999, -9999, 1.0, 100, 1, 330.03194, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1164, 143.533861, 0, 9999, -9999, 1.0, 100, 1, 285.625412, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1165, 29.685091, 0, 9999, -9999, 1.0, 100, 1, 57.188579, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1166, 32.175395, 0, 9999, -9999, 1.0, 100, 1, 83.277163, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1168, 0.000743, 0, 9999, -9999, 1.0, 100, 1, 1.345774, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1169, 0.003458, 0, 9999, -9999, 1.0, 100, 1, 2.721845, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1171, 1.967453, 0, 9999, -9999, 1.0, 100, 1, 9.029885, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1172, 0.631482, 0, 9999, -9999, 1.0, 100, 1, 3.584043, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1173, 82.749143, 0, 9999, -9999, 1.0, 100, 1, 254.253327, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1175, 0.000868, 0, 9999, -9999, 1.0, 100, 1, 0.855454, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1176, 0.000324, 0, 9999, -9999, 1.0, 100, 1, 0.23222, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1177, 0.126674, 0, 9999, -9999, 1.0, 100, 1, 27.87401, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1178, 0.165025, 0, 9999, -9999, 1.0, 100, 1, 3.167999, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1179, 0.011629, 0, 9999, -9999, 1.0, 100, 1, 1.306293, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1181, 13.535858, 0, 9999, -9999, 1.0, 100, 1, 85.739557, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1182, 8.79188, 0, 9999, -9999, 1.0, 100, 1, 99.319579, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1183, 0.981738, 0, 9999, -9999, 1.0, 100, 1, 38.222575, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1184, 0.008347, 0, 9999, -9999, 1.0, 100, 1, 4.219005, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1186, 3.535988, 0, 9999, -9999, 1.0, 100, 1, 38.916368, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1187, 0.27759, 0, 9999, -9999, 1.0, 100, 1, 9.814574, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1188, 56.68999, 0, 9999, -9999, 1.0, 100, 1, 179.712741, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1189, 8.957888, 0, 9999, -9999, 1.0, 100, 1, 20.261805, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1190, 210.457608, 0, 9999, -9999, 1.0, 100, 1, 220.533673, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1191, 70.653669, 0, 9999, -9999, 1.0, 100, 1, 73.079413, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1192, 8.195868, 0, 9999, -9999, 1.0, 100, 1, 21.454569, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1193, 0.865781, 0, 9999, -9999, 1.0, 100, 1, 2.399953, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1194, 3.340189, 0, 9999, -9999, 1.0, 100, 1, 8.986036, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1195, 0.071729, 0, 9999, -9999, 1.0, 100, 1, 0.202359, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1196, 49.815385, 0, 9999, -9999, 1.0, 100, 1, 160.697956, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1197, 26.370587, 0, 9999, -9999, 1.0, 100, 1, 90.592266, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1198, 8.079646, 0, 9999, -9999, 1.0, 100, 1, 39.819157, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1199, 43.056892, 0, 9999, -9999, 1.0, 100, 1, 201.421956, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1200, 11.02043, 0, 9999, -9999, 1.0, 100, 1, 56.012408, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1201, 17.382661, 0, 9999, -9999, 1.0, 100, 1, 25.166667, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1202, 20.92899, 0, 9999, -9999, 1.0, 100, 1, 49.89238, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1203, 143.537583, 0, 9999, -9999, 1.0, 100, 1, 182.623256, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1204, 23.95278, 0, 9999, -9999, 1.0, 100, 1, 47.541821, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1205, 0.219444, 0, 9999, -9999, 1.0, 100, 1, 0.548843, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1206, 1.467907, 0, 9999, -9999, 1.0, 100, 1, 3.806894, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1207, 1.289842, 0, 9999, -9999, 1.0, 100, 1, 3.575453, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1208, 1.785392, 0, 9999, -9999, 1.0, 100, 1, 2.242031, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1209, 0.039688, 0, 9999, -9999, 1.0, 100, 1, 1.268261, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1210, 0.579627, 0, 9999, -9999, 1.0, 100, 1, 9.02599, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1211, 13.976304, 0, 9999, -9999, 1.0, 100, 1, 18.005229, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1212, 74.870478, 0, 9999, -9999, 1.0, 100, 1, 91.171888, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1213, 46.121501, 0, 9999, -9999, 1.0, 100, 1, 57.342704, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1214, 2.447531, 0, 9999, -9999, 1.0, 100, 1, 4.505907, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1215, 0.708893, 0, 9999, -9999, 1.0, 100, 1, 2.252965, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1216, 16.428571, 0, 9999, -9999, 1.0, 100, 1, 67.754469, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1217, 32.069234, 0, 9999, -9999, 1.0, 100, 1, 35.871617, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1218, 0.793403, 0, 9999, -9999, 1.0, 100, 1, 0.980482, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1219, 0.548688, 0, 9999, -9999, 1.0, 100, 1, 12.33953, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1220, 2.817267, 0, 9999, -9999, 1.0, 100, 1, 30.597849, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1221, 292.553779, 0, 9999, -9999, 1.0, 100, 1, 593.230436, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1222, 166.288529, 0, 9999, -9999, 1.0, 100, 1, 211.057769, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1223, 3.615447, 0, 9999, -9999, 1.0, 100, 1, 3.806101, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1224, 54.949188, 0, 9999, -9999, 1.0, 100, 1, 160.523778, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1225, 21.684328, 0, 9999, -9999, 1.0, 100, 1, 34.931481, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1226, 1.849094, 0, 9999, -9999, 1.0, 100, 1, 3.982858, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1227, 9.902281, 0, 9999, -9999, 1.0, 100, 1, 17.482807, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1228, 0.730895, 0, 9999, -9999, 1.0, 100, 1, 3.021367, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1229, 9.347805, 0, 9999, -9999, 1.0, 100, 1, 51.244222, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1230, 0.238773, 0, 9999, -9999, 1.0, 100, 1, 1.681276, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1231, 4.366652, 0, 9999, -9999, 1.0, 100, 1, 33.55478, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1232, 11.333033, 0, 9999, -9999, 1.0, 100, 1, 75.075088, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1233, 150.178408, 0, 9999, -9999, 1.0, 100, 1, 575.36828, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1235, 2.638187, 0, 9999, -9999, 1.0, 100, 1, 9.03734, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1236, 22.763423, 0, 9999, -9999, 1.0, 100, 1, 82.225035, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1237, 2.778775, 0, 9999, -9999, 1.0, 100, 1, 14.605409, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1238, 72.798024, 0, 9999, -9999, 1.0, 100, 1, 188.691049, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1239, 0.564342, 0, 9999, -9999, 1.0, 100, 1, 2.267706, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1240, 241.248703, 0, 9999, -9999, 1.0, 100, 1, 339.51051, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1241, 364.295435, 0, 9999, -9999, 1.0, 100, 1, 385.361595, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1242, 4.834243, 0, 9999, -9999, 1.0, 100, 1, 27.074038, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1243, 37.302558, 0, 9999, -9999, 1.0, 100, 1, 83.079842, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1244, 79.039372, 0, 9999, -9999, 1.0, 100, 1, 323.472536, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1245, 2.700683, 0, 9999, -9999, 1.0, 100, 1, 8.080896, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1246, 11.614519, 0, 9999, -9999, 1.0, 100, 1, 57.127825, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1247, 4.672328, 0, 9999, -9999, 1.0, 100, 1, 21.833396, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1248, 11.023432, 0, 9999, -9999, 1.0, 100, 1, 91.958275, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1249, 65.703041, 0, 9999, -9999, 1.0, 100, 1, 76.135177, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1250, 28.580821, 0, 9999, -9999, 1.0, 100, 1, 30.830519, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1251, 21.224131, 0, 9999, -9999, 1.0, 100, 1, 23.404345, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1252, 14.138152, 0, 9999, -9999, 1.0, 100, 1, 14.887727, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1253, 50.455721, 0, 9999, -9999, 1.0, 100, 1, 64.502694, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1254, 28.780508, 0, 9999, -9999, 1.0, 100, 1, 82.278695, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1255, 3.003121, 0, 9999, -9999, 1.0, 100, 1, 3.818419, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1256, 12.275602, 0, 9999, -9999, 1.0, 100, 1, 15.091842, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1257, 65.168323, 0, 9999, -9999, 1.0, 100, 1, 88.95288, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1258, 68.145193, 0, 9999, -9999, 1.0, 100, 1, 235.487329, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1259, 85.172922, 0, 9999, -9999, 1.0, 100, 1, 109.288719, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1260, 6.875991, 0, 9999, -9999, 1.0, 100, 1, 20.168717, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1261, 173.495737, 0, 9999, -9999, 1.0, 100, 1, 201.699555, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1262, 0.309635, 0, 9999, -9999, 1.0, 100, 1, 0.524108, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1263, 0.24441, 0, 9999, -9999, 1.0, 100, 1, 0.352421, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1264, 64.013359, 0, 9999, -9999, 1.0, 100, 1, 82.035361, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1265, 4.784966, 0, 9999, -9999, 1.0, 100, 1, 6.654727, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1266, 103.17248, 0, 9999, -9999, 1.0, 100, 1, 119.710849, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1267, 38.430186, 0, 9999, -9999, 1.0, 100, 1, 39.469006, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1268, 2.034979, 0, 9999, -9999, 1.0, 100, 1, 3.4295, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1269, 2.322702, 0, 9999, -9999, 1.0, 100, 1, 5.105829, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1270, 25.03907, 0, 9999, -9999, 1.0, 100, 1, 38.950511, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1271, 23.845798, 0, 9999, -9999, 1.0, 100, 1, 47.371792, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1272, 0.422069, 0, 9999, -9999, 1.0, 100, 1, 1.23166, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1273, 0.244404, 0, 9999, -9999, 1.0, 100, 1, 2.169201, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1274, 50.377516, 0, 9999, -9999, 1.0, 100, 1, 53.095629, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1275, 87.392367, 0, 9999, -9999, 1.0, 100, 1, 99.0753, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1276, 24.185119, 0, 9999, -9999, 1.0, 100, 1, 25.655641, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1277, 52.100619, 0, 9999, -9999, 1.0, 100, 1, 65.611252, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1278, 146.059023, 0, 9999, -9999, 1.0, 100, 1, 170.437781, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1279, 0.000154, 0, 9999, -9999, 1.0, 100, 1, 0.004344, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1280, 0.06616, 0, 9999, -9999, 1.0, 100, 1, 0.626494, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1281, 0.401488, 0, 9999, -9999, 1.0, 100, 1, 2.51246, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1282, 0.613544, 0, 9999, -9999, 1.0, 100, 1, 4.363037, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1283, 402.284475, 0, 9999, -9999, 1.0, 100, 1, 1297.764428, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1284, 16.498159, 0, 9999, -9999, 1.0, 100, 1, 28.426322, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1285, 0.402632, 0, 9999, -9999, 1.0, 100, 1, 2.937048, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1286, 9.779237, 0, 9999, -9999, 1.0, 100, 1, 17.872201, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1287, 90.378036, 0, 9999, -9999, 1.0, 100, 1, 93.199628, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1288, 144.534188, 0, 9999, -9999, 1.0, 100, 1, 148.402692, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1289, 165.62078, 0, 9999, -9999, 1.0, 100, 1, 184.149235, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1290, 3.310598, 0, 9999, -9999, 1.0, 100, 1, 4.901974, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1291, 91.035472, 0, 9999, -9999, 1.0, 100, 1, 98.293351, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1292, 31.980176, 0, 9999, -9999, 1.0, 100, 1, 41.682074, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1293, 2.251511, 0, 9999, -9999, 1.0, 100, 1, 2.402107, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1294, 4.500984, 0, 9999, -9999, 1.0, 100, 1, 5.39743, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1295, 5.035929, 0, 9999, -9999, 1.0, 100, 1, 5.873666, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1296, 6.542922, 0, 9999, -9999, 1.0, 100, 1, 27.356489, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1297, 69.476429, 0, 9999, -9999, 1.0, 100, 1, 177.778742, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1298, 0.892933, 0, 9999, -9999, 1.0, 100, 1, 4.014603, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1299, 0.650887, 0, 9999, -9999, 1.0, 100, 1, 2.158207, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1300, 10.924264, 0, 9999, -9999, 1.0, 100, 1, 23.74405, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1301, 29.938353, 0, 9999, -9999, 1.0, 100, 1, 60.863304, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1302, 3.756946, 0, 9999, -9999, 1.0, 100, 1, 4.877299, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1303, 3.548349, 0, 9999, -9999, 1.0, 100, 1, 4.335516, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1304, 6.98833, 0, 9999, -9999, 1.0, 100, 1, 9.594319, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1305, 0.004134, 0, 9999, -9999, 1.0, 100, 1, 0.004567, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1306, 0.013051, 0, 9999, -9999, 1.0, 100, 1, 1.827014, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1307, 0.000269, 0, 9999, -9999, 1.0, 100, 1, 0.29894, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1308, 3.092704, 0, 9999, -9999, 1.0, 100, 1, 3.278321, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1309, 1.952844, 0, 9999, -9999, 1.0, 100, 1, 3.34909, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1310, 0.96121, 0, 9999, -9999, 1.0, 100, 1, 1.64589, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1311, 0.915033, 0, 9999, -9999, 1.0, 100, 1, 11.854004, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1312, 61.692105, 0, 9999, -9999, 1.0, 100, 1, 262.264924, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1313, 23.4633, 0, 9999, -9999, 1.0, 100, 1, 30.836748, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1314, 9.723847, 0, 9999, -9999, 1.0, 100, 1, 12.003987, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1315, 7.484353, 0, 9999, -9999, 1.0, 100, 1, 7.879027, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1316, 0.342208, 0, 9999, -9999, 1.0, 100, 1, 2.757497, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1317, 2.443039, 0, 9999, -9999, 1.0, 100, 1, 23.958574, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1318, 1.145435, 0, 9999, -9999, 1.0, 100, 1, 1.956332, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1319, 5.754202, 0, 9999, -9999, 1.0, 100, 1, 17.708276, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1320, 10.408423, 0, 9999, -9999, 1.0, 100, 1, 20.75859, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1321, 0.058081, 0, 9999, -9999, 1.0, 100, 1, 0.161123, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1322, 0.553533, 0, 9999, -9999, 1.0, 100, 1, 0.929763, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1323, 111.607065, 0, 9999, -9999, 1.0, 100, 1, 199.111909, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1324, 7.765494, 0, 9999, -9999, 1.0, 100, 1, 13.063258, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1325, 55.916254, 0, 9999, -9999, 1.0, 100, 1, 90.497559, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1326, 15.960037, 0, 9999, -9999, 1.0, 100, 1, 56.928865, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1327, 14.515435, 0, 9999, -9999, 1.0, 100, 1, 50.796895, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1328, 4.734532, 0, 9999, -9999, 1.0, 100, 1, 16.063343, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1329, 189.523369, 0, 9999, -9999, 1.0, 100, 1, 218.675424, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1330, 19.894995, 0, 9999, -9999, 1.0, 100, 1, 30.131028, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1332, 16.042068, 0, 9999, -9999, 1.0, 100, 1, 26.293088, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1333, 36.231617, 0, 9999, -9999, 1.0, 100, 1, 45.650254, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1334, 0.134934, 0, 9999, -9999, 1.0, 100, 1, 1.215341, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1335, 2.182146, 0, 9999, -9999, 1.0, 100, 1, 3.306939, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1336, 25.507951, 0, 9999, -9999, 1.0, 100, 1, 29.773035, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1337, 17.701639, 0, 9999, -9999, 1.0, 100, 1, 121.31241, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1338, 0.295098, 0, 9999, -9999, 1.0, 100, 1, 0.832524, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1339, 2.095095, 0, 9999, -9999, 1.0, 100, 1, 10.086482, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1340, 9.678742, 0, 9999, -9999, 1.0, 100, 1, 70.098327, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1341, 32.05516, 0, 9999, -9999, 1.0, 100, 1, 205.513321, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1342, 0.019287, 0, 9999, -9999, 1.0, 100, 1, 0.734589, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1343, 0.027263, 0, 9999, -9999, 1.0, 100, 1, 1.102108, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1344, 0.080101, 0, 9999, -9999, 1.0, 100, 1, 0.226057, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1345, 2.810638, 0, 9999, -9999, 1.0, 100, 1, 3.971188, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1346, 78.824561, 0, 9999, -9999, 1.0, 100, 1, 214.719215, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1347, 115.323366, 0, 9999, -9999, 1.0, 100, 1, 414.115976, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1348, 4.836222, 0, 9999, -9999, 1.0, 100, 1, 22.707927, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1349, 8.174869, 0, 9999, -9999, 1.0, 100, 1, 42.352342, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1350, 0.009739, 0, 9999, -9999, 1.0, 100, 1, 0.094971, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1351, 0.000376, 0, 9999, -9999, 1.0, 100, 1, 0.015958, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1352, 0.034671, 0, 9999, -9999, 1.0, 100, 1, 0.83726, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1355, 0.989078, 0, 9999, -9999, 1.0, 100, 1, 1.688324, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1356, 57.296262, 0, 9999, -9999, 1.0, 100, 1, 73.486231, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1357, 39.855184, 0, 9999, -9999, 1.0, 100, 1, 56.459913, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1358, 0.144939, 0, 9999, -9999, 1.0, 100, 1, 0.247293, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1359, 64.298242, 0, 9999, -9999, 1.0, 100, 1, 70.633589, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1363, 0.004007, 0, 9999, -9999, 1.0, 100, 1, 0.036158, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1364, 0.008183, 0, 9999, -9999, 1.0, 100, 1, 0.061068, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1365, 6.2e-05, 0, 9999, -9999, 1.0, 100, 1, 0.000456, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1366, 1.0371, 0, 9999, -9999, 1.0, 100, 1, 1.229992, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1367, 8.708215, 0, 9999, -9999, 1.0, 100, 1, 43.863891, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1368, 0.162393, 0, 9999, -9999, 1.0, 100, 1, 3.298243, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1369, 4.676329, 0, 9999, -9999, 1.0, 100, 1, 7.968859, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1370, 0.206453, 0, 9999, -9999, 1.0, 100, 1, 0.343308, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1371, 15.125702, 0, 9999, -9999, 1.0, 100, 1, 81.767208, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1372, 187.012409, 0, 9999, -9999, 1.0, 100, 1, 192.966588, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1373, 34.669274, 0, 9999, -9999, 1.0, 100, 1, 35.200257, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1374, 22.833303, 0, 9999, -9999, 1.0, 100, 1, 108.220146, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1375, 13.048539, 0, 9999, -9999, 1.0, 100, 1, 61.223816, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1376, 16.260883, 0, 9999, -9999, 1.0, 100, 1, 176.213655, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1377, 91.898696, 0, 9999, -9999, 1.0, 100, 1, 234.376272, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1378, 100.492585, 0, 9999, -9999, 1.0, 100, 1, 246.029906, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1379, 0.001688, 0, 9999, -9999, 1.0, 100, 1, 0.805984, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1381, 0.003024, 0, 9999, -9999, 1.0, 100, 1, 1.01257, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1382, 60.392773, 0, 9999, -9999, 1.0, 100, 1, 138.839906, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1383, 21.830255, 0, 9999, -9999, 1.0, 100, 1, 109.821439, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1387, 0.003612, 0, 9999, -9999, 1.0, 100, 1, 3.493561, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1390, 0.003859, 0, 9999, -9999, 1.0, 100, 1, 3.732816, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1391, 0.003146, 0, 9999, -9999, 1.0, 100, 1, 0.521719, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1393, 0.000486, 0, 9999, -9999, 1.0, 100, 1, 1.376509, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1394, 0.000481, 0, 9999, -9999, 1.0, 100, 1, 1.077886, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1395, 0.000515, 0, 9999, -9999, 1.0, 100, 1, 0.073776, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1396, 0.000342, 0, 9999, -9999, 1.0, 100, 1, 0.026112, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1397, 0.017188, 0, 9999, -9999, 1.0, 100, 1, 25.084545, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1398, 0.002611, 0, 9999, -9999, 1.0, 100, 1, 2.779641, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1399, 0.888247, 0, 9999, -9999, 1.0, 100, 1, 17.868157, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1400, 0.000449, 0, 9999, -9999, 1.0, 100, 1, 1.297197, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1401, 9.673835, 0, 9999, -9999, 1.0, 100, 1, 89.339497, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1402, 1.995463, 0, 9999, -9999, 1.0, 100, 1, 26.328902, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1403, 53.765488, 0, 9999, -9999, 1.0, 100, 1, 119.651672, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1404, 51.552063, 0, 9999, -9999, 1.0, 100, 1, 134.800518, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1405, 3.911245, 0, 9999, -9999, 1.0, 100, 1, 29.550802, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1406, 1.823208, 0, 9999, -9999, 1.0, 100, 1, 10.763987, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1407, 0.020768, 0, 9999, -9999, 1.0, 100, 1, 0.211614, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1408, 27.750555, 0, 9999, -9999, 1.0, 100, 1, 41.078698, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1409, 6.125989, 0, 9999, -9999, 1.0, 100, 1, 12.019786, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1410, 16.580102, 0, 9999, -9999, 1.0, 100, 1, 37.466518, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1411, 29.991893, 0, 9999, -9999, 1.0, 100, 1, 39.395367, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1412, 1.247754, 0, 9999, -9999, 1.0, 100, 1, 5.987601, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1413, 1.161805, 0, 9999, -9999, 1.0, 100, 1, 5.679791, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1414, 7.260981, 0, 9999, -9999, 1.0, 100, 1, 25.992489, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1415, 1.902862, 0, 9999, -9999, 1.0, 100, 1, 7.454501, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1416, 1.697076, 0, 9999, -9999, 1.0, 100, 1, 7.958002, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1417, 0.000225, 0, 9999, -9999, 1.0, 100, 1, 0.001311, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1418, 31.771568, 0, 9999, -9999, 1.0, 100, 1, 88.264613, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1419, 13.601182, 0, 9999, -9999, 1.0, 100, 1, 33.260903, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1420, 1.057952, 0, 9999, -9999, 1.0, 100, 1, 1.399757, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1421, 4.889225, 0, 9999, -9999, 0.999644, 100, 1, 6.972369, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1422, 3.591055, 0, 9999, -9999, 1.0, 100, 1, 4.730495, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1423, 1.379632, 0, 9999, -9999, 1.0, 100, 1, 1.931017, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1424, 52.568259, 0, 9999, -9999, 1.0, 100, 1, 219.092115, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1425, 7.570898, 0, 9999, -9999, 1.0, 100, 1, 21.366402, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1426, 53.646053, 0, 9999, -9999, 1.0, 100, 1, 68.762602, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1427, 426.696884, 0, 9999, -9999, 1.0, 100, 1, 480.698671, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1428, 229.292533, 0, 9999, -9999, 1.0, 100, 1, 334.885743, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1429, 4.000522, 0, 9999, -9999, 1.0, 100, 1, 13.279826, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1430, 0.00361, 0, 9999, -9999, 1.0, 100, 1, 0.034248, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1431, 82.661441, 0, 9999, -9999, 1.0, 100, 1, 227.662022, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1432, 3.068396, 0, 9999, -9999, 1.0, 100, 1, 12.058931, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1433, 353.343587, 0, 9999, -9999, 1.0, 100, 1, 1289.241188, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1434, 12.901546, 0, 9999, -9999, 1.0, 100, 1, 99.440014, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1435, 16.366899, 0, 9999, -9999, 1.0, 100, 1, 86.713217, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1436, 25.427054, 0, 9999, -9999, 1.0, 100, 1, 98.434116, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1437, 233.567574, 0, 9999, -9999, 1.0, 100, 1, 238.321958, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1438, 303.313525, 0, 9999, -9999, 1.0, 100, 1, 392.815158, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1439, 27.439294, 0, 9999, -9999, 1.0, 100, 1, 99.103164, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1440, 0.682349, 0, 9999, -9999, 1.0, 100, 1, 0.833609, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1441, 0.102576, 0, 9999, -9999, 1.0, 100, 1, 0.171578, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1442, 0.287662, 0, 9999, -9999, 1.0, 100, 1, 0.715522, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1443, 24.01603, 0, 9999, -9999, 1.0, 100, 1, 103.005076, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1444, 5.78705, 0, 9999, -9999, 1.0, 100, 1, 8.981696, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1445, 8.939839, 0, 9999, -9999, 1.0, 100, 1, 25.036799, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1446, 665.560328, 0, 9999, -9999, 1.0, 100, 1, 758.547933, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1447, 71.232954, 0, 9999, -9999, 1.0, 100, 1, 89.477411, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1448, 0.635617, 0, 9999, -9999, 1.0, 100, 1, 7.523578, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1449, 4.007945, 0, 9999, -9999, 1.0, 100, 1, 95.437673, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1450, 11.695201, 0, 9999, -9999, 1.0, 100, 1, 59.256809, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1451, 11.056834, 0, 9999, -9999, 1.0, 100, 1, 68.198838, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1452, 2.209088, 0, 9999, -9999, 1.0, 100, 1, 24.068921, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1453, 62.829218, 0, 9999, -9999, 1.0, 100, 1, 64.93775, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1454, 103.053623, 0, 9999, -9999, 1.0, 100, 1, 155.126607, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1455, 0.000929, 0, 9999, -9999, 1.0, 100, 1, 0.654438, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1456, 0.807723, 0, 9999, -9999, 1.0, 100, 1, 50.054822, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1459, 0.001899, 0, 9999, -9999, 1.0, 100, 1, 5.309059, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1460, 8.582365, 0, 9999, -9999, 1.0, 100, 1, 101.498473, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1461, 0.00048, 0, 9999, -9999, 1.0, 100, 1, 17.951737, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1463, 0.000661, 0, 9999, -9999, 1.0, 100, 1, 0.711207, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1464, 103.699065, 0, 9999, -9999, 1.0, 100, 1, 218.884211, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1466, 0.008472, 0, 9999, -9999, 1.0, 100, 1, 5.685017, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1467, 0.01035, 0, 9999, -9999, 1.0, 100, 1, 2.096155, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1468, 0.015871, 0, 9999, -9999, 1.0, 100, 1, 23.789171, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1469, 9.519658, 0, 9999, -9999, 1.0, 100, 1, 65.007467, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1470, 18.665435, 0, 9999, -9999, 1.0, 100, 1, 78.965265, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1471, 37.296985, 0, 9999, -9999, 1.0, 100, 1, 159.165074, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1472, 0.506929, 0, 9999, -9999, 1.0, 100, 1, 11.980182, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1473, 5.4e-05, 0, 9999, -9999, 1.0, 100, 1, 8.362608, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1474, 0.001949, 0, 9999, -9999, 1.0, 100, 1, 1.398948, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1475, 0.000397, 0, 9999, -9999, 1.0, 100, 1, 0.39088, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1476, 101.327203, 0, 9999, -9999, 1.0, 100, 1, 250.480113, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1477, 2.856374, 0, 9999, -9999, 1.0, 100, 1, 12.122974, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1479, 3.294063, 0, 9999, -9999, 1.0, 100, 1, 5.592606, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1480, 10.202484, 0, 9999, -9999, 1.0, 100, 1, 18.681964, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1481, 0.018812, 0, 9999, -9999, 1.0, 100, 1, 0.053146, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1482, 4.22506, 0, 9999, -9999, 1.0, 100, 1, 17.51083, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1483, 0.032046, 0, 9999, -9999, 1.0, 100, 1, 3.599649, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1484, 0.00133, 0, 9999, -9999, 1.0, 100, 1, 0.02991, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1485, 0.025059, 0, 9999, -9999, 1.0, 100, 1, 0.563547, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1486, 0.128922, 0, 9999, -9999, 1.0, 100, 1, 2.89934, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1487, 0.399374, 0, 9999, -9999, 1.0, 100, 1, 1.142917, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1488, 0.557496, 0, 9999, -9999, 1.0, 100, 1, 5.569856, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1489, 0.000102, 0, 9999, -9999, 1.0, 100, 1, 0.118938, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1490, 153.87342, 0, 9999, -9999, 1.0, 100, 1, 782.463701, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1491, 79.356319, 0, 9999, -9999, 1.0, 100, 1, 84.622838, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1492, 222.647124, 0, 9999, -9999, 1.0, 100, 1, 229.927503, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1493, 81.369208, 0, 9999, -9999, 1.0, 100, 1, 83.557175, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1494, 322.728735, 0, 9999, -9999, 1.0, 100, 1, 404.486733, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1495, 25.969556, 0, 9999, -9999, 1.0, 100, 1, 66.920717, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1496, 5.1e-05, 0, 9999, -9999, 1.0, 100, 1, 0.000282, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1497, 71.545947, 0, 9999, -9999, 1.0, 100, 1, 89.070006, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1498, 92.120695, 0, 9999, -9999, 1.0, 100, 1, 105.800802, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1499, 0.748238, 0, 9999, -9999, 1.0, 100, 1, 2.286676, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1500, 0.028955, 0, 9999, -9999, 1.0, 100, 1, 0.154817, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1501, 1.053275, 0, 9999, -9999, 1.0, 100, 1, 8.165333, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1502, 0.10328, 0, 9999, -9999, 1.0, 100, 1, 0.938928, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1503, 29.240906, 0, 9999, -9999, 1.0, 100, 1, 45.972187, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1504, 122.968061, 0, 9999, -9999, 1.0, 100, 1, 188.822836, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1505, 7.645825, 0, 9999, -9999, 1.0, 100, 1, 26.765913, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1506, 21.720319, 0, 9999, -9999, 1.0, 100, 1, 56.406717, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1507, 3.842405, 0, 9999, -9999, 1.0, 100, 1, 15.438042, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1508, 0.06199, 0, 9999, -9999, 1.0, 100, 1, 0.065259, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1510, 80.0538, 0, 9999, -9999, 1.0, 100, 1, 107.008141, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1511, 112.671979, 0, 9999, -9999, 1.0, 100, 1, 155.22192, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1512, 52.731338, 0, 9999, -9999, 1.0, 100, 1, 64.130052, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1513, 20.534213, 0, 9999, -9999, 1.0, 100, 1, 23.051786, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1514, 0.001102, 0, 9999, -9999, 1.0, 100, 1, 0.027711, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1516, 0.010731, 0, 9999, -9999, 1.0, 100, 1, 0.02881, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1517, 0.893235, 0, 9999, -9999, 1.0, 100, 1, 1.286804, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1518, 0.001327, 0, 9999, -9999, 1.0, 100, 1, 0.670542, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1519, 9.2e-05, 0, 9999, -9999, 1.0, 100, 1, 0.04654, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
])
ppc["branch"] = array([
[586, 1, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[589, 108, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[590, 108, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[593, 112, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[595, 115, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[598, 118, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[599, 119, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[602, 121, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[603, 526, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[607, 127, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[608, 127, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[609, 529, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[612, 493, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[614, 130, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[616, 132, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[617, 133, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[618, 133, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[619, 134, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[624, 14, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[629, 145, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[632, 145, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[637, 148, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[638, 149, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[640, 153, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[641, 155, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[642, 533, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[643, 534, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[647, 536, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[652, 167, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[655, 170, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[663, 178, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[666, 180, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[670, 183, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[672, 185, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[676, 19, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[681, 197, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[683, 200, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[687, 202, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[694, 21, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[695, 210, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[697, 211, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[698, 212, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[702, 215, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[705, 217, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[707, 219, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[714, 225, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[716, 226, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[717, 227, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[722, 545, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[724, 238, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[730, 547, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[732, 247, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[735, 253, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[741, 264, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[742, 264, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[743, 500, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[747, 273, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[749, 274, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[750, 557, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[753, 28, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[761, 288, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[762, 289, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[765, 560, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[767, 292, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[772, 3, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[774, 300, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[777, 300, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[778, 300, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[781, 303, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[784, 563, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[785, 501, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[788, 311, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[789, 565, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[791, 314, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[792, 316, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[795, 319, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[800, 326, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[801, 327, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[802, 327, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[805, 328, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[806, 328, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[808, 329, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[809, 329, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[811, 568, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[814, 570, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[816, 335, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[817, 571, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[821, 338, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[826, 339, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[834, 572, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[835, 572, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[836, 572, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[837, 350, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[839, 350, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[841, 573, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[843, 352, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[844, 352, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[850, 574, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[851, 575, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[853, 362, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[856, 363, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[857, 365, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[858, 368, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[860, 371, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[865, 375, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[867, 376, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[869, 503, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[870, 503, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[872, 378, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[874, 576, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[875, 381, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[882, 388, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[883, 388, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[885, 393, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[886, 394, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[889, 397, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[890, 40, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[893, 400, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[894, 400, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[895, 580, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[896, 581, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[898, 403, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[902, 405, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[903, 406, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[905, 413, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[906, 414, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[907, 583, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[909, 417, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[917, 43, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[918, 424, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[920, 428, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[921, 428, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[922, 429, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[923, 432, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[925, 44, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[931, 439, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[936, 445, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[937, 447, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[939, 450, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[940, 451, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[944, 458, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[950, 462, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[952, 47, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[958, 478, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[959, 478, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[960, 479, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[963, 481, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[965, 49, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[967, 49, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[969, 486, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[971, 51, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[978, 491, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[982, 62, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[983, 62, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[984, 63, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[985, 63, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[986, 64, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[987, 65, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[988, 66, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[993, 67, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[994, 67, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[995, 509, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[997, 510, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[999, 70, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1002, 71, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1007, 511, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1010, 79, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1011, 79, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1012, 81, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1014, 83, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1027, 218, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1028, 221, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1029, 268, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1030, 269, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1031, 498, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1032, 1, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1033, 3, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1034, 4, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1035, 6, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1036, 7, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1037, 8, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1038, 9, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1039, 11, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1040, 14, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1041, 16, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1042, 17, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1043, 19, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1044, 21, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1045, 23, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1046, 25, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1047, 27, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1048, 28, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1049, 29, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1050, 31, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1051, 33, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1052, 34, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1053, 35, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1054, 36, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1055, 38, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1056, 39, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1057, 40, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1058, 41, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1059, 43, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1060, 44, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1061, 45, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1062, 47, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1063, 48, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1064, 49, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1065, 50, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1066, 51, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1067, 53, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1068, 54, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1069, 55, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1070, 57, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1071, 58, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1072, 59, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1073, 60, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1074, 62, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1075, 63, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1076, 64, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1077, 65, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1078, 66, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1079, 67, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1080, 70, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1081, 71, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1082, 72, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1083, 73, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1084, 75, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1085, 76, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1086, 77, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1087, 79, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1088, 80, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1089, 81, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1090, 82, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1091, 83, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1092, 84, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1093, 85, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1096, 90, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1097, 91, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1098, 92, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1099, 93, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1100, 97, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1101, 98, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1102, 101, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1103, 102, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1105, 108, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1106, 109, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1107, 110, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1108, 111, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1109, 112, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1110, 113, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1111, 114, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1113, 116, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1114, 118, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1115, 119, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1116, 121, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1117, 122, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1118, 126, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1119, 127, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1120, 130, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1121, 131, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1122, 132, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1123, 133, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1124, 134, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1125, 135, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1126, 136, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1127, 137, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1128, 139, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1129, 140, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1130, 141, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1131, 142, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1133, 145, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1134, 146, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1135, 147, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1136, 148, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1137, 149, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1138, 150, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1139, 151, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1140, 152, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1142, 154, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1143, 155, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1144, 158, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1145, 161, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1146, 162, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1147, 163, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1148, 164, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1149, 166, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1150, 167, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1151, 168, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1152, 169, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1155, 172, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1157, 174, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1160, 177, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1161, 178, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1162, 179, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1163, 180, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1164, 181, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1165, 182, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1166, 183, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1168, 186, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1169, 187, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1171, 189, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1172, 190, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1173, 192, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1175, 194, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1176, 196, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1177, 197, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1178, 198, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1179, 199, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1181, 202, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1182, 203, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1183, 204, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1184, 205, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1186, 207, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1187, 208, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1188, 209, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1189, 210, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1190, 211, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1191, 212, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1192, 213, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1193, 214, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1194, 215, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1195, 216, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1196, 217, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1197, 218, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1198, 219, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1199, 221, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1200, 222, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1201, 223, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1202, 224, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1203, 225, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1204, 226, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1205, 227, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1206, 228, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1207, 229, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1208, 230, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1209, 234, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1210, 235, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1211, 237, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1212, 238, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1213, 239, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1214, 240, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1215, 241, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1216, 242, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1217, 243, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1218, 244, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1219, 247, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1220, 251, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1221, 252, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1222, 253, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1223, 254, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1224, 255, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1225, 256, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1226, 257, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1227, 258, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1228, 260, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1229, 263, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1230, 264, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1231, 266, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1232, 267, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1233, 268, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1235, 271, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1236, 272, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1237, 273, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1238, 274, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1239, 275, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1240, 276, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1241, 278, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1242, 281, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1243, 282, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1244, 283, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1245, 284, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1246, 285, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1247, 286, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1248, 287, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1249, 288, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1250, 289, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1251, 291, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1252, 292, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1253, 293, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1254, 294, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1255, 295, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1256, 296, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1257, 297, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1258, 298, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1259, 299, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1260, 300, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1261, 302, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1262, 303, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1263, 304, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1264, 307, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1265, 308, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1266, 309, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1267, 311, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1268, 312, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1269, 314, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1270, 316, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1271, 317, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1272, 318, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1273, 319, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1274, 321, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1275, 322, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1276, 323, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1277, 324, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1278, 325, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1279, 326, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1280, 327, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1281, 328, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1282, 329, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1283, 331, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1284, 333, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1285, 335, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1286, 337, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1287, 338, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1288, 339, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1289, 340, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1290, 341, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1291, 342, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1292, 343, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1293, 344, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1294, 345, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1295, 346, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1296, 347, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1297, 348, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1298, 350, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1299, 352, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1300, 353, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1301, 354, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1302, 355, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1303, 356, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1304, 357, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1305, 359, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1306, 361, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1307, 362, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1308, 363, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1309, 364, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1310, 365, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1311, 366, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1312, 367, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1313, 368, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1314, 369, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1315, 370, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1316, 371, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1317, 372, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1318, 373, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1319, 374, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1320, 375, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1321, 376, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1322, 377, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1323, 378, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1324, 379, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1325, 381, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1326, 384, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1327, 385, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1328, 386, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1329, 387, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1330, 388, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1332, 391, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1333, 392, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1334, 393, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1335, 394, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1336, 395, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1337, 396, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1338, 397, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1339, 398, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1340, 399, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1341, 400, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1342, 403, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1343, 404, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1344, 405, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1345, 406, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1346, 407, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1347, 408, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1348, 410, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1349, 411, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1350, 412, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1351, 413, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1352, 414, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1355, 418, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1356, 419, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1357, 420, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1358, 421, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1359, 422, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1363, 426, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1364, 427, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1365, 428, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1366, 429, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1367, 430, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1368, 431, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1369, 432, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1370, 433, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1371, 434, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1372, 435, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1373, 436, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1374, 437, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1375, 438, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1376, 439, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1377, 440, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1378, 441, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1379, 442, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1381, 445, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1382, 446, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1383, 447, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1387, 451, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1390, 455, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1391, 456, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1393, 458, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1394, 459, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1395, 460, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1396, 461, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1397, 462, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1398, 463, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1399, 464, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1400, 465, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1401, 466, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1402, 467, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1403, 468, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1404, 469, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1405, 470, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1406, 471, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1407, 472, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1408, 473, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1409, 474, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1410, 475, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1411, 476, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1412, 477, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1413, 478, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1414, 479, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1415, 480, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1416, 481, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1417, 482, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1418, 483, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1419, 484, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1420, 485, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1421, 486, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1422, 487, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1423, 488, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1424, 489, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1425, 490, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1426, 491, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1427, 492, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1428, 493, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1429, 494, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1430, 495, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1431, 496, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1432, 497, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1433, 498, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1434, 499, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1435, 500, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1436, 501, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1437, 502, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1438, 503, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1439, 504, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1440, 505, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1441, 506, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1442, 507, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1443, 508, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1444, 509, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1445, 510, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1446, 511, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1447, 512, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1448, 513, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1449, 514, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1450, 515, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1451, 516, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1452, 517, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1453, 518, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1454, 519, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1455, 520, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1456, 521, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1459, 524, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1460, 525, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1461, 526, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1463, 528, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1464, 529, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1466, 531, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1467, 532, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1468, 533, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1469, 534, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1470, 535, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1471, 536, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1472, 537, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1473, 538, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1474, 539, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1475, 540, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1476, 541, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1477, 542, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1479, 544, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1480, 545, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1481, 546, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1482, 547, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1483, 548, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1484, 549, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1485, 550, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1486, 551, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1487, 552, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1488, 554, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1489, 555, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1490, 556, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1491, 557, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1492, 558, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1493, 559, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1494, 560, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1495, 561, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1496, 562, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1497, 563, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1498, 564, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1499, 565, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1500, 566, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1501, 567, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1502, 568, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1503, 569, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1504, 570, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1505, 571, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1506, 572, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1507, 573, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1508, 574, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1510, 576, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1511, 577, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1512, 578, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1513, 579, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1514, 580, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1516, 582, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1517, 583, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1518, 584, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1519, 585, 0, 1e-05, 0, 9999, 9999, 9999, 0, 0, 1, -360, 360 ],
[1, 490, 0, 0.01433884297520661, 0.151691958358336, 991.0, 991.0, 991.0, 0, 2, 1, -360, 43.375 ],
[3, 4, 0, 0.006291637811634348, 0.903417549506624, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 72.681 ],
[491, 6, 0, 0.011200661157024791, 0.118492839955776, 991.0, 991.0, 991.0, 0, 2, 1, -360, 33.882 ],
[7, 5, 0, 0.005794840720221606, 0.20802058859584005, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 33.471 ],
[8, 9, 0, 0.0024379328254847646, 0.350063268897336, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 28.163 ],
[492, 11, 0, 0.018224793388429753, 0.0482004476327704, 495.0, 495.0, 495.0, 0, 1, 1, -360, 27.565 ],
[11, 493, 0, 0.030286942148760328, 0.08010209706571599, 495.0, 495.0, 495.0, 0, 1, 1, -360, 45.809 ],
[492, 493, 0, 0.04521652892561983, 0.11958747011094399, 495.0, 495.0, 495.0, 0, 1, 1, -360, 68.39 ],
[494, 14, 0, 0.012990743801652892, 0.137430291356512, 991.0, 991.0, 991.0, 0, 2, 1, -360, 39.297 ],
[13, 15, 0, 0.007681959833795014, 0.27576354266704156, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 44.371 ],
[16, 5, 0, 0.006275623268698061, 0.22527950450957998, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 36.248000000000005 ],
[17, 18, 0, 0.04623522622347646, 0.9335989000302801, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 200.291 ],
[17, 12, 0, 0.0056020313942728535, 0.113118303398186, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 24.268 ],
[14, 495, 0, 0.0017957024793388433, 0.018996904156819597, 991.0, 991.0, 991.0, 0, 1, 1, -360, 5.432 ],
[494, 19, 0, 0.010246611570247935, 0.10839986031771602, 991.0, 991.0, 991.0, 0, 1, 1, -360, 30.996 ],
[20, 21, 0, 0.005415685595567867, 0.19440984828307922, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 31.281 ],
[20, 22, 0, 0.0049706544321329645, 0.713737278110032, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 57.42100000000001 ],
[497, 23, 0, 0.002190413223140496, 0.005793146490362, 495.0, 495.0, 495.0, 0, 1, 1, -360, 3.313 ],
[23, 499, 0, 0.020799669421487598, 0.22004164444829602, 991.0, 991.0, 991.0, 0, 1, 1, -360, 62.919 ],
[25, 26, 0, 0.00141845567867036, 0.050919084651523595, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 8.193 ],
[25, 22, 0, 0.0035578254847645433, 0.0319293051869808, 856.0, 856.0, 856.0, 0, 1, 1, -360, 10.275 ],
[23, 27, 0, 0.027738181818181818, 0.073361203699828, 495.0, 495.0, 495.0, 0, 1, 1, -360, 41.95399999999999 ],
[28, 23, 0, 0.012841652892561981, 0.0339632611780132, 495.0, 495.0, 495.0, 0, 1, 1, -360, 19.423 ],
[8, 21, 0, 0.004948753462603878, 0.17764812836304802, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 28.584 ],
[9, 29, 0, 0.002212863573407202, 0.31774552934092004, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 25.563000000000002 ],
[30, 25, 0, 0.019958795013850415, 0.17911796401827998, 856.0, 856.0, 856.0, 0, 1, 1, -360, 57.641000000000005 ],
[31, 32, 0, 0.0299776084949446, 0.605319030583196, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 129.863 ],
[32, 33, 0, 0.016762234533725762, 0.33846927983213604, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 72.61399999999999 ],
[34, 35, 0, 0.001931900826446281, 0.020437759184893597, 991.0, 991.0, 991.0, 0, 2, 1, -360, 5.843999999999999 ],
[35, 36, 0, 0.0008730578512396695, 0.0092361605077588, 991.0, 991.0, 991.0, 0, 2, 1, -360, 2.641 ],
[490, 6, 0, 0.049352066115702475, 0.130525028606764, 495.0, 495.0, 495.0, 0, 1, 1, -360, 74.645 ],
[37, 10, 0, 0.02404639889196676, 0.485553838251812, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 104.169 ],
[10, 38, 0, 0.006848799630657894, 0.13829351176534158, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 29.669 ],
[37, 38, 0, 0.01437834718372576, 1.1613317560186958, 2567.0, 2567.0, 2567.0, 0, 1, 1, -360, 124.574 ],
[39, 40, 0, 0.04521629732222991, 0.913024308337812, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 195.877 ],
[39, 41, 0, 0.017466989843005543, 0.35269996139852006, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 75.667 ],
[42, 41, 0, 0.031145429362880884, 0.6289001042979919, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 134.922 ],
[18, 42, 0, 0.03439750692520776, 0.6945672650962679, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 149.01 ],
[492, 43, 0, 0.01819173553719008, 0.192452068436848, 991.0, 991.0, 991.0, 0, 2, 1, -360, 55.03 ],
[44, 45, 0, 0.02562314049586777, 0.067767398802972, 495.0, 495.0, 495.0, 0, 1, 1, -360, 38.755 ],
[44, 505, 0, 0.006061487603305785, 0.0160312607980052, 495.0, 495.0, 495.0, 0, 1, 1, -360, 9.168 ],
[46, 12, 0, 0.0014741170360110802, 0.2116687641962416, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 17.029 ],
[47, 48, 0, 0.005344182825484765, 0.01199019212302604, 428.0, 428.0, 428.0, 0, 1, 1, -360, 7.7170000000000005 ],
[49, 50, 0, 0.0019151662049861494, 0.0171874439892256, 856.0, 856.0, 856.0, 0, 1, 1, -360, 5.531000000000001 ],
[31, 33, 0, 0.013475992613088641, 0.27211225959163604, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 58.378 ],
[31, 51, 0, 0.003518611495844875, 0.5052381383693519, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 40.647 ],
[52, 53, 0, 0.010464421745152355, 1.5025884408875438, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 120.885 ],
[52, 54, 0, 0.0076126500461911354, 0.1537174637168, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 32.978 ],
[506, 55, 0, 0.012634380165289257, 0.133660287181212, 991.0, 991.0, 991.0, 0, 1, 1, -360, 38.219 ],
[506, 507, 0, 0.044157355371900825, 0.11678619613628, 495.0, 495.0, 495.0, 0, 1, 1, -360, 66.788 ],
[57, 506, 0, 0.004687272727272727, 0.049587095736244, 991.0, 991.0, 991.0, 0, 1, 1, -360, 14.179 ],
[57, 58, 0, 0.014436363636363634, 0.0381809096340232, 495.0, 495.0, 495.0, 0, 1, 1, -360, 21.835 ],
[58, 506, 0, 0.019797685950413223, 0.052360391943288, 495.0, 495.0, 495.0, 0, 1, 1, -360, 29.944000000000003 ],
[59, 60, 0, 0.019407548476454296, 0.174170863885556, 856.0, 856.0, 856.0, 0, 1, 1, -360, 56.049 ],
[508, 62, 0, 0.051111404958677685, 0.03379452026753001, 248.0, 248.0, 248.0, 0, 1, 1, -360, 38.653 ],
[30, 61, 0, 0.03143698060941828, 0.28212765137935203, 856.0, 856.0, 856.0, 0, 1, 1, -360, 90.79 ],
[63, 506, 0, 0.027457190082644623, 0.072618044249872, 495.0, 495.0, 495.0, 0, 1, 1, -360, 41.528999999999996 ],
[13, 64, 0, 0.0014816481994459833, 0.2127501654814608, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 17.116 ],
[65, 66, 0, 0.03778185595567867, 0.7629053006222161, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 163.671 ],
[59, 67, 0, 0.0051880193905817175, 0.046559297286324804, 856.0, 856.0, 856.0, 0, 1, 1, -360, 14.982999999999999 ],
[61, 67, 0, 0.012931440443213295, 0.1160517597580644, 856.0, 856.0, 856.0, 0, 1, 1, -360, 37.346 ],
[68, 69, 0, 0.011149584487534626, 0.4002427745096039, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 64.4 ],
[70, 69, 0, 0.009625346260387812, 0.345526355460808, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 55.596000000000004 ],
[71, 72, 0, 0.008878635734072021, 0.318721276477736, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 51.283 ],
[73, 74, 0, 0.012529547553116345, 0.253001288604392, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 54.278 ],
[37, 75, 0, 0.027459141274238225, 0.5544652029066119, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 118.95299999999999 ],
[72, 75, 0, 0.006688711911357341, 0.240108375006292, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 38.634 ],
[37, 72, 0, 0.036222068328739615, 0.7314094881920841, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 156.914 ],
[76, 77, 0, 0.004683777700831025, 0.6725445900750401, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 54.107 ],
[77, 51, 0, 0.00363183864265928, 0.5214964473447999, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 41.955 ],
[73, 72, 0, 0.025475069252077563, 0.514402082018968, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 110.35799999999999 ],
[18, 40, 0, 0.01302770083102493, 0.26306018504072, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 56.43600000000001 ],
[492, 45, 0, 0.0308703030303719, 0.18370114733484796, 743.0, 743.0, 743.0, 0, 1, 1, -360, 70.03699999999999 ],
[10, 74, 0, 0.030167359187465374, 0.609150547206812, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 130.685 ],
[45, 511, 0, 0.08203371900826446, 0.05424014819960001, 248.0, 248.0, 248.0, 0, 1, 1, -360, 62.038000000000004 ],
[78, 32, 0, 0.013458795013850415, 0.48313777647302397, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 77.738 ],
[79, 80, 0, 0.0038086911357340715, 0.1367226831743568, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 21.999000000000002 ],
[81, 79, 0, 0.010767832409972299, 0.3865388099484561, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 62.195 ],
[34, 82, 0, 0.0015497520661157025, 0.00409874294399768, 495.0, 495.0, 495.0, 0, 1, 1, -360, 2.344 ],
[83, 84, 0, 0.00902611570247934, 0.0238720301499152, 495.0, 495.0, 495.0, 0, 1, 1, -360, 13.652000000000001 ],
[83, 499, 0, 0.04179570247933885, 0.0276350398834796, 248.0, 248.0, 248.0, 0, 1, 1, -360, 31.608 ],
[85, 86, 0, 0.00802354570637119, 0.28802563884886, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 46.343999999999994 ],
[87, 86, 0, 0.01904968836565097, 0.683837154069184, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 110.031 ],
[88, 89, 0, 0.00380297520661157, 0.010058007429140002, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.752000000000001 ],
[90, 86, 0, 0.012097818559556786, 0.434282055192244, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 69.877 ],
[91, 86, 0, 9.26246537396122e-05, 0.013299992817559201, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 1.07 ],
[86, 92, 0, 0.0001852493074792244, 0.0066499964087796005, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.07 ],
[86, 93, 0, 0.008152181440443215, 0.292643346635492, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 47.086999999999996 ],
[94, 86, 0, 0.012883829639889197, 0.46249792780547194, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 74.417 ],
[86, 95, 0, 0.010421052631578947, 0.37409026526870803, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 60.192 ],
[513, 517, 0, 0.0008733884297520661, 0.0023099144321748, 495.0, 495.0, 495.0, 0, 1, 1, -360, 1.321 ],
[97, 66, 0, 0.03812777008310249, 0.34217338998058805, 856.0, 856.0, 856.0, 0, 1, 1, -360, 110.113 ],
[42, 98, 0, 0.003091759002770083, 0.44394630230884, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 35.716 ],
[99, 100, 0, 0.016371537396121884, 0.587698093837988, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 94.56200000000001 ],
[42, 101, 0, 0.008165339335180054, 0.29311568282888, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 47.163000000000004 ],
[102, 42, 0, 0.012403047091412742, 0.44523901189173193, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 71.64 ],
[103, 87, 0, 0.007073060941828254, 0.25390556381756, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 40.854 ],
[104, 103, 0, 0.0028852146814404432, 0.1035721403291428, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.665 ],
[105, 87, 0, 0.006406682825484765, 0.22998422159488002, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 37.005 ],
[106, 107, 0, 0.005714219759923823, 0.11538365264216799, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 24.754 ],
[108, 107, 0, 0.0025427631578947367, 0.09127896939786201, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 14.687000000000001 ],
[109, 106, 0, 0.003030470914127424, 0.10878648330773438, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 17.504 ],
[110, 111, 0, 0.019821849030470913, 0.7115558306889919, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 114.491 ],
[87, 112, 0, 0.006135907202216068, 0.220264039928212, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 35.441 ],
[113, 87, 0, 0.003981648199445983, 0.14293141813921081, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 22.998 ],
[87, 85, 0, 0.011046225761772853, 0.3965324494097, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 63.803000000000004 ],
[110, 114, 0, 0.011665339335180056, 0.418757110306188, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 67.37899999999999 ],
[115, 116, 0, 0.007048925619834712, 0.07457124214588401, 991.0, 991.0, 991.0, 0, 1, 1, -360, 21.323 ],
[117, 118, 0, 0.005987534626038782, 0.21493782785077598, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 34.584 ],
[117, 119, 0, 0.0038738746537396117, 0.5562504472696961, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 44.751000000000005 ],
[117, 120, 0, 0.005886686288088643, 0.8452704781039522, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 68.003 ],
[121, 122, 0, 0.0021170360110803325, 0.0759964075574972, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 12.228 ],
[123, 124, 0, 0.0018386426592797783, 0.0660027680945204, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 10.62 ],
[125, 126, 0, 0.004941135734072022, 0.17737467056702802, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 28.54 ],
[127, 119, 0, 0.0029027008310249305, 0.1041998502705648, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.766 ],
[118, 128, 0, 0.007397160664819945, 0.265539950057812, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 42.726000000000006 ],
[121, 119, 0, 0.002552458448753463, 0.0916270065931116, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 14.743 ],
[530, 527, 0, 0.022726611570247933, 0.060106736329903994, 495.0, 495.0, 495.0, 0, 1, 1, -360, 34.374 ],
[125, 130, 0, 0.002931440443213297, 0.105231531956442, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.932000000000002 ],
[125, 123, 0, 0.0019078081717451524, 0.2739425623421336, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 22.039 ],
[131, 132, 0, 0.0035744459833795014, 0.12831385593973843, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 20.646 ],
[133, 123, 0, 0.003864439058171745, 0.13872389704704202, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 22.320999999999998 ],
[524, 134, 0, 0.008092231404958678, 0.08560847143881999, 991.0, 991.0, 991.0, 0, 1, 1, -360, 24.479 ],
[135, 136, 0, 0.005242901662049862, 0.1882073282678, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 30.283 ],
[123, 131, 0, 0.003138331024930748, 0.1126583971045252, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 18.127 ],
[117, 128, 0, 0.010800034626038782, 0.38769479063117196, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 62.381 ],
[137, 521, 0, 0.013832396694214875, 0.14633421587532003, 991.0, 991.0, 991.0, 0, 2, 1, -360, 41.843 ],
[531, 514, 0, 0.0059504132231404955, 0.035409362037522, 743.0, 743.0, 743.0, 0, 1, 1, -360, 13.5 ],
[139, 521, 0, 0.021257520661157023, 0.05622132386323199, 495.0, 495.0, 495.0, 0, 1, 1, -360, 32.152 ],
[140, 514, 0, 0.018527603305785127, 0.04900131122836401, 495.0, 495.0, 495.0, 0, 1, 1, -360, 28.023000000000003 ],
[522, 141, 0, 0.012168595041322314, 0.032183175718526795, 495.0, 495.0, 495.0, 0, 1, 1, -360, 18.405 ],
[142, 523, 0, 0.007060165289256198, 0.0746901476577608, 991.0, 991.0, 991.0, 0, 2, 1, -360, 21.357 ],
[530, 526, 0, 0.020281652892561983, 0.053640374808152, 495.0, 495.0, 495.0, 0, 1, 1, -360, 30.676 ],
[140, 532, 0, 0.004669090909090909, 0.0123486871461184, 495.0, 495.0, 495.0, 0, 1, 1, -360, 7.062 ],
[142, 144, 0, 0.006678126721756199, 0.0397397958689204, 743.0, 743.0, 743.0, 0, 1, 1, -360, 15.151 ],
[140, 522, 0, 0.020450247933884298, 0.05408627047793199, 495.0, 495.0, 495.0, 0, 1, 1, -360, 30.930999999999997 ],
[145, 146, 0, 0.028527603305785125, 0.07544904460236, 495.0, 495.0, 495.0, 0, 1, 1, -360, 43.148 ],
[147, 523, 0, 0.02461289256198347, 0.0650955220034416, 495.0, 495.0, 495.0, 0, 2, 1, -360, 37.227 ],
[144, 523, 0, 0.008479338842975206, 0.0224259292904064, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.825 ],
[139, 523, 0, 0.029245619834710742, 0.0193370088934308, 248.0, 248.0, 248.0, 0, 1, 1, -360, 22.116999999999997 ],
[140, 141, 0, 0.008362975206611572, 0.022118173847506, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.649000000000001 ],
[528, 526, 0, 0.015389090909090908, 0.0407006573227188, 495.0, 495.0, 495.0, 0, 1, 1, -360, 23.276 ],
[528, 148, 0, 0.014306115702479338, 0.0378364333712244, 495.0, 495.0, 495.0, 0, 1, 1, -360, 21.638 ],
[149, 150, 0, 0.013604628099173552, 0.035981157661543604, 495.0, 495.0, 495.0, 0, 1, 1, -360, 20.576999999999998 ],
[145, 528, 0, 0.00320595041322314, 0.0084790121737992, 495.0, 495.0, 495.0, 0, 1, 1, -360, 4.849 ],
[530, 151, 0, 0.013144462809917355, 0.0347641247737036, 495.0, 495.0, 495.0, 0, 1, 1, -360, 19.881 ],
[524, 152, 0, 0.014598347107438016, 0.03860931919944, 495.0, 495.0, 495.0, 0, 1, 1, -360, 22.08 ],
[149, 525, 0, 0.016897190082644627, 0.17875695122823998, 991.0, 991.0, 991.0, 0, 2, 1, -360, 51.114 ],
[139, 514, 0, 0.007824132231404959, 0.020693056313687997, 495.0, 495.0, 495.0, 0, 1, 1, -360, 11.834000000000001 ],
[126, 120, 0, 0.012780297783933518, 0.458781387757004, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 73.819 ],
[530, 153, 0, 0.02254545454545455, 0.059627617060924, 495.0, 495.0, 495.0, 0, 1, 1, -360, 34.1 ],
[528, 147, 0, 0.15786710743801652, 0.104380679149868, 248.0, 248.0, 248.0, 0, 1, 1, -360, 119.387 ],
[528, 154, 0, 0.006528264462809917, 0.017265779790547203, 495.0, 495.0, 495.0, 0, 2, 1, -360, 9.874 ],
[130, 120, 0, 0.01450502077562327, 0.5206947188067639, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 83.781 ],
[528, 155, 0, 0.16064132231404957, 0.1062149715341, 248.0, 248.0, 248.0, 0, 1, 1, -360, 121.485 ],
[524, 533, 0, 0.004432727272727273, 0.0468942356109744, 991.0, 991.0, 991.0, 0, 1, 1, -360, 13.409 ],
[524, 149, 0, 0.0056413223140495865, 0.05968007537478799, 991.0, 991.0, 991.0, 0, 2, 1, -360, 17.065 ],
[154, 150, 0, 0.007539173553719007, 0.0199394052006688, 495.0, 495.0, 495.0, 0, 2, 1, -360, 11.402999999999999 ],
[157, 110, 0, 0.009962084487534625, 0.357614433044424, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 57.541000000000004 ],
[119, 158, 0, 0.0002490189289012004, 0.08045252664623159, 5134.0, 5134.0, 5134.0, 0, 3, 1, -360, 4.315 ],
[159, 60, 0, 0.010967451523545706, 0.0984261617997728, 856.0, 856.0, 856.0, 0, 1, 1, -360, 31.674 ],
[536, 161, 0, 0.021314380165289255, 0.056371704363524, 495.0, 495.0, 495.0, 0, 1, 1, -360, 32.238 ],
[115, 151, 0, 0.00379404958677686, 0.0401376047510724, 991.0, 991.0, 991.0, 0, 1, 1, -360, 11.477 ],
[162, 134, 0, 0.0015910743801652895, 0.016832124393744, 991.0, 991.0, 991.0, 0, 2, 1, -360, 4.813 ],
[115, 526, 0, 0.0037884297520661154, 0.010019537998747198, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.73 ],
[138, 87, 0, 0.0011838642659279777, 0.16999131006813442, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 13.675999999999998 ],
[123, 163, 0, 0.0022778739612188364, 0.08177009602828919, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.157 ],
[112, 164, 0, 0.0008672957063711912, 0.12453516639176802, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 10.019 ],
[112, 165, 0, 0.005989439058171744, 0.21500619230086396, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 34.595 ],
[166, 165, 0, 0.002632790858725762, 0.09451074335350361, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 15.207 ],
[167, 537, 0, 0.00832595041322314, 0.08808100664460242, 991.0, 991.0, 991.0, 0, 2, 1, -360, 25.186 ],
[168, 104, 0, 0.002552458448753463, 0.0916270065931116, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 14.743 ],
[531, 520, 0, 0.016156694214876033, 0.042730794079516396, 495.0, 495.0, 495.0, 0, 1, 1, -360, 24.436999999999998 ],
[139, 520, 0, 0.010682314049586776, 0.0282522993797748, 495.0, 495.0, 495.0, 0, 1, 1, -360, 16.157 ],
[520, 169, 0, 0.0011328925619834712, 0.0119849761681232, 991.0, 991.0, 991.0, 0, 2, 1, -360, 3.427 ],
[168, 105, 0, 0.007340893351800554, 0.26352009133553606, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 42.401 ],
[520, 170, 0, 0.005842644628099174, 0.015452470732151198, 495.0, 495.0, 495.0, 0, 2, 1, -360, 8.837 ],
[171, 89, 0, 0.005505454545454546, 0.058242717567848004, 991.0, 991.0, 991.0, 0, 1, 1, -360, 16.654 ],
[521, 172, 0, 0.006304793388429752, 0.06669899780522001, 991.0, 991.0, 991.0, 0, 1, 1, -360, 19.072 ],
[123, 173, 0, 0.005247403047091413, 0.18836891696656402, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 30.309 ],
[521, 174, 0, 0.013300495867768597, 0.035176796844864404, 495.0, 495.0, 495.0, 0, 1, 1, -360, 20.117 ],
[37, 39, 0, 0.004338873499549862, 0.35044859579205606, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 37.592 ],
[530, 175, 0, 0.013128595041322313, 0.0347221581224188, 495.0, 495.0, 495.0, 0, 1, 1, -360, 19.857 ],
[530, 176, 0, 0.005685289256198347, 0.01503630144005, 495.0, 495.0, 495.0, 0, 1, 1, -360, 8.599 ],
[88, 530, 0, 0.006015867768595041, 0.0159106066755372, 495.0, 495.0, 495.0, 0, 1, 1, -360, 9.099 ],
[177, 496, 0, 0.018632066115702478, 0.19711036673178398, 991.0, 991.0, 991.0, 0, 2, 1, -360, 56.361999999999995 ],
[178, 525, 0, 0.03106842975206612, 0.08216895464241199, 495.0, 495.0, 495.0, 0, 1, 1, -360, 46.99100000000001 ],
[179, 493, 0, 0.057079669421487594, 0.15096278779194802, 495.0, 495.0, 495.0, 0, 1, 1, -360, 86.333 ],
[180, 181, 0, 0.041027438016528923, 0.10850827416682, 495.0, 495.0, 495.0, 0, 1, 1, -360, 62.053999999999995 ],
[182, 180, 0, 0.00866314049586777, 0.09164817200545601, 991.0, 991.0, 991.0, 0, 2, 1, -360, 26.206 ],
[179, 181, 0, 0.01957223140495868, 0.051764115772731996, 495.0, 495.0, 495.0, 0, 1, 1, -360, 29.603 ],
[180, 493, 0, 0.06676561983471074, 0.17657993119175203, 495.0, 495.0, 495.0, 0, 1, 1, -360, 100.98299999999999 ],
[183, 30, 0, 0.0024804362880886427, 0.356166349712776, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 28.654 ],
[183, 21, 0, 0.0025647506925207757, 0.36827307214930394, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 29.628 ],
[538, 185, 0, 0.018631404958677687, 0.0123189607681008, 248.0, 248.0, 248.0, 0, 1, 1, -360, 14.09 ],
[538, 89, 0, 0.014509752066115702, 0.038375005396288, 495.0, 495.0, 495.0, 0, 1, 1, -360, 21.945999999999998 ],
[184, 186, 0, 0.0016554709141274237, 0.059427351084826, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 9.562000000000001 ],
[184, 187, 0, 0.002698753462603878, 0.09687863927102919, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 15.588 ],
[520, 172, 0, 0.0034188429752066113, 0.0361682589818792, 991.0, 991.0, 991.0, 0, 2, 1, -360, 10.342 ],
[89, 175, 0, 0.0037309090909090903, 0.0098674088877672, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.643 ],
[185, 89, 0, 0.005812892561983471, 0.0153737832609196, 495.0, 495.0, 495.0, 0, 1, 1, -360, 8.792 ],
[89, 188, 0, 0.003108760330578513, 0.008221966434607202, 495.0, 495.0, 495.0, 0, 1, 1, -360, 4.702 ],
[189, 190, 0, 0.008599492151454294, 0.17364414688031998, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 37.253 ],
[539, 172, 0, 0.0021570247933884296, 0.022819366646419197, 991.0, 991.0, 991.0, 0, 2, 1, -360, 6.525 ],
[504, 192, 0, 0.0003084297520661157, 0.00326290713886456, 991.0, 991.0, 991.0, 0, 2, 1, -360, 0.9329999999999999 ],
[105, 186, 0, 0.003273372576177285, 0.1175060580379876, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 18.907 ],
[105, 187, 0, 0.0021712257617728533, 0.0779416868808324, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 12.540999999999999 ],
[539, 193, 0, 0.005608595041322314, 0.01483346262541, 495.0, 495.0, 495.0, 0, 1, 1, -360, 8.482999999999999 ],
[187, 194, 0, 4.8649584487534626e-05, 0.0069856037041576, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 0.562 ],
[539, 540, 0, 0.004394710743801653, 0.0116230138006708, 495.0, 495.0, 495.0, 0, 1, 1, -360, 6.647 ],
[539, 196, 0, 0.00332297520661157, 0.008788516227194, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.026 ],
[197, 540, 0, 0.004737190082644629, 0.012528794024621601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 7.165 ],
[110, 198, 0, 0.00018724030470914128, 0.02688587333118328, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 2.1630000000000003 ],
[197, 539, 0, 0.009172231404958677, 0.024258473063998802, 495.0, 495.0, 495.0, 0, 1, 1, -360, 13.873 ],
[199, 537, 0, 0.03612826446280991, 0.0238877676441712, 248.0, 248.0, 248.0, 0, 1, 1, -360, 27.322 ],
[134, 526, 0, 0.007771239669421488, 0.020553167475975197, 495.0, 495.0, 495.0, 0, 1, 1, -360, 11.754000000000001 ],
[200, 193, 0, 0.0009322314049586776, 0.009862163056380801, 991.0, 991.0, 991.0, 0, 2, 1, -360, 2.82 ],
[4, 201, 0, 0.013726108033240996, 0.49273365914097605, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 79.282 ],
[202, 86, 0, 0.00013365650969529087, 0.00479794133417816, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.772 ],
[85, 203, 0, 0.0019011426592797783, 0.2729854600553416, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 21.962 ],
[147, 204, 0, 0.0073874380165289254, 0.0781523963903056, 991.0, 991.0, 991.0, 0, 2, 1, -360, 22.346999999999998 ],
[147, 205, 0, 0.005959669421487603, 0.00394049369636956, 248.0, 248.0, 248.0, 0, 1, 1, -360, 4.507 ],
[123, 206, 0, 0.0005753116343490305, 0.0826091142668064, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 6.646 ],
[537, 207, 0, 0.018456198347107437, 0.048812461297776, 495.0, 495.0, 495.0, 0, 1, 1, -360, 27.915 ],
[165, 208, 0, 0.00414612188365651, 0.14883562055771601, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 23.948 ],
[4, 94, 0, 0.013687673130193905, 0.49135394025941603, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 79.06 ],
[4, 2, 0, 5.2054478301015697e-05, 0.016817654469309, 5134.0, 5134.0, 5134.0, 0, 3, 1, -360, 0.902 ],
[209, 4, 0, 0.0022369286703601107, 0.32120104149338397, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 25.840999999999998 ],
[119, 163, 0, 0.003535145429362881, 0.12690306230914922, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 20.419 ],
[210, 3, 0, 0.0003150969529085873, 0.011311208844832242, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.82 ],
[99, 211, 0, 0.0035045013850415513, 0.1258030161741948, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 20.242 ],
[99, 69, 0, 0.021717970914127423, 0.7796219621557, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 125.443 ],
[212, 99, 0, 0.008453774238227147, 0.30346978938770003, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 48.82899999999999 ],
[213, 214, 0, 0.01490115702479339, 0.15764073118032798, 991.0, 991.0, 991.0, 0, 2, 1, -360, 45.076 ],
[510, 215, 0, 0.002174710743801653, 0.09202587186721281, 1981.0, 1981.0, 1981.0, 0, 4, 1, -360, 13.157 ],
[128, 69, 0, 0.010711651662049862, 1.538088234801848, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 123.741 ],
[216, 69, 0, 0.009628462603878117, 1.3825528982351443, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 111.228 ],
[217, 98, 0, 0.0012787396121883656, 0.045903620070299994, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 7.386 ],
[504, 218, 0, 0.027480991735537193, 0.072680994226412, 495.0, 495.0, 495.0, 0, 1, 1, -360, 41.565 ],
[177, 504, 0, 0.07054809917355372, 0.18658373169634002, 495.0, 495.0, 495.0, 0, 1, 1, -360, 106.704 ],
[219, 209, 0, 0.003938798476454294, 0.5655728721401839, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 45.501000000000005 ],
[219, 220, 0, 0.0013026315789473684, 0.1870451326342096, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 15.048 ],
[94, 95, 0, 0.01070740997229917, 0.38436979242743197, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 61.846000000000004 ],
[159, 221, 0, 0.009937153739612188, 0.356719480257712, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 57.397 ],
[34, 161, 0, 0.010965289256198347, 0.116002818645824, 991.0, 991.0, 991.0, 0, 2, 1, -360, 33.17 ],
[222, 221, 0, 0.0046457756232686975, 0.16677196601221997, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 26.834 ],
[211, 52, 0, 0.05267313019390582, 0.472709090515552, 856.0, 856.0, 856.0, 0, 1, 1, -360, 152.12 ],
[215, 223, 0, 0.04873190082644628, 0.128884831985184, 495.0, 495.0, 495.0, 0, 1, 1, -360, 73.707 ],
[224, 215, 0, 0.019086280991735535, 0.050478887076288004, 495.0, 495.0, 495.0, 0, 1, 1, -360, 28.868000000000002 ],
[225, 224, 0, 0.04200925619834711, 0.11110496071615601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 63.538999999999994 ],
[224, 223, 0, 0.031061818181818183, 0.082151468537468, 495.0, 495.0, 495.0, 0, 1, 1, -360, 46.981 ],
[226, 6, 0, 0.06420099173553719, 0.0424492677936932, 248.0, 248.0, 248.0, 0, 1, 1, -360, 48.552 ],
[7, 3, 0, 0.009332929362880887, 0.335029305054692, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 53.907 ],
[216, 227, 0, 0.01989941135734072, 0.7143401282507, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 114.939 ],
[228, 229, 0, 0.010545454545454545, 0.027890337012274, 495.0, 495.0, 495.0, 0, 1, 1, -360, 15.95 ],
[227, 230, 0, 0.003993074792243767, 0.573366419334696, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 46.128 ],
[231, 53, 0, 0.007193213296398893, 1.0328749562310842, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 83.096 ],
[544, 545, 0, 0.013061818181818181, 0.034545548464856, 495.0, 495.0, 495.0, 0, 1, 1, -360, 19.756 ],
[234, 235, 0, 0.04608859504132231, 0.121893887321888, 495.0, 495.0, 495.0, 0, 1, 1, -360, 69.709 ],
[546, 214, 0, 0.057025454545454546, 0.15081940173295602, 495.0, 495.0, 495.0, 0, 1, 1, -360, 86.251 ],
[233, 227, 0, 0.0029001038781163438, 0.1041066260218888, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.750999999999998 ],
[237, 238, 0, 0.026324628099173554, 0.06962267451304, 495.0, 495.0, 495.0, 0, 1, 1, -360, 39.816 ],
[212, 100, 0, 0.007955505540166205, 0.285583163531816, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 45.951 ],
[519, 239, 0, 0.01740429752066116, 0.046030422038308406, 495.0, 495.0, 495.0, 0, 1, 1, -360, 26.324 ],
[238, 519, 0, 0.015166280991735538, 0.040111375593995205, 495.0, 495.0, 495.0, 0, 1, 1, -360, 22.939 ],
[213, 240, 0, 0.01665388429752066, 0.04404574915373599, 1200.0, 1200.0, 1200.0, 0, 1, 1, -360, 25.189 ],
[241, 242, 0, 0.009862015235457064, 0.3540221919932281, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 56.963 ],
[70, 241, 0, 0.003819858033240997, 0.5484941897752321, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 44.126999999999995 ],
[509, 213, 0, 0.011363636363636364, 0.120216969880216, 991.0, 991.0, 991.0, 0, 2, 1, -360, 34.375 ],
[68, 243, 0, 0.003611668975069252, 0.1296500701715312, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 20.861 ],
[243, 244, 0, 0.0007699099722991691, 0.027637882270859202, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 4.447 ],
[68, 244, 0, 0.004104051246537396, 0.147325387728876, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 23.705 ],
[544, 547, 0, 0.02418776859504132, 0.255884661882476, 991.0, 991.0, 991.0, 0, 1, 1, -360, 73.168 ],
[245, 227, 0, 0.012676419667590028, 0.45505241780707606, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 73.219 ],
[246, 208, 0, 0.0010155817174515235, 0.0364568961999408, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 5.8660000000000005 ],
[112, 208, 0, 0.0017927631578947367, 0.0643558063672372, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 10.355 ],
[165, 247, 0, 0.0002113919667590028, 0.0075884538459086, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.2209999999999999 ],
[537, 549, 0, 0.00032066115702479337, 0.00084807607842936, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.485 ],
[537, 550, 0, 0.00032198347107438016, 0.0008515732993697601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.48700000000000004 ],
[537, 551, 0, 0.0002651239669421488, 0.0007011927988648, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.401 ],
[110, 251, 0, 0.00023857340720221602, 0.008564200982522441, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.3780000000000001 ],
[510, 252, 0, 0.08467702479338843, 0.055987884365424005, 248.0, 248.0, 248.0, 0, 1, 1, -360, 64.03699999999999 ],
[529, 253, 0, 0.04859504132231405, 0.12852286961777998, 495.0, 495.0, 495.0, 0, 1, 1, -360, 73.5 ],
[237, 239, 0, 0.03309421487603306, 0.08752669712542799, 495.0, 495.0, 495.0, 0, 1, 1, -360, 50.055 ],
[254, 238, 0, 0.07815008264462811, 0.05167231372274401, 248.0, 248.0, 248.0, 0, 1, 1, -360, 59.101000000000006 ],
[69, 255, 0, 0.0009369806094182826, 0.134541235754472, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 10.824000000000002 ],
[510, 225, 0, 0.021953719008264466, 0.232250442756508, 991.0, 991.0, 991.0, 0, 1, 1, -360, 66.41 ],
[256, 257, 0, 0.010125619834710746, 0.0267799693631888, 495.0, 495.0, 495.0, 0, 1, 1, -360, 15.315 ],
[258, 190, 0, 0.011717451523545707, 0.10515695255750121, 856.0, 856.0, 856.0, 0, 1, 1, -360, 33.84 ],
[258, 259, 0, 0.015782548476454293, 0.1416387085570408, 856.0, 856.0, 856.0, 0, 1, 1, -360, 45.58 ],
[260, 261, 0, 0.006791031855955679, 0.9751256416231477, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 78.45 ],
[554, 553, 0, 0.17583338842975205, 0.11625986438453201, 248.0, 248.0, 248.0, 0, 1, 1, -360, 132.974 ],
[515, 263, 0, 0.006987107438016529, 0.0739172618295936, 991.0, 991.0, 991.0, 0, 2, 1, -360, 21.136 ],
[14, 264, 0, 0.01700694214876033, 0.17991802858084, 991.0, 991.0, 991.0, 0, 1, 1, -360, 51.446000000000005 ],
[116, 555, 0, 0.0009768595041322315, 0.0103342878835768, 991.0, 991.0, 991.0, 0, 2, 1, -360, 2.955 ],
[151, 116, 0, 0.007244958677685951, 0.0191612735410668, 495.0, 495.0, 495.0, 0, 1, 1, -360, 10.958 ],
[111, 114, 0, 0.008806613573407202, 0.3161358573133961, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 50.867 ],
[77, 111, 0, 0.00288452216066482, 0.41418912211817605, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 33.321999999999996 ],
[266, 525, 0, 0.01042909090909091, 0.027582581569373602, 495.0, 495.0, 495.0, 0, 1, 1, -360, 15.774000000000001 ],
[267, 120, 0, 0.013136945983379503, 0.471584184581432, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 75.87899999999999 ],
[268, 269, 0, 0.0010327272727272726, 0.0027313295556817604, 495.0, 495.0, 495.0, 0, 1, 1, -360, 1.5619999999999998 ],
[556, 271, 0, 0.052289586776859506, 0.0345735262323792, 248.0, 248.0, 248.0, 0, 1, 1, -360, 39.544000000000004 ],
[556, 272, 0, 0.04685355371900827, 0.030979257409249603, 248.0, 248.0, 248.0, 0, 1, 1, -360, 35.433 ],
[529, 273, 0, 0.0034604958677685953, 0.009152227205140799, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.234 ],
[128, 274, 0, 0.0029350761772853184, 0.1053620459045884, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.953 ],
[34, 275, 0, 0.0008290909090909092, 0.00054818938265696, 248.0, 248.0, 248.0, 0, 1, 1, -360, 0.627 ],
[503, 276, 0, 0.006707438016528925, 0.07095861291266, 991.0, 991.0, 991.0, 0, 2, 1, -360, 20.29 ],
[503, 504, 0, 0.06432727272727272, 0.680524223098808, 991.0, 991.0, 991.0, 0, 2, 1, -360, 194.59 ],
[177, 218, 0, 0.04330380165289256, 0.114528740018308, 495.0, 495.0, 495.0, 0, 1, 1, -360, 65.497 ],
[277, 278, 0, 0.007191135734072023, 1.032576638635032, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 83.072 ],
[557, 558, 0, 0.04341289256198347, 0.258338836678648, 743.0, 743.0, 743.0, 0, 1, 1, -360, 98.493 ],
[557, 559, 0, 0.03415867768595042, 0.09034195998366001, 495.0, 495.0, 495.0, 0, 1, 1, -360, 51.665 ],
[559, 558, 0, 0.04474314049586777, 0.11833546501370001, 495.0, 495.0, 495.0, 0, 1, 1, -360, 67.67399999999999 ],
[277, 78, 0, 0.03585768698060942, 0.32180078416049196, 856.0, 856.0, 856.0, 0, 1, 1, -360, 103.557 ],
[277, 279, 0, 0.021390927977839334, 0.191970480441328, 856.0, 856.0, 856.0, 0, 1, 1, -360, 61.777 ],
[78, 279, 0, 0.015811980609418283, 0.1419028439283376, 856.0, 856.0, 856.0, 0, 1, 1, -360, 45.665 ],
[281, 282, 0, 0.0023178670360110803, 0.08320574945862161, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.388 ],
[283, 161, 0, 0.036741157024793386, 0.09717203248350399, 495.0, 495.0, 495.0, 0, 2, 1, -360, 55.571000000000005 ],
[268, 161, 0, 0.018883636363636366, 0.199771751868832, 991.0, 991.0, 991.0, 0, 2, 1, -360, 57.123000000000005 ],
[256, 284, 0, 0.010755371900826446, 0.113782083346976, 991.0, 991.0, 991.0, 0, 2, 1, -360, 32.535 ],
[515, 516, 0, 0.04071140495867769, 0.107672438361532, 495.0, 495.0, 495.0, 0, 1, 1, -360, 61.576 ],
[263, 516, 0, 0.0030355371900826445, 0.128452925198488, 1981.0, 1981.0, 1981.0, 0, 2, 1, -360, 18.365 ],
[516, 285, 0, 0.006908429752066116, 0.018271230811372, 495.0, 495.0, 495.0, 0, 1, 1, -360, 10.449000000000002 ],
[63, 286, 0, 0.019088925619834708, 0.050485881518556, 495.0, 495.0, 495.0, 0, 1, 1, -360, 28.872 ],
[287, 516, 0, 0.01732892561983471, 0.011457770111127998, 248.0, 248.0, 248.0, 0, 1, 1, -360, 13.105 ],
[8, 102, 0, 0.015100069252077563, 0.542055501663692, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 87.21799999999999 ],
[8, 101, 0, 0.019246883656509697, 0.69091598202144, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 111.17 ],
[80, 288, 0, 0.007984072022160666, 0.2866086302684072, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 46.11600000000001 ],
[80, 289, 0, 0.0003782317636201524, 0.122198345223416, 5134.0, 5134.0, 5134.0, 0, 4, 1, -360, 6.553999999999999 ],
[276, 560, 0, 0.01778314049586777, 0.047032375838192794, 495.0, 495.0, 495.0, 0, 2, 1, -360, 26.897 ],
[37, 290, 0, 0.005629501385041551, 0.4546919507138321, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 48.773999999999994 ],
[290, 74, 0, 0.02071595106187673, 1.673216783321968, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 179.483 ],
[512, 291, 0, 0.0053299173553719, 0.056385693247479204, 991.0, 991.0, 991.0, 0, 2, 1, -360, 16.123 ],
[78, 292, 0, 0.0058149815327908595, 0.469673087481408, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 50.381 ],
[199, 548, 0, 0.0015530578512396695, 0.00410748599634868, 495.0, 495.0, 495.0, 0, 1, 1, -360, 2.349 ],
[491, 293, 0, 0.014176528925619833, 0.009373426429729999, 248.0, 248.0, 248.0, 0, 1, 1, -360, 10.720999999999998 ],
[4, 294, 0, 9.669321329639889e-05, 0.013884198109531681, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 1.117 ],
[490, 541, 0, 0.050580495867768596, 0.133773946861896, 495.0, 495.0, 495.0, 0, 1, 1, -360, 76.503 ],
[491, 295, 0, 0.010613553719008264, 0.028070443890777202, 495.0, 495.0, 495.0, 0, 1, 1, -360, 16.053 ],
[491, 296, 0, 0.004400661157024794, 0.0116387512948784, 495.0, 495.0, 495.0, 0, 1, 1, -360, 6.656000000000001 ],
[295, 297, 0, 0.020297520661157024, 0.053682341459340005, 495.0, 495.0, 495.0, 0, 1, 1, -360, 30.7 ],
[508, 161, 0, 0.023239669421487603, 0.061463658055360006, 495.0, 495.0, 495.0, 0, 1, 1, -360, 35.15 ],
[117, 123, 0, 0.005876211911357341, 0.21094161505628, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 33.941 ],
[133, 117, 0, 0.004469182825484764, 0.0401081792747688, 856.0, 856.0, 856.0, 0, 1, 1, -360, 12.907 ],
[71, 74, 0, 0.03904524469065097, 0.7884161162841721, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 169.144 ],
[74, 278, 0, 0.0077122576177285325, 1.10740463560792, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 89.09200000000001 ],
[298, 515, 0, 0.021701157024793388, 0.05739464148919599, 495.0, 495.0, 495.0, 0, 1, 1, -360, 32.823 ],
[5, 299, 0, 0.0016232686980609415, 0.058271370400665996, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 9.376 ],
[32, 292, 0, 0.009679362880886427, 0.34746541983297996, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 55.908 ],
[5, 29, 0, 0.00743395083102493, 1.0674425076571843, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 85.87700000000001 ],
[503, 560, 0, 0.015140495867768593, 0.160172719142436, 991.0, 991.0, 991.0, 0, 1, 1, -360, 45.8 ],
[300, 301, 0, 0.004892053324099723, 0.7024509290644521, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 56.513000000000005 ],
[51, 300, 0, 0.002573493767313019, 0.3695284920307039, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 29.729 ],
[244, 302, 0, 0.007714508310249307, 1.107727813004004, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 89.118 ],
[31, 302, 0, 0.004369113573407203, 0.6273619041941161, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 50.472 ],
[51, 282, 0, 0.006288434903047093, 0.9029576432132521, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 72.64399999999999 ],
[303, 304, 0, 8.795013850415512e-05, 0.000789298639172312, 856.0, 856.0, 856.0, 0, 1, 1, -360, 0.254 ],
[305, 304, 0, 0.003881117266849031, 0.0783689646873844, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 16.813 ],
[305, 259, 0, 0.0025625, 0.36794989475177603, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 29.601999999999997 ],
[306, 307, 0, 0.03223268698060942, 0.289268628831688, 856.0, 856.0, 856.0, 0, 1, 1, -360, 93.088 ],
[305, 308, 0, 0.0024272853185595567, 0.0217833994511184, 856.0, 856.0, 856.0, 0, 1, 1, -360, 7.01 ],
[305, 309, 0, 0.011014773776523545, 0.22241441259921202, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 47.716 ],
[310, 309, 0, 0.009565962603878117, 0.343394627639832, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 55.253 ],
[306, 309, 0, 0.035333795013850415, 0.31709917455019604, 856.0, 856.0, 856.0, 0, 1, 1, -360, 102.044 ],
[311, 280, 0, 0.003433691135734072, 0.1232611016590444, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 19.833 ],
[280, 278, 0, 0.009749769159764544, 0.7874838737974121, 2567.0, 2567.0, 2567.0, 0, 1, 1, -360, 84.47200000000001 ],
[311, 32, 0, 0.01205909510619806, 0.9740069506375919, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 104.48 ],
[13, 312, 0, 0.0043324965373961214, 0.622104056565324, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 50.049 ],
[313, 314, 0, 0.006092624653739613, 0.218710302449316, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 35.191 ],
[312, 313, 0, 0.00893957756232687, 0.32090893884734, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 51.635 ],
[547, 566, 0, 0.027035702479338848, 0.286013220297816, 991.0, 991.0, 991.0, 0, 1, 1, -360, 81.783 ],
[245, 315, 0, 0.014162569252077564, 0.508401547875772, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 81.803 ],
[312, 316, 0, 8.803670360110802e-05, 0.01264120812658816, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 1.0170000000000001 ],
[312, 314, 0, 0.005339854570637119, 0.191687700220296, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 30.843000000000004 ],
[554, 546, 0, 0.08174743801652892, 0.21620344446439202, 495.0, 495.0, 495.0, 0, 1, 1, -360, 123.64299999999999 ],
[262, 216, 0, 0.042641966759002774, 0.38268554099981195, 856.0, 856.0, 856.0, 0, 1, 1, -360, 123.15 ],
[317, 233, 0, 0.005647276084951523, 0.114031901035644, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 24.464000000000002 ],
[318, 317, 0, 0.008311634349030471, 0.16783161497270002, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 36.006 ],
[231, 52, 0, 0.035263677285318554, 1.2658796434850879, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 203.683 ],
[319, 567, 0, 0.006089586776859504, 0.0644223069721, 991.0, 991.0, 991.0, 0, 1, 1, -360, 18.421 ],
[557, 321, 0, 0.010004628099173555, 0.10583989458750401, 991.0, 991.0, 991.0, 0, 2, 1, -360, 30.264 ],
[277, 65, 0, 0.009430170821779778, 0.7616700793261759, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 81.703 ],
[322, 288, 0, 0.006545013850415513, 0.528637424797136, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 56.706 ],
[322, 323, 0, 0.0018503000923372577, 0.14944779312484, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 16.031 ],
[277, 324, 0, 0.019719529085872576, 0.39818407235049996, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 85.425 ],
[324, 325, 0, 0.01103508771932133, 0.22282459929396403, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 47.803999999999995 ],
[277, 325, 0, 0.008665743305609418, 0.174981914850048, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 37.54 ],
[326, 327, 0, 0.007654214876033058, 0.0202436634226288, 495.0, 495.0, 495.0, 0, 1, 1, -360, 11.577 ],
[328, 326, 0, 0.10300958677685952, 0.068109252150368, 248.0, 248.0, 248.0, 0, 1, 1, -360, 77.90100000000001 ],
[328, 327, 0, 0.09827173553719008, 0.064976616491468, 248.0, 248.0, 248.0, 0, 1, 1, -360, 74.318 ],
[326, 329, 0, 0.028062148760330575, 0.07421802283046801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 42.443999999999996 ],
[568, 329, 0, 0.05699900826446282, 0.15074945731414802, 495.0, 495.0, 495.0, 0, 1, 1, -360, 86.211 ],
[568, 326, 0, 0.03218644628099173, 0.08512585494846397, 495.0, 495.0, 495.0, 0, 1, 1, -360, 48.681999999999995 ],
[332, 78, 0, 0.006471029547541551, 0.522661750455416, 2567.0, 2567.0, 2567.0, 0, 2, 1, -360, 56.065 ],
[333, 306, 0, 0.008580159279778392, 0.308006702824228, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 49.559 ],
[332, 333, 0, 0.007504674515235457, 0.26939943395502003, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 43.347 ],
[332, 334, 0, 0.017124653739612188, 0.15368328149175597, 856.0, 856.0, 856.0, 0, 1, 1, -360, 49.456 ],
[66, 334, 0, 0.030625, 0.27484062260471603, 856.0, 856.0, 856.0, 0, 1, 1, -360, 88.445 ],
[330, 335, 0, 0.00550536703601108, 0.790516769355108, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 63.598 ],
[336, 66, 0, 0.015054362880886425, 0.1351036887216764, 856.0, 856.0, 856.0, 0, 1, 1, -360, 43.477 ],
[330, 336, 0, 0.039036357340720224, 0.350327404269788, 856.0, 856.0, 856.0, 0, 1, 1, -360, 112.73700000000001 ],
[68, 70, 0, 0.016314058171745152, 0.14640868261713597, 856.0, 856.0, 856.0, 0, 1, 1, -360, 47.115 ],
[509, 337, 0, 0.03494082644628099, 0.09241056617056001, 495.0, 495.0, 495.0, 0, 1, 1, -360, 52.848 ],
[324, 288, 0, 0.012627423822714683, 0.11332339674541761, 856.0, 856.0, 856.0, 0, 1, 1, -360, 36.468 ],
[338, 559, 0, 0.009228099173553718, 0.097624922595552, 991.0, 991.0, 991.0, 0, 2, 1, -360, 27.915 ],
[339, 559, 0, 0.03560595041322315, 0.023542417076125203, 248.0, 248.0, 248.0, 0, 1, 1, -360, 26.927 ],
[339, 340, 0, 0.08711537190082644, 0.23040041287850396, 495.0, 495.0, 495.0, 0, 1, 1, -360, 131.762 ],
[559, 340, 0, 0.20983272727272728, 0.138740000599684, 248.0, 248.0, 248.0, 0, 1, 1, -360, 158.686 ],
[341, 292, 0, 0.0009329409048961218, 0.07535316024134399, 2567.0, 2567.0, 2567.0, 0, 1, 1, -360, 8.083 ],
[557, 342, 0, 0.006019834710743802, 0.0636843933534336, 991.0, 991.0, 991.0, 0, 2, 1, -360, 18.21 ],
[558, 343, 0, 0.010650247933884296, 0.11266996708783199, 991.0, 991.0, 991.0, 0, 1, 1, -360, 32.217 ],
[502, 340, 0, 0.021737520661157025, 0.22996326026071198, 991.0, 991.0, 991.0, 0, 2, 1, -360, 65.756 ],
[72, 32, 0, 0.00675502077562327, 0.969954803293024, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 78.03399999999999 ],
[344, 345, 0, 0.0005762927054480609, 0.04654686738645321, 2567.0, 2567.0, 2567.0, 0, 1, 1, -360, 4.993 ],
[346, 47, 0, 0.0011340027700831024, 0.04070792194158799, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 6.55 ],
[46, 47, 0, 0.0008975069252077563, 0.0322183003580208, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 5.184 ],
[346, 345, 0, 0.0007217797783933517, 0.025910126194627202, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 4.169 ],
[347, 328, 0, 0.029905454545454544, 0.07909314882361201, 495.0, 495.0, 495.0, 0, 1, 1, -360, 45.232 ],
[347, 348, 0, 0.04883438016528925, 0.129155866607944, 495.0, 495.0, 495.0, 0, 1, 1, -360, 73.862 ],
[571, 348, 0, 0.041548429752066116, 0.10988617921762801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 62.842 ],
[347, 572, 0, 0.016052231404958678, 0.04245451362512801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 24.279 ],
[571, 570, 0, 0.17379041322314048, 0.11490906279551602, 248.0, 248.0, 248.0, 0, 1, 1, -360, 131.429 ],
[14, 350, 0, 0.02166743801652892, 0.05730546235524, 495.0, 495.0, 495.0, 0, 1, 1, -360, 32.772 ],
[350, 573, 0, 0.026277685950413226, 0.06949852316919598, 495.0, 495.0, 495.0, 0, 1, 1, -360, 39.745 ],
[15, 351, 0, 0.02639265927977839, 0.236857956201204, 856.0, 856.0, 856.0, 0, 1, 1, -360, 76.222 ],
[352, 15, 0, 0.0015260560941828254, 0.219126704094076, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 17.629 ],
[15, 335, 0, 0.0035338758079432133, 1.1417173740880242, 5134.0, 5134.0, 5134.0, 0, 1, 1, -360, 61.235 ],
[232, 227, 0, 5.5747922437673134e-05, 0.000500303468136644, 1200.0, 1200.0, 1200.0, 0, 1, 1, -360, 0.161 ],
[565, 544, 0, 0.0394803305785124, 0.10441652566461601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 59.714 ],
[235, 567, 0, 0.02391404958677686, 0.25298896294275997, 991.0, 991.0, 991.0, 0, 1, 1, -360, 72.34 ],
[567, 286, 0, 0.008068760330578512, 0.34144067500694797, 1981.0, 1981.0, 1981.0, 0, 1, 1, -360, 48.816 ],
[353, 519, 0, 0.007621818181818182, 0.080631926038356, 991.0, 991.0, 991.0, 0, 1, 1, -360, 23.055999999999997 ],
[354, 353, 0, 0.0008436363636363636, 0.00892490784392768, 991.0, 991.0, 991.0, 0, 2, 1, -360, 2.552 ],
[355, 354, 0, 0.0068502479338842966, 0.0181173530898976, 495.0, 495.0, 495.0, 0, 1, 1, -360, 10.360999999999999 ],
[354, 356, 0, 0.01855404958677686, 0.049071255647172, 495.0, 495.0, 495.0, 0, 1, 1, -360, 28.063000000000002 ],
[357, 358, 0, 0.0034823407202216067, 0.5000300103406239, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 40.228 ],
[574, 359, 0, 0.013352066115702478, 0.0353131884615884, 495.0, 495.0, 495.0, 0, 1, 1, -360, 20.195 ],
[235, 575, 0, 0.007459504132231404, 0.0789147905557, 991.0, 991.0, 991.0, 0, 1, 1, -360, 22.565 ],
[167, 361, 0, 0.000616198347107438, 0.0065188198358579995, 991.0, 991.0, 991.0, 0, 1, 1, -360, 1.864 ],
[528, 362, 0, 0.0011960330578512398, 0.012652945368078402, 991.0, 991.0, 991.0, 0, 1, 1, -360, 3.6180000000000003 ],
[363, 344, 0, 0.0002662742382271468, 0.009558592968871479, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.538 ],
[259, 364, 0, 0.013069713758102496, 0.26390852570525997, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 56.618 ],
[54, 56, 0, 0.007723337950138504, 0.0693122289241068, 856.0, 856.0, 856.0, 0, 1, 1, -360, 22.305 ],
[365, 364, 0, 0.0049974607571537395, 0.10091058802821559, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 21.649 ],
[231, 366, 0, 0.0013273891966759002, 0.0476500209962672, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 7.667000000000001 ],
[30, 367, 0, 0.01126108033240997, 0.1010613005635992, 856.0, 856.0, 856.0, 0, 1, 1, -360, 32.522 ],
[61, 367, 0, 0.020337603878116343, 0.18251754162067196, 856.0, 856.0, 856.0, 0, 1, 1, -360, 58.735 ],
[254, 368, 0, 0.0004297520661157025, 0.00454638722456732, 991.0, 991.0, 991.0, 0, 1, 1, -360, 1.3 ],
[254, 369, 0, 0.00015999999999999999, 0.00169265493591832, 991.0, 991.0, 991.0, 0, 2, 1, -360, 0.484 ],
[254, 370, 0, 0.0003669421487603306, 0.0038819152455960805, 991.0, 991.0, 991.0, 0, 2, 1, -360, 1.11 ],
[99, 358, 0, 0.0020184383656509696, 0.28982797432374396, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 23.316999999999997 ],
[354, 519, 0, 0.006762644628099174, 0.07154264880985199, 991.0, 991.0, 991.0, 0, 1, 1, -360, 20.457 ],
[571, 371, 0, 0.023726942148760328, 0.06275238397221199, 495.0, 495.0, 495.0, 0, 1, 1, -360, 35.887 ],
[207, 372, 0, 0.002329256198347108, 0.006160354689297601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 3.523 ],
[57, 373, 0, 0.0017725619834710745, 0.0046880246727212796, 495.0, 495.0, 495.0, 0, 1, 1, -360, 2.681 ],
[209, 374, 0, 0.0010122922437673131, 0.0363388121515216, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 5.847 ],
[375, 376, 0, 0.0045364727608518006, 0.0916021467933684, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 19.652 ],
[376, 377, 0, 0.0030886426592797783, 0.062367022394423606, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 13.38 ],
[16, 49, 0, 0.002266101108033241, 0.32538991773524, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 26.178 ],
[318, 377, 0, 0.004755078485685596, 0.0960163149704152, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 20.599 ],
[378, 297, 0, 0.01753917355371901, 0.046387138574374404, 495.0, 495.0, 495.0, 0, 1, 1, -360, 26.528000000000002 ],
[562, 379, 0, 0.01802314049586777, 0.047667121439141605, 495.0, 495.0, 495.0, 0, 1, 1, -360, 27.26 ],
[576, 563, 0, 0.001808264462809917, 0.004782449638150801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 2.735 ],
[576, 381, 0, 0.0034320661157024794, 0.009077036954898, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.191 ],
[577, 576, 0, 0.06004495867768594, 0.15880530575430396, 495.0, 495.0, 495.0, 0, 1, 1, -360, 90.818 ],
[244, 383, 0, 0.006845567867036011, 0.1382282547912684, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 29.655 ],
[244, 306, 0, 0.02679108956599723, 0.5409756541164079, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 116.059 ],
[383, 306, 0, 0.0300685595567867, 0.269846910348376, 856.0, 856.0, 856.0, 0, 1, 1, -360, 86.838 ],
[380, 306, 0, 0.00025605955678670365, 0.03676764369572, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 2.958 ],
[252, 225, 0, 0.062094545454545444, 0.041056499553586, 248.0, 248.0, 248.0, 0, 1, 1, -360, 46.958999999999996 ],
[220, 76, 0, 0.002772074099722992, 0.398042682239984, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 32.023 ],
[542, 384, 0, 0.007939834710743802, 0.020999063146094, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.009 ],
[385, 384, 0, 0.053734876033057856, 0.035529141854791196, 248.0, 248.0, 248.0, 0, 1, 1, -360, 40.637 ],
[542, 385, 0, 0.011306115702479337, 0.119608453436296, 991.0, 991.0, 991.0, 0, 2, 1, -360, 34.201 ],
[386, 385, 0, 0.003668760330578512, 0.0388121580140316, 991.0, 991.0, 991.0, 0, 1, 1, -360, 11.097999999999999 ],
[387, 578, 0, 0.015444628099173553, 0.16339016240905604, 991.0, 991.0, 991.0, 0, 1, 1, -360, 46.72 ],
[332, 388, 0, 0.014036184210526315, 0.5038646344377999, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 81.07300000000001 ],
[382, 332, 0, 0.017764369806094183, 0.637697365901468, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 102.60700000000001 ],
[382, 388, 0, 0.00476159972299169, 0.17092976750548, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 27.503 ],
[579, 578, 0, 0.01911074380165289, 0.050543585664, 495.0, 495.0, 495.0, 0, 1, 1, -360, 28.905 ],
[577, 387, 0, 0.07597818181818182, 0.20094506949431204, 495.0, 495.0, 495.0, 0, 1, 1, -360, 114.917 ],
[144, 390, 0, 0.0004277685950413223, 0.0011313509747276, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.647 ],
[37, 49, 0, 0.008441481994459835, 0.303028527944352, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 48.758 ],
[391, 233, 0, 0.014211218836565096, 0.1275369872004348, 856.0, 856.0, 856.0, 0, 1, 1, -360, 41.042 ],
[392, 310, 0, 0.007035318559556785, 0.06313767618386361, 856.0, 856.0, 856.0, 0, 1, 1, -360, 20.317999999999998 ],
[260, 393, 0, 0.006341412742382271, 0.0569102963692744, 856.0, 856.0, 856.0, 0, 1, 1, -360, 18.314 ],
[394, 230, 0, 0.0007590027700831025, 0.00681158510656168, 856.0, 856.0, 856.0, 0, 1, 1, -360, 2.1919999999999997 ],
[395, 282, 0, 0.008762984764542936, 0.314569689934484, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 50.615 ],
[395, 244, 0, 0.0034046052631578946, 0.12221699007344, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 19.665 ],
[25, 396, 0, 0.008809037396121884, 0.316222866612064, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 50.881 ],
[81, 74, 0, 0.0075207756232686974, 0.26997742429652244, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 43.44 ],
[278, 80, 0, 0.016286011080332407, 0.5846279085788, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 94.068 ],
[81, 278, 0, 0.021054016620498613, 0.755787629231688, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 121.60799999999999 ],
[569, 570, 0, 0.03253950413223141, 0.08605961294018, 495.0, 495.0, 495.0, 0, 1, 1, -360, 49.216 ],
[397, 552, 0, 0.006289586776859504, 0.0166345314104904, 1200.0, 1200.0, 1200.0, 0, 1, 1, -360, 9.513 ],
[542, 398, 0, 0.0005580165289256199, 0.0059033089500572, 991.0, 991.0, 991.0, 0, 1, 1, -360, 1.6880000000000002 ],
[398, 385, 0, 0.021893553719008262, 0.05790348713648401, 495.0, 495.0, 495.0, 0, 1, 1, -360, 33.114000000000004 ],
[399, 499, 0, 0.03266380165289256, 0.021597087927192803, 248.0, 248.0, 248.0, 0, 1, 1, -360, 24.701999999999998 ],
[83, 399, 0, 0.025700495867768593, 0.016992996557050798, 248.0, 248.0, 248.0, 0, 1, 1, -360, 19.436 ],
[498, 400, 0, 0.012134214876033058, 0.032092247974028, 495.0, 495.0, 495.0, 0, 1, 1, -360, 18.352999999999998 ],
[518, 239, 0, 0.04685289256198347, 0.123915281026504, 495.0, 495.0, 495.0, 0, 1, 1, -360, 70.865 ],
[575, 543, 0, 0.0030307438016528923, 0.032062521596058796, 991.0, 991.0, 991.0, 0, 1, 1, -360, 9.168 ],
[401, 360, 0, 0.007957063711911357, 0.071409774520472, 856.0, 856.0, 856.0, 0, 1, 1, -360, 22.98 ],
[580, 581, 0, 0.007134545454545454, 0.018869255592422397, 495.0, 495.0, 495.0, 0, 1, 1, -360, 10.790999999999999 ],
[401, 402, 0, 0.0033434903047091418, 0.030005778188384805, 856.0, 856.0, 856.0, 0, 1, 1, -360, 9.656 ],
[403, 231, 0, 0.009592105263157893, 0.08608327126915, 856.0, 856.0, 856.0, 0, 1, 1, -360, 27.701999999999998 ],
[189, 360, 0, 0.028456024930747923, 0.255375399471348, 856.0, 856.0, 856.0, 0, 1, 1, -360, 82.181 ],
[234, 404, 0, 0.008092561983471074, 0.0214029921648796, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.24 ],
[235, 404, 0, 0.05107504132231405, 0.13508190749437998, 495.0, 495.0, 495.0, 0, 1, 1, -360, 77.251 ],
[235, 580, 0, 0.000580495867768595, 0.00153527999352772, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.878 ],
[216, 259, 0, 0.0022115650969529088, 0.079389770210892, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 12.774000000000001 ],
[405, 259, 0, 0.0052832409972299165, 0.1896554115982928, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 30.516 ],
[405, 318, 0, 0.0066348684210526315, 0.23817552558268398, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 38.323 ],
[406, 230, 0, 8.098164819944598e-05, 0.046512685161986804, 6845.0, 6845.0, 6845.0, 0, 1, 1, -360, 1.871 ],
[542, 407, 0, 0.025569586776859506, 0.067625761355152, 495.0, 495.0, 495.0, 0, 1, 1, -360, 38.674 ],
[23, 408, 0, 0.03224528925619835, 0.08528148128033601, 495.0, 495.0, 495.0, 0, 1, 1, -360, 48.771 ],
[577, 348, 0, 0.012999008264462809, 0.13751772188026398, 991.0, 991.0, 991.0, 0, 2, 1, -360, 39.321999999999996 ],
[562, 564, 0, 0.06921520661157024, 0.18305853298686803, 495.0, 495.0, 495.0, 0, 1, 1, -360, 104.68799999999999 ],
[582, 507, 0, 0.006357685950413223, 0.016814638289042002, 495.0, 495.0, 495.0, 0, 1, 1, -360, 9.616 ],
[27, 410, 0, 0.0030042975206611565, 0.007945685980170399, 495.0, 495.0, 495.0, 0, 1, 1, -360, 4.544 ],
[501, 27, 0, 0.003811570247933884, 0.040322957460962, 991.0, 991.0, 991.0, 0, 1, 1, -360, 11.53 ],
[27, 411, 0, 0.004648595041322314, 0.012294480221518, 495.0, 495.0, 495.0, 0, 1, 1, -360, 7.031000000000001 ],
[411, 410, 0, 0.002054214876033058, 0.0054329327333556, 495.0, 495.0, 495.0, 0, 1, 1, -360, 3.1069999999999998 ],
[403, 360, 0, 0.008191481994459833, 0.07351353506655639, 856.0, 856.0, 856.0, 0, 1, 1, -360, 23.656999999999996 ],
[412, 360, 0, 0.016761772853185596, 0.15042664773666, 856.0, 856.0, 856.0, 0, 1, 1, -360, 48.408 ],
[326, 413, 0, 0.012077024793388432, 0.12776397267356798, 991.0, 991.0, 991.0, 0, 2, 1, -360, 36.533 ],
[414, 413, 0, 0.008093223140495867, 0.08561896310149601, 991.0, 991.0, 991.0, 0, 2, 1, -360, 24.482 ],
[6, 297, 0, 0.019472396694214876, 0.0128750188978664, 248.0, 248.0, 248.0, 0, 1, 1, -360, 14.725999999999999 ],
[554, 580, 0, 0.07435371900826447, 0.196648733567264, 495.0, 495.0, 495.0, 0, 1, 1, -360, 112.46 ],
[262, 401, 0, 0.03931232686980609, 0.35280406181043206, 856.0, 856.0, 856.0, 0, 1, 1, -360, 113.53399999999999 ],
[499, 556, 0, 0.04185586776859504, 0.11069928308639199, 495.0, 495.0, 495.0, 0, 2, 1, -360, 63.306999999999995 ],
[224, 229, 0, 0.004135206611570248, 0.0437467367631624, 991.0, 991.0, 991.0, 0, 1, 1, -360, 12.509 ],
[583, 507, 0, 0.024632727272727268, 0.065147980317596, 495.0, 495.0, 495.0, 0, 1, 1, -360, 37.257 ],
[415, 307, 0, 0.015675554016620498, 0.1406784987952448, 856.0, 856.0, 856.0, 0, 1, 1, -360, 45.271 ],
[416, 507, 0, 0.0010555371900826446, 0.011166626467730801, 991.0, 991.0, 991.0, 0, 1, 1, -360, 3.193 ],
[284, 561, 0, 0.015221487603305786, 0.16102953827307598, 991.0, 991.0, 991.0, 0, 1, 1, -360, 46.045 ],
[543, 417, 0, 0.0006614876033057851, 0.027991756419545603, 1981.0, 1981.0, 1981.0, 0, 4, 1, -360, 4.002 ],
[418, 506, 0, 0.0009395041322314049, 0.009939101917118, 991.0, 991.0, 991.0, 0, 1, 1, -360, 2.842 ],
[220, 157, 0, 0.004599549861495845, 0.165112574384632, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 26.566999999999997 ],
[295, 419, 0, 0.0012023140495867769, 0.012719392565946, 991.0, 991.0, 991.0, 0, 1, 1, -360, 3.637 ],
[295, 420, 0, 0.0008003305785123967, 0.008466771900532, 991.0, 991.0, 991.0, 0, 1, 1, -360, 2.421 ],
[541, 62, 0, 0.05133355371900827, 0.0339414035471236, 248.0, 248.0, 248.0, 0, 1, 1, -360, 38.821 ],
[52, 421, 0, 0.00013885041551246538, 0.004984389831631239, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.802 ],
[60, 160, 0, 6.128808864265928e-05, 0.000550023067454096, 856.0, 856.0, 856.0, 0, 2, 1, -360, 0.177 ],
[535, 161, 0, 3.735537190082645e-05, 0.00039518596644331203, 991.0, 991.0, 991.0, 0, 2, 1, -360, 0.113 ],
[267, 282, 0, 0.0065652700831024926, 0.235677115717012, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 37.921 ],
[52, 365, 0, 0.007655586334279779, 0.15458444922992, 1283.0, 1283.0, 1283.0, 0, 1, 1, -360, 33.164 ],
[28, 27, 0, 0.015726942148760328, 0.041594197273402404, 495.0, 495.0, 495.0, 0, 1, 1, -360, 23.787 ],
[30, 201, 0, 0.009128289473684211, 0.327683234253536, 1711.0, 1711.0, 1711.0, 0, 2, 1, -360, 52.725 ],
[422, 81, 0, 0.0004226685133887349, 0.13655487952674, 5134.0, 5134.0, 5134.0, 0, 6, 1, -360, 7.324 ],
[119, 425, 0, 0.003579120498614958, 0.1284816595874996, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 20.673000000000002 ],
[423, 425, 0, 0.0006518351800554017, 0.0233992864289392, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 3.765 ],
[424, 425, 0, 0.005922957063711911, 0.21261965153389198, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 34.211 ],
[426, 428, 0, 0.013948429752066116, 0.14756174042535197, 991.0, 991.0, 991.0, 0, 2, 1, -360, 42.193999999999996 ],
[427, 428, 0, 0.0002664462809917355, 0.0028187600792304794, 991.0, 991.0, 991.0, 0, 2, 1, -360, 0.8059999999999999 ],
[19, 428, 0, 0.023607603305785128, 0.24974703912892798, 991.0, 991.0, 991.0, 0, 2, 1, -360, 71.413 ],
[45, 429, 0, 0.02562314049586777, 0.067767398802972, 495.0, 495.0, 495.0, 0, 1, 1, -360, 38.755 ],
[44, 429, 0, 5.289256198347107e-05, 0.00013988883767892, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.08 ],
[505, 429, 0, 0.006012561983471073, 0.015901863623161996, 495.0, 495.0, 495.0, 0, 1, 1, -360, 9.094 ],
[231, 431, 0, 0.011677285318559558, 0.4191859418495199, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 67.44800000000001 ],
[190, 431, 0, 0.009600761772853185, 0.34464383257266795, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 55.45399999999999 ],
[430, 431, 0, 0.0028100761772853187, 0.1008748520662472, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.230999999999998 ],
[286, 433, 0, 0.01568694214876033, 0.16595362535967603, 991.0, 991.0, 991.0, 0, 1, 1, -360, 47.453 ],
[432, 433, 0, 0.00010049586776859504, 0.00106315516636076, 991.0, 991.0, 991.0, 0, 1, 1, -360, 0.304 ],
[506, 433, 0, 0.0065904132231404955, 0.06972059669946801, 991.0, 991.0, 991.0, 0, 1, 1, -360, 19.936 ],
[23, 434, 0, 0.02613685950413223, 0.069126069139116, 495.0, 495.0, 495.0, 0, 2, 1, -360, 39.532 ],
[400, 434, 0, 0.008155371900826446, 0.021569110159669603, 495.0, 495.0, 495.0, 0, 2, 1, -360, 12.335 ],
[500, 434, 0, 0.006338512396694216, 0.0167639285853336, 495.0, 495.0, 495.0, 0, 2, 1, -360, 9.587 ],
[32, 436, 0, 0.0044813019390581715, 0.16086776359270402, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 25.884 ],
[435, 436, 0, 0.0006634349030470914, 0.023815688073266, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 3.832 ],
[78, 436, 0, 0.00897680055401662, 0.32224515307884394, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 51.85 ],
[86, 438, 0, 0.014693213296398892, 0.52745036936438, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 84.868 ],
[437, 438, 0, 1.0387811634349031e-05, 0.0003728969948845, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.06 ],
[221, 438, 0, 0.002280124653739612, 0.081850890377238, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.17 ],
[207, 439, 0, 0.055703801652892564, 0.0368309823503996, 248.0, 248.0, 248.0, 0, 1, 1, -360, 42.126000000000005 ],
[516, 439, 0, 0.05448462809917355, 0.03602487292327441, 248.0, 248.0, 248.0, 0, 1, 1, -360, 41.20399999999999 ],
[513, 439, 0, 0.046726611570247926, 0.0308953241066316, 248.0, 248.0, 248.0, 0, 1, 1, -360, 35.336999999999996 ],
[181, 441, 0, 0.040805289256198356, 0.10792074104825197, 495.0, 495.0, 495.0, 0, 1, 1, -360, 61.718 ],
[440, 441, 0, 0.0001322314049586777, 0.000349722094197784, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.2 ],
[504, 441, 0, 0.05916099173553719, 0.156467413554364, 495.0, 495.0, 495.0, 0, 1, 1, -360, 89.48100000000001 ],
[135, 442, 0, 0.004956890581717451, 0.177940231009092, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 28.631 ],
[109, 442, 0, 0.0015380886426592797, 0.055213615042649204, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 8.884 ],
[112, 442, 0, 0.0027304362880886425, 0.09801597510545401, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 15.770999999999999 ],
[113, 443, 0, 0.0019885734072022164, 0.07138491472072879, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 11.485999999999999 ],
[132, 443, 0, 0.006788434903047091, 0.24368818615747198, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 39.21 ],
[107, 443, 0, 2.2333795013850418e-05, 0.000801728539002036, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.129 ],
[444, 445, 0, 7.877423822714682e-05, 0.00282780221121528, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.455 ],
[112, 445, 0, 0.002816135734072022, 0.101092375313206, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.266 ],
[109, 445, 0, 0.0014354224376731304, 0.0515281497432104, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 8.291 ],
[119, 447, 0, 0.005212690443213296, 0.74849127803204, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 60.217 ],
[100, 447, 0, 0.0050695117728531865, 0.7279322237145921, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 58.563 ],
[446, 447, 0, 2.9518698060941832e-05, 0.00423859584186224, 3423.0, 3423.0, 3423.0, 0, 2, 1, -360, 0.341 ],
[124, 448, 0, 6.509695290858726e-05, 0.00233682116794768, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.376 ],
[125, 448, 0, 0.00615148891966759, 0.22082338542026803, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 35.531 ],
[131, 448, 0, 3.912742382271468e-05, 0.0014045786807313759, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.226 ],
[449, 450, 0, 0.0023614958448753462, 0.08477191683710039, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.64 ],
[173, 450, 0, 0.002862361495844876, 0.10275176694050518, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 16.533 ],
[184, 450, 0, 0.004022853185595568, 0.14441057621844403, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 23.236 ],
[144, 451, 0, 0.007672727272727273, 0.020292624515794402, 495.0, 495.0, 495.0, 0, 1, 1, -360, 11.605 ],
[140, 451, 0, 0.006991074380165291, 0.018489807120219602, 495.0, 495.0, 495.0, 0, 1, 1, -360, 10.574000000000002 ],
[514, 451, 0, 0.01149289256198347, 0.030396095817207994, 495.0, 495.0, 495.0, 0, 1, 1, -360, 17.383 ],
[537, 585, 0, 0.05072595041322314, 0.134158641165824, 495.0, 495.0, 495.0, 0, 1, 1, -360, 76.723 ],
[141, 585, 0, 0.007994710743801653, 0.0211441978151932, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.092 ],
[584, 585, 0, 9.256198347107438e-05, 0.000244805465938352, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.14 ],
[522, 454, 0, 0.0035008264462809916, 0.0092588924438956, 495.0, 495.0, 495.0, 0, 1, 1, -360, 5.295 ],
[144, 454, 0, 0.00452892561983471, 0.011977981726290799, 495.0, 495.0, 495.0, 0, 1, 1, -360, 6.85 ],
[453, 454, 0, 0.001114710743801653, 0.0029481572540882, 495.0, 495.0, 495.0, 0, 1, 1, -360, 1.686 ],
[199, 456, 0, 0.013063140495867768, 0.0086372614214612, 248.0, 248.0, 248.0, 0, 1, 1, -360, 9.879 ],
[140, 456, 0, 0.005061818181818182, 0.013387361765852802, 495.0, 495.0, 495.0, 0, 2, 1, -360, 7.656000000000001 ],
[455, 456, 0, 0.0011365289256198346, 0.00300586139962416, 495.0, 495.0, 495.0, 0, 2, 1, -360, 1.719 ],
[537, 456, 0, 0.039058512396694216, 0.025825228046024003, 248.0, 248.0, 248.0, 0, 1, 1, -360, 29.538 ],
[538, 457, 0, 0.027927272727272728, 0.0184653265736368, 248.0, 248.0, 248.0, 0, 1, 1, -360, 21.12 ],
[153, 457, 0, 0.030093223140495867, 0.019897438549384, 248.0, 248.0, 248.0, 0, 1, 1, -360, 22.758000000000003 ],
[176, 457, 0, 0.004579173553719009, 0.0030277190305137603, 248.0, 248.0, 248.0, 0, 1, 1, -360, 3.463 ],
[524, 459, 0, 0.004318677685950414, 0.011421923596476799, 495.0, 495.0, 495.0, 0, 1, 1, -360, 6.532 ],
[458, 459, 0, 0.001993388429752066, 0.0052720605700488, 495.0, 495.0, 495.0, 0, 1, 1, -360, 3.015 ],
[134, 459, 0, 0.011813553719008265, 0.031244171895617998, 495.0, 495.0, 495.0, 0, 1, 1, -360, 17.868 ],
[460, 461, 0, 6.611570247933885e-05, 0.000174861047098892, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.1 ],
[150, 461, 0, 0.008018512396694214, 0.021207147792120403, 495.0, 495.0, 495.0, 0, 1, 1, -360, 12.128 ],
[149, 461, 0, 0.005586115702479339, 0.0147740098693748, 495.0, 495.0, 495.0, 0, 1, 1, -360, 8.449 ],
[521, 463, 0, 0.014348429752066114, 0.009487086110365599, 248.0, 248.0, 248.0, 0, 1, 1, -360, 10.850999999999999 ],
[462, 463, 0, 0.007197355371900825, 0.0047588433967958406, 248.0, 248.0, 248.0, 0, 1, 1, -360, 5.443 ],
[538, 463, 0, 0.012211570247933883, 0.0080742088497664, 248.0, 248.0, 248.0, 0, 1, 1, -360, 9.235 ],
[110, 464, 0, 0.0025753116343490306, 0.0924473799817492, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 14.875 ],
[90, 464, 0, 0.007328947368421053, 0.26309125979076, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 42.332 ],
[165, 464, 0, 0.002152527700831025, 0.0772704722900764, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 12.433 ],
[458, 465, 0, 0.002003305785123967, 0.0052982897270776, 495.0, 495.0, 495.0, 0, 1, 1, -360, 3.03 ],
[134, 465, 0, 0.011838677685950413, 0.031310619093534, 495.0, 495.0, 495.0, 0, 1, 1, -360, 17.906 ],
[524, 465, 0, 0.004293553719008264, 0.0113554763986092, 495.0, 495.0, 495.0, 0, 1, 1, -360, 6.494 ],
[466, 467, 0, 0.0023509349030470914, 0.084392804892244, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.579 ],
[110, 467, 0, 0.0025337603878116343, 0.09095579200221118, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 14.635 ],
[165, 467, 0, 0.0022891274238227145, 0.08217406777274441, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 13.222000000000001 ],
[468, 469, 0, 0.0005269421487603305, 0.0013936425453786, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.797 ],
[541, 469, 0, 0.022390743801652895, 0.05921844221026801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 33.866 ],
[490, 469, 0, 0.028243305785123966, 0.07469714209944801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 42.718 ],
[263, 471, 0, 0.0371900826446281, 0.0245898347482832, 248.0, 248.0, 248.0, 0, 1, 1, -360, 28.125 ],
[470, 471, 0, 0.001570909090909091, 0.0010386746197682802, 248.0, 248.0, 248.0, 0, 1, 1, -360, 1.188 ],
[534, 471, 0, 0.024497190082644622, 0.0161973787927468, 248.0, 248.0, 248.0, 0, 1, 1, -360, 18.526 ],
[136, 472, 0, 0.0007079293628808865, 0.025412930201351602, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 4.0889999999999995 ],
[110, 472, 0, 0.00019511772853185596, 0.0070042485539216805, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.127 ],
[251, 472, 0, 4.207063711911357e-05, 0.00151023282928764, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.243 ],
[226, 474, 0, 0.017639669421487602, 0.011663231841509601, 248.0, 248.0, 248.0, 0, 1, 1, -360, 13.34 ],
[473, 474, 0, 0.003467107438016529, 0.00916971330986216, 495.0, 495.0, 495.0, 0, 2, 1, -360, 5.244 ],
[257, 474, 0, 0.020264462809917356, 0.053594910935781594, 495.0, 495.0, 495.0, 0, 2, 1, -360, 30.65 ],
[6, 474, 0, 0.08066247933884299, 0.05333349367016, 248.0, 248.0, 248.0, 0, 1, 1, -360, 61.001000000000005 ],
[299, 475, 0, 0.013238227146814403, 0.47521993028123993, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 76.464 ],
[3, 475, 0, 0.0002794321329639889, 0.010030929162389441, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.614 ],
[210, 475, 0, 0.0001481994459833795, 0.00531999712702368, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.856 ],
[297, 476, 0, 0.0193500826446281, 0.05117658265464801, 495.0, 495.0, 495.0, 0, 1, 1, -360, 29.267 ],
[296, 476, 0, 0.005596694214876033, 0.014801987636898, 495.0, 495.0, 495.0, 0, 1, 1, -360, 8.465 ],
[295, 476, 0, 0.0009474380165289256, 0.00250575880492432, 495.0, 495.0, 495.0, 0, 1, 1, -360, 1.433 ],
[313, 478, 0, 0.008696849030470914, 0.31219557906752804, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 50.233000000000004 ],
[477, 478, 0, 1.5235457063711912e-05, 0.0005469155924977479, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 0.08800000000000001 ],
[245, 478, 0, 0.005264542936288089, 0.188984197007248, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 30.408 ],
[479, 481, 0, 0.028420495867768597, 0.07516576970575199, 495.0, 495.0, 495.0, 0, 1, 1, -360, 42.986000000000004 ],
[565, 481, 0, 0.024842314049586776, 0.065702289836964, 495.0, 495.0, 495.0, 0, 1, 1, -360, 37.574 ],
[480, 481, 0, 7.735537190082645e-05, 0.000204587425105844, 495.0, 495.0, 495.0, 0, 1, 1, -360, 0.11699999999999999 ],
[415, 482, 0, 0.011021814404432133, 0.0989140353680364, 856.0, 856.0, 856.0, 0, 1, 1, -360, 31.831 ],
[56, 482, 0, 0.002630886426592798, 0.0236105947261788, 856.0, 856.0, 856.0, 0, 1, 1, -360, 7.598 ],
[409, 482, 0, 0.0007635041551246537, 0.0068519822810072005, 856.0, 856.0, 856.0, 0, 1, 1, -360, 2.205 ],
[483, 484, 0, 9.037396121883656e-05, 0.000811050963873968, 856.0, 856.0, 856.0, 0, 1, 1, -360, 0.261 ],
[3, 484, 0, 0.010022160664819944, 0.08994275516621358, 856.0, 856.0, 856.0, 0, 1, 1, -360, 28.944000000000003 ],
[301, 484, 0, 0.00966516620498615, 0.08673894848517479, 856.0, 856.0, 856.0, 0, 1, 1, -360, 27.913 ],
[233, 485, 0, 0.01410180055401662, 0.1265550251138996, 856.0, 856.0, 856.0, 0, 1, 1, -360, 40.726 ],
[392, 485, 0, 0.00914819944598338, 0.0820994883738036, 856.0, 856.0, 856.0, 0, 1, 1, -360, 26.42 ],
[391, 485, 0, 8.518005540166207e-05, 0.000764438839512864, 856.0, 856.0, 856.0, 0, 1, 1, -360, 0.24600000000000002 ],
[579, 488, 0, 0.004636473829194215, 0.11036180126571601, 1486.0, 1486.0, 1486.0, 0, 1, 1, -360, 21.038 ],
[486, 488, 0, 0.00016969696969690082, 0.00403929018798184, 1486.0, 1486.0, 1486.0, 0, 1, 1, -360, 0.77 ],
[487, 488, 0, 0.00014567493112954544, 0.00346749456396992, 1486.0, 1486.0, 1486.0, 0, 1, 1, -360, 0.6609999999999999 ],
[270, 489, 0, 0.0001745152354570637, 0.0062646695140596, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 1.008 ],
[331, 489, 0, 0.003002943213296399, 0.10779830627119119, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 17.345 ],
[396, 489, 0, 0.01124792243767313, 0.40377286606072005, 1711.0, 1711.0, 1711.0, 0, 1, 1, -360, 64.968 ],
[519, 253, 0, 0.013353485337561985, 0.141267767926912, 991.0, 991.0, 991.0, 0, 1, 1, -360, 40.394293146100004 ],
[382, 349, 0, 0.009091647380263157, 1.30547149138788, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 105.02671053600001 ],
[349, 351, 0, 0.0005858117819605263, 0.0841168325920224, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 6.76729770521 ],
[459, 465, 0, 1.578788789911157e-05, 0.00016702153987596, 991.0, 991.0, 991.0, 0, 1, 1, -360, 0.047758360894800005 ],
[549, 550, 0, 3.680432518409091e-05, 0.000389356391787088, 991.0, 991.0, 991.0, 0, 1, 1, -360, 0.111333083682 ],
[550, 551, 0, 5.755645674710744e-05, 0.0006088951287918401, 991.0, 991.0, 991.0, 0, 1, 1, -360, 0.17410828165999997 ],
[194, 195, 0, 1.7560672583171745e-05, 0.00252154053805592, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.202860889681 ],
[247, 248, 0, 2.1755213937811637e-05, 0.0031238355819477198, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.25131623141 ],
[2, 294, 0, 2.3531392658518004e-05, 0.003378877444715, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.271834647991 ],
[549, 551, 0, 9.265809538429751e-05, 0.0009802386406577602, 991.0, 991.0, 991.0, 0, 1, 1, -360, 0.28029073853799996 ],
[54, 365, 0, 2.573045189134349e-05, 0.00369464080598484, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.297238180249 ],
[131, 265, 0, 2.7616389041343487e-05, 0.00396544290388756, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.319024526206 ],
[91, 92, 0, 2.8945628197853184e-05, 0.0041563086239824396, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.33437989694200004 ],
[247, 249, 0, 3.098840072160664e-05, 0.00444963074500788, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.357978005136 ],
[186, 191, 0, 3.1591661821191135e-05, 0.00453625312865552, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.36494687735799997 ],
[129, 173, 0, 3.202671277479225e-05, 0.00459872218332188, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.369972585975 ],
[96, 202, 0, 3.5971247867797784e-05, 0.00516511877739804, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.415539855369 ],
[53, 320, 0, 3.784209581142659e-05, 0.00543375421308236, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.437151890814 ],
[24, 396, 0, 4.144748602818559e-05, 0.005951452925597279, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.47880135859800005 ],
[133, 156, 0, 4.431754564044322e-05, 0.0063635653674415605, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.511956287238 ],
[442, 452, 0, 4.483572190450138e-05, 0.006437970402313801, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.517942259441 ],
[445, 452, 0, 4.490753296371191e-05, 0.0064482817668697215, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.518771820797 ],
[247, 250, 0, 4.594910768732687e-05, 0.00659784169268824, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.530804092004 ],
[187, 195, 0, 4.755760376239612e-05, 0.006828805970367921, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.549385438663 ],
[216, 236, 0, 5.03353075283241e-05, 0.00722765701751724, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.581473472567 ],
[244, 389, 0, 5.1633313019736845e-05, 0.007414037889302401, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.596468032004 ],
[394, 406, 0, 5.6346419007686985e-05, 0.008090793734075721, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.650913832377 ],
[442, 445, 0, 6.388070648310249e-05, 0.00917264360085512, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.737949921293 ],
[442, 444, 0, 6.584378362735456e-05, 0.00945452224616264, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.760627388463 ],
[198, 472, 0, 8.37554210498615e-05, 0.0120264578966664, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.967542623967 ],
[464, 467, 0, 8.460287496468144e-05, 0.01214814397621276, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 0.977332411594 ],
[198, 251, 0, 8.83613182396122e-05, 0.012687819608389479, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 1.0207499483 ],
[112, 143, 0, 9.049653833033241e-05, 0.012994416294241841, 3423.0, 3423.0, 3423.0, 0, 1, 1, -360, 1.04541601079 ],
[2, 490, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[5, 491, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[10, 492, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[12, 493, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[13, 494, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[15, 495, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[18, 496, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[20, 497, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[22, 498, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[24, 499, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[26, 500, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[30, 501, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[32, 502, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[37, 503, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[42, 504, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[46, 505, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[52, 506, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[56, 507, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[61, 508, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[68, 509, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[69, 510, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[74, 511, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[78, 512, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[86, 513, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[87, 514, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[94, 515, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[95, 516, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[96, 517, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[99, 518, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[100, 519, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[104, 520, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[105, 521, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[106, 522, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[107, 523, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[117, 524, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[120, 525, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[123, 526, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[124, 527, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[125, 528, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[128, 529, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[129, 530, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[138, 531, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[143, 532, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[156, 533, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[157, 534, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[159, 535, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[160, 536, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[165, 537, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[184, 538, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[191, 539, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[195, 540, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[201, 541, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[220, 542, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[231, 543, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[232, 544, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[233, 545, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[236, 546, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[245, 547, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[246, 548, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[248, 549, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[249, 550, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[250, 551, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[259, 552, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[261, 553, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[262, 554, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[265, 555, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[270, 556, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[277, 557, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[279, 558, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[280, 559, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[290, 560, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[301, 561, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[305, 562, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[306, 563, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[310, 564, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[313, 565, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[315, 566, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[320, 567, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[330, 568, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[332, 569, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[334, 570, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[336, 571, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[349, 572, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[351, 573, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[358, 574, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[360, 575, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[380, 576, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[382, 577, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[383, 578, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[389, 579, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[401, 580, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[402, 581, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[409, 582, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[415, 583, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[444, 584, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ],
[452, 585, 0, 0.005, 0.0, 2000.0, 2000.0, 2000.0, 1.0, 0, 1, -360, 360 ]
])
ppc["gen_control"] = array([
[586, 1, 0.08658028904199107, 4.329014452099554, 0, 0, 0],
[589, 1, 0.010042676909098597, 0.5021338454549299, 0, 0, 0],
[590, 1, 0.012095775674984046, 0.6047887837492023, 0, 0, 0],
[593, 1, 0.0017666198683200384, 0.08833099341600192, 0, 0, 0],
[595, 1, 1.50560576164933, 75.2802880824665, 0, 0, 0],
[598, 1, 0.0038197186342054878, 0.1909859317102744, 0, 0, 0],
[599, 1, 0.0029602819415092537, 0.1480140970754627, 0, 0, 0],
[602, 1, 0.007830423200121252, 0.39152116000606263, 0, 0, 0],
[603, 1, 1.0997606567649967, 54.98803283824984, 0, 0, 0],
[607, 1, 0.5729577951308232, 28.64788975654116, 0, 0, 0],
[608, 1, 0.0076394372684109755, 0.3819718634205488, 0, 0, 0],
[609, 1, 0.0057932399285449895, 0.2896619964272495, 0, 0, 0],
[612, 1, 0.00954929658551372, 0.477464829275686, 0, 0, 0],
[614, 1, 0.00954929658551372, 0.477464829275686, 0, 0, 0],
[616, 1, 0.0046154933496649645, 0.23077466748324824, 0, 0, 0],
[617, 1, 0.04360845440717932, 2.1804227203589663, 0, 0, 0],
[618, 1, 0.010631550198538607, 0.5315775099269304, 0, 0, 0],
[619, 1, 0.037560566569687294, 1.8780283284843649, 0, 0, 0],
[624, 1, 0.004297183463481174, 0.21485917317405873, 0, 0, 0],
[629, 1, 0.023968734429639437, 1.198436721481972, 0, 0, 0],
[632, 1, 0.01435577586688896, 0.717788793344448, 0, 0, 0],
[637, 1, 0.017093240888069558, 0.854662044403478, 0, 0, 0],
[638, 1, 0.02048324117592693, 1.0241620587963465, 0, 0, 0],
[640, 1, 0.0038197186342054878, 0.1909859317102744, 0, 0, 0],
[641, 1, 0.0040107045659157625, 0.20053522829578813, 0, 0, 0],
[642, 1, 0.00919915571071155, 0.4599577855355775, 0, 0, 0],
[643, 1, 0.27279157245950864, 13.639578622975431, 0, 0, 0],
[647, 1, 0.00445633840657307, 0.2228169203286535, 0, 0, 0],
[652, 1, 0.00746436683100989, 0.37321834155049455, 0, 0, 0],
[655, 1, 0.019576058000303126, 0.9788029000151565, 0, 0, 0],
[663, 1, 0.00238732414637843, 0.1193662073189215, 0, 0, 0],
[666, 1, 0.00919915571071155, 0.4599577855355775, 0, 0, 0],
[670, 1, 0.0076394372684109755, 0.3819718634205488, 0, 0, 0],
[672, 1, 0.010536057232683471, 0.5268028616341736, 0, 0, 0],
[676, 1, 0.11777465788800255, 5.888732894400127, 0, 0, 0],
[681, 1, 0.0063821132179850025, 0.31910566089925013, 0, 0, 0],
[683, 1, 0.008753521870054244, 0.4376760935027122, 0, 0, 0],
[687, 1, 0.42303383873825773, 21.151691936912886, 0, 0, 0],
[694, 1, 0.005220282133414166, 0.2610141066707083, 0, 0, 0],
[695, 1, 0.004679155326901723, 0.23395776634508614, 0, 0, 0],
[697, 1, 0.0036923946797319715, 0.1846197339865986, 0, 0, 0],
[698, 1, 0.0038197186342054878, 0.1909859317102744, 0, 0, 0],
[702, 1, 0.023363945645890238, 1.168197282294512, 0, 0, 0],
[705, 1, 0.005411268065124442, 0.27056340325622213, 0, 0, 0],
[707, 1, 0.010822536130248884, 0.5411268065124443, 0, 0, 0],
[714, 1, 0.00477464829275686, 0.238732414637843, 0, 0, 0],
[716, 1, 1.5915494309189534e-05, 0.0007957747154594768, 0, 0, 0],
[717, 1, 0.0017507043740108488, 0.08753521870054244, 0, 0, 0],
[722, 1, 0.006589014644004467, 0.3294507322002233, 0, 0, 0],
[724, 1, 0.0019257748114119334, 0.09628874057059668, 0, 0, 0],
[730, 1, 0.10077690996578814, 5.038845498289407, 0, 0, 0],
[732, 1, 0.004647324338283344, 0.2323662169141672, 0, 0, 0],
[735, 1, 0.013496339174192726, 0.6748169587096363, 0, 0, 0],
[741, 1, 0.0340591578216656, 1.7029578910832803, 0, 0, 0],
[742, 1, 0.0028647889756541157, 0.14323944878270578, 0, 0, 0],
[743, 1, 0.44881693951914486, 22.440846975957243, 0, 0, 0],
[747, 1, 0.0039788735772973835, 0.1989436788648692, 0, 0, 0],
[749, 1, 0.0025464790894703256, 0.12732395447351627, 0, 0, 0],
[750, 1, 0.028902537665488188, 1.4451268832744095, 0, 0, 0],
[753, 1, 0.049624511256052974, 2.4812255628026487, 0, 0, 0],
[761, 1, 0.004997465213085514, 0.2498732606542757, 0, 0, 0],
[762, 1, 0.3517324242330887, 17.586621211654435, 0, 0, 0],
[765, 1, 0.018780283284843647, 0.9390141642421824, 0, 0, 0],
[767, 1, 0.0035650707252584553, 0.17825353626292276, 0, 0, 0],
[772, 1, 0.002992112930127632, 0.1496056465063816, 0, 0, 0],
[774, 1, 0.010663381187156987, 0.5331690593578494, 0, 0, 0],
[777, 1, 0.012573240504259732, 0.6286620252129866, 0, 0, 0],
[778, 1, 0.004679155326901723, 0.23395776634508614, 0, 0, 0],
[781, 1, 0.4169859509007658, 20.84929754503829, 0, 0, 0],
[784, 1, 0.4058451048843331, 20.292255244216655, 0, 0, 0],
[785, 1, 0.00047746482927568597, 0.0238732414637843, 0, 0, 0],
[788, 1, 0.2785211504108168, 13.926057520540843, 0, 0, 0],
[789, 1, 0.0123185925953127, 0.615929629765635, 0, 0, 0],
[791, 1, 0.0031830988618379067, 0.15915494309189535, 0, 0, 0],
[792, 1, 0.009979014931861837, 0.49895074659309185, 0, 0, 0],
[795, 1, 0.004329014452099553, 0.2164507226049777, 0, 0, 0],
[800, 1, 0.0058091554228541795, 0.290457771142709, 0, 0, 0],
[801, 1, 0.007957747154594767, 0.3978873577297384, 0, 0, 0],
[802, 1, 0.07957747154594767, 3.9788735772973833, 0, 0, 0],
[805, 1, 0.44881693951914486, 22.440846975957243, 0, 0, 0],
[806, 1, 0.005697746962689853, 0.2848873481344927, 0, 0, 0],
[808, 1, 0.034616200122487235, 1.7308100061243619, 0, 0, 0],
[809, 1, 0.0039788735772973835, 0.1989436788648692, 0, 0, 0],
[811, 1, 0.0040107045659157625, 0.20053522829578813, 0, 0, 0],
[814, 1, 0.014164789935178685, 0.7082394967589343, 0, 0, 0],
[816, 1, 0.012748310941660816, 0.6374155470830408, 0, 0, 0],
[817, 1, 0.017188733853924696, 0.8594366926962349, 0, 0, 0],
[821, 1, 0.013130282805081364, 0.6565141402540683, 0, 0, 0],
[826, 1, 0.018461973398659858, 0.9230986699329929, 0, 0, 0],
[834, 1, 0.007416620348082323, 0.37083101740411617, 0, 0, 0],
[835, 1, 0.010138169874953733, 0.5069084937476867, 0, 0, 0],
[836, 1, 0.008116902097686661, 0.4058451048843331, 0, 0, 0],
[837, 1, 0.15024226627874918, 7.512113313937459, 0, 0, 0],
[839, 1, 0.011666057328635928, 0.5833028664317964, 0, 0, 0],
[841, 1, 0.0037083101740411615, 0.18541550870205808, 0, 0, 0],
[843, 1, 0.10599719209920229, 5.2998596049601145, 0, 0, 0],
[844, 1, 0.012732395447351627, 0.6366197723675814, 0, 0, 0],
[850, 1, 0.005092958178940651, 0.25464790894703254, 0, 0, 0],
[851, 1, 0.01265281797580568, 0.632640898790284, 0, 0, 0],
[853, 1, 0.0036923946797319715, 0.1846197339865986, 0, 0, 0],
[856, 1, 0.011459155902616463, 0.5729577951308231, 0, 0, 0],
[857, 1, 0.4462704604296745, 22.313523021483725, 0, 0, 0],
[858, 1, 0.01808000153523931, 0.9040000767619655, 0, 0, 0],
[860, 1, 0.0039788735772973835, 0.1989436788648692, 0, 0, 0],
[865, 1, 0.0035014087480216977, 0.17507043740108488, 0, 0, 0],
[867, 1, 0.24478030247533505, 12.239015123766753, 0, 0, 0],
[869, 1, 0.4329014452099553, 21.645072260497766, 0, 0, 0],
[870, 1, 0.018589297353133374, 0.9294648676566688, 0, 0, 0],
[872, 1, 0.00716197243913529, 0.3580986219567645, 0, 0, 0],
[874, 1, 0.006589014644004467, 0.3294507322002233, 0, 0, 0],
[875, 1, 0.007766761222884492, 0.38833806114422464, 0, 0, 0],
[882, 1, 0.005538592019597957, 0.2769296009798979, 0, 0, 0],
[883, 1, 0.005729577951308231, 0.28647889756541156, 0, 0, 0],
[885, 1, 0.15597184423005742, 7.798592211502871, 0, 0, 0],
[886, 1, 0.8186930272647096, 40.93465136323548, 0, 0, 0],
[889, 1, 0.0030239439187460114, 0.15119719593730058, 0, 0, 0],
[890, 1, 0.0076394372684109755, 0.3819718634205488, 0, 0, 0],
[893, 1, 0.00954929658551372, 0.477464829275686, 0, 0, 0],
[894, 1, 0.025146481008519465, 1.2573240504259733, 0, 0, 0],
[895, 1, 0.0030239439187460114, 0.15119719593730058, 0, 0, 0],
[896, 1, 0.0038197186342054878, 0.1909859317102744, 0, 0, 0],
[898, 1, 0.013464508185574344, 0.6732254092787172, 0, 0, 0],
[902, 1, 0.006207042780583919, 0.31035213902919595, 0, 0, 0],
[903, 1, 0.0031990143561470966, 0.15995071780735484, 0, 0, 0],
[905, 1, 0.021851973686517232, 1.0925986843258617, 0, 0, 0],
[906, 1, 0.010504226244065093, 0.5252113122032547, 0, 0, 0],
[907, 1, 0.02142225534016911, 1.0711127670084555, 0, 0, 0],
[909, 1, 0.005856901905781748, 0.2928450952890874, 0, 0, 0],
[917, 1, 0.005411268065124442, 0.27056340325622213, 0, 0, 0],
[918, 1, 0.012254930618075942, 0.612746530903797, 0, 0, 0],
[920, 1, 0.0020371832715762603, 0.10185916357881303, 0, 0, 0],
[921, 1, 0.019735212943395024, 0.9867606471697512, 0, 0, 0],
[922, 1, 0.05220282133414166, 2.6101410667070835, 0, 0, 0],
[923, 1, 0.023236621691416718, 1.161831084570836, 0, 0, 0],
[925, 1, 0.008276057040778557, 0.4138028520389279, 0, 0, 0],
[931, 1, 0.03455253814525047, 1.7276269072625237, 0, 0, 0],
[936, 1, 0.016615776058793875, 0.8307888029396938, 0, 0, 0],
[937, 1, 0.00477464829275686, 0.238732414637843, 0, 0, 0],
[939, 1, 1.5915494309189534e-05, 0.0007957747154594768, 0, 0, 0],
[940, 1, 0.009421972631040205, 0.47109863155201026, 0, 0, 0],
[944, 1, 0.004042535554534142, 0.2021267777267071, 0, 0, 0],
[950, 1, 0.005092958178940651, 0.25464790894703254, 0, 0, 0],
[952, 1, 0.005045211696013082, 0.2522605848006541, 0, 0, 0],
[958, 1, 0.010615634704229418, 0.530781735211471, 0, 0, 0],
[959, 1, 0.007241549910681238, 0.3620774955340619, 0, 0, 0],
[960, 1, 0.004217605991935227, 0.21088029959676136, 0, 0, 0],
[963, 1, 0.2785211504108168, 13.926057520540843, 0, 0, 0],
[965, 1, 0.11204507993669433, 5.602253996834716, 0, 0, 0],
[967, 1, 0.01193662073189215, 0.5968310365946076, 0, 0, 0],
[969, 1, 0.018111832523857688, 0.9055916261928845, 0, 0, 0],
[971, 1, 0.0031830988618379067, 0.15915494309189535, 0, 0, 0],
[978, 1, 0.0007321127382227185, 0.03660563691113593, 0, 0, 0],
[982, 1, 0.0015756339366097638, 0.07878169683048819, 0, 0, 0],
[983, 1, 0.01400563499208679, 0.7002817496043395, 0, 0, 0],
[984, 1, 0.14801409707546268, 7.400704853773133, 0, 0, 0],
[985, 1, 0.0035014087480216977, 0.17507043740108488, 0, 0, 0],
[986, 1, 0.0017825353626292277, 0.08912676813146138, 0, 0, 0],
[987, 1, 0.02618098813861678, 1.3090494069308392, 0, 0, 0],
[988, 1, 0.0008116902097686662, 0.04058451048843331, 0, 0, 0],
[993, 1, 0.06238873769202297, 3.119436884601149, 0, 0, 0],
[994, 1, 0.010504226244065093, 0.5252113122032547, 0, 0, 0],
[995, 1, 0.0006684507609859605, 0.033422538049298026, 0, 0, 0],
[997, 1, 0.005984225860255264, 0.2992112930127632, 0, 0, 0],
[999, 1, 0.004965634224467135, 0.24828171122335674, 0, 0, 0],
[1002, 1, 0.0031512678732195276, 0.15756339366097638, 0, 0, 0],
[1007, 1, 0.007416620348082323, 0.37083101740411617, 0, 0, 0],
[1010, 1, 0.238732414637843, 11.93662073189215, 0, 0, 0],
[1011, 1, 0.005952394871636886, 0.2976197435818443, 0, 0, 0],
[1012, 1, 0.9024085273310466, 45.12042636655233, 0, 0, 0],
[1014, 1, 0.238732414637843, 11.93662073189215, 0, 0, 0],
[1027, 3, 0.003074873500535418, 0.15374367502677092, 2.22, 61.69, 0.004502],
[1028, 2, 0.025464790894703257, 1.273239544735163, 0, 0, 0],
[1029, 2, 0.003819718634205488, 0.19098593171027442, 0, 0, 0],
[1030, 2, 0.06480789282701978, 3.2403946413509894, 0, 0, 0],
[1031, 2, 0.0921316134570364, 4.60658067285182, 0, 0, 0],
[1032, 2, 0.009772775025341927, 0.4886387512670964, 0, 0, 0],
[1033, 2, 0.0031935716694765437, 0.15967858347382718, 0, 0, 0],
[1034, 2, 0.005364335122251813, 0.26821675611259066, 0, 0, 0],
[1035, 3, 0.00317587127473044, 0.158793563736522, 2.22, 61.69, 0.004502],
[1036, 2, 0.0042795539826391196, 0.21397769913195597, 0, 0, 0],
[1037, 2, 0.0060277734620055035, 0.3013886731002752, 0, 0, 0],
[1038, 2, 0.005462103769994554, 0.2731051884997277, 0, 0, 0],
[1039, 2, 0.008449479506347874, 0.42247397531739384, 0, 0, 0],
[1040, 3, 4.085784833929019e-06, 0.00020428924169645096, 2.22, 61.69, 0.004502],
[1041, 2, 0.012998987840239671, 0.6499493920119837, 0, 0, 0],
[1042, 2, 0.00335501991632689, 0.1677509958163445, 0, 0, 0],
[1043, 3, 0.00038423431443050963, 0.019211715721525482, 2.22, 61.69, 0.004502],
[1044, 3, 0.0023022419250361527, 0.11511209625180763, 2.22, 61.69, 0.004502],
[1045, 2, 0.003936615026511589, 0.19683075132557948, 0, 0, 0],
[1046, 2, 0.006045611128115316, 0.30228055640576584, 0, 0, 0],
[1047, 3, 0.0008294889076348922, 0.04147444538174461, 2.22, 61.69, 0.004502],
[1048, 2, 0.00445182315071625, 0.22259115753581254, 0, 0, 0],
[1049, 2, 0.01870104799381521, 0.9350523996907605, 0, 0, 0],
[1050, 2, 0.0033601814151550304, 0.1680090707577515, 0, 0, 0],
[1051, 2, 0.019380601737792977, 0.969030086889649, 0, 0, 0],
[1052, 3, 0.001315809692296204, 0.06579048461481019, 2.22, 61.69, 0.004502],
[1053, 3, 0.001042024786453249, 0.05210123932266245, 2.22, 61.69, 0.004502],
[1054, 2, 0.017434200209443074, 0.8717100104721537, 0, 0, 0],
[1055, 3, 0.0001818229987415119, 0.009091149937075596, 2.22, 61.69, 0.004502],
[1056, 2, 0.0384482661909012, 1.9224133095450602, 0, 0, 0],
[1057, 2, 0.02718238967557453, 1.3591194837787268, 0, 0, 0],
[1058, 2, 0.06721018861714274, 3.3605094308571375, 0, 0, 0],
[1059, 2, 0.02641152929543176, 1.320576464771588, 0, 0, 0],
[1060, 3, 0.0006590053340983933, 0.03295026670491967, 2.22, 61.69, 0.004502],
[1061, 2, 0.010304492946979937, 0.5152246473489969, 0, 0, 0],
[1062, 3, 0.00018325491392786168, 0.009162745696393085, 2.22, 61.69, 0.004502],
[1063, 3, 0.0005520076745724519, 0.0276003837286226, 2.22, 61.69, 0.004502],
[1064, 2, 0.013355424896304362, 0.667771244815218, 0, 0, 0],
[1065, 2, 0.021608252882636087, 1.0804126441318045, 0, 0, 0],
[1066, 2, 0.008556107291276397, 0.4278053645638199, 0, 0, 0],
[1067, 3, 0.002000933756260183, 0.10004668781300916, 2.22, 61.69, 0.004502],
[1068, 3, 0.0003188842576981683, 0.015944212884908417, 2.22, 61.69, 0.004502],
[1069, 3, 0.00020313001706596343, 0.010156500853298172, 2.22, 61.69, 0.004502],
[1070, 3, 5.020379247175116e-05, 0.0025101896235875582, 2.22, 61.69, 0.004502],
[1071, 3, 0.0002755733400308117, 0.013778667001540588, 2.22, 61.69, 0.004502],
[1072, 2, 0.007168748144119091, 0.3584374072059546, 0, 0, 0],
[1073, 2, 0.004954025493475761, 0.24770127467378808, 0, 0, 0],
[1074, 2, 0.009778033156939965, 0.48890165784699824, 0, 0, 0],
[1075, 3, 0.0010048055180333312, 0.05024027590166657, 2.22, 61.69, 0.004502],
[1076, 3, 0.00014613668285460223, 0.007306834142730112, 2.22, 61.69, 0.004502],
[1077, 3, 0.0016628534246063698, 0.08314267123031849, 2.22, 61.69, 0.004502],
[1078, 3, 0.0021908153060440304, 0.10954076530220153, 2.22, 61.69, 0.004502],
[1079, 2, 0.004604543003215469, 0.23022715016077344, 0, 0, 0],
[1080, 2, 0.008412929217414397, 0.4206464608707199, 0, 0, 0],
[1081, 2, 0.025823979083824652, 1.2911989541912325, 0, 0, 0],
[1082, 2, 0.03247105626963941, 1.623552813481971, 0, 0, 0],
[1083, 2, 0.04034141649573272, 2.017070824786636, 0, 0, 0],
[1084, 2, 0.0383703068502718, 1.9185153425135901, 0, 0, 0],
[1085, 2, 0.007239283505967098, 0.3619641752983549, 0, 0, 0],
[1086, 2, 0.01436208920263519, 0.7181044601317595, 0, 0, 0],
[1087, 2, 0.007427186304799236, 0.3713593152399618, 0, 0, 0],
[1088, 3, 0.0023416461987310717, 0.11708230993655358, 2.22, 61.69, 0.004502],
[1089, 2, 0.024474821190373128, 1.2237410595186564, 0, 0, 0],
[1090, 2, 0.005674885746854652, 0.2837442873427326, 0, 0, 0],
[1091, 3, 0.0025559246387118852, 0.12779623193559428, 2.22, 61.69, 0.004502],
[1092, 2, 0.0022614569222204907, 0.11307284611102454, 0, 0, 0],
[1093, 2, 0.005405735887485864, 0.2702867943742932, 0, 0, 0],
[1096, 2, 0.0032869739467971857, 0.16434869733985927, 0, 0, 0],
[1097, 3, 0.00017300345148886943, 0.008650172574443471, 2.22, 61.69, 0.004502],
[1098, 2, 0.003289044333560044, 0.1644522166780022, 0, 0, 0],
[1099, 2, 0.017502038182814306, 0.8751019091407154, 0, 0, 0],
[1100, 3, 1.2394935240118277e-06, 6.19746762005914e-05, 2.22, 61.69, 0.004502],
[1101, 2, 0.005343192104787693, 0.2671596052393847, 0, 0, 0],
[1102, 2, 0.02234407998394998, 1.1172039991974991, 0, 0, 0],
[1103, 2, 0.01562148424141561, 0.7810742120707805, 0, 0, 0],
[1105, 3, 5.553489395638779e-05, 0.0027767446978193898, 2.22, 61.69, 0.004502],
[1106, 3, 5.824860207634129e-05, 0.0029124301038170645, 2.22, 61.69, 0.004502],
[1107, 2, 0.0030626723973069554, 0.15313361986534774, 0, 0, 0],
[1108, 2, 0.02039874588539438, 1.019937294269719, 0, 0, 0],
[1109, 3, 2.0410230979817453e-05, 0.0010205115489908725, 2.22, 61.69, 0.004502],
[1110, 3, 4.209100319936101e-05, 0.0021045501599680503, 2.22, 61.69, 0.004502],
[1111, 2, 0.004130994840039845, 0.20654974200199225, 0, 0, 0],
[1113, 3, 8.967736039222342e-05, 0.004483868019611171, 2.22, 61.69, 0.004502],
[1114, 3, 0.0008287580610983356, 0.04143790305491678, 2.22, 61.69, 0.004502],
[1115, 2, 0.0012846199411427445, 0.06423099705713722, 0, 0, 0],
[1116, 3, 0.0008266680607579276, 0.04133340303789638, 2.22, 61.69, 0.004502],
[1117, 2, 0.002423390125278668, 0.12116950626393344, 0, 0, 0],
[1118, 3, 0.0002364061774524349, 0.011820308872621746, 2.22, 61.69, 0.004502],
[1119, 3, 0.001103839988378201, 0.05519199941891006, 2.22, 61.69, 0.004502],
[1120, 3, 6.167750655223761e-05, 0.0030838753276118814, 2.22, 61.69, 0.004502],
[1121, 3, 1.3755046233043984e-05, 0.0006877523116521993, 2.22, 61.69, 0.004502],
[1122, 3, 3.7205183102116836e-05, 0.0018602591551058418, 2.22, 61.69, 0.004502],
[1123, 3, 3.718482927877816e-05, 0.001859241463938908, 2.22, 61.69, 0.004502],
[1124, 3, 3.2767805859797654e-05, 0.0016383902929898828, 2.22, 61.69, 0.004502],
[1125, 3, 0.0007768493279403406, 0.038842466397017036, 2.22, 61.69, 0.004502],
[1126, 3, 0.0008993573657867038, 0.04496786828933519, 2.22, 61.69, 0.004502],
[1127, 2, 0.002692639158359382, 0.13463195791796911, 0, 0, 0],
[1128, 3, 7.798648051461309e-05, 0.0038993240257306546, 2.22, 61.69, 0.004502],
[1129, 3, 0.00012067336277826449, 0.006033668138913225, 2.22, 61.69, 0.004502],
[1130, 3, 2.6018013552869856e-05, 0.0013009006776434928, 2.22, 61.69, 0.004502],
[1131, 3, 7.376731283474909e-05, 0.0036883656417374547, 2.22, 61.69, 0.004502],
[1133, 3, 1.8309816678670237e-05, 0.000915490833933512, 2.22, 61.69, 0.004502],
[1134, 3, 1.2937356389347597e-05, 0.0006468678194673798, 2.22, 61.69, 0.004502],
[1135, 3, 0.0002090133345259136, 0.01045066672629568, 2.22, 61.69, 0.004502],
[1136, 3, 1.0239317808798805e-05, 0.0005119658904399403, 2.22, 61.69, 0.004502],
[1137, 3, 0.00010517941277154545, 0.005258970638577273, 2.22, 61.69, 0.004502],
[1138, 3, 3.202927158114444e-05, 0.0016014635790572223, 2.22, 61.69, 0.004502],
[1139, 3, 0.000502422140661582, 0.0251211070330791, 2.22, 61.69, 0.004502],
[1140, 3, 0.0014920849297188569, 0.07460424648594284, 2.22, 61.69, 0.004502],
[1142, 3, 3.108855958207156e-05, 0.001554427979103578, 2.22, 61.69, 0.004502],
[1143, 3, 0.0007010706467170471, 0.03505353233585236, 2.22, 61.69, 0.004502],
[1144, 2, 0.0013348659944216786, 0.06674329972108395, 0, 0, 0],
[1145, 2, 0.011197481443497569, 0.5598740721748785, 0, 0, 0],
[1146, 3, 2.1915822140241895e-05, 0.0010957911070120948, 2.22, 61.69, 0.004502],
[1147, 3, 0.0011597195411981833, 0.05798597705990917, 2.22, 61.69, 0.004502],
[1148, 3, 0.000530075604509743, 0.026503780225487154, 2.22, 61.69, 0.004502],
[1149, 3, 0.00023332074897085096, 0.011666037448542547, 2.22, 61.69, 0.004502],
[1150, 3, 9.434708716193637e-05, 0.004717354358096819, 2.22, 61.69, 0.004502],
[1151, 3, 0.00033266619332396894, 0.01663330966619845, 2.22, 61.69, 0.004502],
[1152, 3, 2.968290590764656e-06, 0.00014841452953823282, 2.22, 61.69, 0.004502],
[1155, 3, 1.5547398540825696e-05, 0.0007773699270412849, 2.22, 61.69, 0.004502],
[1157, 3, 0.00011110922316080263, 0.005555461158040131, 2.22, 61.69, 0.004502],
[1160, 2, 0.015175599618213626, 0.7587799809106813, 0, 0, 0],
[1161, 3, 0.0010857043774739259, 0.054285218873696306, 2.22, 61.69, 0.004502],
[1162, 2, 0.031984361657767045, 1.5992180828883522, 0, 0, 0],
[1163, 2, 0.021010485834812704, 1.0505242917406352, 0, 0, 0],
[1164, 2, 0.018183478445661972, 0.9091739222830987, 0, 0, 0],
[1165, 2, 0.003640738012495192, 0.18203690062475963, 0, 0, 0],
[1166, 2, 0.005301588846150501, 0.26507944230752506, 0, 0, 0],
[1168, 3, 3.419450196278286e-05, 0.0017097250981391431, 2.22, 61.69, 0.004502],
[1169, 3, 6.93880139226225e-05, 0.003469400696131125, 2.22, 61.69, 0.004502],
[1171, 3, 0.0005748603194505088, 0.02874301597252544, 2.22, 61.69, 0.004502],
[1172, 3, 0.00020447436337759674, 0.010223718168879837, 2.22, 61.69, 0.004502],
[1173, 2, 0.01618626952698487, 0.8093134763492436, 0, 0, 0],
[1175, 3, 2.1782391725402467e-05, 0.0010891195862701233, 2.22, 61.69, 0.004502],
[1176, 3, 5.923360885186837e-06, 0.0002961680442593419, 2.22, 61.69, 0.004502],
[1177, 3, 0.0007213874875701519, 0.036069374378507595, 2.22, 61.69, 0.004502],
[1178, 3, 0.00010205808100824817, 0.005102904050412409, 2.22, 61.69, 0.004502],
[1179, 3, 3.44925871051151e-05, 0.0017246293552557552, 2.22, 61.69, 0.004502],
[1181, 2, 0.004495779034217764, 0.2247889517108882, 0, 0, 0],
[1182, 2, 0.0037840530757545184, 0.1892026537877259, 0, 0, 0],
[1183, 3, 0.00109035926940026, 0.054517963470013, 2.22, 61.69, 0.004502],
[1184, 3, 0.00010790631226403063, 0.005395315613201532, 2.22, 61.69, 0.004502],
[1186, 3, 0.001498769521577056, 0.0749384760788528, 2.22, 61.69, 0.004502],
[1187, 3, 0.0002833468274902024, 0.01416734137451012, 2.22, 61.69, 0.004502],
[1188, 2, 0.011440868435801076, 0.5720434217900537, 0, 0, 0],
[1189, 3, 0.001289906586581014, 0.06449532932905071, 2.22, 61.69, 0.004502],
[1190, 2, 0.01403960969000889, 0.7019804845004446, 0, 0, 0],
[1191, 2, 0.004652379906159672, 0.23261899530798363, 0, 0, 0],
[1192, 3, 0.0013658402687938922, 0.06829201343969461, 2.22, 61.69, 0.004502],
[1193, 3, 0.00015278576957249078, 0.007639288478624539, 2.22, 61.69, 0.004502],
[1194, 3, 0.0005720688022791215, 0.028603440113956075, 2.22, 61.69, 0.004502],
[1195, 3, 1.2882573563174789e-05, 0.0006441286781587394, 2.22, 61.69, 0.004502],
[1196, 2, 0.010230349597894291, 0.5115174798947145, 0, 0, 0],
[1197, 2, 0.005767282789943071, 0.2883641394971536, 0, 0, 0],
[1198, 3, 0.002534966273924786, 0.12674831369623932, 2.22, 61.69, 0.004502],
[1199, 2, 0.012822920004466005, 0.6411460002233003, 0, 0, 0],
[1200, 2, 0.003512885294685969, 0.17564426473429848, 0, 0, 0],
[1201, 3, 0.0016021597716395785, 0.08010798858197893, 2.22, 61.69, 0.004502],
[1202, 3, 0.0031762475555186724, 0.15881237777593363, 2.22, 61.69, 0.004502],
[1203, 2, 0.011626157559117188, 0.5813078779558594, 0, 0, 0],
[1204, 3, 0.0030266063343556363, 0.15133031671778183, 2.22, 61.69, 0.004502],
[1205, 3, 3.4940417699210975e-05, 0.0017470208849605492, 2.22, 61.69, 0.004502],
[1206, 3, 0.00024235441128435216, 0.012117720564217609, 2.22, 61.69, 0.004502],
[1207, 3, 0.00022762038155293296, 0.011381019077646649, 2.22, 61.69, 0.004502],
[1208, 3, 0.0001427321512302434, 0.007136607561512171, 2.22, 61.69, 0.004502],
[1209, 3, 3.712569506330662e-05, 0.0018562847531653312, 2.22, 61.69, 0.004502],
[1210, 3, 0.00030747517943711223, 0.015373758971855613, 2.22, 61.69, 0.004502],
[1211, 3, 0.0011462484513341364, 0.057312422566706815, 2.22, 61.69, 0.004502],
[1212, 2, 0.005804182676892941, 0.290209133844647, 0, 0, 0],
[1213, 2, 0.0036505499187602444, 0.18252749593801224, 0, 0, 0],
[1214, 3, 0.0002868549194435664, 0.014342745972178321, 2.22, 61.69, 0.004502],
[1215, 3, 0.00014342822681200328, 0.0071714113406001635, 2.22, 61.69, 0.004502],
[1216, 2, 0.00431338348440427, 0.21566917422021353, 0, 0, 0],
[1217, 3, 0.0022836580531031417, 0.11418290265515707, 2.22, 61.69, 0.004502],
[1218, 3, 6.241945072080783e-05, 0.003120972536040392, 2.22, 61.69, 0.004502],
[1219, 3, 0.00038380486709714475, 0.01919024335485724, 2.22, 61.69, 0.004502],
[1220, 3, 0.0011850020268110609, 0.05925010134055305, 2.22, 61.69, 0.004502],
[1221, 2, 0.0377662225422596, 1.88831112711298, 0, 0, 0],
[1222, 2, 0.013436354905899806, 0.6718177452949904, 0, 0, 0],
[1223, 3, 0.00024230393037435297, 0.01211519651871765, 2.22, 61.69, 0.004502],
[1224, 2, 0.010219261097938644, 0.5109630548969322, 0, 0, 0],
[1225, 3, 0.0022238071565315737, 0.1111903578265787, 2.22, 61.69, 0.004502],
[1226, 3, 0.0002535566380389208, 0.012677831901946041, 2.22, 61.69, 0.004502],
[1227, 3, 0.0011129900410750567, 0.05564950205375283, 2.22, 61.69, 0.004502],
[1228, 3, 0.00019234621639044032, 0.009617310819522017, 2.22, 61.69, 0.004502],
[1229, 2, 0.0030085590951324306, 0.15042795475662155, 0, 0, 0],
[1230, 3, 8.1951485973486e-05, 0.0040975742986743, 2.22, 61.69, 0.004502],
[1231, 3, 0.00154847626324508, 0.077423813162254, 2.22, 61.69, 0.004502],
[1232, 2, 0.003813185361664286, 0.19065926808321432, 0, 0, 0],
[1233, 2, 0.03662908231521014, 1.831454115760507, 0, 0, 0],
[1235, 3, 0.0005753349157073776, 0.028766745785368877, 2.22, 61.69, 0.004502],
[1236, 2, 0.005234608320670995, 0.26173041603354974, 0, 0, 0],
[1237, 3, 0.0008890105844342532, 0.04445052922171266, 2.22, 61.69, 0.004502],
[1238, 2, 0.012012445276594919, 0.600622263829746, 0, 0, 0],
[1239, 3, 0.0001443666373276477, 0.007218331866382386, 2.22, 61.69, 0.004502],
[1240, 2, 0.021613910382114798, 1.08069551910574, 0, 0, 0],
[1241, 2, 0.024532881090784327, 1.2266440545392163, 0, 0, 0],
[1242, 3, 0.0015615143972363894, 0.07807571986181946, 2.22, 61.69, 0.004502],
[1243, 2, 0.005289026999236673, 0.26445134996183367, 0, 0, 0],
[1244, 2, 0.020592901244747865, 1.0296450622373932, 0, 0, 0],
[1245, 3, 0.0005144458090049472, 0.025722290450247362, 2.22, 61.69, 0.004502],
[1246, 2, 0.003636870278584459, 0.18184351392922293, 0, 0, 0],
[1247, 3, 0.0013899571448864774, 0.06949785724432388, 2.22, 61.69, 0.004502],
[1248, 2, 0.004047804296417853, 0.2023902148208927, 0, 0, 0],
[1249, 2, 0.004846915908139961, 0.24234579540699805, 0, 0, 0],
[1250, 3, 0.0019627317861894665, 0.09813658930947333, 2.22, 61.69, 0.004502],
[1251, 3, 0.0014899668826355728, 0.07449834413177864, 2.22, 61.69, 0.004502],
[1252, 3, 0.0009477821555247328, 0.047389107776236644, 2.22, 61.69, 0.004502],
[1253, 2, 0.004106369053307717, 0.20531845266538587, 0, 0, 0],
[1254, 2, 0.005238024431161238, 0.2619012215580619, 0, 0, 0],
[1255, 3, 0.0002430881191708174, 0.01215440595854087, 2.22, 61.69, 0.004502],
[1256, 3, 0.0009607764830526361, 0.048038824152631804, 2.22, 61.69, 0.004502],
[1257, 2, 0.005662916214121937, 0.28314581070609685, 0, 0, 0],
[1258, 2, 0.014991588973313675, 0.7495794486656838, 0, 0, 0],
[1259, 2, 0.00695753592752513, 0.34787679637625657, 0, 0, 0],
[1260, 3, 0.0012839803779623614, 0.06419901889811806, 2.22, 61.69, 0.004502],
[1261, 2, 0.012840592447306919, 0.6420296223653459, 0, 0, 0],
[1262, 3, 3.3365758929065435e-05, 0.0016682879464532717, 2.22, 61.69, 0.004502],
[1263, 3, 2.243579925674327e-05, 0.0011217899628371635, 2.22, 61.69, 0.004502],
[1264, 2, 0.005222533303161435, 0.2611266651580718, 0, 0, 0],
[1265, 3, 0.0004236530619172327, 0.021182653095861634, 2.22, 61.69, 0.004502],
[1266, 2, 0.007621029313600565, 0.38105146568002835, 0, 0, 0],
[1267, 3, 0.002512674942558201, 0.12563374712791006, 2.22, 61.69, 0.004502],
[1268, 3, 0.0002183287451274897, 0.010916437256374485, 2.22, 61.69, 0.004502],
[1269, 3, 0.0003250471975980552, 0.01625235987990276, 2.22, 61.69, 0.004502],
[1270, 3, 0.0024796665722395645, 0.12398332861197821, 2.22, 61.69, 0.004502],
[1271, 3, 0.0030157819134425234, 0.15078909567212617, 2.22, 61.69, 0.004502],
[1272, 3, 7.840992648188318e-05, 0.003920496324094159, 2.22, 61.69, 0.004502],
[1273, 3, 9.236768632941541e-05, 0.00461838431647077, 2.22, 61.69, 0.004502],
[1274, 2, 0.0033801727100761705, 0.1690086355038085, 0, 0, 0],
[1275, 2, 0.006307329492962109, 0.3153664746481055, 0, 0, 0],
[1276, 3, 0.001633288835647369, 0.08166444178236844, 2.22, 61.69, 0.004502],
[1277, 2, 0.004176942042758357, 0.20884710213791788, 0, 0, 0],
[1278, 2, 0.010850406134369231, 0.5425203067184615, 0, 0, 0],
[1279, 3, 1.2957727984992993e-07, 6.478863992496497e-06, 2.22, 61.69, 0.004502],
[1280, 3, 2.5822901719599235e-05, 0.001291145085979962, 2.22, 61.69, 0.004502],
[1281, 3, 0.00013291594727662026, 0.006645797363831013, 2.22, 61.69, 0.004502],
[1282, 3, 0.00021130763141584551, 0.010565381570792277, 2.22, 61.69, 0.004502],
[1283, 2, 0.08261824948992594, 4.130912474496298, 0, 0, 0],
[1284, 3, 0.0018096758437742202, 0.09048379218871101, 2.22, 61.69, 0.004502],
[1285, 3, 0.0001399477244734882, 0.006997386223674409, 2.22, 61.69, 0.004502],
[1286, 3, 0.0011377796471657795, 0.05688898235828898, 2.22, 61.69, 0.004502],
[1287, 2, 0.005933272587501368, 0.29666362937506835, 0, 0, 0],
[1288, 2, 0.00944760882155904, 0.472380441077952, 0, 0, 0],
[1289, 2, 0.011723304434111076, 0.5861652217055537, 0, 0, 0],
[1290, 3, 0.0003120693634598793, 0.015603468172993969, 2.22, 61.69, 0.004502],
[1291, 2, 0.0062575490505418305, 0.31287745252709154, 0, 0, 0],
[1292, 3, 0.002653563231501149, 0.13267816157505744, 2.22, 61.69, 0.004502],
[1293, 3, 0.00015292290721046804, 0.007646145360523402, 2.22, 61.69, 0.004502],
[1294, 3, 0.0003436110439431119, 0.017180552197155596, 2.22, 61.69, 0.004502],
[1295, 3, 0.00037392918854889465, 0.01869645942744473, 2.22, 61.69, 0.004502],
[1296, 3, 0.0017415681822428924, 0.08707840911214464, 2.22, 61.69, 0.004502],
[1297, 2, 0.011317746197608284, 0.5658873098804141, 0, 0, 0],
[1298, 3, 0.00025557758136610396, 0.0127788790683052, 2.22, 61.69, 0.004502],
[1299, 3, 0.00013739570556443013, 0.006869785278221508, 2.22, 61.69, 0.004502],
[1300, 3, 0.001511593201166196, 0.07557966005830981, 2.22, 61.69, 0.004502],
[1301, 2, 0.0038746782543149596, 0.193733912715748, 0, 0, 0],
[1302, 3, 0.0003104985267932093, 0.015524926339660468, 2.22, 61.69, 0.004502],
[1303, 3, 0.00027600750632746427, 0.013800375316373212, 2.22, 61.69, 0.004502],
[1304, 3, 0.000610793340517708, 0.030539667025885397, 2.22, 61.69, 0.004502],
[1305, 3, 2.9075695387122924e-07, 1.4537847693561463e-05, 2.22, 61.69, 0.004502],
[1306, 3, 4.785298727192918e-05, 0.002392649363596459, 2.22, 61.69, 0.004502],
[1307, 3, 7.607863985215967e-06, 0.0003803931992607984, 2.22, 61.69, 0.004502],
[1308, 3, 0.00020870441847665842, 0.010435220923832922, 2.22, 61.69, 0.004502],
[1309, 3, 0.0002132096944766602, 0.01066048472383301, 2.22, 61.69, 0.004502],
[1310, 3, 0.00010478060392325507, 0.005239030196162754, 2.22, 61.69, 0.004502],
[1311, 3, 0.00042867578463455237, 0.02143378923172762, 2.22, 61.69, 0.004502],
[1312, 2, 0.016696303623916272, 0.8348151811958137, 0, 0, 0],
[1313, 3, 0.0019631283227609974, 0.09815641613804986, 2.22, 61.69, 0.004502],
[1314, 3, 0.0007641975650906521, 0.038209878254532606, 2.22, 61.69, 0.004502],
[1315, 3, 0.0005015944131679134, 0.02507972065839567, 2.22, 61.69, 0.004502],
[1316, 3, 0.00012376478287903607, 0.006188239143951804, 2.22, 61.69, 0.004502],
[1317, 3, 0.0009711351173103039, 0.048556755865515194, 2.22, 61.69, 0.004502],
[1318, 3, 0.00012454395408676328, 0.0062271977043381645, 2.22, 61.69, 0.004502],
[1319, 3, 0.001127343871228203, 0.05636719356141015, 2.22, 61.69, 0.004502],
[1320, 3, 0.0013215329138219017, 0.06607664569109509, 2.22, 61.69, 0.004502],
[1321, 3, 1.025741798764967e-05, 0.0005128708993824835, 2.22, 61.69, 0.004502],
[1322, 3, 5.919056262068799e-05, 0.0029595281310344, 2.22, 61.69, 0.004502],
[1323, 2, 0.012675857799799822, 0.6337928899899912, 0, 0, 0],
[1324, 3, 0.0008316328586631403, 0.04158164293315702, 2.22, 61.69, 0.004502],
[1325, 2, 0.0057612535388438385, 0.2880626769421919, 0, 0, 0],
[1326, 2, 0.0036242041289439157, 0.1812102064471958, 0, 0, 0],
[1327, 2, 0.0032338308031027566, 0.16169154015513784, 0, 0, 0],
[1328, 3, 0.0010226241895011407, 0.05113120947505704, 2.22, 61.69, 0.004502],
[1329, 2, 0.013921309839652627, 0.6960654919826315, 0, 0, 0],
[1330, 3, 0.0019182008434651947, 0.09591004217325974, 2.22, 61.69, 0.004502],
[1332, 3, 0.0016738699394560756, 0.08369349697280379, 2.22, 61.69, 0.004502],
[1333, 3, 0.0029061854047842247, 0.14530927023921122, 2.22, 61.69, 0.004502],
[1334, 3, 5.136054459913027e-05, 0.0025680272299565135, 2.22, 61.69, 0.004502],
[1335, 3, 0.00021052629514022267, 0.010526314757011134, 2.22, 61.69, 0.004502],
[1336, 3, 0.0018954102795459078, 0.0947705139772954, 2.22, 61.69, 0.004502],
[1337, 2, 0.006020338798098282, 0.3010169399049141, 0, 0, 0],
[1338, 3, 5.300015004820578e-05, 0.0026500075024102894, 2.22, 61.69, 0.004502],
[1339, 3, 0.0006421253879349708, 0.032106269396748544, 2.22, 61.69, 0.004502],
[1340, 2, 0.003355330861775994, 0.1677665430887997, 0, 0, 0],
[1341, 2, 0.010682483732650976, 0.5341241866325488, 0, 0, 0],
[1342, 3, 2.101043175532592e-05, 0.0010505215877662961, 2.22, 61.69, 0.004502],
[1343, 3, 3.130239915703848e-05, 0.0015651199578519243, 2.22, 61.69, 0.004502],
[1344, 3, 1.4391232894862565e-05, 0.0007195616447431282, 2.22, 61.69, 0.004502],
[1345, 3, 0.00025281368060892654, 0.012640684030446329, 2.22, 61.69, 0.004502],
[1346, 2, 0.013669449762218379, 0.6834724881109189, 0, 0, 0],
[1347, 2, 0.02636344185792537, 1.3181720928962688, 0, 0, 0],
[1348, 3, 0.0014456315404578254, 0.07228157702289127, 2.22, 61.69, 0.004502],
[1349, 3, 0.002610949541382524, 0.13054747706912617, 2.22, 61.69, 0.004502],
[1350, 3, 3.859851934953823e-06, 0.00019299259674769115, 2.22, 61.69, 0.004502],
[1351, 3, 4.5085071524642273e-07, 2.2542535762321137e-05, 2.22, 61.69, 0.004502],
[1352, 3, 2.5677954031977487e-05, 0.0012838977015988745, 2.22, 61.69, 0.004502],
[1355, 3, 0.0001074820707981226, 0.005374103539906131, 2.22, 61.69, 0.004502],
[1356, 2, 0.004678278776831856, 0.23391393884159278, 0, 0, 0],
[1357, 2, 0.003594349677217709, 0.17971748386088549, 0, 0, 0],
[1358, 3, 1.57431431082847e-05, 0.0007871571554142351, 2.22, 61.69, 0.004502],
[1359, 2, 0.004496673943395517, 0.22483369716977586, 0, 0, 0],
[1363, 3, 1.5265322222078787e-06, 7.632661111039394e-05, 2.22, 61.69, 0.004502],
[1364, 3, 2.8687227851091924e-06, 0.0001434361392554596, 2.22, 61.69, 0.004502],
[1365, 3, 2.1560465484574657e-08, 1.078023274228733e-06, 2.22, 61.69, 0.004502],
[1366, 3, 7.830373844390861e-05, 0.003915186922195431, 2.22, 61.69, 0.004502],
[1367, 3, 0.0027735977386081564, 0.1386798869304078, 2.22, 61.69, 0.004502],
[1368, 3, 0.0001048661049437223, 0.0052433052471861155, 2.22, 61.69, 0.004502],
[1369, 3, 0.0005073133310147165, 0.025365666550735824, 2.22, 61.69, 0.004502],
[1370, 3, 2.185563890765493e-05, 0.0010927819453827466, 2.22, 61.69, 0.004502],
[1371, 2, 0.004857683053723355, 0.24288415268616778, 0, 0, 0],
[1372, 2, 0.012284634505654547, 0.6142317252827274, 0, 0, 0],
[1373, 3, 0.0022409179594482334, 0.11204589797241167, 2.22, 61.69, 0.004502],
[1374, 2, 0.006889508467327262, 0.3444754233663631, 0, 0, 0],
[1375, 2, 0.003897629175102736, 0.1948814587551368, 0, 0, 0],
[1376, 2, 0.006830907337989802, 0.3415453668994901, 0, 0, 0],
[1377, 2, 0.01492085689824784, 0.7460428449123921, 0, 0, 0],
[1378, 2, 0.01566275025445262, 0.783137512722631, 0, 0, 0],
[1379, 3, 2.062505175023466e-05, 0.001031252587511733, 2.22, 61.69, 0.004502],
[1381, 3, 2.601825872991241e-05, 0.0013009129364956204, 2.22, 61.69, 0.004502],
[1382, 2, 0.008838822964419164, 0.4419411482209583, 0, 0, 0],
[1383, 2, 0.0069522653092041085, 0.34761326546020543, 0, 0, 0],
[1387, 3, 8.89643885212391e-05, 0.0044482194260619555, 2.22, 61.69, 0.004502],
[1390, 3, 9.505708471011321e-05, 0.004752854235505661, 2.22, 61.69, 0.004502],
[1391, 3, 1.3594941515348555e-05, 0.0006797470757674278, 2.22, 61.69, 0.004502],
[1393, 3, 3.4943392392534786e-05, 0.0017471696196267393, 2.22, 61.69, 0.004502],
[1394, 3, 2.737439864388922e-05, 0.001368719932194461, 2.22, 61.69, 0.004502],
[1395, 3, 1.9308633391493333e-06, 9.654316695746669e-05, 2.22, 61.69, 0.004502],
[1396, 3, 7.028796859200431e-07, 3.514398429600216e-05, 2.22, 61.69, 0.004502],
[1397, 3, 0.0006377592842944558, 0.03188796421472279, 2.22, 61.69, 0.004502],
[1398, 3, 7.075339318186764e-05, 0.003537669659093382, 2.22, 61.69, 0.004502],
[1399, 3, 0.0005693538555165958, 0.02846769277582979, 2.22, 61.69, 0.004502],
[1400, 3, 3.292902158897971e-05, 0.0016464510794489857, 2.22, 61.69, 0.004502],
[1401, 2, 0.0037280958540986705, 0.18640479270493354, 0, 0, 0],
[1402, 3, 0.0009460030317753202, 0.047300151588766014, 2.22, 61.69, 0.004502],
[1403, 2, 0.007617262031172502, 0.38086310155862513, 0, 0, 0],
[1404, 2, 0.008581667499251882, 0.42908337496259413, 0, 0, 0],
[1405, 3, 0.0013777254553245623, 0.06888627276622811, 2.22, 61.69, 0.004502],
[1406, 3, 0.0005951329463718105, 0.029756647318590523, 2.22, 61.69, 0.004502],
[1407, 3, 8.42762798103069e-06, 0.00042138139905153457, 2.22, 61.69, 0.004502],
[1408, 3, 0.002615151153581973, 0.13075755767909866, 2.22, 61.69, 0.004502],
[1409, 3, 0.0007652033584917757, 0.038260167924588785, 2.22, 61.69, 0.004502],
[1410, 3, 0.002385192626051519, 0.11925963130257596, 2.22, 61.69, 0.004502],
[1411, 3, 0.0025079869254713357, 0.1253993462735668, 2.22, 61.69, 0.004502],
[1412, 3, 0.0003811825487857675, 0.01905912743928838, 2.22, 61.69, 0.004502],
[1413, 3, 0.0003615867173212219, 0.018079335866061096, 2.22, 61.69, 0.004502],
[1414, 3, 0.001654733253695335, 0.08273666268476676, 2.22, 61.69, 0.004502],
[1415, 3, 0.0004745682686545623, 0.023728413432728118, 2.22, 61.69, 0.004502],
[1416, 3, 0.0005066221121186196, 0.025331105605930982, 2.22, 61.69, 0.004502],
[1417, 3, 7.324966052452151e-08, 3.662483026226075e-06, 2.22, 61.69, 0.004502],
[1418, 2, 0.005619099755523237, 0.28095498777616185, 0, 0, 0],
[1419, 3, 0.00211745485704481, 0.10587274285224049, 2.22, 61.69, 0.004502],
[1420, 3, 8.91112970779674e-05, 0.00445556485389837, 2.22, 61.69, 0.004502],
[1421, 3, 0.00044387476697737416, 0.02219373834886871, 2.22, 61.69, 0.004502],
[1422, 3, 0.00030115264331514286, 0.015057632165757144, 2.22, 61.69, 0.004502],
[1423, 3, 0.00012293234040278847, 0.006146617020139425, 2.22, 61.69, 0.004502],
[1424, 2, 0.01394783725195249, 0.6973918625976245, 0, 0, 0],
[1425, 3, 0.0013602274146640447, 0.06801137073320224, 2.22, 61.69, 0.004502],
[1426, 2, 0.004377563184547638, 0.2188781592273819, 0, 0, 0],
[1427, 2, 0.03060222784928668, 1.5301113924643341, 0, 0, 0],
[1428, 2, 0.021319488529000553, 1.0659744264500277, 0, 0, 0],
[1429, 3, 0.000845419991215321, 0.04227099956076605, 2.22, 61.69, 0.004502],
[1430, 3, 1.4103786308871584e-06, 7.051893154435792e-05, 2.22, 61.69, 0.004502],
[1431, 2, 0.014493414492796078, 0.724670724639804, 0, 0, 0],
[1432, 3, 0.0007676953741931287, 0.03838476870965644, 2.22, 61.69, 0.004502],
[1433, 2, 0.08207564315805406, 4.103782157902703, 0, 0, 0],
[1434, 2, 0.004580630870615056, 0.2290315435307528, 0, 0, 0],
[1435, 2, 0.005241557112195593, 0.2620778556097797, 0, 0, 0],
[1436, 2, 0.006266510483771511, 0.31332552418857557, 0, 0, 0],
[1437, 2, 0.015172047044780135, 0.7586023522390068, 0, 0, 0],
[1438, 2, 0.025007389641183632, 1.2503694820591817, 0, 0, 0],
[1439, 2, 0.0063091033600462575, 0.3154551680023129, 0, 0, 0],
[1440, 3, 5.306917668409132e-05, 0.0026534588342045657, 2.22, 61.69, 0.004502],
[1441, 3, 1.0923020560921105e-05, 0.0005461510280460552, 2.22, 61.69, 0.004502],
[1442, 3, 4.555157486056611e-05, 0.0022775787430283057, 2.22, 61.69, 0.004502],
[1443, 2, 0.006557506818224797, 0.3278753409112398, 0, 0, 0],
[1444, 3, 0.0005717925297728792, 0.028589626488643962, 2.22, 61.69, 0.004502],
[1445, 3, 0.0015938921576921367, 0.07969460788460683, 2.22, 61.69, 0.004502],
[1446, 2, 0.04829066125331256, 2.414533062665628, 0, 0, 0],
[1447, 2, 0.005696308888305882, 0.2848154444152941, 0, 0, 0],
[1448, 3, 0.0002813656970216781, 0.014068284851083905, 2.22, 61.69, 0.004502],
[1449, 2, 0.0029348829924128405, 0.14674414962064206, 0, 0, 0],
[1450, 2, 0.003726900047088699, 0.18634500235443496, 0, 0, 0],
[1451, 2, 0.0036467833176776375, 0.18233916588388188, 0, 0, 0],
[1452, 3, 0.0009308941175129764, 0.046544705875648816, 2.22, 61.69, 0.004502],
[1453, 2, 0.004134065549943135, 0.20670327749715672, 0, 0, 0],
[1454, 2, 0.009875666531734596, 0.49378332658672985, 0, 0, 0],
[1455, 3, 1.66950830801293e-05, 0.000834754154006465, 2.22, 61.69, 0.004502],
[1456, 2, 0.0013664683513056725, 0.06832341756528364, 0, 0, 0],
[1459, 3, 0.00013477613298625794, 0.006738806649312897, 2.22, 61.69, 0.004502],
[1460, 2, 0.0037971068076197746, 0.18985534038098878, 0, 0, 0],
[1461, 3, 0.00045503010222392685, 0.022751505111196346, 2.22, 61.69, 0.004502],
[1463, 3, 1.810231431840124e-05, 0.0009051157159200621, 2.22, 61.69, 0.004502],
[1464, 2, 0.013934601684842136, 0.6967300842421068, 0, 0, 0],
[1466, 3, 0.0001450748986048064, 0.00725374493024032, 2.22, 61.69, 0.004502],
[1467, 3, 5.434743301684746e-05, 0.0027173716508423736, 2.22, 61.69, 0.004502],
[1468, 3, 0.0006047748176593424, 0.03023874088296712, 2.22, 61.69, 0.004502],
[1469, 2, 0.003233867943910748, 0.16169339719553738, 0, 0, 0],
[1470, 2, 0.005027084884666319, 0.2513542442333159, 0, 0, 0],
[1471, 2, 0.010132763321185349, 0.5066381660592674, 0, 0, 0],
[1472, 3, 0.00036895330016970505, 0.018447665008485253, 2.22, 61.69, 0.004502],
[1473, 3, 0.00021195071858909128, 0.010597535929454565, 2.22, 61.69, 0.004502],
[1474, 3, 3.568357370609641e-05, 0.0017841786853048205, 2.22, 61.69, 0.004502],
[1475, 3, 9.952961021421813e-06, 0.0004976480510710907, 2.22, 61.69, 0.004502],
[1476, 2, 0.015946059282369706, 0.7973029641184852, 0, 0, 0],
[1477, 3, 0.0007717725169969112, 0.03858862584984556, 2.22, 61.69, 0.004502],
[1479, 3, 0.00035603636123413484, 0.01780181806170674, 2.22, 61.69, 0.004502],
[1480, 3, 0.0011893307912248102, 0.05946653956124052, 2.22, 61.69, 0.004502],
[1481, 3, 3.3833873695351113e-06, 0.00016916936847675558, 2.22, 61.69, 0.004502],
[1482, 3, 0.0011147740798471094, 0.055738703992355476, 2.22, 61.69, 0.004502],
[1483, 3, 9.504850518132428e-05, 0.004752425259066214, 2.22, 61.69, 0.004502],
[1484, 3, 9.303002951875421e-07, 4.651501475937711e-05, 2.22, 61.69, 0.004502],
[1485, 3, 1.7528399459215098e-05, 0.000876419972960755, 2.22, 61.69, 0.004502],
[1486, 3, 9.018017162430775e-05, 0.0045090085812153876, 2.22, 61.69, 0.004502],
[1487, 3, 7.276038526853737e-05, 0.0036380192634268686, 2.22, 61.69, 0.004502],
[1488, 3, 0.00022382432076245898, 0.01119121603812295, 2.22, 61.69, 0.004502],
[1489, 3, 3.0263189463062935e-06, 0.0001513159473153147, 2.22, 61.69, 0.004502],
[1490, 2, 0.04905115781427449, 2.4525578907137247, 0, 0, 0],
[1491, 2, 0.005387257187745477, 0.26936285938727383, 0, 0, 0],
[1492, 2, 0.014637639488319377, 0.7318819744159688, 0, 0, 0],
[1493, 2, 0.005319414988695112, 0.26597074943475557, 0, 0, 0],
[1494, 2, 0.0257504251653254, 1.28752125826627, 0, 0, 0],
[1495, 2, 0.004260305180484296, 0.2130152590242148, 0, 0, 0],
[1496, 3, 1.641562267503393e-08, 8.207811337516965e-07, 2.22, 61.69, 0.004502],
[1497, 2, 0.005670372667342641, 0.28351863336713207, 0, 0, 0],
[1498, 2, 0.006735488235440387, 0.3367744117720194, 0, 0, 0],
[1499, 3, 0.00014557430965896176, 0.0072787154829480885, 2.22, 61.69, 0.004502],
[1500, 3, 9.284328907409222e-06, 0.0004642164453704611, 2.22, 61.69, 0.004502],
[1501, 3, 0.00037483587777994396, 0.018741793888997202, 2.22, 61.69, 0.004502],
[1502, 3, 3.9491818320371174e-05, 0.0019745909160185583, 2.22, 61.69, 0.004502],
[1503, 3, 0.0029266803181735935, 0.14633401590867967, 2.22, 61.69, 0.004502],
[1504, 2, 0.012020835078490423, 0.6010417539245212, 0, 0, 0],
[1505, 3, 0.0017039709532498102, 0.08519854766249052, 2.22, 61.69, 0.004502],
[1506, 2, 0.0035909631390018642, 0.17954815695009319, 0, 0, 0],
[1507, 3, 0.000982816273068341, 0.04914081365341705, 2.22, 61.69, 0.004502],
[1508, 3, 4.154538017488063e-06, 0.00020772690087440316, 2.22, 61.69, 0.004502],
[1510, 2, 0.00681234986437375, 0.34061749321868756, 0, 0, 0],
[1511, 2, 0.00988173435818505, 0.4940867179092525, 0, 0, 0],
[1512, 2, 0.004082645917281524, 0.20413229586407625, 0, 0, 0],
[1513, 3, 0.001467522271804366, 0.07337611359021831, 2.22, 61.69, 0.004502],
[1514, 3, 8.434708679035484e-07, 4.217354339517742e-05, 2.22, 61.69, 0.004502],
[1516, 3, 1.8340973111507537e-06, 9.170486555753769e-05, 2.22, 61.69, 0.004502],
[1517, 3, 8.192048507877762e-05, 0.0040960242539388805, 2.22, 61.69, 0.004502],
[1518, 3, 1.7149947944714273e-05, 0.0008574973972357136, 2.22, 61.69, 0.004502],
[1519, 3, 1.1903058584033917e-06, 5.951529292016959e-05, 2.22, 61.69, 0.004502]
])
ppc["branch_switch"] = array([
[586, 1, 0 ],
[589, 108, 0 ],
[590, 108, 0 ],
[593, 112, 0 ],
[595, 115, 0 ],
[598, 118, 0 ],
[599, 119, 0 ],
[602, 121, 0 ],
[603, 526, 0 ],
[607, 127, 0 ],
[608, 127, 0 ],
[609, 529, 0 ],
[612, 493, 0 ],
[614, 130, 0 ],
[616, 132, 0 ],
[617, 133, 0 ],
[618, 133, 0 ],
[619, 134, 0 ],
[624, 14, 0 ],
[629, 145, 0 ],
[632, 145, 0 ],
[637, 148, 0 ],
[638, 149, 0 ],
[640, 153, 0 ],
[641, 155, 0 ],
[642, 533, 0 ],
[643, 534, 0 ],
[647, 536, 0 ],
[652, 167, 0 ],
[655, 170, 0 ],
[663, 178, 0 ],
[666, 180, 0 ],
[670, 183, 0 ],
[672, 185, 0 ],
[676, 19, 0 ],
[681, 197, 0 ],
[683, 200, 0 ],
[687, 202, 0 ],
[694, 21, 0 ],
[695, 210, 0 ],
[697, 211, 0 ],
[698, 212, 0 ],
[702, 215, 0 ],
[705, 217, 0 ],
[707, 219, 0 ],
[714, 225, 0 ],
[716, 226, 0 ],
[717, 227, 0 ],
[722, 545, 0 ],
[724, 238, 0 ],
[730, 547, 0 ],
[732, 247, 0 ],
[735, 253, 0 ],
[741, 264, 0 ],
[742, 264, 0 ],
[743, 500, 0 ],
[747, 273, 0 ],
[749, 274, 0 ],
[750, 557, 0 ],
[753, 28, 0 ],
[761, 288, 0 ],
[762, 289, 0 ],
[765, 560, 0 ],
[767, 292, 0 ],
[772, 3, 0 ],
[774, 300, 0 ],
[777, 300, 0 ],
[778, 300, 0 ],
[781, 303, 0 ],
[784, 563, 0 ],
[785, 501, 0 ],
[788, 311, 0 ],
[789, 565, 0 ],
[791, 314, 0 ],
[792, 316, 0 ],
[795, 319, 0 ],
[800, 326, 0 ],
[801, 327, 0 ],
[802, 327, 0 ],
[805, 328, 0 ],
[806, 328, 0 ],
[808, 329, 0 ],
[809, 329, 0 ],
[811, 568, 0 ],
[814, 570, 0 ],
[816, 335, 0 ],
[817, 571, 0 ],
[821, 338, 0 ],
[826, 339, 0 ],
[834, 572, 0 ],
[835, 572, 0 ],
[836, 572, 0 ],
[837, 350, 0 ],
[839, 350, 0 ],
[841, 573, 0 ],
[843, 352, 0 ],
[844, 352, 0 ],
[850, 574, 0 ],
[851, 575, 0 ],
[853, 362, 0 ],
[856, 363, 0 ],
[857, 365, 0 ],
[858, 368, 0 ],
[860, 371, 0 ],
[865, 375, 0 ],
[867, 376, 0 ],
[869, 503, 0 ],
[870, 503, 0 ],
[872, 378, 0 ],
[874, 576, 0 ],
[875, 381, 0 ],
[882, 388, 0 ],
[883, 388, 0 ],
[885, 393, 0 ],
[886, 394, 0 ],
[889, 397, 0 ],
[890, 40, 0 ],
[893, 400, 0 ],
[894, 400, 0 ],
[895, 580, 0 ],
[896, 581, 0 ],
[898, 403, 0 ],
[902, 405, 0 ],
[903, 406, 0 ],
[905, 413, 0 ],
[906, 414, 0 ],
[907, 583, 0 ],
[909, 417, 0 ],
[917, 43, 0 ],
[918, 424, 0 ],
[920, 428, 0 ],
[921, 428, 0 ],
[922, 429, 0 ],
[923, 432, 0 ],
[925, 44, 0 ],
[931, 439, 0 ],
[936, 445, 0 ],
[937, 447, 0 ],
[939, 450, 0 ],
[940, 451, 0 ],
[944, 458, 0 ],
[950, 462, 0 ],
[952, 47, 0 ],
[958, 478, 0 ],
[959, 478, 0 ],
[960, 479, 0 ],
[963, 481, 0 ],
[965, 49, 0 ],
[967, 49, 0 ],
[969, 486, 0 ],
[971, 51, 0 ],
[978, 491, 0 ],
[982, 62, 0 ],
[983, 62, 0 ],
[984, 63, 0 ],
[985, 63, 0 ],
[986, 64, 0 ],
[987, 65, 0 ],
[988, 66, 0 ],
[993, 67, 0 ],
[994, 67, 0 ],
[995, 509, 0 ],
[997, 510, 0 ],
[999, 70, 0 ],
[1002, 71, 0 ],
[1007, 511, 0 ],
[1010, 79, 0 ],
[1011, 79, 0 ],
[1012, 81, 0 ],
[1014, 83, 0 ],
[1027, 218, 0 ],
[1028, 221, 0 ],
[1029, 268, 0 ],
[1030, 269, 0 ],
[1031, 498, 0 ],
[1032, 1, 0 ],
[1033, 3, 0 ],
[1034, 4, 0 ],
[1035, 6, 0 ],
[1036, 7, 0 ],
[1037, 8, 0 ],
[1038, 9, 0 ],
[1039, 11, 0 ],
[1040, 14, 0 ],
[1041, 16, 0 ],
[1042, 17, 0 ],
[1043, 19, 0 ],
[1044, 21, 0 ],
[1045, 23, 0 ],
[1046, 25, 0 ],
[1047, 27, 0 ],
[1048, 28, 0 ],
[1049, 29, 0 ],
[1050, 31, 0 ],
[1051, 33, 0 ],
[1052, 34, 0 ],
[1053, 35, 0 ],
[1054, 36, 0 ],
[1055, 38, 0 ],
[1056, 39, 0 ],
[1057, 40, 0 ],
[1058, 41, 0 ],
[1059, 43, 0 ],
[1060, 44, 0 ],
[1061, 45, 0 ],
[1062, 47, 0 ],
[1063, 48, 0 ],
[1064, 49, 0 ],
[1065, 50, 0 ],
[1066, 51, 0 ],
[1067, 53, 0 ],
[1068, 54, 0 ],
[1069, 55, 0 ],
[1070, 57, 0 ],
[1071, 58, 0 ],
[1072, 59, 0 ],
[1073, 60, 0 ],
[1074, 62, 0 ],
[1075, 63, 0 ],
[1076, 64, 0 ],
[1077, 65, 0 ],
[1078, 66, 0 ],
[1079, 67, 0 ],
[1080, 70, 0 ],
[1081, 71, 0 ],
[1082, 72, 0 ],
[1083, 73, 0 ],
[1084, 75, 0 ],
[1085, 76, 0 ],
[1086, 77, 0 ],
[1087, 79, 0 ],
[1088, 80, 0 ],
[1089, 81, 0 ],
[1090, 82, 0 ],
[1091, 83, 0 ],
[1092, 84, 0 ],
[1093, 85, 0 ],
[1096, 90, 0 ],
[1097, 91, 0 ],
[1098, 92, 0 ],
[1099, 93, 0 ],
[1100, 97, 0 ],
[1101, 98, 0 ],
[1102, 101, 0 ],
[1103, 102, 0 ],
[1105, 108, 0 ],
[1106, 109, 0 ],
[1107, 110, 0 ],
[1108, 111, 0 ],
[1109, 112, 0 ],
[1110, 113, 0 ],
[1111, 114, 0 ],
[1113, 116, 0 ],
[1114, 118, 0 ],
[1115, 119, 0 ],
[1116, 121, 0 ],
[1117, 122, 0 ],
[1118, 126, 0 ],
[1119, 127, 0 ],
[1120, 130, 0 ],
[1121, 131, 0 ],
[1122, 132, 0 ],
[1123, 133, 0 ],
[1124, 134, 0 ],
[1125, 135, 0 ],
[1126, 136, 0 ],
[1127, 137, 0 ],
[1128, 139, 0 ],
[1129, 140, 0 ],
[1130, 141, 0 ],
[1131, 142, 0 ],
[1133, 145, 0 ],
[1134, 146, 0 ],
[1135, 147, 0 ],
[1136, 148, 0 ],
[1137, 149, 0 ],
[1138, 150, 0 ],
[1139, 151, 0 ],
[1140, 152, 0 ],
[1142, 154, 0 ],
[1143, 155, 0 ],
[1144, 158, 0 ],
[1145, 161, 0 ],
[1146, 162, 0 ],
[1147, 163, 0 ],
[1148, 164, 0 ],
[1149, 166, 0 ],
[1150, 167, 0 ],
[1151, 168, 0 ],
[1152, 169, 0 ],
[1155, 172, 0 ],
[1157, 174, 0 ],
[1160, 177, 0 ],
[1161, 178, 0 ],
[1162, 179, 0 ],
[1163, 180, 0 ],
[1164, 181, 0 ],
[1165, 182, 0 ],
[1166, 183, 0 ],
[1168, 186, 0 ],
[1169, 187, 0 ],
[1171, 189, 0 ],
[1172, 190, 0 ],
[1173, 192, 0 ],
[1175, 194, 0 ],
[1176, 196, 0 ],
[1177, 197, 0 ],
[1178, 198, 0 ],
[1179, 199, 0 ],
[1181, 202, 0 ],
[1182, 203, 0 ],
[1183, 204, 0 ],
[1184, 205, 0 ],
[1186, 207, 0 ],
[1187, 208, 0 ],
[1188, 209, 0 ],
[1189, 210, 0 ],
[1190, 211, 0 ],
[1191, 212, 0 ],
[1192, 213, 0 ],
[1193, 214, 0 ],
[1194, 215, 0 ],
[1195, 216, 0 ],
[1196, 217, 0 ],
[1197, 218, 0 ],
[1198, 219, 0 ],
[1199, 221, 0 ],
[1200, 222, 0 ],
[1201, 223, 0 ],
[1202, 224, 0 ],
[1203, 225, 0 ],
[1204, 226, 0 ],
[1205, 227, 0 ],
[1206, 228, 0 ],
[1207, 229, 0 ],
[1208, 230, 0 ],
[1209, 234, 0 ],
[1210, 235, 0 ],
[1211, 237, 0 ],
[1212, 238, 0 ],
[1213, 239, 0 ],
[1214, 240, 0 ],
[1215, 241, 0 ],
[1216, 242, 0 ],
[1217, 243, 0 ],
[1218, 244, 0 ],
[1219, 247, 0 ],
[1220, 251, 0 ],
[1221, 252, 0 ],
[1222, 253, 0 ],
[1223, 254, 0 ],
[1224, 255, 0 ],
[1225, 256, 0 ],
[1226, 257, 0 ],
[1227, 258, 0 ],
[1228, 260, 0 ],
[1229, 263, 0 ],
[1230, 264, 0 ],
[1231, 266, 0 ],
[1232, 267, 0 ],
[1233, 268, 0 ],
[1235, 271, 0 ],
[1236, 272, 0 ],
[1237, 273, 0 ],
[1238, 274, 0 ],
[1239, 275, 0 ],
[1240, 276, 0 ],
[1241, 278, 0 ],
[1242, 281, 0 ],
[1243, 282, 0 ],
[1244, 283, 0 ],
[1245, 284, 0 ],
[1246, 285, 0 ],
[1247, 286, 0 ],
[1248, 287, 0 ],
[1249, 288, 0 ],
[1250, 289, 0 ],
[1251, 291, 0 ],
[1252, 292, 0 ],
[1253, 293, 0 ],
[1254, 294, 0 ],
[1255, 295, 0 ],
[1256, 296, 0 ],
[1257, 297, 0 ],
[1258, 298, 0 ],
[1259, 299, 0 ],
[1260, 300, 0 ],
[1261, 302, 0 ],
[1262, 303, 0 ],
[1263, 304, 0 ],
[1264, 307, 0 ],
[1265, 308, 0 ],
[1266, 309, 0 ],
[1267, 311, 0 ],
[1268, 312, 0 ],
[1269, 314, 0 ],
[1270, 316, 0 ],
[1271, 317, 0 ],
[1272, 318, 0 ],
[1273, 319, 0 ],
[1274, 321, 0 ],
[1275, 322, 0 ],
[1276, 323, 0 ],
[1277, 324, 0 ],
[1278, 325, 0 ],
[1279, 326, 0 ],
[1280, 327, 0 ],
[1281, 328, 0 ],
[1282, 329, 0 ],
[1283, 331, 0 ],
[1284, 333, 0 ],
[1285, 335, 0 ],
[1286, 337, 0 ],
[1287, 338, 0 ],
[1288, 339, 0 ],
[1289, 340, 0 ],
[1290, 341, 0 ],
[1291, 342, 0 ],
[1292, 343, 0 ],
[1293, 344, 0 ],
[1294, 345, 0 ],
[1295, 346, 0 ],
[1296, 347, 0 ],
[1297, 348, 0 ],
[1298, 350, 0 ],
[1299, 352, 0 ],
[1300, 353, 0 ],
[1301, 354, 0 ],
[1302, 355, 0 ],
[1303, 356, 0 ],
[1304, 357, 0 ],
[1305, 359, 0 ],
[1306, 361, 0 ],
[1307, 362, 0 ],
[1308, 363, 0 ],
[1309, 364, 0 ],
[1310, 365, 0 ],
[1311, 366, 0 ],
[1312, 367, 0 ],
[1313, 368, 0 ],
[1314, 369, 0 ],
[1315, 370, 0 ],
[1316, 371, 0 ],
[1317, 372, 0 ],
[1318, 373, 0 ],
[1319, 374, 0 ],
[1320, 375, 0 ],
[1321, 376, 0 ],
[1322, 377, 0 ],
[1323, 378, 0 ],
[1324, 379, 0 ],
[1325, 381, 0 ],
[1326, 384, 0 ],
[1327, 385, 0 ],
[1328, 386, 0 ],
[1329, 387, 0 ],
[1330, 388, 0 ],
[1332, 391, 0 ],
[1333, 392, 0 ],
[1334, 393, 0 ],
[1335, 394, 0 ],
[1336, 395, 0 ],
[1337, 396, 0 ],
[1338, 397, 0 ],
[1339, 398, 0 ],
[1340, 399, 0 ],
[1341, 400, 0 ],
[1342, 403, 0 ],
[1343, 404, 0 ],
[1344, 405, 0 ],
[1345, 406, 0 ],
[1346, 407, 0 ],
[1347, 408, 0 ],
[1348, 410, 0 ],
[1349, 411, 0 ],
[1350, 412, 0 ],
[1351, 413, 0 ],
[1352, 414, 0 ],
[1355, 418, 0 ],
[1356, 419, 0 ],
[1357, 420, 0 ],
[1358, 421, 0 ],
[1359, 422, 0 ],
[1363, 426, 0 ],
[1364, 427, 0 ],
[1365, 428, 0 ],
[1366, 429, 0 ],
[1367, 430, 0 ],
[1368, 431, 0 ],
[1369, 432, 0 ],
[1370, 433, 0 ],
[1371, 434, 0 ],
[1372, 435, 0 ],
[1373, 436, 0 ],
[1374, 437, 0 ],
[1375, 438, 0 ],
[1376, 439, 0 ],
[1377, 440, 0 ],
[1378, 441, 0 ],
[1379, 442, 0 ],
[1381, 445, 0 ],
[1382, 446, 0 ],
[1383, 447, 0 ],
[1387, 451, 0 ],
[1390, 455, 0 ],
[1391, 456, 0 ],
[1393, 458, 0 ],
[1394, 459, 0 ],
[1395, 460, 0 ],
[1396, 461, 0 ],
[1397, 462, 0 ],
[1398, 463, 0 ],
[1399, 464, 0 ],
[1400, 465, 0 ],
[1401, 466, 0 ],
[1402, 467, 0 ],
[1403, 468, 0 ],
[1404, 469, 0 ],
[1405, 470, 0 ],
[1406, 471, 0 ],
[1407, 472, 0 ],
[1408, 473, 0 ],
[1409, 474, 0 ],
[1410, 475, 0 ],
[1411, 476, 0 ],
[1412, 477, 0 ],
[1413, 478, 0 ],
[1414, 479, 0 ],
[1415, 480, 0 ],
[1416, 481, 0 ],
[1417, 482, 0 ],
[1418, 483, 0 ],
[1419, 484, 0 ],
[1420, 485, 0 ],
[1421, 486, 0 ],
[1422, 487, 0 ],
[1423, 488, 0 ],
[1424, 489, 0 ],
[1425, 490, 0 ],
[1426, 491, 0 ],
[1427, 492, 0 ],
[1428, 493, 0 ],
[1429, 494, 0 ],
[1430, 495, 0 ],
[1431, 496, 0 ],
[1432, 497, 0 ],
[1433, 498, 0 ],
[1434, 499, 0 ],
[1435, 500, 0 ],
[1436, 501, 0 ],
[1437, 502, 0 ],
[1438, 503, 0 ],
[1439, 504, 0 ],
[1440, 505, 0 ],
[1441, 506, 0 ],
[1442, 507, 0 ],
[1443, 508, 0 ],
[1444, 509, 0 ],
[1445, 510, 0 ],
[1446, 511, 0 ],
[1447, 512, 0 ],
[1448, 513, 0 ],
[1449, 514, 0 ],
[1450, 515, 0 ],
[1451, 516, 0 ],
[1452, 517, 0 ],
[1453, 518, 0 ],
[1454, 519, 0 ],
[1455, 520, 0 ],
[1456, 521, 0 ],
[1459, 524, 0 ],
[1460, 525, 0 ],
[1461, 526, 0 ],
[1463, 528, 0 ],
[1464, 529, 0 ],
[1466, 531, 0 ],
[1467, 532, 0 ],
[1468, 533, 0 ],
[1469, 534, 0 ],
[1470, 535, 0 ],
[1471, 536, 0 ],
[1472, 537, 0 ],
[1473, 538, 0 ],
[1474, 539, 0 ],
[1475, 540, 0 ],
[1476, 541, 0 ],
[1477, 542, 0 ],
[1479, 544, 0 ],
[1480, 545, 0 ],
[1481, 546, 0 ],
[1482, 547, 0 ],
[1483, 548, 0 ],
[1484, 549, 0 ],
[1485, 550, 0 ],
[1486, 551, 0 ],
[1487, 552, 0 ],
[1488, 554, 0 ],
[1489, 555, 0 ],
[1490, 556, 0 ],
[1491, 557, 0 ],
[1492, 558, 0 ],
[1493, 559, 0 ],
[1494, 560, 0 ],
[1495, 561, 0 ],
[1496, 562, 0 ],
[1497, 563, 0 ],
[1498, 564, 0 ],
[1499, 565, 0 ],
[1500, 566, 0 ],
[1501, 567, 0 ],
[1502, 568, 0 ],
[1503, 569, 0 ],
[1504, 570, 0 ],
[1505, 571, 0 ],
[1506, 572, 0 ],
[1507, 573, 0 ],
[1508, 574, 0 ],
[1510, 576, 0 ],
[1511, 577, 0 ],
[1512, 578, 0 ],
[1513, 579, 0 ],
[1514, 580, 0 ],
[1516, 582, 0 ],
[1517, 583, 0 ],
[1518, 584, 0 ],
[1519, 585, 0 ],
[1, 490, 0 ],
[3, 4, 1 ],
[491, 6, 0 ],
[7, 5, 0 ],
[8, 9, 0 ],
[492, 11, 0 ],
[11, 493, 0 ],
[492, 493, 1 ],
[494, 14, 0 ],
[13, 15, 0 ],
[16, 5, 0 ],
[17, 18, 1 ],
[17, 12, 0 ],
[14, 495, 0 ],
[494, 19, 0 ],
[20, 21, 0 ],
[20, 22, 1 ],
[497, 23, 0 ],
[23, 499, 1 ],
[25, 26, 0 ],
[25, 22, 0 ],
[23, 27, 0 ],
[28, 23, 0 ],
[8, 21, 0 ],
[9, 29, 0 ],
[30, 25, 1 ],
[31, 32, 1 ],
[32, 33, 1 ],
[34, 35, 0 ],
[35, 36, 0 ],
[490, 6, 1 ],
[37, 10, 1 ],
[10, 38, 0 ],
[37, 38, 1 ],
[39, 40, 1 ],
[39, 41, 1 ],
[42, 41, 1 ],
[18, 42, 1 ],
[492, 43, 1 ],
[44, 45, 0 ],
[44, 505, 0 ],
[46, 12, 0 ],
[47, 48, 0 ],
[49, 50, 0 ],
[31, 33, 1 ],
[31, 51, 0 ],
[52, 53, 1 ],
[52, 54, 0 ],
[506, 55, 0 ],
[506, 507, 1 ],
[57, 506, 0 ],
[57, 58, 0 ],
[58, 506, 0 ],
[59, 60, 1 ],
[508, 62, 0 ],
[30, 61, 1 ],
[63, 506, 0 ],
[13, 64, 0 ],
[65, 66, 1 ],
[59, 67, 0 ],
[61, 67, 0 ],
[68, 69, 1 ],
[70, 69, 1 ],
[71, 72, 1 ],
[73, 74, 1 ],
[37, 75, 1 ],
[72, 75, 0 ],
[37, 72, 1 ],
[76, 77, 1 ],
[77, 51, 0 ],
[73, 72, 1 ],
[18, 40, 1 ],
[492, 45, 1 ],
[10, 74, 1 ],
[45, 511, 1 ],
[78, 32, 1 ],
[79, 80, 0 ],
[81, 79, 1 ],
[34, 82, 0 ],
[83, 84, 0 ],
[83, 499, 0 ],
[85, 86, 0 ],
[87, 86, 1 ],
[88, 89, 0 ],
[90, 86, 1 ],
[91, 86, 0 ],
[86, 92, 0 ],
[86, 93, 0 ],
[94, 86, 1 ],
[86, 95, 1 ],
[513, 517, 0 ],
[97, 66, 1 ],
[42, 98, 0 ],
[99, 100, 1 ],
[42, 101, 0 ],
[102, 42, 1 ],
[103, 87, 0 ],
[104, 103, 0 ],
[105, 87, 0 ],
[106, 107, 0 ],
[108, 107, 0 ],
[109, 106, 0 ],
[110, 111, 1 ],
[87, 112, 0 ],
[113, 87, 0 ],
[87, 85, 1 ],
[110, 114, 1 ],
[115, 116, 0 ],
[117, 118, 0 ],
[117, 119, 0 ],
[117, 120, 1 ],
[121, 122, 0 ],
[123, 124, 0 ],
[125, 126, 0 ],
[127, 119, 0 ],
[118, 128, 0 ],
[121, 119, 0 ],
[530, 527, 0 ],
[125, 130, 0 ],
[125, 123, 0 ],
[131, 132, 0 ],
[133, 123, 0 ],
[524, 134, 0 ],
[135, 136, 0 ],
[123, 131, 0 ],
[117, 128, 1 ],
[137, 521, 0 ],
[531, 514, 0 ],
[139, 521, 0 ],
[140, 514, 0 ],
[522, 141, 0 ],
[142, 523, 0 ],
[530, 526, 0 ],
[140, 532, 0 ],
[142, 144, 0 ],
[140, 522, 0 ],
[145, 146, 0 ],
[147, 523, 0 ],
[144, 523, 0 ],
[139, 523, 0 ],
[140, 141, 0 ],
[528, 526, 0 ],
[528, 148, 0 ],
[149, 150, 0 ],
[145, 528, 0 ],
[530, 151, 0 ],
[524, 152, 0 ],
[149, 525, 1 ],
[139, 514, 0 ],
[126, 120, 1 ],
[530, 153, 0 ],
[528, 147, 1 ],
[528, 154, 0 ],
[130, 120, 1 ],
[528, 155, 1 ],
[524, 533, 0 ],
[524, 149, 0 ],
[154, 150, 0 ],
[157, 110, 1 ],
[119, 158, 0 ],
[159, 60, 0 ],
[536, 161, 0 ],
[115, 151, 0 ],
[162, 134, 0 ],
[115, 526, 0 ],
[138, 87, 0 ],
[123, 163, 0 ],
[112, 164, 0 ],
[112, 165, 0 ],
[166, 165, 0 ],
[167, 537, 0 ],
[168, 104, 0 ],
[531, 520, 0 ],
[139, 520, 0 ],
[520, 169, 0 ],
[168, 105, 0 ],
[520, 170, 0 ],
[171, 89, 0 ],
[521, 172, 0 ],
[123, 173, 0 ],
[521, 174, 0 ],
[37, 39, 0 ],
[530, 175, 0 ],
[530, 176, 0 ],
[88, 530, 0 ],
[177, 496, 1 ],
[178, 525, 0 ],
[179, 493, 1 ],
[180, 181, 1 ],
[182, 180, 0 ],
[179, 181, 0 ],
[180, 493, 1 ],
[183, 30, 0 ],
[183, 21, 0 ],
[538, 185, 0 ],
[538, 89, 0 ],
[184, 186, 0 ],
[184, 187, 0 ],
[520, 172, 0 ],
[89, 175, 0 ],
[185, 89, 0 ],
[89, 188, 0 ],
[189, 190, 0 ],
[539, 172, 0 ],
[504, 192, 0 ],
[105, 186, 0 ],
[105, 187, 0 ],
[539, 193, 0 ],
[187, 194, 0 ],
[539, 540, 0 ],
[539, 196, 0 ],
[197, 540, 0 ],
[110, 198, 0 ],
[197, 539, 0 ],
[199, 537, 0 ],
[134, 526, 0 ],
[200, 193, 0 ],
[4, 201, 1 ],
[202, 86, 0 ],
[85, 203, 0 ],
[147, 204, 0 ],
[147, 205, 0 ],
[123, 206, 0 ],
[537, 207, 0 ],
[165, 208, 0 ],
[4, 94, 1 ],
[4, 2, 0 ],
[209, 4, 0 ],
[119, 163, 0 ],
[210, 3, 0 ],
[99, 211, 0 ],
[99, 69, 1 ],
[212, 99, 0 ],
[213, 214, 0 ],
[510, 215, 0 ],
[128, 69, 1 ],
[216, 69, 1 ],
[217, 98, 0 ],
[504, 218, 0 ],
[177, 504, 1 ],
[219, 209, 0 ],
[219, 220, 0 ],
[94, 95, 1 ],
[159, 221, 1 ],
[34, 161, 0 ],
[222, 221, 0 ],
[211, 52, 1 ],
[215, 223, 1 ],
[224, 215, 0 ],
[225, 224, 1 ],
[224, 223, 0 ],
[226, 6, 0 ],
[7, 3, 1 ],
[216, 227, 1 ],
[228, 229, 0 ],
[227, 230, 0 ],
[231, 53, 1 ],
[544, 545, 0 ],
[234, 235, 1 ],
[546, 214, 1 ],
[233, 227, 0 ],
[237, 238, 0 ],
[212, 100, 0 ],
[519, 239, 0 ],
[238, 519, 0 ],
[213, 240, 0 ],
[241, 242, 1 ],
[70, 241, 0 ],
[509, 213, 0 ],
[68, 243, 0 ],
[243, 244, 0 ],
[68, 244, 0 ],
[544, 547, 1 ],
[245, 227, 1 ],
[246, 208, 0 ],
[112, 208, 0 ],
[165, 247, 0 ],
[537, 549, 0 ],
[537, 550, 0 ],
[537, 551, 0 ],
[110, 251, 0 ],
[510, 252, 1 ],
[529, 253, 1 ],
[237, 239, 1 ],
[254, 238, 1 ],
[69, 255, 0 ],
[510, 225, 1 ],
[256, 257, 0 ],
[258, 190, 0 ],
[258, 259, 0 ],
[260, 261, 1 ],
[554, 553, 1 ],
[515, 263, 0 ],
[14, 264, 1 ],
[116, 555, 0 ],
[151, 116, 0 ],
[111, 114, 1 ],
[77, 111, 0 ],
[266, 525, 0 ],
[267, 120, 1 ],
[268, 269, 0 ],
[556, 271, 0 ],
[556, 272, 0 ],
[529, 273, 0 ],
[128, 274, 0 ],
[34, 275, 0 ],
[503, 276, 0 ],
[503, 504, 1 ],
[177, 218, 1 ],
[277, 278, 1 ],
[557, 558, 1 ],
[557, 559, 1 ],
[559, 558, 1 ],
[277, 78, 1 ],
[277, 279, 1 ],
[78, 279, 0 ],
[281, 282, 0 ],
[283, 161, 1 ],
[268, 161, 1 ],
[256, 284, 0 ],
[515, 516, 1 ],
[263, 516, 0 ],
[516, 285, 0 ],
[63, 286, 0 ],
[287, 516, 0 ],
[8, 102, 1 ],
[8, 101, 1 ],
[80, 288, 0 ],
[80, 289, 0 ],
[276, 560, 0 ],
[37, 290, 0 ],
[290, 74, 1 ],
[512, 291, 0 ],
[78, 292, 1 ],
[199, 548, 0 ],
[491, 293, 0 ],
[4, 294, 0 ],
[490, 541, 1 ],
[491, 295, 0 ],
[491, 296, 0 ],
[295, 297, 0 ],
[508, 161, 0 ],
[117, 123, 0 ],
[133, 117, 0 ],
[71, 74, 1 ],
[74, 278, 1 ],
[298, 515, 0 ],
[5, 299, 0 ],
[32, 292, 1 ],
[5, 29, 1 ],
[503, 560, 0 ],
[300, 301, 1 ],
[51, 300, 0 ],
[244, 302, 1 ],
[31, 302, 1 ],
[51, 282, 1 ],
[303, 304, 0 ],
[305, 304, 0 ],
[305, 259, 0 ],
[306, 307, 1 ],
[305, 308, 0 ],
[305, 309, 0 ],
[310, 309, 1 ],
[306, 309, 1 ],
[311, 280, 0 ],
[280, 278, 1 ],
[311, 32, 1 ],
[13, 312, 1 ],
[313, 314, 0 ],
[312, 313, 1 ],
[547, 566, 1 ],
[245, 315, 1 ],
[312, 316, 0 ],
[312, 314, 0 ],
[554, 546, 1 ],
[262, 216, 1 ],
[317, 233, 0 ],
[318, 317, 0 ],
[231, 52, 1 ],
[319, 567, 0 ],
[557, 321, 0 ],
[277, 65, 1 ],
[322, 288, 1 ],
[322, 323, 0 ],
[277, 324, 1 ],
[324, 325, 0 ],
[277, 325, 0 ],
[326, 327, 0 ],
[328, 326, 1 ],
[328, 327, 1 ],
[326, 329, 0 ],
[568, 329, 1 ],
[568, 326, 0 ],
[332, 78, 1 ],
[333, 306, 0 ],
[332, 333, 0 ],
[332, 334, 0 ],
[66, 334, 1 ],
[330, 335, 1 ],
[336, 66, 0 ],
[330, 336, 1 ],
[68, 70, 0 ],
[509, 337, 1 ],
[324, 288, 0 ],
[338, 559, 0 ],
[339, 559, 0 ],
[339, 340, 1 ],
[559, 340, 1 ],
[341, 292, 0 ],
[557, 342, 0 ],
[558, 343, 0 ],
[502, 340, 1 ],
[72, 32, 1 ],
[344, 345, 0 ],
[346, 47, 0 ],
[46, 47, 0 ],
[346, 345, 0 ],
[347, 328, 0 ],
[347, 348, 1 ],
[571, 348, 1 ],
[347, 572, 0 ],
[571, 570, 1 ],
[14, 350, 0 ],
[350, 573, 0 ],
[15, 351, 1 ],
[352, 15, 0 ],
[15, 335, 1 ],
[232, 227, 0 ],
[565, 544, 1 ],
[235, 567, 1 ],
[567, 286, 0 ],
[353, 519, 0 ],
[354, 353, 0 ],
[355, 354, 0 ],
[354, 356, 0 ],
[357, 358, 0 ],
[574, 359, 0 ],
[235, 575, 0 ],
[167, 361, 0 ],
[528, 362, 0 ],
[363, 344, 0 ],
[259, 364, 1 ],
[54, 56, 0 ],
[365, 364, 0 ],
[231, 366, 0 ],
[30, 367, 0 ],
[61, 367, 1 ],
[254, 368, 0 ],
[254, 369, 0 ],
[254, 370, 0 ],
[99, 358, 0 ],
[354, 519, 0 ],
[571, 371, 0 ],
[207, 372, 0 ],
[57, 373, 0 ],
[209, 374, 0 ],
[375, 376, 0 ],
[376, 377, 0 ],
[16, 49, 0 ],
[318, 377, 0 ],
[378, 297, 0 ],
[562, 379, 0 ],
[576, 563, 0 ],
[576, 381, 0 ],
[577, 576, 1 ],
[244, 383, 0 ],
[244, 306, 1 ],
[383, 306, 1 ],
[380, 306, 0 ],
[252, 225, 0 ],
[220, 76, 0 ],
[542, 384, 0 ],
[385, 384, 0 ],
[542, 385, 0 ],
[386, 385, 0 ],
[387, 578, 0 ],
[332, 388, 1 ],
[382, 332, 1 ],
[382, 388, 0 ],
[579, 578, 0 ],
[577, 387, 1 ],
[144, 390, 0 ],
[37, 49, 0 ],
[391, 233, 0 ],
[392, 310, 0 ],
[260, 393, 0 ],
[394, 230, 0 ],
[395, 282, 1 ],
[395, 244, 0 ],
[25, 396, 1 ],
[81, 74, 0 ],
[278, 80, 1 ],
[81, 278, 1 ],
[569, 570, 0 ],
[397, 552, 0 ],
[542, 398, 0 ],
[398, 385, 0 ],
[399, 499, 0 ],
[83, 399, 0 ],
[498, 400, 0 ],
[518, 239, 1 ],
[575, 543, 0 ],
[401, 360, 0 ],
[580, 581, 0 ],
[401, 402, 0 ],
[403, 231, 0 ],
[189, 360, 1 ],
[234, 404, 0 ],
[235, 404, 1 ],
[235, 580, 0 ],
[216, 259, 0 ],
[405, 259, 0 ],
[405, 318, 0 ],
[406, 230, 0 ],
[542, 407, 0 ],
[23, 408, 0 ],
[577, 348, 0 ],
[562, 564, 1 ],
[582, 507, 0 ],
[27, 410, 0 ],
[501, 27, 0 ],
[27, 411, 0 ],
[411, 410, 0 ],
[403, 360, 0 ],
[412, 360, 0 ],
[326, 413, 0 ],
[414, 413, 0 ],
[6, 297, 0 ],
[554, 580, 1 ],
[262, 401, 1 ],
[499, 556, 1 ],
[224, 229, 0 ],
[583, 507, 0 ],
[415, 307, 0 ],
[416, 507, 0 ],
[284, 561, 0 ],
[543, 417, 0 ],
[418, 506, 0 ],
[220, 157, 0 ],
[295, 419, 0 ],
[295, 420, 0 ],
[541, 62, 0 ],
[52, 421, 0 ],
[60, 160, 0 ],
[535, 161, 0 ],
[267, 282, 0 ],
[52, 365, 0 ],
[28, 27, 0 ],
[30, 201, 1 ],
[422, 81, 0 ],
[119, 425, 0 ],
[423, 425, 0 ],
[424, 425, 0 ],
[426, 428, 0 ],
[427, 428, 0 ],
[19, 428, 1 ],
[45, 429, 0 ],
[44, 429, 0 ],
[505, 429, 0 ],
[231, 431, 1 ],
[190, 431, 1 ],
[430, 431, 0 ],
[286, 433, 0 ],
[432, 433, 0 ],
[506, 433, 0 ],
[23, 434, 0 ],
[400, 434, 0 ],
[500, 434, 0 ],
[32, 436, 0 ],
[435, 436, 0 ],
[78, 436, 1 ],
[86, 438, 1 ],
[437, 438, 0 ],
[221, 438, 0 ],
[207, 439, 0 ],
[516, 439, 0 ],
[513, 439, 0 ],
[181, 441, 1 ],
[440, 441, 0 ],
[504, 441, 1 ],
[135, 442, 0 ],
[109, 442, 0 ],
[112, 442, 0 ],
[113, 443, 0 ],
[132, 443, 0 ],
[107, 443, 0 ],
[444, 445, 0 ],
[112, 445, 0 ],
[109, 445, 0 ],
[119, 447, 1 ],
[100, 447, 1 ],
[446, 447, 0 ],
[124, 448, 0 ],
[125, 448, 0 ],
[131, 448, 0 ],
[449, 450, 0 ],
[173, 450, 0 ],
[184, 450, 0 ],
[144, 451, 0 ],
[140, 451, 0 ],
[514, 451, 0 ],
[537, 585, 1 ],
[141, 585, 0 ],
[584, 585, 0 ],
[522, 454, 0 ],
[144, 454, 0 ],
[453, 454, 0 ],
[199, 456, 0 ],
[140, 456, 0 ],
[455, 456, 0 ],
[537, 456, 0 ],
[538, 457, 0 ],
[153, 457, 0 ],
[176, 457, 0 ],
[524, 459, 0 ],
[458, 459, 0 ],
[134, 459, 0 ],
[460, 461, 0 ],
[150, 461, 0 ],
[149, 461, 0 ],
[521, 463, 0 ],
[462, 463, 0 ],
[538, 463, 0 ],
[110, 464, 0 ],
[90, 464, 0 ],
[165, 464, 0 ],
[458, 465, 0 ],
[134, 465, 0 ],
[524, 465, 0 ],
[466, 467, 0 ],
[110, 467, 0 ],
[165, 467, 0 ],
[468, 469, 0 ],
[541, 469, 0 ],
[490, 469, 0 ],
[263, 471, 0 ],
[470, 471, 0 ],
[534, 471, 0 ],
[136, 472, 0 ],
[110, 472, 0 ],
[251, 472, 0 ],
[226, 474, 0 ],
[473, 474, 0 ],
[257, 474, 0 ],
[6, 474, 1 ],
[299, 475, 1 ],
[3, 475, 0 ],
[210, 475, 0 ],
[297, 476, 0 ],
[296, 476, 0 ],
[295, 476, 0 ],
[313, 478, 1 ],
[477, 478, 0 ],
[245, 478, 0 ],
[479, 481, 0 ],
[565, 481, 0 ],
[480, 481, 0 ],
[415, 482, 0 ],
[56, 482, 0 ],
[409, 482, 0 ],
[483, 484, 0 ],
[3, 484, 0 ],
[301, 484, 0 ],
[233, 485, 0 ],
[392, 485, 0 ],
[391, 485, 0 ],
[579, 488, 0 ],
[486, 488, 0 ],
[487, 488, 0 ],
[270, 489, 0 ],
[331, 489, 0 ],
[396, 489, 1 ],
[519, 253, 0 ],
[382, 349, 1 ],
[349, 351, 0 ],
[459, 465, 0 ],
[549, 550, 0 ],
[550, 551, 0 ],
[194, 195, 0 ],
[247, 248, 0 ],
[2, 294, 0 ],
[549, 551, 0 ],
[54, 365, 0 ],
[131, 265, 0 ],
[91, 92, 0 ],
[247, 249, 0 ],
[186, 191, 0 ],
[129, 173, 0 ],
[96, 202, 0 ],
[53, 320, 0 ],
[24, 396, 0 ],
[133, 156, 0 ],
[442, 452, 0 ],
[445, 452, 0 ],
[247, 250, 0 ],
[187, 195, 0 ],
[216, 236, 0 ],
[244, 389, 0 ],
[394, 406, 0 ],
[442, 445, 0 ],
[442, 444, 0 ],
[198, 472, 0 ],
[464, 467, 0 ],
[198, 251, 0 ],
[112, 143, 0 ],
[2, 490, 0 ],
[5, 491, 0 ],
[10, 492, 0 ],
[12, 493, 0 ],
[13, 494, 0 ],
[15, 495, 0 ],
[18, 496, 0 ],
[20, 497, 0 ],
[22, 498, 0 ],
[24, 499, 0 ],
[26, 500, 0 ],
[30, 501, 0 ],
[32, 502, 0 ],
[37, 503, 0 ],
[42, 504, 0 ],
[46, 505, 0 ],
[52, 506, 0 ],
[56, 507, 0 ],
[61, 508, 0 ],
[68, 509, 0 ],
[69, 510, 0 ],
[74, 511, 0 ],
[78, 512, 0 ],
[86, 513, 0 ],
[87, 514, 0 ],
[94, 515, 0 ],
[95, 516, 0 ],
[96, 517, 0 ],
[99, 518, 0 ],
[100, 519, 0 ],
[104, 520, 0 ],
[105, 521, 0 ],
[106, 522, 0 ],
[107, 523, 0 ],
[117, 524, 0 ],
[120, 525, 0 ],
[123, 526, 0 ],
[124, 527, 0 ],
[125, 528, 0 ],
[128, 529, 0 ],
[129, 530, 0 ],
[138, 531, 0 ],
[143, 532, 0 ],
[156, 533, 0 ],
[157, 534, 0 ],
[159, 535, 0 ],
[160, 536, 0 ],
[165, 537, 0 ],
[184, 538, 0 ],
[191, 539, 0 ],
[195, 540, 0 ],
[201, 541, 0 ],
[220, 542, 0 ],
[231, 543, 0 ],
[232, 544, 0 ],
[233, 545, 0 ],
[236, 546, 0 ],
[245, 547, 0 ],
[246, 548, 0 ],
[248, 549, 0 ],
[249, 550, 0 ],
[250, 551, 0 ],
[259, 552, 0 ],
[261, 553, 0 ],
[262, 554, 0 ],
[265, 555, 0 ],
[270, 556, 0 ],
[277, 557, 0 ],
[279, 558, 0 ],
[280, 559, 0 ],
[290, 560, 0 ],
[301, 561, 0 ],
[305, 562, 0 ],
[306, 563, 0 ],
[310, 564, 0 ],
[313, 565, 0 ],
[315, 566, 0 ],
[320, 567, 0 ],
[330, 568, 0 ],
[332, 569, 0 ],
[334, 570, 0 ],
[336, 571, 0 ],
[349, 572, 0 ],
[351, 573, 0 ],
[358, 574, 0 ],
[360, 575, 0 ],
[380, 576, 0 ],
[382, 577, 0 ],
[383, 578, 0 ],
[389, 579, 0 ],
[401, 580, 0 ],
[402, 581, 0 ],
[409, 582, 0 ],
[415, 583, 0 ],
[444, 584, 0 ],
[452, 585, 0 ]
])
ppc["parameters"] = {
"x_trans_sg": 0.003,
"x_trans_fm": 0.001,
"x_trans_fl": 0.001,
"d_l": 1e-3,
"d_l_perturb": 1e-5,
"w_1_ij": 1,
"w_2_ij": 1,
"w_3_ij": 1,
"w_4_ij": 1,
"b_r": 238,
"b_c": 248 }
return ppc | true | true |
f727228b9cd69dec7cd34e56d40507b2d808473f | 2,667 | py | Python | src/assignments/Assignment13/win.py | acc-cosc-1336/cosc-1336-spring-2018-Skynet2020 | bfa9a4cb98ec33aee5b1c2a4277f66851c703335 | [
"MIT"
] | null | null | null | src/assignments/Assignment13/win.py | acc-cosc-1336/cosc-1336-spring-2018-Skynet2020 | bfa9a4cb98ec33aee5b1c2a4277f66851c703335 | [
"MIT"
] | 4 | 2018-02-02T13:51:49.000Z | 2018-04-01T03:07:58.000Z | src/assignments/Assignment13/win.py | acc-cosc-1336/cosc-1336-spring-2018-Skynet2020 | bfa9a4cb98ec33aee5b1c2a4277f66851c703335 | [
"MIT"
] | null | null | null | from tkinter import Tk, IntVar, Checkbutton, Button, Label, StringVar
from evaluator import Evaluator
#src.assignments.assignment13.
class Win(Tk):
def __init__(self):
Tk.__init__(self, None, None)
self.wm_title('My first window')
self.evaluator = Evaluator()
self.label_var = StringVar()
Label(self, text="Result: ").pack()
#ASSIGNMENT13: add the textvariable property and set its value to self.label_var
Label(self, textvariable=self.label_var).pack()
#ASSIGNMENT13: add the command property for the button and set its value to self.button_evaluate_handler
Button(self, text='Evaluate', command=self.button_evaluate_handler).pack()
self.__init__radio_buttons()
self.mainloop()
def __init__radio_buttons(self):
self.check_var_nev = IntVar()
self.check_var_rar = IntVar()
self.check_var_som = IntVar()
self.check_var_oft = IntVar()
self.check_var_v_oft = IntVar()
self.check_var_always = IntVar()
self.check_var_nev.set(0)
self.check_var_rar.set(0)
self.check_var_som.set(0)
self.check_var_oft.set(0)
self.check_var_v_oft.set(0)
self.check_var_always.set(0)
#ASSIGNMENT 13:
#for each write code IntVar above create a checkbox with attribute text
#Never, Rarely, Sometimes, Often, Very Often, Always
#and link the IntVar to the Checkbox variable attribute
self.check_nev = Checkbutton(self, text='Never', variable=self.check_var_nev)
self.check_rar = Checkbutton(self, text='Rarely', variable=self.check_var_rar)
self.check_som = Checkbutton(self, text='Sometimes', variable=self.check_var_som)
self.check_oft = Checkbutton(self, text='Often', variable=self.check_var_oft)
self.check_v_oft = Checkbutton(self, text='Very Often', variable=self.check_var_v_oft)
self.check_always = Checkbutton(self, text='Always', variable=self.check_var_always)
self.check_nev.pack()
self.check_rar.pack()
self.check_som.pack()
self.check_oft.pack()
self.check_v_oft.pack()
self.check_always.pack()
def button_evaluate_handler (self):
self.label_var.set(self.evaluator.faculty_evaluation_result(
0 if self.check_var_nev.get()== 0 else 1 ,
0 if self.check_var_rar.get()== 0 else 2,
0 if self.check_var_som.get()== 0 else 3,
0 if self.check_var_oft.get()== 0 else 25,
0 if self.check_var_v_oft.get()== 0 else 50,
0 if self.check_var_always.get()== 0 else 150))
| 39.220588 | 112 | 0.661417 | from tkinter import Tk, IntVar, Checkbutton, Button, Label, StringVar
from evaluator import Evaluator
class Win(Tk):
def __init__(self):
Tk.__init__(self, None, None)
self.wm_title('My first window')
self.evaluator = Evaluator()
self.label_var = StringVar()
Label(self, text="Result: ").pack()
Label(self, textvariable=self.label_var).pack()
Button(self, text='Evaluate', command=self.button_evaluate_handler).pack()
self.__init__radio_buttons()
self.mainloop()
def __init__radio_buttons(self):
self.check_var_nev = IntVar()
self.check_var_rar = IntVar()
self.check_var_som = IntVar()
self.check_var_oft = IntVar()
self.check_var_v_oft = IntVar()
self.check_var_always = IntVar()
self.check_var_nev.set(0)
self.check_var_rar.set(0)
self.check_var_som.set(0)
self.check_var_oft.set(0)
self.check_var_v_oft.set(0)
self.check_var_always.set(0)
self.check_nev = Checkbutton(self, text='Never', variable=self.check_var_nev)
self.check_rar = Checkbutton(self, text='Rarely', variable=self.check_var_rar)
self.check_som = Checkbutton(self, text='Sometimes', variable=self.check_var_som)
self.check_oft = Checkbutton(self, text='Often', variable=self.check_var_oft)
self.check_v_oft = Checkbutton(self, text='Very Often', variable=self.check_var_v_oft)
self.check_always = Checkbutton(self, text='Always', variable=self.check_var_always)
self.check_nev.pack()
self.check_rar.pack()
self.check_som.pack()
self.check_oft.pack()
self.check_v_oft.pack()
self.check_always.pack()
def button_evaluate_handler (self):
self.label_var.set(self.evaluator.faculty_evaluation_result(
0 if self.check_var_nev.get()== 0 else 1 ,
0 if self.check_var_rar.get()== 0 else 2,
0 if self.check_var_som.get()== 0 else 3,
0 if self.check_var_oft.get()== 0 else 25,
0 if self.check_var_v_oft.get()== 0 else 50,
0 if self.check_var_always.get()== 0 else 150))
| true | true |
f7272317299c91b38f7773508e076da242b481f9 | 10,657 | py | Python | tensorflow_probability/python/mcmc/transformed_kernel_test.py | oahziur/probability | 11645be43d2845da65a4fbafde4cfa95780280c0 | [
"Apache-2.0"
] | 1 | 2019-01-09T19:51:29.000Z | 2019-01-09T19:51:29.000Z | tensorflow_probability/python/mcmc/transformed_kernel_test.py | oahziur/probability | 11645be43d2845da65a4fbafde4cfa95780280c0 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/mcmc/transformed_kernel_test.py | oahziur/probability | 11645be43d2845da65a4fbafde4cfa95780280c0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""Tests for `TransformedTransitionKernel` `TransitionKernel`."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
# Dependency imports
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
tfd = tfp.distributions
tfb = tfp.bijectors
FakeInnerKernelResults = collections.namedtuple(
'FakeInnerKernelResults', [])
class FakeInnerKernel(tfp.mcmc.TransitionKernel):
"""Fake Transition Kernel."""
def __init__(self, target_log_prob_fn):
self._parameters = dict(target_log_prob_fn=target_log_prob_fn)
@property
def parameters(self):
return self._parameters
@property
def is_calibrated(self):
return True
def one_step(self, current_state, previous_kernel_results):
pass
def bootstrap_results(self, init_state):
return FakeInnerKernelResults()
class TransformedTransitionKernelTest(tf.test.TestCase):
def setUp(self):
self.dtype = np.float32
def test_support_works_correctly_with_HMC(self):
num_results = 2000
with self.cached_session(graph=tf.Graph()) as sess:
target = tfd.Beta(
concentration1=self.dtype(1.),
concentration0=self.dtype(10.))
transformed_hmc = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=tfp.mcmc.HamiltonianMonteCarlo(
target_log_prob_fn=target.log_prob,
step_size=1.64,
num_leapfrog_steps=2,
seed=55),
bijector=tfb.Sigmoid())
# Recall, tfp.mcmc.sample_chain calls
# transformed_hmc.bootstrap_results too.
states, kernel_results = tfp.mcmc.sample_chain(
num_results=num_results,
# The initial state is used by inner_kernel.bootstrap_results.
# Note the input is *after* bijector.forward.
current_state=self.dtype(0.25),
kernel=transformed_hmc,
num_burnin_steps=200,
num_steps_between_results=1,
parallel_iterations=1)
self.assertEqual(num_results, tf.dimension_value(states.shape[0]))
sample_mean = tf.reduce_mean(states, axis=0)
sample_var = tf.reduce_mean(
tf.squared_difference(states, sample_mean),
axis=0)
[
sample_mean_,
sample_var_,
is_accepted_,
true_mean_,
true_var_,
] = sess.run([
sample_mean,
sample_var,
kernel_results.inner_results.is_accepted,
target.mean(),
target.variance(),
])
self.assertAllClose(true_mean_, sample_mean_,
atol=0.06, rtol=0.)
self.assertAllClose(true_var_, sample_var_,
atol=0.01, rtol=0.1)
self.assertNear(0.6, is_accepted_.mean(), err=0.05)
def test_support_works_correctly_with_MALA(self):
num_results = 2000
with self.cached_session(graph=tf.Graph()) as sess:
target = tfd.Beta(
concentration1=self.dtype(1.),
concentration0=self.dtype(10.))
transformed_mala = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=tfp.mcmc.MetropolisAdjustedLangevinAlgorithm(
target_log_prob_fn=target.log_prob,
step_size=1.,
seed=55),
bijector=tfb.Sigmoid())
# Recall, tfp.mcmc.sample_chain calls
# transformed_hmc.bootstrap_results too.
states, _ = tfp.mcmc.sample_chain(
num_results=num_results,
# The initial state is used by inner_kernel.bootstrap_results.
# Note the input is *after* bijector.forward.
current_state=self.dtype(0.25),
kernel=transformed_mala,
num_burnin_steps=200,
num_steps_between_results=1,
parallel_iterations=1)
self.assertEqual(num_results, tf.dimension_value(states.shape[0]))
sample_mean = tf.reduce_mean(states, axis=0)
sample_var = tf.reduce_mean(
tf.squared_difference(states, sample_mean),
axis=0)
[
sample_mean_,
sample_var_,
true_mean_,
true_var_,
] = sess.run([
sample_mean,
sample_var,
target.mean(),
target.variance(),
])
self.assertAllClose(true_mean_, sample_mean_,
atol=0.06, rtol=0.)
self.assertAllClose(true_var_, sample_var_,
atol=0.01, rtol=0.1)
def test_support_works_correctly_with_RWM(self):
num_results = 2000
with self.cached_session(graph=tf.Graph()) as sess:
target = tfd.Beta(
concentration1=self.dtype(1.),
concentration0=self.dtype(10.))
transformed_rwm = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=tfp.mcmc.RandomWalkMetropolis(
target_log_prob_fn=target.log_prob,
new_state_fn=tfp.mcmc.random_walk_normal_fn(scale=1.5),
seed=55),
bijector=tfb.Sigmoid())
# Recall, tfp.mcmc.sample_chain calls
# transformed_hmc.bootstrap_results too.
states, _ = tfp.mcmc.sample_chain(
num_results=num_results,
# The initial state is used by inner_kernel.bootstrap_results.
# Note the input is *after* bijector.forward.
current_state=self.dtype(0.25),
kernel=transformed_rwm,
num_burnin_steps=200,
num_steps_between_results=1,
parallel_iterations=1)
self.assertEqual(num_results, tf.dimension_value(states.shape[0]))
sample_mean = tf.reduce_mean(states, axis=0)
sample_var = tf.reduce_mean(
tf.squared_difference(states, sample_mean),
axis=0)
[
sample_mean_,
sample_var_,
true_mean_,
true_var_,
] = sess.run([
sample_mean,
sample_var,
target.mean(),
target.variance(),
])
self.assertAllClose(true_mean_, sample_mean_,
atol=0.06, rtol=0.)
self.assertAllClose(true_var_, sample_var_,
atol=0.01, rtol=0.1)
def test_end_to_end_works_correctly(self):
true_mean = self.dtype([0, 0])
true_cov = self.dtype([[1, 0.5],
[0.5, 1]])
num_results = 2000
counter = collections.Counter()
with self.cached_session(graph=tf.Graph()) as sess:
def target_log_prob(x, y):
counter['target_calls'] += 1
# Corresponds to unnormalized MVN.
# z = matmul(inv(chol(true_cov)), [x, y] - true_mean)
z = tf.stack([x, y], axis=-1) - true_mean
z = tf.squeeze(
tf.linalg.triangular_solve(
np.linalg.cholesky(true_cov),
z[..., tf.newaxis]),
axis=-1)
return -0.5 * tf.reduce_sum(z**2., axis=-1)
transformed_hmc = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=tfp.mcmc.HamiltonianMonteCarlo(
target_log_prob_fn=target_log_prob,
# Affine scaling means we have to change the step_size
# in order to get 60% acceptance, as was done in mcmc/hmc_test.py.
step_size=[1.23 / 0.75, 1.23 / 0.5],
num_leapfrog_steps=2,
seed=54),
bijector=[
tfb.AffineScalar(scale=0.75),
tfb.AffineScalar(scale=0.5),
])
# Recall, tfp.mcmc.sample_chain calls
# transformed_hmc.bootstrap_results too.
states, kernel_results = tfp.mcmc.sample_chain(
num_results=num_results,
# The initial state is used by inner_kernel.bootstrap_results.
# Note the input is *after* `bijector.forward`.
current_state=[self.dtype(-2), self.dtype(2)],
kernel=transformed_hmc,
num_burnin_steps=200,
num_steps_between_results=1,
parallel_iterations=1)
self.assertAllEqual(dict(target_calls=2), counter)
states = tf.stack(states, axis=-1)
self.assertEqual(num_results, tf.dimension_value(states.shape[0]))
sample_mean = tf.reduce_mean(states, axis=0)
x = states - sample_mean
sample_cov = tf.matmul(x, x, transpose_a=True) / self.dtype(num_results)
[sample_mean_, sample_cov_, is_accepted_] = sess.run([
sample_mean, sample_cov, kernel_results.inner_results.is_accepted])
self.assertNear(0.6, is_accepted_.mean(), err=0.05)
self.assertAllClose(true_mean, sample_mean_,
atol=0.06, rtol=0.)
self.assertAllClose(true_cov, sample_cov_,
atol=0., rtol=0.1)
def test_bootstrap_requires_xor_args(self):
def fake_target_log_prob(x):
return -x**2 / 2.
transformed_fake = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=FakeInnerKernel(target_log_prob_fn=fake_target_log_prob),
bijector=tfb.Exp())
with self.assertRaisesWithPredicateMatch(
ValueError, r'Must specify exactly one'):
transformed_fake.bootstrap_results()
with self.assertRaisesWithPredicateMatch(
ValueError, r'Must specify exactly one'):
transformed_fake.bootstrap_results(
init_state=2., transformed_init_state=np.log(2.))
def test_bootstrap_correctly_untransforms(self):
def fake_target_log_prob(x):
return -x**2 / 2.
transformed_fake = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=FakeInnerKernel(target_log_prob_fn=fake_target_log_prob),
bijector=tfb.Exp())
with self.cached_session(graph=tf.Graph()) as sess:
[
automatic_pkr,
manual_pkr,
] = sess.run([
transformed_fake.bootstrap_results(2.),
transformed_fake.bootstrap_results(transformed_init_state=[4., 5.]),
])
self.assertNear(np.log(2.), automatic_pkr.transformed_state, err=1e-6)
self.assertAllClose(
[4., 5.], manual_pkr.transformed_state, atol=0., rtol=1e-6)
if __name__ == '__main__':
tf.test.main()
| 36.496575 | 80 | 0.63836 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
tfd = tfp.distributions
tfb = tfp.bijectors
FakeInnerKernelResults = collections.namedtuple(
'FakeInnerKernelResults', [])
class FakeInnerKernel(tfp.mcmc.TransitionKernel):
def __init__(self, target_log_prob_fn):
self._parameters = dict(target_log_prob_fn=target_log_prob_fn)
@property
def parameters(self):
return self._parameters
@property
def is_calibrated(self):
return True
def one_step(self, current_state, previous_kernel_results):
pass
def bootstrap_results(self, init_state):
return FakeInnerKernelResults()
class TransformedTransitionKernelTest(tf.test.TestCase):
def setUp(self):
self.dtype = np.float32
def test_support_works_correctly_with_HMC(self):
num_results = 2000
with self.cached_session(graph=tf.Graph()) as sess:
target = tfd.Beta(
concentration1=self.dtype(1.),
concentration0=self.dtype(10.))
transformed_hmc = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=tfp.mcmc.HamiltonianMonteCarlo(
target_log_prob_fn=target.log_prob,
step_size=1.64,
num_leapfrog_steps=2,
seed=55),
bijector=tfb.Sigmoid())
states, kernel_results = tfp.mcmc.sample_chain(
num_results=num_results,
current_state=self.dtype(0.25),
kernel=transformed_hmc,
num_burnin_steps=200,
num_steps_between_results=1,
parallel_iterations=1)
self.assertEqual(num_results, tf.dimension_value(states.shape[0]))
sample_mean = tf.reduce_mean(states, axis=0)
sample_var = tf.reduce_mean(
tf.squared_difference(states, sample_mean),
axis=0)
[
sample_mean_,
sample_var_,
is_accepted_,
true_mean_,
true_var_,
] = sess.run([
sample_mean,
sample_var,
kernel_results.inner_results.is_accepted,
target.mean(),
target.variance(),
])
self.assertAllClose(true_mean_, sample_mean_,
atol=0.06, rtol=0.)
self.assertAllClose(true_var_, sample_var_,
atol=0.01, rtol=0.1)
self.assertNear(0.6, is_accepted_.mean(), err=0.05)
def test_support_works_correctly_with_MALA(self):
num_results = 2000
with self.cached_session(graph=tf.Graph()) as sess:
target = tfd.Beta(
concentration1=self.dtype(1.),
concentration0=self.dtype(10.))
transformed_mala = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=tfp.mcmc.MetropolisAdjustedLangevinAlgorithm(
target_log_prob_fn=target.log_prob,
step_size=1.,
seed=55),
bijector=tfb.Sigmoid())
states, _ = tfp.mcmc.sample_chain(
num_results=num_results,
current_state=self.dtype(0.25),
kernel=transformed_mala,
num_burnin_steps=200,
num_steps_between_results=1,
parallel_iterations=1)
self.assertEqual(num_results, tf.dimension_value(states.shape[0]))
sample_mean = tf.reduce_mean(states, axis=0)
sample_var = tf.reduce_mean(
tf.squared_difference(states, sample_mean),
axis=0)
[
sample_mean_,
sample_var_,
true_mean_,
true_var_,
] = sess.run([
sample_mean,
sample_var,
target.mean(),
target.variance(),
])
self.assertAllClose(true_mean_, sample_mean_,
atol=0.06, rtol=0.)
self.assertAllClose(true_var_, sample_var_,
atol=0.01, rtol=0.1)
def test_support_works_correctly_with_RWM(self):
num_results = 2000
with self.cached_session(graph=tf.Graph()) as sess:
target = tfd.Beta(
concentration1=self.dtype(1.),
concentration0=self.dtype(10.))
transformed_rwm = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=tfp.mcmc.RandomWalkMetropolis(
target_log_prob_fn=target.log_prob,
new_state_fn=tfp.mcmc.random_walk_normal_fn(scale=1.5),
seed=55),
bijector=tfb.Sigmoid())
states, _ = tfp.mcmc.sample_chain(
num_results=num_results,
current_state=self.dtype(0.25),
kernel=transformed_rwm,
num_burnin_steps=200,
num_steps_between_results=1,
parallel_iterations=1)
self.assertEqual(num_results, tf.dimension_value(states.shape[0]))
sample_mean = tf.reduce_mean(states, axis=0)
sample_var = tf.reduce_mean(
tf.squared_difference(states, sample_mean),
axis=0)
[
sample_mean_,
sample_var_,
true_mean_,
true_var_,
] = sess.run([
sample_mean,
sample_var,
target.mean(),
target.variance(),
])
self.assertAllClose(true_mean_, sample_mean_,
atol=0.06, rtol=0.)
self.assertAllClose(true_var_, sample_var_,
atol=0.01, rtol=0.1)
def test_end_to_end_works_correctly(self):
true_mean = self.dtype([0, 0])
true_cov = self.dtype([[1, 0.5],
[0.5, 1]])
num_results = 2000
counter = collections.Counter()
with self.cached_session(graph=tf.Graph()) as sess:
def target_log_prob(x, y):
counter['target_calls'] += 1
z = tf.stack([x, y], axis=-1) - true_mean
z = tf.squeeze(
tf.linalg.triangular_solve(
np.linalg.cholesky(true_cov),
z[..., tf.newaxis]),
axis=-1)
return -0.5 * tf.reduce_sum(z**2., axis=-1)
transformed_hmc = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=tfp.mcmc.HamiltonianMonteCarlo(
target_log_prob_fn=target_log_prob,
step_size=[1.23 / 0.75, 1.23 / 0.5],
num_leapfrog_steps=2,
seed=54),
bijector=[
tfb.AffineScalar(scale=0.75),
tfb.AffineScalar(scale=0.5),
])
states, kernel_results = tfp.mcmc.sample_chain(
num_results=num_results,
current_state=[self.dtype(-2), self.dtype(2)],
kernel=transformed_hmc,
num_burnin_steps=200,
num_steps_between_results=1,
parallel_iterations=1)
self.assertAllEqual(dict(target_calls=2), counter)
states = tf.stack(states, axis=-1)
self.assertEqual(num_results, tf.dimension_value(states.shape[0]))
sample_mean = tf.reduce_mean(states, axis=0)
x = states - sample_mean
sample_cov = tf.matmul(x, x, transpose_a=True) / self.dtype(num_results)
[sample_mean_, sample_cov_, is_accepted_] = sess.run([
sample_mean, sample_cov, kernel_results.inner_results.is_accepted])
self.assertNear(0.6, is_accepted_.mean(), err=0.05)
self.assertAllClose(true_mean, sample_mean_,
atol=0.06, rtol=0.)
self.assertAllClose(true_cov, sample_cov_,
atol=0., rtol=0.1)
def test_bootstrap_requires_xor_args(self):
def fake_target_log_prob(x):
return -x**2 / 2.
transformed_fake = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=FakeInnerKernel(target_log_prob_fn=fake_target_log_prob),
bijector=tfb.Exp())
with self.assertRaisesWithPredicateMatch(
ValueError, r'Must specify exactly one'):
transformed_fake.bootstrap_results()
with self.assertRaisesWithPredicateMatch(
ValueError, r'Must specify exactly one'):
transformed_fake.bootstrap_results(
init_state=2., transformed_init_state=np.log(2.))
def test_bootstrap_correctly_untransforms(self):
def fake_target_log_prob(x):
return -x**2 / 2.
transformed_fake = tfp.mcmc.TransformedTransitionKernel(
inner_kernel=FakeInnerKernel(target_log_prob_fn=fake_target_log_prob),
bijector=tfb.Exp())
with self.cached_session(graph=tf.Graph()) as sess:
[
automatic_pkr,
manual_pkr,
] = sess.run([
transformed_fake.bootstrap_results(2.),
transformed_fake.bootstrap_results(transformed_init_state=[4., 5.]),
])
self.assertNear(np.log(2.), automatic_pkr.transformed_state, err=1e-6)
self.assertAllClose(
[4., 5.], manual_pkr.transformed_state, atol=0., rtol=1e-6)
if __name__ == '__main__':
tf.test.main()
| true | true |
f727232d55060b38548b3df09955ef9d66976e61 | 1,988 | py | Python | test_for_daysBetweenDates.py | serglit72/Python_exercises | 7de440a3bdf50c4162bb2df5250487d568942ca8 | [
"Apache-2.0"
] | null | null | null | test_for_daysBetweenDates.py | serglit72/Python_exercises | 7de440a3bdf50c4162bb2df5250487d568942ca8 | [
"Apache-2.0"
] | null | null | null | test_for_daysBetweenDates.py | serglit72/Python_exercises | 7de440a3bdf50c4162bb2df5250487d568942ca8 | [
"Apache-2.0"
] | null | null | null | def nextDay(year, month, day):
"""Simple version: assume every month has 30 days"""
if day < 30:
return year, month, day + 1
else:
if month == 12:
return year + 1, 1, 1
else:
return year, month + 1, 1
def dateIsBefore(year1, month1, day1, year2, month2, day2):
"""Returns True if year1-month1-day1 is before
year2-month2-day2. Otherwise, returns False."""
if year1 < year2:
return True
if year1 == year2:
if month1 < month2:
return True
if month1 == month2:
return day1 < day2
return False
def daysBetweenDates(year1, month1, day1, year2, month2, day2):
"""Returns the number of days between year1/month1/day1
and year2/month2/day2. Assumes inputs are valid dates
in Gregorian calendar."""
# program defensively! Add an assertion if the input is not valid!
assert year2>=year1
assert month2>=month1
assert day2>=day1
days = 0
while dateIsBefore(year1, month1, day1, year2, month2, day2):
year1, month1, day1 = nextDay(year1, month1, day1)
days += 1
return days
def test():
test_cases = [((2012,9,30,2012,10,30),30),
((2012,1,1,2013,1,1),360),
((2012,9,1,2012,9,4),3),
((2013,1,1,1999,12,31), "AssertionError")]
for (args, answer) in test_cases:
try:
result = daysBetweenDates(*args)
if result == answer and answer != "AssertionError":
print ("Test case passed!")
else:
print ("Test with data:", args, "failed")
except AssertionError:
if answer == "AssertionError":
print ("Nice job! Test case {0} correctly raises AssertionError!\n".format(args))
else:
print ("Check your work! Test case {0} should not raise AssertionError!\n".format(args))
test() | 33.694915 | 115 | 0.560865 | def nextDay(year, month, day):
if day < 30:
return year, month, day + 1
else:
if month == 12:
return year + 1, 1, 1
else:
return year, month + 1, 1
def dateIsBefore(year1, month1, day1, year2, month2, day2):
if year1 < year2:
return True
if year1 == year2:
if month1 < month2:
return True
if month1 == month2:
return day1 < day2
return False
def daysBetweenDates(year1, month1, day1, year2, month2, day2):
assert year2>=year1
assert month2>=month1
assert day2>=day1
days = 0
while dateIsBefore(year1, month1, day1, year2, month2, day2):
year1, month1, day1 = nextDay(year1, month1, day1)
days += 1
return days
def test():
test_cases = [((2012,9,30,2012,10,30),30),
((2012,1,1,2013,1,1),360),
((2012,9,1,2012,9,4),3),
((2013,1,1,1999,12,31), "AssertionError")]
for (args, answer) in test_cases:
try:
result = daysBetweenDates(*args)
if result == answer and answer != "AssertionError":
print ("Test case passed!")
else:
print ("Test with data:", args, "failed")
except AssertionError:
if answer == "AssertionError":
print ("Nice job! Test case {0} correctly raises AssertionError!\n".format(args))
else:
print ("Check your work! Test case {0} should not raise AssertionError!\n".format(args))
test() | true | true |
f72723395930ff9f16f58ae6aa2edef6800a2bf5 | 16,970 | py | Python | intake/tests/services/test_submissions.py | cforlando/intake | a5233d5c0f862f28ee265b9b4831405aabeec7e2 | [
"MIT"
] | null | null | null | intake/tests/services/test_submissions.py | cforlando/intake | a5233d5c0f862f28ee265b9b4831405aabeec7e2 | [
"MIT"
] | null | null | null | intake/tests/services/test_submissions.py | cforlando/intake | a5233d5c0f862f28ee265b9b4831405aabeec7e2 | [
"MIT"
] | 1 | 2020-02-05T01:11:45.000Z | 2020-02-05T01:11:45.000Z | import logging
from unittest.mock import Mock, patch
from django.test import TestCase
import intake.services.submissions as SubmissionsService
from intake.tests import mock, factories
from intake.tests.mock_org_answers import get_answers_for_orgs
from intake.tests.base_testcases import ExternalNotificationsPatchTestCase
from formation.forms import county_form_selector
from formation.field_types import YES, NO
from intake.constants import EMAIL, SMS, FEE_WAIVER_LEVELS
from intake.models import County, FormSubmission
from intake import models
from user_accounts.models import Organization
from project.tests.assertions import assertInLogsCount
"""
Each function in intake.services.submissions corresponds to a TestCase in this
file.
"""
ALL_COUNTY_SLUGS = County.objects.values_list('slug', flat=True)
class TestCreateSubmissions(TestCase):
fixtures = [
'counties', 'organizations',
]
def test_can_create_with_form_orgs_and_app_id(self):
# given an applicant, some orgs, and a validated form
applicant = factories.ApplicantFactory()
organizations = list(Organization.objects.all()[:2])
Form = county_form_selector.get_combined_form_class(
counties=ALL_COUNTY_SLUGS)
form = Form(mock.fake.all_county_answers(), validate=True)
# make a submission
submission = SubmissionsService.create_submission(
form, organizations, applicant.id)
self.assertEqual(submission.applicant_id, applicant.id)
self.assertEqual(
set(submission.organizations.all()),
set(organizations))
def test_create_sub_with_existing_duplicate(self):
applicant = factories.ApplicantFactory()
answers = mock.fake.all_county_answers()
org = Organization.objects.filter(is_receiving_agency=True).first()
Form = county_form_selector.get_combined_form_class(
counties=ALL_COUNTY_SLUGS)
form = Form(answers, validate=True)
a = SubmissionsService.create_submission(form, [org], applicant.id)
self.assertFalse(a.duplicate_set_id)
answers['last_name'] += 's'
form = Form(answers, validate=True)
b = SubmissionsService.create_submission(form, [org], applicant.id)
self.assertTrue(b.duplicate_set_id)
dup_set_subs = list(b.duplicate_set.submissions.all())
for sub in (a, b):
self.assertIn(sub, dup_set_subs)
class TestGetPermittedSubmissions(TestCase):
fixtures = [
'counties', 'organizations', 'groups',
'mock_profiles',
'mock_2_submissions_to_a_pubdef',
'mock_2_submissions_to_cc_pubdef', 'template_options'
]
def test_filters_to_organization_of_user(self):
# Given a user from one org who tries to access all submissions
# assert that they only receive submissions for their org
# given a user from one org
org = Organization.objects.get(slug='a_pubdef')
user = org.profiles.first().user
# who requests all submissions
submissions = list(SubmissionsService.get_permitted_submissions(user))
# make sure they only receive those subs targeted to their org
for sub in submissions:
orgs = list(sub.organizations.all())
self.assertIn(org, orgs)
other_submissions = models.FormSubmission.objects.exclude(
organizations=org)
for other in other_submissions:
self.assertNotIn(other, submissions)
class TestHaveSameOrgs(TestCase):
fixtures = [
'counties', 'organizations', 'groups', 'mock_profiles',
'mock_2_submissions_to_a_pubdef',
'mock_2_submissions_to_cc_pubdef', 'template_options'
]
def test_returns_false_when_orgs_are_different(self):
a = FormSubmission.objects.filter(
organizations__slug='a_pubdef').first()
b = FormSubmission.objects.filter(
organizations__slug='cc_pubdef').first()
self.assertEqual(SubmissionsService.have_same_orgs(a, b), False)
def test_returns_true_when_orgs_are_the_same(self):
subs = FormSubmission.objects.filter(
organizations__slug='a_pubdef')
a, b = list(subs)[:2]
self.assertEqual(SubmissionsService.have_same_orgs(a, b), True)
def test_returns_false_when_orgs_dont_overlap(self):
a = FormSubmission.objects.filter(
organizations__slug='a_pubdef').first()
b = FormSubmission.objects.filter(
organizations__slug='cc_pubdef').first()
cc_pubdef = Organization.objects.get(slug='cc_pubdef')
a.organizations.add_orgs_to_sub(cc_pubdef)
self.assertEqual(SubmissionsService.have_same_orgs(a, b), False)
class TestFindDuplicates(TestCase):
fixtures = [
'counties', 'organizations',
]
def test_finds_subs_with_similar_names(self):
org = Organization.objects.get(slug='a_pubdef')
a_name = dict(
first_name="Joe",
middle_name="H",
last_name="Parabola")
b_name = dict(
first_name="Joe",
middle_name="H",
last_name="Parabole")
a = factories.FormSubmissionWithOrgsFactory.create(
answers=get_answers_for_orgs(
[org],
**a_name),
organizations=[org],
)
b = factories.FormSubmissionWithOrgsFactory.create(
answers=get_answers_for_orgs(
[org],
**b_name),
organizations=[org],
)
c = factories.FormSubmissionWithOrgsFactory.create(
answers=get_answers_for_orgs(
[org],
**b_name),
organizations=[org],
)
dups = SubmissionsService.find_duplicates(
FormSubmission.objects.all())
pair = dups[0]
for sub in (a, b, c):
self.assertIn(sub, pair)
def test_doesnt_pair_subs_with_differing_names(self):
org = Organization.objects.get(slug='a_pubdef')
a_name = dict(
first_name="Joe",
middle_name="H",
last_name="Parabola")
b_name = dict(
first_name="Joseph",
middle_name="H",
last_name="Conic Intersection")
factories.FormSubmissionWithOrgsFactory.create(
answers=get_answers_for_orgs(
[org],
**a_name),
organizations=[org],
)
factories.FormSubmissionWithOrgsFactory.create(
answers=get_answers_for_orgs(
[org],
**b_name),
organizations=[org],
)
dups = SubmissionsService.find_duplicates(
FormSubmission.objects.all())
self.assertFalse(dups)
class TestGetConfirmationFlashMessages(TestCase):
def make_mock_confirmation_notification(self, successes, **contact_info):
"""contact_info and successes
"""
notification = Mock()
notification.contact_info = contact_info
notification.successes = successes
return notification
def test_messages_for_full_success(self):
confirmation = self.make_mock_confirmation_notification(
successes=[EMAIL, SMS],
email="test@test.com",
sms="(555) 444-2222")
expected = [
"We've sent you an email at test@test.com",
"We've sent you a text message at (555) 444-2222",
]
result = SubmissionsService.get_confirmation_flash_messages(
confirmation)
self.assertEqual(result, expected)
def test_messages_with_no_usable_contact_info(self):
confirmation = self.make_mock_confirmation_notification(
successes=[],
snailmail="111 Main St.",
voicemail="(555) 444-2222")
expected = []
result = SubmissionsService.get_confirmation_flash_messages(
confirmation)
self.assertEqual(result, expected)
class TestSendConfirmationNotifications(ExternalNotificationsPatchTestCase):
fixtures = [
'counties',
'organizations'
]
def get_orgs(self):
return [Organization.objects.get(slug='a_pubdef')]
def test_notifications_and_logs_for_full_contact_preferences(self):
applicant = factories.ApplicantFactory()
answers = get_answers_for_orgs(
self.get_orgs(),
contact_preferences=[
'prefers_email',
'prefers_sms'
],
email='test@gmail.com',
phone_number='4152124848',
)
sub = factories.FormSubmissionWithOrgsFactory.create(
applicant=applicant,
organizations=self.get_orgs(),
answers=answers)
with self.assertLogs(
'project.services.logging_service', logging.INFO) as logs:
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(
len(self.notifications.email_confirmation.send.mock_calls), 1)
self.assertEqual(
len(self.notifications.sms_confirmation.send.mock_calls), 1)
assertInLogsCount(logs, {'event_name=app_confirmation_sent': 1})
def test_notifications_and_logs_for_no_contact_preferences(self):
applicant = factories.ApplicantFactory()
answers = get_answers_for_orgs(
self.get_orgs(),
contact_preferences=[],
email='test@gmail.com',
phone_number='4152124848',
)
sub = factories.FormSubmissionWithOrgsFactory.create(
applicant=applicant,
organizations=self.get_orgs(),
answers=answers)
# does not log so no logs
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(
len(self.notifications.email_confirmation.send.mock_calls), 0)
self.assertEqual(
len(self.notifications.sms_confirmation.send.mock_calls), 0)
def test_notifications_and_logs_for_one_contact_preference(self):
applicant = factories.ApplicantFactory()
answers = get_answers_for_orgs(
self.get_orgs(),
contact_preferences=['prefers_email'],
email='test@gmail.com',
phone_number='4152124848',
)
sub = factories.FormSubmissionWithOrgsFactory.create(
applicant=applicant,
organizations=self.get_orgs(),
answers=answers)
with self.assertLogs(
'project.services.logging_service', logging.INFO) as logs:
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(
len(self.notifications.email_confirmation.send.mock_calls), 1)
self.assertEqual(
len(self.notifications.sms_confirmation.send.mock_calls), 0)
assertInLogsCount(logs, {'event_name=app_confirmation_sent': 1})
def get_notification_bodies(patched_send):
email, sms = patched_send.mock_calls
stuff, sms_args, sms_kwargs = sms
stuff, email_args, email_kwargs = email
return sms_kwargs['body'], email_kwargs['body']
class TestSendConfirmationNotificationsRenderedOutput(TestCase):
fixtures = ['counties', 'organizations']
@patch('intake.notifications.SimpleFrontNotification.send')
def test_notifications_with_only_unlisted_counties(self, send):
orgs = [Organization.objects.get(slug='cfa')]
sub = factories.FormSubmissionWithOrgsFactory(
organizations=orgs,
answers=get_answers_for_orgs(
orgs, unlisted_counties="O‘Duinn County",
contact_preferences=['prefers_email', 'prefers_sms']))
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(len(send.mock_calls), 2)
sms_body, email_body = get_notification_bodies(send)
self.assertIn("O‘Duinn County", sms_body)
self.assertIn("O‘Duinn County", email_body)
self.assertIn("we'll contact you in the next week", sms_body)
self.assertIn("We will contact you in the next week", email_body)
@patch('intake.notifications.SimpleFrontNotification.send')
def test_notifications_with_both_partner_and_unlisted_counties(self, send):
orgs = [
Organization.objects.get(slug='cfa'),
Organization.objects.get(slug='cc_pubdef')]
sub = factories.FormSubmissionWithOrgsFactory(
organizations=orgs,
answers=get_answers_for_orgs(
orgs, unlisted_counties="O‘Duinn County",
contact_preferences=['prefers_email', 'prefers_sms']))
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(len(send.mock_calls), 2)
sms_body, email_body = get_notification_bodies(send)
self.assertIn("O‘Duinn County", sms_body)
self.assertIn("O‘Duinn County", email_body)
self.assertIn(orgs[1].short_confirmation_message, sms_body)
self.assertIn(orgs[1].long_confirmation_message, email_body)
self.assertIn("we'll contact you in the next week", sms_body)
self.assertIn("We will contact you in the next week", email_body)
@patch('intake.notifications.SimpleFrontNotification.send')
def test_notifications_with_only_partner_counties(self, send):
orgs = [Organization.objects.get(slug='cc_pubdef')]
sub = factories.FormSubmissionWithOrgsFactory(
organizations=orgs,
answers=get_answers_for_orgs(
orgs, contact_preferences=['prefers_email', 'prefers_sms']))
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(len(send.mock_calls), 2)
sms_body, email_body = get_notification_bodies(send)
self.assertIn(orgs[0].short_confirmation_message, sms_body)
self.assertIn(orgs[0].long_confirmation_message, email_body)
self.assertNotIn("we'll contact you in the next week", sms_body)
self.assertNotIn("We will contact you in the next week", email_body)
class TestSendToNewappsBundleIfNeeded(TestCase):
fixtures = ['counties', 'organizations']
@patch('intake.tasks.add_application_pdfs')
def test_calls_task_if_sf_in_sub(self, add_application_pdfs):
sf_pubdef = Organization.objects.get(
slug='sf_pubdef')
sub = factories.FormSubmissionWithOrgsFactory(
organizations=[sf_pubdef])
SubmissionsService.send_to_newapps_bundle_if_needed(sub, [sf_pubdef])
add_application_pdfs.assert_called_with(
sub.applications.first().id)
@patch('intake.tasks.add_application_pdfs')
def test_does_not_call_task_if_not_sf(self, add_application_pdfs):
a_pubdef = Organization.objects.get(
slug='a_pubdef')
sub = factories.FormSubmissionWithOrgsFactory(
organizations=[a_pubdef])
SubmissionsService.send_to_newapps_bundle_if_needed(sub, [a_pubdef])
add_application_pdfs.assert_not_called()
class TestQualifiesForFeeWaiver(TestCase):
fixtures = ['counties', 'organizations']
def test_qualifies_for_fee_waiver_with_public_benefits(self):
sub = models.FormSubmission(
answers=mock.fake.ebclc_answers(on_public_benefits=YES))
self.assertEqual(
SubmissionsService.qualifies_for_fee_waiver(sub), True)
def test_qualifies_for_fee_waiver_with_no_income(self):
sub = models.FormSubmission(
answers=mock.fake.ebclc_answers(
household_size=0,
monthly_income=0))
self.assertTrue(SubmissionsService.qualifies_for_fee_waiver(sub))
def test_doesnt_qualify_for_fee_waiver_with_income_and_no_benefits(self):
sub = models.FormSubmission(
answers=mock.fake.ebclc_answers(
on_public_benefits=NO, household_size=11))
sub.answers['monthly_income'] = (FEE_WAIVER_LEVELS[12] / 12) + 1
self.assertEqual(
SubmissionsService.qualifies_for_fee_waiver(sub), False)
def test_doesnt_qualify_for_fee_waiver_without_valid_inputs(self):
sub = models.FormSubmission(answers={})
self.assertEqual(
SubmissionsService.qualifies_for_fee_waiver(sub), None)
class TestGetAllCnlSubmissions(TestCase):
def test_gets_all_cnl_submissions(self):
cfa = Organization.objects.get(
slug='cfa')
sf_pubdef = Organization.objects.get(
slug='sf_pubdef')
cnl_sub1 = factories.FormSubmissionWithOrgsFactory(
organizations=[cfa])
cnl_sub2 = factories.FormSubmissionWithOrgsFactory(
organizations=[cfa])
other_sub = factories.FormSubmissionWithOrgsFactory(
organizations=[sf_pubdef])
cnl_subs = SubmissionsService.get_all_cnl_submissions(0)
self.assertEqual(len(cnl_subs.object_list), 2)
| 39.55711 | 79 | 0.668592 | import logging
from unittest.mock import Mock, patch
from django.test import TestCase
import intake.services.submissions as SubmissionsService
from intake.tests import mock, factories
from intake.tests.mock_org_answers import get_answers_for_orgs
from intake.tests.base_testcases import ExternalNotificationsPatchTestCase
from formation.forms import county_form_selector
from formation.field_types import YES, NO
from intake.constants import EMAIL, SMS, FEE_WAIVER_LEVELS
from intake.models import County, FormSubmission
from intake import models
from user_accounts.models import Organization
from project.tests.assertions import assertInLogsCount
ALL_COUNTY_SLUGS = County.objects.values_list('slug', flat=True)
class TestCreateSubmissions(TestCase):
fixtures = [
'counties', 'organizations',
]
def test_can_create_with_form_orgs_and_app_id(self):
applicant = factories.ApplicantFactory()
organizations = list(Organization.objects.all()[:2])
Form = county_form_selector.get_combined_form_class(
counties=ALL_COUNTY_SLUGS)
form = Form(mock.fake.all_county_answers(), validate=True)
submission = SubmissionsService.create_submission(
form, organizations, applicant.id)
self.assertEqual(submission.applicant_id, applicant.id)
self.assertEqual(
set(submission.organizations.all()),
set(organizations))
def test_create_sub_with_existing_duplicate(self):
applicant = factories.ApplicantFactory()
answers = mock.fake.all_county_answers()
org = Organization.objects.filter(is_receiving_agency=True).first()
Form = county_form_selector.get_combined_form_class(
counties=ALL_COUNTY_SLUGS)
form = Form(answers, validate=True)
a = SubmissionsService.create_submission(form, [org], applicant.id)
self.assertFalse(a.duplicate_set_id)
answers['last_name'] += 's'
form = Form(answers, validate=True)
b = SubmissionsService.create_submission(form, [org], applicant.id)
self.assertTrue(b.duplicate_set_id)
dup_set_subs = list(b.duplicate_set.submissions.all())
for sub in (a, b):
self.assertIn(sub, dup_set_subs)
class TestGetPermittedSubmissions(TestCase):
fixtures = [
'counties', 'organizations', 'groups',
'mock_profiles',
'mock_2_submissions_to_a_pubdef',
'mock_2_submissions_to_cc_pubdef', 'template_options'
]
def test_filters_to_organization_of_user(self):
org = Organization.objects.get(slug='a_pubdef')
user = org.profiles.first().user
submissions = list(SubmissionsService.get_permitted_submissions(user))
for sub in submissions:
orgs = list(sub.organizations.all())
self.assertIn(org, orgs)
other_submissions = models.FormSubmission.objects.exclude(
organizations=org)
for other in other_submissions:
self.assertNotIn(other, submissions)
class TestHaveSameOrgs(TestCase):
fixtures = [
'counties', 'organizations', 'groups', 'mock_profiles',
'mock_2_submissions_to_a_pubdef',
'mock_2_submissions_to_cc_pubdef', 'template_options'
]
def test_returns_false_when_orgs_are_different(self):
a = FormSubmission.objects.filter(
organizations__slug='a_pubdef').first()
b = FormSubmission.objects.filter(
organizations__slug='cc_pubdef').first()
self.assertEqual(SubmissionsService.have_same_orgs(a, b), False)
def test_returns_true_when_orgs_are_the_same(self):
subs = FormSubmission.objects.filter(
organizations__slug='a_pubdef')
a, b = list(subs)[:2]
self.assertEqual(SubmissionsService.have_same_orgs(a, b), True)
def test_returns_false_when_orgs_dont_overlap(self):
a = FormSubmission.objects.filter(
organizations__slug='a_pubdef').first()
b = FormSubmission.objects.filter(
organizations__slug='cc_pubdef').first()
cc_pubdef = Organization.objects.get(slug='cc_pubdef')
a.organizations.add_orgs_to_sub(cc_pubdef)
self.assertEqual(SubmissionsService.have_same_orgs(a, b), False)
class TestFindDuplicates(TestCase):
fixtures = [
'counties', 'organizations',
]
def test_finds_subs_with_similar_names(self):
org = Organization.objects.get(slug='a_pubdef')
a_name = dict(
first_name="Joe",
middle_name="H",
last_name="Parabola")
b_name = dict(
first_name="Joe",
middle_name="H",
last_name="Parabole")
a = factories.FormSubmissionWithOrgsFactory.create(
answers=get_answers_for_orgs(
[org],
**a_name),
organizations=[org],
)
b = factories.FormSubmissionWithOrgsFactory.create(
answers=get_answers_for_orgs(
[org],
**b_name),
organizations=[org],
)
c = factories.FormSubmissionWithOrgsFactory.create(
answers=get_answers_for_orgs(
[org],
**b_name),
organizations=[org],
)
dups = SubmissionsService.find_duplicates(
FormSubmission.objects.all())
pair = dups[0]
for sub in (a, b, c):
self.assertIn(sub, pair)
def test_doesnt_pair_subs_with_differing_names(self):
org = Organization.objects.get(slug='a_pubdef')
a_name = dict(
first_name="Joe",
middle_name="H",
last_name="Parabola")
b_name = dict(
first_name="Joseph",
middle_name="H",
last_name="Conic Intersection")
factories.FormSubmissionWithOrgsFactory.create(
answers=get_answers_for_orgs(
[org],
**a_name),
organizations=[org],
)
factories.FormSubmissionWithOrgsFactory.create(
answers=get_answers_for_orgs(
[org],
**b_name),
organizations=[org],
)
dups = SubmissionsService.find_duplicates(
FormSubmission.objects.all())
self.assertFalse(dups)
class TestGetConfirmationFlashMessages(TestCase):
def make_mock_confirmation_notification(self, successes, **contact_info):
notification = Mock()
notification.contact_info = contact_info
notification.successes = successes
return notification
def test_messages_for_full_success(self):
confirmation = self.make_mock_confirmation_notification(
successes=[EMAIL, SMS],
email="test@test.com",
sms="(555) 444-2222")
expected = [
"We've sent you an email at test@test.com",
"We've sent you a text message at (555) 444-2222",
]
result = SubmissionsService.get_confirmation_flash_messages(
confirmation)
self.assertEqual(result, expected)
def test_messages_with_no_usable_contact_info(self):
confirmation = self.make_mock_confirmation_notification(
successes=[],
snailmail="111 Main St.",
voicemail="(555) 444-2222")
expected = []
result = SubmissionsService.get_confirmation_flash_messages(
confirmation)
self.assertEqual(result, expected)
class TestSendConfirmationNotifications(ExternalNotificationsPatchTestCase):
fixtures = [
'counties',
'organizations'
]
def get_orgs(self):
return [Organization.objects.get(slug='a_pubdef')]
def test_notifications_and_logs_for_full_contact_preferences(self):
applicant = factories.ApplicantFactory()
answers = get_answers_for_orgs(
self.get_orgs(),
contact_preferences=[
'prefers_email',
'prefers_sms'
],
email='test@gmail.com',
phone_number='4152124848',
)
sub = factories.FormSubmissionWithOrgsFactory.create(
applicant=applicant,
organizations=self.get_orgs(),
answers=answers)
with self.assertLogs(
'project.services.logging_service', logging.INFO) as logs:
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(
len(self.notifications.email_confirmation.send.mock_calls), 1)
self.assertEqual(
len(self.notifications.sms_confirmation.send.mock_calls), 1)
assertInLogsCount(logs, {'event_name=app_confirmation_sent': 1})
def test_notifications_and_logs_for_no_contact_preferences(self):
applicant = factories.ApplicantFactory()
answers = get_answers_for_orgs(
self.get_orgs(),
contact_preferences=[],
email='test@gmail.com',
phone_number='4152124848',
)
sub = factories.FormSubmissionWithOrgsFactory.create(
applicant=applicant,
organizations=self.get_orgs(),
answers=answers)
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(
len(self.notifications.email_confirmation.send.mock_calls), 0)
self.assertEqual(
len(self.notifications.sms_confirmation.send.mock_calls), 0)
def test_notifications_and_logs_for_one_contact_preference(self):
applicant = factories.ApplicantFactory()
answers = get_answers_for_orgs(
self.get_orgs(),
contact_preferences=['prefers_email'],
email='test@gmail.com',
phone_number='4152124848',
)
sub = factories.FormSubmissionWithOrgsFactory.create(
applicant=applicant,
organizations=self.get_orgs(),
answers=answers)
with self.assertLogs(
'project.services.logging_service', logging.INFO) as logs:
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(
len(self.notifications.email_confirmation.send.mock_calls), 1)
self.assertEqual(
len(self.notifications.sms_confirmation.send.mock_calls), 0)
assertInLogsCount(logs, {'event_name=app_confirmation_sent': 1})
def get_notification_bodies(patched_send):
email, sms = patched_send.mock_calls
stuff, sms_args, sms_kwargs = sms
stuff, email_args, email_kwargs = email
return sms_kwargs['body'], email_kwargs['body']
class TestSendConfirmationNotificationsRenderedOutput(TestCase):
fixtures = ['counties', 'organizations']
@patch('intake.notifications.SimpleFrontNotification.send')
def test_notifications_with_only_unlisted_counties(self, send):
orgs = [Organization.objects.get(slug='cfa')]
sub = factories.FormSubmissionWithOrgsFactory(
organizations=orgs,
answers=get_answers_for_orgs(
orgs, unlisted_counties="O‘Duinn County",
contact_preferences=['prefers_email', 'prefers_sms']))
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(len(send.mock_calls), 2)
sms_body, email_body = get_notification_bodies(send)
self.assertIn("O‘Duinn County", sms_body)
self.assertIn("O‘Duinn County", email_body)
self.assertIn("we'll contact you in the next week", sms_body)
self.assertIn("We will contact you in the next week", email_body)
@patch('intake.notifications.SimpleFrontNotification.send')
def test_notifications_with_both_partner_and_unlisted_counties(self, send):
orgs = [
Organization.objects.get(slug='cfa'),
Organization.objects.get(slug='cc_pubdef')]
sub = factories.FormSubmissionWithOrgsFactory(
organizations=orgs,
answers=get_answers_for_orgs(
orgs, unlisted_counties="O‘Duinn County",
contact_preferences=['prefers_email', 'prefers_sms']))
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(len(send.mock_calls), 2)
sms_body, email_body = get_notification_bodies(send)
self.assertIn("O‘Duinn County", sms_body)
self.assertIn("O‘Duinn County", email_body)
self.assertIn(orgs[1].short_confirmation_message, sms_body)
self.assertIn(orgs[1].long_confirmation_message, email_body)
self.assertIn("we'll contact you in the next week", sms_body)
self.assertIn("We will contact you in the next week", email_body)
@patch('intake.notifications.SimpleFrontNotification.send')
def test_notifications_with_only_partner_counties(self, send):
orgs = [Organization.objects.get(slug='cc_pubdef')]
sub = factories.FormSubmissionWithOrgsFactory(
organizations=orgs,
answers=get_answers_for_orgs(
orgs, contact_preferences=['prefers_email', 'prefers_sms']))
SubmissionsService.send_confirmation_notifications(sub)
self.assertEqual(len(send.mock_calls), 2)
sms_body, email_body = get_notification_bodies(send)
self.assertIn(orgs[0].short_confirmation_message, sms_body)
self.assertIn(orgs[0].long_confirmation_message, email_body)
self.assertNotIn("we'll contact you in the next week", sms_body)
self.assertNotIn("We will contact you in the next week", email_body)
class TestSendToNewappsBundleIfNeeded(TestCase):
fixtures = ['counties', 'organizations']
@patch('intake.tasks.add_application_pdfs')
def test_calls_task_if_sf_in_sub(self, add_application_pdfs):
sf_pubdef = Organization.objects.get(
slug='sf_pubdef')
sub = factories.FormSubmissionWithOrgsFactory(
organizations=[sf_pubdef])
SubmissionsService.send_to_newapps_bundle_if_needed(sub, [sf_pubdef])
add_application_pdfs.assert_called_with(
sub.applications.first().id)
@patch('intake.tasks.add_application_pdfs')
def test_does_not_call_task_if_not_sf(self, add_application_pdfs):
a_pubdef = Organization.objects.get(
slug='a_pubdef')
sub = factories.FormSubmissionWithOrgsFactory(
organizations=[a_pubdef])
SubmissionsService.send_to_newapps_bundle_if_needed(sub, [a_pubdef])
add_application_pdfs.assert_not_called()
class TestQualifiesForFeeWaiver(TestCase):
fixtures = ['counties', 'organizations']
def test_qualifies_for_fee_waiver_with_public_benefits(self):
sub = models.FormSubmission(
answers=mock.fake.ebclc_answers(on_public_benefits=YES))
self.assertEqual(
SubmissionsService.qualifies_for_fee_waiver(sub), True)
def test_qualifies_for_fee_waiver_with_no_income(self):
sub = models.FormSubmission(
answers=mock.fake.ebclc_answers(
household_size=0,
monthly_income=0))
self.assertTrue(SubmissionsService.qualifies_for_fee_waiver(sub))
def test_doesnt_qualify_for_fee_waiver_with_income_and_no_benefits(self):
sub = models.FormSubmission(
answers=mock.fake.ebclc_answers(
on_public_benefits=NO, household_size=11))
sub.answers['monthly_income'] = (FEE_WAIVER_LEVELS[12] / 12) + 1
self.assertEqual(
SubmissionsService.qualifies_for_fee_waiver(sub), False)
def test_doesnt_qualify_for_fee_waiver_without_valid_inputs(self):
sub = models.FormSubmission(answers={})
self.assertEqual(
SubmissionsService.qualifies_for_fee_waiver(sub), None)
class TestGetAllCnlSubmissions(TestCase):
def test_gets_all_cnl_submissions(self):
cfa = Organization.objects.get(
slug='cfa')
sf_pubdef = Organization.objects.get(
slug='sf_pubdef')
cnl_sub1 = factories.FormSubmissionWithOrgsFactory(
organizations=[cfa])
cnl_sub2 = factories.FormSubmissionWithOrgsFactory(
organizations=[cfa])
other_sub = factories.FormSubmissionWithOrgsFactory(
organizations=[sf_pubdef])
cnl_subs = SubmissionsService.get_all_cnl_submissions(0)
self.assertEqual(len(cnl_subs.object_list), 2)
| true | true |
f727240f97e54b1fa0c0d75687b19d2e132d762b | 1,245 | py | Python | restaurant/urls.py | ugleiton/Restaurant-Website | 63473bf1e27ee71c082d1065fcb3ea949ec95da1 | [
"MIT"
] | null | null | null | restaurant/urls.py | ugleiton/Restaurant-Website | 63473bf1e27ee71c082d1065fcb3ea949ec95da1 | [
"MIT"
] | null | null | null | restaurant/urls.py | ugleiton/Restaurant-Website | 63473bf1e27ee71c082d1065fcb3ea949ec95da1 | [
"MIT"
] | null | null | null | """restaurant URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static
from index.views import home, about
from contact.views import contact
urlpatterns = [
path('', home, name="home"),
path('about/', about, name="about"),
path('contact/', contact, name="contact_us"),
path('admin/', admin.site.urls),
path('menu/', include('menu.urls', namespace='menu')),
]
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) | 40.16129 | 78 | 0.724498 | from django.conf import settings
from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static
from index.views import home, about
from contact.views import contact
urlpatterns = [
path('', home, name="home"),
path('about/', about, name="about"),
path('contact/', contact, name="contact_us"),
path('admin/', admin.site.urls),
path('menu/', include('menu.urls', namespace='menu')),
]
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) | true | true |
f727248befee3dfa1776794c2e1e23214fd8cac8 | 262 | py | Python | finmeter/sentiment/__init__.py | mikahama/FinMeter | fd1d3d8feb216e6247a1eeac3bac16a9dd235e66 | [
"Apache-2.0"
] | 5 | 2019-10-06T20:13:32.000Z | 2021-11-07T14:27:02.000Z | finmeter/sentiment/__init__.py | mikahama/FinMeter | fd1d3d8feb216e6247a1eeac3bac16a9dd235e66 | [
"Apache-2.0"
] | null | null | null | finmeter/sentiment/__init__.py | mikahama/FinMeter | fd1d3d8feb216e6247a1eeac3bac16a9dd235e66 | [
"Apache-2.0"
] | null | null | null | from .predict_sentiment import predict as _predict
def predict(sentence):
r = _predict([sentence])[0]
if r == 0:
#positive
return 1
elif r == 1:
#strongly positive
return 2
elif r == 2:
#negative
return -1
else:
#strongly negative
return -2 | 16.375 | 50 | 0.671756 | from .predict_sentiment import predict as _predict
def predict(sentence):
r = _predict([sentence])[0]
if r == 0:
return 1
elif r == 1:
return 2
elif r == 2:
return -1
else:
return -2 | true | true |
f72726193d6a6874ed012cc02ed9030e36debec2 | 84,269 | py | Python | tests/fields/test_fields.py | SolarTech/mongoengine | 772096ec55963fc6b079b84ccac2a9917deb9204 | [
"MIT"
] | null | null | null | tests/fields/test_fields.py | SolarTech/mongoengine | 772096ec55963fc6b079b84ccac2a9917deb9204 | [
"MIT"
] | null | null | null | tests/fields/test_fields.py | SolarTech/mongoengine | 772096ec55963fc6b079b84ccac2a9917deb9204 | [
"MIT"
] | null | null | null | import datetime
import unittest
from bson import DBRef, ObjectId, SON
import pytest
from mongoengine import (
BooleanField,
ComplexDateTimeField,
DateField,
DateTimeField,
DictField,
Document,
DoesNotExist,
DynamicDocument,
DynamicField,
EmbeddedDocument,
EmbeddedDocumentField,
EmbeddedDocumentListField,
FieldDoesNotExist,
FloatField,
GenericLazyReferenceField,
GenericReferenceField,
IntField,
LazyReferenceField,
ListField,
MultipleObjectsReturned,
NotRegistered,
NotUniqueError,
ObjectIdField,
OperationError,
ReferenceField,
SortedListField,
StringField,
ValidationError,
)
from mongoengine.base import BaseField, EmbeddedDocumentList, _document_registry
from mongoengine.errors import DeprecatedError
from tests.utils import MongoDBTestCase
class TestField(MongoDBTestCase):
def test_default_values_nothing_set(self):
"""Ensure that default field values are used when creating
a document.
"""
class Person(Document):
name = StringField()
age = IntField(default=30, required=False)
userid = StringField(default=lambda: "test", required=True)
created = DateTimeField(default=datetime.datetime.utcnow)
day = DateField(default=datetime.date.today)
person = Person(name="Ross")
# Confirm saving now would store values
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "day", "name", "userid"]
assert person.validate() is None
assert person.name == person.name
assert person.age == person.age
assert person.userid == person.userid
assert person.created == person.created
assert person.day == person.day
assert person._data["name"] == person.name
assert person._data["age"] == person.age
assert person._data["userid"] == person.userid
assert person._data["created"] == person.created
assert person._data["day"] == person.day
# Confirm introspection changes nothing
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "day", "name", "userid"]
def test_custom_field_validation_raise_deprecated_error_when_validation_return_something(
self,
):
# Covers introduction of a breaking change in the validation parameter (0.18)
def _not_empty(z):
return bool(z)
class Person(Document):
name = StringField(validation=_not_empty)
Person.drop_collection()
error = (
"validation argument for `name` must not return anything, "
"it should raise a ValidationError if validation fails"
)
with pytest.raises(DeprecatedError) as exc_info:
Person(name="").validate()
assert str(exc_info.value) == error
with pytest.raises(DeprecatedError) as exc_info:
Person(name="").save()
assert str(exc_info.value) == error
def test_custom_field_validation_raise_validation_error(self):
def _not_empty(z):
if not z:
raise ValidationError("cantbeempty")
class Person(Document):
name = StringField(validation=_not_empty)
Person.drop_collection()
with pytest.raises(ValidationError) as exc_info:
Person(name="").validate()
assert "ValidationError (Person:None) (cantbeempty: ['name'])" == str(
exc_info.value
)
Person(name="garbage").validate()
Person(name="garbage").save()
def test_default_values_set_to_None(self):
"""Ensure that default field values are used even when
we explcitly initialize the doc with None values.
"""
class Person(Document):
name = StringField()
age = IntField(default=30, required=False)
userid = StringField(default=lambda: "test", required=True)
created = DateTimeField(default=datetime.datetime.utcnow)
# Trying setting values to None
person = Person(name=None, age=None, userid=None, created=None)
# Confirm saving now would store values
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
assert person.validate() is None
assert person.name == person.name
assert person.age == person.age
assert person.userid == person.userid
assert person.created == person.created
assert person._data["name"] == person.name
assert person._data["age"] == person.age
assert person._data["userid"] == person.userid
assert person._data["created"] == person.created
# Confirm introspection changes nothing
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
def test_default_values_when_setting_to_None(self):
"""Ensure that default field values are used when creating
a document.
"""
class Person(Document):
name = StringField()
age = IntField(default=30, required=False)
userid = StringField(default=lambda: "test", required=True)
created = DateTimeField(default=datetime.datetime.utcnow)
person = Person()
person.name = None
person.age = None
person.userid = None
person.created = None
# Confirm saving now would store values
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
assert person.validate() is None
assert person.name is None
assert person.age == 30
assert person.userid == "test"
assert isinstance(person.created, datetime.datetime)
assert person._data["name"] == person.name
assert person._data["age"] == person.age
assert person._data["userid"] == person.userid
assert person._data["created"] == person.created
# Confirm introspection changes nothing
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
def test_default_value_is_not_used_when_changing_value_to_empty_list_for_strict_doc(
self,
):
"""List field with default can be set to the empty list (strict)"""
# Issue #1733
class Doc(Document):
x = ListField(IntField(), default=lambda: [42])
doc = Doc(x=[1]).save()
doc.x = []
doc.save()
reloaded = Doc.objects.get(id=doc.id)
assert reloaded.x == []
def test_default_value_is_not_used_when_changing_value_to_empty_list_for_dyn_doc(
self,
):
"""List field with default can be set to the empty list (dynamic)"""
# Issue #1733
class Doc(DynamicDocument):
x = ListField(IntField(), default=lambda: [42])
doc = Doc(x=[1]).save()
doc.x = []
doc.y = 2 # Was triggering the bug
doc.save()
reloaded = Doc.objects.get(id=doc.id)
assert reloaded.x == []
def test_default_values_when_deleting_value(self):
"""Ensure that default field values are used after non-default
values are explicitly deleted.
"""
class Person(Document):
name = StringField()
age = IntField(default=30, required=False)
userid = StringField(default=lambda: "test", required=True)
created = DateTimeField(default=datetime.datetime.utcnow)
person = Person(
name="Ross",
age=50,
userid="different",
created=datetime.datetime(2014, 6, 12),
)
del person.name
del person.age
del person.userid
del person.created
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
assert person.validate() is None
assert person.name is None
assert person.age == 30
assert person.userid == "test"
assert isinstance(person.created, datetime.datetime)
assert person.created != datetime.datetime(2014, 6, 12)
assert person._data["name"] == person.name
assert person._data["age"] == person.age
assert person._data["userid"] == person.userid
assert person._data["created"] == person.created
# Confirm introspection changes nothing
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
def test_required_values(self):
"""Ensure that required field constraints are enforced."""
class Person(Document):
name = StringField(required=True)
age = IntField(required=True)
userid = StringField()
person = Person(name="Test User")
with pytest.raises(ValidationError):
person.validate()
person = Person(age=30)
with pytest.raises(ValidationError):
person.validate()
def test_not_required_handles_none_in_update(self):
"""Ensure that every fields should accept None if required is
False.
"""
class HandleNoneFields(Document):
str_fld = StringField()
int_fld = IntField()
flt_fld = FloatField()
comp_dt_fld = ComplexDateTimeField()
HandleNoneFields.drop_collection()
doc = HandleNoneFields()
doc.str_fld = "spam ham egg"
doc.int_fld = 42
doc.flt_fld = 4.2
doc.com_dt_fld = datetime.datetime.utcnow()
doc.save()
res = HandleNoneFields.objects(id=doc.id).update(
set__str_fld=None,
set__int_fld=None,
set__flt_fld=None,
set__comp_dt_fld=None,
)
assert res == 1
# Retrive data from db and verify it.
ret = HandleNoneFields.objects.all()[0]
assert ret.str_fld is None
assert ret.int_fld is None
assert ret.flt_fld is None
assert ret.comp_dt_fld is None
def test_not_required_handles_none_from_database(self):
"""Ensure that every field can handle null values from the
database.
"""
class HandleNoneFields(Document):
str_fld = StringField(required=True)
int_fld = IntField(required=True)
flt_fld = FloatField(required=True)
comp_dt_fld = ComplexDateTimeField(required=True)
HandleNoneFields.drop_collection()
doc = HandleNoneFields()
doc.str_fld = "spam ham egg"
doc.int_fld = 42
doc.flt_fld = 4.2
doc.comp_dt_fld = datetime.datetime.utcnow()
doc.save()
# Unset all the fields
HandleNoneFields._get_collection().update_one(
{"_id": doc.id},
{"$unset": {"str_fld": 1, "int_fld": 1, "flt_fld": 1, "comp_dt_fld": 1}},
)
# Retrive data from db and verify it.
ret = HandleNoneFields.objects.first()
assert ret.str_fld is None
assert ret.int_fld is None
assert ret.flt_fld is None
assert ret.comp_dt_fld is None
# Retrieved object shouldn't pass validation when a re-save is
# attempted.
with pytest.raises(ValidationError):
ret.validate()
def test_default_id_validation_as_objectid(self):
"""Ensure that invalid values cannot be assigned to an
ObjectIdField.
"""
class Person(Document):
name = StringField()
person = Person(name="Test User")
assert person.id is None
person.id = 47
with pytest.raises(ValidationError):
person.validate()
person.id = "abc"
with pytest.raises(ValidationError):
person.validate()
person.id = str(ObjectId())
person.validate()
def test_db_field_validation(self):
"""Ensure that db_field doesn't accept invalid values."""
# dot in the name
with pytest.raises(ValueError):
class User(Document):
name = StringField(db_field="user.name")
# name starting with $
with pytest.raises(ValueError):
class UserX1(Document):
name = StringField(db_field="$name")
# name containing a null character
with pytest.raises(ValueError):
class UserX2(Document):
name = StringField(db_field="name\0")
def test_list_validation(self):
"""Ensure that a list field only accepts lists with valid elements."""
access_level_choices = (
("a", "Administration"),
("b", "Manager"),
("c", "Staff"),
)
class User(Document):
pass
class Comment(EmbeddedDocument):
content = StringField()
class BlogPost(Document):
content = StringField()
comments = ListField(EmbeddedDocumentField(Comment))
tags = ListField(StringField())
authors = ListField(ReferenceField(User))
authors_as_lazy = ListField(LazyReferenceField(User))
generic = ListField(GenericReferenceField())
generic_as_lazy = ListField(GenericLazyReferenceField())
access_list = ListField(choices=access_level_choices, display_sep=", ")
User.drop_collection()
BlogPost.drop_collection()
post = BlogPost(content="Went for a walk today...")
post.validate()
post.tags = "fun"
with pytest.raises(ValidationError):
post.validate()
post.tags = [1, 2]
with pytest.raises(ValidationError):
post.validate()
post.tags = ["fun", "leisure"]
post.validate()
post.tags = ("fun", "leisure")
post.validate()
post.access_list = "a,b"
with pytest.raises(ValidationError):
post.validate()
post.access_list = ["c", "d"]
with pytest.raises(ValidationError):
post.validate()
post.access_list = ["a", "b"]
post.validate()
assert post.get_access_list_display() == "Administration, Manager"
post.comments = ["a"]
with pytest.raises(ValidationError):
post.validate()
post.comments = "yay"
with pytest.raises(ValidationError):
post.validate()
comments = [Comment(content="Good for you"), Comment(content="Yay.")]
post.comments = comments
post.validate()
post.authors = [Comment()]
with pytest.raises(ValidationError):
post.validate()
post.authors = [User()]
with pytest.raises(ValidationError):
post.validate()
user = User()
user.save()
post.authors = [user]
post.validate()
post.authors_as_lazy = [Comment()]
with pytest.raises(ValidationError):
post.validate()
post.authors_as_lazy = [User()]
with pytest.raises(ValidationError):
post.validate()
post.authors_as_lazy = [user]
post.validate()
post.generic = [1, 2]
with pytest.raises(ValidationError):
post.validate()
post.generic = [User(), Comment()]
with pytest.raises(ValidationError):
post.validate()
post.generic = [Comment()]
with pytest.raises(ValidationError):
post.validate()
post.generic = [user]
post.validate()
post.generic_as_lazy = [1, 2]
with pytest.raises(ValidationError):
post.validate()
post.generic_as_lazy = [User(), Comment()]
with pytest.raises(ValidationError):
post.validate()
post.generic_as_lazy = [Comment()]
with pytest.raises(ValidationError):
post.validate()
post.generic_as_lazy = [user]
post.validate()
def test_sorted_list_sorting(self):
"""Ensure that a sorted list field properly sorts values."""
class Comment(EmbeddedDocument):
order = IntField()
content = StringField()
class BlogPost(Document):
content = StringField()
comments = SortedListField(EmbeddedDocumentField(Comment), ordering="order")
tags = SortedListField(StringField())
BlogPost.drop_collection()
post = BlogPost(content="Went for a walk today...")
post.save()
post.tags = ["leisure", "fun"]
post.save()
post.reload()
assert post.tags == ["fun", "leisure"]
comment1 = Comment(content="Good for you", order=1)
comment2 = Comment(content="Yay.", order=0)
comments = [comment1, comment2]
post.comments = comments
post.save()
post.reload()
assert post.comments[0].content == comment2.content
assert post.comments[1].content == comment1.content
post.comments[0].order = 2
post.save()
post.reload()
assert post.comments[0].content == comment1.content
assert post.comments[1].content == comment2.content
def test_reverse_list_sorting(self):
"""Ensure that a reverse sorted list field properly sorts values"""
class Category(EmbeddedDocument):
count = IntField()
name = StringField()
class CategoryList(Document):
categories = SortedListField(
EmbeddedDocumentField(Category), ordering="count", reverse=True
)
name = StringField()
CategoryList.drop_collection()
catlist = CategoryList(name="Top categories")
cat1 = Category(name="posts", count=10)
cat2 = Category(name="food", count=100)
cat3 = Category(name="drink", count=40)
catlist.categories = [cat1, cat2, cat3]
catlist.save()
catlist.reload()
assert catlist.categories[0].name == cat2.name
assert catlist.categories[1].name == cat3.name
assert catlist.categories[2].name == cat1.name
def test_list_field(self):
"""Ensure that list types work as expected."""
class BlogPost(Document):
info = ListField()
BlogPost.drop_collection()
post = BlogPost()
post.info = "my post"
with pytest.raises(ValidationError):
post.validate()
post.info = {"title": "test"}
with pytest.raises(ValidationError):
post.validate()
post.info = ["test"]
post.save()
post = BlogPost()
post.info = [{"test": "test"}]
post.save()
post = BlogPost()
post.info = [{"test": 3}]
post.save()
assert BlogPost.objects.count() == 3
assert BlogPost.objects.filter(info__exact="test").count() == 1
assert BlogPost.objects.filter(info__0__test="test").count() == 1
# Confirm handles non strings or non existing keys
assert BlogPost.objects.filter(info__0__test__exact="5").count() == 0
assert BlogPost.objects.filter(info__100__test__exact="test").count() == 0
# test queries by list
post = BlogPost()
post.info = ["1", "2"]
post.save()
post = BlogPost.objects(info=["1", "2"]).get()
post.info += ["3", "4"]
post.save()
assert BlogPost.objects(info=["1", "2", "3", "4"]).count() == 1
post = BlogPost.objects(info=["1", "2", "3", "4"]).get()
post.info *= 2
post.save()
assert (
BlogPost.objects(info=["1", "2", "3", "4", "1", "2", "3", "4"]).count() == 1
)
def test_list_field_manipulative_operators(self):
"""Ensure that ListField works with standard list operators that manipulate the list."""
class BlogPost(Document):
ref = StringField()
info = ListField(StringField())
BlogPost.drop_collection()
post = BlogPost()
post.ref = "1234"
post.info = ["0", "1", "2", "3", "4", "5"]
post.save()
def reset_post():
post.info = ["0", "1", "2", "3", "4", "5"]
post.save()
# '__add__(listB)'
# listA+listB
# operator.add(listA, listB)
reset_post()
temp = ["a", "b"]
post.info = post.info + temp
assert post.info == ["0", "1", "2", "3", "4", "5", "a", "b"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "a", "b"]
# '__delitem__(index)'
# aka 'del list[index]'
# aka 'operator.delitem(list, index)'
reset_post()
del post.info[2] # del from middle ('2')
assert post.info == ["0", "1", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "3", "4", "5"]
# '__delitem__(slice(i, j))'
# aka 'del list[i:j]'
# aka 'operator.delitem(list, slice(i,j))'
reset_post()
del post.info[1:3] # removes '1', '2'
assert post.info == ["0", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "3", "4", "5"]
# '__iadd__'
# aka 'list += list'
reset_post()
temp = ["a", "b"]
post.info += temp
assert post.info == ["0", "1", "2", "3", "4", "5", "a", "b"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "a", "b"]
# '__imul__'
# aka 'list *= number'
reset_post()
post.info *= 2
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
# '__mul__'
# aka 'listA*listB'
reset_post()
post.info = post.info * 2
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
# '__rmul__'
# aka 'listB*listA'
reset_post()
post.info = 2 * post.info
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
# '__setitem__(index, value)'
# aka 'list[index]=value'
# aka 'setitem(list, value)'
reset_post()
post.info[4] = "a"
assert post.info == ["0", "1", "2", "3", "a", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "a", "5"]
# __setitem__(index, value) with a negative index
reset_post()
post.info[-2] = "a"
assert post.info == ["0", "1", "2", "3", "a", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "a", "5"]
# '__setitem__(slice(i, j), listB)'
# aka 'listA[i:j] = listB'
# aka 'setitem(listA, slice(i, j), listB)'
reset_post()
post.info[1:3] = ["h", "e", "l", "l", "o"]
assert post.info == ["0", "h", "e", "l", "l", "o", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "h", "e", "l", "l", "o", "3", "4", "5"]
# '__setitem__(slice(i, j), listB)' with negative i and j
reset_post()
post.info[-5:-3] = ["h", "e", "l", "l", "o"]
assert post.info == ["0", "h", "e", "l", "l", "o", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "h", "e", "l", "l", "o", "3", "4", "5"]
# negative
# 'append'
reset_post()
post.info.append("h")
assert post.info == ["0", "1", "2", "3", "4", "5", "h"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "h"]
# 'extend'
reset_post()
post.info.extend(["h", "e", "l", "l", "o"])
assert post.info == ["0", "1", "2", "3", "4", "5", "h", "e", "l", "l", "o"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "h", "e", "l", "l", "o"]
# 'insert'
# 'pop'
reset_post()
x = post.info.pop(2)
y = post.info.pop()
assert post.info == ["0", "1", "3", "4"]
assert x == "2"
assert y == "5"
post.save()
post.reload()
assert post.info == ["0", "1", "3", "4"]
# 'remove'
reset_post()
post.info.remove("2")
assert post.info == ["0", "1", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "3", "4", "5"]
# 'reverse'
reset_post()
post.info.reverse()
assert post.info == ["5", "4", "3", "2", "1", "0"]
post.save()
post.reload()
assert post.info == ["5", "4", "3", "2", "1", "0"]
# 'sort': though this operator method does manipulate the list, it is
# tested in the 'test_list_field_lexicograpic_operators' function
def test_list_field_invalid_operators(self):
class BlogPost(Document):
ref = StringField()
info = ListField(StringField())
post = BlogPost()
post.ref = "1234"
post.info = ["0", "1", "2", "3", "4", "5"]
# '__hash__'
# aka 'hash(list)'
with pytest.raises(TypeError):
hash(post.info)
def test_list_field_lexicographic_operators(self):
"""Ensure that ListField works with standard list operators that
do lexigraphic ordering.
"""
class BlogPost(Document):
ref = StringField()
text_info = ListField(StringField())
oid_info = ListField(ObjectIdField())
bool_info = ListField(BooleanField())
BlogPost.drop_collection()
blogSmall = BlogPost(ref="small")
blogSmall.text_info = ["a", "a", "a"]
blogSmall.bool_info = [False, False]
blogSmall.save()
blogSmall.reload()
blogLargeA = BlogPost(ref="big")
blogLargeA.text_info = ["a", "z", "j"]
blogLargeA.bool_info = [False, True]
blogLargeA.save()
blogLargeA.reload()
blogLargeB = BlogPost(ref="big2")
blogLargeB.text_info = ["a", "z", "j"]
blogLargeB.oid_info = [
"54495ad94c934721ede76f90",
"54495ad94c934721ede76d23",
"54495ad94c934721ede76d00",
]
blogLargeB.bool_info = [False, True]
blogLargeB.save()
blogLargeB.reload()
# '__eq__' aka '=='
assert blogLargeA.text_info == blogLargeB.text_info
assert blogLargeA.bool_info == blogLargeB.bool_info
# '__ge__' aka '>='
assert blogLargeA.text_info >= blogSmall.text_info
assert blogLargeA.text_info >= blogLargeB.text_info
assert blogLargeA.bool_info >= blogSmall.bool_info
assert blogLargeA.bool_info >= blogLargeB.bool_info
# '__gt__' aka '>'
assert blogLargeA.text_info >= blogSmall.text_info
assert blogLargeA.bool_info >= blogSmall.bool_info
# '__le__' aka '<='
assert blogSmall.text_info <= blogLargeB.text_info
assert blogLargeA.text_info <= blogLargeB.text_info
assert blogSmall.bool_info <= blogLargeB.bool_info
assert blogLargeA.bool_info <= blogLargeB.bool_info
# '__lt__' aka '<'
assert blogSmall.text_info < blogLargeB.text_info
assert blogSmall.bool_info < blogLargeB.bool_info
# '__ne__' aka '!='
assert blogSmall.text_info != blogLargeB.text_info
assert blogSmall.bool_info != blogLargeB.bool_info
# 'sort'
blogLargeB.bool_info = [True, False, True, False]
blogLargeB.text_info.sort()
blogLargeB.oid_info.sort()
blogLargeB.bool_info.sort()
sorted_target_list = [
ObjectId("54495ad94c934721ede76d00"),
ObjectId("54495ad94c934721ede76d23"),
ObjectId("54495ad94c934721ede76f90"),
]
assert blogLargeB.text_info == ["a", "j", "z"]
assert blogLargeB.oid_info == sorted_target_list
assert blogLargeB.bool_info == [False, False, True, True]
blogLargeB.save()
blogLargeB.reload()
assert blogLargeB.text_info == ["a", "j", "z"]
assert blogLargeB.oid_info == sorted_target_list
assert blogLargeB.bool_info == [False, False, True, True]
def test_list_assignment(self):
"""Ensure that list field element assignment and slicing work."""
class BlogPost(Document):
info = ListField()
BlogPost.drop_collection()
post = BlogPost()
post.info = ["e1", "e2", 3, "4", 5]
post.save()
post.info[0] = 1
post.save()
post.reload()
assert post.info[0] == 1
post.info[1:3] = ["n2", "n3"]
post.save()
post.reload()
assert post.info == [1, "n2", "n3", "4", 5]
post.info[-1] = "n5"
post.save()
post.reload()
assert post.info == [1, "n2", "n3", "4", "n5"]
post.info[-2] = 4
post.save()
post.reload()
assert post.info == [1, "n2", "n3", 4, "n5"]
post.info[1:-1] = [2]
post.save()
post.reload()
assert post.info == [1, 2, "n5"]
post.info[:-1] = [1, "n2", "n3", 4]
post.save()
post.reload()
assert post.info == [1, "n2", "n3", 4, "n5"]
post.info[-4:3] = [2, 3]
post.save()
post.reload()
assert post.info == [1, 2, 3, 4, "n5"]
def test_list_field_passed_in_value(self):
class Foo(Document):
bars = ListField(ReferenceField("Bar"))
class Bar(Document):
text = StringField()
bar = Bar(text="hi")
bar.save()
foo = Foo(bars=[])
foo.bars.append(bar)
assert repr(foo.bars) == "[<Bar: Bar object>]"
def test_list_field_strict(self):
"""Ensure that list field handles validation if provided
a strict field type.
"""
class Simple(Document):
mapping = ListField(field=IntField())
Simple.drop_collection()
e = Simple()
e.mapping = [1]
e.save()
# try creating an invalid mapping
with pytest.raises(ValidationError):
e.mapping = ["abc"]
e.save()
def test_list_field_max_length(self):
"""Ensure ListField's max_length is respected."""
class Foo(Document):
items = ListField(IntField(), max_length=5)
foo = Foo()
for i in range(1, 7):
foo.items.append(i)
if i < 6:
foo.save()
else:
with pytest.raises(ValidationError) as exc_info:
foo.save()
assert "List is too long" in str(exc_info.value)
def test_list_field_max_length_set_operator(self):
"""Ensure ListField's max_length is respected for a "set" operator."""
class Foo(Document):
items = ListField(IntField(), max_length=3)
foo = Foo.objects.create(items=[1, 2, 3])
with pytest.raises(ValidationError) as exc_info:
foo.modify(set__items=[1, 2, 3, 4])
assert "List is too long" in str(exc_info.value)
def test_list_field_rejects_strings(self):
"""Strings aren't valid list field data types."""
class Simple(Document):
mapping = ListField()
Simple.drop_collection()
e = Simple()
e.mapping = "hello world"
with pytest.raises(ValidationError):
e.save()
def test_complex_field_required(self):
"""Ensure required cant be None / Empty."""
class Simple(Document):
mapping = ListField(required=True)
Simple.drop_collection()
e = Simple()
e.mapping = []
with pytest.raises(ValidationError):
e.save()
class Simple(Document):
mapping = DictField(required=True)
Simple.drop_collection()
e = Simple()
e.mapping = {}
with pytest.raises(ValidationError):
e.save()
def test_complex_field_same_value_not_changed(self):
"""If a complex field is set to the same value, it should not
be marked as changed.
"""
class Simple(Document):
mapping = ListField()
Simple.drop_collection()
e = Simple().save()
e.mapping = []
assert e._changed_fields == []
class Simple(Document):
mapping = DictField()
Simple.drop_collection()
e = Simple().save()
e.mapping = {}
assert e._changed_fields == []
def test_slice_marks_field_as_changed(self):
class Simple(Document):
widgets = ListField()
simple = Simple(widgets=[1, 2, 3, 4]).save()
simple.widgets[:3] = []
assert ["widgets"] == simple._changed_fields
simple.save()
simple = simple.reload()
assert simple.widgets == [4]
def test_del_slice_marks_field_as_changed(self):
class Simple(Document):
widgets = ListField()
simple = Simple(widgets=[1, 2, 3, 4]).save()
del simple.widgets[:3]
assert ["widgets"] == simple._changed_fields
simple.save()
simple = simple.reload()
assert simple.widgets == [4]
def test_list_field_with_negative_indices(self):
class Simple(Document):
widgets = ListField()
simple = Simple(widgets=[1, 2, 3, 4]).save()
simple.widgets[-1] = 5
assert ["widgets.3"] == simple._changed_fields
simple.save()
simple = simple.reload()
assert simple.widgets == [1, 2, 3, 5]
def test_list_field_complex(self):
"""Ensure that the list fields can handle the complex types."""
class SettingBase(EmbeddedDocument):
meta = {"allow_inheritance": True}
class StringSetting(SettingBase):
value = StringField()
class IntegerSetting(SettingBase):
value = IntField()
class Simple(Document):
mapping = ListField()
Simple.drop_collection()
e = Simple()
e.mapping.append(StringSetting(value="foo"))
e.mapping.append(IntegerSetting(value=42))
e.mapping.append(
{
"number": 1,
"string": "Hi!",
"float": 1.001,
"complex": IntegerSetting(value=42),
"list": [IntegerSetting(value=42), StringSetting(value="foo")],
}
)
e.save()
e2 = Simple.objects.get(id=e.id)
assert isinstance(e2.mapping[0], StringSetting)
assert isinstance(e2.mapping[1], IntegerSetting)
# Test querying
assert Simple.objects.filter(mapping__1__value=42).count() == 1
assert Simple.objects.filter(mapping__2__number=1).count() == 1
assert Simple.objects.filter(mapping__2__complex__value=42).count() == 1
assert Simple.objects.filter(mapping__2__list__0__value=42).count() == 1
assert Simple.objects.filter(mapping__2__list__1__value="foo").count() == 1
# Confirm can update
Simple.objects().update(set__mapping__1=IntegerSetting(value=10))
assert Simple.objects.filter(mapping__1__value=10).count() == 1
Simple.objects().update(set__mapping__2__list__1=StringSetting(value="Boo"))
assert Simple.objects.filter(mapping__2__list__1__value="foo").count() == 0
assert Simple.objects.filter(mapping__2__list__1__value="Boo").count() == 1
def test_embedded_db_field(self):
class Embedded(EmbeddedDocument):
number = IntField(default=0, db_field="i")
class Test(Document):
embedded = EmbeddedDocumentField(Embedded, db_field="x")
Test.drop_collection()
test = Test()
test.embedded = Embedded(number=1)
test.save()
Test.objects.update_one(inc__embedded__number=1)
test = Test.objects.get()
assert test.embedded.number == 2
doc = self.db.test.find_one()
assert doc["x"]["i"] == 2
def test_double_embedded_db_field(self):
"""Make sure multiple layers of embedded docs resolve db fields
properly and can be initialized using dicts.
"""
class C(EmbeddedDocument):
txt = StringField()
class B(EmbeddedDocument):
c = EmbeddedDocumentField(C, db_field="fc")
class A(Document):
b = EmbeddedDocumentField(B, db_field="fb")
a = A(b=B(c=C(txt="hi")))
a.validate()
a = A(b={"c": {"txt": "hi"}})
a.validate()
def test_double_embedded_db_field_from_son(self):
"""Make sure multiple layers of embedded docs resolve db fields
from SON properly.
"""
class C(EmbeddedDocument):
txt = StringField()
class B(EmbeddedDocument):
c = EmbeddedDocumentField(C, db_field="fc")
class A(Document):
b = EmbeddedDocumentField(B, db_field="fb")
a = A._from_son(SON([("fb", SON([("fc", SON([("txt", "hi")]))]))]))
assert a.b.c.txt == "hi"
@pytest.mark.xfail(
reason="Using a string reference in an EmbeddedDocumentField does not work if the class isnt registerd yet",
raises=NotRegistered,
)
def test_embedded_document_field_cant_reference_using_a_str_if_it_does_not_exist_yet(
self,
):
class MyDoc2(Document):
emb = EmbeddedDocumentField("MyFunkyDoc123")
class MyFunkyDoc123(EmbeddedDocument):
name = StringField()
def test_embedded_document_validation(self):
"""Ensure that invalid embedded documents cannot be assigned to
embedded document fields.
"""
class Comment(EmbeddedDocument):
content = StringField()
class PersonPreferences(EmbeddedDocument):
food = StringField(required=True)
number = IntField()
class Person(Document):
name = StringField()
preferences = EmbeddedDocumentField(PersonPreferences)
Person.drop_collection()
person = Person(name="Test User")
person.preferences = "My Preferences"
with pytest.raises(ValidationError):
person.validate()
# Check that only the right embedded doc works
person.preferences = Comment(content="Nice blog post...")
with pytest.raises(ValidationError):
person.validate()
# Check that the embedded doc is valid
person.preferences = PersonPreferences()
with pytest.raises(ValidationError):
person.validate()
person.preferences = PersonPreferences(food="Cheese", number=47)
assert person.preferences.food == "Cheese"
person.validate()
def test_embedded_document_inheritance(self):
"""Ensure that subclasses of embedded documents may be provided
to EmbeddedDocumentFields of the superclass' type.
"""
class User(EmbeddedDocument):
name = StringField()
meta = {"allow_inheritance": True}
class PowerUser(User):
power = IntField()
class BlogPost(Document):
content = StringField()
author = EmbeddedDocumentField(User)
BlogPost.drop_collection()
post = BlogPost(content="What I did today...")
post.author = PowerUser(name="Test User", power=47)
post.save()
assert 47 == BlogPost.objects.first().author.power
def test_embedded_document_inheritance_with_list(self):
"""Ensure that nested list of subclassed embedded documents is
handled correctly.
"""
class Group(EmbeddedDocument):
name = StringField()
content = ListField(StringField())
class Basedoc(Document):
groups = ListField(EmbeddedDocumentField(Group))
meta = {"abstract": True}
class User(Basedoc):
doctype = StringField(require=True, default="userdata")
User.drop_collection()
content = ["la", "le", "lu"]
group = Group(name="foo", content=content)
foobar = User(groups=[group])
foobar.save()
assert content == User.objects.first().groups[0].content
def test_reference_miss(self):
"""Ensure an exception is raised when dereferencing an unknown
document.
"""
class Foo(Document):
pass
class Bar(Document):
ref = ReferenceField(Foo)
generic_ref = GenericReferenceField()
Foo.drop_collection()
Bar.drop_collection()
foo = Foo().save()
bar = Bar(ref=foo, generic_ref=foo).save()
# Reference is no longer valid
foo.delete()
bar = Bar.objects.get()
with pytest.raises(DoesNotExist):
bar.ref
with pytest.raises(DoesNotExist):
bar.generic_ref
# When auto_dereference is disabled, there is no trouble returning DBRef
bar = Bar.objects.get()
expected = foo.to_dbref()
bar._fields["ref"]._auto_dereference = False
assert bar.ref == expected
bar._fields["generic_ref"]._auto_dereference = False
assert bar.generic_ref == {"_ref": expected, "_cls": "Foo"}
def test_list_item_dereference(self):
"""Ensure that DBRef items in ListFields are dereferenced."""
class User(Document):
name = StringField()
class Group(Document):
members = ListField(ReferenceField(User))
User.drop_collection()
Group.drop_collection()
user1 = User(name="user1")
user1.save()
user2 = User(name="user2")
user2.save()
group = Group(members=[user1, user2])
group.save()
group_obj = Group.objects.first()
assert group_obj.members[0].name == user1.name
assert group_obj.members[1].name == user2.name
def test_recursive_reference(self):
"""Ensure that ReferenceFields can reference their own documents."""
class Employee(Document):
name = StringField()
boss = ReferenceField("self")
friends = ListField(ReferenceField("self"))
Employee.drop_collection()
bill = Employee(name="Bill Lumbergh")
bill.save()
michael = Employee(name="Michael Bolton")
michael.save()
samir = Employee(name="Samir Nagheenanajar")
samir.save()
friends = [michael, samir]
peter = Employee(name="Peter Gibbons", boss=bill, friends=friends)
peter.save()
peter = Employee.objects.with_id(peter.id)
assert peter.boss == bill
assert peter.friends == friends
def test_recursive_embedding(self):
"""Ensure that EmbeddedDocumentFields can contain their own documents."""
class TreeNode(EmbeddedDocument):
name = StringField()
children = ListField(EmbeddedDocumentField("self"))
class Tree(Document):
name = StringField()
children = ListField(EmbeddedDocumentField("TreeNode"))
Tree.drop_collection()
tree = Tree(name="Tree")
first_child = TreeNode(name="Child 1")
tree.children.append(first_child)
second_child = TreeNode(name="Child 2")
first_child.children.append(second_child)
tree.save()
tree = Tree.objects.first()
assert len(tree.children) == 1
assert len(tree.children[0].children) == 1
third_child = TreeNode(name="Child 3")
tree.children[0].children.append(third_child)
tree.save()
assert len(tree.children) == 1
assert tree.children[0].name == first_child.name
assert tree.children[0].children[0].name == second_child.name
assert tree.children[0].children[1].name == third_child.name
# Test updating
tree.children[0].name = "I am Child 1"
tree.children[0].children[0].name = "I am Child 2"
tree.children[0].children[1].name = "I am Child 3"
tree.save()
assert tree.children[0].name == "I am Child 1"
assert tree.children[0].children[0].name == "I am Child 2"
assert tree.children[0].children[1].name == "I am Child 3"
# Test removal
assert len(tree.children[0].children) == 2
del tree.children[0].children[1]
tree.save()
assert len(tree.children[0].children) == 1
tree.children[0].children.pop(0)
tree.save()
assert len(tree.children[0].children) == 0
assert tree.children[0].children == []
tree.children[0].children.insert(0, third_child)
tree.children[0].children.insert(0, second_child)
tree.save()
assert len(tree.children[0].children) == 2
assert tree.children[0].children[0].name == second_child.name
assert tree.children[0].children[1].name == third_child.name
def test_drop_abstract_document(self):
"""Ensure that an abstract document cannot be dropped given it
has no underlying collection.
"""
class AbstractDoc(Document):
name = StringField()
meta = {"abstract": True}
with pytest.raises(OperationError):
AbstractDoc.drop_collection()
def test_reference_class_with_abstract_parent(self):
"""Ensure that a class with an abstract parent can be referenced."""
class Sibling(Document):
name = StringField()
meta = {"abstract": True}
class Sister(Sibling):
pass
class Brother(Sibling):
sibling = ReferenceField(Sibling)
Sister.drop_collection()
Brother.drop_collection()
sister = Sister(name="Alice")
sister.save()
brother = Brother(name="Bob", sibling=sister)
brother.save()
assert Brother.objects[0].sibling.name == sister.name
def test_reference_abstract_class(self):
"""Ensure that an abstract class instance cannot be used in the
reference of that abstract class.
"""
class Sibling(Document):
name = StringField()
meta = {"abstract": True}
class Sister(Sibling):
pass
class Brother(Sibling):
sibling = ReferenceField(Sibling)
Sister.drop_collection()
Brother.drop_collection()
sister = Sibling(name="Alice")
brother = Brother(name="Bob", sibling=sister)
with pytest.raises(ValidationError):
brother.save()
def test_abstract_reference_base_type(self):
"""Ensure that an an abstract reference fails validation when given a
Document that does not inherit from the abstract type.
"""
class Sibling(Document):
name = StringField()
meta = {"abstract": True}
class Brother(Sibling):
sibling = ReferenceField(Sibling)
class Mother(Document):
name = StringField()
Brother.drop_collection()
Mother.drop_collection()
mother = Mother(name="Carol")
mother.save()
brother = Brother(name="Bob", sibling=mother)
with pytest.raises(ValidationError):
brother.save()
def test_generic_reference(self):
"""Ensure that a GenericReferenceField properly dereferences items."""
class Link(Document):
title = StringField()
meta = {"allow_inheritance": False}
class Post(Document):
title = StringField()
class Bookmark(Document):
bookmark_object = GenericReferenceField()
Link.drop_collection()
Post.drop_collection()
Bookmark.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
bm = Bookmark(bookmark_object=post_1)
bm.save()
bm = Bookmark.objects(bookmark_object=post_1).first()
assert bm.bookmark_object == post_1
assert isinstance(bm.bookmark_object, Post)
bm.bookmark_object = link_1
bm.save()
bm = Bookmark.objects(bookmark_object=link_1).first()
assert bm.bookmark_object == link_1
assert isinstance(bm.bookmark_object, Link)
def test_generic_reference_list(self):
"""Ensure that a ListField properly dereferences generic references."""
class Link(Document):
title = StringField()
class Post(Document):
title = StringField()
class User(Document):
bookmarks = ListField(GenericReferenceField())
Link.drop_collection()
Post.drop_collection()
User.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
user = User(bookmarks=[post_1, link_1])
user.save()
user = User.objects(bookmarks__all=[post_1, link_1]).first()
assert user.bookmarks[0] == post_1
assert user.bookmarks[1] == link_1
def test_generic_reference_document_not_registered(self):
"""Ensure dereferencing out of the document registry throws a
`NotRegistered` error.
"""
class Link(Document):
title = StringField()
class User(Document):
bookmarks = ListField(GenericReferenceField())
Link.drop_collection()
User.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
user = User(bookmarks=[link_1])
user.save()
# Mimic User and Link definitions being in a different file
# and the Link model not being imported in the User file.
del _document_registry["Link"]
user = User.objects.first()
try:
user.bookmarks
raise AssertionError("Link was removed from the registry")
except NotRegistered:
pass
def test_generic_reference_is_none(self):
class Person(Document):
name = StringField()
city = GenericReferenceField()
Person.drop_collection()
Person(name="Wilson Jr").save()
assert repr(Person.objects(city=None)) == "[<Person: Person object>]"
def test_generic_reference_choices(self):
"""Ensure that a GenericReferenceField can handle choices."""
class Link(Document):
title = StringField()
class Post(Document):
title = StringField()
class Bookmark(Document):
bookmark_object = GenericReferenceField(choices=(Post,))
Link.drop_collection()
Post.drop_collection()
Bookmark.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
bm = Bookmark(bookmark_object=link_1)
with pytest.raises(ValidationError):
bm.validate()
bm = Bookmark(bookmark_object=post_1)
bm.save()
bm = Bookmark.objects.first()
assert bm.bookmark_object == post_1
def test_generic_reference_string_choices(self):
"""Ensure that a GenericReferenceField can handle choices as strings"""
class Link(Document):
title = StringField()
class Post(Document):
title = StringField()
class Bookmark(Document):
bookmark_object = GenericReferenceField(choices=("Post", Link))
Link.drop_collection()
Post.drop_collection()
Bookmark.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
bm = Bookmark(bookmark_object=link_1)
bm.save()
bm = Bookmark(bookmark_object=post_1)
bm.save()
bm = Bookmark(bookmark_object=bm)
with pytest.raises(ValidationError):
bm.validate()
def test_generic_reference_choices_no_dereference(self):
"""Ensure that a GenericReferenceField can handle choices on
non-derefenreced (i.e. DBRef) elements
"""
class Post(Document):
title = StringField()
class Bookmark(Document):
bookmark_object = GenericReferenceField(choices=(Post,))
other_field = StringField()
Post.drop_collection()
Bookmark.drop_collection()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
bm = Bookmark(bookmark_object=post_1)
bm.save()
bm = Bookmark.objects.get(id=bm.id)
# bookmark_object is now a DBRef
bm.other_field = "dummy_change"
bm.save()
def test_generic_reference_list_choices(self):
"""Ensure that a ListField properly dereferences generic references and
respects choices.
"""
class Link(Document):
title = StringField()
class Post(Document):
title = StringField()
class User(Document):
bookmarks = ListField(GenericReferenceField(choices=(Post,)))
Link.drop_collection()
Post.drop_collection()
User.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
user = User(bookmarks=[link_1])
with pytest.raises(ValidationError):
user.validate()
user = User(bookmarks=[post_1])
user.save()
user = User.objects.first()
assert user.bookmarks == [post_1]
def test_generic_reference_list_item_modification(self):
"""Ensure that modifications of related documents (through generic reference) don't influence on querying"""
class Post(Document):
title = StringField()
class User(Document):
username = StringField()
bookmarks = ListField(GenericReferenceField())
Post.drop_collection()
User.drop_collection()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
user = User(bookmarks=[post_1])
user.save()
post_1.title = "Title was modified"
user.username = "New username"
user.save()
user = User.objects(bookmarks__all=[post_1]).first()
assert user is not None
assert user.bookmarks[0] == post_1
def test_generic_reference_filter_by_dbref(self):
"""Ensure we can search for a specific generic reference by
providing its ObjectId.
"""
class Doc(Document):
ref = GenericReferenceField()
Doc.drop_collection()
doc1 = Doc.objects.create()
doc2 = Doc.objects.create(ref=doc1)
doc = Doc.objects.get(ref=DBRef("doc", doc1.pk))
assert doc == doc2
def test_generic_reference_is_not_tracked_in_parent_doc(self):
"""Ensure that modifications of related documents (through generic reference) don't influence
the owner changed fields (#1934)
"""
class Doc1(Document):
name = StringField()
class Doc2(Document):
ref = GenericReferenceField()
refs = ListField(GenericReferenceField())
Doc1.drop_collection()
Doc2.drop_collection()
doc1 = Doc1(name="garbage1").save()
doc11 = Doc1(name="garbage11").save()
doc2 = Doc2(ref=doc1, refs=[doc11]).save()
doc2.ref.name = "garbage2"
assert doc2._get_changed_fields() == []
doc2.refs[0].name = "garbage3"
assert doc2._get_changed_fields() == []
assert doc2._delta() == ({}, {})
def test_generic_reference_field(self):
"""Ensure we can search for a specific generic reference by
providing its DBRef.
"""
class Doc(Document):
ref = GenericReferenceField()
Doc.drop_collection()
doc1 = Doc.objects.create()
doc2 = Doc.objects.create(ref=doc1)
assert isinstance(doc1.pk, ObjectId)
doc = Doc.objects.get(ref=doc1.pk)
assert doc == doc2
def test_choices_allow_using_sets_as_choices(self):
"""Ensure that sets can be used when setting choices"""
class Shirt(Document):
size = StringField(choices={"M", "L"})
Shirt(size="M").validate()
def test_choices_validation_allow_no_value(self):
"""Ensure that .validate passes and no value was provided
for a field setup with choices
"""
class Shirt(Document):
size = StringField(choices=("S", "M"))
shirt = Shirt()
shirt.validate()
def test_choices_validation_accept_possible_value(self):
"""Ensure that value is in a container of allowed values."""
class Shirt(Document):
size = StringField(choices=("S", "M"))
shirt = Shirt(size="S")
shirt.validate()
def test_choices_validation_reject_unknown_value(self):
"""Ensure that unallowed value are rejected upon validation"""
class Shirt(Document):
size = StringField(choices=("S", "M"))
shirt = Shirt(size="XS")
with pytest.raises(ValidationError):
shirt.validate()
def test_choices_get_field_display(self):
"""Test dynamic helper for returning the display value of a choices
field.
"""
class Shirt(Document):
size = StringField(
max_length=3,
choices=(
("S", "Small"),
("M", "Medium"),
("L", "Large"),
("XL", "Extra Large"),
("XXL", "Extra Extra Large"),
),
)
style = StringField(
max_length=3,
choices=(("S", "Small"), ("B", "Baggy"), ("W", "Wide")),
default="W",
)
Shirt.drop_collection()
shirt1 = Shirt()
shirt2 = Shirt()
# Make sure get_<field>_display returns the default value (or None)
assert shirt1.get_size_display() is None
assert shirt1.get_style_display() == "Wide"
shirt1.size = "XXL"
shirt1.style = "B"
shirt2.size = "M"
shirt2.style = "S"
assert shirt1.get_size_display() == "Extra Extra Large"
assert shirt1.get_style_display() == "Baggy"
assert shirt2.get_size_display() == "Medium"
assert shirt2.get_style_display() == "Small"
# Set as Z - an invalid choice
shirt1.size = "Z"
shirt1.style = "Z"
assert shirt1.get_size_display() == "Z"
assert shirt1.get_style_display() == "Z"
with pytest.raises(ValidationError):
shirt1.validate()
def test_simple_choices_validation(self):
"""Ensure that value is in a container of allowed values."""
class Shirt(Document):
size = StringField(max_length=3, choices=("S", "M", "L", "XL", "XXL"))
Shirt.drop_collection()
shirt = Shirt()
shirt.validate()
shirt.size = "S"
shirt.validate()
shirt.size = "XS"
with pytest.raises(ValidationError):
shirt.validate()
def test_simple_choices_get_field_display(self):
"""Test dynamic helper for returning the display value of a choices
field.
"""
class Shirt(Document):
size = StringField(max_length=3, choices=("S", "M", "L", "XL", "XXL"))
style = StringField(
max_length=3, choices=("Small", "Baggy", "wide"), default="Small"
)
Shirt.drop_collection()
shirt = Shirt()
assert shirt.get_size_display() is None
assert shirt.get_style_display() == "Small"
shirt.size = "XXL"
shirt.style = "Baggy"
assert shirt.get_size_display() == "XXL"
assert shirt.get_style_display() == "Baggy"
# Set as Z - an invalid choice
shirt.size = "Z"
shirt.style = "Z"
assert shirt.get_size_display() == "Z"
assert shirt.get_style_display() == "Z"
with pytest.raises(ValidationError):
shirt.validate()
def test_simple_choices_validation_invalid_value(self):
"""Ensure that error messages are correct."""
SIZES = ("S", "M", "L", "XL", "XXL")
COLORS = (("R", "Red"), ("B", "Blue"))
SIZE_MESSAGE = "Value must be one of ('S', 'M', 'L', 'XL', 'XXL')"
COLOR_MESSAGE = "Value must be one of ['R', 'B']"
class Shirt(Document):
size = StringField(max_length=3, choices=SIZES)
color = StringField(max_length=1, choices=COLORS)
Shirt.drop_collection()
shirt = Shirt()
shirt.validate()
shirt.size = "S"
shirt.color = "R"
shirt.validate()
shirt.size = "XS"
shirt.color = "G"
try:
shirt.validate()
except ValidationError as error:
# get the validation rules
error_dict = error.to_dict()
assert error_dict["size"] == SIZE_MESSAGE
assert error_dict["color"] == COLOR_MESSAGE
def test_recursive_validation(self):
"""Ensure that a validation result to_dict is available."""
class Author(EmbeddedDocument):
name = StringField(required=True)
class Comment(EmbeddedDocument):
author = EmbeddedDocumentField(Author, required=True)
content = StringField(required=True)
class Post(Document):
title = StringField(required=True)
comments = ListField(EmbeddedDocumentField(Comment))
bob = Author(name="Bob")
post = Post(title="hello world")
post.comments.append(Comment(content="hello", author=bob))
post.comments.append(Comment(author=bob))
with pytest.raises(ValidationError):
post.validate()
try:
post.validate()
except ValidationError as error:
# ValidationError.errors property
assert hasattr(error, "errors")
assert isinstance(error.errors, dict)
assert "comments" in error.errors
assert 1 in error.errors["comments"]
assert isinstance(error.errors["comments"][1]["content"], ValidationError)
# ValidationError.schema property
error_dict = error.to_dict()
assert isinstance(error_dict, dict)
assert "comments" in error_dict
assert 1 in error_dict["comments"]
assert "content" in error_dict["comments"][1]
assert error_dict["comments"][1]["content"] == "Field is required"
post.comments[1].content = "here we go"
post.validate()
def test_tuples_as_tuples(self):
"""Ensure that tuples remain tuples when they are inside
a ComplexBaseField.
"""
class EnumField(BaseField):
def __init__(self, **kwargs):
super().__init__(**kwargs)
def to_mongo(self, value):
return value
def to_python(self, value):
return tuple(value)
class TestDoc(Document):
items = ListField(EnumField())
TestDoc.drop_collection()
tuples = [(100, "Testing")]
doc = TestDoc()
doc.items = tuples
doc.save()
x = TestDoc.objects().get()
assert x is not None
assert len(x.items) == 1
assert tuple(x.items[0]) in tuples
assert x.items[0] in tuples
def test_dynamic_fields_class(self):
class Doc2(Document):
field_1 = StringField(db_field="f")
class Doc(Document):
my_id = IntField(primary_key=True)
embed_me = DynamicField(db_field="e")
field_x = StringField(db_field="x")
Doc.drop_collection()
Doc2.drop_collection()
doc2 = Doc2(field_1="hello")
doc = Doc(my_id=1, embed_me=doc2, field_x="x")
with pytest.raises(OperationError):
doc.save()
doc2.save()
doc.save()
doc = Doc.objects.get()
assert doc.embed_me.field_1 == "hello"
def test_dynamic_fields_embedded_class(self):
class Embed(EmbeddedDocument):
field_1 = StringField(db_field="f")
class Doc(Document):
my_id = IntField(primary_key=True)
embed_me = DynamicField(db_field="e")
field_x = StringField(db_field="x")
Doc.drop_collection()
Doc(my_id=1, embed_me=Embed(field_1="hello"), field_x="x").save()
doc = Doc.objects.get()
assert doc.embed_me.field_1 == "hello"
def test_dynamicfield_dump_document(self):
"""Ensure a DynamicField can handle another document's dump."""
class Doc(Document):
field = DynamicField()
class ToEmbed(Document):
id = IntField(primary_key=True, default=1)
recursive = DynamicField()
class ToEmbedParent(Document):
id = IntField(primary_key=True, default=1)
recursive = DynamicField()
meta = {"allow_inheritance": True}
class ToEmbedChild(ToEmbedParent):
pass
to_embed_recursive = ToEmbed(id=1).save()
to_embed = ToEmbed(id=2, recursive=to_embed_recursive).save()
doc = Doc(field=to_embed)
doc.save()
assert isinstance(doc.field, ToEmbed)
assert doc.field == to_embed
# Same thing with a Document with a _cls field
to_embed_recursive = ToEmbedChild(id=1).save()
to_embed_child = ToEmbedChild(id=2, recursive=to_embed_recursive).save()
doc = Doc(field=to_embed_child)
doc.save()
assert isinstance(doc.field, ToEmbedChild)
assert doc.field == to_embed_child
def test_cls_field(self):
class Animal(Document):
meta = {"allow_inheritance": True}
class Fish(Animal):
pass
class Mammal(Animal):
pass
class Dog(Mammal):
pass
class Human(Mammal):
pass
Animal.objects.delete()
Dog().save()
Fish().save()
Human().save()
assert (
Animal.objects(_cls__in=["Animal.Mammal.Dog", "Animal.Fish"]).count() == 2
)
assert Animal.objects(_cls__in=["Animal.Fish.Guppy"]).count() == 0
def test_sparse_field(self):
class Doc(Document):
name = StringField(required=False, unique=True, sparse=True)
# This would raise an exception in a non-sparse unique index
Doc().save()
Doc().save()
def test_undefined_field_exception(self):
"""Tests if a `FieldDoesNotExist` exception is raised when
trying to instantiate a document with a field that's not
defined.
"""
class Doc(Document):
foo = StringField()
with pytest.raises(FieldDoesNotExist):
Doc(bar="test")
def test_undefined_field_exception_with_strict(self):
"""Tests if a `FieldDoesNotExist` exception is raised when
trying to instantiate a document with a field that's not
defined, even when strict is set to False.
"""
class Doc(Document):
foo = StringField()
meta = {"strict": False}
with pytest.raises(FieldDoesNotExist):
Doc(bar="test")
def test_undefined_field_works_no_confusion_with_db_field(self):
class Doc(Document):
foo = StringField(db_field="bar")
with pytest.raises(FieldDoesNotExist):
Doc(bar="test")
class TestEmbeddedDocumentListField(MongoDBTestCase):
def setUp(self):
"""
Create two BlogPost entries in the database, each with
several EmbeddedDocuments.
"""
class Comments(EmbeddedDocument):
author = StringField()
message = StringField()
class BlogPost(Document):
comments = EmbeddedDocumentListField(Comments)
BlogPost.drop_collection()
self.Comments = Comments
self.BlogPost = BlogPost
self.post1 = self.BlogPost(
comments=[
self.Comments(author="user1", message="message1"),
self.Comments(author="user2", message="message1"),
]
).save()
self.post2 = self.BlogPost(
comments=[
self.Comments(author="user2", message="message2"),
self.Comments(author="user2", message="message3"),
self.Comments(author="user3", message="message1"),
]
).save()
def test_fails_upon_validate_if_provide_a_doc_instead_of_a_list_of_doc(self):
# Relates to Issue #1464
comment = self.Comments(author="John")
class Title(Document):
content = StringField()
# Test with an embeddedDocument instead of a list(embeddedDocument)
# It's an edge case but it used to fail with a vague error, making it difficult to troubleshoot it
post = self.BlogPost(comments=comment)
with pytest.raises(ValidationError) as exc_info:
post.validate()
error_msg = str(exc_info.value)
assert "'comments'" in error_msg
assert "Only lists and tuples may be used in a list field" in error_msg
# Test with a Document
post = self.BlogPost(comments=Title(content="garbage"))
with pytest.raises(ValidationError) as exc_info:
post.validate()
error_msg = str(exc_info.value)
assert "'comments'" in error_msg
assert "Only lists and tuples may be used in a list field" in error_msg
def test_no_keyword_filter(self):
"""
Tests the filter method of a List of Embedded Documents
with a no keyword.
"""
filtered = self.post1.comments.filter()
# Ensure nothing was changed
assert filtered == self.post1.comments
def test_single_keyword_filter(self):
"""
Tests the filter method of a List of Embedded Documents
with a single keyword.
"""
filtered = self.post1.comments.filter(author="user1")
# Ensure only 1 entry was returned.
assert len(filtered) == 1
# Ensure the entry returned is the correct entry.
assert filtered[0].author == "user1"
def test_multi_keyword_filter(self):
"""
Tests the filter method of a List of Embedded Documents
with multiple keywords.
"""
filtered = self.post2.comments.filter(author="user2", message="message2")
# Ensure only 1 entry was returned.
assert len(filtered) == 1
# Ensure the entry returned is the correct entry.
assert filtered[0].author == "user2"
assert filtered[0].message == "message2"
def test_chained_filter(self):
"""
Tests chained filter methods of a List of Embedded Documents
"""
filtered = self.post2.comments.filter(author="user2").filter(message="message2")
# Ensure only 1 entry was returned.
assert len(filtered) == 1
# Ensure the entry returned is the correct entry.
assert filtered[0].author == "user2"
assert filtered[0].message == "message2"
def test_unknown_keyword_filter(self):
"""
Tests the filter method of a List of Embedded Documents
when the keyword is not a known keyword.
"""
with pytest.raises(AttributeError):
self.post2.comments.filter(year=2)
def test_no_keyword_exclude(self):
"""
Tests the exclude method of a List of Embedded Documents
with a no keyword.
"""
filtered = self.post1.comments.exclude()
# Ensure everything was removed
assert filtered == []
def test_single_keyword_exclude(self):
"""
Tests the exclude method of a List of Embedded Documents
with a single keyword.
"""
excluded = self.post1.comments.exclude(author="user1")
# Ensure only 1 entry was returned.
assert len(excluded) == 1
# Ensure the entry returned is the correct entry.
assert excluded[0].author == "user2"
def test_multi_keyword_exclude(self):
"""
Tests the exclude method of a List of Embedded Documents
with multiple keywords.
"""
excluded = self.post2.comments.exclude(author="user3", message="message1")
# Ensure only 2 entries were returned.
assert len(excluded) == 2
# Ensure the entries returned are the correct entries.
assert excluded[0].author == "user2"
assert excluded[1].author == "user2"
def test_non_matching_exclude(self):
"""
Tests the exclude method of a List of Embedded Documents
when the keyword does not match any entries.
"""
excluded = self.post2.comments.exclude(author="user4")
# Ensure the 3 entries still exist.
assert len(excluded) == 3
def test_unknown_keyword_exclude(self):
"""
Tests the exclude method of a List of Embedded Documents
when the keyword is not a known keyword.
"""
with pytest.raises(AttributeError):
self.post2.comments.exclude(year=2)
def test_chained_filter_exclude(self):
"""
Tests the exclude method after a filter method of a List of
Embedded Documents.
"""
excluded = self.post2.comments.filter(author="user2").exclude(
message="message2"
)
# Ensure only 1 entry was returned.
assert len(excluded) == 1
# Ensure the entry returned is the correct entry.
assert excluded[0].author == "user2"
assert excluded[0].message == "message3"
def test_count(self):
"""
Tests the count method of a List of Embedded Documents.
"""
assert self.post1.comments.count() == 2
assert self.post1.comments.count() == len(self.post1.comments)
def test_filtered_count(self):
"""
Tests the filter + count method of a List of Embedded Documents.
"""
count = self.post1.comments.filter(author="user1").count()
assert count == 1
def test_single_keyword_get(self):
"""
Tests the get method of a List of Embedded Documents using a
single keyword.
"""
comment = self.post1.comments.get(author="user1")
assert isinstance(comment, self.Comments)
assert comment.author == "user1"
def test_multi_keyword_get(self):
"""
Tests the get method of a List of Embedded Documents using
multiple keywords.
"""
comment = self.post2.comments.get(author="user2", message="message2")
assert isinstance(comment, self.Comments)
assert comment.author == "user2"
assert comment.message == "message2"
def test_no_keyword_multiple_return_get(self):
"""
Tests the get method of a List of Embedded Documents without
a keyword to return multiple documents.
"""
with pytest.raises(MultipleObjectsReturned):
self.post1.comments.get()
def test_keyword_multiple_return_get(self):
"""
Tests the get method of a List of Embedded Documents with a keyword
to return multiple documents.
"""
with pytest.raises(MultipleObjectsReturned):
self.post2.comments.get(author="user2")
def test_unknown_keyword_get(self):
"""
Tests the get method of a List of Embedded Documents with an
unknown keyword.
"""
with pytest.raises(AttributeError):
self.post2.comments.get(year=2020)
def test_no_result_get(self):
"""
Tests the get method of a List of Embedded Documents where get
returns no results.
"""
with pytest.raises(DoesNotExist):
self.post1.comments.get(author="user3")
def test_first(self):
"""
Tests the first method of a List of Embedded Documents to
ensure it returns the first comment.
"""
comment = self.post1.comments.first()
# Ensure a Comment object was returned.
assert isinstance(comment, self.Comments)
assert comment == self.post1.comments[0]
def test_create(self):
"""
Test the create method of a List of Embedded Documents.
"""
comment = self.post1.comments.create(author="user4", message="message1")
self.post1.save()
# Ensure the returned value is the comment object.
assert isinstance(comment, self.Comments)
assert comment.author == "user4"
assert comment.message == "message1"
# Ensure the new comment was actually saved to the database.
assert comment in self.BlogPost.objects(comments__author="user4")[0].comments
def test_filtered_create(self):
"""
Test the create method of a List of Embedded Documents chained
to a call to the filter method. Filtering should have no effect
on creation.
"""
comment = self.post1.comments.filter(author="user1").create(
author="user4", message="message1"
)
self.post1.save()
# Ensure the returned value is the comment object.
assert isinstance(comment, self.Comments)
assert comment.author == "user4"
assert comment.message == "message1"
# Ensure the new comment was actually saved to the database.
assert comment in self.BlogPost.objects(comments__author="user4")[0].comments
def test_no_keyword_update(self):
"""
Tests the update method of a List of Embedded Documents with
no keywords.
"""
original = list(self.post1.comments)
number = self.post1.comments.update()
self.post1.save()
# Ensure that nothing was altered.
assert original[0] in self.BlogPost.objects(id=self.post1.id)[0].comments
assert original[1] in self.BlogPost.objects(id=self.post1.id)[0].comments
# Ensure the method returned 0 as the number of entries
# modified
assert number == 0
def test_single_keyword_update(self):
"""
Tests the update method of a List of Embedded Documents with
a single keyword.
"""
number = self.post1.comments.update(author="user4")
self.post1.save()
comments = self.BlogPost.objects(id=self.post1.id)[0].comments
# Ensure that the database was updated properly.
assert comments[0].author == "user4"
assert comments[1].author == "user4"
# Ensure the method returned 2 as the number of entries
# modified
assert number == 2
def test_unicode(self):
"""
Tests that unicode strings handled correctly
"""
post = self.BlogPost(
comments=[
self.Comments(author="user1", message="сообщение"),
self.Comments(author="user2", message="хабарлама"),
]
).save()
assert post.comments.get(message="сообщение").author == "user1"
def test_save(self):
"""
Tests the save method of a List of Embedded Documents.
"""
comments = self.post1.comments
new_comment = self.Comments(author="user4")
comments.append(new_comment)
comments.save()
# Ensure that the new comment has been added to the database.
assert new_comment in self.BlogPost.objects(id=self.post1.id)[0].comments
def test_delete(self):
"""
Tests the delete method of a List of Embedded Documents.
"""
number = self.post1.comments.delete()
self.post1.save()
# Ensure that all the comments under post1 were deleted in the
# database.
assert self.BlogPost.objects(id=self.post1.id)[0].comments == []
# Ensure that post1 comments were deleted from the list.
assert self.post1.comments == []
# Ensure that comments still returned a EmbeddedDocumentList object.
assert isinstance(self.post1.comments, EmbeddedDocumentList)
# Ensure that the delete method returned 2 as the number of entries
# deleted from the database
assert number == 2
def test_empty_list_embedded_documents_with_unique_field(self):
"""
Tests that only one document with an empty list of embedded documents
that have a unique field can be saved, but if the unique field is
also sparse than multiple documents with an empty list can be saved.
"""
class EmbeddedWithUnique(EmbeddedDocument):
number = IntField(unique=True)
class A(Document):
my_list = ListField(EmbeddedDocumentField(EmbeddedWithUnique))
A(my_list=[]).save()
with pytest.raises(NotUniqueError):
A(my_list=[]).save()
class EmbeddedWithSparseUnique(EmbeddedDocument):
number = IntField(unique=True, sparse=True)
class B(Document):
my_list = ListField(EmbeddedDocumentField(EmbeddedWithSparseUnique))
A.drop_collection()
B.drop_collection()
B(my_list=[]).save()
B(my_list=[]).save()
def test_filtered_delete(self):
"""
Tests the delete method of a List of Embedded Documents
after the filter method has been called.
"""
comment = self.post1.comments[1]
number = self.post1.comments.filter(author="user2").delete()
self.post1.save()
# Ensure that only the user2 comment was deleted.
assert comment not in self.BlogPost.objects(id=self.post1.id)[0].comments
assert len(self.BlogPost.objects(id=self.post1.id)[0].comments) == 1
# Ensure that the user2 comment no longer exists in the list.
assert comment not in self.post1.comments
assert len(self.post1.comments) == 1
# Ensure that the delete method returned 1 as the number of entries
# deleted from the database
assert number == 1
def test_custom_data(self):
"""
Tests that custom data is saved in the field object
and doesn't interfere with the rest of field functionalities.
"""
custom_data = {"a": "a_value", "b": [1, 2]}
class CustomData(Document):
a_field = IntField()
c_field = IntField(custom_data=custom_data)
CustomData.drop_collection()
a1 = CustomData(a_field=1, c_field=2).save()
assert 2 == a1.c_field
assert not hasattr(a1.c_field, "custom_data")
assert hasattr(CustomData.c_field, "custom_data")
assert custom_data["a"] == CustomData.c_field.custom_data["a"]
if __name__ == "__main__":
unittest.main()
| 31.303492 | 116 | 0.585008 | import datetime
import unittest
from bson import DBRef, ObjectId, SON
import pytest
from mongoengine import (
BooleanField,
ComplexDateTimeField,
DateField,
DateTimeField,
DictField,
Document,
DoesNotExist,
DynamicDocument,
DynamicField,
EmbeddedDocument,
EmbeddedDocumentField,
EmbeddedDocumentListField,
FieldDoesNotExist,
FloatField,
GenericLazyReferenceField,
GenericReferenceField,
IntField,
LazyReferenceField,
ListField,
MultipleObjectsReturned,
NotRegistered,
NotUniqueError,
ObjectIdField,
OperationError,
ReferenceField,
SortedListField,
StringField,
ValidationError,
)
from mongoengine.base import BaseField, EmbeddedDocumentList, _document_registry
from mongoengine.errors import DeprecatedError
from tests.utils import MongoDBTestCase
class TestField(MongoDBTestCase):
def test_default_values_nothing_set(self):
class Person(Document):
name = StringField()
age = IntField(default=30, required=False)
userid = StringField(default=lambda: "test", required=True)
created = DateTimeField(default=datetime.datetime.utcnow)
day = DateField(default=datetime.date.today)
person = Person(name="Ross")
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "day", "name", "userid"]
assert person.validate() is None
assert person.name == person.name
assert person.age == person.age
assert person.userid == person.userid
assert person.created == person.created
assert person.day == person.day
assert person._data["name"] == person.name
assert person._data["age"] == person.age
assert person._data["userid"] == person.userid
assert person._data["created"] == person.created
assert person._data["day"] == person.day
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "day", "name", "userid"]
def test_custom_field_validation_raise_deprecated_error_when_validation_return_something(
self,
):
def _not_empty(z):
return bool(z)
class Person(Document):
name = StringField(validation=_not_empty)
Person.drop_collection()
error = (
"validation argument for `name` must not return anything, "
"it should raise a ValidationError if validation fails"
)
with pytest.raises(DeprecatedError) as exc_info:
Person(name="").validate()
assert str(exc_info.value) == error
with pytest.raises(DeprecatedError) as exc_info:
Person(name="").save()
assert str(exc_info.value) == error
def test_custom_field_validation_raise_validation_error(self):
def _not_empty(z):
if not z:
raise ValidationError("cantbeempty")
class Person(Document):
name = StringField(validation=_not_empty)
Person.drop_collection()
with pytest.raises(ValidationError) as exc_info:
Person(name="").validate()
assert "ValidationError (Person:None) (cantbeempty: ['name'])" == str(
exc_info.value
)
Person(name="garbage").validate()
Person(name="garbage").save()
def test_default_values_set_to_None(self):
class Person(Document):
name = StringField()
age = IntField(default=30, required=False)
userid = StringField(default=lambda: "test", required=True)
created = DateTimeField(default=datetime.datetime.utcnow)
person = Person(name=None, age=None, userid=None, created=None)
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
assert person.validate() is None
assert person.name == person.name
assert person.age == person.age
assert person.userid == person.userid
assert person.created == person.created
assert person._data["name"] == person.name
assert person._data["age"] == person.age
assert person._data["userid"] == person.userid
assert person._data["created"] == person.created
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
def test_default_values_when_setting_to_None(self):
class Person(Document):
name = StringField()
age = IntField(default=30, required=False)
userid = StringField(default=lambda: "test", required=True)
created = DateTimeField(default=datetime.datetime.utcnow)
person = Person()
person.name = None
person.age = None
person.userid = None
person.created = None
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
assert person.validate() is None
assert person.name is None
assert person.age == 30
assert person.userid == "test"
assert isinstance(person.created, datetime.datetime)
assert person._data["name"] == person.name
assert person._data["age"] == person.age
assert person._data["userid"] == person.userid
assert person._data["created"] == person.created
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
def test_default_value_is_not_used_when_changing_value_to_empty_list_for_strict_doc(
self,
):
class Doc(Document):
x = ListField(IntField(), default=lambda: [42])
doc = Doc(x=[1]).save()
doc.x = []
doc.save()
reloaded = Doc.objects.get(id=doc.id)
assert reloaded.x == []
def test_default_value_is_not_used_when_changing_value_to_empty_list_for_dyn_doc(
self,
):
class Doc(DynamicDocument):
x = ListField(IntField(), default=lambda: [42])
doc = Doc(x=[1]).save()
doc.x = []
doc.y = 2
doc.save()
reloaded = Doc.objects.get(id=doc.id)
assert reloaded.x == []
def test_default_values_when_deleting_value(self):
class Person(Document):
name = StringField()
age = IntField(default=30, required=False)
userid = StringField(default=lambda: "test", required=True)
created = DateTimeField(default=datetime.datetime.utcnow)
person = Person(
name="Ross",
age=50,
userid="different",
created=datetime.datetime(2014, 6, 12),
)
del person.name
del person.age
del person.userid
del person.created
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
assert person.validate() is None
assert person.name is None
assert person.age == 30
assert person.userid == "test"
assert isinstance(person.created, datetime.datetime)
assert person.created != datetime.datetime(2014, 6, 12)
assert person._data["name"] == person.name
assert person._data["age"] == person.age
assert person._data["userid"] == person.userid
assert person._data["created"] == person.created
data_to_be_saved = sorted(person.to_mongo().keys())
assert data_to_be_saved == ["age", "created", "userid"]
def test_required_values(self):
class Person(Document):
name = StringField(required=True)
age = IntField(required=True)
userid = StringField()
person = Person(name="Test User")
with pytest.raises(ValidationError):
person.validate()
person = Person(age=30)
with pytest.raises(ValidationError):
person.validate()
def test_not_required_handles_none_in_update(self):
class HandleNoneFields(Document):
str_fld = StringField()
int_fld = IntField()
flt_fld = FloatField()
comp_dt_fld = ComplexDateTimeField()
HandleNoneFields.drop_collection()
doc = HandleNoneFields()
doc.str_fld = "spam ham egg"
doc.int_fld = 42
doc.flt_fld = 4.2
doc.com_dt_fld = datetime.datetime.utcnow()
doc.save()
res = HandleNoneFields.objects(id=doc.id).update(
set__str_fld=None,
set__int_fld=None,
set__flt_fld=None,
set__comp_dt_fld=None,
)
assert res == 1
ret = HandleNoneFields.objects.all()[0]
assert ret.str_fld is None
assert ret.int_fld is None
assert ret.flt_fld is None
assert ret.comp_dt_fld is None
def test_not_required_handles_none_from_database(self):
class HandleNoneFields(Document):
str_fld = StringField(required=True)
int_fld = IntField(required=True)
flt_fld = FloatField(required=True)
comp_dt_fld = ComplexDateTimeField(required=True)
HandleNoneFields.drop_collection()
doc = HandleNoneFields()
doc.str_fld = "spam ham egg"
doc.int_fld = 42
doc.flt_fld = 4.2
doc.comp_dt_fld = datetime.datetime.utcnow()
doc.save()
HandleNoneFields._get_collection().update_one(
{"_id": doc.id},
{"$unset": {"str_fld": 1, "int_fld": 1, "flt_fld": 1, "comp_dt_fld": 1}},
)
ret = HandleNoneFields.objects.first()
assert ret.str_fld is None
assert ret.int_fld is None
assert ret.flt_fld is None
assert ret.comp_dt_fld is None
# attempted.
with pytest.raises(ValidationError):
ret.validate()
def test_default_id_validation_as_objectid(self):
class Person(Document):
name = StringField()
person = Person(name="Test User")
assert person.id is None
person.id = 47
with pytest.raises(ValidationError):
person.validate()
person.id = "abc"
with pytest.raises(ValidationError):
person.validate()
person.id = str(ObjectId())
person.validate()
def test_db_field_validation(self):
# dot in the name
with pytest.raises(ValueError):
class User(Document):
name = StringField(db_field="user.name")
# name starting with $
with pytest.raises(ValueError):
class UserX1(Document):
name = StringField(db_field="$name")
# name containing a null character
with pytest.raises(ValueError):
class UserX2(Document):
name = StringField(db_field="name\0")
def test_list_validation(self):
access_level_choices = (
("a", "Administration"),
("b", "Manager"),
("c", "Staff"),
)
class User(Document):
pass
class Comment(EmbeddedDocument):
content = StringField()
class BlogPost(Document):
content = StringField()
comments = ListField(EmbeddedDocumentField(Comment))
tags = ListField(StringField())
authors = ListField(ReferenceField(User))
authors_as_lazy = ListField(LazyReferenceField(User))
generic = ListField(GenericReferenceField())
generic_as_lazy = ListField(GenericLazyReferenceField())
access_list = ListField(choices=access_level_choices, display_sep=", ")
User.drop_collection()
BlogPost.drop_collection()
post = BlogPost(content="Went for a walk today...")
post.validate()
post.tags = "fun"
with pytest.raises(ValidationError):
post.validate()
post.tags = [1, 2]
with pytest.raises(ValidationError):
post.validate()
post.tags = ["fun", "leisure"]
post.validate()
post.tags = ("fun", "leisure")
post.validate()
post.access_list = "a,b"
with pytest.raises(ValidationError):
post.validate()
post.access_list = ["c", "d"]
with pytest.raises(ValidationError):
post.validate()
post.access_list = ["a", "b"]
post.validate()
assert post.get_access_list_display() == "Administration, Manager"
post.comments = ["a"]
with pytest.raises(ValidationError):
post.validate()
post.comments = "yay"
with pytest.raises(ValidationError):
post.validate()
comments = [Comment(content="Good for you"), Comment(content="Yay.")]
post.comments = comments
post.validate()
post.authors = [Comment()]
with pytest.raises(ValidationError):
post.validate()
post.authors = [User()]
with pytest.raises(ValidationError):
post.validate()
user = User()
user.save()
post.authors = [user]
post.validate()
post.authors_as_lazy = [Comment()]
with pytest.raises(ValidationError):
post.validate()
post.authors_as_lazy = [User()]
with pytest.raises(ValidationError):
post.validate()
post.authors_as_lazy = [user]
post.validate()
post.generic = [1, 2]
with pytest.raises(ValidationError):
post.validate()
post.generic = [User(), Comment()]
with pytest.raises(ValidationError):
post.validate()
post.generic = [Comment()]
with pytest.raises(ValidationError):
post.validate()
post.generic = [user]
post.validate()
post.generic_as_lazy = [1, 2]
with pytest.raises(ValidationError):
post.validate()
post.generic_as_lazy = [User(), Comment()]
with pytest.raises(ValidationError):
post.validate()
post.generic_as_lazy = [Comment()]
with pytest.raises(ValidationError):
post.validate()
post.generic_as_lazy = [user]
post.validate()
def test_sorted_list_sorting(self):
class Comment(EmbeddedDocument):
order = IntField()
content = StringField()
class BlogPost(Document):
content = StringField()
comments = SortedListField(EmbeddedDocumentField(Comment), ordering="order")
tags = SortedListField(StringField())
BlogPost.drop_collection()
post = BlogPost(content="Went for a walk today...")
post.save()
post.tags = ["leisure", "fun"]
post.save()
post.reload()
assert post.tags == ["fun", "leisure"]
comment1 = Comment(content="Good for you", order=1)
comment2 = Comment(content="Yay.", order=0)
comments = [comment1, comment2]
post.comments = comments
post.save()
post.reload()
assert post.comments[0].content == comment2.content
assert post.comments[1].content == comment1.content
post.comments[0].order = 2
post.save()
post.reload()
assert post.comments[0].content == comment1.content
assert post.comments[1].content == comment2.content
def test_reverse_list_sorting(self):
class Category(EmbeddedDocument):
count = IntField()
name = StringField()
class CategoryList(Document):
categories = SortedListField(
EmbeddedDocumentField(Category), ordering="count", reverse=True
)
name = StringField()
CategoryList.drop_collection()
catlist = CategoryList(name="Top categories")
cat1 = Category(name="posts", count=10)
cat2 = Category(name="food", count=100)
cat3 = Category(name="drink", count=40)
catlist.categories = [cat1, cat2, cat3]
catlist.save()
catlist.reload()
assert catlist.categories[0].name == cat2.name
assert catlist.categories[1].name == cat3.name
assert catlist.categories[2].name == cat1.name
def test_list_field(self):
class BlogPost(Document):
info = ListField()
BlogPost.drop_collection()
post = BlogPost()
post.info = "my post"
with pytest.raises(ValidationError):
post.validate()
post.info = {"title": "test"}
with pytest.raises(ValidationError):
post.validate()
post.info = ["test"]
post.save()
post = BlogPost()
post.info = [{"test": "test"}]
post.save()
post = BlogPost()
post.info = [{"test": 3}]
post.save()
assert BlogPost.objects.count() == 3
assert BlogPost.objects.filter(info__exact="test").count() == 1
assert BlogPost.objects.filter(info__0__test="test").count() == 1
# Confirm handles non strings or non existing keys
assert BlogPost.objects.filter(info__0__test__exact="5").count() == 0
assert BlogPost.objects.filter(info__100__test__exact="test").count() == 0
# test queries by list
post = BlogPost()
post.info = ["1", "2"]
post.save()
post = BlogPost.objects(info=["1", "2"]).get()
post.info += ["3", "4"]
post.save()
assert BlogPost.objects(info=["1", "2", "3", "4"]).count() == 1
post = BlogPost.objects(info=["1", "2", "3", "4"]).get()
post.info *= 2
post.save()
assert (
BlogPost.objects(info=["1", "2", "3", "4", "1", "2", "3", "4"]).count() == 1
)
def test_list_field_manipulative_operators(self):
class BlogPost(Document):
ref = StringField()
info = ListField(StringField())
BlogPost.drop_collection()
post = BlogPost()
post.ref = "1234"
post.info = ["0", "1", "2", "3", "4", "5"]
post.save()
def reset_post():
post.info = ["0", "1", "2", "3", "4", "5"]
post.save()
# '__add__(listB)'
# listA+listB
# operator.add(listA, listB)
reset_post()
temp = ["a", "b"]
post.info = post.info + temp
assert post.info == ["0", "1", "2", "3", "4", "5", "a", "b"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "a", "b"]
# '__delitem__(index)'
# aka 'del list[index]'
# aka 'operator.delitem(list, index)'
reset_post()
del post.info[2] # del from middle ('2')
assert post.info == ["0", "1", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "3", "4", "5"]
# '__delitem__(slice(i, j))'
# aka 'del list[i:j]'
# aka 'operator.delitem(list, slice(i,j))'
reset_post()
del post.info[1:3] # removes '1', '2'
assert post.info == ["0", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "3", "4", "5"]
# '__iadd__'
# aka 'list += list'
reset_post()
temp = ["a", "b"]
post.info += temp
assert post.info == ["0", "1", "2", "3", "4", "5", "a", "b"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "a", "b"]
# '__imul__'
# aka 'list *= number'
reset_post()
post.info *= 2
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
# '__mul__'
# aka 'listA*listB'
reset_post()
post.info = post.info * 2
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
# '__rmul__'
# aka 'listB*listA'
reset_post()
post.info = 2 * post.info
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "0", "1", "2", "3", "4", "5"]
# '__setitem__(index, value)'
# aka 'list[index]=value'
# aka 'setitem(list, value)'
reset_post()
post.info[4] = "a"
assert post.info == ["0", "1", "2", "3", "a", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "a", "5"]
# __setitem__(index, value) with a negative index
reset_post()
post.info[-2] = "a"
assert post.info == ["0", "1", "2", "3", "a", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "a", "5"]
# '__setitem__(slice(i, j), listB)'
# aka 'listA[i:j] = listB'
# aka 'setitem(listA, slice(i, j), listB)'
reset_post()
post.info[1:3] = ["h", "e", "l", "l", "o"]
assert post.info == ["0", "h", "e", "l", "l", "o", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "h", "e", "l", "l", "o", "3", "4", "5"]
# '__setitem__(slice(i, j), listB)' with negative i and j
reset_post()
post.info[-5:-3] = ["h", "e", "l", "l", "o"]
assert post.info == ["0", "h", "e", "l", "l", "o", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "h", "e", "l", "l", "o", "3", "4", "5"]
# negative
# 'append'
reset_post()
post.info.append("h")
assert post.info == ["0", "1", "2", "3", "4", "5", "h"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "h"]
# 'extend'
reset_post()
post.info.extend(["h", "e", "l", "l", "o"])
assert post.info == ["0", "1", "2", "3", "4", "5", "h", "e", "l", "l", "o"]
post.save()
post.reload()
assert post.info == ["0", "1", "2", "3", "4", "5", "h", "e", "l", "l", "o"]
# 'insert'
# 'pop'
reset_post()
x = post.info.pop(2)
y = post.info.pop()
assert post.info == ["0", "1", "3", "4"]
assert x == "2"
assert y == "5"
post.save()
post.reload()
assert post.info == ["0", "1", "3", "4"]
# 'remove'
reset_post()
post.info.remove("2")
assert post.info == ["0", "1", "3", "4", "5"]
post.save()
post.reload()
assert post.info == ["0", "1", "3", "4", "5"]
# 'reverse'
reset_post()
post.info.reverse()
assert post.info == ["5", "4", "3", "2", "1", "0"]
post.save()
post.reload()
assert post.info == ["5", "4", "3", "2", "1", "0"]
# 'sort': though this operator method does manipulate the list, it is
# tested in the 'test_list_field_lexicograpic_operators' function
def test_list_field_invalid_operators(self):
class BlogPost(Document):
ref = StringField()
info = ListField(StringField())
post = BlogPost()
post.ref = "1234"
post.info = ["0", "1", "2", "3", "4", "5"]
# '__hash__'
# aka 'hash(list)'
with pytest.raises(TypeError):
hash(post.info)
def test_list_field_lexicographic_operators(self):
class BlogPost(Document):
ref = StringField()
text_info = ListField(StringField())
oid_info = ListField(ObjectIdField())
bool_info = ListField(BooleanField())
BlogPost.drop_collection()
blogSmall = BlogPost(ref="small")
blogSmall.text_info = ["a", "a", "a"]
blogSmall.bool_info = [False, False]
blogSmall.save()
blogSmall.reload()
blogLargeA = BlogPost(ref="big")
blogLargeA.text_info = ["a", "z", "j"]
blogLargeA.bool_info = [False, True]
blogLargeA.save()
blogLargeA.reload()
blogLargeB = BlogPost(ref="big2")
blogLargeB.text_info = ["a", "z", "j"]
blogLargeB.oid_info = [
"54495ad94c934721ede76f90",
"54495ad94c934721ede76d23",
"54495ad94c934721ede76d00",
]
blogLargeB.bool_info = [False, True]
blogLargeB.save()
blogLargeB.reload()
# '__eq__' aka '=='
assert blogLargeA.text_info == blogLargeB.text_info
assert blogLargeA.bool_info == blogLargeB.bool_info
# '__ge__' aka '>='
assert blogLargeA.text_info >= blogSmall.text_info
assert blogLargeA.text_info >= blogLargeB.text_info
assert blogLargeA.bool_info >= blogSmall.bool_info
assert blogLargeA.bool_info >= blogLargeB.bool_info
# '__gt__' aka '>'
assert blogLargeA.text_info >= blogSmall.text_info
assert blogLargeA.bool_info >= blogSmall.bool_info
# '__le__' aka '<='
assert blogSmall.text_info <= blogLargeB.text_info
assert blogLargeA.text_info <= blogLargeB.text_info
assert blogSmall.bool_info <= blogLargeB.bool_info
assert blogLargeA.bool_info <= blogLargeB.bool_info
# '__lt__' aka '<'
assert blogSmall.text_info < blogLargeB.text_info
assert blogSmall.bool_info < blogLargeB.bool_info
# '__ne__' aka '!='
assert blogSmall.text_info != blogLargeB.text_info
assert blogSmall.bool_info != blogLargeB.bool_info
# 'sort'
blogLargeB.bool_info = [True, False, True, False]
blogLargeB.text_info.sort()
blogLargeB.oid_info.sort()
blogLargeB.bool_info.sort()
sorted_target_list = [
ObjectId("54495ad94c934721ede76d00"),
ObjectId("54495ad94c934721ede76d23"),
ObjectId("54495ad94c934721ede76f90"),
]
assert blogLargeB.text_info == ["a", "j", "z"]
assert blogLargeB.oid_info == sorted_target_list
assert blogLargeB.bool_info == [False, False, True, True]
blogLargeB.save()
blogLargeB.reload()
assert blogLargeB.text_info == ["a", "j", "z"]
assert blogLargeB.oid_info == sorted_target_list
assert blogLargeB.bool_info == [False, False, True, True]
def test_list_assignment(self):
class BlogPost(Document):
info = ListField()
BlogPost.drop_collection()
post = BlogPost()
post.info = ["e1", "e2", 3, "4", 5]
post.save()
post.info[0] = 1
post.save()
post.reload()
assert post.info[0] == 1
post.info[1:3] = ["n2", "n3"]
post.save()
post.reload()
assert post.info == [1, "n2", "n3", "4", 5]
post.info[-1] = "n5"
post.save()
post.reload()
assert post.info == [1, "n2", "n3", "4", "n5"]
post.info[-2] = 4
post.save()
post.reload()
assert post.info == [1, "n2", "n3", 4, "n5"]
post.info[1:-1] = [2]
post.save()
post.reload()
assert post.info == [1, 2, "n5"]
post.info[:-1] = [1, "n2", "n3", 4]
post.save()
post.reload()
assert post.info == [1, "n2", "n3", 4, "n5"]
post.info[-4:3] = [2, 3]
post.save()
post.reload()
assert post.info == [1, 2, 3, 4, "n5"]
def test_list_field_passed_in_value(self):
class Foo(Document):
bars = ListField(ReferenceField("Bar"))
class Bar(Document):
text = StringField()
bar = Bar(text="hi")
bar.save()
foo = Foo(bars=[])
foo.bars.append(bar)
assert repr(foo.bars) == "[<Bar: Bar object>]"
def test_list_field_strict(self):
class Simple(Document):
mapping = ListField(field=IntField())
Simple.drop_collection()
e = Simple()
e.mapping = [1]
e.save()
# try creating an invalid mapping
with pytest.raises(ValidationError):
e.mapping = ["abc"]
e.save()
def test_list_field_max_length(self):
class Foo(Document):
items = ListField(IntField(), max_length=5)
foo = Foo()
for i in range(1, 7):
foo.items.append(i)
if i < 6:
foo.save()
else:
with pytest.raises(ValidationError) as exc_info:
foo.save()
assert "List is too long" in str(exc_info.value)
def test_list_field_max_length_set_operator(self):
class Foo(Document):
items = ListField(IntField(), max_length=3)
foo = Foo.objects.create(items=[1, 2, 3])
with pytest.raises(ValidationError) as exc_info:
foo.modify(set__items=[1, 2, 3, 4])
assert "List is too long" in str(exc_info.value)
def test_list_field_rejects_strings(self):
class Simple(Document):
mapping = ListField()
Simple.drop_collection()
e = Simple()
e.mapping = "hello world"
with pytest.raises(ValidationError):
e.save()
def test_complex_field_required(self):
class Simple(Document):
mapping = ListField(required=True)
Simple.drop_collection()
e = Simple()
e.mapping = []
with pytest.raises(ValidationError):
e.save()
class Simple(Document):
mapping = DictField(required=True)
Simple.drop_collection()
e = Simple()
e.mapping = {}
with pytest.raises(ValidationError):
e.save()
def test_complex_field_same_value_not_changed(self):
class Simple(Document):
mapping = ListField()
Simple.drop_collection()
e = Simple().save()
e.mapping = []
assert e._changed_fields == []
class Simple(Document):
mapping = DictField()
Simple.drop_collection()
e = Simple().save()
e.mapping = {}
assert e._changed_fields == []
def test_slice_marks_field_as_changed(self):
class Simple(Document):
widgets = ListField()
simple = Simple(widgets=[1, 2, 3, 4]).save()
simple.widgets[:3] = []
assert ["widgets"] == simple._changed_fields
simple.save()
simple = simple.reload()
assert simple.widgets == [4]
def test_del_slice_marks_field_as_changed(self):
class Simple(Document):
widgets = ListField()
simple = Simple(widgets=[1, 2, 3, 4]).save()
del simple.widgets[:3]
assert ["widgets"] == simple._changed_fields
simple.save()
simple = simple.reload()
assert simple.widgets == [4]
def test_list_field_with_negative_indices(self):
class Simple(Document):
widgets = ListField()
simple = Simple(widgets=[1, 2, 3, 4]).save()
simple.widgets[-1] = 5
assert ["widgets.3"] == simple._changed_fields
simple.save()
simple = simple.reload()
assert simple.widgets == [1, 2, 3, 5]
def test_list_field_complex(self):
class SettingBase(EmbeddedDocument):
meta = {"allow_inheritance": True}
class StringSetting(SettingBase):
value = StringField()
class IntegerSetting(SettingBase):
value = IntField()
class Simple(Document):
mapping = ListField()
Simple.drop_collection()
e = Simple()
e.mapping.append(StringSetting(value="foo"))
e.mapping.append(IntegerSetting(value=42))
e.mapping.append(
{
"number": 1,
"string": "Hi!",
"float": 1.001,
"complex": IntegerSetting(value=42),
"list": [IntegerSetting(value=42), StringSetting(value="foo")],
}
)
e.save()
e2 = Simple.objects.get(id=e.id)
assert isinstance(e2.mapping[0], StringSetting)
assert isinstance(e2.mapping[1], IntegerSetting)
# Test querying
assert Simple.objects.filter(mapping__1__value=42).count() == 1
assert Simple.objects.filter(mapping__2__number=1).count() == 1
assert Simple.objects.filter(mapping__2__complex__value=42).count() == 1
assert Simple.objects.filter(mapping__2__list__0__value=42).count() == 1
assert Simple.objects.filter(mapping__2__list__1__value="foo").count() == 1
# Confirm can update
Simple.objects().update(set__mapping__1=IntegerSetting(value=10))
assert Simple.objects.filter(mapping__1__value=10).count() == 1
Simple.objects().update(set__mapping__2__list__1=StringSetting(value="Boo"))
assert Simple.objects.filter(mapping__2__list__1__value="foo").count() == 0
assert Simple.objects.filter(mapping__2__list__1__value="Boo").count() == 1
def test_embedded_db_field(self):
class Embedded(EmbeddedDocument):
number = IntField(default=0, db_field="i")
class Test(Document):
embedded = EmbeddedDocumentField(Embedded, db_field="x")
Test.drop_collection()
test = Test()
test.embedded = Embedded(number=1)
test.save()
Test.objects.update_one(inc__embedded__number=1)
test = Test.objects.get()
assert test.embedded.number == 2
doc = self.db.test.find_one()
assert doc["x"]["i"] == 2
def test_double_embedded_db_field(self):
class C(EmbeddedDocument):
txt = StringField()
class B(EmbeddedDocument):
c = EmbeddedDocumentField(C, db_field="fc")
class A(Document):
b = EmbeddedDocumentField(B, db_field="fb")
a = A(b=B(c=C(txt="hi")))
a.validate()
a = A(b={"c": {"txt": "hi"}})
a.validate()
def test_double_embedded_db_field_from_son(self):
class C(EmbeddedDocument):
txt = StringField()
class B(EmbeddedDocument):
c = EmbeddedDocumentField(C, db_field="fc")
class A(Document):
b = EmbeddedDocumentField(B, db_field="fb")
a = A._from_son(SON([("fb", SON([("fc", SON([("txt", "hi")]))]))]))
assert a.b.c.txt == "hi"
@pytest.mark.xfail(
reason="Using a string reference in an EmbeddedDocumentField does not work if the class isnt registerd yet",
raises=NotRegistered,
)
def test_embedded_document_field_cant_reference_using_a_str_if_it_does_not_exist_yet(
self,
):
class MyDoc2(Document):
emb = EmbeddedDocumentField("MyFunkyDoc123")
class MyFunkyDoc123(EmbeddedDocument):
name = StringField()
def test_embedded_document_validation(self):
class Comment(EmbeddedDocument):
content = StringField()
class PersonPreferences(EmbeddedDocument):
food = StringField(required=True)
number = IntField()
class Person(Document):
name = StringField()
preferences = EmbeddedDocumentField(PersonPreferences)
Person.drop_collection()
person = Person(name="Test User")
person.preferences = "My Preferences"
with pytest.raises(ValidationError):
person.validate()
# Check that only the right embedded doc works
person.preferences = Comment(content="Nice blog post...")
with pytest.raises(ValidationError):
person.validate()
# Check that the embedded doc is valid
person.preferences = PersonPreferences()
with pytest.raises(ValidationError):
person.validate()
person.preferences = PersonPreferences(food="Cheese", number=47)
assert person.preferences.food == "Cheese"
person.validate()
def test_embedded_document_inheritance(self):
class User(EmbeddedDocument):
name = StringField()
meta = {"allow_inheritance": True}
class PowerUser(User):
power = IntField()
class BlogPost(Document):
content = StringField()
author = EmbeddedDocumentField(User)
BlogPost.drop_collection()
post = BlogPost(content="What I did today...")
post.author = PowerUser(name="Test User", power=47)
post.save()
assert 47 == BlogPost.objects.first().author.power
def test_embedded_document_inheritance_with_list(self):
class Group(EmbeddedDocument):
name = StringField()
content = ListField(StringField())
class Basedoc(Document):
groups = ListField(EmbeddedDocumentField(Group))
meta = {"abstract": True}
class User(Basedoc):
doctype = StringField(require=True, default="userdata")
User.drop_collection()
content = ["la", "le", "lu"]
group = Group(name="foo", content=content)
foobar = User(groups=[group])
foobar.save()
assert content == User.objects.first().groups[0].content
def test_reference_miss(self):
class Foo(Document):
pass
class Bar(Document):
ref = ReferenceField(Foo)
generic_ref = GenericReferenceField()
Foo.drop_collection()
Bar.drop_collection()
foo = Foo().save()
bar = Bar(ref=foo, generic_ref=foo).save()
# Reference is no longer valid
foo.delete()
bar = Bar.objects.get()
with pytest.raises(DoesNotExist):
bar.ref
with pytest.raises(DoesNotExist):
bar.generic_ref
# When auto_dereference is disabled, there is no trouble returning DBRef
bar = Bar.objects.get()
expected = foo.to_dbref()
bar._fields["ref"]._auto_dereference = False
assert bar.ref == expected
bar._fields["generic_ref"]._auto_dereference = False
assert bar.generic_ref == {"_ref": expected, "_cls": "Foo"}
def test_list_item_dereference(self):
class User(Document):
name = StringField()
class Group(Document):
members = ListField(ReferenceField(User))
User.drop_collection()
Group.drop_collection()
user1 = User(name="user1")
user1.save()
user2 = User(name="user2")
user2.save()
group = Group(members=[user1, user2])
group.save()
group_obj = Group.objects.first()
assert group_obj.members[0].name == user1.name
assert group_obj.members[1].name == user2.name
def test_recursive_reference(self):
class Employee(Document):
name = StringField()
boss = ReferenceField("self")
friends = ListField(ReferenceField("self"))
Employee.drop_collection()
bill = Employee(name="Bill Lumbergh")
bill.save()
michael = Employee(name="Michael Bolton")
michael.save()
samir = Employee(name="Samir Nagheenanajar")
samir.save()
friends = [michael, samir]
peter = Employee(name="Peter Gibbons", boss=bill, friends=friends)
peter.save()
peter = Employee.objects.with_id(peter.id)
assert peter.boss == bill
assert peter.friends == friends
def test_recursive_embedding(self):
class TreeNode(EmbeddedDocument):
name = StringField()
children = ListField(EmbeddedDocumentField("self"))
class Tree(Document):
name = StringField()
children = ListField(EmbeddedDocumentField("TreeNode"))
Tree.drop_collection()
tree = Tree(name="Tree")
first_child = TreeNode(name="Child 1")
tree.children.append(first_child)
second_child = TreeNode(name="Child 2")
first_child.children.append(second_child)
tree.save()
tree = Tree.objects.first()
assert len(tree.children) == 1
assert len(tree.children[0].children) == 1
third_child = TreeNode(name="Child 3")
tree.children[0].children.append(third_child)
tree.save()
assert len(tree.children) == 1
assert tree.children[0].name == first_child.name
assert tree.children[0].children[0].name == second_child.name
assert tree.children[0].children[1].name == third_child.name
# Test updating
tree.children[0].name = "I am Child 1"
tree.children[0].children[0].name = "I am Child 2"
tree.children[0].children[1].name = "I am Child 3"
tree.save()
assert tree.children[0].name == "I am Child 1"
assert tree.children[0].children[0].name == "I am Child 2"
assert tree.children[0].children[1].name == "I am Child 3"
# Test removal
assert len(tree.children[0].children) == 2
del tree.children[0].children[1]
tree.save()
assert len(tree.children[0].children) == 1
tree.children[0].children.pop(0)
tree.save()
assert len(tree.children[0].children) == 0
assert tree.children[0].children == []
tree.children[0].children.insert(0, third_child)
tree.children[0].children.insert(0, second_child)
tree.save()
assert len(tree.children[0].children) == 2
assert tree.children[0].children[0].name == second_child.name
assert tree.children[0].children[1].name == third_child.name
def test_drop_abstract_document(self):
class AbstractDoc(Document):
name = StringField()
meta = {"abstract": True}
with pytest.raises(OperationError):
AbstractDoc.drop_collection()
def test_reference_class_with_abstract_parent(self):
class Sibling(Document):
name = StringField()
meta = {"abstract": True}
class Sister(Sibling):
pass
class Brother(Sibling):
sibling = ReferenceField(Sibling)
Sister.drop_collection()
Brother.drop_collection()
sister = Sister(name="Alice")
sister.save()
brother = Brother(name="Bob", sibling=sister)
brother.save()
assert Brother.objects[0].sibling.name == sister.name
def test_reference_abstract_class(self):
class Sibling(Document):
name = StringField()
meta = {"abstract": True}
class Sister(Sibling):
pass
class Brother(Sibling):
sibling = ReferenceField(Sibling)
Sister.drop_collection()
Brother.drop_collection()
sister = Sibling(name="Alice")
brother = Brother(name="Bob", sibling=sister)
with pytest.raises(ValidationError):
brother.save()
def test_abstract_reference_base_type(self):
class Sibling(Document):
name = StringField()
meta = {"abstract": True}
class Brother(Sibling):
sibling = ReferenceField(Sibling)
class Mother(Document):
name = StringField()
Brother.drop_collection()
Mother.drop_collection()
mother = Mother(name="Carol")
mother.save()
brother = Brother(name="Bob", sibling=mother)
with pytest.raises(ValidationError):
brother.save()
def test_generic_reference(self):
class Link(Document):
title = StringField()
meta = {"allow_inheritance": False}
class Post(Document):
title = StringField()
class Bookmark(Document):
bookmark_object = GenericReferenceField()
Link.drop_collection()
Post.drop_collection()
Bookmark.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
bm = Bookmark(bookmark_object=post_1)
bm.save()
bm = Bookmark.objects(bookmark_object=post_1).first()
assert bm.bookmark_object == post_1
assert isinstance(bm.bookmark_object, Post)
bm.bookmark_object = link_1
bm.save()
bm = Bookmark.objects(bookmark_object=link_1).first()
assert bm.bookmark_object == link_1
assert isinstance(bm.bookmark_object, Link)
def test_generic_reference_list(self):
class Link(Document):
title = StringField()
class Post(Document):
title = StringField()
class User(Document):
bookmarks = ListField(GenericReferenceField())
Link.drop_collection()
Post.drop_collection()
User.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
user = User(bookmarks=[post_1, link_1])
user.save()
user = User.objects(bookmarks__all=[post_1, link_1]).first()
assert user.bookmarks[0] == post_1
assert user.bookmarks[1] == link_1
def test_generic_reference_document_not_registered(self):
class Link(Document):
title = StringField()
class User(Document):
bookmarks = ListField(GenericReferenceField())
Link.drop_collection()
User.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
user = User(bookmarks=[link_1])
user.save()
# Mimic User and Link definitions being in a different file
# and the Link model not being imported in the User file.
del _document_registry["Link"]
user = User.objects.first()
try:
user.bookmarks
raise AssertionError("Link was removed from the registry")
except NotRegistered:
pass
def test_generic_reference_is_none(self):
class Person(Document):
name = StringField()
city = GenericReferenceField()
Person.drop_collection()
Person(name="Wilson Jr").save()
assert repr(Person.objects(city=None)) == "[<Person: Person object>]"
def test_generic_reference_choices(self):
class Link(Document):
title = StringField()
class Post(Document):
title = StringField()
class Bookmark(Document):
bookmark_object = GenericReferenceField(choices=(Post,))
Link.drop_collection()
Post.drop_collection()
Bookmark.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
bm = Bookmark(bookmark_object=link_1)
with pytest.raises(ValidationError):
bm.validate()
bm = Bookmark(bookmark_object=post_1)
bm.save()
bm = Bookmark.objects.first()
assert bm.bookmark_object == post_1
def test_generic_reference_string_choices(self):
class Link(Document):
title = StringField()
class Post(Document):
title = StringField()
class Bookmark(Document):
bookmark_object = GenericReferenceField(choices=("Post", Link))
Link.drop_collection()
Post.drop_collection()
Bookmark.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
bm = Bookmark(bookmark_object=link_1)
bm.save()
bm = Bookmark(bookmark_object=post_1)
bm.save()
bm = Bookmark(bookmark_object=bm)
with pytest.raises(ValidationError):
bm.validate()
def test_generic_reference_choices_no_dereference(self):
class Post(Document):
title = StringField()
class Bookmark(Document):
bookmark_object = GenericReferenceField(choices=(Post,))
other_field = StringField()
Post.drop_collection()
Bookmark.drop_collection()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
bm = Bookmark(bookmark_object=post_1)
bm.save()
bm = Bookmark.objects.get(id=bm.id)
# bookmark_object is now a DBRef
bm.other_field = "dummy_change"
bm.save()
def test_generic_reference_list_choices(self):
class Link(Document):
title = StringField()
class Post(Document):
title = StringField()
class User(Document):
bookmarks = ListField(GenericReferenceField(choices=(Post,)))
Link.drop_collection()
Post.drop_collection()
User.drop_collection()
link_1 = Link(title="Pitchfork")
link_1.save()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
user = User(bookmarks=[link_1])
with pytest.raises(ValidationError):
user.validate()
user = User(bookmarks=[post_1])
user.save()
user = User.objects.first()
assert user.bookmarks == [post_1]
def test_generic_reference_list_item_modification(self):
class Post(Document):
title = StringField()
class User(Document):
username = StringField()
bookmarks = ListField(GenericReferenceField())
Post.drop_collection()
User.drop_collection()
post_1 = Post(title="Behind the Scenes of the Pavement Reunion")
post_1.save()
user = User(bookmarks=[post_1])
user.save()
post_1.title = "Title was modified"
user.username = "New username"
user.save()
user = User.objects(bookmarks__all=[post_1]).first()
assert user is not None
assert user.bookmarks[0] == post_1
def test_generic_reference_filter_by_dbref(self):
class Doc(Document):
ref = GenericReferenceField()
Doc.drop_collection()
doc1 = Doc.objects.create()
doc2 = Doc.objects.create(ref=doc1)
doc = Doc.objects.get(ref=DBRef("doc", doc1.pk))
assert doc == doc2
def test_generic_reference_is_not_tracked_in_parent_doc(self):
class Doc1(Document):
name = StringField()
class Doc2(Document):
ref = GenericReferenceField()
refs = ListField(GenericReferenceField())
Doc1.drop_collection()
Doc2.drop_collection()
doc1 = Doc1(name="garbage1").save()
doc11 = Doc1(name="garbage11").save()
doc2 = Doc2(ref=doc1, refs=[doc11]).save()
doc2.ref.name = "garbage2"
assert doc2._get_changed_fields() == []
doc2.refs[0].name = "garbage3"
assert doc2._get_changed_fields() == []
assert doc2._delta() == ({}, {})
def test_generic_reference_field(self):
class Doc(Document):
ref = GenericReferenceField()
Doc.drop_collection()
doc1 = Doc.objects.create()
doc2 = Doc.objects.create(ref=doc1)
assert isinstance(doc1.pk, ObjectId)
doc = Doc.objects.get(ref=doc1.pk)
assert doc == doc2
def test_choices_allow_using_sets_as_choices(self):
class Shirt(Document):
size = StringField(choices={"M", "L"})
Shirt(size="M").validate()
def test_choices_validation_allow_no_value(self):
class Shirt(Document):
size = StringField(choices=("S", "M"))
shirt = Shirt()
shirt.validate()
def test_choices_validation_accept_possible_value(self):
class Shirt(Document):
size = StringField(choices=("S", "M"))
shirt = Shirt(size="S")
shirt.validate()
def test_choices_validation_reject_unknown_value(self):
class Shirt(Document):
size = StringField(choices=("S", "M"))
shirt = Shirt(size="XS")
with pytest.raises(ValidationError):
shirt.validate()
def test_choices_get_field_display(self):
class Shirt(Document):
size = StringField(
max_length=3,
choices=(
("S", "Small"),
("M", "Medium"),
("L", "Large"),
("XL", "Extra Large"),
("XXL", "Extra Extra Large"),
),
)
style = StringField(
max_length=3,
choices=(("S", "Small"), ("B", "Baggy"), ("W", "Wide")),
default="W",
)
Shirt.drop_collection()
shirt1 = Shirt()
shirt2 = Shirt()
# Make sure get_<field>_display returns the default value (or None)
assert shirt1.get_size_display() is None
assert shirt1.get_style_display() == "Wide"
shirt1.size = "XXL"
shirt1.style = "B"
shirt2.size = "M"
shirt2.style = "S"
assert shirt1.get_size_display() == "Extra Extra Large"
assert shirt1.get_style_display() == "Baggy"
assert shirt2.get_size_display() == "Medium"
assert shirt2.get_style_display() == "Small"
# Set as Z - an invalid choice
shirt1.size = "Z"
shirt1.style = "Z"
assert shirt1.get_size_display() == "Z"
assert shirt1.get_style_display() == "Z"
with pytest.raises(ValidationError):
shirt1.validate()
def test_simple_choices_validation(self):
class Shirt(Document):
size = StringField(max_length=3, choices=("S", "M", "L", "XL", "XXL"))
Shirt.drop_collection()
shirt = Shirt()
shirt.validate()
shirt.size = "S"
shirt.validate()
shirt.size = "XS"
with pytest.raises(ValidationError):
shirt.validate()
def test_simple_choices_get_field_display(self):
class Shirt(Document):
size = StringField(max_length=3, choices=("S", "M", "L", "XL", "XXL"))
style = StringField(
max_length=3, choices=("Small", "Baggy", "wide"), default="Small"
)
Shirt.drop_collection()
shirt = Shirt()
assert shirt.get_size_display() is None
assert shirt.get_style_display() == "Small"
shirt.size = "XXL"
shirt.style = "Baggy"
assert shirt.get_size_display() == "XXL"
assert shirt.get_style_display() == "Baggy"
# Set as Z - an invalid choice
shirt.size = "Z"
shirt.style = "Z"
assert shirt.get_size_display() == "Z"
assert shirt.get_style_display() == "Z"
with pytest.raises(ValidationError):
shirt.validate()
def test_simple_choices_validation_invalid_value(self):
SIZES = ("S", "M", "L", "XL", "XXL")
COLORS = (("R", "Red"), ("B", "Blue"))
SIZE_MESSAGE = "Value must be one of ('S', 'M', 'L', 'XL', 'XXL')"
COLOR_MESSAGE = "Value must be one of ['R', 'B']"
class Shirt(Document):
size = StringField(max_length=3, choices=SIZES)
color = StringField(max_length=1, choices=COLORS)
Shirt.drop_collection()
shirt = Shirt()
shirt.validate()
shirt.size = "S"
shirt.color = "R"
shirt.validate()
shirt.size = "XS"
shirt.color = "G"
try:
shirt.validate()
except ValidationError as error:
# get the validation rules
error_dict = error.to_dict()
assert error_dict["size"] == SIZE_MESSAGE
assert error_dict["color"] == COLOR_MESSAGE
def test_recursive_validation(self):
class Author(EmbeddedDocument):
name = StringField(required=True)
class Comment(EmbeddedDocument):
author = EmbeddedDocumentField(Author, required=True)
content = StringField(required=True)
class Post(Document):
title = StringField(required=True)
comments = ListField(EmbeddedDocumentField(Comment))
bob = Author(name="Bob")
post = Post(title="hello world")
post.comments.append(Comment(content="hello", author=bob))
post.comments.append(Comment(author=bob))
with pytest.raises(ValidationError):
post.validate()
try:
post.validate()
except ValidationError as error:
# ValidationError.errors property
assert hasattr(error, "errors")
assert isinstance(error.errors, dict)
assert "comments" in error.errors
assert 1 in error.errors["comments"]
assert isinstance(error.errors["comments"][1]["content"], ValidationError)
# ValidationError.schema property
error_dict = error.to_dict()
assert isinstance(error_dict, dict)
assert "comments" in error_dict
assert 1 in error_dict["comments"]
assert "content" in error_dict["comments"][1]
assert error_dict["comments"][1]["content"] == "Field is required"
post.comments[1].content = "here we go"
post.validate()
def test_tuples_as_tuples(self):
class EnumField(BaseField):
def __init__(self, **kwargs):
super().__init__(**kwargs)
def to_mongo(self, value):
return value
def to_python(self, value):
return tuple(value)
class TestDoc(Document):
items = ListField(EnumField())
TestDoc.drop_collection()
tuples = [(100, "Testing")]
doc = TestDoc()
doc.items = tuples
doc.save()
x = TestDoc.objects().get()
assert x is not None
assert len(x.items) == 1
assert tuple(x.items[0]) in tuples
assert x.items[0] in tuples
def test_dynamic_fields_class(self):
class Doc2(Document):
field_1 = StringField(db_field="f")
class Doc(Document):
my_id = IntField(primary_key=True)
embed_me = DynamicField(db_field="e")
field_x = StringField(db_field="x")
Doc.drop_collection()
Doc2.drop_collection()
doc2 = Doc2(field_1="hello")
doc = Doc(my_id=1, embed_me=doc2, field_x="x")
with pytest.raises(OperationError):
doc.save()
doc2.save()
doc.save()
doc = Doc.objects.get()
assert doc.embed_me.field_1 == "hello"
def test_dynamic_fields_embedded_class(self):
class Embed(EmbeddedDocument):
field_1 = StringField(db_field="f")
class Doc(Document):
my_id = IntField(primary_key=True)
embed_me = DynamicField(db_field="e")
field_x = StringField(db_field="x")
Doc.drop_collection()
Doc(my_id=1, embed_me=Embed(field_1="hello"), field_x="x").save()
doc = Doc.objects.get()
assert doc.embed_me.field_1 == "hello"
def test_dynamicfield_dump_document(self):
class Doc(Document):
field = DynamicField()
class ToEmbed(Document):
id = IntField(primary_key=True, default=1)
recursive = DynamicField()
class ToEmbedParent(Document):
id = IntField(primary_key=True, default=1)
recursive = DynamicField()
meta = {"allow_inheritance": True}
class ToEmbedChild(ToEmbedParent):
pass
to_embed_recursive = ToEmbed(id=1).save()
to_embed = ToEmbed(id=2, recursive=to_embed_recursive).save()
doc = Doc(field=to_embed)
doc.save()
assert isinstance(doc.field, ToEmbed)
assert doc.field == to_embed
# Same thing with a Document with a _cls field
to_embed_recursive = ToEmbedChild(id=1).save()
to_embed_child = ToEmbedChild(id=2, recursive=to_embed_recursive).save()
doc = Doc(field=to_embed_child)
doc.save()
assert isinstance(doc.field, ToEmbedChild)
assert doc.field == to_embed_child
def test_cls_field(self):
class Animal(Document):
meta = {"allow_inheritance": True}
class Fish(Animal):
pass
class Mammal(Animal):
pass
class Dog(Mammal):
pass
class Human(Mammal):
pass
Animal.objects.delete()
Dog().save()
Fish().save()
Human().save()
assert (
Animal.objects(_cls__in=["Animal.Mammal.Dog", "Animal.Fish"]).count() == 2
)
assert Animal.objects(_cls__in=["Animal.Fish.Guppy"]).count() == 0
def test_sparse_field(self):
class Doc(Document):
name = StringField(required=False, unique=True, sparse=True)
# This would raise an exception in a non-sparse unique index
Doc().save()
Doc().save()
def test_undefined_field_exception(self):
class Doc(Document):
foo = StringField()
with pytest.raises(FieldDoesNotExist):
Doc(bar="test")
def test_undefined_field_exception_with_strict(self):
class Doc(Document):
foo = StringField()
meta = {"strict": False}
with pytest.raises(FieldDoesNotExist):
Doc(bar="test")
def test_undefined_field_works_no_confusion_with_db_field(self):
class Doc(Document):
foo = StringField(db_field="bar")
with pytest.raises(FieldDoesNotExist):
Doc(bar="test")
class TestEmbeddedDocumentListField(MongoDBTestCase):
def setUp(self):
class Comments(EmbeddedDocument):
author = StringField()
message = StringField()
class BlogPost(Document):
comments = EmbeddedDocumentListField(Comments)
BlogPost.drop_collection()
self.Comments = Comments
self.BlogPost = BlogPost
self.post1 = self.BlogPost(
comments=[
self.Comments(author="user1", message="message1"),
self.Comments(author="user2", message="message1"),
]
).save()
self.post2 = self.BlogPost(
comments=[
self.Comments(author="user2", message="message2"),
self.Comments(author="user2", message="message3"),
self.Comments(author="user3", message="message1"),
]
).save()
def test_fails_upon_validate_if_provide_a_doc_instead_of_a_list_of_doc(self):
# Relates to Issue #1464
comment = self.Comments(author="John")
class Title(Document):
content = StringField()
# Test with an embeddedDocument instead of a list(embeddedDocument)
# It's an edge case but it used to fail with a vague error, making it difficult to troubleshoot it
post = self.BlogPost(comments=comment)
with pytest.raises(ValidationError) as exc_info:
post.validate()
error_msg = str(exc_info.value)
assert "'comments'" in error_msg
assert "Only lists and tuples may be used in a list field" in error_msg
post = self.BlogPost(comments=Title(content="garbage"))
with pytest.raises(ValidationError) as exc_info:
post.validate()
error_msg = str(exc_info.value)
assert "'comments'" in error_msg
assert "Only lists and tuples may be used in a list field" in error_msg
def test_no_keyword_filter(self):
filtered = self.post1.comments.filter()
assert filtered == self.post1.comments
def test_single_keyword_filter(self):
filtered = self.post1.comments.filter(author="user1")
assert len(filtered) == 1
assert filtered[0].author == "user1"
def test_multi_keyword_filter(self):
filtered = self.post2.comments.filter(author="user2", message="message2")
assert len(filtered) == 1
assert filtered[0].author == "user2"
assert filtered[0].message == "message2"
def test_chained_filter(self):
filtered = self.post2.comments.filter(author="user2").filter(message="message2")
assert len(filtered) == 1
assert filtered[0].author == "user2"
assert filtered[0].message == "message2"
def test_unknown_keyword_filter(self):
with pytest.raises(AttributeError):
self.post2.comments.filter(year=2)
def test_no_keyword_exclude(self):
filtered = self.post1.comments.exclude()
assert filtered == []
def test_single_keyword_exclude(self):
excluded = self.post1.comments.exclude(author="user1")
assert len(excluded) == 1
assert excluded[0].author == "user2"
def test_multi_keyword_exclude(self):
excluded = self.post2.comments.exclude(author="user3", message="message1")
assert len(excluded) == 2
assert excluded[0].author == "user2"
assert excluded[1].author == "user2"
def test_non_matching_exclude(self):
excluded = self.post2.comments.exclude(author="user4")
assert len(excluded) == 3
def test_unknown_keyword_exclude(self):
with pytest.raises(AttributeError):
self.post2.comments.exclude(year=2)
def test_chained_filter_exclude(self):
excluded = self.post2.comments.filter(author="user2").exclude(
message="message2"
)
assert len(excluded) == 1
assert excluded[0].author == "user2"
assert excluded[0].message == "message3"
def test_count(self):
assert self.post1.comments.count() == 2
assert self.post1.comments.count() == len(self.post1.comments)
def test_filtered_count(self):
count = self.post1.comments.filter(author="user1").count()
assert count == 1
def test_single_keyword_get(self):
comment = self.post1.comments.get(author="user1")
assert isinstance(comment, self.Comments)
assert comment.author == "user1"
def test_multi_keyword_get(self):
comment = self.post2.comments.get(author="user2", message="message2")
assert isinstance(comment, self.Comments)
assert comment.author == "user2"
assert comment.message == "message2"
def test_no_keyword_multiple_return_get(self):
with pytest.raises(MultipleObjectsReturned):
self.post1.comments.get()
def test_keyword_multiple_return_get(self):
with pytest.raises(MultipleObjectsReturned):
self.post2.comments.get(author="user2")
def test_unknown_keyword_get(self):
with pytest.raises(AttributeError):
self.post2.comments.get(year=2020)
def test_no_result_get(self):
with pytest.raises(DoesNotExist):
self.post1.comments.get(author="user3")
def test_first(self):
comment = self.post1.comments.first()
assert isinstance(comment, self.Comments)
assert comment == self.post1.comments[0]
def test_create(self):
comment = self.post1.comments.create(author="user4", message="message1")
self.post1.save()
assert isinstance(comment, self.Comments)
assert comment.author == "user4"
assert comment.message == "message1"
assert comment in self.BlogPost.objects(comments__author="user4")[0].comments
def test_filtered_create(self):
comment = self.post1.comments.filter(author="user1").create(
author="user4", message="message1"
)
self.post1.save()
assert isinstance(comment, self.Comments)
assert comment.author == "user4"
assert comment.message == "message1"
assert comment in self.BlogPost.objects(comments__author="user4")[0].comments
def test_no_keyword_update(self):
original = list(self.post1.comments)
number = self.post1.comments.update()
self.post1.save()
assert original[0] in self.BlogPost.objects(id=self.post1.id)[0].comments
assert original[1] in self.BlogPost.objects(id=self.post1.id)[0].comments
assert number == 0
def test_single_keyword_update(self):
number = self.post1.comments.update(author="user4")
self.post1.save()
comments = self.BlogPost.objects(id=self.post1.id)[0].comments
assert comments[0].author == "user4"
assert comments[1].author == "user4"
assert number == 2
def test_unicode(self):
post = self.BlogPost(
comments=[
self.Comments(author="user1", message="сообщение"),
self.Comments(author="user2", message="хабарлама"),
]
).save()
assert post.comments.get(message="сообщение").author == "user1"
def test_save(self):
comments = self.post1.comments
new_comment = self.Comments(author="user4")
comments.append(new_comment)
comments.save()
assert new_comment in self.BlogPost.objects(id=self.post1.id)[0].comments
def test_delete(self):
number = self.post1.comments.delete()
self.post1.save()
assert self.BlogPost.objects(id=self.post1.id)[0].comments == []
assert self.post1.comments == []
assert isinstance(self.post1.comments, EmbeddedDocumentList)
assert number == 2
def test_empty_list_embedded_documents_with_unique_field(self):
class EmbeddedWithUnique(EmbeddedDocument):
number = IntField(unique=True)
class A(Document):
my_list = ListField(EmbeddedDocumentField(EmbeddedWithUnique))
A(my_list=[]).save()
with pytest.raises(NotUniqueError):
A(my_list=[]).save()
class EmbeddedWithSparseUnique(EmbeddedDocument):
number = IntField(unique=True, sparse=True)
class B(Document):
my_list = ListField(EmbeddedDocumentField(EmbeddedWithSparseUnique))
A.drop_collection()
B.drop_collection()
B(my_list=[]).save()
B(my_list=[]).save()
def test_filtered_delete(self):
comment = self.post1.comments[1]
number = self.post1.comments.filter(author="user2").delete()
self.post1.save()
assert comment not in self.BlogPost.objects(id=self.post1.id)[0].comments
assert len(self.BlogPost.objects(id=self.post1.id)[0].comments) == 1
assert comment not in self.post1.comments
assert len(self.post1.comments) == 1
assert number == 1
def test_custom_data(self):
custom_data = {"a": "a_value", "b": [1, 2]}
class CustomData(Document):
a_field = IntField()
c_field = IntField(custom_data=custom_data)
CustomData.drop_collection()
a1 = CustomData(a_field=1, c_field=2).save()
assert 2 == a1.c_field
assert not hasattr(a1.c_field, "custom_data")
assert hasattr(CustomData.c_field, "custom_data")
assert custom_data["a"] == CustomData.c_field.custom_data["a"]
if __name__ == "__main__":
unittest.main()
| true | true |
f72726b689c5695dc442b20557b929ef70c44146 | 9,818 | py | Python | la_funding_analysis/pipeline/cleaning.py | nestauk/la_funding_analysis | bc338583817174f47f2cff2105f4a20a89df4c99 | [
"MIT"
] | null | null | null | la_funding_analysis/pipeline/cleaning.py | nestauk/la_funding_analysis | bc338583817174f47f2cff2105f4a20a89df4c99 | [
"MIT"
] | 1 | 2021-06-24T13:45:14.000Z | 2021-06-24T13:45:14.000Z | la_funding_analysis/pipeline/cleaning.py | nestauk/la_decarb_funding_analysis | bc338583817174f47f2cff2105f4a20a89df4c99 | [
"MIT"
] | 1 | 2021-07-19T11:54:24.000Z | 2021-07-19T11:54:24.000Z | # File: pipeline/cleaning.py
"""Functions to clean datasets.
Calling each function returns a clean version of the associated dataset.
"""
import numpy as np
import pandas as pd
from la_funding_analysis.getters.local_authority_data import (
get_epc,
get_grants,
get_imd,
get_old_parties,
get_parties_models,
get_fuel_poverty,
)
from la_funding_analysis.utils.name_cleaners import (
clean_names,
model_type,
strip_and_titlecase,
)
def get_clean_fuel_poverty():
"""Gets and cleans fuel poverty dataset."""
fuel_poverty = get_fuel_poverty()
#
fuel_poverty = fuel_poverty.rename(
columns={
"Area Codes": "code",
"Area name": "region_1",
"Unnamed: 2": "region_2",
"Unnamed: 3": "region_3",
"Number of households1": "total_households",
"Number of households in fuel poverty1": "fp_households",
"Proportion of households fuel poor (%)": "fp_proportion",
}
)
#
# Remove trailing spaces and fix capitalisation in region columns
fuel_poverty["region_1"] = fuel_poverty["region_1"].apply(strip_and_titlecase)
fuel_poverty["region_2"] = fuel_poverty["region_2"].apply(strip_and_titlecase)
fuel_poverty["region_3"] = fuel_poverty["region_3"].apply(strip_and_titlecase)
#
# Merge the different 'region' columns into one and apply clean_names -
# this allows for joining onto data in which local authorities
# are only referred to by name and not ID
fuel_poverty["clean_name"] = (
fuel_poverty["region_1"]
.fillna(fuel_poverty["region_2"])
.fillna(fuel_poverty["region_3"])
.apply(clean_names)
)
# Fill in NaN values in region columns so that all region_3 rows
# have associated region_1 and region_2 data,
# and all region_2 rows have associated region_1 data.
# First copy region_1 values into region_2 then forward-fill region_2 -
# the 'region_1's stop the filling from going too far
fuel_poverty["region_2"] = (
fuel_poverty["region_2"].fillna(fuel_poverty["region_1"]).ffill()
)
# Set the copied-over values in region_2 back to NaN
fuel_poverty["region_2"].loc[~fuel_poverty["region_1"].isna()] = np.nan
# Then forward-fill region_1
fuel_poverty["region_1"] = fuel_poverty["region_1"].ffill()
# Filter out all of the region_1 rows - they are not local authorities
fuel_poverty = fuel_poverty[~fuel_poverty["region_2"].isna()]
# Additionally remove all Met Counties and Inner/Outer London -
# these are rows that contain (Met County) or Inner/Outer London in region_2
# and have NA region_3
def not_la_condition(string):
return ("(Met County)" in string) | (string in ["Inner London", "Outer London"])
#
#
not_las = [not_la_condition(string) for string in fuel_poverty["region_2"]]
no_region_3 = list(fuel_poverty.region_3.isna())
both = [a and b for a, b in zip(not_las, no_region_3)]
fuel_poverty = fuel_poverty.drop(fuel_poverty[both].index)
#
# Append rows for Greater London Authority and
# Greater Manchester Combined Authority -
# these are not LAs but some grants went to them
combined_authorities = pd.DataFrame(
[
[
np.nan,
"London",
"Greater London Authority",
np.nan,
np.nan,
np.nan,
np.nan,
"Greater London Authority",
],
[
np.nan,
"North West",
"Greater Manchester Combined Authority",
np.nan,
np.nan,
np.nan,
np.nan,
"Greater Manchester Combined Authority",
],
],
columns=fuel_poverty.columns,
)
#
fuel_poverty = fuel_poverty.append(combined_authorities, ignore_index=True)
#
return fuel_poverty
def get_clean_parties_models():
"""Gets and cleans current LA majority party and model (e.g. county, district) data."""
parties_models = get_parties_models()
#
parties_models = parties_models.rename(
columns={
"model (C=county, D=district, 1=all-up, 3=thirds, etc.)": "model",
}
)
# 'Buckinghamshire' row in this dataset is incorrect -
# it is labelled as a County council but it has become unitary
# Manually replace with the correct data
# Source: http://opencouncildata.co.uk/council.php?c=413&y=0
parties_models.loc[2] = ["Buckinghamshire", "U1", "CON"]
#
# Rename models to full names
parties_models["model"] = parties_models["model"].apply(model_type)
#
# Apply clean_names to all names in parties/models data
parties_models["clean_name"] = parties_models["name"].apply(clean_names)
parties_models = parties_models.drop(columns="name")
#
return parties_models
def get_clean_old_parties():
"""Gets and cleans data about political majorities as of August 2020."""
op = get_old_parties()
op["clean_name"] = op["Authority"].apply(clean_names)
op["old_majority"] = [string.upper() for string in op["Control"]]
op = op.drop(columns=["Authority", "Control"]).reset_index(drop=True)
return op
def get_clean_imd():
"""Gets and cleans IMD data."""
imd = get_imd()
imd = imd.rename(
columns={
"Reference area": "full_name",
" Local concentration": "imd_concentration",
}
)
#
imd["clean_name"] = imd["full_name"].apply(clean_names)
imd = imd.drop(columns="full_name")
#
return imd
def get_clean_grants():
"""Gets and cleans data on grants received by LAs."""
grants = get_grants()
grants = grants.rename(
columns={
"Local authority": "full_name",
"GHG LADS 1a": "GHG_1a_individuals",
"1a Consortium Leads": "GHG_1a_leads",
"1a Consortium bodies": "GHG_1a_bodies",
"GHG LADS 1b": "GHG_1b_individuals",
"1b Consortium leads": "GHG_1b_leads",
"1b Consortium bodies": "GHG_1b_bodies",
"Social Housing Decarbonisation Fund - Demonstrator ": "SHDDF",
"Total": "total_grants",
}
)
#
# Some regions appear twice in the grants data
duplicate_strings = ["Greenwich", "Lewisham", "Redbridge"]
regex_exp = "|".join(duplicate_strings)
clean_grants = grants[~grants["full_name"].str.contains(regex_exp, regex=True)]
#
for string in duplicate_strings:
duplicate_df = grants[grants["full_name"].str.contains(string)]
replacement_row = duplicate_df.iloc[0] + duplicate_df.iloc[1]
replacement_row["full_name"] = string
clean_grants = clean_grants.append(replacement_row, ignore_index=True)
#
# Babergh and Mid Suffolk are shown in one row in the grants data,
# but they are actually two different LAs - the stated grants
# apply to both individually
babergh_ms = clean_grants[
[("Babergh and Mid Suffolk" in name) for name in clean_grants["full_name"]]
]
babergh = babergh_ms.copy()
babergh["full_name"] = "Babergh"
ms = babergh_ms.copy()
ms["full_name"] = "Mid Suffolk"
clean_grants = (
clean_grants[
[
("Babergh and Mid Suffolk" not in name)
for name in clean_grants["full_name"]
]
]
.append(babergh)
.append(ms)
.reset_index(drop=True)
)
#
# As before, apply clean_names in order to join data
clean_grants["clean_name"] = clean_grants["full_name"].apply(clean_names)
clean_grants = clean_grants.drop(columns="full_name")
#
return clean_grants
def get_clean_epc():
"""Processes EPC dataset to obtain median EPC for each LA
and counts/proportions of improvable social housing.
"""
epc = get_epc()
#
# Calculate median energy rating for each LA:
epc_medians = (
epc.groupby("LOCAL_AUTHORITY")["CURRENT_ENERGY_EFFICIENCY"]
.apply(np.median)
.reset_index(name="median_energy_efficiency")
)
#
# Calculate proportions of 'improvable' social housing
# (socially rented dwellings that are currently EPC D or below,
# and have the potential to be C or above)
#
# There are two different strings signifying socially rented
# in the TENURE column of the EPC data:
epc_social = epc.loc[epc["TENURE"].isin(["rental (social)", "Rented (social)"])]
#
epc_social["is_improvable"] = (
epc_social["CURRENT_ENERGY_RATING"].isin(["G", "F", "E", "D"])
) & (epc_social["POTENTIAL_ENERGY_RATING"].isin(["C", "B", "A"]))
#
# Find the numbers of improvable / not improvable social houses in each LA
potential_counts = (
epc_social.groupby(["LOCAL_AUTHORITY", "is_improvable"])[
["LOCAL_AUTHORITY", "is_improvable"]
]
.size()
.reset_index(name="count")
.pivot(index="LOCAL_AUTHORITY", columns="is_improvable", values="count")
.rename(columns={True: "total_improvable", False: "total_not_improvable"})
)
# Calculate proportions
potential_counts.columns.name = None
potential_counts["total_social"] = potential_counts.sum(axis=1)
potential_counts["prop_improvable"] = (
potential_counts["total_improvable"] / potential_counts["total_social"]
)
potential_counts = potential_counts.reset_index()[
["LOCAL_AUTHORITY", "total_improvable", "prop_improvable"]
]
# Join to medians
clean_epc = epc_medians.merge(potential_counts, on="LOCAL_AUTHORITY").rename(
columns={"LOCAL_AUTHORITY": "code"}
)
#
return clean_epc
| 36.095588 | 91 | 0.637401 |
import numpy as np
import pandas as pd
from la_funding_analysis.getters.local_authority_data import (
get_epc,
get_grants,
get_imd,
get_old_parties,
get_parties_models,
get_fuel_poverty,
)
from la_funding_analysis.utils.name_cleaners import (
clean_names,
model_type,
strip_and_titlecase,
)
def get_clean_fuel_poverty():
fuel_poverty = get_fuel_poverty()
fuel_poverty = fuel_poverty.rename(
columns={
"Area Codes": "code",
"Area name": "region_1",
"Unnamed: 2": "region_2",
"Unnamed: 3": "region_3",
"Number of households1": "total_households",
"Number of households in fuel poverty1": "fp_households",
"Proportion of households fuel poor (%)": "fp_proportion",
}
)
fuel_poverty["region_1"] = fuel_poverty["region_1"].apply(strip_and_titlecase)
fuel_poverty["region_2"] = fuel_poverty["region_2"].apply(strip_and_titlecase)
fuel_poverty["region_3"] = fuel_poverty["region_3"].apply(strip_and_titlecase)
fuel_poverty["clean_name"] = (
fuel_poverty["region_1"]
.fillna(fuel_poverty["region_2"])
.fillna(fuel_poverty["region_3"])
.apply(clean_names)
)
fuel_poverty["region_2"] = (
fuel_poverty["region_2"].fillna(fuel_poverty["region_1"]).ffill()
)
fuel_poverty["region_2"].loc[~fuel_poverty["region_1"].isna()] = np.nan
fuel_poverty["region_1"] = fuel_poverty["region_1"].ffill()
fuel_poverty = fuel_poverty[~fuel_poverty["region_2"].isna()]
def not_la_condition(string):
return ("(Met County)" in string) | (string in ["Inner London", "Outer London"])
not_las = [not_la_condition(string) for string in fuel_poverty["region_2"]]
no_region_3 = list(fuel_poverty.region_3.isna())
both = [a and b for a, b in zip(not_las, no_region_3)]
fuel_poverty = fuel_poverty.drop(fuel_poverty[both].index)
combined_authorities = pd.DataFrame(
[
[
np.nan,
"London",
"Greater London Authority",
np.nan,
np.nan,
np.nan,
np.nan,
"Greater London Authority",
],
[
np.nan,
"North West",
"Greater Manchester Combined Authority",
np.nan,
np.nan,
np.nan,
np.nan,
"Greater Manchester Combined Authority",
],
],
columns=fuel_poverty.columns,
)
fuel_poverty = fuel_poverty.append(combined_authorities, ignore_index=True)
return fuel_poverty
def get_clean_parties_models():
parties_models = get_parties_models()
parties_models = parties_models.rename(
columns={
"model (C=county, D=district, 1=all-up, 3=thirds, etc.)": "model",
}
)
parties_models.loc[2] = ["Buckinghamshire", "U1", "CON"]
parties_models["model"] = parties_models["model"].apply(model_type)
parties_models["clean_name"] = parties_models["name"].apply(clean_names)
parties_models = parties_models.drop(columns="name")
return parties_models
def get_clean_old_parties():
op = get_old_parties()
op["clean_name"] = op["Authority"].apply(clean_names)
op["old_majority"] = [string.upper() for string in op["Control"]]
op = op.drop(columns=["Authority", "Control"]).reset_index(drop=True)
return op
def get_clean_imd():
imd = get_imd()
imd = imd.rename(
columns={
"Reference area": "full_name",
" Local concentration": "imd_concentration",
}
)
imd["clean_name"] = imd["full_name"].apply(clean_names)
imd = imd.drop(columns="full_name")
return imd
def get_clean_grants():
grants = get_grants()
grants = grants.rename(
columns={
"Local authority": "full_name",
"GHG LADS 1a": "GHG_1a_individuals",
"1a Consortium Leads": "GHG_1a_leads",
"1a Consortium bodies": "GHG_1a_bodies",
"GHG LADS 1b": "GHG_1b_individuals",
"1b Consortium leads": "GHG_1b_leads",
"1b Consortium bodies": "GHG_1b_bodies",
"Social Housing Decarbonisation Fund - Demonstrator ": "SHDDF",
"Total": "total_grants",
}
)
duplicate_strings = ["Greenwich", "Lewisham", "Redbridge"]
regex_exp = "|".join(duplicate_strings)
clean_grants = grants[~grants["full_name"].str.contains(regex_exp, regex=True)]
for string in duplicate_strings:
duplicate_df = grants[grants["full_name"].str.contains(string)]
replacement_row = duplicate_df.iloc[0] + duplicate_df.iloc[1]
replacement_row["full_name"] = string
clean_grants = clean_grants.append(replacement_row, ignore_index=True)
babergh_ms = clean_grants[
[("Babergh and Mid Suffolk" in name) for name in clean_grants["full_name"]]
]
babergh = babergh_ms.copy()
babergh["full_name"] = "Babergh"
ms = babergh_ms.copy()
ms["full_name"] = "Mid Suffolk"
clean_grants = (
clean_grants[
[
("Babergh and Mid Suffolk" not in name)
for name in clean_grants["full_name"]
]
]
.append(babergh)
.append(ms)
.reset_index(drop=True)
)
clean_grants["clean_name"] = clean_grants["full_name"].apply(clean_names)
clean_grants = clean_grants.drop(columns="full_name")
return clean_grants
def get_clean_epc():
epc = get_epc()
epc_medians = (
epc.groupby("LOCAL_AUTHORITY")["CURRENT_ENERGY_EFFICIENCY"]
.apply(np.median)
.reset_index(name="median_energy_efficiency")
)
epc_social = epc.loc[epc["TENURE"].isin(["rental (social)", "Rented (social)"])]
epc_social["is_improvable"] = (
epc_social["CURRENT_ENERGY_RATING"].isin(["G", "F", "E", "D"])
) & (epc_social["POTENTIAL_ENERGY_RATING"].isin(["C", "B", "A"]))
potential_counts = (
epc_social.groupby(["LOCAL_AUTHORITY", "is_improvable"])[
["LOCAL_AUTHORITY", "is_improvable"]
]
.size()
.reset_index(name="count")
.pivot(index="LOCAL_AUTHORITY", columns="is_improvable", values="count")
.rename(columns={True: "total_improvable", False: "total_not_improvable"})
)
potential_counts.columns.name = None
potential_counts["total_social"] = potential_counts.sum(axis=1)
potential_counts["prop_improvable"] = (
potential_counts["total_improvable"] / potential_counts["total_social"]
)
potential_counts = potential_counts.reset_index()[
["LOCAL_AUTHORITY", "total_improvable", "prop_improvable"]
]
clean_epc = epc_medians.merge(potential_counts, on="LOCAL_AUTHORITY").rename(
columns={"LOCAL_AUTHORITY": "code"}
)
return clean_epc
| true | true |
f72726ceb124706a8c674c54488644e60cd85184 | 3,806 | py | Python | test/validation/test_request_history.py | thenetcircle/dino | 1047c3458e91a1b4189e9f48f1393b3a68a935b3 | [
"Apache-2.0"
] | 150 | 2016-10-05T11:09:36.000Z | 2022-03-06T16:24:41.000Z | test/validation/test_request_history.py | thenetcircle/dino | 1047c3458e91a1b4189e9f48f1393b3a68a935b3 | [
"Apache-2.0"
] | 27 | 2017-03-02T03:37:02.000Z | 2022-02-10T04:59:54.000Z | test/validation/test_request_history.py | thenetcircle/dino | 1047c3458e91a1b4189e9f48f1393b3a68a935b3 | [
"Apache-2.0"
] | 21 | 2016-11-11T07:51:48.000Z | 2020-04-26T21:38:33.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from test.base import BaseTest
from activitystreams import parse as as_parser
from dino.validation import request
class RequestHistoryTest(BaseTest):
def setUp(self):
super(RequestHistoryTest, self).setUp()
self.create_channel_and_room()
def test_history(self):
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_no_target_id(self):
act = self.activity_for_history(skip={'target_id'})
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_not_allowed_not_owner_not_in_room_age(self):
self.leave_room()
self.remove_owner()
self.remove_owner_channel()
self.set_acl_single('history|age', str(int(BaseTest.AGE) + 10) + ':')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_not_allowed_not_owner_in_room(self):
self.join_room()
self.remove_owner()
self.remove_owner_channel()
self.set_acl_single('history|age', str(int(BaseTest.AGE) + 10) + ':')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_allowed_owner_not_in_room(self):
self.leave_room()
self.set_owner()
self.set_acl_single('history|sameroom', '')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_not_allowed_not_owner_not_in_room_sameroom(self):
self.leave_room()
self.remove_owner()
self.remove_owner_channel()
self.set_acl_single('history|sameroom', '')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_not_allowed_owner_in_room(self):
self.join_room()
self.set_owner()
self.set_acl_single('history|age', str(int(BaseTest.AGE) + 10) + ':')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_allowed_not_owner_not_in_room(self):
self.leave_room()
self.remove_owner()
self.remove_owner_channel()
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_allowed_not_owner_in_room(self):
self.join_room()
self.remove_owner()
self.remove_owner_channel()
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_allowed_owner_in_room(self):
self.join_room()
self.set_owner()
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
| 38.06 | 77 | 0.696532 |
from test.base import BaseTest
from activitystreams import parse as as_parser
from dino.validation import request
class RequestHistoryTest(BaseTest):
def setUp(self):
super(RequestHistoryTest, self).setUp()
self.create_channel_and_room()
def test_history(self):
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_no_target_id(self):
act = self.activity_for_history(skip={'target_id'})
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_not_allowed_not_owner_not_in_room_age(self):
self.leave_room()
self.remove_owner()
self.remove_owner_channel()
self.set_acl_single('history|age', str(int(BaseTest.AGE) + 10) + ':')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_not_allowed_not_owner_in_room(self):
self.join_room()
self.remove_owner()
self.remove_owner_channel()
self.set_acl_single('history|age', str(int(BaseTest.AGE) + 10) + ':')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_allowed_owner_not_in_room(self):
self.leave_room()
self.set_owner()
self.set_acl_single('history|sameroom', '')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_not_allowed_not_owner_not_in_room_sameroom(self):
self.leave_room()
self.remove_owner()
self.remove_owner_channel()
self.set_acl_single('history|sameroom', '')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(False, response_data[0])
def test_history_not_allowed_owner_in_room(self):
self.join_room()
self.set_owner()
self.set_acl_single('history|age', str(int(BaseTest.AGE) + 10) + ':')
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_allowed_not_owner_not_in_room(self):
self.leave_room()
self.remove_owner()
self.remove_owner_channel()
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_allowed_not_owner_in_room(self):
self.join_room()
self.remove_owner()
self.remove_owner_channel()
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
def test_history_allowed_owner_in_room(self):
self.join_room()
self.set_owner()
act = self.activity_for_history()
response_data = request.on_history(as_parser(act))
self.assertEqual(True, response_data[0])
| true | true |
f72728291b1f65b40e3ca725885ed1fbb1420452 | 4,483 | py | Python | federated_learning_without_transfer_learning/ntf_client_fit_model.py | HwangDongJun/Federated_Learning_using_Websockets | 87c2873ae9b6a651750d08f4cd0ad5757893ce88 | [
"MIT"
] | 2 | 2021-01-05T09:41:09.000Z | 2022-02-04T04:38:50.000Z | federated_learning_without_transfer_learning/ntf_client_fit_model.py | HwangDongJun/Federated_Learning_using_Websockets | 87c2873ae9b6a651750d08f4cd0ad5757893ce88 | [
"MIT"
] | null | null | null | federated_learning_without_transfer_learning/ntf_client_fit_model.py | HwangDongJun/Federated_Learning_using_Websockets | 87c2873ae9b6a651750d08f4cd0ad5757893ce88 | [
"MIT"
] | null | null | null | # Setup library
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import numpy as np
import PIL.Image as Image
from PIL import ImageFile
import tensorflow as tf
import tensorflow_hub as hub
from tensorflow.keras import layers
import matplotlib.pylab as plt
import efficientnet.tfkeras as efn
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]=""
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
logical_gpus = tf.config.experimental.list_logical_devices('GPU')
print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
except RuntimeError as e:
print(e)
class transfer_learning_fit(object):
def __init__(self, config, weights):
self.weights = weights
self.image_shape = (config['image_shape'], config['image_shape'])
self.batch_size = config['batch_size']
self.learning_rate = config['learning_rate']
self.epochs = config['epochs']
self.optimizer = config['optimizer']
self.model_link = config['model']
self.class_names = np.array(['book', 'laptop', 'phone', 'wash', 'water'])
tf.random.set_seed(2020)
def image_generator(self):
image_gen_train = tf.keras.preprocessing.image.ImageDataGenerator(rescale=1./255,
rotation_range=15,
horizontal_flip=True,
brightness_range=[0.7,1.0])
image_gen_val = tf.keras.preprocessing.image.ImageDataGenerator(rescale=1./255)
return image_gen_train, image_gen_val
def gen_train_val_data(self):
gen_train, gen_val = self.image_generator()
train_data_dir = os.path.abspath('INPUT YOUR TRANING DATA SET PATH')
train_data_gen = gen_train.flow_from_directory(directory=str(train_data_dir),
batch_size=self.batch_size,
color_mode='rgb',
shuffle=True,
target_size=self.image_shape,
classes=list(self.class_names))
return train_data_gen
def select_optimizer(self, opti, lr):
if opti == 'adam':
return tf.keras.optimizers.Adam(learning_rate=lr)
def set_model(self, vector_layer):
#efficient_net = efn.EfficientNetB0(
# weights=None,
# input_shape=self.image_shape+(3,),
# include_top=False,
# pooling='max'
#)
#model = tf.keras.Sequential([
# efficient_net,
# layers.Dense(5, activation='softmax')
#])
mobilenet_v2 = tf.keras.applications.MobileNetV2(
weights=None,
input_shape=self.image_shape+(3,),
include_top=False,
pooling='max'
)
model = tf.keras.Sequential([
mobilenet_v2,
layers.Dense(5, activation='softmax')
])
return model
def build_model(self):
feature_vector_url = self.model_link
feature_vector_layer = hub.KerasLayer(feature_vector_url,
input_shape=self.image_shape+(3,))
feature_vector_layer.trainable = True
made_model = self.set_model(feature_vector_layer)
print(made_model.summary())
made_model.compile(
optimizer=self.select_optimizer(self.optimizer, self.learning_rate),
loss='categorical_crossentropy',
metrics=['acc'])
return made_model, feature_vector_layer
def train_model_tosave(self, weight):
callback = tf.keras.callbacks.EarlyStopping(monitor='loss', patience=3)
if weight == list():
local_model, feature_layer = self.build_model()
gen_train_data = self.gen_train_val_data()
local_model.fit_generator(gen_train_data, epochs=self.epochs, callbacks=[callback])
else:
local_model, feature_layer = self.build_model()
gen_train_data = self.gen_train_val_data()
local_model.set_weights(weight)
local_model.fit_generator(gen_train_data, epochs=self.epochs, callbacks=[callback])
return local_model.get_weights()
def get_weight_finetune_model(self, expath, feature_layer, gtrain_data):
reloaded_model = tf.keras.models.load_model(expath)
feature_layer.trainable = True
callback = tf.keras.callbacks.EarlyStopping(monitor='loss', patience=3)
reloaded_model.compile(
optimizer=self.select_optimizer(self.optimizer, self.learning_rate*0.1),
loss='categorical_crossentropy',
metrics=['accuracy'])
reloaded_model.fit_generator(gtrain_data, epochs=self.epochs+(self.epochs*2),
initial_epoch=self.epochs, callbacks=[callback])
return reloaded_model.get_weights() # Dense layer weight는 제외하고 반환
def manage_train(self):
get_weights = list()
training_weight = self.train_model_tosave(self.weights)
return training_weight
| 30.496599 | 86 | 0.741914 |
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import numpy as np
import PIL.Image as Image
from PIL import ImageFile
import tensorflow as tf
import tensorflow_hub as hub
from tensorflow.keras import layers
import matplotlib.pylab as plt
import efficientnet.tfkeras as efn
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]=""
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
logical_gpus = tf.config.experimental.list_logical_devices('GPU')
print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
except RuntimeError as e:
print(e)
class transfer_learning_fit(object):
def __init__(self, config, weights):
self.weights = weights
self.image_shape = (config['image_shape'], config['image_shape'])
self.batch_size = config['batch_size']
self.learning_rate = config['learning_rate']
self.epochs = config['epochs']
self.optimizer = config['optimizer']
self.model_link = config['model']
self.class_names = np.array(['book', 'laptop', 'phone', 'wash', 'water'])
tf.random.set_seed(2020)
def image_generator(self):
image_gen_train = tf.keras.preprocessing.image.ImageDataGenerator(rescale=1./255,
rotation_range=15,
horizontal_flip=True,
brightness_range=[0.7,1.0])
image_gen_val = tf.keras.preprocessing.image.ImageDataGenerator(rescale=1./255)
return image_gen_train, image_gen_val
def gen_train_val_data(self):
gen_train, gen_val = self.image_generator()
train_data_dir = os.path.abspath('INPUT YOUR TRANING DATA SET PATH')
train_data_gen = gen_train.flow_from_directory(directory=str(train_data_dir),
batch_size=self.batch_size,
color_mode='rgb',
shuffle=True,
target_size=self.image_shape,
classes=list(self.class_names))
return train_data_gen
def select_optimizer(self, opti, lr):
if opti == 'adam':
return tf.keras.optimizers.Adam(learning_rate=lr)
def set_model(self, vector_layer):
mobilenet_v2 = tf.keras.applications.MobileNetV2(
weights=None,
input_shape=self.image_shape+(3,),
include_top=False,
pooling='max'
)
model = tf.keras.Sequential([
mobilenet_v2,
layers.Dense(5, activation='softmax')
])
return model
def build_model(self):
feature_vector_url = self.model_link
feature_vector_layer = hub.KerasLayer(feature_vector_url,
input_shape=self.image_shape+(3,))
feature_vector_layer.trainable = True
made_model = self.set_model(feature_vector_layer)
print(made_model.summary())
made_model.compile(
optimizer=self.select_optimizer(self.optimizer, self.learning_rate),
loss='categorical_crossentropy',
metrics=['acc'])
return made_model, feature_vector_layer
def train_model_tosave(self, weight):
callback = tf.keras.callbacks.EarlyStopping(monitor='loss', patience=3)
if weight == list():
local_model, feature_layer = self.build_model()
gen_train_data = self.gen_train_val_data()
local_model.fit_generator(gen_train_data, epochs=self.epochs, callbacks=[callback])
else:
local_model, feature_layer = self.build_model()
gen_train_data = self.gen_train_val_data()
local_model.set_weights(weight)
local_model.fit_generator(gen_train_data, epochs=self.epochs, callbacks=[callback])
return local_model.get_weights()
def get_weight_finetune_model(self, expath, feature_layer, gtrain_data):
reloaded_model = tf.keras.models.load_model(expath)
feature_layer.trainable = True
callback = tf.keras.callbacks.EarlyStopping(monitor='loss', patience=3)
reloaded_model.compile(
optimizer=self.select_optimizer(self.optimizer, self.learning_rate*0.1),
loss='categorical_crossentropy',
metrics=['accuracy'])
reloaded_model.fit_generator(gtrain_data, epochs=self.epochs+(self.epochs*2),
initial_epoch=self.epochs, callbacks=[callback])
return reloaded_model.get_weights()
def manage_train(self):
get_weights = list()
training_weight = self.train_model_tosave(self.weights)
return training_weight
| true | true |
f7272b3ab2b9841850357f84b5ad356ecf40ce88 | 967 | py | Python | python/src/queues/linked_queue_improved.py | marioluan/abstract-data-types | f3823fc4649c86f5a9b677e97e8a8706e5340405 | [
"MIT"
] | 5 | 2017-03-17T17:00:00.000Z | 2018-01-27T12:31:37.000Z | python/src/queues/linked_queue_improved.py | marioluan/abstract-data-types | f3823fc4649c86f5a9b677e97e8a8706e5340405 | [
"MIT"
] | 2 | 2016-08-16T17:02:57.000Z | 2016-08-28T03:34:31.000Z | python/src/queues/linked_queue_improved.py | marioluan/abstract-data-types | f3823fc4649c86f5a9b677e97e8a8706e5340405 | [
"MIT"
] | 1 | 2020-05-19T13:30:19.000Z | 2020-05-19T13:30:19.000Z | from queue_interface import QueueInterface
from src.list.node import Node
class LinkedQueueImproved(QueueInterface):
""" implementation of a queue using a linked list """
def __init__(self):
""" create an empty queue """
self.length = 0
self.head = None
self.tail = None
def isEmpty(self):
""" check if the queue is empty """
return (self.length == 0)
def insert(self, cargo):
""" insert a new node a the end of the queue: O(1) """
node = Node(cargo)
node.next = None
if self.length == 0:
self.head = self.tail = node
else:
tail = self.tail
tail.next = node
self.tail = node
self.length = self.length + 1
def remove(self):
""" remove and return the node at the top of the queue: O(1) """
if self.isEmpty(): return
cargo = self.head.cargo
self.head = self.head.next
self.length = self.length - 1
if self.length == 0:
self.tail = None
return cargo | 25.447368 | 68 | 0.620476 | from queue_interface import QueueInterface
from src.list.node import Node
class LinkedQueueImproved(QueueInterface):
def __init__(self):
self.length = 0
self.head = None
self.tail = None
def isEmpty(self):
return (self.length == 0)
def insert(self, cargo):
node = Node(cargo)
node.next = None
if self.length == 0:
self.head = self.tail = node
else:
tail = self.tail
tail.next = node
self.tail = node
self.length = self.length + 1
def remove(self):
if self.isEmpty(): return
cargo = self.head.cargo
self.head = self.head.next
self.length = self.length - 1
if self.length == 0:
self.tail = None
return cargo | true | true |
f7272babaf32e6372e7957c59ee51b846979c0a3 | 12,854 | py | Python | representation_batch_rl/representation_batch_rl/cql_pixels.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | null | null | null | representation_batch_rl/representation_batch_rl/cql_pixels.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | null | null | null | representation_batch_rl/representation_batch_rl/cql_pixels.py | pedersor/google-research | 6fa751dd261b3f6d918fd2cd35efef5d8bf3eea6 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Implementation of DDPG."""
import typing
from dm_env import specs as dm_env_specs
import numpy as np
import tensorflow as tf
from tf_agents.specs.tensor_spec import TensorSpec
from representation_batch_rl.batch_rl import critic
from representation_batch_rl.batch_rl.encoders import ConvStack
from representation_batch_rl.batch_rl.encoders import ImageEncoder
from representation_batch_rl.batch_rl.encoders import make_impala_cnn_network
from representation_batch_rl.representation_batch_rl import tf_utils
class CQL(object):
"""Class performing CQL training."""
def __init__(self,
observation_spec,
action_spec,
actor_lr = 1e-4,
critic_lr = 3e-4,
discount = 0.99,
tau = 0.005,
target_entropy = 0.0,
reg = 0.0,
num_cql_actions = 10,
bc_pretraining_steps = 40_000,
min_q_weight = 10.0,
num_augmentations = 1,
rep_learn_keywords = 'outer',
batch_size = 256):
"""Creates networks.
Args:
observation_spec: environment observation spec.
action_spec: Action spec.
actor_lr: Actor learning rate.
critic_lr: Critic learning rate.
discount: MDP discount.
tau: Soft target update parameter.
target_entropy: Target entropy.
reg: Coefficient for out of distribution regularization.
num_cql_actions: Number of actions to sample for CQL loss.
bc_pretraining_steps: Use BC loss instead of CQL loss for N steps.
min_q_weight: CQL alpha.
num_augmentations: Num of random crops
rep_learn_keywords: Representation learning loss to add.
batch_size: Batch size
"""
self.num_augmentations = num_augmentations
self.batch_size = batch_size
self.rep_learn_keywords = rep_learn_keywords.split('__')
critic_kwargs = {}
if observation_spec.shape == (64, 64, 3):
# IMPALA for Procgen
def conv_stack():
return make_impala_cnn_network(
depths=[16, 32, 32], use_batch_norm=False, dropout_rate=0.)
state_dim = 256
else:
# Reduced architecture for DMC
def conv_stack():
return ConvStack(observation_spec.shape)
state_dim = 50
conv_stack_critic = conv_stack()
conv_target_stack_critic = conv_stack()
if observation_spec.shape == (64, 64, 3):
conv_stack_critic.output_size = state_dim
conv_target_stack_critic.output_size = state_dim
# Combine and stop_grad some of the above conv stacks
critic_kwargs['encoder'] = ImageEncoder(
conv_stack_critic, feature_dim=state_dim, bprop_conv_stack=True)
# Note: the target critic does not share any weights.
critic_kwargs['encoder_target'] = ImageEncoder(
conv_target_stack_critic, feature_dim=state_dim, bprop_conv_stack=True)
if self.num_augmentations == 0:
dummy_state = tf.constant(
np.zeros(shape=[1] + list(observation_spec.shape)))
else: # account for padding of +4 everywhere and then cropping out 68
dummy_state = tf.constant(np.zeros(shape=[1, 68, 68, 3]))
@tf.function
def init_models():
critic_kwargs['encoder'](dummy_state)
critic_kwargs['encoder_target'](dummy_state)
init_models()
hidden_dims = (256, 256)
# self.actor = policies.CategoricalPolicy(state_dim, action_spec,
# hidden_dims=hidden_dims, encoder=actor_kwargs['encoder'])
action_dim = action_spec.maximum.item() + 1
self.action_dim = action_dim
self.log_alpha = tf.Variable(tf.math.log(1.0), trainable=True)
self.log_cql_alpha = self.log_alpha
self.alpha_optimizer = tf.keras.optimizers.Adam(learning_rate=actor_lr)
self.critic = critic.Critic(
state_dim,
action_dim,
hidden_dims=hidden_dims,
encoder=critic_kwargs['encoder'],
discrete_actions=True,
linear='linear_Q' in self.rep_learn_keywords)
self.critic_target = critic.Critic(
state_dim,
action_dim,
hidden_dims=hidden_dims,
encoder=critic_kwargs['encoder_target'],
discrete_actions=True,
linear='linear_Q' in self.rep_learn_keywords)
@tf.function
def init_models2():
"""This function initializes all auxiliary networks (state and action encoders) with dummy input (Procgen-specific, 68x68x3, 15 actions).
"""
dummy_state = tf.zeros((1, 68, 68, 3), dtype=tf.float32)
phi_s = self.critic.encoder(dummy_state)
phi_a = tf.eye(15, dtype=tf.float32)
if 'linear_Q' in self.rep_learn_keywords:
_ = self.critic.critic1.state_encoder(phi_s)
_ = self.critic.critic2.state_encoder(phi_s)
_ = self.critic.critic1.action_encoder(phi_a)
_ = self.critic.critic2.action_encoder(phi_a)
_ = self.critic_target.critic1.state_encoder(phi_s)
_ = self.critic_target.critic2.state_encoder(phi_s)
_ = self.critic_target.critic1.action_encoder(phi_a)
_ = self.critic_target.critic2.action_encoder(phi_a)
init_models2()
critic.soft_update(self.critic, self.critic_target, tau=1.0)
self.critic_optimizer = tf.keras.optimizers.Adam(learning_rate=critic_lr)
self.tau = tau
self.reg = reg
self.target_entropy = target_entropy
self.discount = discount
self.num_cql_actions = num_cql_actions
self.bc_pretraining_steps = bc_pretraining_steps
self.min_q_weight = min_q_weight
self.bc = None
self.model_dict = {
'critic': self.critic,
'critic_target': self.critic_target,
'critic_optimizer': self.critic_optimizer,
'alpha_optimizer': self.alpha_optimizer
}
@property
def alpha(self):
return tf.constant(0.)
@property
def cql_alpha(self):
return tf.exp(self.log_cql_alpha)
def fit_critic(self, states, actions,
next_states, next_actions, rewards,
discounts):
"""Updates critic parameters.
Args:
states: Batch of states.
actions: Batch of actions.
next_states: Batch of next states.
next_actions: Batch of next actions from training policy.
rewards: Batch of rewards.
discounts: Batch of masks indicating the end of the episodes.
Returns:
Dictionary with information to track.
"""
action_indices = tf.stack(
[tf.range(tf.shape(actions)[0], dtype=tf.int64), actions], axis=-1)
next_action_indices = tf.stack(
[tf.range(tf.shape(next_actions)[0], dtype=tf.int64), next_actions],
axis=-1)
if self.num_augmentations > 1:
target_q = 0.
for i in range(self.num_augmentations):
next_q1_i, next_q2_i = self.critic_target(next_states[i], actions=None)
target_q_i = tf.expand_dims(
rewards, 1) + self.discount * tf.expand_dims(
discounts, 1) * tf.minimum(next_q1_i, next_q2_i)
target_q += target_q_i
target_q /= self.num_augmentations
elif self.num_augmentations == 1:
next_q1, next_q2 = self.critic_target(
next_states[0], actions=None, stop_grad_features=False)
target_q = tf.expand_dims(
rewards, 1) + self.discount * tf.expand_dims(
discounts, 1) * tf.minimum(next_q1, next_q2)
else:
next_q1, next_q2 = self.critic_target(next_states, actions=None)
target_q = tf.expand_dims(rewards, 1) + self.discount * tf.expand_dims(
discounts, 1) * tf.minimum(next_q1, next_q2)
target_q = tf.gather_nd(target_q, indices=next_action_indices)
with tf.GradientTape(watch_accessed_variables=False) as tape:
tape.watch(self.critic.trainable_variables)
if self.num_augmentations > 1:
critic_loss = 0.
q1 = 0.
q2 = 0.
for i in range(self.num_augmentations):
q1_i, q2_i = self.critic(states[i], actions=None)
critic_loss_i = (
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q1_i, indices=action_indices)) +
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q2_i, indices=action_indices)))
q1 += q1_i
q2 += q2_i
critic_loss += critic_loss_i
q1 /= self.num_augmentations
q2 /= self.num_augmentations
critic_loss /= self.num_augmentations
elif self.num_augmentations == 1:
q1, q2 = self.critic(states[0], actions=None)
critic_loss = (
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q1, indices=action_indices)) +
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q2, indices=action_indices)))
else:
# Ensure num_augmentations is non-negative
assert self.num_augmentations == 0
q1, q2 = self.critic(states, actions=None)
critic_loss = (
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q1, indices=action_indices)) +
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q2, indices=action_indices)))
q = tf.minimum(q1, q2)
cql_logsumexp = tf.reduce_logsumexp(q, 1)
cql_loss = tf.reduce_mean(cql_logsumexp -
tf.gather_nd(q, indices=action_indices))
critic_loss += (self.reg * cql_loss)
critic_grads = tape.gradient(critic_loss, self.critic.trainable_variables)
self.critic_optimizer.apply_gradients(
zip(critic_grads, self.critic.trainable_variables))
critic.soft_update(self.critic, self.critic_target, tau=self.tau)
return {
'q1': tf.reduce_mean(q1),
'q2': tf.reduce_mean(q2),
'critic_loss': critic_loss,
'cql_loss': cql_loss
}
@tf.function
def update_step(self,
replay_buffer_iter,
train_target='both'):
"""Performs a single training step for critic and embedding.
Args:
replay_buffer_iter: A tensorflow graph iteratable object.
train_target: string specifying whether update RL and or representation
Returns:
Dictionary with losses to track.
"""
del train_target
transition = next(replay_buffer_iter)
numpy_dataset = isinstance(replay_buffer_iter, np.ndarray)
# observation: n_batch x n_timesteps x 1 x H*W*3*n_frames x 1 ->
# n_batch x H x W x 3*n_frames
if not numpy_dataset:
states = transition.observation[:, 0]
next_states = transition.observation[:, 1]
actions = transition.action[:, 0]
rewards = transition.reward[:, 0]
discounts = transition.discount[:, 0]
if transition.observation.dtype == tf.uint8:
states = tf.cast(states, tf.float32) / 255.
next_states = tf.cast(next_states, tf.float32) / 255.
else:
states, actions, rewards, next_states, discounts = transition
if self.num_augmentations > 0:
states, next_states = tf_utils.image_aug(
states,
next_states,
img_pad=4,
num_augmentations=self.num_augmentations,
obs_dim=64,
channels=3,
cropped_shape=[self.batch_size, 68, 68, 3])
next_actions = self.act(next_states, data_aug=True)
critic_dict = self.fit_critic(states, actions, next_states, next_actions,
rewards, discounts)
return critic_dict
@tf.function
def act(self, states, data_aug=False):
"""Act with batch of states.
Args:
states: tf.tensor n_batch x 64 x 64 x 3
data_aug: bool, whether to use stochastic data aug (else deterministic)
Returns:
action: tf.tensor
"""
if data_aug and self.num_augmentations > 0:
states = states[0]
if self.num_augmentations > 0:
# use pad of 2 to bump 64 to 68 with 2 + 64 + 2 on each side
img_pad = 2
paddings = tf.constant(
[[0, 0], [img_pad, img_pad], [img_pad, img_pad], [0, 0]],
dtype=tf.int32)
states = tf.cast(
tf.pad(tf.cast(states * 255., tf.int32), paddings, 'SYMMETRIC'),
tf.float32) / 255.
q1, q2 = self.critic(states, actions=None)
q = tf.minimum(q1, q2)
actions = tf.argmax(q, -1)
return actions
| 35.410468 | 143 | 0.658316 |
import typing
from dm_env import specs as dm_env_specs
import numpy as np
import tensorflow as tf
from tf_agents.specs.tensor_spec import TensorSpec
from representation_batch_rl.batch_rl import critic
from representation_batch_rl.batch_rl.encoders import ConvStack
from representation_batch_rl.batch_rl.encoders import ImageEncoder
from representation_batch_rl.batch_rl.encoders import make_impala_cnn_network
from representation_batch_rl.representation_batch_rl import tf_utils
class CQL(object):
def __init__(self,
observation_spec,
action_spec,
actor_lr = 1e-4,
critic_lr = 3e-4,
discount = 0.99,
tau = 0.005,
target_entropy = 0.0,
reg = 0.0,
num_cql_actions = 10,
bc_pretraining_steps = 40_000,
min_q_weight = 10.0,
num_augmentations = 1,
rep_learn_keywords = 'outer',
batch_size = 256):
self.num_augmentations = num_augmentations
self.batch_size = batch_size
self.rep_learn_keywords = rep_learn_keywords.split('__')
critic_kwargs = {}
if observation_spec.shape == (64, 64, 3):
def conv_stack():
return make_impala_cnn_network(
depths=[16, 32, 32], use_batch_norm=False, dropout_rate=0.)
state_dim = 256
else:
def conv_stack():
return ConvStack(observation_spec.shape)
state_dim = 50
conv_stack_critic = conv_stack()
conv_target_stack_critic = conv_stack()
if observation_spec.shape == (64, 64, 3):
conv_stack_critic.output_size = state_dim
conv_target_stack_critic.output_size = state_dim
critic_kwargs['encoder'] = ImageEncoder(
conv_stack_critic, feature_dim=state_dim, bprop_conv_stack=True)
critic_kwargs['encoder_target'] = ImageEncoder(
conv_target_stack_critic, feature_dim=state_dim, bprop_conv_stack=True)
if self.num_augmentations == 0:
dummy_state = tf.constant(
np.zeros(shape=[1] + list(observation_spec.shape)))
else:
dummy_state = tf.constant(np.zeros(shape=[1, 68, 68, 3]))
@tf.function
def init_models():
critic_kwargs['encoder'](dummy_state)
critic_kwargs['encoder_target'](dummy_state)
init_models()
hidden_dims = (256, 256)
action_dim = action_spec.maximum.item() + 1
self.action_dim = action_dim
self.log_alpha = tf.Variable(tf.math.log(1.0), trainable=True)
self.log_cql_alpha = self.log_alpha
self.alpha_optimizer = tf.keras.optimizers.Adam(learning_rate=actor_lr)
self.critic = critic.Critic(
state_dim,
action_dim,
hidden_dims=hidden_dims,
encoder=critic_kwargs['encoder'],
discrete_actions=True,
linear='linear_Q' in self.rep_learn_keywords)
self.critic_target = critic.Critic(
state_dim,
action_dim,
hidden_dims=hidden_dims,
encoder=critic_kwargs['encoder_target'],
discrete_actions=True,
linear='linear_Q' in self.rep_learn_keywords)
@tf.function
def init_models2():
dummy_state = tf.zeros((1, 68, 68, 3), dtype=tf.float32)
phi_s = self.critic.encoder(dummy_state)
phi_a = tf.eye(15, dtype=tf.float32)
if 'linear_Q' in self.rep_learn_keywords:
_ = self.critic.critic1.state_encoder(phi_s)
_ = self.critic.critic2.state_encoder(phi_s)
_ = self.critic.critic1.action_encoder(phi_a)
_ = self.critic.critic2.action_encoder(phi_a)
_ = self.critic_target.critic1.state_encoder(phi_s)
_ = self.critic_target.critic2.state_encoder(phi_s)
_ = self.critic_target.critic1.action_encoder(phi_a)
_ = self.critic_target.critic2.action_encoder(phi_a)
init_models2()
critic.soft_update(self.critic, self.critic_target, tau=1.0)
self.critic_optimizer = tf.keras.optimizers.Adam(learning_rate=critic_lr)
self.tau = tau
self.reg = reg
self.target_entropy = target_entropy
self.discount = discount
self.num_cql_actions = num_cql_actions
self.bc_pretraining_steps = bc_pretraining_steps
self.min_q_weight = min_q_weight
self.bc = None
self.model_dict = {
'critic': self.critic,
'critic_target': self.critic_target,
'critic_optimizer': self.critic_optimizer,
'alpha_optimizer': self.alpha_optimizer
}
@property
def alpha(self):
return tf.constant(0.)
@property
def cql_alpha(self):
return tf.exp(self.log_cql_alpha)
def fit_critic(self, states, actions,
next_states, next_actions, rewards,
discounts):
action_indices = tf.stack(
[tf.range(tf.shape(actions)[0], dtype=tf.int64), actions], axis=-1)
next_action_indices = tf.stack(
[tf.range(tf.shape(next_actions)[0], dtype=tf.int64), next_actions],
axis=-1)
if self.num_augmentations > 1:
target_q = 0.
for i in range(self.num_augmentations):
next_q1_i, next_q2_i = self.critic_target(next_states[i], actions=None)
target_q_i = tf.expand_dims(
rewards, 1) + self.discount * tf.expand_dims(
discounts, 1) * tf.minimum(next_q1_i, next_q2_i)
target_q += target_q_i
target_q /= self.num_augmentations
elif self.num_augmentations == 1:
next_q1, next_q2 = self.critic_target(
next_states[0], actions=None, stop_grad_features=False)
target_q = tf.expand_dims(
rewards, 1) + self.discount * tf.expand_dims(
discounts, 1) * tf.minimum(next_q1, next_q2)
else:
next_q1, next_q2 = self.critic_target(next_states, actions=None)
target_q = tf.expand_dims(rewards, 1) + self.discount * tf.expand_dims(
discounts, 1) * tf.minimum(next_q1, next_q2)
target_q = tf.gather_nd(target_q, indices=next_action_indices)
with tf.GradientTape(watch_accessed_variables=False) as tape:
tape.watch(self.critic.trainable_variables)
if self.num_augmentations > 1:
critic_loss = 0.
q1 = 0.
q2 = 0.
for i in range(self.num_augmentations):
q1_i, q2_i = self.critic(states[i], actions=None)
critic_loss_i = (
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q1_i, indices=action_indices)) +
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q2_i, indices=action_indices)))
q1 += q1_i
q2 += q2_i
critic_loss += critic_loss_i
q1 /= self.num_augmentations
q2 /= self.num_augmentations
critic_loss /= self.num_augmentations
elif self.num_augmentations == 1:
q1, q2 = self.critic(states[0], actions=None)
critic_loss = (
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q1, indices=action_indices)) +
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q2, indices=action_indices)))
else:
assert self.num_augmentations == 0
q1, q2 = self.critic(states, actions=None)
critic_loss = (
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q1, indices=action_indices)) +
tf.losses.mean_squared_error(
target_q, tf.gather_nd(q2, indices=action_indices)))
q = tf.minimum(q1, q2)
cql_logsumexp = tf.reduce_logsumexp(q, 1)
cql_loss = tf.reduce_mean(cql_logsumexp -
tf.gather_nd(q, indices=action_indices))
critic_loss += (self.reg * cql_loss)
critic_grads = tape.gradient(critic_loss, self.critic.trainable_variables)
self.critic_optimizer.apply_gradients(
zip(critic_grads, self.critic.trainable_variables))
critic.soft_update(self.critic, self.critic_target, tau=self.tau)
return {
'q1': tf.reduce_mean(q1),
'q2': tf.reduce_mean(q2),
'critic_loss': critic_loss,
'cql_loss': cql_loss
}
@tf.function
def update_step(self,
replay_buffer_iter,
train_target='both'):
del train_target
transition = next(replay_buffer_iter)
numpy_dataset = isinstance(replay_buffer_iter, np.ndarray)
if not numpy_dataset:
states = transition.observation[:, 0]
next_states = transition.observation[:, 1]
actions = transition.action[:, 0]
rewards = transition.reward[:, 0]
discounts = transition.discount[:, 0]
if transition.observation.dtype == tf.uint8:
states = tf.cast(states, tf.float32) / 255.
next_states = tf.cast(next_states, tf.float32) / 255.
else:
states, actions, rewards, next_states, discounts = transition
if self.num_augmentations > 0:
states, next_states = tf_utils.image_aug(
states,
next_states,
img_pad=4,
num_augmentations=self.num_augmentations,
obs_dim=64,
channels=3,
cropped_shape=[self.batch_size, 68, 68, 3])
next_actions = self.act(next_states, data_aug=True)
critic_dict = self.fit_critic(states, actions, next_states, next_actions,
rewards, discounts)
return critic_dict
@tf.function
def act(self, states, data_aug=False):
if data_aug and self.num_augmentations > 0:
states = states[0]
if self.num_augmentations > 0:
img_pad = 2
paddings = tf.constant(
[[0, 0], [img_pad, img_pad], [img_pad, img_pad], [0, 0]],
dtype=tf.int32)
states = tf.cast(
tf.pad(tf.cast(states * 255., tf.int32), paddings, 'SYMMETRIC'),
tf.float32) / 255.
q1, q2 = self.critic(states, actions=None)
q = tf.minimum(q1, q2)
actions = tf.argmax(q, -1)
return actions
| true | true |
f7272c0f0357147e933343d529e0daf7bf5c0052 | 872 | py | Python | src/test/test_duplicate_registration.py | FlyrInc/alembic_utils | a63465da1bd91eed86e28d65334e168ab9a2bfb6 | [
"MIT"
] | null | null | null | src/test/test_duplicate_registration.py | FlyrInc/alembic_utils | a63465da1bd91eed86e28d65334e168ab9a2bfb6 | [
"MIT"
] | null | null | null | src/test/test_duplicate_registration.py | FlyrInc/alembic_utils | a63465da1bd91eed86e28d65334e168ab9a2bfb6 | [
"MIT"
] | null | null | null | from alembic_utils.pg_function import PGFunction
from alembic_utils.replaceable_entity import register_entities, registry
from alembic_utils.testbase import run_alembic_command
def to_upper():
return PGFunction(
schema="public",
signature="to_upper(some_text text)",
definition="""
returns text
as
$$ select upper(some_text) || 'abc' $$ language SQL;
""",
)
def test_migration_create_function(engine) -> None:
to_upper1 = to_upper()
to_upper2 = to_upper()
register_entities([to_upper1, to_upper2], entity_types=[PGFunction])
entities = registry.entities()
assert len(entities) == 1
assert entities[0] == to_upper2
run_alembic_command(
engine=engine,
command="revision",
command_kwargs={"autogenerate": True, "rev_id": "1", "message": "raise"},
)
| 27.25 | 81 | 0.666284 | from alembic_utils.pg_function import PGFunction
from alembic_utils.replaceable_entity import register_entities, registry
from alembic_utils.testbase import run_alembic_command
def to_upper():
return PGFunction(
schema="public",
signature="to_upper(some_text text)",
definition="""
returns text
as
$$ select upper(some_text) || 'abc' $$ language SQL;
""",
)
def test_migration_create_function(engine) -> None:
to_upper1 = to_upper()
to_upper2 = to_upper()
register_entities([to_upper1, to_upper2], entity_types=[PGFunction])
entities = registry.entities()
assert len(entities) == 1
assert entities[0] == to_upper2
run_alembic_command(
engine=engine,
command="revision",
command_kwargs={"autogenerate": True, "rev_id": "1", "message": "raise"},
)
| true | true |
f7272cffc5cbad32c974f28fc7ed2fe66f62b9fc | 13,112 | py | Python | cochlear/noise_exposure.py | bburan/cochlear | 1e7ea32730a794b9f6936440a32e4a82c4bf73e7 | [
"BSD-3-Clause"
] | null | null | null | cochlear/noise_exposure.py | bburan/cochlear | 1e7ea32730a794b9f6936440a32e4a82c4bf73e7 | [
"BSD-3-Clause"
] | null | null | null | cochlear/noise_exposure.py | bburan/cochlear | 1e7ea32730a794b9f6936440a32e4a82c4bf73e7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division
import logging
log = logging.getLogger(__name__)
import numpy as np
from scipy import signal
from traits.api import Instance, Float, Property, Int
from traitsui.api import (View, Item, ToolBar, Action, ActionGroup, VGroup,
HSplit, MenuBar, Menu, HGroup)
from chaco.api import Plot, ArrayPlotData
from enable.api import Component, ComponentEditor
from pyface.api import ImageResource
from experiment import (AbstractParadigm, Expression, AbstractData,
AbstractController, AbstractExperiment, icon_dir)
from experiment.channel import FileChannel
from experiment.coroutine import blocked, rms
from neurogen.block_definitions import (BandlimitedNoise, Cos2Envelope)
from neurogen.calibration import InterpCalibration
from neurogen.calibration.util import (psd, psd_freq, tone_power_conv_nf)
from neurogen.util import db, dbtopa
from cochlear.nidaqmx import (DAQmxDefaults, DAQmxChannel,
ContinuousDAQmxPlayer, DAQmxAttenControl,
ContinuousDAQmxSource)
DAC_FS = 100e3
ADC_FS = 100e3
class NoiseExposureData(AbstractData):
noise_channel = Instance('experiment.channel.Channel')
def _noise_channel_default(self):
return FileChannel(node=self.store_node, name='mic_input',
expected_duration=60*60*2, dtype=np.float32)
class NoiseExposureParadigm(AbstractParadigm):
kw = dict(context=True, log=True)
center_frequency = \
Expression(6e3, label='Center frequency (Hz)', dtype=np.float, **kw)
bandwidth = Expression(4e3, label='Bandwidth (Hz)', dtype=np.float, **kw)
rs = Expression(85, label='Min. atten. in stop band (dB)',
dtype=np.float, **kw)
rp = Expression(0.3, label='Max. ripple in pass band (dB)',
dtype=np.float, **kw)
order = Expression(7, label='Filter order', dtype=np.float, **kw)
level = Expression(100, label='Level (dB SPL)', dtype=np.float, **kw)
seed = Expression(1, label='Noise seed', dtype=np.int, **kw)
duration = Expression(60, label='Exposure duration (sec)',
dtype=np.float, **kw)
rise_time = Expression(0, label='Noise rise time (sec)',
dtype=np.float, **kw)
mic_sens = Float(2.7, label='Mic. sens. (mV/Pa)', dtype=np.float, **kw)
mic_sens_dbv = Property(depends_on='mic_sens', dtype=np.float,
label='Mic. sens. dB(V/Pa)', **kw)
speaker_sens = Float(86.89, label='Speaker sens. (mV/Pa)', dtype=np.float,
**kw)
speaker_sens_dbv = Property(depends_on='speaker_sens', dtype=np.float,
label='Speaker sens. dB(V/Pa)', **kw)
def _get_mic_sens_dbv(self):
return db(self.mic_sens*1e-3)
def _get_speaker_sens_dbv(self):
return db(self.speaker_sens*1e-3)
traits_view = View(
VGroup(
VGroup(
VGroup(
'center_frequency',
'bandwidth',
'rp',
'rs',
'order',
label='Filter settings',
show_border=True
),
'level',
'seed',
'duration',
'rise_time',
label='Stimulus',
show_border=True
),
HGroup(
VGroup('mic_sens', 'speaker_sens'),
VGroup('mic_sens_dbv', 'speaker_sens_dbv', style='readonly'),
label='Hardware settings',
show_border=True
),
)
)
class NoiseExposureController(AbstractController, DAQmxDefaults):
mic_cal = Instance('neurogen.calibration.InterpCalibration')
poll_rate = 1
def setup_experiment(self, info=None):
# Set up the speaker output
token = BandlimitedNoise(name='noise') >> Cos2Envelope(name='envelope')
channel = DAQmxChannel(calibration=InterpCalibration.as_attenuation(),
token=token, voltage_min=-10, voltage_max=10)
iface_dac = ContinuousDAQmxPlayer(fs=DAC_FS, done_callback=self.stop)
iface_dac.add_channel(channel, name='primary')
# Set up the mic input
adc_pipeline = blocked(int(ADC_FS*self.poll_rate), -1, self)
iface_adc = ContinuousDAQmxSource(fs=ADC_FS, pipeline=adc_pipeline,
callback_samples=25e3,
input_line='/Dev1/ai1')
# Save the results
self.channel = channel
self.iface_adc = iface_adc
self.iface_dac = iface_dac
self.token = token
super(NoiseExposureController, self).setup_experiment(info)
def send(self, data):
self.model.update_plots(ADC_FS, data)
self.model.data.noise_channel.send(data)
def start_experiment(self, info=None):
self.refresh_context(evaluate=True)
self.iface_adc.start()
self.iface_dac.play_continuous()
self.log_trial()
def stop_experiment(self, info=None):
self.iface_adc.stop()
self.iface_dac.stop()
def set_duration(self, value):
self.iface_dac.set_value('primary.envelope.duration', value)
self.iface_dac.duration = value
self.model.overall_rms_plot.index_range.high_setting = value
def set_ramp_duration(self, value):
self.iface_dac.set_value('primary.envelope.rise_time', value)
self.iface_dac.duration = value
def set_center_frequency(self, value):
self.iface_dac.set_value('primary.noise.fc', value)
def set_bandwidth(self, value):
self.iface_dac.set_value('primary.noise.bandwidth', value)
def set_level(self, value):
self.iface_dac.set_value('primary.noise.level', value)
def set_seed(self, value):
self.iface_dac.set_value('primary.noise.seed', value)
def set_rise_time(self, value):
self.iface_dac.set_value('primary.envelope.rise_time', value)
def set_order(self, value):
self.iface_dac.set_value('primary.noise.order', value)
def set_rs(self, value):
self.iface_dac.set_value('primary.noise.rs', value)
def set_rp(self, value):
self.iface_dac.set_value('primary.noise.rp', value)
def set_speaker_sens_dbv(self, value):
self.channel.calibration = InterpCalibration([0, 100e3], [value, value])
def set_mic_sens(self, value):
level = self.get_current_value('level')
max_value = dbtopa(level)*value*1e-3
max_value_decade = 10**np.ceil(np.log10(max_value*2))*10
self.iface_adc.expected_range = max_value_decade
class NoiseExposureExperiment(AbstractExperiment):
paradigm = Instance(NoiseExposureParadigm, ())
data = Instance(AbstractData, ())
rms_data = Instance(ArrayPlotData)
recent_rms_plot = Instance(Component)
overall_rms_plot = Instance(Component)
fft_plot = Instance(Component)
current_time = Float(0)
current_update = Int(0)
current_spl = Float(np.nan, label='Current inst. output (dB SPL)')
current_spl_average = Float(np.nan, label='Average of last min. (dB SPL)')
overall_spl_average = Float(np.nan, label='Average output (dB SPL)')
_coefs = None
_zf = None
def update_plots(self, fs, data):
self.current_update += 1
data = signal.detrend(data.ravel())
# Plot RMS
if self._coefs is None:
self._coefs = signal.iirfilter(2, (400.0/(fs/2), 40e3/(fs/2)))
b, a = self._coefs
self._zf = signal.lfiltic(b, a, data[:len(a)-1], data[:len(b)-1])
b, a = self._coefs
data, self._zf = signal.lfilter(b, a, data, zi=self._zf)
rms = np.mean(data**2)**0.5
db_rms = db(rms)-self.paradigm.mic_sens_dbv-db(20e-6)
self.append_data(time=self.current_time, rms=db_rms)
self.current_time += len(data)/fs
self.current_spl = db_rms
self.current_spl_average = self.rms_data.get_data('rms')[-60:].mean()
self.overall_spl_average = self.rms_data.get_data('rms').mean()
w_frequency = psd_freq(data, fs)
w_psd = psd(data, fs, 'hamming')
w_psd_db = db(w_psd)-self.paradigm.mic_sens_dbv-db(20e-6)
self.rms_data.update_data(frequency=w_frequency, psd=w_psd_db)
def _rms_data_default(self):
return ArrayPlotData(time=[], rms=[], frequency=[], psd=[])
def append_data(self, **kwargs):
for k, v in kwargs.items():
kwargs[k] = np.append(self.rms_data.get_data(k), v)
self.rms_data.update_data(**kwargs)
def _overall_rms_plot_default(self):
plot = Plot(self.rms_data)
plot.index_range.low_setting = 0
plot.plot(('time', 'rms'))
return plot
def _recent_rms_plot_default(self):
plot = Plot(self.rms_data)
plot.index_range.high_setting = 'auto'
plot.index_range.low_setting = 'track'
plot.index_range.tracking_amount = 30
plot.value_range.high_setting = 'auto'
plot.value_range.low_setting = 'track'
plot.value_range.tracking_amount = 5
plot.plot(('time', 'rms'))
return plot
def _fft_plot_default(self):
plot = Plot(self.rms_data)
plot.index_range.low_setting = 1e3
plot.index_range.high_setting = 20e3
plot.value_range.low_setting = 10
plot.value_range.high_setting = 80
plot.plot(('frequency', 'psd'))
plot.index_scale = 'log'
return plot
traits_view = View(
HSplit(
VGroup(
VGroup(
Item('paradigm', style='custom', show_label=False,
width=200),
show_border=True,
label='Settings',
enabled_when="handler.state!='running'",
),
VGroup(
'current_spl',
'current_spl_average',
'overall_spl_average',
style='readonly',
show_border=True,
label='Output',
),
),
VGroup(
HGroup(
Item('overall_rms_plot',
editor=ComponentEditor(width=200, height=200)),
Item('recent_rms_plot',
editor=ComponentEditor(width=200, height=200)),
show_labels=False,
),
Item('fft_plot', show_label=False,
editor=ComponentEditor(width=200, height=200)),
),
show_labels=False,
),
resizable=True,
toolbar=ToolBar(
Action(name='Start', action='start',
image=ImageResource('1rightarrow', icon_dir),
enabled_when='handler.state=="uninitialized"'),
Action(name='Stop', action='stop',
image=ImageResource('stop', icon_dir),
enabled_when='handler.state=="running"'),
),
width=0.5,
height=0.5,
id='lbhb.NoiseExposureExperiment',
)
def configure_logging(filename):
time_format = '[%(asctime)s] :: %(name)s - %(levelname)s - %(message)s'
simple_format = '%(name)s - %(message)s'
logging_config = {
'version': 1,
'formatters': {
'time': {'format': time_format},
'simple': {'format': simple_format},
},
'handlers': {
# This is what gets printed out to the console
'console': {
'class': 'logging.StreamHandler',
'formatter': 'simple',
'level': 'DEBUG',
},
# This is what gets saved to the file
'file': {
'class': 'logging.FileHandler',
'formatter': 'time',
'filename': filename,
'level': 'DEBUG',
}
},
'loggers': {
'__main__': {'level': 'ERROR'},
'cochlear': {'level': 'ERROR'},
'cochlear.nidaqmx': {'level': 'ERROR'},
'neurogen.block_definitions': {'level': 'DEBUG'},
},
'root': {
'handlers': ['console', 'file'],
},
}
logging.config.dictConfig(logging_config)
if __name__ == '__main__':
import logging.config
import PyDAQmx as pyni
import warnings
import tables
pyni.DAQmxResetDevice('Dev1')
configure_logging('temp.log')
log.debug('====================== MAIN =======================')
with warnings.catch_warnings():
warnings.simplefilter('ignore')
with tables.open_file('temp.hdf5', 'w') as fh:
data = NoiseExposureData(store_node=fh.root)
controller = NoiseExposureController()
NoiseExposureExperiment(data=data) \
.configure_traits(handler=controller)
| 35.630435 | 80 | 0.583359 | from __future__ import division
import logging
log = logging.getLogger(__name__)
import numpy as np
from scipy import signal
from traits.api import Instance, Float, Property, Int
from traitsui.api import (View, Item, ToolBar, Action, ActionGroup, VGroup,
HSplit, MenuBar, Menu, HGroup)
from chaco.api import Plot, ArrayPlotData
from enable.api import Component, ComponentEditor
from pyface.api import ImageResource
from experiment import (AbstractParadigm, Expression, AbstractData,
AbstractController, AbstractExperiment, icon_dir)
from experiment.channel import FileChannel
from experiment.coroutine import blocked, rms
from neurogen.block_definitions import (BandlimitedNoise, Cos2Envelope)
from neurogen.calibration import InterpCalibration
from neurogen.calibration.util import (psd, psd_freq, tone_power_conv_nf)
from neurogen.util import db, dbtopa
from cochlear.nidaqmx import (DAQmxDefaults, DAQmxChannel,
ContinuousDAQmxPlayer, DAQmxAttenControl,
ContinuousDAQmxSource)
DAC_FS = 100e3
ADC_FS = 100e3
class NoiseExposureData(AbstractData):
noise_channel = Instance('experiment.channel.Channel')
def _noise_channel_default(self):
return FileChannel(node=self.store_node, name='mic_input',
expected_duration=60*60*2, dtype=np.float32)
class NoiseExposureParadigm(AbstractParadigm):
kw = dict(context=True, log=True)
center_frequency = \
Expression(6e3, label='Center frequency (Hz)', dtype=np.float, **kw)
bandwidth = Expression(4e3, label='Bandwidth (Hz)', dtype=np.float, **kw)
rs = Expression(85, label='Min. atten. in stop band (dB)',
dtype=np.float, **kw)
rp = Expression(0.3, label='Max. ripple in pass band (dB)',
dtype=np.float, **kw)
order = Expression(7, label='Filter order', dtype=np.float, **kw)
level = Expression(100, label='Level (dB SPL)', dtype=np.float, **kw)
seed = Expression(1, label='Noise seed', dtype=np.int, **kw)
duration = Expression(60, label='Exposure duration (sec)',
dtype=np.float, **kw)
rise_time = Expression(0, label='Noise rise time (sec)',
dtype=np.float, **kw)
mic_sens = Float(2.7, label='Mic. sens. (mV/Pa)', dtype=np.float, **kw)
mic_sens_dbv = Property(depends_on='mic_sens', dtype=np.float,
label='Mic. sens. dB(V/Pa)', **kw)
speaker_sens = Float(86.89, label='Speaker sens. (mV/Pa)', dtype=np.float,
**kw)
speaker_sens_dbv = Property(depends_on='speaker_sens', dtype=np.float,
label='Speaker sens. dB(V/Pa)', **kw)
def _get_mic_sens_dbv(self):
return db(self.mic_sens*1e-3)
def _get_speaker_sens_dbv(self):
return db(self.speaker_sens*1e-3)
traits_view = View(
VGroup(
VGroup(
VGroup(
'center_frequency',
'bandwidth',
'rp',
'rs',
'order',
label='Filter settings',
show_border=True
),
'level',
'seed',
'duration',
'rise_time',
label='Stimulus',
show_border=True
),
HGroup(
VGroup('mic_sens', 'speaker_sens'),
VGroup('mic_sens_dbv', 'speaker_sens_dbv', style='readonly'),
label='Hardware settings',
show_border=True
),
)
)
class NoiseExposureController(AbstractController, DAQmxDefaults):
mic_cal = Instance('neurogen.calibration.InterpCalibration')
poll_rate = 1
def setup_experiment(self, info=None):
token = BandlimitedNoise(name='noise') >> Cos2Envelope(name='envelope')
channel = DAQmxChannel(calibration=InterpCalibration.as_attenuation(),
token=token, voltage_min=-10, voltage_max=10)
iface_dac = ContinuousDAQmxPlayer(fs=DAC_FS, done_callback=self.stop)
iface_dac.add_channel(channel, name='primary')
adc_pipeline = blocked(int(ADC_FS*self.poll_rate), -1, self)
iface_adc = ContinuousDAQmxSource(fs=ADC_FS, pipeline=adc_pipeline,
callback_samples=25e3,
input_line='/Dev1/ai1')
self.channel = channel
self.iface_adc = iface_adc
self.iface_dac = iface_dac
self.token = token
super(NoiseExposureController, self).setup_experiment(info)
def send(self, data):
self.model.update_plots(ADC_FS, data)
self.model.data.noise_channel.send(data)
def start_experiment(self, info=None):
self.refresh_context(evaluate=True)
self.iface_adc.start()
self.iface_dac.play_continuous()
self.log_trial()
def stop_experiment(self, info=None):
self.iface_adc.stop()
self.iface_dac.stop()
def set_duration(self, value):
self.iface_dac.set_value('primary.envelope.duration', value)
self.iface_dac.duration = value
self.model.overall_rms_plot.index_range.high_setting = value
def set_ramp_duration(self, value):
self.iface_dac.set_value('primary.envelope.rise_time', value)
self.iface_dac.duration = value
def set_center_frequency(self, value):
self.iface_dac.set_value('primary.noise.fc', value)
def set_bandwidth(self, value):
self.iface_dac.set_value('primary.noise.bandwidth', value)
def set_level(self, value):
self.iface_dac.set_value('primary.noise.level', value)
def set_seed(self, value):
self.iface_dac.set_value('primary.noise.seed', value)
def set_rise_time(self, value):
self.iface_dac.set_value('primary.envelope.rise_time', value)
def set_order(self, value):
self.iface_dac.set_value('primary.noise.order', value)
def set_rs(self, value):
self.iface_dac.set_value('primary.noise.rs', value)
def set_rp(self, value):
self.iface_dac.set_value('primary.noise.rp', value)
def set_speaker_sens_dbv(self, value):
self.channel.calibration = InterpCalibration([0, 100e3], [value, value])
def set_mic_sens(self, value):
level = self.get_current_value('level')
max_value = dbtopa(level)*value*1e-3
max_value_decade = 10**np.ceil(np.log10(max_value*2))*10
self.iface_adc.expected_range = max_value_decade
class NoiseExposureExperiment(AbstractExperiment):
paradigm = Instance(NoiseExposureParadigm, ())
data = Instance(AbstractData, ())
rms_data = Instance(ArrayPlotData)
recent_rms_plot = Instance(Component)
overall_rms_plot = Instance(Component)
fft_plot = Instance(Component)
current_time = Float(0)
current_update = Int(0)
current_spl = Float(np.nan, label='Current inst. output (dB SPL)')
current_spl_average = Float(np.nan, label='Average of last min. (dB SPL)')
overall_spl_average = Float(np.nan, label='Average output (dB SPL)')
_coefs = None
_zf = None
def update_plots(self, fs, data):
self.current_update += 1
data = signal.detrend(data.ravel())
if self._coefs is None:
self._coefs = signal.iirfilter(2, (400.0/(fs/2), 40e3/(fs/2)))
b, a = self._coefs
self._zf = signal.lfiltic(b, a, data[:len(a)-1], data[:len(b)-1])
b, a = self._coefs
data, self._zf = signal.lfilter(b, a, data, zi=self._zf)
rms = np.mean(data**2)**0.5
db_rms = db(rms)-self.paradigm.mic_sens_dbv-db(20e-6)
self.append_data(time=self.current_time, rms=db_rms)
self.current_time += len(data)/fs
self.current_spl = db_rms
self.current_spl_average = self.rms_data.get_data('rms')[-60:].mean()
self.overall_spl_average = self.rms_data.get_data('rms').mean()
w_frequency = psd_freq(data, fs)
w_psd = psd(data, fs, 'hamming')
w_psd_db = db(w_psd)-self.paradigm.mic_sens_dbv-db(20e-6)
self.rms_data.update_data(frequency=w_frequency, psd=w_psd_db)
def _rms_data_default(self):
return ArrayPlotData(time=[], rms=[], frequency=[], psd=[])
def append_data(self, **kwargs):
for k, v in kwargs.items():
kwargs[k] = np.append(self.rms_data.get_data(k), v)
self.rms_data.update_data(**kwargs)
def _overall_rms_plot_default(self):
plot = Plot(self.rms_data)
plot.index_range.low_setting = 0
plot.plot(('time', 'rms'))
return plot
def _recent_rms_plot_default(self):
plot = Plot(self.rms_data)
plot.index_range.high_setting = 'auto'
plot.index_range.low_setting = 'track'
plot.index_range.tracking_amount = 30
plot.value_range.high_setting = 'auto'
plot.value_range.low_setting = 'track'
plot.value_range.tracking_amount = 5
plot.plot(('time', 'rms'))
return plot
def _fft_plot_default(self):
plot = Plot(self.rms_data)
plot.index_range.low_setting = 1e3
plot.index_range.high_setting = 20e3
plot.value_range.low_setting = 10
plot.value_range.high_setting = 80
plot.plot(('frequency', 'psd'))
plot.index_scale = 'log'
return plot
traits_view = View(
HSplit(
VGroup(
VGroup(
Item('paradigm', style='custom', show_label=False,
width=200),
show_border=True,
label='Settings',
enabled_when="handler.state!='running'",
),
VGroup(
'current_spl',
'current_spl_average',
'overall_spl_average',
style='readonly',
show_border=True,
label='Output',
),
),
VGroup(
HGroup(
Item('overall_rms_plot',
editor=ComponentEditor(width=200, height=200)),
Item('recent_rms_plot',
editor=ComponentEditor(width=200, height=200)),
show_labels=False,
),
Item('fft_plot', show_label=False,
editor=ComponentEditor(width=200, height=200)),
),
show_labels=False,
),
resizable=True,
toolbar=ToolBar(
Action(name='Start', action='start',
image=ImageResource('1rightarrow', icon_dir),
enabled_when='handler.state=="uninitialized"'),
Action(name='Stop', action='stop',
image=ImageResource('stop', icon_dir),
enabled_when='handler.state=="running"'),
),
width=0.5,
height=0.5,
id='lbhb.NoiseExposureExperiment',
)
def configure_logging(filename):
time_format = '[%(asctime)s] :: %(name)s - %(levelname)s - %(message)s'
simple_format = '%(name)s - %(message)s'
logging_config = {
'version': 1,
'formatters': {
'time': {'format': time_format},
'simple': {'format': simple_format},
},
'handlers': {
'console': {
'class': 'logging.StreamHandler',
'formatter': 'simple',
'level': 'DEBUG',
},
'file': {
'class': 'logging.FileHandler',
'formatter': 'time',
'filename': filename,
'level': 'DEBUG',
}
},
'loggers': {
'__main__': {'level': 'ERROR'},
'cochlear': {'level': 'ERROR'},
'cochlear.nidaqmx': {'level': 'ERROR'},
'neurogen.block_definitions': {'level': 'DEBUG'},
},
'root': {
'handlers': ['console', 'file'],
},
}
logging.config.dictConfig(logging_config)
if __name__ == '__main__':
import logging.config
import PyDAQmx as pyni
import warnings
import tables
pyni.DAQmxResetDevice('Dev1')
configure_logging('temp.log')
log.debug('====================== MAIN =======================')
with warnings.catch_warnings():
warnings.simplefilter('ignore')
with tables.open_file('temp.hdf5', 'w') as fh:
data = NoiseExposureData(store_node=fh.root)
controller = NoiseExposureController()
NoiseExposureExperiment(data=data) \
.configure_traits(handler=controller)
| true | true |
f7272d6bde17f58aecbdc1140fbcccd1817e75c6 | 3,313 | py | Python | contrib/cmap.py | visinf/deblur-devil | 53cc4c72a4ddb9dcede5ee52dc53000c39ff5dab | [
"Apache-2.0"
] | 18 | 2019-11-02T05:45:48.000Z | 2021-09-12T10:03:08.000Z | contrib/cmap.py | visinf/deblur-devil | 53cc4c72a4ddb9dcede5ee52dc53000c39ff5dab | [
"Apache-2.0"
] | 3 | 2019-12-10T07:52:24.000Z | 2021-04-07T19:14:31.000Z | contrib/cmap.py | visinf/deblur-devil | 53cc4c72a4ddb9dcede5ee52dc53000c39ff5dab | [
"Apache-2.0"
] | 3 | 2020-05-26T08:02:05.000Z | 2020-09-26T21:25:10.000Z | # Author: Jochen Gast <jochen.gast@visinf.tu-darmstadt.de>
import numpy as np
import torch
from matplotlib import cm
from torch import nn
# ----------------------------------------------------------------------------------------
# See https://matplotlib.org/examples/color/colormaps_reference.html
#
# Typical choices are: 'gray', jet', 'viridis', 'hot'
# ----------------------------------------------------------------------------------------
COLORMAPS = [
# Perceptually Uniform Sequential
'viridis', 'plasma', 'inferno', 'magma',
# Sequential
'Greys', 'Purples', 'Blues', 'Greens', 'Oranges', 'Reds',
'YlOrBr', 'YlOrRd', 'OrRd', 'PuRd', 'RdPu', 'BuPu',
'GnBu', 'PuBu', 'YlGnBu', 'PuBuGn', 'BuGn', 'YlGn',
# Sequential (2)
'binary', 'gist_yarg', 'gist_gray', 'gray', 'bone', 'pink',
'spring', 'summer', 'autumn', 'winter', 'cool', 'Wistia',
'hot', 'afmhot', 'gist_heat', 'copper',
# Diverging
'PiYG', 'PRGn', 'BrBG', 'PuOr', 'RdGy', 'RdBu',
'RdYlBu', 'RdYlGn', 'Spectral', 'coolwarm', 'bwr', 'seismic',
# Qualitative,
'Pastel1', 'Pastel2', 'Paired', 'Accent',
'Dark2', 'Set1', 'Set2', 'Set3',
'tab10', 'tab20', 'tab20b', 'tab20c',
# Miscellaneous
'flag', 'prism', 'ocean', 'gist_earth', 'terrain', 'gist_stern',
'gnuplot', 'gnuplot2', 'CMRmap', 'cubehelix', 'brg', 'hsv',
'gist_rainbow', 'rainbow', 'jet', 'nipy_spectral', 'gist_ncar'
]
class ColorMap(nn.Module):
#
# Note: uint8 inputs are never normalized.
# float inputs are normalized if normalize_floats=True
#
def __init__(self, cmap='jet', normalize_floats=True, output_dtype=torch.uint8):
super().__init__()
if cmap not in COLORMAPS:
raise ValueError('Unknown colormap!')
self.normalize_floats = normalize_floats
self.cmap = torch.from_numpy(self.get_cmap_as_float_array(cmap)).view(-1, 3)
if output_dtype == torch.uint8:
self.cmap = (255 * self.cmap).byte()
@staticmethod
def get_cmap_as_float_array(cmap_name):
raw_cmap = cm.get_cmap(cmap_name, 256)
cmap_array = raw_cmap(np.arange(256))[:, 0:3] # remove alpha channels
return cmap_array
@staticmethod
def min2d(tensor):
b, c, h, w = tensor.size()
return tensor.view(b, c, h * w).min(dim=2, keepdim=True)[0].unsqueeze(dim=3)
@staticmethod
def max2d(tensor):
b, c, h, w = tensor.size()
return tensor.view(b, c, h * w).max(dim=2, keepdim=True)[0].unsqueeze(dim=3)
def forward(self, value):
b, c, h, w = value.size()
assert c == 1, 'ColorMap expects second dimension of size 1L'
if not isinstance(value, torch.ByteTensor):
if self.normalize_floats:
cmin = self.min2d(value)
cmax = self.max2d(value)
normalized = (value - cmin) / torch.max(cmax - cmin, torch.ones_like(value) * 1e-5)
normalized = (normalized * 255).long()
else:
normalized = (value * 255).long()
else:
normalized = value.long()
self.cmap = self.cmap.to(value.device)
z = torch.index_select(self.cmap, dim=0, index=normalized.view(-1))
return z.transpose(0, 1).contiguous().view(b, 3, h, w)
| 36.01087 | 99 | 0.563236 |
import numpy as np
import torch
from matplotlib import cm
from torch import nn
# ----------------------------------------------------------------------------------------
COLORMAPS = [
# Perceptually Uniform Sequential
'viridis', 'plasma', 'inferno', 'magma',
# Sequential
'Greys', 'Purples', 'Blues', 'Greens', 'Oranges', 'Reds',
'YlOrBr', 'YlOrRd', 'OrRd', 'PuRd', 'RdPu', 'BuPu',
'GnBu', 'PuBu', 'YlGnBu', 'PuBuGn', 'BuGn', 'YlGn',
# Sequential (2)
'binary', 'gist_yarg', 'gist_gray', 'gray', 'bone', 'pink',
'spring', 'summer', 'autumn', 'winter', 'cool', 'Wistia',
'hot', 'afmhot', 'gist_heat', 'copper',
# Diverging
'PiYG', 'PRGn', 'BrBG', 'PuOr', 'RdGy', 'RdBu',
'RdYlBu', 'RdYlGn', 'Spectral', 'coolwarm', 'bwr', 'seismic',
# Qualitative,
'Pastel1', 'Pastel2', 'Paired', 'Accent',
'Dark2', 'Set1', 'Set2', 'Set3',
'tab10', 'tab20', 'tab20b', 'tab20c',
# Miscellaneous
'flag', 'prism', 'ocean', 'gist_earth', 'terrain', 'gist_stern',
'gnuplot', 'gnuplot2', 'CMRmap', 'cubehelix', 'brg', 'hsv',
'gist_rainbow', 'rainbow', 'jet', 'nipy_spectral', 'gist_ncar'
]
class ColorMap(nn.Module):
#
# Note: uint8 inputs are never normalized.
# float inputs are normalized if normalize_floats=True
#
def __init__(self, cmap='jet', normalize_floats=True, output_dtype=torch.uint8):
super().__init__()
if cmap not in COLORMAPS:
raise ValueError('Unknown colormap!')
self.normalize_floats = normalize_floats
self.cmap = torch.from_numpy(self.get_cmap_as_float_array(cmap)).view(-1, 3)
if output_dtype == torch.uint8:
self.cmap = (255 * self.cmap).byte()
@staticmethod
def get_cmap_as_float_array(cmap_name):
raw_cmap = cm.get_cmap(cmap_name, 256)
cmap_array = raw_cmap(np.arange(256))[:, 0:3] # remove alpha channels
return cmap_array
@staticmethod
def min2d(tensor):
b, c, h, w = tensor.size()
return tensor.view(b, c, h * w).min(dim=2, keepdim=True)[0].unsqueeze(dim=3)
@staticmethod
def max2d(tensor):
b, c, h, w = tensor.size()
return tensor.view(b, c, h * w).max(dim=2, keepdim=True)[0].unsqueeze(dim=3)
def forward(self, value):
b, c, h, w = value.size()
assert c == 1, 'ColorMap expects second dimension of size 1L'
if not isinstance(value, torch.ByteTensor):
if self.normalize_floats:
cmin = self.min2d(value)
cmax = self.max2d(value)
normalized = (value - cmin) / torch.max(cmax - cmin, torch.ones_like(value) * 1e-5)
normalized = (normalized * 255).long()
else:
normalized = (value * 255).long()
else:
normalized = value.long()
self.cmap = self.cmap.to(value.device)
z = torch.index_select(self.cmap, dim=0, index=normalized.view(-1))
return z.transpose(0, 1).contiguous().view(b, 3, h, w)
| true | true |
f7272f2c05e0fbb0337367a91ca3012dfcefc44e | 7,426 | py | Python | release.py | euri10/opentelemetry-operations-python | d751953dc30d6d0b27dbf605e9b505c283d00cb2 | [
"Apache-2.0"
] | null | null | null | release.py | euri10/opentelemetry-operations-python | d751953dc30d6d0b27dbf605e9b505c283d00cb2 | [
"Apache-2.0"
] | null | null | null | release.py | euri10/opentelemetry-operations-python | d751953dc30d6d0b27dbf605e9b505c283d00cb2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import argparse
import re
import subprocess
import sys
from datetime import datetime
from pathlib import Path
from typing import Dict, Iterable, Sequence, Union
RELEASE_COMMIT_FMT = """Release {release_version} (Part 1/2) release commit
- Update version.py files
- Marked releases in changelogs
- Pinned `opentelemetry-{{api,sdk}}` versions in dev-constraints
- Pinned `opentelemetry-{{api,sdk}}` versions in each package's `setup.cfg` file
"""
NEW_DEV_COMMIT_FMT = """Release {release_version} (Part 2/2) bump version to {new_dev_version}
- Update version.py files
- Unpin `opentelemetry-{{api,sdk}}` versions in each package's `setup.cfg` file
"""
ARGS_DESCRIPTION = """
Create release branch with bumped changelogs and updated versions.
Creates two commits in a new release branch (create new branch first). The first
commit (a) updates the changelogs for the new release_version, and updates
version.py files to the new release_version. This will be the tagged release
commit. The second commit (b) updates the version.py file to the
new_dev_version.
Create a PR and merge it with github's "Rebase and merge" option, so that the
two commits appear in the master history. Then, you can create a tag and release
for the first commit. Do NOT merge with "Squash and merge", or commit (a) will
be overwritten by (b).
"""
def get_current_version() -> str:
package_info: Dict[str, str] = {}
with open(
Path("opentelemetry-exporter-google-cloud")
/ "src"
/ "opentelemetry"
/ "exporter"
/ "google"
/ "version.py"
) as version_file:
exec(version_file.read(), package_info)
return package_info["__version__"]
def find_and_replace(
pattern_str: str,
replacement: str,
file_paths: Iterable[Path],
flags: int = 0,
) -> bool:
pattern = re.compile(pattern_str, flags=flags)
any_matches = False
for file_path in file_paths:
with open(file_path, "r+") as file:
text = file.read()
replaced_text, num_subs = pattern.subn(replacement, text)
if num_subs > 0:
file.seek(0)
file.truncate()
file.write(replaced_text)
any_matches = True
return any_matches
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description=ARGS_DESCRIPTION)
required_named_args = parser.add_argument_group("required named arguments")
required_named_args.add_argument(
"--release_version",
help="The version number to release. Must exactly match OT API/SDK version to pin against",
required=True,
)
required_named_args.add_argument(
"--new_dev_version",
help="The new developement version string to update master",
required=True,
)
required_named_args.add_argument(
"--ot_version",
help="The version specifer for opentelemetry packages. E.g. '~=0.11.b0'",
required=True,
)
return parser.parse_args()
def run(
args: Union[str, Sequence[str]], **kwargs
) -> subprocess.CompletedProcess:
return subprocess.run(args, check=True, **kwargs)
def git_commit_with_message(message: str) -> None:
run(["git", "commit", "-a", "-m", message])
def create_release_commit(
git_files: Iterable[Path],
current_version: str,
release_version: str,
ot_version: str,
repo_root: Path,
) -> None:
# Update version.py files
find_and_replace(
re.escape(current_version),
release_version,
(path for path in git_files if path.name == "version.py"),
)
# Mark release in changelogs
today = datetime.now().strftime("%Y-%m-%d")
find_and_replace(
r"\#\#\ Unreleased",
rf"## Unreleased\n\n## Version {release_version}\n\nReleased {today}",
(path for path in git_files if path.name == "CHANGELOG.md"),
)
# Pin the OT version in dev-constraints.txt
find_regex = (
r"^"
+ re.escape(
"-e git+https://github.com/open-telemetry/opentelemetry-python.git@"
)
+ r".+#egg=(.+)&subdirectory=.+$"
)
matched = find_and_replace(
find_regex,
rf"\1{ot_version}",
[repo_root / "dev-constraints.txt"],
flags=re.MULTILINE,
)
if not matched:
find_and_replace(
r"^(opentelemetry-(?:api-sdk)).*",
rf"\1{ot_version}",
[repo_root / "dev-constraints.txt"],
flags=re.MULTILINE,
)
# Pin the OT version in each package's setup.cfg file
find_and_replace(
r"(opentelemetry-(?:api|sdk))",
rf"\1{ot_version}",
(path for path in git_files if path.name == "setup.cfg"),
)
git_commit_with_message(
RELEASE_COMMIT_FMT.format(release_version=release_version)
)
def create_new_dev_commit(
git_files: Iterable[Path], release_version: str, new_dev_version: str,
) -> None:
# Update version.py files
find_and_replace(
re.escape(release_version),
new_dev_version,
(path for path in git_files if path.name == "version.py"),
)
# Unpin the OT version in each package's setup.cfg file, so it comes from
# dev-constraints.txt
find_and_replace(
r"(opentelemetry-(?:api|sdk)).+$",
r"\1",
(path for path in git_files if path.name == "setup.cfg"),
flags=re.MULTILINE,
)
git_commit_with_message(
NEW_DEV_COMMIT_FMT.format(
release_version=release_version, new_dev_version=new_dev_version
)
)
def main() -> None:
args = parse_args()
current_version = get_current_version()
release_version: str = args.release_version
new_dev_version: str = args.new_dev_version
ot_version: str = args.ot_version
git_status_output = (
run(["git", "status", "-s"], capture_output=True)
.stdout.decode()
.strip()
)
if git_status_output != "":
print(
"Git working directory is not clean, commit or stash all changes. Exiting.",
file=sys.stderr,
)
sys.exit(1)
print(
"Current version: {}\nReleasing new version {}\nBumping dev version to {}".format(
current_version, release_version, new_dev_version
)
)
repo_root = Path(
run(["git", "rev-parse", "--show-toplevel"], capture_output=True)
.stdout.decode()
.strip()
).absolute()
# create new release branch
run(["git", "clean", "-fdx", "-e", "venv/", "-e", ".tox/"])
run(
[
"git",
"checkout",
"-b",
"release-pr/{}".format(release_version),
"origin/master",
],
cwd=repo_root,
)
git_files = [
repo_root / path
for path in run(
["git", "ls-files"], cwd=repo_root, capture_output=True
)
.stdout.decode()
.strip()
.split()
if __file__ not in path
]
create_release_commit(
git_files=git_files,
current_version=current_version,
release_version=release_version,
ot_version=ot_version,
repo_root=repo_root,
)
create_new_dev_commit(
git_files=git_files,
release_version=release_version,
new_dev_version=new_dev_version,
)
if __name__ == "__main__":
main()
| 28.452107 | 99 | 0.62564 |
import argparse
import re
import subprocess
import sys
from datetime import datetime
from pathlib import Path
from typing import Dict, Iterable, Sequence, Union
RELEASE_COMMIT_FMT = """Release {release_version} (Part 1/2) release commit
- Update version.py files
- Marked releases in changelogs
- Pinned `opentelemetry-{{api,sdk}}` versions in dev-constraints
- Pinned `opentelemetry-{{api,sdk}}` versions in each package's `setup.cfg` file
"""
NEW_DEV_COMMIT_FMT = """Release {release_version} (Part 2/2) bump version to {new_dev_version}
- Update version.py files
- Unpin `opentelemetry-{{api,sdk}}` versions in each package's `setup.cfg` file
"""
ARGS_DESCRIPTION = """
Create release branch with bumped changelogs and updated versions.
Creates two commits in a new release branch (create new branch first). The first
commit (a) updates the changelogs for the new release_version, and updates
version.py files to the new release_version. This will be the tagged release
commit. The second commit (b) updates the version.py file to the
new_dev_version.
Create a PR and merge it with github's "Rebase and merge" option, so that the
two commits appear in the master history. Then, you can create a tag and release
for the first commit. Do NOT merge with "Squash and merge", or commit (a) will
be overwritten by (b).
"""
def get_current_version() -> str:
package_info: Dict[str, str] = {}
with open(
Path("opentelemetry-exporter-google-cloud")
/ "src"
/ "opentelemetry"
/ "exporter"
/ "google"
/ "version.py"
) as version_file:
exec(version_file.read(), package_info)
return package_info["__version__"]
def find_and_replace(
pattern_str: str,
replacement: str,
file_paths: Iterable[Path],
flags: int = 0,
) -> bool:
pattern = re.compile(pattern_str, flags=flags)
any_matches = False
for file_path in file_paths:
with open(file_path, "r+") as file:
text = file.read()
replaced_text, num_subs = pattern.subn(replacement, text)
if num_subs > 0:
file.seek(0)
file.truncate()
file.write(replaced_text)
any_matches = True
return any_matches
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description=ARGS_DESCRIPTION)
required_named_args = parser.add_argument_group("required named arguments")
required_named_args.add_argument(
"--release_version",
help="The version number to release. Must exactly match OT API/SDK version to pin against",
required=True,
)
required_named_args.add_argument(
"--new_dev_version",
help="The new developement version string to update master",
required=True,
)
required_named_args.add_argument(
"--ot_version",
help="The version specifer for opentelemetry packages. E.g. '~=0.11.b0'",
required=True,
)
return parser.parse_args()
def run(
args: Union[str, Sequence[str]], **kwargs
) -> subprocess.CompletedProcess:
return subprocess.run(args, check=True, **kwargs)
def git_commit_with_message(message: str) -> None:
run(["git", "commit", "-a", "-m", message])
def create_release_commit(
git_files: Iterable[Path],
current_version: str,
release_version: str,
ot_version: str,
repo_root: Path,
) -> None:
# Update version.py files
find_and_replace(
re.escape(current_version),
release_version,
(path for path in git_files if path.name == "version.py"),
)
# Mark release in changelogs
today = datetime.now().strftime("%Y-%m-%d")
find_and_replace(
r"\#\#\ Unreleased",
rf"## Unreleased\n\n## Version {release_version}\n\nReleased {today}",
(path for path in git_files if path.name == "CHANGELOG.md"),
)
# Pin the OT version in dev-constraints.txt
find_regex = (
r"^"
+ re.escape(
"-e git+https://github.com/open-telemetry/opentelemetry-python.git@"
)
+ r".+#egg=(.+)&subdirectory=.+$"
)
matched = find_and_replace(
find_regex,
rf"\1{ot_version}",
[repo_root / "dev-constraints.txt"],
flags=re.MULTILINE,
)
if not matched:
find_and_replace(
r"^(opentelemetry-(?:api-sdk)).*",
rf"\1{ot_version}",
[repo_root / "dev-constraints.txt"],
flags=re.MULTILINE,
)
# Pin the OT version in each package's setup.cfg file
find_and_replace(
r"(opentelemetry-(?:api|sdk))",
rf"\1{ot_version}",
(path for path in git_files if path.name == "setup.cfg"),
)
git_commit_with_message(
RELEASE_COMMIT_FMT.format(release_version=release_version)
)
def create_new_dev_commit(
git_files: Iterable[Path], release_version: str, new_dev_version: str,
) -> None:
find_and_replace(
re.escape(release_version),
new_dev_version,
(path for path in git_files if path.name == "version.py"),
)
# dev-constraints.txt
find_and_replace(
r"(opentelemetry-(?:api|sdk)).+$",
r"\1",
(path for path in git_files if path.name == "setup.cfg"),
flags=re.MULTILINE,
)
git_commit_with_message(
NEW_DEV_COMMIT_FMT.format(
release_version=release_version, new_dev_version=new_dev_version
)
)
def main() -> None:
args = parse_args()
current_version = get_current_version()
release_version: str = args.release_version
new_dev_version: str = args.new_dev_version
ot_version: str = args.ot_version
git_status_output = (
run(["git", "status", "-s"], capture_output=True)
.stdout.decode()
.strip()
)
if git_status_output != "":
print(
"Git working directory is not clean, commit or stash all changes. Exiting.",
file=sys.stderr,
)
sys.exit(1)
print(
"Current version: {}\nReleasing new version {}\nBumping dev version to {}".format(
current_version, release_version, new_dev_version
)
)
repo_root = Path(
run(["git", "rev-parse", "--show-toplevel"], capture_output=True)
.stdout.decode()
.strip()
).absolute()
# create new release branch
run(["git", "clean", "-fdx", "-e", "venv/", "-e", ".tox/"])
run(
[
"git",
"checkout",
"-b",
"release-pr/{}".format(release_version),
"origin/master",
],
cwd=repo_root,
)
git_files = [
repo_root / path
for path in run(
["git", "ls-files"], cwd=repo_root, capture_output=True
)
.stdout.decode()
.strip()
.split()
if __file__ not in path
]
create_release_commit(
git_files=git_files,
current_version=current_version,
release_version=release_version,
ot_version=ot_version,
repo_root=repo_root,
)
create_new_dev_commit(
git_files=git_files,
release_version=release_version,
new_dev_version=new_dev_version,
)
if __name__ == "__main__":
main()
| true | true |
f7272fca640e6f007ec6f1e2a9189cc37e27b8ba | 5,026 | py | Python | pgAdmin/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_get.py | WeilerWebServices/PostgreSQL | ae594ed077bebbad1be3c1d95c38b7c2c2683e8c | [
"PostgreSQL"
] | null | null | null | pgAdmin/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_get.py | WeilerWebServices/PostgreSQL | ae594ed077bebbad1be3c1d95c38b7c2c2683e8c | [
"PostgreSQL"
] | null | null | null | pgAdmin/pgadmin4/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_get.py | WeilerWebServices/PostgreSQL | ae594ed077bebbad1be3c1d95c38b7c2c2683e8c | [
"PostgreSQL"
] | null | null | null | ##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2020, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
import uuid
from unittest.mock import patch
from pgadmin.browser.server_groups.servers.databases.schemas.tables.columns. \
tests import utils as columns_utils
from pgadmin.browser.server_groups.servers.databases.schemas.tables.tests \
import utils as tables_utils
from pgadmin.browser.server_groups.servers.databases.schemas.tests import \
utils as schema_utils
from pgadmin.browser.server_groups.servers.databases.tests import utils as \
database_utils
from pgadmin.utils.route import BaseTestGenerator
from regression import parent_node_dict
from regression.python_test_utils import test_utils as utils
from . import utils as indexes_utils
class IndexesGetTestCase(BaseTestGenerator):
"""This class will get information about existing index/indexes"""
url = "/browser/index/obj/"
# Get list of test cases
scenarios = utils.generate_scenarios("index_get",
indexes_utils.test_cases)
def setUp(self):
"""Creating index/indexes """
self.db_name = parent_node_dict["database"][-1]["db_name"]
schema_info = parent_node_dict["schema"][-1]
self.server_id = schema_info["server_id"]
self.db_id = schema_info["db_id"]
db_con = database_utils.connect_database(self, utils.SERVER_GROUP,
self.server_id, self.db_id)
if not db_con['data']["connected"]:
raise Exception("Could not connect to database to add a table.")
self.schema_id = schema_info["schema_id"]
self.schema_name = schema_info["schema_name"]
schema_response = schema_utils.verify_schemas(self.server,
self.db_name,
self.schema_name)
if not schema_response:
raise Exception("Could not find the schema to add a table.")
self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:8])
self.table_id = tables_utils.create_table(self.server, self.db_name,
self.schema_name,
self.table_name)
self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:8])
self.column_id = columns_utils.create_column(self.server,
self.db_name,
self.schema_name,
self.table_name,
self.column_name)
self.index_name = "test_index_delete_%s" % (str(uuid.uuid4())[1:8])
self.index_id = indexes_utils.create_index(self.server, self.db_name,
self.schema_name,
self.table_name,
self.index_name,
self.column_name)
if self.is_list:
self.index_name_1 = "test_index_delete_%s" % \
(str(uuid.uuid4())[1:8])
self.index_ids = [self.index_id, indexes_utils.create_index(
self.server, self.db_name, self.schema_name, self.table_name,
self.index_name_1, self.column_name)]
def runTest(self):
""" Function will do get api call using index id or
empty index id for list of indexes"""
if self.is_positive_test:
if self.is_list:
response = indexes_utils.api_get_index(self, "")
else:
response = indexes_utils.api_get_index(self, self.index_id)
indexes_utils.assert_status_code(self, response)
else:
if self.mocking_required:
with patch(self.mock_data["function_name"],
side_effect=[eval(self.mock_data["return_value"])]):
if self.is_list:
response = indexes_utils.api_get_index(self, "")
else:
response = indexes_utils.api_get_index(self,
self.index_id)
else:
# Non-existing index id
self.index_id = 2341
response = indexes_utils.api_get_index(self, self.index_id)
indexes_utils.assert_status_code(self, response)
indexes_utils.assert_error_message(self, response)
def tearDown(self):
# Disconnect the database
database_utils.disconnect_database(self, self.server_id, self.db_id)
| 47.415094 | 79 | 0.547951 | true | true | |
f72730970d6aae9560fb47022aa4c2e36ccd3f51 | 2,001 | py | Python | api/serializers.py | Vadim3x4/yamdb_final | d6ccca74a41c5d0a78977d71b446daf2420fa8bf | [
"MIT"
] | null | null | null | api/serializers.py | Vadim3x4/yamdb_final | d6ccca74a41c5d0a78977d71b446daf2420fa8bf | [
"MIT"
] | null | null | null | api/serializers.py | Vadim3x4/yamdb_final | d6ccca74a41c5d0a78977d71b446daf2420fa8bf | [
"MIT"
] | null | null | null | from django.shortcuts import get_object_or_404
from rest_framework import serializers
from .models import Category, Comment, Genre, Review, Title
class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = Category
fields = (
"name",
"slug",
)
class GenreSerializer(serializers.ModelSerializer):
class Meta:
model = Genre
fields = (
"name",
"slug",
)
class TitleReadSerializer(serializers.ModelSerializer):
genre = GenreSerializer(many=True, read_only=True)
category = CategorySerializer(read_only=True)
class Meta:
model = Title
fields = "__all__"
class TitleCreateSerializer(serializers.ModelSerializer):
genre = serializers.SlugRelatedField(
slug_field="slug", many=True, queryset=Genre.objects.all()
)
category = serializers.SlugRelatedField(
slug_field="slug", queryset=Category.objects.all()
)
class Meta:
model = Title
fields = "__all__"
class ReviewSerializer(serializers.ModelSerializer):
author = serializers.SlugRelatedField(
slug_field="username", read_only=True
)
class Meta:
model = Review
exclude = ("title",)
def validate(self, attrs):
if (
Review.objects.filter(
author=self.context["request"].user, title=self.get_title()
).exists()
and self.context["request"].method != "PATCH"
):
raise serializers.ValidationError("Вы уже оставили отзыв")
return attrs
def get_title(self):
title = get_object_or_404(
Title, id=self.context.get("view").kwargs.get("title_id")
)
return title
class CommentSerializer(serializers.ModelSerializer):
author = serializers.SlugRelatedField(
slug_field="username", read_only=True
)
class Meta:
model = Comment
exclude = ("review",)
| 23.821429 | 75 | 0.625187 | from django.shortcuts import get_object_or_404
from rest_framework import serializers
from .models import Category, Comment, Genre, Review, Title
class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = Category
fields = (
"name",
"slug",
)
class GenreSerializer(serializers.ModelSerializer):
class Meta:
model = Genre
fields = (
"name",
"slug",
)
class TitleReadSerializer(serializers.ModelSerializer):
genre = GenreSerializer(many=True, read_only=True)
category = CategorySerializer(read_only=True)
class Meta:
model = Title
fields = "__all__"
class TitleCreateSerializer(serializers.ModelSerializer):
genre = serializers.SlugRelatedField(
slug_field="slug", many=True, queryset=Genre.objects.all()
)
category = serializers.SlugRelatedField(
slug_field="slug", queryset=Category.objects.all()
)
class Meta:
model = Title
fields = "__all__"
class ReviewSerializer(serializers.ModelSerializer):
author = serializers.SlugRelatedField(
slug_field="username", read_only=True
)
class Meta:
model = Review
exclude = ("title",)
def validate(self, attrs):
if (
Review.objects.filter(
author=self.context["request"].user, title=self.get_title()
).exists()
and self.context["request"].method != "PATCH"
):
raise serializers.ValidationError("Вы уже оставили отзыв")
return attrs
def get_title(self):
title = get_object_or_404(
Title, id=self.context.get("view").kwargs.get("title_id")
)
return title
class CommentSerializer(serializers.ModelSerializer):
author = serializers.SlugRelatedField(
slug_field="username", read_only=True
)
class Meta:
model = Comment
exclude = ("review",)
| true | true |
f72730c032f7ff966ee6845ddca77d3b6280e9b8 | 10,719 | py | Python | optimization/main/federated_trainer.py | alshedivat/federated | 100f0e0940282818c42c39156407ae419f26de50 | [
"Apache-2.0"
] | 2 | 2021-10-19T13:55:11.000Z | 2021-11-11T11:26:05.000Z | federated/optimization/main/federated_trainer.py | luke-who/TFF | fe9f44a504bc51b603a3ab9a181148da0aa9612f | [
"MIT"
] | null | null | null | federated/optimization/main/federated_trainer.py | luke-who/TFF | fe9f44a504bc51b603a3ab9a181148da0aa9612f | [
"MIT"
] | 1 | 2021-03-09T09:48:56.000Z | 2021-03-09T09:48:56.000Z | # Copyright 2020, Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# 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.
"""Runs federated training on various tasks using a generalized form of FedAvg.
Specifically, we create (according to flags) an iterative processes that allows
for client and server learning rate schedules, as well as various client and
server optimization methods. For more details on the learning rate scheduling
and optimization methods, see `shared/optimizer_utils.py`. For details on the
iterative process, see `shared/fed_avg_schedule.py`.
"""
import collections
import os.path
from typing import Callable
from absl import app
from absl import flags
import tensorflow as tf
import tensorflow_federated as tff
from optimization.cifar100 import federated_cifar100
from optimization.emnist import federated_emnist
from optimization.emnist_ae import federated_emnist_ae
from optimization.shakespeare import federated_shakespeare
from optimization.shared import fed_avg_schedule
from optimization.shared import optimizer_utils
from optimization.shared import training_specs
from optimization.stackoverflow import federated_stackoverflow
from optimization.stackoverflow_lr import federated_stackoverflow_lr
from utils import training_loop
from utils import utils_impl
_SUPPORTED_TASKS = [
'cifar100', 'emnist_cr', 'emnist_ae', 'shakespeare', 'stackoverflow_nwp',
'stackoverflow_lr'
]
with utils_impl.record_hparam_flags() as optimizer_flags:
# Defining optimizer flags
optimizer_utils.define_optimizer_flags('client')
optimizer_utils.define_optimizer_flags('server')
optimizer_utils.define_lr_schedule_flags('client')
optimizer_utils.define_lr_schedule_flags('server')
with utils_impl.record_hparam_flags() as shared_flags:
# Federated training hyperparameters
flags.DEFINE_integer('client_epochs_per_round', 1,
'Number of epochs in the client to take per round.')
flags.DEFINE_integer('client_batch_size', 20, 'Batch size on the clients.')
flags.DEFINE_integer('clients_per_round', 10,
'How many clients to sample per round.')
flags.DEFINE_integer('client_datasets_random_seed', 1,
'Random seed for client sampling.')
# Training loop configuration
flags.DEFINE_string(
'experiment_name', None, 'The name of this experiment. Will be append to '
'--root_output_dir to separate experiment results.')
flags.mark_flag_as_required('experiment_name')
flags.DEFINE_string('root_output_dir', '/tmp/fed_opt/',
'Root directory for writing experiment output.')
flags.DEFINE_integer('total_rounds', 200, 'Number of total training rounds.')
flags.DEFINE_integer(
'rounds_per_eval', 1,
'How often to evaluate the global model on the validation dataset.')
flags.DEFINE_integer('rounds_per_checkpoint', 50,
'How often to checkpoint the global model.')
with utils_impl.record_hparam_flags() as task_flags:
# Task specification
flags.DEFINE_enum('task', None, _SUPPORTED_TASKS,
'Which task to perform federated training on.')
with utils_impl.record_hparam_flags() as cifar100_flags:
# CIFAR-100 flags
flags.DEFINE_integer('cifar100_crop_size', 24, 'The height and width of '
'images after preprocessing.')
flags.DEFINE_bool(
'cifar100_distort_train_images', True, 'If set to True, '
'train images will be randomly cropped. Otherwise, all '
'images will simply be resized.')
with utils_impl.record_hparam_flags() as emnist_cr_flags:
# EMNIST CR flags
flags.DEFINE_enum(
'emnist_cr_model', 'cnn', ['cnn', '2nn'], 'Which model to '
'use. This can be a convolutional model (cnn) or a two '
'hidden-layer densely connected network (2nn).')
with utils_impl.record_hparam_flags() as shakespeare_flags:
# Shakespeare flags
flags.DEFINE_integer(
'shakespeare_sequence_length', 80,
'Length of character sequences to use for the RNN model.')
with utils_impl.record_hparam_flags() as so_nwp_flags:
# Stack Overflow NWP flags
flags.DEFINE_integer('so_nwp_vocab_size', 10000, 'Size of vocab to use.')
flags.DEFINE_integer('so_nwp_num_oov_buckets', 1,
'Number of out of vocabulary buckets.')
flags.DEFINE_integer('so_nwp_sequence_length', 20,
'Max sequence length to use.')
flags.DEFINE_integer('so_nwp_max_elements_per_user', 1000, 'Max number of '
'training sentences to use per user.')
flags.DEFINE_integer(
'so_nwp_num_validation_examples', 10000, 'Number of examples '
'to use from test set for per-round validation.')
with utils_impl.record_hparam_flags() as so_lr_flags:
# Stack Overflow LR flags
flags.DEFINE_integer('so_lr_vocab_tokens_size', 10000,
'Vocab tokens size used.')
flags.DEFINE_integer('so_lr_vocab_tags_size', 500, 'Vocab tags size used.')
flags.DEFINE_integer(
'so_lr_num_validation_examples', 10000, 'Number of examples '
'to use from test set for per-round validation.')
flags.DEFINE_integer('so_lr_max_elements_per_user', 1000,
'Max number of training '
'sentences to use per user.')
FLAGS = flags.FLAGS
TASK_FLAGS = collections.OrderedDict(
cifar100=cifar100_flags,
emnist_cr=emnist_cr_flags,
shakespeare=shakespeare_flags,
stackoverflow_nwp=so_nwp_flags,
stackoverflow_lr=so_lr_flags)
def _write_hparam_flags():
"""Creates an ordered dictionary of hyperparameter flags and writes to CSV."""
hparam_dict = utils_impl.lookup_flag_values(shared_flags)
# Update with optimizer flags corresponding to the chosen optimizers.
opt_flag_dict = utils_impl.lookup_flag_values(optimizer_flags)
opt_flag_dict = optimizer_utils.remove_unused_flags('client', opt_flag_dict)
opt_flag_dict = optimizer_utils.remove_unused_flags('server', opt_flag_dict)
hparam_dict.update(opt_flag_dict)
# Update with task-specific flags.
task_name = FLAGS.task
if task_name in TASK_FLAGS:
task_hparam_dict = utils_impl.lookup_flag_values(TASK_FLAGS[task_name])
hparam_dict.update(task_hparam_dict)
results_dir = os.path.join(FLAGS.root_output_dir, 'results',
FLAGS.experiment_name)
utils_impl.create_directory_if_not_exists(results_dir)
hparam_file = os.path.join(results_dir, 'hparams.csv')
utils_impl.atomic_write_series_to_csv(hparam_dict, hparam_file)
def main(argv):
if len(argv) > 1:
raise app.UsageError('Expected no command-line arguments, '
'got: {}'.format(argv))
client_optimizer_fn = optimizer_utils.create_optimizer_fn_from_flags('client')
server_optimizer_fn = optimizer_utils.create_optimizer_fn_from_flags('server')
client_lr_schedule = optimizer_utils.create_lr_schedule_from_flags('client')
server_lr_schedule = optimizer_utils.create_lr_schedule_from_flags('server')
def iterative_process_builder(
model_fn: Callable[[],
tff.learning.Model]) -> tff.templates.IterativeProcess:
"""Creates an iterative process using a given TFF `model_fn`.
Args:
model_fn: A no-arg function returning a `tff.learning.Model`.
Returns:
A `tff.templates.IterativeProcess`.
"""
if FLAGS.task == 'shakespeare' or FLAGS.task == 'stackoverflow_nwp':
def client_weight_fn(local_outputs):
return tf.cast(tf.squeeze(local_outputs['num_tokens']), tf.float32)
else:
client_weight_fn = None
return fed_avg_schedule.build_fed_avg_process(
model_fn=model_fn,
client_optimizer_fn=client_optimizer_fn,
client_lr=client_lr_schedule,
server_optimizer_fn=server_optimizer_fn,
server_lr=server_lr_schedule,
client_weight_fn=client_weight_fn)
task_spec = training_specs.TaskSpec(
iterative_process_builder=iterative_process_builder,
client_epochs_per_round=FLAGS.client_epochs_per_round,
client_batch_size=FLAGS.client_batch_size,
clients_per_round=FLAGS.clients_per_round,
client_datasets_random_seed=FLAGS.client_datasets_random_seed)
if FLAGS.task == 'cifar100':
runner_spec = federated_cifar100.configure_training(
task_spec,
crop_size=FLAGS.cifar100_crop_size,
distort_train_images=FLAGS.cifar100_distort_train_images)
elif FLAGS.task == 'emnist_cr':
runner_spec = federated_emnist.configure_training(
task_spec, model=FLAGS.emnist_cr_model)
elif FLAGS.task == 'emnist_ae':
runner_spec = federated_emnist_ae.configure_training(task_spec)
elif FLAGS.task == 'shakespeare':
runner_spec = federated_shakespeare.configure_training(
task_spec, sequence_length=FLAGS.shakespeare_sequence_length)
elif FLAGS.task == 'stackoverflow_nwp':
runner_spec = federated_stackoverflow.configure_training(
task_spec,
vocab_size=FLAGS.so_nwp_vocab_size,
num_oov_buckets=FLAGS.so_nwp_num_oov_buckets,
sequence_length=FLAGS.so_nwp_sequence_length,
max_elements_per_user=FLAGS.so_nwp_max_elements_per_user,
num_validation_examples=FLAGS.so_nwp_num_validation_examples)
elif FLAGS.task == 'stackoverflow_lr':
runner_spec = federated_stackoverflow_lr.configure_training(
task_spec,
vocab_tokens_size=FLAGS.so_lr_vocab_tokens_size,
vocab_tags_size=FLAGS.so_lr_vocab_tags_size,
max_elements_per_user=FLAGS.so_lr_max_elements_per_user,
num_validation_examples=FLAGS.so_lr_num_validation_examples)
else:
raise ValueError(
'--task flag {} is not supported, must be one of {}.'.format(
FLAGS.task, _SUPPORTED_TASKS))
_write_hparam_flags()
training_loop.run(
iterative_process=runner_spec.iterative_process,
client_datasets_fn=runner_spec.client_datasets_fn,
validation_fn=runner_spec.validation_fn,
test_fn=runner_spec.test_fn,
total_rounds=FLAGS.total_rounds,
experiment_name=FLAGS.experiment_name,
root_output_dir=FLAGS.root_output_dir,
rounds_per_eval=FLAGS.rounds_per_eval,
rounds_per_checkpoint=FLAGS.rounds_per_checkpoint)
if __name__ == '__main__':
app.run(main)
| 41.546512 | 80 | 0.746525 |
import collections
import os.path
from typing import Callable
from absl import app
from absl import flags
import tensorflow as tf
import tensorflow_federated as tff
from optimization.cifar100 import federated_cifar100
from optimization.emnist import federated_emnist
from optimization.emnist_ae import federated_emnist_ae
from optimization.shakespeare import federated_shakespeare
from optimization.shared import fed_avg_schedule
from optimization.shared import optimizer_utils
from optimization.shared import training_specs
from optimization.stackoverflow import federated_stackoverflow
from optimization.stackoverflow_lr import federated_stackoverflow_lr
from utils import training_loop
from utils import utils_impl
_SUPPORTED_TASKS = [
'cifar100', 'emnist_cr', 'emnist_ae', 'shakespeare', 'stackoverflow_nwp',
'stackoverflow_lr'
]
with utils_impl.record_hparam_flags() as optimizer_flags:
optimizer_utils.define_optimizer_flags('client')
optimizer_utils.define_optimizer_flags('server')
optimizer_utils.define_lr_schedule_flags('client')
optimizer_utils.define_lr_schedule_flags('server')
with utils_impl.record_hparam_flags() as shared_flags:
flags.DEFINE_integer('client_epochs_per_round', 1,
'Number of epochs in the client to take per round.')
flags.DEFINE_integer('client_batch_size', 20, 'Batch size on the clients.')
flags.DEFINE_integer('clients_per_round', 10,
'How many clients to sample per round.')
flags.DEFINE_integer('client_datasets_random_seed', 1,
'Random seed for client sampling.')
flags.DEFINE_string(
'experiment_name', None, 'The name of this experiment. Will be append to '
'--root_output_dir to separate experiment results.')
flags.mark_flag_as_required('experiment_name')
flags.DEFINE_string('root_output_dir', '/tmp/fed_opt/',
'Root directory for writing experiment output.')
flags.DEFINE_integer('total_rounds', 200, 'Number of total training rounds.')
flags.DEFINE_integer(
'rounds_per_eval', 1,
'How often to evaluate the global model on the validation dataset.')
flags.DEFINE_integer('rounds_per_checkpoint', 50,
'How often to checkpoint the global model.')
with utils_impl.record_hparam_flags() as task_flags:
flags.DEFINE_enum('task', None, _SUPPORTED_TASKS,
'Which task to perform federated training on.')
with utils_impl.record_hparam_flags() as cifar100_flags:
flags.DEFINE_integer('cifar100_crop_size', 24, 'The height and width of '
'images after preprocessing.')
flags.DEFINE_bool(
'cifar100_distort_train_images', True, 'If set to True, '
'train images will be randomly cropped. Otherwise, all '
'images will simply be resized.')
with utils_impl.record_hparam_flags() as emnist_cr_flags:
flags.DEFINE_enum(
'emnist_cr_model', 'cnn', ['cnn', '2nn'], 'Which model to '
'use. This can be a convolutional model (cnn) or a two '
'hidden-layer densely connected network (2nn).')
with utils_impl.record_hparam_flags() as shakespeare_flags:
flags.DEFINE_integer(
'shakespeare_sequence_length', 80,
'Length of character sequences to use for the RNN model.')
with utils_impl.record_hparam_flags() as so_nwp_flags:
flags.DEFINE_integer('so_nwp_vocab_size', 10000, 'Size of vocab to use.')
flags.DEFINE_integer('so_nwp_num_oov_buckets', 1,
'Number of out of vocabulary buckets.')
flags.DEFINE_integer('so_nwp_sequence_length', 20,
'Max sequence length to use.')
flags.DEFINE_integer('so_nwp_max_elements_per_user', 1000, 'Max number of '
'training sentences to use per user.')
flags.DEFINE_integer(
'so_nwp_num_validation_examples', 10000, 'Number of examples '
'to use from test set for per-round validation.')
with utils_impl.record_hparam_flags() as so_lr_flags:
flags.DEFINE_integer('so_lr_vocab_tokens_size', 10000,
'Vocab tokens size used.')
flags.DEFINE_integer('so_lr_vocab_tags_size', 500, 'Vocab tags size used.')
flags.DEFINE_integer(
'so_lr_num_validation_examples', 10000, 'Number of examples '
'to use from test set for per-round validation.')
flags.DEFINE_integer('so_lr_max_elements_per_user', 1000,
'Max number of training '
'sentences to use per user.')
FLAGS = flags.FLAGS
TASK_FLAGS = collections.OrderedDict(
cifar100=cifar100_flags,
emnist_cr=emnist_cr_flags,
shakespeare=shakespeare_flags,
stackoverflow_nwp=so_nwp_flags,
stackoverflow_lr=so_lr_flags)
def _write_hparam_flags():
hparam_dict = utils_impl.lookup_flag_values(shared_flags)
opt_flag_dict = utils_impl.lookup_flag_values(optimizer_flags)
opt_flag_dict = optimizer_utils.remove_unused_flags('client', opt_flag_dict)
opt_flag_dict = optimizer_utils.remove_unused_flags('server', opt_flag_dict)
hparam_dict.update(opt_flag_dict)
task_name = FLAGS.task
if task_name in TASK_FLAGS:
task_hparam_dict = utils_impl.lookup_flag_values(TASK_FLAGS[task_name])
hparam_dict.update(task_hparam_dict)
results_dir = os.path.join(FLAGS.root_output_dir, 'results',
FLAGS.experiment_name)
utils_impl.create_directory_if_not_exists(results_dir)
hparam_file = os.path.join(results_dir, 'hparams.csv')
utils_impl.atomic_write_series_to_csv(hparam_dict, hparam_file)
def main(argv):
if len(argv) > 1:
raise app.UsageError('Expected no command-line arguments, '
'got: {}'.format(argv))
client_optimizer_fn = optimizer_utils.create_optimizer_fn_from_flags('client')
server_optimizer_fn = optimizer_utils.create_optimizer_fn_from_flags('server')
client_lr_schedule = optimizer_utils.create_lr_schedule_from_flags('client')
server_lr_schedule = optimizer_utils.create_lr_schedule_from_flags('server')
def iterative_process_builder(
model_fn: Callable[[],
tff.learning.Model]) -> tff.templates.IterativeProcess:
if FLAGS.task == 'shakespeare' or FLAGS.task == 'stackoverflow_nwp':
def client_weight_fn(local_outputs):
return tf.cast(tf.squeeze(local_outputs['num_tokens']), tf.float32)
else:
client_weight_fn = None
return fed_avg_schedule.build_fed_avg_process(
model_fn=model_fn,
client_optimizer_fn=client_optimizer_fn,
client_lr=client_lr_schedule,
server_optimizer_fn=server_optimizer_fn,
server_lr=server_lr_schedule,
client_weight_fn=client_weight_fn)
task_spec = training_specs.TaskSpec(
iterative_process_builder=iterative_process_builder,
client_epochs_per_round=FLAGS.client_epochs_per_round,
client_batch_size=FLAGS.client_batch_size,
clients_per_round=FLAGS.clients_per_round,
client_datasets_random_seed=FLAGS.client_datasets_random_seed)
if FLAGS.task == 'cifar100':
runner_spec = federated_cifar100.configure_training(
task_spec,
crop_size=FLAGS.cifar100_crop_size,
distort_train_images=FLAGS.cifar100_distort_train_images)
elif FLAGS.task == 'emnist_cr':
runner_spec = federated_emnist.configure_training(
task_spec, model=FLAGS.emnist_cr_model)
elif FLAGS.task == 'emnist_ae':
runner_spec = federated_emnist_ae.configure_training(task_spec)
elif FLAGS.task == 'shakespeare':
runner_spec = federated_shakespeare.configure_training(
task_spec, sequence_length=FLAGS.shakespeare_sequence_length)
elif FLAGS.task == 'stackoverflow_nwp':
runner_spec = federated_stackoverflow.configure_training(
task_spec,
vocab_size=FLAGS.so_nwp_vocab_size,
num_oov_buckets=FLAGS.so_nwp_num_oov_buckets,
sequence_length=FLAGS.so_nwp_sequence_length,
max_elements_per_user=FLAGS.so_nwp_max_elements_per_user,
num_validation_examples=FLAGS.so_nwp_num_validation_examples)
elif FLAGS.task == 'stackoverflow_lr':
runner_spec = federated_stackoverflow_lr.configure_training(
task_spec,
vocab_tokens_size=FLAGS.so_lr_vocab_tokens_size,
vocab_tags_size=FLAGS.so_lr_vocab_tags_size,
max_elements_per_user=FLAGS.so_lr_max_elements_per_user,
num_validation_examples=FLAGS.so_lr_num_validation_examples)
else:
raise ValueError(
'--task flag {} is not supported, must be one of {}.'.format(
FLAGS.task, _SUPPORTED_TASKS))
_write_hparam_flags()
training_loop.run(
iterative_process=runner_spec.iterative_process,
client_datasets_fn=runner_spec.client_datasets_fn,
validation_fn=runner_spec.validation_fn,
test_fn=runner_spec.test_fn,
total_rounds=FLAGS.total_rounds,
experiment_name=FLAGS.experiment_name,
root_output_dir=FLAGS.root_output_dir,
rounds_per_eval=FLAGS.rounds_per_eval,
rounds_per_checkpoint=FLAGS.rounds_per_checkpoint)
if __name__ == '__main__':
app.run(main)
| true | true |
f7273144dffee7dafd27261d8848ea23eb74a2e3 | 8,984 | py | Python | nipype/utils/misc.py | lighthall-lab/NiPype | 80d3f05d9aa006fa3055785327892e8a89530a80 | [
"Apache-2.0"
] | null | null | null | nipype/utils/misc.py | lighthall-lab/NiPype | 80d3f05d9aa006fa3055785327892e8a89530a80 | [
"Apache-2.0"
] | null | null | null | nipype/utils/misc.py | lighthall-lab/NiPype | 80d3f05d9aa006fa3055785327892e8a89530a80 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Miscellaneous utility functions
"""
from __future__ import (print_function, unicode_literals, division,
absolute_import)
from builtins import next, str
import sys
import re
from collections import Iterator
from distutils.version import LooseVersion
import numpy as np
from future.utils import raise_from
from future import standard_library
try:
from textwrap import indent as textwrap_indent
except ImportError:
def textwrap_indent(text, prefix):
""" A textwrap.indent replacement for Python < 3.3 """
if not prefix:
return text
splittext = text.splitlines(True)
return prefix + prefix.join(splittext)
standard_library.install_aliases()
def human_order_sorted(l):
"""Sorts string in human order (i.e. 'stat10' will go after 'stat2')"""
def atoi(text):
return int(text) if text.isdigit() else text
def natural_keys(text):
if isinstance(text, tuple):
text = text[0]
return [atoi(c) for c in re.split('(\d+)', text)]
return sorted(l, key=natural_keys)
def trim(docstring, marker=None):
if isinstance(docstring, bytes):
docstring = str(docstring, 'utf-8')
if not docstring:
return ''
# Convert tabs to spaces (following the normal Python rules)
# and split into a list of lines:
lines = docstring.expandtabs().splitlines()
# Determine minimum indentation (first line doesn't count):
indent = sys.maxsize
for line in lines[1:]:
stripped = line.lstrip()
if stripped:
indent = min(indent, len(line) - len(stripped))
# Remove indentation (first line is special):
trimmed = [lines[0].strip()]
if indent < sys.maxsize:
for line in lines[1:]:
# replace existing REST marker with doc level marker
stripped = line.lstrip().strip().rstrip()
if marker is not None and stripped and \
all([s == stripped[0] for s in stripped]) and \
stripped[0] not in [':']:
line = line.replace(stripped[0], marker)
trimmed.append(line[indent:].rstrip())
# Strip off trailing and leading blank lines:
while trimmed and not trimmed[-1]:
trimmed.pop()
while trimmed and not trimmed[0]:
trimmed.pop(0)
# Return a single string:
return '\n'.join(trimmed)
def find_indices(condition):
"Return the indices where ravel(condition) is true"
res, = np.nonzero(np.ravel(condition))
return res
def is_container(item):
"""Checks if item is a container (list, tuple, dict, set)
Parameters
----------
item : object
object to check for .__iter__
Returns
-------
output : Boolean
True if container
False if not (eg string)
"""
if isinstance(item, str):
return False
elif hasattr(item, '__iter__'):
return True
else:
return False
def container_to_string(cont):
"""Convert a container to a command line string.
Elements of the container are joined with a space between them,
suitable for a command line parameter.
If the container `cont` is only a sequence, like a string and not a
container, it is returned unmodified.
Parameters
----------
cont : container
A container object like a list, tuple, dict, or a set.
Returns
-------
cont_str : string
Container elements joined into a string.
"""
if hasattr(cont, '__iter__') and not isinstance(cont, str):
cont = ' '.join(cont)
return str(cont)
# Dependency checks. Copied this from Nipy, with some modificiations
# (added app as a parameter).
def package_check(pkg_name,
version=None,
app=None,
checker=LooseVersion,
exc_failed_import=ImportError,
exc_failed_check=RuntimeError):
"""Check that the minimal version of the required package is installed.
Parameters
----------
pkg_name : string
Name of the required package.
version : string, optional
Minimal version number for required package.
app : string, optional
Application that is performing the check. For instance, the
name of the tutorial being executed that depends on specific
packages. Default is *Nipype*.
checker : object, optional
The class that will perform the version checking. Default is
distutils.version.LooseVersion.
exc_failed_import : Exception, optional
Class of the exception to be thrown if import failed.
exc_failed_check : Exception, optional
Class of the exception to be thrown if version check failed.
Examples
--------
package_check('numpy', '1.3')
package_check('scipy', '0.7', 'tutorial1')
"""
if app:
msg = '%s requires %s' % (app, pkg_name)
else:
msg = 'Nipype requires %s' % pkg_name
if version:
msg += ' with version >= %s' % (version, )
try:
mod = __import__(pkg_name)
except ImportError as e:
raise_from(exc_failed_import(msg), e)
if not version:
return
try:
have_version = mod.__version__
except AttributeError as e:
raise_from(
exc_failed_check('Cannot find version for %s' % pkg_name), e)
if checker(have_version) < checker(version):
raise exc_failed_check(msg)
def str2bool(v):
if isinstance(v, bool):
return v
lower = v.lower()
if lower in ("yes", "true", "t", "1"):
return True
elif lower in ("no", "false", "n", "f", "0"):
return False
else:
raise ValueError("%s cannot be converted to bool" % v)
def flatten(S):
if S == []:
return S
if isinstance(S[0], list):
return flatten(S[0]) + flatten(S[1:])
return S[:1] + flatten(S[1:])
def unflatten(in_list, prev_structure):
if not isinstance(in_list, Iterator):
in_list = iter(in_list)
if not isinstance(prev_structure, list):
return next(in_list)
out = []
for item in prev_structure:
out.append(unflatten(in_list, item))
return out
def normalize_mc_params(params, source):
"""
Normalize a single row of motion parameters to the SPM format.
SPM saves motion parameters as:
x Right-Left (mm)
y Anterior-Posterior (mm)
z Superior-Inferior (mm)
rx Pitch (rad)
ry Yaw (rad)
rz Roll (rad)
"""
if source.upper() == 'FSL':
params = params[[3, 4, 5, 0, 1, 2]]
elif source.upper() in ('AFNI', 'FSFAST'):
params = params[np.asarray([4, 5, 3, 1, 2, 0]) + (len(params) > 6)]
params[3:] = params[3:] * np.pi / 180.
elif source.upper() == 'NIPY':
from nipy.algorithms.registration import to_matrix44, aff2euler
matrix = to_matrix44(params)
params = np.zeros(6)
params[:3] = matrix[:3, 3]
params[-1:2:-1] = aff2euler(matrix)
return params
def dict_diff(dold, dnew, indent=0):
"""Helper to log what actually changed from old to new values of
dictionaries.
typical use -- log difference for hashed_inputs
"""
# First check inputs, since they usually are lists of tuples
# and dicts are required.
if isinstance(dnew, list):
dnew = dict(dnew)
if isinstance(dold, list):
dold = dict(dold)
# Compare against hashed_inputs
# Keys: should rarely differ
new_keys = set(dnew.keys())
old_keys = set(dold.keys())
diff = []
if new_keys - old_keys:
diff += [" * keys not previously seen: %s" % (new_keys - old_keys)]
if old_keys - new_keys:
diff += [" * keys not presently seen: %s" % (old_keys - new_keys)]
# Add topical message
if diff:
diff.insert(0, "Dictionaries had differing keys:")
diffkeys = len(diff)
# Values in common keys would differ quite often,
# so we need to join the messages together
for k in new_keys.intersection(old_keys):
same = False
try:
new, old = dnew[k], dold[k]
same = new == old
if not same:
# Since JSON does not discriminate between lists and
# tuples, we might need to cast them into the same type
# as the last resort. And lets try to be more generic
same = old.__class__(new) == old
except Exception:
same = False
if not same:
diff += [" * %s: %r != %r" % (k, dnew[k], dold[k])]
if len(diff) > diffkeys:
diff.insert(diffkeys, "Some dictionary entries had differing values:")
return textwrap_indent('\n'.join(diff), ' ' * indent)
| 29.552632 | 78 | 0.603851 |
from __future__ import (print_function, unicode_literals, division,
absolute_import)
from builtins import next, str
import sys
import re
from collections import Iterator
from distutils.version import LooseVersion
import numpy as np
from future.utils import raise_from
from future import standard_library
try:
from textwrap import indent as textwrap_indent
except ImportError:
def textwrap_indent(text, prefix):
""" A textwrap.indent replacement for Python < 3.3 """
if not prefix:
return text
splittext = text.splitlines(True)
return prefix + prefix.join(splittext)
standard_library.install_aliases()
def human_order_sorted(l):
def atoi(text):
return int(text) if text.isdigit() else text
def natural_keys(text):
if isinstance(text, tuple):
text = text[0]
return [atoi(c) for c in re.split('(\d+)', text)]
return sorted(l, key=natural_keys)
def trim(docstring, marker=None):
if isinstance(docstring, bytes):
docstring = str(docstring, 'utf-8')
if not docstring:
return ''
lines = docstring.expandtabs().splitlines()
indent = sys.maxsize
for line in lines[1:]:
stripped = line.lstrip()
if stripped:
indent = min(indent, len(line) - len(stripped))
# Remove indentation (first line is special):
trimmed = [lines[0].strip()]
if indent < sys.maxsize:
for line in lines[1:]:
# replace existing REST marker with doc level marker
stripped = line.lstrip().strip().rstrip()
if marker is not None and stripped and \
all([s == stripped[0] for s in stripped]) and \
stripped[0] not in [':']:
line = line.replace(stripped[0], marker)
trimmed.append(line[indent:].rstrip())
# Strip off trailing and leading blank lines:
while trimmed and not trimmed[-1]:
trimmed.pop()
while trimmed and not trimmed[0]:
trimmed.pop(0)
# Return a single string:
return '\n'.join(trimmed)
def find_indices(condition):
res, = np.nonzero(np.ravel(condition))
return res
def is_container(item):
if isinstance(item, str):
return False
elif hasattr(item, '__iter__'):
return True
else:
return False
def container_to_string(cont):
if hasattr(cont, '__iter__') and not isinstance(cont, str):
cont = ' '.join(cont)
return str(cont)
# Dependency checks. Copied this from Nipy, with some modificiations
# (added app as a parameter).
def package_check(pkg_name,
version=None,
app=None,
checker=LooseVersion,
exc_failed_import=ImportError,
exc_failed_check=RuntimeError):
if app:
msg = '%s requires %s' % (app, pkg_name)
else:
msg = 'Nipype requires %s' % pkg_name
if version:
msg += ' with version >= %s' % (version, )
try:
mod = __import__(pkg_name)
except ImportError as e:
raise_from(exc_failed_import(msg), e)
if not version:
return
try:
have_version = mod.__version__
except AttributeError as e:
raise_from(
exc_failed_check('Cannot find version for %s' % pkg_name), e)
if checker(have_version) < checker(version):
raise exc_failed_check(msg)
def str2bool(v):
if isinstance(v, bool):
return v
lower = v.lower()
if lower in ("yes", "true", "t", "1"):
return True
elif lower in ("no", "false", "n", "f", "0"):
return False
else:
raise ValueError("%s cannot be converted to bool" % v)
def flatten(S):
if S == []:
return S
if isinstance(S[0], list):
return flatten(S[0]) + flatten(S[1:])
return S[:1] + flatten(S[1:])
def unflatten(in_list, prev_structure):
if not isinstance(in_list, Iterator):
in_list = iter(in_list)
if not isinstance(prev_structure, list):
return next(in_list)
out = []
for item in prev_structure:
out.append(unflatten(in_list, item))
return out
def normalize_mc_params(params, source):
if source.upper() == 'FSL':
params = params[[3, 4, 5, 0, 1, 2]]
elif source.upper() in ('AFNI', 'FSFAST'):
params = params[np.asarray([4, 5, 3, 1, 2, 0]) + (len(params) > 6)]
params[3:] = params[3:] * np.pi / 180.
elif source.upper() == 'NIPY':
from nipy.algorithms.registration import to_matrix44, aff2euler
matrix = to_matrix44(params)
params = np.zeros(6)
params[:3] = matrix[:3, 3]
params[-1:2:-1] = aff2euler(matrix)
return params
def dict_diff(dold, dnew, indent=0):
# First check inputs, since they usually are lists of tuples
# and dicts are required.
if isinstance(dnew, list):
dnew = dict(dnew)
if isinstance(dold, list):
dold = dict(dold)
# Compare against hashed_inputs
# Keys: should rarely differ
new_keys = set(dnew.keys())
old_keys = set(dold.keys())
diff = []
if new_keys - old_keys:
diff += [" * keys not previously seen: %s" % (new_keys - old_keys)]
if old_keys - new_keys:
diff += [" * keys not presently seen: %s" % (old_keys - new_keys)]
# Add topical message
if diff:
diff.insert(0, "Dictionaries had differing keys:")
diffkeys = len(diff)
# Values in common keys would differ quite often,
# so we need to join the messages together
for k in new_keys.intersection(old_keys):
same = False
try:
new, old = dnew[k], dold[k]
same = new == old
if not same:
# Since JSON does not discriminate between lists and
# tuples, we might need to cast them into the same type
# as the last resort. And lets try to be more generic
same = old.__class__(new) == old
except Exception:
same = False
if not same:
diff += [" * %s: %r != %r" % (k, dnew[k], dold[k])]
if len(diff) > diffkeys:
diff.insert(diffkeys, "Some dictionary entries had differing values:")
return textwrap_indent('\n'.join(diff), ' ' * indent)
| true | true |
f7273303519fad0fa8811da7d0c2b7e2b0859a99 | 6,318 | py | Python | src/generated-spec/redshift.py | wheerd/cloudformation-to-terraform | 5411b33293e1f7d7673bb5d4cb52ff0537240db3 | [
"MIT"
] | null | null | null | src/generated-spec/redshift.py | wheerd/cloudformation-to-terraform | 5411b33293e1f7d7673bb5d4cb52ff0537240db3 | [
"MIT"
] | null | null | null | src/generated-spec/redshift.py | wheerd/cloudformation-to-terraform | 5411b33293e1f7d7673bb5d4cb52ff0537240db3 | [
"MIT"
] | null | null | null | from . import *
class AWS_Redshift_ClusterParameterGroup_Parameter(CloudFormationProperty):
def write(self, w):
with w.block("parameter"):
self.property(w, "ParameterName", "parameter_name", StringValueConverter())
self.property(w, "ParameterValue", "parameter_value", StringValueConverter())
class AWS_Redshift_Cluster_LoggingProperties(CloudFormationProperty):
def write(self, w):
with w.block("logging_properties"):
self.property(w, "BucketName", "bucket_name", StringValueConverter())
self.property(w, "S3KeyPrefix", "s3_key_prefix", StringValueConverter())
class AWS_Redshift_Cluster(CloudFormationResource):
cfn_type = "AWS::Redshift::Cluster"
tf_type = "aws_redshift_cluster"
ref = "id"
attrs = {
"Endpoint.Address": "endpoint",
"Endpoint.Port": "endpoint._port", # TODO: Probably not the correct mapping
# Additional TF attributes: arn, availability_zone, bucket_name, cluster_parameter_group_name, cluster_public_key, cluster_revision_number, cluster_security_groups, cluster_subnet_group_name, cluster_type, database_name, dns_name, enable_logging, enhanced_vpc_routing, iam_roles, kms_key_id, preferred_maintenance_window, s3_key_prefix, vpc_security_group_ids
}
def write(self, w):
with self.resource_block(w):
self.property(w, "AllowVersionUpgrade", "allow_version_upgrade", BasicValueConverter())
self.property(w, "AutomatedSnapshotRetentionPeriod", "automated_snapshot_retention_period", BasicValueConverter())
self.property(w, "AvailabilityZone", "availability_zone", StringValueConverter())
self.property(w, "ClusterIdentifier", "cluster_identifier", StringValueConverter())
self.property(w, "ClusterParameterGroupName", "cluster_parameter_group_name", StringValueConverter())
self.property(w, "ClusterSecurityGroups", "cluster_security_groups", ListValueConverter(StringValueConverter()))
self.property(w, "ClusterSubnetGroupName", "cluster_subnet_group_name", StringValueConverter())
self.property(w, "ClusterType", "cluster_type", StringValueConverter())
self.property(w, "ClusterVersion", "cluster_version", StringValueConverter())
self.property(w, "DBName", "db_name", StringValueConverter()) # TODO: Probably not the correct mapping
self.property(w, "ElasticIp", "elastic_ip", StringValueConverter())
self.property(w, "Encrypted", "encrypted", BasicValueConverter())
self.property(w, "HsmClientCertificateIdentifier", "hsm_client_certificate_identifier", StringValueConverter()) # TODO: Probably not the correct mapping
self.property(w, "HsmConfigurationIdentifier", "hsm_configuration_identifier", StringValueConverter()) # TODO: Probably not the correct mapping
self.property(w, "IamRoles", "iam_roles", ListValueConverter(StringValueConverter()))
self.property(w, "KmsKeyId", "kms_key_id", StringValueConverter())
self.block(w, "LoggingProperties", AWS_Redshift_Cluster_LoggingProperties)
self.property(w, "MasterUserPassword", "master_user_password", StringValueConverter()) # TODO: Probably not the correct mapping
self.property(w, "MasterUsername", "master_username", StringValueConverter())
self.property(w, "NodeType", "node_type", StringValueConverter())
self.property(w, "NumberOfNodes", "number_of_nodes", BasicValueConverter())
self.property(w, "OwnerAccount", "owner_account", StringValueConverter())
self.property(w, "Port", "port", BasicValueConverter())
self.property(w, "PreferredMaintenanceWindow", "preferred_maintenance_window", StringValueConverter())
self.property(w, "PubliclyAccessible", "publicly_accessible", BasicValueConverter())
self.property(w, "SnapshotClusterIdentifier", "snapshot_cluster_identifier", StringValueConverter())
self.property(w, "SnapshotIdentifier", "snapshot_identifier", StringValueConverter())
self.property(w, "Tags", "tags", ListValueConverter(ResourceTag()))
self.property(w, "VpcSecurityGroupIds", "vpc_security_group_ids", ListValueConverter(StringValueConverter()))
class AWS_Redshift_ClusterParameterGroup(CloudFormationResource):
cfn_type = "AWS::Redshift::ClusterParameterGroup"
tf_type = "aws_redshift_parameter_group"
ref = "id"
attrs = {} # Additional TF attributes: arn
def write(self, w):
with self.resource_block(w):
self.property(w, "Description", "description", StringValueConverter())
self.property(w, "ParameterGroupFamily", "family", StringValueConverter())
self.repeated_block(w, "Parameters", AWS_Redshift_ClusterParameterGroup_Parameter)
self.property(w, "Tags", "tags", ListValueConverter(ResourceTag()))
class AWS_Redshift_ClusterSubnetGroup(CloudFormationResource):
cfn_type = "AWS::Redshift::ClusterSubnetGroup"
tf_type = "aws_redshift_subnet_group"
ref = "id"
attrs = {} # Additional TF attributes: arn
def write(self, w):
with self.resource_block(w):
self.property(w, "Description", "description", StringValueConverter())
self.property(w, "SubnetIds", "subnet_ids", ListValueConverter(StringValueConverter()))
self.property(w, "Tags", "tags", ListValueConverter(ResourceTag()))
class AWS_Redshift_ClusterSecurityGroup(CloudFormationResource):
cfn_type = "AWS::Redshift::ClusterSecurityGroup"
tf_type = "aws_redshift_security_group"
ref = "id"
attrs = {}
def write(self, w):
with self.resource_block(w):
self.property(w, "Description", "description", StringValueConverter())
self.property(w, "Tags", "tags", ListValueConverter(ResourceTag())) # TODO: Probably not the correct mapping
class AWS_Redshift_ClusterSecurityGroupIngress(CloudFormationResource):
cfn_type = "AWS::Redshift::ClusterSecurityGroupIngress"
tf_type = "aws_redshift_cluster_security_group_ingress" # TODO: Most likely not working
ref = "arn"
attrs = {}
def write(self, w):
with self.resource_block(w):
self.property(w, "CIDRIP", "cidrip", StringValueConverter())
self.property(w, "ClusterSecurityGroupName", "cluster_security_group_name", StringValueConverter())
self.property(w, "EC2SecurityGroupName", "ec2_security_group_name", StringValueConverter())
self.property(w, "EC2SecurityGroupOwnerId", "ec2_security_group_owner_id", StringValueConverter())
| 55.911504 | 363 | 0.755461 | from . import *
class AWS_Redshift_ClusterParameterGroup_Parameter(CloudFormationProperty):
def write(self, w):
with w.block("parameter"):
self.property(w, "ParameterName", "parameter_name", StringValueConverter())
self.property(w, "ParameterValue", "parameter_value", StringValueConverter())
class AWS_Redshift_Cluster_LoggingProperties(CloudFormationProperty):
def write(self, w):
with w.block("logging_properties"):
self.property(w, "BucketName", "bucket_name", StringValueConverter())
self.property(w, "S3KeyPrefix", "s3_key_prefix", StringValueConverter())
class AWS_Redshift_Cluster(CloudFormationResource):
cfn_type = "AWS::Redshift::Cluster"
tf_type = "aws_redshift_cluster"
ref = "id"
attrs = {
"Endpoint.Address": "endpoint",
"Endpoint.Port": "endpoint._port",
}
def write(self, w):
with self.resource_block(w):
self.property(w, "AllowVersionUpgrade", "allow_version_upgrade", BasicValueConverter())
self.property(w, "AutomatedSnapshotRetentionPeriod", "automated_snapshot_retention_period", BasicValueConverter())
self.property(w, "AvailabilityZone", "availability_zone", StringValueConverter())
self.property(w, "ClusterIdentifier", "cluster_identifier", StringValueConverter())
self.property(w, "ClusterParameterGroupName", "cluster_parameter_group_name", StringValueConverter())
self.property(w, "ClusterSecurityGroups", "cluster_security_groups", ListValueConverter(StringValueConverter()))
self.property(w, "ClusterSubnetGroupName", "cluster_subnet_group_name", StringValueConverter())
self.property(w, "ClusterType", "cluster_type", StringValueConverter())
self.property(w, "ClusterVersion", "cluster_version", StringValueConverter())
self.property(w, "DBName", "db_name", StringValueConverter())
self.property(w, "ElasticIp", "elastic_ip", StringValueConverter())
self.property(w, "Encrypted", "encrypted", BasicValueConverter())
self.property(w, "HsmClientCertificateIdentifier", "hsm_client_certificate_identifier", StringValueConverter())
self.property(w, "HsmConfigurationIdentifier", "hsm_configuration_identifier", StringValueConverter())
self.property(w, "IamRoles", "iam_roles", ListValueConverter(StringValueConverter()))
self.property(w, "KmsKeyId", "kms_key_id", StringValueConverter())
self.block(w, "LoggingProperties", AWS_Redshift_Cluster_LoggingProperties)
self.property(w, "MasterUserPassword", "master_user_password", StringValueConverter())
self.property(w, "MasterUsername", "master_username", StringValueConverter())
self.property(w, "NodeType", "node_type", StringValueConverter())
self.property(w, "NumberOfNodes", "number_of_nodes", BasicValueConverter())
self.property(w, "OwnerAccount", "owner_account", StringValueConverter())
self.property(w, "Port", "port", BasicValueConverter())
self.property(w, "PreferredMaintenanceWindow", "preferred_maintenance_window", StringValueConverter())
self.property(w, "PubliclyAccessible", "publicly_accessible", BasicValueConverter())
self.property(w, "SnapshotClusterIdentifier", "snapshot_cluster_identifier", StringValueConverter())
self.property(w, "SnapshotIdentifier", "snapshot_identifier", StringValueConverter())
self.property(w, "Tags", "tags", ListValueConverter(ResourceTag()))
self.property(w, "VpcSecurityGroupIds", "vpc_security_group_ids", ListValueConverter(StringValueConverter()))
class AWS_Redshift_ClusterParameterGroup(CloudFormationResource):
cfn_type = "AWS::Redshift::ClusterParameterGroup"
tf_type = "aws_redshift_parameter_group"
ref = "id"
attrs = {}
def write(self, w):
with self.resource_block(w):
self.property(w, "Description", "description", StringValueConverter())
self.property(w, "ParameterGroupFamily", "family", StringValueConverter())
self.repeated_block(w, "Parameters", AWS_Redshift_ClusterParameterGroup_Parameter)
self.property(w, "Tags", "tags", ListValueConverter(ResourceTag()))
class AWS_Redshift_ClusterSubnetGroup(CloudFormationResource):
cfn_type = "AWS::Redshift::ClusterSubnetGroup"
tf_type = "aws_redshift_subnet_group"
ref = "id"
attrs = {}
def write(self, w):
with self.resource_block(w):
self.property(w, "Description", "description", StringValueConverter())
self.property(w, "SubnetIds", "subnet_ids", ListValueConverter(StringValueConverter()))
self.property(w, "Tags", "tags", ListValueConverter(ResourceTag()))
class AWS_Redshift_ClusterSecurityGroup(CloudFormationResource):
cfn_type = "AWS::Redshift::ClusterSecurityGroup"
tf_type = "aws_redshift_security_group"
ref = "id"
attrs = {}
def write(self, w):
with self.resource_block(w):
self.property(w, "Description", "description", StringValueConverter())
self.property(w, "Tags", "tags", ListValueConverter(ResourceTag()))
class AWS_Redshift_ClusterSecurityGroupIngress(CloudFormationResource):
cfn_type = "AWS::Redshift::ClusterSecurityGroupIngress"
tf_type = "aws_redshift_cluster_security_group_ingress"
ref = "arn"
attrs = {}
def write(self, w):
with self.resource_block(w):
self.property(w, "CIDRIP", "cidrip", StringValueConverter())
self.property(w, "ClusterSecurityGroupName", "cluster_security_group_name", StringValueConverter())
self.property(w, "EC2SecurityGroupName", "ec2_security_group_name", StringValueConverter())
self.property(w, "EC2SecurityGroupOwnerId", "ec2_security_group_owner_id", StringValueConverter())
| true | true |
f72733fd03757b454a35ae32f4709e54b50e01e9 | 2,585 | py | Python | lib/python/treadmill/cli/scheduler/__init__.py | drienyov/treadmill | ce21537cd9a2fdb0567ac2aa3de1afcb2f6861de | [
"Apache-2.0"
] | 2 | 2017-10-31T18:48:20.000Z | 2018-03-04T20:35:20.000Z | lib/python/treadmill/cli/scheduler/__init__.py | bretttegart/treadmill | 812109e31c503a6eddaee2d3f2e1faf2833b6aaf | [
"Apache-2.0"
] | null | null | null | lib/python/treadmill/cli/scheduler/__init__.py | bretttegart/treadmill | 812109e31c503a6eddaee2d3f2e1faf2833b6aaf | [
"Apache-2.0"
] | null | null | null | """Top level command for Treadmill reports.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import json
import click
import pandas as pd
import tabulate
from six.moves import urllib_parse
from treadmill import cli
from treadmill import context
from treadmill import plugin_manager
from treadmill import restclient
def fetch_report(cell_api, report_type, match=None, partition=None):
"""Fetch a report of the given type and return it as a DataFrame."""
api_urls = context.GLOBAL.cell_api(cell_api)
path = '/scheduler/{}'.format(report_type)
query = {}
if match:
query['match'] = match
if partition:
query['partition'] = partition
if query:
path += '?' + urllib_parse.urlencode(query)
response = restclient.get(api_urls, path).json()
return pd.DataFrame(response['data'], columns=response['columns'])
def print_report(frame):
"""Pretty-print the report."""
if cli.OUTPUT_FORMAT is None:
frame.replace(True, ' ', inplace=True)
frame.replace(False, 'X', inplace=True)
dict_ = frame.to_dict(orient='split')
del dict_['index']
cli.out(
tabulate.tabulate(
dict_['data'], dict_['columns'], tablefmt='simple'
)
)
cli.echo_green('\nX: designates the factor that prohibits scheduling '
'the instance on the given server')
elif cli.OUTPUT_FORMAT == 'yaml':
fmt = plugin_manager.load('treadmill.formatters', 'yaml')
cli.out(fmt.format(frame.to_dict(orient='records')))
elif cli.OUTPUT_FORMAT == 'json':
cli.out(frame.to_json(orient='records'))
elif cli.OUTPUT_FORMAT == 'csv':
cli.out(frame.to_csv(index=False))
else:
cli.out(tabulate.tabulate(frame, frame.columns, tablefmt='simple'))
def init():
"""Return top level command handler."""
@click.group(cls=cli.make_commands(__name__))
@click.option(
'--cell',
help='Treadmill cell',
envvar='TREADMILL_CELL',
callback=cli.handle_context_opt,
expose_value=False,
required=True
)
@click.option(
'--api',
help='Cell API URL',
metavar='URL',
envvar='TREADMILL_CELLAPI'
)
@click.pass_context
def run(ctx, api):
"""Report scheduler state."""
if not ctx.obj:
ctx.obj = {} # Doesn't seem to exist in testing
ctx.obj['api'] = api
return run
| 27.795699 | 78 | 0.635977 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import json
import click
import pandas as pd
import tabulate
from six.moves import urllib_parse
from treadmill import cli
from treadmill import context
from treadmill import plugin_manager
from treadmill import restclient
def fetch_report(cell_api, report_type, match=None, partition=None):
api_urls = context.GLOBAL.cell_api(cell_api)
path = '/scheduler/{}'.format(report_type)
query = {}
if match:
query['match'] = match
if partition:
query['partition'] = partition
if query:
path += '?' + urllib_parse.urlencode(query)
response = restclient.get(api_urls, path).json()
return pd.DataFrame(response['data'], columns=response['columns'])
def print_report(frame):
if cli.OUTPUT_FORMAT is None:
frame.replace(True, ' ', inplace=True)
frame.replace(False, 'X', inplace=True)
dict_ = frame.to_dict(orient='split')
del dict_['index']
cli.out(
tabulate.tabulate(
dict_['data'], dict_['columns'], tablefmt='simple'
)
)
cli.echo_green('\nX: designates the factor that prohibits scheduling '
'the instance on the given server')
elif cli.OUTPUT_FORMAT == 'yaml':
fmt = plugin_manager.load('treadmill.formatters', 'yaml')
cli.out(fmt.format(frame.to_dict(orient='records')))
elif cli.OUTPUT_FORMAT == 'json':
cli.out(frame.to_json(orient='records'))
elif cli.OUTPUT_FORMAT == 'csv':
cli.out(frame.to_csv(index=False))
else:
cli.out(tabulate.tabulate(frame, frame.columns, tablefmt='simple'))
def init():
@click.group(cls=cli.make_commands(__name__))
@click.option(
'--cell',
help='Treadmill cell',
envvar='TREADMILL_CELL',
callback=cli.handle_context_opt,
expose_value=False,
required=True
)
@click.option(
'--api',
help='Cell API URL',
metavar='URL',
envvar='TREADMILL_CELLAPI'
)
@click.pass_context
def run(ctx, api):
if not ctx.obj:
ctx.obj = {}
ctx.obj['api'] = api
return run
| true | true |
f727340d07d3b97b4a2fa74591b9f914b730fdb4 | 730 | py | Python | polygon/__init__.py | pssolanki111/polygon | 99c90950a116f78fdfd8096e354153752c6cdd95 | [
"MIT"
] | 20 | 2021-08-29T10:06:00.000Z | 2022-03-22T07:30:01.000Z | polygon/__init__.py | pssolanki111/polygon | 99c90950a116f78fdfd8096e354153752c6cdd95 | [
"MIT"
] | 1 | 2022-02-16T19:03:12.000Z | 2022-02-25T06:13:51.000Z | polygon/__init__.py | pssolanki111/polygon | 99c90950a116f78fdfd8096e354153752c6cdd95 | [
"MIT"
] | 3 | 2022-01-25T03:34:07.000Z | 2022-02-08T15:06:11.000Z | # ========================================================= #
from .stocks import StocksClient
from .streaming import StreamClient, AsyncStreamClient
from .forex import ForexClient
from .crypto import CryptoClient
from .reference_apis import ReferenceClient
from .options import (OptionsClient, build_option_symbol, parse_option_symbol, OptionSymbol,
build_option_symbol_for_tda, parse_option_symbol_from_tda, convert_from_polygon_to_tda_format,
convert_from_tda_to_polygon_format)
from .base_client import (BaseClient, BaseAsyncClient)
# ========================================================= #
__version__ = '0.9.8'
# ========================================================= #
| 42.941176 | 116 | 0.591781 | from .stocks import StocksClient
from .streaming import StreamClient, AsyncStreamClient
from .forex import ForexClient
from .crypto import CryptoClient
from .reference_apis import ReferenceClient
from .options import (OptionsClient, build_option_symbol, parse_option_symbol, OptionSymbol,
build_option_symbol_for_tda, parse_option_symbol_from_tda, convert_from_polygon_to_tda_format,
convert_from_tda_to_polygon_format)
from .base_client import (BaseClient, BaseAsyncClient)
__version__ = '0.9.8'
| true | true |
f72734b87340580ae862b0b1ab93d1933cead503 | 608 | py | Python | 100_days_of_code/Beginner/day_13/art.py | Tiago-S-Ribeiro/Python-Pro-Bootcamp | 20a82443fe2e6ee9040ecd9a03853e6c6346592c | [
"MIT"
] | null | null | null | 100_days_of_code/Beginner/day_13/art.py | Tiago-S-Ribeiro/Python-Pro-Bootcamp | 20a82443fe2e6ee9040ecd9a03853e6c6346592c | [
"MIT"
] | null | null | null | 100_days_of_code/Beginner/day_13/art.py | Tiago-S-Ribeiro/Python-Pro-Bootcamp | 20a82443fe2e6ee9040ecd9a03853e6c6346592c | [
"MIT"
] | null | null | null | logo = '''
______ __ __ _ __ __
/ ____/__ __ ___ _____ _____ / /_ / /_ ___ / | / /__ __ ____ ___ / /_ ___ _____
/ / __ / / / // _ \ / ___// ___/ / __// __ \ / _ \ / |/ // / / // __ `__ \ / __ \ / _ \ / ___/
/ /_/ // /_/ // __/(__ )(__ ) / /_ / / / // __/ / /| // /_/ // / / / / // /_/ // __// /
\____/ \__,_/ \___//____//____/ \__//_/ /_/ \___/ /_/ |_/ \__,_//_/ /_/ /_//_.___/ \___//_/
''' | 86.857143 | 193 | 0.238487 | logo = '''
______ __ __ _ __ __
/ ____/__ __ ___ _____ _____ / /_ / /_ ___ / | / /__ __ ____ ___ / /_ ___ _____
/ / __ / / / // _ \ / ___// ___/ / __// __ \ / _ \ / |/ // / / // __ `__ \ / __ \ / _ \ / ___/
/ /_/ // /_/ // __/(__ )(__ ) / /_ / / / // __/ / /| // /_/ // / / / / // /_/ // __// /
\____/ \__,_/ \___//____//____/ \__//_/ /_/ \___/ /_/ |_/ \__,_//_/ /_/ /_//_.___/ \___//_/
''' | true | true |
f72734c285abc83d4428383f1e1fdcf37a42b826 | 12,086 | py | Python | mergify_engine/web/root.py | v1v/mergify-engine | 21f63be9987740e1466459f966b186392a235051 | [
"Apache-2.0"
] | null | null | null | mergify_engine/web/root.py | v1v/mergify-engine | 21f63be9987740e1466459f966b186392a235051 | [
"Apache-2.0"
] | 261 | 2020-10-15T15:56:15.000Z | 2022-03-31T07:08:30.000Z | mergify_engine/web/root.py | v1v/mergify-engine | 21f63be9987740e1466459f966b186392a235051 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
#
# Copyright © 2019–2021 Mergify SAS
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import collections
import typing
import aredis
import daiquiri
from datadog import statsd
import fastapi
import httpx
from starlette import requests
from starlette import responses
import voluptuous
from mergify_engine import config
from mergify_engine import github_events
from mergify_engine import github_types
from mergify_engine import json
from mergify_engine import subscription
from mergify_engine import utils
from mergify_engine.clients import github
from mergify_engine.clients import http
from mergify_engine.queue import merge_train
from mergify_engine.web import auth
from mergify_engine.web import badges
from mergify_engine.web import config_validator
from mergify_engine.web import redis
from mergify_engine.web import simulator
LOG = daiquiri.getLogger(__name__)
app = fastapi.FastAPI()
app.mount("/simulator", simulator.app)
app.mount("/validate", config_validator.app)
app.mount("/badges", badges.app)
# Set the maximum timeout to 5 seconds: GitHub is not going to wait for
# more than 10 seconds for us to accept an event, so if we're unable to
# forward an event in 5 seconds, just drop it.
EVENT_FORWARD_TIMEOUT = 5
@app.on_event("startup")
async def startup() -> None:
await redis.startup()
@app.on_event("shutdown")
async def shutdown() -> None:
await redis.shutdown()
@app.exception_handler(aredis.exceptions.ConnectionError)
async def redis_errors(
request: requests.Request, exc: aredis.exceptions.ConnectionError
) -> responses.JSONResponse:
statsd.increment("redis.client.connection.errors")
LOG.warning("FastAPI lost Redis connection", exc_info=exc)
return responses.JSONResponse(status_code=503)
@app.get("/installation") # noqa: FS003
async def installation() -> responses.Response:
return responses.Response(
"Your mergify installation succeed, the installer have been disabled.",
status_code=200,
)
@app.post(
"/refresh/{owner}/{repo_name}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def refresh_repo(
owner: github_types.GitHubLogin,
repo_name: github_types.GitHubRepositoryName,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
redis_stream: utils.RedisStream = fastapi.Depends( # noqa: B008
redis.get_redis_stream
),
) -> responses.Response:
async with github.aget_client(owner_name=owner) as client:
try:
repository = await client.item(f"/repos/{owner}/{repo_name}")
except http.HTTPNotFound:
return responses.JSONResponse(
status_code=404, content="repository not found"
)
await github_events.send_refresh(redis_cache, redis_stream, repository)
return responses.Response("Refresh queued", status_code=202)
RefreshActionSchema = voluptuous.Schema(voluptuous.Any("user", "admin", "internal"))
@app.post(
"/refresh/{owner}/{repo_name}/pull/{pull_request_number}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def refresh_pull(
owner: github_types.GitHubLogin,
repo_name: github_types.GitHubRepositoryName,
pull_request_number: github_types.GitHubPullRequestNumber,
action: github_types.GitHubEventRefreshActionType = "user",
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
redis_stream: utils.RedisStream = fastapi.Depends( # noqa: B008
redis.get_redis_stream
),
) -> responses.Response:
action = RefreshActionSchema(action)
async with github.aget_client(owner_name=owner) as client:
try:
repository = await client.item(f"/repos/{owner}/{repo_name}")
except http.HTTPNotFound:
return responses.JSONResponse(
status_code=404, content="repository not found"
)
await github_events.send_refresh(
redis_cache,
redis_stream,
repository,
pull_request_number=pull_request_number,
action=action,
)
return responses.Response("Refresh queued", status_code=202)
@app.post(
"/refresh/{owner}/{repo_name}/branch/{branch}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def refresh_branch(
owner: github_types.GitHubLogin,
repo_name: github_types.GitHubRepositoryName,
branch: str,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
redis_stream: utils.RedisStream = fastapi.Depends( # noqa: B008
redis.get_redis_stream
),
) -> responses.Response:
async with github.aget_client(owner_name=owner) as client:
try:
repository = await client.item(f"/repos/{owner}/{repo_name}")
except http.HTTPNotFound:
return responses.JSONResponse(
status_code=404, content="repository not found"
)
await github_events.send_refresh(
redis_cache,
redis_stream,
repository,
ref=github_types.GitHubRefType(f"refs/heads/{branch}"),
)
return responses.Response("Refresh queued", status_code=202)
@app.put(
"/subscription-cache/{owner_id}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def subscription_cache_update(
owner_id: github_types.GitHubAccountIdType,
request: requests.Request,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
) -> responses.Response:
sub = await request.json()
if sub is None:
return responses.Response("Empty content", status_code=400)
await subscription.Subscription.from_dict(
redis_cache, int(owner_id), sub
).save_subscription_to_cache()
return responses.Response("Cache updated", status_code=200)
@app.delete(
"/subscription-cache/{owner_id}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def subscription_cache_delete(
owner_id: github_types.GitHubAccountIdType,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
) -> responses.Response:
await subscription.Subscription.delete(redis_cache, owner_id)
return responses.Response("Cache cleaned", status_code=200)
@app.post("/marketplace", dependencies=[fastapi.Depends(auth.signature)])
async def marketplace_handler(
request: requests.Request,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
) -> responses.Response:
event_type = request.headers.get("X-GitHub-Event")
event_id = request.headers.get("X-GitHub-Delivery")
data = await request.json()
LOG.info(
"Marketplace event",
event_type=event_type,
event_id=event_id,
sender=data["sender"]["login"],
gh_owner=data["marketplace_purchase"]["account"]["login"],
)
await subscription.Subscription.delete(
redis_cache, data["marketplace_purchase"]["account"]["id"]
)
if config.WEBHOOK_MARKETPLACE_FORWARD_URL:
raw = await request.body()
try:
async with http.AsyncClient(timeout=EVENT_FORWARD_TIMEOUT) as client:
await client.post(
config.WEBHOOK_MARKETPLACE_FORWARD_URL,
content=raw.decode(),
headers={
"X-GitHub-Event": event_type,
"X-GitHub-Delivery": event_id,
"X-Hub-Signature": request.headers.get("X-Hub-Signature"),
"User-Agent": request.headers.get("User-Agent"),
"Content-Type": request.headers.get("Content-Type"),
},
)
except httpx.TimeoutException:
LOG.warning(
"Fail to forward Marketplace event",
event_type=event_type,
event_id=event_id,
sender=data["sender"]["login"],
gh_owner=data["marketplace_purchase"]["account"]["login"],
)
return responses.Response("Event queued", status_code=202)
@app.get(
"/queues/{owner_id}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def queues(
owner_id: github_types.GitHubAccountIdType,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
) -> responses.Response:
queues: typing.Dict[
str, typing.Dict[str, typing.List[int]]
] = collections.defaultdict(dict)
async for queue in redis_cache.scan_iter(
match=f"merge-*~{owner_id}~*", count=10000
):
queue_type, _, repo_id, branch = queue.split("~")
if queue_type == "merge-queue":
queues[repo_id][branch] = [
int(pull) async for pull, _ in redis_cache.zscan_iter(queue)
]
elif queue_type == "merge-train":
train_raw = await redis_cache.get(queue)
train = typing.cast(merge_train.Train.Serialized, json.loads(train_raw))
_, _, repo_id, branch = queue.split("~")
queues[repo_id][branch] = [
int(c["user_pull_request_number"]) for c in train["cars"]
] + [int(wp[0]) for wp in train["waiting_pulls"]]
return responses.JSONResponse(status_code=200, content=queues)
@app.post("/event", dependencies=[fastapi.Depends(auth.signature)])
async def event_handler(
request: requests.Request,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
redis_stream: utils.RedisStream = fastapi.Depends( # noqa: B008
redis.get_redis_stream
),
) -> responses.Response:
event_type = request.headers.get("X-GitHub-Event")
event_id = request.headers.get("X-GitHub-Delivery")
data = await request.json()
try:
await github_events.filter_and_dispatch(
redis_cache, redis_stream, event_type, event_id, data
)
except github_events.IgnoredEvent as ie:
status_code = 200
reason = f"Event ignored: {ie.reason}"
else:
status_code = 202
reason = "Event queued"
if (
config.WEBHOOK_APP_FORWARD_URL
and config.WEBHOOK_FORWARD_EVENT_TYPES is not None
and event_type in config.WEBHOOK_FORWARD_EVENT_TYPES
):
raw = await request.body()
try:
async with http.AsyncClient(timeout=EVENT_FORWARD_TIMEOUT) as client:
await client.post(
config.WEBHOOK_APP_FORWARD_URL,
content=raw.decode(),
headers={
"X-GitHub-Event": event_type,
"X-GitHub-Delivery": event_id,
"X-Hub-Signature": request.headers.get("X-Hub-Signature"),
"User-Agent": request.headers.get("User-Agent"),
"Content-Type": request.headers.get("Content-Type"),
},
)
except httpx.TimeoutException:
LOG.warning(
"Fail to forward GitHub event",
event_type=event_type,
event_id=event_id,
sender=data["sender"]["login"],
)
return responses.Response(reason, status_code=status_code)
@app.get("/")
async def index(): # pragma: no cover
return responses.RedirectResponse(url="https://mergify.io/")
| 34.141243 | 84 | 0.663247 |
import collections
import typing
import aredis
import daiquiri
from datadog import statsd
import fastapi
import httpx
from starlette import requests
from starlette import responses
import voluptuous
from mergify_engine import config
from mergify_engine import github_events
from mergify_engine import github_types
from mergify_engine import json
from mergify_engine import subscription
from mergify_engine import utils
from mergify_engine.clients import github
from mergify_engine.clients import http
from mergify_engine.queue import merge_train
from mergify_engine.web import auth
from mergify_engine.web import badges
from mergify_engine.web import config_validator
from mergify_engine.web import redis
from mergify_engine.web import simulator
LOG = daiquiri.getLogger(__name__)
app = fastapi.FastAPI()
app.mount("/simulator", simulator.app)
app.mount("/validate", config_validator.app)
app.mount("/badges", badges.app)
# forward an event in 5 seconds, just drop it.
EVENT_FORWARD_TIMEOUT = 5
@app.on_event("startup")
async def startup() -> None:
await redis.startup()
@app.on_event("shutdown")
async def shutdown() -> None:
await redis.shutdown()
@app.exception_handler(aredis.exceptions.ConnectionError)
async def redis_errors(
request: requests.Request, exc: aredis.exceptions.ConnectionError
) -> responses.JSONResponse:
statsd.increment("redis.client.connection.errors")
LOG.warning("FastAPI lost Redis connection", exc_info=exc)
return responses.JSONResponse(status_code=503)
@app.get("/installation") # noqa: FS003
async def installation() -> responses.Response:
return responses.Response(
"Your mergify installation succeed, the installer have been disabled.",
status_code=200,
)
@app.post(
"/refresh/{owner}/{repo_name}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def refresh_repo(
owner: github_types.GitHubLogin,
repo_name: github_types.GitHubRepositoryName,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
redis_stream: utils.RedisStream = fastapi.Depends( # noqa: B008
redis.get_redis_stream
),
) -> responses.Response:
async with github.aget_client(owner_name=owner) as client:
try:
repository = await client.item(f"/repos/{owner}/{repo_name}")
except http.HTTPNotFound:
return responses.JSONResponse(
status_code=404, content="repository not found"
)
await github_events.send_refresh(redis_cache, redis_stream, repository)
return responses.Response("Refresh queued", status_code=202)
RefreshActionSchema = voluptuous.Schema(voluptuous.Any("user", "admin", "internal"))
@app.post(
"/refresh/{owner}/{repo_name}/pull/{pull_request_number}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def refresh_pull(
owner: github_types.GitHubLogin,
repo_name: github_types.GitHubRepositoryName,
pull_request_number: github_types.GitHubPullRequestNumber,
action: github_types.GitHubEventRefreshActionType = "user",
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
redis_stream: utils.RedisStream = fastapi.Depends( # noqa: B008
redis.get_redis_stream
),
) -> responses.Response:
action = RefreshActionSchema(action)
async with github.aget_client(owner_name=owner) as client:
try:
repository = await client.item(f"/repos/{owner}/{repo_name}")
except http.HTTPNotFound:
return responses.JSONResponse(
status_code=404, content="repository not found"
)
await github_events.send_refresh(
redis_cache,
redis_stream,
repository,
pull_request_number=pull_request_number,
action=action,
)
return responses.Response("Refresh queued", status_code=202)
@app.post(
"/refresh/{owner}/{repo_name}/branch/{branch}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def refresh_branch(
owner: github_types.GitHubLogin,
repo_name: github_types.GitHubRepositoryName,
branch: str,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
redis_stream: utils.RedisStream = fastapi.Depends( # noqa: B008
redis.get_redis_stream
),
) -> responses.Response:
async with github.aget_client(owner_name=owner) as client:
try:
repository = await client.item(f"/repos/{owner}/{repo_name}")
except http.HTTPNotFound:
return responses.JSONResponse(
status_code=404, content="repository not found"
)
await github_events.send_refresh(
redis_cache,
redis_stream,
repository,
ref=github_types.GitHubRefType(f"refs/heads/{branch}"),
)
return responses.Response("Refresh queued", status_code=202)
@app.put(
"/subscription-cache/{owner_id}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def subscription_cache_update(
owner_id: github_types.GitHubAccountIdType,
request: requests.Request,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
) -> responses.Response:
sub = await request.json()
if sub is None:
return responses.Response("Empty content", status_code=400)
await subscription.Subscription.from_dict(
redis_cache, int(owner_id), sub
).save_subscription_to_cache()
return responses.Response("Cache updated", status_code=200)
@app.delete(
"/subscription-cache/{owner_id}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def subscription_cache_delete(
owner_id: github_types.GitHubAccountIdType,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
) -> responses.Response:
await subscription.Subscription.delete(redis_cache, owner_id)
return responses.Response("Cache cleaned", status_code=200)
@app.post("/marketplace", dependencies=[fastapi.Depends(auth.signature)])
async def marketplace_handler(
request: requests.Request,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
) -> responses.Response:
event_type = request.headers.get("X-GitHub-Event")
event_id = request.headers.get("X-GitHub-Delivery")
data = await request.json()
LOG.info(
"Marketplace event",
event_type=event_type,
event_id=event_id,
sender=data["sender"]["login"],
gh_owner=data["marketplace_purchase"]["account"]["login"],
)
await subscription.Subscription.delete(
redis_cache, data["marketplace_purchase"]["account"]["id"]
)
if config.WEBHOOK_MARKETPLACE_FORWARD_URL:
raw = await request.body()
try:
async with http.AsyncClient(timeout=EVENT_FORWARD_TIMEOUT) as client:
await client.post(
config.WEBHOOK_MARKETPLACE_FORWARD_URL,
content=raw.decode(),
headers={
"X-GitHub-Event": event_type,
"X-GitHub-Delivery": event_id,
"X-Hub-Signature": request.headers.get("X-Hub-Signature"),
"User-Agent": request.headers.get("User-Agent"),
"Content-Type": request.headers.get("Content-Type"),
},
)
except httpx.TimeoutException:
LOG.warning(
"Fail to forward Marketplace event",
event_type=event_type,
event_id=event_id,
sender=data["sender"]["login"],
gh_owner=data["marketplace_purchase"]["account"]["login"],
)
return responses.Response("Event queued", status_code=202)
@app.get(
"/queues/{owner_id}", # noqa: FS003
dependencies=[fastapi.Depends(auth.signature)],
)
async def queues(
owner_id: github_types.GitHubAccountIdType,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
) -> responses.Response:
queues: typing.Dict[
str, typing.Dict[str, typing.List[int]]
] = collections.defaultdict(dict)
async for queue in redis_cache.scan_iter(
match=f"merge-*~{owner_id}~*", count=10000
):
queue_type, _, repo_id, branch = queue.split("~")
if queue_type == "merge-queue":
queues[repo_id][branch] = [
int(pull) async for pull, _ in redis_cache.zscan_iter(queue)
]
elif queue_type == "merge-train":
train_raw = await redis_cache.get(queue)
train = typing.cast(merge_train.Train.Serialized, json.loads(train_raw))
_, _, repo_id, branch = queue.split("~")
queues[repo_id][branch] = [
int(c["user_pull_request_number"]) for c in train["cars"]
] + [int(wp[0]) for wp in train["waiting_pulls"]]
return responses.JSONResponse(status_code=200, content=queues)
@app.post("/event", dependencies=[fastapi.Depends(auth.signature)])
async def event_handler(
request: requests.Request,
redis_cache: utils.RedisCache = fastapi.Depends( # noqa: B008
redis.get_redis_cache
),
redis_stream: utils.RedisStream = fastapi.Depends( # noqa: B008
redis.get_redis_stream
),
) -> responses.Response:
event_type = request.headers.get("X-GitHub-Event")
event_id = request.headers.get("X-GitHub-Delivery")
data = await request.json()
try:
await github_events.filter_and_dispatch(
redis_cache, redis_stream, event_type, event_id, data
)
except github_events.IgnoredEvent as ie:
status_code = 200
reason = f"Event ignored: {ie.reason}"
else:
status_code = 202
reason = "Event queued"
if (
config.WEBHOOK_APP_FORWARD_URL
and config.WEBHOOK_FORWARD_EVENT_TYPES is not None
and event_type in config.WEBHOOK_FORWARD_EVENT_TYPES
):
raw = await request.body()
try:
async with http.AsyncClient(timeout=EVENT_FORWARD_TIMEOUT) as client:
await client.post(
config.WEBHOOK_APP_FORWARD_URL,
content=raw.decode(),
headers={
"X-GitHub-Event": event_type,
"X-GitHub-Delivery": event_id,
"X-Hub-Signature": request.headers.get("X-Hub-Signature"),
"User-Agent": request.headers.get("User-Agent"),
"Content-Type": request.headers.get("Content-Type"),
},
)
except httpx.TimeoutException:
LOG.warning(
"Fail to forward GitHub event",
event_type=event_type,
event_id=event_id,
sender=data["sender"]["login"],
)
return responses.Response(reason, status_code=status_code)
@app.get("/")
async def index(): # pragma: no cover
return responses.RedirectResponse(url="https://mergify.io/")
| true | true |
f72734f8171a2b98bdc2a9bd97576b05bb2e2d82 | 2,808 | py | Python | lib/googlecloudsdk/dns/dnstools/managed_zone/list.py | IsaacHuang/google-cloud-sdk | 52afa5d1a75dff08f4f5380c5cccc015bf796ca5 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/dns/dnstools/managed_zone/list.py | IsaacHuang/google-cloud-sdk | 52afa5d1a75dff08f4f5380c5cccc015bf796ca5 | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/dns/dnstools/managed_zone/list.py | IsaacHuang/google-cloud-sdk | 52afa5d1a75dff08f4f5380c5cccc015bf796ca5 | [
"Apache-2.0"
] | 2 | 2020-07-25T05:03:06.000Z | 2020-11-04T04:55:57.000Z | # Copyright 2013 Google Inc. All Rights Reserved.
"""'dns managed-zone list' command."""
from apiclient import errors
from googlecloudsdk.calliope import base
from googlecloudsdk.calliope import exceptions
from googlecloudsdk.core import properties
from googlecloudsdk.dns.lib import util
class List(base.Command):
"""List Cloud DNS managed zones."""
DEFAULT_MAX_RESULTS = 0
DEFAULT_PAGE_SIZE = 1000
@staticmethod
def Args(parser):
"""Args is called by calliope to gather arguments for this command.
Args:
parser: An argparse parser that you can use to add arguments that go
on the command line after this command. Positional arguments are
allowed.
"""
parser.add_argument(
'--max_results', required=False, help='If greater than zero, limit the '
'number of changes returned to <max_results>. '
'Default: %d' % List.DEFAULT_MAX_RESULTS)
def Run(self, args):
"""Run 'dns managed-zone list'.
Args:
args: argparse.Namespace, The arguments that this command was invoked
with.
Returns:
A list of dict objects representing the zone resource obtained by the
list operation if the list was successful.
"""
dns = self.context['dns']
project = properties.VALUES.core.project.Get(required=True)
max_results = List.DEFAULT_MAX_RESULTS
if args.max_results is not None:
max_results = int(args.max_results)
if max_results > 0:
page_size = min(max_results, List.DEFAULT_PAGE_SIZE)
else:
page_size = List.DEFAULT_PAGE_SIZE
request = dns.managedZones().list(project=project, maxResults=page_size)
try:
result_list = []
result = request.execute()
result_list.extend(result['managedZones'])
while ((max_results <= 0 or len(result_list) < max_results) and
'nextPageToken' in result and result['nextPageToken'] is not None):
if max_results > 0:
page_size = min(
max_results - len(result_list), List.DEFAULT_PAGE_SIZE)
request = dns.managedZones().list(project=project,
maxResults=page_size,
pageToken=result['nextPageToken'])
result = request.execute()
result_list.extend(result['managedZones'])
return result_list
except errors.HttpError as error:
raise exceptions.HttpException(util.GetError(error, verbose=True))
except errors.Error as error:
raise exceptions.ToolException(error)
def Display(self, unused_args, result):
"""Display prints information about what just happened to stdout.
Args:
unused_args: The same as the args in Run.
result: The results of the Run() method.
"""
util.PrettyPrint(result)
| 33.035294 | 80 | 0.668803 |
from apiclient import errors
from googlecloudsdk.calliope import base
from googlecloudsdk.calliope import exceptions
from googlecloudsdk.core import properties
from googlecloudsdk.dns.lib import util
class List(base.Command):
DEFAULT_MAX_RESULTS = 0
DEFAULT_PAGE_SIZE = 1000
@staticmethod
def Args(parser):
parser.add_argument(
'--max_results', required=False, help='If greater than zero, limit the '
'number of changes returned to <max_results>. '
'Default: %d' % List.DEFAULT_MAX_RESULTS)
def Run(self, args):
dns = self.context['dns']
project = properties.VALUES.core.project.Get(required=True)
max_results = List.DEFAULT_MAX_RESULTS
if args.max_results is not None:
max_results = int(args.max_results)
if max_results > 0:
page_size = min(max_results, List.DEFAULT_PAGE_SIZE)
else:
page_size = List.DEFAULT_PAGE_SIZE
request = dns.managedZones().list(project=project, maxResults=page_size)
try:
result_list = []
result = request.execute()
result_list.extend(result['managedZones'])
while ((max_results <= 0 or len(result_list) < max_results) and
'nextPageToken' in result and result['nextPageToken'] is not None):
if max_results > 0:
page_size = min(
max_results - len(result_list), List.DEFAULT_PAGE_SIZE)
request = dns.managedZones().list(project=project,
maxResults=page_size,
pageToken=result['nextPageToken'])
result = request.execute()
result_list.extend(result['managedZones'])
return result_list
except errors.HttpError as error:
raise exceptions.HttpException(util.GetError(error, verbose=True))
except errors.Error as error:
raise exceptions.ToolException(error)
def Display(self, unused_args, result):
util.PrettyPrint(result)
| true | true |
f727357192760291f5ec1451349246fa4f2c9de9 | 1,168 | py | Python | flask_blog/users/utils.py | dungnv2602/flask_blog_showcase | 9508518f30923363b20045640219db5722a7416e | [
"MIT"
] | null | null | null | flask_blog/users/utils.py | dungnv2602/flask_blog_showcase | 9508518f30923363b20045640219db5722a7416e | [
"MIT"
] | 2 | 2021-06-08T19:37:11.000Z | 2022-03-11T23:40:45.000Z | flask_blog/users/utils.py | dungnv2602/flask_blog_showcase | 9508518f30923363b20045640219db5722a7416e | [
"MIT"
] | null | null | null | import os
import secrets
from PIL import Image
from flask_blog import mail
from flask_mail import Message
from flask import current_app, url_for
def save_picture(form_picture):
random_hex = secrets.token_hex(8)
_, f_ext = os.path.splitext(form_picture.filename)
picture_fn = random_hex + f_ext
picture_path = os.path.join(
current_app.root_path, 'static/profile_pics', picture_fn)
output_size = (125, 125)
i = Image.open(form_picture)
i.thumbnail(output_size)
i.save(picture_path)
return picture_fn
def send_reset_email(user):
token = user.get_reset_token()
msg = Message('Password Reset Request',
sender='noreply@demo.com',
recipients=[user.email])
token = user.get_reset_token()
msg = Message('Password Reset Request', recipients=[user.email])
# _external – if set to True, an absolute URL is generated
msg.body = f'''To reset your password, visit the following link:
{url_for('users.reset_token', token=token, _external=True)}
If you did not make this request then simply ignore this email and no changes will be made.
'''
mail.send(msg)
| 30.736842 | 95 | 0.69863 | import os
import secrets
from PIL import Image
from flask_blog import mail
from flask_mail import Message
from flask import current_app, url_for
def save_picture(form_picture):
random_hex = secrets.token_hex(8)
_, f_ext = os.path.splitext(form_picture.filename)
picture_fn = random_hex + f_ext
picture_path = os.path.join(
current_app.root_path, 'static/profile_pics', picture_fn)
output_size = (125, 125)
i = Image.open(form_picture)
i.thumbnail(output_size)
i.save(picture_path)
return picture_fn
def send_reset_email(user):
token = user.get_reset_token()
msg = Message('Password Reset Request',
sender='noreply@demo.com',
recipients=[user.email])
token = user.get_reset_token()
msg = Message('Password Reset Request', recipients=[user.email])
msg.body = f'''To reset your password, visit the following link:
{url_for('users.reset_token', token=token, _external=True)}
If you did not make this request then simply ignore this email and no changes will be made.
'''
mail.send(msg)
| true | true |
f72735920d716a47d9d08cd21dfcce0ddb872b79 | 18,672 | py | Python | conans/test/unittests/client/build/cpp_std_flags_test.py | ninjayash/conan | 00fbc925fde93a148abfbcebf236c6b4f2da0572 | [
"MIT"
] | null | null | null | conans/test/unittests/client/build/cpp_std_flags_test.py | ninjayash/conan | 00fbc925fde93a148abfbcebf236c6b4f2da0572 | [
"MIT"
] | null | null | null | conans/test/unittests/client/build/cpp_std_flags_test.py | ninjayash/conan | 00fbc925fde93a148abfbcebf236c6b4f2da0572 | [
"MIT"
] | null | null | null | import unittest
from conans.client.build.cppstd_flags import cppstd_default
from conans.test.utils.mocks import MockSettings
from conans.tools import cppstd_flag
def _make_cppstd_flag(compiler, compiler_version, cppstd=None, compiler_base=None):
settings = MockSettings({"compiler": compiler,
"compiler.version": compiler_version,
"compiler.cppstd": cppstd})
if compiler_base:
settings.values["compiler.base"] = compiler_base
return cppstd_flag(settings)
def _make_cppstd_default(compiler, compiler_version, compiler_base=None):
settings = MockSettings({"compiler": compiler,
"compiler.version": compiler_version})
if compiler_base:
settings.values["compiler.base"] = compiler_base
return cppstd_default(settings)
class CompilerFlagsTest(unittest.TestCase):
def test_gcc_cppstd_flags(self):
self.assertEqual(_make_cppstd_flag("gcc", "4.2", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("gcc", "4.2", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("gcc", "4.2", "11"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.2", "14"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.3", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("gcc", "4.3", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("gcc", "4.3", "11"), "-std=c++0x")
self.assertEqual(_make_cppstd_flag("gcc", "4.3", "14"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.6", "11"), '-std=c++0x')
self.assertEqual(_make_cppstd_flag("gcc", "4.6", "14"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.7", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "4.7", "14"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.8", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "4.8", "14"), '-std=c++1y')
self.assertEqual(_make_cppstd_flag("gcc", "4.8", "17"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.9", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "4.9", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("gcc", "4.9", "17"), None)
self.assertEqual(_make_cppstd_flag("gcc", "5", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "5", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("gcc", "5", "gnu14"), '-std=gnu++14')
self.assertEqual(_make_cppstd_flag("gcc", "5", "17"), None)
self.assertEqual(_make_cppstd_flag("gcc", "5.1", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "5.1", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("gcc", "5.1", "17"), '-std=c++1z')
self.assertEqual(_make_cppstd_flag("gcc", "7", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "7", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("gcc", "7", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("gcc", "8", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "8", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("gcc", "8", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("gcc", "8", "20"), '-std=c++2a')
def test_gcc_cppstd_defaults(self):
self.assertEqual(_make_cppstd_default("gcc", "4"), "gnu98")
self.assertEqual(_make_cppstd_default("gcc", "5"), "gnu98")
self.assertEqual(_make_cppstd_default("gcc", "6"), "gnu14")
self.assertEqual(_make_cppstd_default("gcc", "6.1"), "gnu14")
self.assertEqual(_make_cppstd_default("gcc", "7.3"), "gnu14")
self.assertEqual(_make_cppstd_default("gcc", "8.1"), "gnu14")
def test_clang_cppstd_flags(self):
self.assertEqual(_make_cppstd_flag("clang", "2.0", "98"), None)
self.assertEqual(_make_cppstd_flag("clang", "2.0", "gnu98"), None)
self.assertEqual(_make_cppstd_flag("clang", "2.0", "11"), None)
self.assertEqual(_make_cppstd_flag("clang", "2.0", "14"), None)
self.assertEqual(_make_cppstd_flag("clang", "2.1", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("clang", "2.1", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("clang", "2.1", "11"), "-std=c++0x")
self.assertEqual(_make_cppstd_flag("clang", "2.1", "14"), None)
self.assertEqual(_make_cppstd_flag("clang", "3.0", "11"), '-std=c++0x')
self.assertEqual(_make_cppstd_flag("clang", "3.0", "14"), None)
self.assertEqual(_make_cppstd_flag("clang", "3.1", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "3.1", "14"), None)
self.assertEqual(_make_cppstd_flag("clang", "3.4", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "3.4", "14"), '-std=c++1y')
self.assertEqual(_make_cppstd_flag("clang", "3.4", "17"), None)
self.assertEqual(_make_cppstd_flag("clang", "3.5", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "3.5", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "3.5", "17"), '-std=c++1z')
self.assertEqual(_make_cppstd_flag("clang", "5", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "5", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "5", "gnu14"), '-std=gnu++14')
self.assertEqual(_make_cppstd_flag("clang", "5", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("clang", "5.1", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "5.1", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "5.1", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("clang", "6", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "6", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "6", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("clang", "6", "20"), '-std=c++2a')
self.assertEqual(_make_cppstd_flag("clang", "7", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "7", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "7", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("clang", "7", "20"), '-std=c++2a')
self.assertEqual(_make_cppstd_flag("clang", "8", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "8", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "8", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("clang", "8", "20"), '-std=c++2a')
def test_clang_cppstd_defaults(self):
self.assertEqual(_make_cppstd_default("clang", "2"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "2.1"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "3.0"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "3.1"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "3.4"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "3.5"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "5"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "5.1"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "6"), "gnu14")
self.assertEqual(_make_cppstd_default("clang", "7"), "gnu14")
def test_apple_clang_cppstd_flags(self):
self.assertEqual(_make_cppstd_flag("apple-clang", "3.9", "98"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "3.9", "gnu98"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "3.9", "11"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "3.9", "14"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "4.0", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "4.0", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "4.0", "11"), "-std=c++11")
self.assertEqual(_make_cppstd_flag("apple-clang", "4.0", "14"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "5.0", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.0", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.0", "11"), "-std=c++11")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.0", "14"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "5.1", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.1", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.1", "11"), "-std=c++11")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.1", "14"), "-std=c++1y")
self.assertEqual(_make_cppstd_flag("apple-clang", "6.1", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("apple-clang", "6.1", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("apple-clang", "6.1", "17"), "-std=c++1z")
self.assertEqual(_make_cppstd_flag("apple-clang", "7", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("apple-clang", "7", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("apple-clang", "7", "17"), "-std=c++1z")
self.assertEqual(_make_cppstd_flag("apple-clang", "8", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("apple-clang", "8", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("apple-clang", "8", "17"), "-std=c++1z")
self.assertEqual(_make_cppstd_flag("apple-clang", "9", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("apple-clang", "9", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("apple-clang", "9", "17"), "-std=c++1z")
self.assertEqual(_make_cppstd_flag("apple-clang", "9.1", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("apple-clang", "9.1", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("apple-clang", "9.1", "17"), "-std=c++17")
self.assertEqual(_make_cppstd_flag("apple-clang", "9.1", "20"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "10.0", "17"), "-std=c++17")
self.assertEqual(_make_cppstd_flag("apple-clang", "10.0", "20"), "-std=c++2a")
self.assertEqual(_make_cppstd_flag("apple-clang", "11.0", "17"), "-std=c++17")
self.assertEqual(_make_cppstd_flag("apple-clang", "11.0", "20"), "-std=c++2a")
self.assertEqual(_make_cppstd_flag("apple-clang", "12.0", "17"), "-std=c++17")
self.assertEqual(_make_cppstd_flag("apple-clang", "12.0", "20"), "-std=c++2a")
def test_apple_clang_cppstd_defaults(self):
self.assertEqual(_make_cppstd_default("apple-clang", "2"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "3"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "4"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "5"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "6"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "7"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "8"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "9"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "10"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "11"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "12"), "gnu98")
def test_visual_cppstd_flags(self):
self.assertEqual(_make_cppstd_flag("Visual Studio", "12", "11"), None)
self.assertEqual(_make_cppstd_flag("Visual Studio", "12", "14"), None)
self.assertEqual(_make_cppstd_flag("Visual Studio", "12", "17"), None)
self.assertEqual(_make_cppstd_flag("Visual Studio", "14", "11"), None)
self.assertEqual(_make_cppstd_flag("Visual Studio", "14", "14"), '/std:c++14')
self.assertEqual(_make_cppstd_flag("Visual Studio", "14", "17"), '/std:c++latest')
self.assertEqual(_make_cppstd_flag("Visual Studio", "17", "11"), None)
self.assertEqual(_make_cppstd_flag("Visual Studio", "17", "14"), '/std:c++14')
self.assertEqual(_make_cppstd_flag("Visual Studio", "17", "17"), '/std:c++17')
self.assertEqual(_make_cppstd_flag("Visual Studio", "17", "20"), '/std:c++latest')
def test_visual_cppstd_defaults(self):
self.assertEqual(_make_cppstd_default("Visual Studio", "11"), None)
self.assertEqual(_make_cppstd_default("Visual Studio", "12"), None)
self.assertEqual(_make_cppstd_default("Visual Studio", "13"), None)
self.assertEqual(_make_cppstd_default("Visual Studio", "14"), "14")
self.assertEqual(_make_cppstd_default("Visual Studio", "15"), "14")
def test_intel_visual_cppstd_defaults(self):
self.assertEquals(_make_cppstd_default("intel", "19", "Visual Studio"), None)
def test_intel_gcc_cppstd_defaults(self):
self.assertEquals(_make_cppstd_default("intel", "19", "gcc"), 'gnu98')
def test_intel_visual_cppstd_flag(self):
self.assertEquals(_make_cppstd_flag("intel", "19.1", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "19.1", "11", "Visual Studio"), '/Qstd=c++11')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "14", "Visual Studio"), '/Qstd=c++14')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "17", "Visual Studio"), '/Qstd=c++17')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "20", "Visual Studio"), '/Qstd=c++20')
self.assertEquals(_make_cppstd_flag("intel", "19", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "19", "11", "Visual Studio"), '/Qstd=c++11')
self.assertEquals(_make_cppstd_flag("intel", "19", "14", "Visual Studio"), '/Qstd=c++14')
self.assertEquals(_make_cppstd_flag("intel", "19", "17", "Visual Studio"), '/Qstd=c++17')
self.assertEquals(_make_cppstd_flag("intel", "19", "20", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "17", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "17", "11", "Visual Studio"), '/Qstd=c++11')
self.assertEquals(_make_cppstd_flag("intel", "17", "14", "Visual Studio"), '/Qstd=c++14')
self.assertEquals(_make_cppstd_flag("intel", "17", "17", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "17", "20", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "11", "Visual Studio"), '/Qstd=c++11')
self.assertEquals(_make_cppstd_flag("intel", "15", "14", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "17", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "20", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "11", "Visual Studio"), '/Qstd=c++0x')
self.assertEquals(_make_cppstd_flag("intel", "12", "14", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "17", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "20", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "11", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "14", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "17", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "20", "Visual Studio"), None)
def test_intel_gcc_cppstd_flag(self):
self.assertEquals(_make_cppstd_flag("intel", "19.1", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "11", "gcc"), '-std=c++11')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "14", "gcc"), '-std=c++14')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "17", "gcc"), '-std=c++17')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "20", "gcc"), '-std=c++20')
self.assertEquals(_make_cppstd_flag("intel", "19", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "19", "11", "gcc"), '-std=c++11')
self.assertEquals(_make_cppstd_flag("intel", "19", "14", "gcc"), '-std=c++14')
self.assertEquals(_make_cppstd_flag("intel", "19", "17", "gcc"), '-std=c++17')
self.assertEquals(_make_cppstd_flag("intel", "19", "20", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "17", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "17", "11", "gcc"), '-std=c++11')
self.assertEquals(_make_cppstd_flag("intel", "17", "14", "gcc"), '-std=c++14')
self.assertEquals(_make_cppstd_flag("intel", "17", "17", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "17", "20", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "15", "11", "gcc"), '-std=c++11')
self.assertEquals(_make_cppstd_flag("intel", "15", "14", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "17", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "20", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "12", "11", "gcc"), '-std=c++0x')
self.assertEquals(_make_cppstd_flag("intel", "12", "14", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "17", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "20", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "11", "11", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "14", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "17", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "20", "gcc"), None)
| 61.827815 | 99 | 0.626767 | import unittest
from conans.client.build.cppstd_flags import cppstd_default
from conans.test.utils.mocks import MockSettings
from conans.tools import cppstd_flag
def _make_cppstd_flag(compiler, compiler_version, cppstd=None, compiler_base=None):
settings = MockSettings({"compiler": compiler,
"compiler.version": compiler_version,
"compiler.cppstd": cppstd})
if compiler_base:
settings.values["compiler.base"] = compiler_base
return cppstd_flag(settings)
def _make_cppstd_default(compiler, compiler_version, compiler_base=None):
settings = MockSettings({"compiler": compiler,
"compiler.version": compiler_version})
if compiler_base:
settings.values["compiler.base"] = compiler_base
return cppstd_default(settings)
class CompilerFlagsTest(unittest.TestCase):
def test_gcc_cppstd_flags(self):
self.assertEqual(_make_cppstd_flag("gcc", "4.2", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("gcc", "4.2", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("gcc", "4.2", "11"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.2", "14"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.3", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("gcc", "4.3", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("gcc", "4.3", "11"), "-std=c++0x")
self.assertEqual(_make_cppstd_flag("gcc", "4.3", "14"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.6", "11"), '-std=c++0x')
self.assertEqual(_make_cppstd_flag("gcc", "4.6", "14"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.7", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "4.7", "14"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.8", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "4.8", "14"), '-std=c++1y')
self.assertEqual(_make_cppstd_flag("gcc", "4.8", "17"), None)
self.assertEqual(_make_cppstd_flag("gcc", "4.9", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "4.9", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("gcc", "4.9", "17"), None)
self.assertEqual(_make_cppstd_flag("gcc", "5", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "5", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("gcc", "5", "gnu14"), '-std=gnu++14')
self.assertEqual(_make_cppstd_flag("gcc", "5", "17"), None)
self.assertEqual(_make_cppstd_flag("gcc", "5.1", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "5.1", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("gcc", "5.1", "17"), '-std=c++1z')
self.assertEqual(_make_cppstd_flag("gcc", "7", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "7", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("gcc", "7", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("gcc", "8", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("gcc", "8", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("gcc", "8", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("gcc", "8", "20"), '-std=c++2a')
def test_gcc_cppstd_defaults(self):
self.assertEqual(_make_cppstd_default("gcc", "4"), "gnu98")
self.assertEqual(_make_cppstd_default("gcc", "5"), "gnu98")
self.assertEqual(_make_cppstd_default("gcc", "6"), "gnu14")
self.assertEqual(_make_cppstd_default("gcc", "6.1"), "gnu14")
self.assertEqual(_make_cppstd_default("gcc", "7.3"), "gnu14")
self.assertEqual(_make_cppstd_default("gcc", "8.1"), "gnu14")
def test_clang_cppstd_flags(self):
self.assertEqual(_make_cppstd_flag("clang", "2.0", "98"), None)
self.assertEqual(_make_cppstd_flag("clang", "2.0", "gnu98"), None)
self.assertEqual(_make_cppstd_flag("clang", "2.0", "11"), None)
self.assertEqual(_make_cppstd_flag("clang", "2.0", "14"), None)
self.assertEqual(_make_cppstd_flag("clang", "2.1", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("clang", "2.1", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("clang", "2.1", "11"), "-std=c++0x")
self.assertEqual(_make_cppstd_flag("clang", "2.1", "14"), None)
self.assertEqual(_make_cppstd_flag("clang", "3.0", "11"), '-std=c++0x')
self.assertEqual(_make_cppstd_flag("clang", "3.0", "14"), None)
self.assertEqual(_make_cppstd_flag("clang", "3.1", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "3.1", "14"), None)
self.assertEqual(_make_cppstd_flag("clang", "3.4", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "3.4", "14"), '-std=c++1y')
self.assertEqual(_make_cppstd_flag("clang", "3.4", "17"), None)
self.assertEqual(_make_cppstd_flag("clang", "3.5", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "3.5", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "3.5", "17"), '-std=c++1z')
self.assertEqual(_make_cppstd_flag("clang", "5", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "5", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "5", "gnu14"), '-std=gnu++14')
self.assertEqual(_make_cppstd_flag("clang", "5", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("clang", "5.1", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "5.1", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "5.1", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("clang", "6", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "6", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "6", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("clang", "6", "20"), '-std=c++2a')
self.assertEqual(_make_cppstd_flag("clang", "7", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "7", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "7", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("clang", "7", "20"), '-std=c++2a')
self.assertEqual(_make_cppstd_flag("clang", "8", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("clang", "8", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("clang", "8", "17"), '-std=c++17')
self.assertEqual(_make_cppstd_flag("clang", "8", "20"), '-std=c++2a')
def test_clang_cppstd_defaults(self):
self.assertEqual(_make_cppstd_default("clang", "2"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "2.1"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "3.0"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "3.1"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "3.4"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "3.5"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "5"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "5.1"), "gnu98")
self.assertEqual(_make_cppstd_default("clang", "6"), "gnu14")
self.assertEqual(_make_cppstd_default("clang", "7"), "gnu14")
def test_apple_clang_cppstd_flags(self):
self.assertEqual(_make_cppstd_flag("apple-clang", "3.9", "98"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "3.9", "gnu98"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "3.9", "11"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "3.9", "14"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "4.0", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "4.0", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "4.0", "11"), "-std=c++11")
self.assertEqual(_make_cppstd_flag("apple-clang", "4.0", "14"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "5.0", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.0", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.0", "11"), "-std=c++11")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.0", "14"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "5.1", "98"), "-std=c++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.1", "gnu98"), "-std=gnu++98")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.1", "11"), "-std=c++11")
self.assertEqual(_make_cppstd_flag("apple-clang", "5.1", "14"), "-std=c++1y")
self.assertEqual(_make_cppstd_flag("apple-clang", "6.1", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("apple-clang", "6.1", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("apple-clang", "6.1", "17"), "-std=c++1z")
self.assertEqual(_make_cppstd_flag("apple-clang", "7", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("apple-clang", "7", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("apple-clang", "7", "17"), "-std=c++1z")
self.assertEqual(_make_cppstd_flag("apple-clang", "8", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("apple-clang", "8", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("apple-clang", "8", "17"), "-std=c++1z")
self.assertEqual(_make_cppstd_flag("apple-clang", "9", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("apple-clang", "9", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("apple-clang", "9", "17"), "-std=c++1z")
self.assertEqual(_make_cppstd_flag("apple-clang", "9.1", "11"), '-std=c++11')
self.assertEqual(_make_cppstd_flag("apple-clang", "9.1", "14"), '-std=c++14')
self.assertEqual(_make_cppstd_flag("apple-clang", "9.1", "17"), "-std=c++17")
self.assertEqual(_make_cppstd_flag("apple-clang", "9.1", "20"), None)
self.assertEqual(_make_cppstd_flag("apple-clang", "10.0", "17"), "-std=c++17")
self.assertEqual(_make_cppstd_flag("apple-clang", "10.0", "20"), "-std=c++2a")
self.assertEqual(_make_cppstd_flag("apple-clang", "11.0", "17"), "-std=c++17")
self.assertEqual(_make_cppstd_flag("apple-clang", "11.0", "20"), "-std=c++2a")
self.assertEqual(_make_cppstd_flag("apple-clang", "12.0", "17"), "-std=c++17")
self.assertEqual(_make_cppstd_flag("apple-clang", "12.0", "20"), "-std=c++2a")
def test_apple_clang_cppstd_defaults(self):
self.assertEqual(_make_cppstd_default("apple-clang", "2"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "3"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "4"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "5"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "6"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "7"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "8"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "9"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "10"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "11"), "gnu98")
self.assertEqual(_make_cppstd_default("apple-clang", "12"), "gnu98")
def test_visual_cppstd_flags(self):
self.assertEqual(_make_cppstd_flag("Visual Studio", "12", "11"), None)
self.assertEqual(_make_cppstd_flag("Visual Studio", "12", "14"), None)
self.assertEqual(_make_cppstd_flag("Visual Studio", "12", "17"), None)
self.assertEqual(_make_cppstd_flag("Visual Studio", "14", "11"), None)
self.assertEqual(_make_cppstd_flag("Visual Studio", "14", "14"), '/std:c++14')
self.assertEqual(_make_cppstd_flag("Visual Studio", "14", "17"), '/std:c++latest')
self.assertEqual(_make_cppstd_flag("Visual Studio", "17", "11"), None)
self.assertEqual(_make_cppstd_flag("Visual Studio", "17", "14"), '/std:c++14')
self.assertEqual(_make_cppstd_flag("Visual Studio", "17", "17"), '/std:c++17')
self.assertEqual(_make_cppstd_flag("Visual Studio", "17", "20"), '/std:c++latest')
def test_visual_cppstd_defaults(self):
self.assertEqual(_make_cppstd_default("Visual Studio", "11"), None)
self.assertEqual(_make_cppstd_default("Visual Studio", "12"), None)
self.assertEqual(_make_cppstd_default("Visual Studio", "13"), None)
self.assertEqual(_make_cppstd_default("Visual Studio", "14"), "14")
self.assertEqual(_make_cppstd_default("Visual Studio", "15"), "14")
def test_intel_visual_cppstd_defaults(self):
self.assertEquals(_make_cppstd_default("intel", "19", "Visual Studio"), None)
def test_intel_gcc_cppstd_defaults(self):
self.assertEquals(_make_cppstd_default("intel", "19", "gcc"), 'gnu98')
def test_intel_visual_cppstd_flag(self):
self.assertEquals(_make_cppstd_flag("intel", "19.1", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "19.1", "11", "Visual Studio"), '/Qstd=c++11')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "14", "Visual Studio"), '/Qstd=c++14')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "17", "Visual Studio"), '/Qstd=c++17')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "20", "Visual Studio"), '/Qstd=c++20')
self.assertEquals(_make_cppstd_flag("intel", "19", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "19", "11", "Visual Studio"), '/Qstd=c++11')
self.assertEquals(_make_cppstd_flag("intel", "19", "14", "Visual Studio"), '/Qstd=c++14')
self.assertEquals(_make_cppstd_flag("intel", "19", "17", "Visual Studio"), '/Qstd=c++17')
self.assertEquals(_make_cppstd_flag("intel", "19", "20", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "17", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "17", "11", "Visual Studio"), '/Qstd=c++11')
self.assertEquals(_make_cppstd_flag("intel", "17", "14", "Visual Studio"), '/Qstd=c++14')
self.assertEquals(_make_cppstd_flag("intel", "17", "17", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "17", "20", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "11", "Visual Studio"), '/Qstd=c++11')
self.assertEquals(_make_cppstd_flag("intel", "15", "14", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "17", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "20", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "11", "Visual Studio"), '/Qstd=c++0x')
self.assertEquals(_make_cppstd_flag("intel", "12", "14", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "17", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "20", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "gnu98", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "11", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "14", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "17", "Visual Studio"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "20", "Visual Studio"), None)
def test_intel_gcc_cppstd_flag(self):
self.assertEquals(_make_cppstd_flag("intel", "19.1", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "11", "gcc"), '-std=c++11')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "14", "gcc"), '-std=c++14')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "17", "gcc"), '-std=c++17')
self.assertEquals(_make_cppstd_flag("intel", "19.1", "20", "gcc"), '-std=c++20')
self.assertEquals(_make_cppstd_flag("intel", "19", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "19", "11", "gcc"), '-std=c++11')
self.assertEquals(_make_cppstd_flag("intel", "19", "14", "gcc"), '-std=c++14')
self.assertEquals(_make_cppstd_flag("intel", "19", "17", "gcc"), '-std=c++17')
self.assertEquals(_make_cppstd_flag("intel", "19", "20", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "17", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "17", "11", "gcc"), '-std=c++11')
self.assertEquals(_make_cppstd_flag("intel", "17", "14", "gcc"), '-std=c++14')
self.assertEquals(_make_cppstd_flag("intel", "17", "17", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "17", "20", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "15", "11", "gcc"), '-std=c++11')
self.assertEquals(_make_cppstd_flag("intel", "15", "14", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "17", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "15", "20", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "12", "11", "gcc"), '-std=c++0x')
self.assertEquals(_make_cppstd_flag("intel", "12", "14", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "17", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "12", "20", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "gnu98", "gcc"), '-std=gnu++98')
self.assertEquals(_make_cppstd_flag("intel", "11", "11", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "14", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "17", "gcc"), None)
self.assertEquals(_make_cppstd_flag("intel", "11", "20", "gcc"), None)
| true | true |
f72735cd87fa6d88c743eda60cd6425d8578a594 | 1,671 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/data/region_UG.py | AMuratTuran/mkn | 557086426773ced10d82c969304bd349414a601e | [
"BSD-3-Clause"
] | 4 | 2018-10-19T04:36:20.000Z | 2020-02-13T16:14:09.000Z | oscar/lib/python2.7/site-packages/phonenumbers/data/region_UG.py | AMuratTuran/mkn | 557086426773ced10d82c969304bd349414a601e | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/region_UG.py | AMuratTuran/mkn | 557086426773ced10d82c969304bd349414a601e | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. UG metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_UG = PhoneMetadata(id='UG', country_code=256, international_prefix='00[057]',
general_desc=PhoneNumberDesc(national_number_pattern='\\d{9}', possible_length=(9,), possible_length_local_only=(5, 6, 7)),
fixed_line=PhoneNumberDesc(national_number_pattern='20(?:[0147]\\d{3}|2(?:40|[5-9]\\d)\\d|3(?:0[0-4]|[2367]\\d)\\d|5[0-4]\\d{2}|6(?:00[0-2]|30[0-4]|[5-9]\\d{2})|8[0-2]\\d{2})\\d{3}|[34]\\d{8}', example_number='312345678', possible_length=(9,), possible_length_local_only=(5, 6, 7)),
mobile=PhoneNumberDesc(national_number_pattern='7(?:0[0-7]\\d|[1578]\\d{2}|2(?:[03]\\d|60)|30\\d|4[0-4]\\d|9(?:[0-6]\\d|74))\\d{5}', example_number='712345678', possible_length=(9,)),
toll_free=PhoneNumberDesc(national_number_pattern='800[123]\\d{5}', example_number='800123456', possible_length=(9,)),
premium_rate=PhoneNumberDesc(national_number_pattern='90[123]\\d{6}', example_number='901123456', possible_length=(9,)),
national_prefix='0',
national_prefix_for_parsing='0',
number_format=[NumberFormat(pattern='(\\d{3})(\\d{6})', format='\\1 \\2', leading_digits_pattern=['20[0-8]|4(?:6[45]|[7-9])|[7-9]', '20(?:[013-8]|2[5-9])|4(?:6[45]|[7-9])|[7-9]'], national_prefix_formatting_rule='0\\1'),
NumberFormat(pattern='(\\d{2})(\\d{7})', format='\\1 \\2', leading_digits_pattern=['3|4(?:[1-5]|6[0-36-9])'], national_prefix_formatting_rule='0\\1'),
NumberFormat(pattern='(2024)(\\d{5})', format='\\1 \\2', leading_digits_pattern=['202', '2024'], national_prefix_formatting_rule='0\\1')])
| 111.4 | 286 | 0.666068 | from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_UG = PhoneMetadata(id='UG', country_code=256, international_prefix='00[057]',
general_desc=PhoneNumberDesc(national_number_pattern='\\d{9}', possible_length=(9,), possible_length_local_only=(5, 6, 7)),
fixed_line=PhoneNumberDesc(national_number_pattern='20(?:[0147]\\d{3}|2(?:40|[5-9]\\d)\\d|3(?:0[0-4]|[2367]\\d)\\d|5[0-4]\\d{2}|6(?:00[0-2]|30[0-4]|[5-9]\\d{2})|8[0-2]\\d{2})\\d{3}|[34]\\d{8}', example_number='312345678', possible_length=(9,), possible_length_local_only=(5, 6, 7)),
mobile=PhoneNumberDesc(national_number_pattern='7(?:0[0-7]\\d|[1578]\\d{2}|2(?:[03]\\d|60)|30\\d|4[0-4]\\d|9(?:[0-6]\\d|74))\\d{5}', example_number='712345678', possible_length=(9,)),
toll_free=PhoneNumberDesc(national_number_pattern='800[123]\\d{5}', example_number='800123456', possible_length=(9,)),
premium_rate=PhoneNumberDesc(national_number_pattern='90[123]\\d{6}', example_number='901123456', possible_length=(9,)),
national_prefix='0',
national_prefix_for_parsing='0',
number_format=[NumberFormat(pattern='(\\d{3})(\\d{6})', format='\\1 \\2', leading_digits_pattern=['20[0-8]|4(?:6[45]|[7-9])|[7-9]', '20(?:[013-8]|2[5-9])|4(?:6[45]|[7-9])|[7-9]'], national_prefix_formatting_rule='0\\1'),
NumberFormat(pattern='(\\d{2})(\\d{7})', format='\\1 \\2', leading_digits_pattern=['3|4(?:[1-5]|6[0-36-9])'], national_prefix_formatting_rule='0\\1'),
NumberFormat(pattern='(2024)(\\d{5})', format='\\1 \\2', leading_digits_pattern=['202', '2024'], national_prefix_formatting_rule='0\\1')])
| true | true |
f72736523caea2797e8de3a4ae833839547bc926 | 2,559 | py | Python | patitasbackend/emailer/views.py | nahuelmol/patitas | 75815aa3b388a538f32395d93b1fa25d7fb6de1a | [
"MIT"
] | 1 | 2021-05-23T16:08:41.000Z | 2021-05-23T16:08:41.000Z | patitasbackend/emailer/views.py | nahuelmol/patitas | 75815aa3b388a538f32395d93b1fa25d7fb6de1a | [
"MIT"
] | null | null | null | patitasbackend/emailer/views.py | nahuelmol/patitas | 75815aa3b388a538f32395d93b1fa25d7fb6de1a | [
"MIT"
] | null | null | null | from django.shortcuts import render
import pickle
import os.path
import mimetypes
import base64
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.audio import MIMEAudio
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
SCOPES = ['https://mail.google.com/']
def get_service():
creds = None
PICKLE_PATH = os.getcwd() + '\\emailer\\token.pickle'
CREDS_PATH = os.getcwd() + '\\emailer\\credentials.json'
if os.path.exists(PICKLE_PATH):
with open(PICKLE_PATH, 'rb') as token:
creds = pickle.load(token)
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(CREDS_PATH, SCOPES)
creds = flow.run_local_server(port=0)
with open(PICKLE_PATH, 'wb') as token:
pickle.dump(creds, token)
service = build('gmail', 'v1', credentials=creds)
return service
def send_message(service,user_id,message):
try:
message = service.users().messages().send(userId=user_id,body=message).execute()
print('Message id')
return message
except Exception as e:
print('an error occured in views line 45:{}',e)
return None
def create_message_with_attachment(sender,to,subject,body):
message = MIMEMultipart()
msg_content_html = """
<!DOCTYPE html>
<html>
<head>
<title>My Title</title>
<link rel="stylesheet" type="text/css" href="https://bootswatch.com/5/superhero/bootstrap.min.css">
<style type="text/css">
span.bold {font-weight: bold;}
table.noborder {border: 0px; padding: 8px;}
th {text-align: left;}
</style>
</head>
<body>
<div class="container">
<p>
Click on the button below to verify your patitas account
</p>
<a href="http://localhost:8000/user/verify_user_by_email" type="button" class="btn btn-success">Verify</button>
</div>
</body>
</html>
"""
message['to'] = to
message['from'] = sender
message['subject'] = subject
html_part = MIMEText(msg_content_html, 'html')
message.attach(html_part)
raw_msg = base64.urlsafe_b64encode(message.as_string().encode('utf-8'))
return {'raw':raw_msg.decode('utf-8')} | 28.752809 | 119 | 0.66315 | from django.shortcuts import render
import pickle
import os.path
import mimetypes
import base64
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from email.mime.audio import MIMEAudio
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
SCOPES = ['https://mail.google.com/']
def get_service():
creds = None
PICKLE_PATH = os.getcwd() + '\\emailer\\token.pickle'
CREDS_PATH = os.getcwd() + '\\emailer\\credentials.json'
if os.path.exists(PICKLE_PATH):
with open(PICKLE_PATH, 'rb') as token:
creds = pickle.load(token)
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(CREDS_PATH, SCOPES)
creds = flow.run_local_server(port=0)
with open(PICKLE_PATH, 'wb') as token:
pickle.dump(creds, token)
service = build('gmail', 'v1', credentials=creds)
return service
def send_message(service,user_id,message):
try:
message = service.users().messages().send(userId=user_id,body=message).execute()
print('Message id')
return message
except Exception as e:
print('an error occured in views line 45:{}',e)
return None
def create_message_with_attachment(sender,to,subject,body):
message = MIMEMultipart()
msg_content_html = """
<!DOCTYPE html>
<html>
<head>
<title>My Title</title>
<link rel="stylesheet" type="text/css" href="https://bootswatch.com/5/superhero/bootstrap.min.css">
<style type="text/css">
span.bold {font-weight: bold;}
table.noborder {border: 0px; padding: 8px;}
th {text-align: left;}
</style>
</head>
<body>
<div class="container">
<p>
Click on the button below to verify your patitas account
</p>
<a href="http://localhost:8000/user/verify_user_by_email" type="button" class="btn btn-success">Verify</button>
</div>
</body>
</html>
"""
message['to'] = to
message['from'] = sender
message['subject'] = subject
html_part = MIMEText(msg_content_html, 'html')
message.attach(html_part)
raw_msg = base64.urlsafe_b64encode(message.as_string().encode('utf-8'))
return {'raw':raw_msg.decode('utf-8')} | true | true |
f727369391ddd48ef41823994e2d66ef082c42f9 | 33,146 | py | Python | lingvo/jax/eval.py | ruomingp/lingvo | ba59e8c46471be77d5d3c48177f0f0dd8d5d44e9 | [
"Apache-2.0"
] | null | null | null | lingvo/jax/eval.py | ruomingp/lingvo | ba59e8c46471be77d5d3c48177f0f0dd8d5d44e9 | [
"Apache-2.0"
] | null | null | null | lingvo/jax/eval.py | ruomingp/lingvo | ba59e8c46471be77d5d3c48177f0f0dd8d5d44e9 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
"""Evaluation loop for lingvo Jax model."""
import contextlib
import functools
import hashlib
import os
import time
from typing import List, Optional, Sequence
from absl import logging
import jax
from jax.experimental import maps
from jax.experimental import mesh_utils
from lingvo.jax import base_input
from lingvo.jax import base_layer
from lingvo.jax import base_metrics
from lingvo.jax import base_model_params
from lingvo.jax import base_task
from lingvo.jax import checkpoint_pb2
from lingvo.jax import model_utils
from lingvo.jax import py_utils
from lingvo.jax import pytypes
from lingvo.jax import summary_utils
from lingvo.jax import train_states
from lingvo.jax import trainer_lib
import tensorflow.compat.v2 as tf
from lingvo.jax import checkpoints
from lingvo.jax import io_utils
BaseModelParamsT = base_model_params.BaseModelParamsT
CheckpointType = checkpoint_pb2.CheckpointType
InstantiableParams = py_utils.InstantiableParams
NestedMap = py_utils.NestedMap
JTensor = pytypes.JTensor
NestedJTensor = pytypes.NestedJTensor
TrainState = train_states.TrainState
SummaryWriter = tf.summary.SummaryWriter
def maybe_ema(model_states):
"""Finds the ema state from optimizer states."""
if not model_states.opt_states:
return model_states
for i in range(len(model_states.opt_states[0])):
if 'ema' in model_states.opt_states[0][i]:
return TrainState(
step=model_states.step,
mdl_vars=model_states.opt_states[0][i].ema,
opt_states={})
return model_states
def evaluate(
model_name: str,
job_log_dir: Optional[str],
multi_host_checkpointing: Optional[bool],
maybe_use_persistence_checkpointing: bool,
) -> None:
"""Runs the evaluation loop on the entire eval data set.
Args:
model_name: The name of the model from the registry to evaluate.
job_log_dir: The directory for the job logs.
multi_host_checkpointing: Whether to use multi-host checkpointing.
maybe_use_persistence_checkpointing: If set, it will try to use
persistence-based checkpointing if suitable.
"""
model_config = model_utils.get_model(model_name)()
task_p = model_config.task()
model_p = task_p.model
eval_input_p = [v for v in model_config.datasets() if not v.is_training]
for inp in eval_input_p:
inp.num_infeed_hosts = jax.process_count()
inp.infeed_host_index = jax.process_index()
if model_p.device_mesh is not None:
checkpoint_type = checkpoints.retrieve_checkpoint_type(
multi_host_checkpointing, maybe_use_persistence_checkpointing, task_p)
evaluate_spmd_model(task_p, eval_input_p, job_log_dir, checkpoint_type)
else:
evaluate_pmap_model(task_p, eval_input_p, job_log_dir)
def evaluate_pmap_model(
task_p: InstantiableParams,
eval_input_p: Sequence[InstantiableParams],
job_log_dir: Optional[str],
) -> None:
"""Runs the evaluation loop on the entire test dataset for PMAP model.
Args:
task_p: Params for the task encapsulating the data parallel model.
eval_input_p: List of params for the eval data input pipelines.
job_log_dir: Directory for the job logs.
"""
logging.info('Using pmap for data parallelism.')
jax_task = task_p.Instantiate()
eval_input_pipelines = [input_p.Instantiate() for input_p in eval_input_p]
# TODO(shafey): Retrieve the seeds from the model definition instead.
prng_key = jax.random.PRNGKey(1234)
prng_key, init_key = jax.random.split(prng_key)
checkpoint_dir = os.path.join(job_log_dir, 'checkpoints')
# Restore flax checkpoints still required bak variables in TrainState
# TODO(pax): add is_eval=True to initialize_model_state
model_states = trainer_lib.initialize_model_state(jax_task, init_key)
# Pmap does not use GDA, and so global_mesh and mesh_axes are None.
model_states = checkpoints.restore_checkpoint(model_states, checkpoint_dir)
replicated_model_states = trainer_lib.replicate_model_state(model_states)
logging.info('replicated_model_states: %s',
jax.tree_map(lambda x: x.shape, replicated_model_states))
# From now on, different replicas should use different random seeds.
# Here, each process will have its unique prng_key.
# prng_key will be further split so that each core on a host will get
# different prng_key.
prng_key = jax.random.fold_in(prng_key, jax.process_index())
logging.info('root prng_key: %s', prng_key)
def eval_step(mdl_states, prng_key, inputs):
mdl_states = trainer_lib.train_state_for_eval_step(mdl_states)
return trainer_lib.eval_step_single_learner(
jax_task,
mdl_states,
prng_key,
inputs,
data_parallel_axis_name='batch',
fprop_dtype=jax_task.model.fprop_dtype)
num_devices = jax.local_device_count()
prng_key, eval_key = jax.random.split(prng_key)
eval_prng_seed = jax.random.split(eval_key, num=num_devices)
logging.info('eval prng_seed: %s', eval_prng_seed)
p_eval_step = jax.pmap(eval_step, axis_name='batch')
logging.info('Evaluation loop starting...')
summary_base_dir = os.path.join(job_log_dir, 'summaries')
summary_eval_dirs = [
os.path.join(summary_base_dir, f'eval_test_{split}')
for split, _ in enumerate(eval_input_p)
]
num_steps = [
-1 if p.reset_for_eval else p.eval_loop_num_batches for p in eval_input_p
]
last_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
with contextlib.ExitStack() as exit_stack:
eval_summary_writers = [
exit_stack.enter_context(summary_utils.get_summary_writer(d))
for d in summary_eval_dirs
]
while True:
step_i = int(jax.device_get(replicated_model_states.step)[0])
eval_step = functools.partial(p_eval_step,
maybe_ema(replicated_model_states),
eval_prng_seed)
# Run the eval loop.
model_utils.run_eval_loop_over_test_splits(
num_steps,
eval_step,
eval_summary_writers,
step_i,
eval_input_pipelines,
reshard_inputs=True)
# If the last check point evaluated matches max train steps, exit.
if last_checkpoint is not None:
last_ckpt_step = checkpoints.get_step_from_checkpoint_asset(
last_checkpoint)
exceeded_ckpt = last_ckpt_step + task_p.train.save_interval_steps
if exceeded_ckpt >= task_p.train.num_train_steps:
break
# Release replicated_model_states.
del replicated_model_states
new_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
while new_checkpoint == last_checkpoint:
# Sleep for a minute.
time.sleep(60)
new_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
# There must be a new checkpoint here.
logging.info('Found new checkpoint: %s', new_checkpoint)
model_states = checkpoints.restore_checkpoint(model_states,
checkpoint_dir)
replicated_model_states = trainer_lib.replicate_model_state(model_states)
last_checkpoint = new_checkpoint
def evaluate_spmd_model(
task_p: InstantiableParams,
eval_input_p: Sequence[InstantiableParams],
job_log_dir: Optional[str],
checkpoint_type: CheckpointType,
) -> None:
"""Runs the evaluation loop on the entire test dataset for SPMD model.
Args:
task_p: Params of the task encapsulating an SPMD model.
eval_input_p: List of Params for the eval data pipelines.
job_log_dir: Directory for the job logs.
checkpoint_type: Type of model checkpointing method to use.
"""
logging.info('Using SPMD sharding for model parallelism.')
eval_input_pipelines = [input_p.Instantiate() for input_p in eval_input_p]
# TODO(bf-jax): Retrieve the seeds from the model definition instead.
prng_key = jax.random.PRNGKey(1234)
prng_key, init_key = jax.random.split(prng_key)
checkpoint_dir = os.path.join(job_log_dir, 'checkpoints')
# Note that GDA checkpoint requires all processes to participate in
# checkpointing but it does not require a separate checkpoint_dir per process.
if checkpoint_type == CheckpointType.CHECKPOINT_MULTI_HOST_FLAX:
checkpoint_task_dir = os.path.join(checkpoint_dir,
f'{jax.process_index():03d}')
else:
checkpoint_task_dir = checkpoint_dir
multi_host_checkpointing = bool(checkpoint_type in {
CheckpointType.CHECKPOINT_MULTI_HOST_FLAX, CheckpointType.CHECKPOINT_GDA
})
def get_shape_dtype(x):
y = jax.ShapeDtypeStruct(x.shape, x.dtype)
return y
# Do not ues eval_input_pipelines[0] directly.
sample_model_inputs = eval_input_p[0].Instantiate().get_next()
inputs_shape = tf.nest.map_structure(get_shape_dtype, sample_model_inputs)
jax_task = task_p.Instantiate()
model_p = task_p.model
mesh_shape = model_p.device_mesh.shape
device_mesh = mesh_utils.create_device_mesh(mesh_shape)
logging.info('device_mesh: %s', device_mesh)
global_mesh = maps.Mesh(device_mesh, model_p.mesh_axis_names)
use_gda_checkpoint = jax.config.jax_parallel_functions_output_gda
with global_mesh:
jax_task.model.instantiate_variable_configs()
# Restore flax checkpoints still required backward variables in TrainState
# TODO(pax): set is_eval=True for all ckpt types.
if use_gda_checkpoint:
partitioned_specs = jax_task.create_train_state_partition_specs(
jax_task.model.vars, discard_opt_states=True)
partitioned_train_state = checkpoints.restore_checkpoint(
None,
checkpoint_task_dir,
global_mesh=global_mesh,
checkpoint_type=checkpoint_type,
state_specs=partitioned_specs)
eval_step, inputs_partition_specs = (
trainer_lib.get_partitioned_spmd_model_step_fn(
jax_task,
init_key,
partitioned_specs,
inputs_shape,
is_eval=True))
else:
(partitioned_train_state, partitioned_specs, inputs_partition_specs, _,
eval_step, _) = trainer_lib.partition_spmd_model(task_p, init_key,
inputs_shape)
partitioned_train_state = checkpoints.restore_checkpoint(
partitioned_train_state,
checkpoint_task_dir,
global_mesh=global_mesh,
checkpoint_type=checkpoint_type,
state_specs=partitioned_specs)
logging.info('partitioned_train_state: %s',
jax.tree_map(lambda x: x.shape, partitioned_train_state))
if multi_host_checkpointing:
py_utils.sync_global_devices(f'checkpointer:restored:{checkpoint_dir}')
# We do not fold in jax.process_index in contrast to the pmap version and
# use a single global key instead to rely on pjit to split for different
# replicas.
logging.info('root prng_key: %s', prng_key)
prng_key, eval_key = jax.random.split(prng_key)
logging.info('eval prng_key: %s', eval_key)
logging.info('Evaluation loop starting...')
summary_base_dir = os.path.join(job_log_dir, 'summaries')
summary_eval_dirs = [
os.path.join(summary_base_dir, f'eval_{split}')
for split, _ in enumerate(eval_input_p)
]
num_steps = [-1 if p.reset_for_eval else 1 for p in eval_input_p]
last_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
with contextlib.ExitStack() as exit_stack:
eval_summary_writers = [
exit_stack.enter_context(summary_utils.get_summary_writer(d))
for d in summary_eval_dirs
]
while True:
step_i = int(jax.device_get(partitioned_train_state.step))
eval_step_fn = functools.partial(
eval_step,
trainer_lib.train_state_for_eval_step(partitioned_train_state),
eval_key)
# Run the eval loop.
model_utils.run_eval_loop_over_test_splits(
num_steps,
eval_step_fn,
eval_summary_writers,
step_i,
eval_input_pipelines,
inputs_partition_specs,
inputs_shape,
global_mesh,
reshard_inputs=False)
# If the last check point evaluated matches max train steps, exit.
if last_checkpoint is not None:
last_ckpt_step = checkpoints.get_step_from_checkpoint_asset(
last_checkpoint)
exceeded_ckpt = last_ckpt_step + task_p.train.save_interval_steps
if exceeded_ckpt >= task_p.train.num_train_steps:
break
new_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
while new_checkpoint == last_checkpoint:
# Sleep for a minute.
time.sleep(60)
new_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
# There must be a new checkpoint here.
logging.info('Found new checkpoint: %s', new_checkpoint)
partitioned_train_state = checkpoints.restore_checkpoint(
None if use_gda_checkpoint else partitioned_train_state,
checkpoint_task_dir,
global_mesh=global_mesh,
checkpoint_type=checkpoint_type,
state_specs=partitioned_specs)
if multi_host_checkpointing:
py_utils.sync_global_devices(
f'checkpointer:restored:{checkpoint_dir}')
last_checkpoint = new_checkpoint
def decode(
model_name: str,
job_log_dir: Optional[str],
multi_host_checkpointing: Optional[bool],
maybe_use_persistence_checkpointing: bool,
restore_checkpoint_dir: Optional[str],
restore_checkpoint_step: Optional[int],
continuous_decode: bool,
) -> None:
"""Runs decoding once on the decoder datasets.
Args:
model_name: The name of the model from the registry to evaluate.
job_log_dir: The directory for the job logs.
multi_host_checkpointing: Whether to use multi-host checkpointing.
maybe_use_persistence_checkpointing: If set, it will try to use
persistence-based checkpointing if suitable.
restore_checkpoint_dir: The directory from which to restore checkpoint.
restore_checkpoint_step: If set, the checkpoint step to restore. If unset,
try to restore from the latest checkpoint if any.
continuous_decode: whether to continuously decode on the latest ckpt.
"""
logging.info('running decode_once on model %s restored from %s', model_name,
restore_checkpoint_dir)
model_config = model_utils.get_model(model_name)()
task_p = model_config.task()
model_p = task_p.model
decoder_inputs = model_config.decoder_datasets()
if not decoder_inputs:
return
for inp in decoder_inputs:
inp.num_infeed_hosts = jax.process_count()
inp.infeed_host_index = jax.process_index()
if model_p.device_mesh is not None:
if continuous_decode:
raise NotImplementedError('http://b/214589358: not supported')
checkpoint_type = checkpoints.retrieve_checkpoint_type(
multi_host_checkpointing, maybe_use_persistence_checkpointing, task_p)
decode_once_spmd_model(task_p, decoder_inputs, job_log_dir, checkpoint_type,
restore_checkpoint_dir, restore_checkpoint_step)
else:
decode_pmap_model(task_p, decoder_inputs, job_log_dir,
restore_checkpoint_dir, restore_checkpoint_step,
continuous_decode)
def _get_dir_names(input_p: Sequence[InstantiableParams]) -> Sequence[str]:
"""Returns a list of same length for parent dir names for each dataset."""
uniq_names = set()
ret = []
for idx, p in enumerate(input_p):
name = p.name or f'decode_test_{idx}'
if p.name and p.name in uniq_names:
name = f'{p.name}_{idx}'
if name in uniq_names:
suffix = hashlib.md5(name.encode()).hexdigest()[-5:]
name = f'{name}_{suffix}'
assert name not in uniq_names
uniq_names.add(name)
ret.append(name)
return ret
def _get_step(step: base_layer.JTensorOrPartitionSpec) -> int:
"""Returns an int for the current global step."""
if step.ndim == 0:
return jax.device_get(step)
if step.ndim == 1:
return jax.device_get(step[0])
raise ValueError(
f'Expecting a replicated 1D global step (got ndim=`{step.ndim}`).')
def _get_filename(step: base_layer.JTensorOrPartitionSpec) -> str:
"""Returns a filename for the given step."""
step_num = _get_step(step)
return f'decoder_out_{step_num}_shard_{jax.process_index()}'
def decode_pmap_model(
task_p: InstantiableParams,
input_p: Sequence[InstantiableParams],
job_log_dir: Optional[str],
restore_checkpoint_dir: Optional[str],
restore_checkpoint_step: Optional[int],
continuous_decode: bool,
) -> None:
"""Runs the decoding on the entire decoder datasets for a PMAP model.
Args:
task_p: Params of the task encapsulating a the data parallel model.
input_p: List of input params to be decoded.
job_log_dir: Directory for the job logs.
restore_checkpoint_dir: The directory from which to restore checkpoint. If
None, uses job_log_dir.
restore_checkpoint_step: If set, the checkpoint step to restore. If unset,
try to restore from the latest checkpoint if any.
continuous_decode: whether to continuously decode on the latest ckpt.
"""
if continuous_decode and restore_checkpoint_step is not None:
raise ValueError('Continuous decoding mode requires restore_checkpoint_step'
'=None, actual restore_checkpoint_step='
f'{restore_checkpoint_step}')
restore_checkpoint_dir = restore_checkpoint_dir or os.path.join(
job_log_dir, 'checkpoints')
# TODO(shafey): Retrieve the seeds from the model definition instead.
prng_key = jax.random.PRNGKey(1234)
prng_key, init_key = jax.random.split(prng_key)
# From now on, different replicas should use different random seeds.
# Here, each process will have its unique prng_key.
# prng_key will be further split so that each core on a host will get
# different prng_key.
prng_key = jax.random.fold_in(prng_key, jax.process_index())
logging.info('root prng_key: %s', prng_key)
prng_key, eval_key = jax.random.split(prng_key)
prng_seed = jax.random.split(eval_key, num=jax.local_device_count())
logging.info('decoder prng_seed: %s', prng_seed)
inputs = [p.Instantiate() for p in input_p]
summary_base_dir = os.path.join(job_log_dir, 'summaries')
dirnames = _get_dir_names(input_p)
summary_decode_dirs = [
os.path.join(summary_base_dir, f'decode_test_{dirnames[split]}')
for split, _ in enumerate(input_p)
]
with contextlib.ExitStack() as exit_stack:
summary_writers = [
exit_stack.enter_context(summary_utils.get_summary_writer(d))
for d in summary_decode_dirs
]
jax_task = task_p.Instantiate()
# Restore flax checkpoints still required bak variables in TrainState
# TODO(pax): add is_eval=True to initialize_model_state
model_states = trainer_lib.initialize_model_state(jax_task, init_key)
model_states = checkpoints.restore_checkpoint(
model_states, restore_checkpoint_dir, step=restore_checkpoint_step)
replicated_model_states = trainer_lib.replicate_model_state(model_states)
logging.info('replicated_model_states: %s',
jax.tree_map(lambda x: x.shape, replicated_model_states))
last_checkpoint = checkpoints.latest_checkpoint(restore_checkpoint_dir)
while True:
_decode_once_pmap_model(jax_task, task_p, inputs, input_p, prng_seed,
job_log_dir, replicated_model_states,
summary_writers)
if not continuous_decode:
break
if last_checkpoint is not None:
last_ckpt_step = int(last_checkpoint.split('_')[-1])
exceeded_ckpt = last_ckpt_step + task_p.train.save_interval_steps
if exceeded_ckpt >= task_p.train.num_train_steps:
break
# Release replicated_model_states.
del replicated_model_states
new_checkpoint = checkpoints.latest_checkpoint(restore_checkpoint_dir)
while new_checkpoint == last_checkpoint:
time.sleep(60)
new_checkpoint = checkpoints.latest_checkpoint(restore_checkpoint_dir)
logging.info('Found new checkpoint: %s', new_checkpoint)
model_states = checkpoints.restore_checkpoint(model_states,
restore_checkpoint_dir)
replicated_model_states = trainer_lib.replicate_model_state(model_states)
last_checkpoint = new_checkpoint
def _decode_once_pmap_model(
jax_task: base_task.SingleTask,
task_p: InstantiableParams,
inputs: List[base_input.BaseInput],
input_p: Sequence[InstantiableParams],
prng_seed: JTensor,
job_log_dir: Optional[str],
replicated_model_states: train_states.TrainState,
summary_writers: List[SummaryWriter],
) -> None:
"""Runs the decoding on the entire decoder datasets for a PMAP model.
Args:
jax_task: instantiated model from task_p.
task_p: Params for the task encapsulating a data parallel model.
inputs: instantiated inputs.
input_p: List of input params to be decoded.
prng_seed: The prng seed used for decoding.
job_log_dir: Directory for the job logs.
replicated_model_states: A TrainState object.
summary_writers: The summary writer objects to log summaries.
"""
model = jax_task.model
model_p = task_p.model
metrics_p = task_p.metrics
if not metrics_p:
metrics_p = base_metrics.MeanMetrics.Params()
decode_metrics = metrics_p.Instantiate()
process_decode_metrics = metrics_p.Instantiate()
step_i = _get_step(replicated_model_states.step)
pmap_axis_name = 'batch'
def decode_step(mdl_states, prng_key, inputs):
mdl_states = trainer_lib.train_state_for_eval_step(mdl_states)
metrics, out = trainer_lib.decode_step(model, mdl_states, prng_key, inputs,
model_p.fprop_dtype)
metrics = decode_metrics.aggregate(metrics)
return metrics, out
# As an example, suppose the output leaf from trainer_lib.decoder_step()
# for each core has shape: [per_core_batch_size, decoding_length].
# In the all_gather we set tiled=True, so the output chunks are all
# concatenated into the existing batch axis, so we get shape
# [num_cores x per_core_batch_size, decoding_length].
# In the pmap call we set out_axes=None to not have to manually unreplicate,
# so the output of pmap_decode_step() will have the same shape.
#
# Example code snippet showing this:
# # shape (8, 3, 2)
# x = jnp.tile(jnp.arange(8)[:, None, None],[1, 3, 2])
# # shape (24, 2)
# z = jax.pmap(
# lambda y: jax.lax.all_gather(y+1, axis_name='i', tiled=True),
# axis_name='i', out_axes=None)(x)
#
# We only aggregate metrics, not `out`, hence the tuple for out_axes.
pmap_decode_step = jax.pmap(
decode_step, axis_name=pmap_axis_name, out_axes=(None, 0))
decode_step_func = functools.partial(pmap_decode_step,
maybe_ema(replicated_model_states),
prng_seed)
num_steps = [
-1 if p.reset_for_eval else p.eval_loop_num_batches for p in input_p
]
decodes = [list() for _ in input_p]
for split, num_split_steps in enumerate(num_steps):
logging.info('Start decoding on input %s', input_p[split].name)
step_num = 0
while num_split_steps < 0 or step_num < num_split_steps:
step_num += 1
try:
batch = inputs[split].get_next()
except (tf.errors.OutOfRangeError, StopIteration):
inputs[split].reset()
break
batch = tf.nest.map_structure(py_utils.reshard, batch)
batch_metrics, out = decode_step_func(batch)
# we store the metric directly as it has already been aggregated in
# side decode_step_fun
decode_metrics.store(batch_metrics)
logging.info('Finished decoding input batch %d', step_num)
out = tf.nest.map_structure(py_utils.unshard, out)
process_metrics, processed = model.process_decode_out(inputs[split], out)
decodes[split].extend(processed)
logging.info('Finished processing decoded input batch %d', step_num)
# Reshard the metrics for pmap.
process_decode_metrics.update(process_metrics)
with summary_writers[split].as_default():
decode_metrics.summarize(step_i, 'decode_metrics')
process_decode_metrics.summarize(step_i, 'process_decode_metrics')
basedir = os.path.join(job_log_dir, 'decoder_out')
dirnames = _get_dir_names(input_p)
filename = _get_filename(replicated_model_states.step)
for s in dirnames:
dir_path = os.path.join(basedir, s)
if not tf.io.gfile.exists(dir_path):
tf.io.gfile.makedirs(dir_path)
filenames = [os.path.join(basedir, s, filename) for s in dirnames]
for split, output_file in enumerate(filenames):
logging.info('Writing decoder output to %s with %d entries', output_file,
len(decodes[split]))
io_utils.WriteKeyValuePairs(output_file, decodes[split])
def decode_once_spmd_model(
task_p: InstantiableParams,
input_p: Sequence[InstantiableParams],
job_log_dir: Optional[str],
checkpoint_type: CheckpointType,
restore_checkpoint_dir: str,
restore_checkpoint_step: Optional[int],
) -> None:
"""Runs the decoding once on the entire decoder datasets for SPMD model.
Args:
task_p: Params for the task that encapsulates an SPMD model.
input_p: List of input params to be decoded.
job_log_dir: Directory for the job logs.
checkpoint_type: Type of model checkpointing method to use.
restore_checkpoint_dir: The directory from which to restore checkpoint.
restore_checkpoint_step: If set, the checkpoint step to restore. If unset,
try to restore from the latest checkpoint if any.
"""
# TODO(bf-jax): Retrieve the seeds from the model definition instead.
prng_key = jax.random.PRNGKey(1234)
prng_key, init_key = jax.random.split(prng_key)
if restore_checkpoint_dir:
restore_checkpoint_parent_dir = restore_checkpoint_dir
if checkpoint_type == CheckpointType.CHECKPOINT_MULTI_HOST_FLAX:
# TODO(zhouwk): add sanity check on number of subdirs and number of
# processes and fail early if unequal.
restore_checkpoint_dir = os.path.join(restore_checkpoint_dir,
f'{jax.process_index():03d}')
multi_host_checkpointing = bool(checkpoint_type in {
CheckpointType.CHECKPOINT_MULTI_HOST_FLAX, CheckpointType.CHECKPOINT_GDA
})
sample_inputs = input_p[0].Instantiate().get_next()
inputs_shape = tf.nest.map_structure(py_utils.get_global_input_shape_dtype,
sample_inputs)
model_p = task_p.model
# TODO(b/198356509): This is a hack for now as we need to change some
# annotations for mode='decode'. A future cl will move this logic
# to a more generic model_p.update_sharding_params_v1(mode='decode').
model_p.lm = model_p.lm.cls.set_sharding_params_v1(
model_p.lm,
replica_axis=model_p.lm.mesh_axis_names[0],
data_axis=model_p.lm.mesh_axis_names[1],
mdl_axis=model_p.lm.mesh_axis_names[2],
device_ids_mesh=model_p.lm.device_mesh,
mesh_axis_names=model_p.lm.mesh_axis_names,
mode='decode')
mesh_shape = model_p.device_mesh.shape
device_mesh = mesh_utils.create_device_mesh(mesh_shape)
logging.info('device_mesh: %s', device_mesh)
jax_task = task_p.Instantiate()
global_mesh = maps.Mesh(device_mesh, model_p.mesh_axis_names)
with global_mesh:
if restore_checkpoint_dir:
model = jax_task.model
model.instantiate_variable_configs()
# Get the metadata from variables instead of actually instantiating them.
partitioned_specs = jax_task.create_train_state_partition_specs(
model.vars, discard_opt_states=True)
# Instantiate the TrainState directly from the checkpoint.
partitioned_train_state = checkpoints.restore_checkpoint(
None,
restore_checkpoint_dir,
global_mesh=global_mesh,
checkpoint_type=checkpoint_type,
state_specs=partitioned_specs,
step=restore_checkpoint_step)
if multi_host_checkpointing:
py_utils.sync_global_devices(
f'checkpointer:restored:{restore_checkpoint_parent_dir}')
decode_step_fn, inputs_partition_spec = (
trainer_lib.get_partitioned_spmd_model_decode_fn(
jax_task, init_key, partitioned_specs, inputs_shape))
else:
# When restore is not specified, randomly initiate the train_state.
(partitioned_train_state, inputs_partition_spec, partitioned_specs,
decode_step_fn) = trainer_lib.partition_spmd_model_decode(
task_p, init_key, inputs_shape)
logging.info('partitioned_train_state: %s',
jax.tree_map(lambda x: x.shape, partitioned_train_state))
# We do not fold in jax.process_index in contrast to the pmap version and
# use a single global key instead to rely on pjit to split for different
# replicas.
logging.info('root prng_key: %s', prng_key)
prng_key, decode_key = jax.random.split(prng_key)
logging.info('eval prng_key: %s', decode_key)
spmd_decode_step_fn = functools.partial(
decode_step_fn,
trainer_lib.train_state_for_eval_step(partitioned_train_state),
decode_key)
num_steps = [
-1 if p.reset_for_eval else p.eval_loop_num_batches for p in input_p
]
inputs = [p.Instantiate() for p in input_p]
decodes = [list() for _ in input_p]
process_id = jax.process_index()
for split, num_split_steps in enumerate(num_steps):
logging.info('Start decoding on input %s', input_p[split].name)
step_num = 0
while num_split_steps < 0 or step_num < num_split_steps:
step_num += 1
try:
batch = inputs[split].get_next()
except (tf.errors.OutOfRangeError, StopIteration):
break
if jax.config.jax_parallel_functions_output_gda:
batch = py_utils.create_gda(batch, inputs_shape, global_mesh,
inputs_partition_spec)
_, out = spmd_decode_step_fn(batch)
# Output is fully replicated now, so it's ok to unreplicate it by
# retrieving from device 0 only.
out = py_utils.maybe_unreplicate_gda(out)
global_batch_size = next(iter(out.values())).shape[0]
logging.info('Finished decoding input batch %d with %d examples',
step_num, global_batch_size)
# Manually shard the output per each jax process.
# We require that all fields in the output is batch major.
if global_batch_size % jax.process_count() != 0:
raise ValueError(f'Global batch size {global_batch_size} must divide '
f'jax process count {jax.process_count()}')
for k, v in out.items():
if v.shape[0] != global_batch_size:
raise ValueError('We require that all fields in the decode output '
'to have batch size as the first dim, got shape='
f'{v.shape} with key={k}, expect batch size = '
f'{global_batch_size}')
per_process_batch_size = global_batch_size // jax.process_count()
def shard(x, per_process_batch_size=per_process_batch_size):
return x[(process_id *
per_process_batch_size):((process_id + 1) *
per_process_batch_size)]
out = jax.tree_map(shard, out)
_, processed = jax_task.model.process_decode_out(inputs[split], out)
decodes[split].extend(processed)
logging.info('Finished processing decoded input batch %d', step_num)
basedir = os.path.join(job_log_dir, 'decoder_out')
dirnames = _get_dir_names(input_p)
filename = _get_filename(
py_utils.maybe_unreplicate_gda(partitioned_train_state.step))
for s in dirnames:
dir_path = os.path.join(basedir, s)
if not tf.io.gfile.exists(dir_path):
tf.io.gfile.makedirs(dir_path)
filenames = [os.path.join(basedir, s, filename) for s in dirnames]
for split, output_file in enumerate(filenames):
logging.info('Writing decoder output to %s with %d entries', output_file,
len(decodes[split]))
io_utils.WriteKeyValuePairs(output_file, decodes[split])
| 42.010139 | 80 | 0.710221 |
import contextlib
import functools
import hashlib
import os
import time
from typing import List, Optional, Sequence
from absl import logging
import jax
from jax.experimental import maps
from jax.experimental import mesh_utils
from lingvo.jax import base_input
from lingvo.jax import base_layer
from lingvo.jax import base_metrics
from lingvo.jax import base_model_params
from lingvo.jax import base_task
from lingvo.jax import checkpoint_pb2
from lingvo.jax import model_utils
from lingvo.jax import py_utils
from lingvo.jax import pytypes
from lingvo.jax import summary_utils
from lingvo.jax import train_states
from lingvo.jax import trainer_lib
import tensorflow.compat.v2 as tf
from lingvo.jax import checkpoints
from lingvo.jax import io_utils
BaseModelParamsT = base_model_params.BaseModelParamsT
CheckpointType = checkpoint_pb2.CheckpointType
InstantiableParams = py_utils.InstantiableParams
NestedMap = py_utils.NestedMap
JTensor = pytypes.JTensor
NestedJTensor = pytypes.NestedJTensor
TrainState = train_states.TrainState
SummaryWriter = tf.summary.SummaryWriter
def maybe_ema(model_states):
if not model_states.opt_states:
return model_states
for i in range(len(model_states.opt_states[0])):
if 'ema' in model_states.opt_states[0][i]:
return TrainState(
step=model_states.step,
mdl_vars=model_states.opt_states[0][i].ema,
opt_states={})
return model_states
def evaluate(
model_name: str,
job_log_dir: Optional[str],
multi_host_checkpointing: Optional[bool],
maybe_use_persistence_checkpointing: bool,
) -> None:
model_config = model_utils.get_model(model_name)()
task_p = model_config.task()
model_p = task_p.model
eval_input_p = [v for v in model_config.datasets() if not v.is_training]
for inp in eval_input_p:
inp.num_infeed_hosts = jax.process_count()
inp.infeed_host_index = jax.process_index()
if model_p.device_mesh is not None:
checkpoint_type = checkpoints.retrieve_checkpoint_type(
multi_host_checkpointing, maybe_use_persistence_checkpointing, task_p)
evaluate_spmd_model(task_p, eval_input_p, job_log_dir, checkpoint_type)
else:
evaluate_pmap_model(task_p, eval_input_p, job_log_dir)
def evaluate_pmap_model(
task_p: InstantiableParams,
eval_input_p: Sequence[InstantiableParams],
job_log_dir: Optional[str],
) -> None:
logging.info('Using pmap for data parallelism.')
jax_task = task_p.Instantiate()
eval_input_pipelines = [input_p.Instantiate() for input_p in eval_input_p]
prng_key = jax.random.PRNGKey(1234)
prng_key, init_key = jax.random.split(prng_key)
checkpoint_dir = os.path.join(job_log_dir, 'checkpoints')
model_states = trainer_lib.initialize_model_state(jax_task, init_key)
model_states = checkpoints.restore_checkpoint(model_states, checkpoint_dir)
replicated_model_states = trainer_lib.replicate_model_state(model_states)
logging.info('replicated_model_states: %s',
jax.tree_map(lambda x: x.shape, replicated_model_states))
prng_key = jax.random.fold_in(prng_key, jax.process_index())
logging.info('root prng_key: %s', prng_key)
def eval_step(mdl_states, prng_key, inputs):
mdl_states = trainer_lib.train_state_for_eval_step(mdl_states)
return trainer_lib.eval_step_single_learner(
jax_task,
mdl_states,
prng_key,
inputs,
data_parallel_axis_name='batch',
fprop_dtype=jax_task.model.fprop_dtype)
num_devices = jax.local_device_count()
prng_key, eval_key = jax.random.split(prng_key)
eval_prng_seed = jax.random.split(eval_key, num=num_devices)
logging.info('eval prng_seed: %s', eval_prng_seed)
p_eval_step = jax.pmap(eval_step, axis_name='batch')
logging.info('Evaluation loop starting...')
summary_base_dir = os.path.join(job_log_dir, 'summaries')
summary_eval_dirs = [
os.path.join(summary_base_dir, f'eval_test_{split}')
for split, _ in enumerate(eval_input_p)
]
num_steps = [
-1 if p.reset_for_eval else p.eval_loop_num_batches for p in eval_input_p
]
last_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
with contextlib.ExitStack() as exit_stack:
eval_summary_writers = [
exit_stack.enter_context(summary_utils.get_summary_writer(d))
for d in summary_eval_dirs
]
while True:
step_i = int(jax.device_get(replicated_model_states.step)[0])
eval_step = functools.partial(p_eval_step,
maybe_ema(replicated_model_states),
eval_prng_seed)
model_utils.run_eval_loop_over_test_splits(
num_steps,
eval_step,
eval_summary_writers,
step_i,
eval_input_pipelines,
reshard_inputs=True)
if last_checkpoint is not None:
last_ckpt_step = checkpoints.get_step_from_checkpoint_asset(
last_checkpoint)
exceeded_ckpt = last_ckpt_step + task_p.train.save_interval_steps
if exceeded_ckpt >= task_p.train.num_train_steps:
break
del replicated_model_states
new_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
while new_checkpoint == last_checkpoint:
time.sleep(60)
new_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
logging.info('Found new checkpoint: %s', new_checkpoint)
model_states = checkpoints.restore_checkpoint(model_states,
checkpoint_dir)
replicated_model_states = trainer_lib.replicate_model_state(model_states)
last_checkpoint = new_checkpoint
def evaluate_spmd_model(
task_p: InstantiableParams,
eval_input_p: Sequence[InstantiableParams],
job_log_dir: Optional[str],
checkpoint_type: CheckpointType,
) -> None:
logging.info('Using SPMD sharding for model parallelism.')
eval_input_pipelines = [input_p.Instantiate() for input_p in eval_input_p]
prng_key = jax.random.PRNGKey(1234)
prng_key, init_key = jax.random.split(prng_key)
checkpoint_dir = os.path.join(job_log_dir, 'checkpoints')
if checkpoint_type == CheckpointType.CHECKPOINT_MULTI_HOST_FLAX:
checkpoint_task_dir = os.path.join(checkpoint_dir,
f'{jax.process_index():03d}')
else:
checkpoint_task_dir = checkpoint_dir
multi_host_checkpointing = bool(checkpoint_type in {
CheckpointType.CHECKPOINT_MULTI_HOST_FLAX, CheckpointType.CHECKPOINT_GDA
})
def get_shape_dtype(x):
y = jax.ShapeDtypeStruct(x.shape, x.dtype)
return y
sample_model_inputs = eval_input_p[0].Instantiate().get_next()
inputs_shape = tf.nest.map_structure(get_shape_dtype, sample_model_inputs)
jax_task = task_p.Instantiate()
model_p = task_p.model
mesh_shape = model_p.device_mesh.shape
device_mesh = mesh_utils.create_device_mesh(mesh_shape)
logging.info('device_mesh: %s', device_mesh)
global_mesh = maps.Mesh(device_mesh, model_p.mesh_axis_names)
use_gda_checkpoint = jax.config.jax_parallel_functions_output_gda
with global_mesh:
jax_task.model.instantiate_variable_configs()
if use_gda_checkpoint:
partitioned_specs = jax_task.create_train_state_partition_specs(
jax_task.model.vars, discard_opt_states=True)
partitioned_train_state = checkpoints.restore_checkpoint(
None,
checkpoint_task_dir,
global_mesh=global_mesh,
checkpoint_type=checkpoint_type,
state_specs=partitioned_specs)
eval_step, inputs_partition_specs = (
trainer_lib.get_partitioned_spmd_model_step_fn(
jax_task,
init_key,
partitioned_specs,
inputs_shape,
is_eval=True))
else:
(partitioned_train_state, partitioned_specs, inputs_partition_specs, _,
eval_step, _) = trainer_lib.partition_spmd_model(task_p, init_key,
inputs_shape)
partitioned_train_state = checkpoints.restore_checkpoint(
partitioned_train_state,
checkpoint_task_dir,
global_mesh=global_mesh,
checkpoint_type=checkpoint_type,
state_specs=partitioned_specs)
logging.info('partitioned_train_state: %s',
jax.tree_map(lambda x: x.shape, partitioned_train_state))
if multi_host_checkpointing:
py_utils.sync_global_devices(f'checkpointer:restored:{checkpoint_dir}')
logging.info('root prng_key: %s', prng_key)
prng_key, eval_key = jax.random.split(prng_key)
logging.info('eval prng_key: %s', eval_key)
logging.info('Evaluation loop starting...')
summary_base_dir = os.path.join(job_log_dir, 'summaries')
summary_eval_dirs = [
os.path.join(summary_base_dir, f'eval_{split}')
for split, _ in enumerate(eval_input_p)
]
num_steps = [-1 if p.reset_for_eval else 1 for p in eval_input_p]
last_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
with contextlib.ExitStack() as exit_stack:
eval_summary_writers = [
exit_stack.enter_context(summary_utils.get_summary_writer(d))
for d in summary_eval_dirs
]
while True:
step_i = int(jax.device_get(partitioned_train_state.step))
eval_step_fn = functools.partial(
eval_step,
trainer_lib.train_state_for_eval_step(partitioned_train_state),
eval_key)
model_utils.run_eval_loop_over_test_splits(
num_steps,
eval_step_fn,
eval_summary_writers,
step_i,
eval_input_pipelines,
inputs_partition_specs,
inputs_shape,
global_mesh,
reshard_inputs=False)
if last_checkpoint is not None:
last_ckpt_step = checkpoints.get_step_from_checkpoint_asset(
last_checkpoint)
exceeded_ckpt = last_ckpt_step + task_p.train.save_interval_steps
if exceeded_ckpt >= task_p.train.num_train_steps:
break
new_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
while new_checkpoint == last_checkpoint:
time.sleep(60)
new_checkpoint = checkpoints.latest_checkpoint(checkpoint_dir)
logging.info('Found new checkpoint: %s', new_checkpoint)
partitioned_train_state = checkpoints.restore_checkpoint(
None if use_gda_checkpoint else partitioned_train_state,
checkpoint_task_dir,
global_mesh=global_mesh,
checkpoint_type=checkpoint_type,
state_specs=partitioned_specs)
if multi_host_checkpointing:
py_utils.sync_global_devices(
f'checkpointer:restored:{checkpoint_dir}')
last_checkpoint = new_checkpoint
def decode(
model_name: str,
job_log_dir: Optional[str],
multi_host_checkpointing: Optional[bool],
maybe_use_persistence_checkpointing: bool,
restore_checkpoint_dir: Optional[str],
restore_checkpoint_step: Optional[int],
continuous_decode: bool,
) -> None:
logging.info('running decode_once on model %s restored from %s', model_name,
restore_checkpoint_dir)
model_config = model_utils.get_model(model_name)()
task_p = model_config.task()
model_p = task_p.model
decoder_inputs = model_config.decoder_datasets()
if not decoder_inputs:
return
for inp in decoder_inputs:
inp.num_infeed_hosts = jax.process_count()
inp.infeed_host_index = jax.process_index()
if model_p.device_mesh is not None:
if continuous_decode:
raise NotImplementedError('http://b/214589358: not supported')
checkpoint_type = checkpoints.retrieve_checkpoint_type(
multi_host_checkpointing, maybe_use_persistence_checkpointing, task_p)
decode_once_spmd_model(task_p, decoder_inputs, job_log_dir, checkpoint_type,
restore_checkpoint_dir, restore_checkpoint_step)
else:
decode_pmap_model(task_p, decoder_inputs, job_log_dir,
restore_checkpoint_dir, restore_checkpoint_step,
continuous_decode)
def _get_dir_names(input_p: Sequence[InstantiableParams]) -> Sequence[str]:
uniq_names = set()
ret = []
for idx, p in enumerate(input_p):
name = p.name or f'decode_test_{idx}'
if p.name and p.name in uniq_names:
name = f'{p.name}_{idx}'
if name in uniq_names:
suffix = hashlib.md5(name.encode()).hexdigest()[-5:]
name = f'{name}_{suffix}'
assert name not in uniq_names
uniq_names.add(name)
ret.append(name)
return ret
def _get_step(step: base_layer.JTensorOrPartitionSpec) -> int:
if step.ndim == 0:
return jax.device_get(step)
if step.ndim == 1:
return jax.device_get(step[0])
raise ValueError(
f'Expecting a replicated 1D global step (got ndim=`{step.ndim}`).')
def _get_filename(step: base_layer.JTensorOrPartitionSpec) -> str:
step_num = _get_step(step)
return f'decoder_out_{step_num}_shard_{jax.process_index()}'
def decode_pmap_model(
task_p: InstantiableParams,
input_p: Sequence[InstantiableParams],
job_log_dir: Optional[str],
restore_checkpoint_dir: Optional[str],
restore_checkpoint_step: Optional[int],
continuous_decode: bool,
) -> None:
if continuous_decode and restore_checkpoint_step is not None:
raise ValueError('Continuous decoding mode requires restore_checkpoint_step'
'=None, actual restore_checkpoint_step='
f'{restore_checkpoint_step}')
restore_checkpoint_dir = restore_checkpoint_dir or os.path.join(
job_log_dir, 'checkpoints')
prng_key = jax.random.PRNGKey(1234)
prng_key, init_key = jax.random.split(prng_key)
prng_key = jax.random.fold_in(prng_key, jax.process_index())
logging.info('root prng_key: %s', prng_key)
prng_key, eval_key = jax.random.split(prng_key)
prng_seed = jax.random.split(eval_key, num=jax.local_device_count())
logging.info('decoder prng_seed: %s', prng_seed)
inputs = [p.Instantiate() for p in input_p]
summary_base_dir = os.path.join(job_log_dir, 'summaries')
dirnames = _get_dir_names(input_p)
summary_decode_dirs = [
os.path.join(summary_base_dir, f'decode_test_{dirnames[split]}')
for split, _ in enumerate(input_p)
]
with contextlib.ExitStack() as exit_stack:
summary_writers = [
exit_stack.enter_context(summary_utils.get_summary_writer(d))
for d in summary_decode_dirs
]
jax_task = task_p.Instantiate()
model_states = trainer_lib.initialize_model_state(jax_task, init_key)
model_states = checkpoints.restore_checkpoint(
model_states, restore_checkpoint_dir, step=restore_checkpoint_step)
replicated_model_states = trainer_lib.replicate_model_state(model_states)
logging.info('replicated_model_states: %s',
jax.tree_map(lambda x: x.shape, replicated_model_states))
last_checkpoint = checkpoints.latest_checkpoint(restore_checkpoint_dir)
while True:
_decode_once_pmap_model(jax_task, task_p, inputs, input_p, prng_seed,
job_log_dir, replicated_model_states,
summary_writers)
if not continuous_decode:
break
if last_checkpoint is not None:
last_ckpt_step = int(last_checkpoint.split('_')[-1])
exceeded_ckpt = last_ckpt_step + task_p.train.save_interval_steps
if exceeded_ckpt >= task_p.train.num_train_steps:
break
del replicated_model_states
new_checkpoint = checkpoints.latest_checkpoint(restore_checkpoint_dir)
while new_checkpoint == last_checkpoint:
time.sleep(60)
new_checkpoint = checkpoints.latest_checkpoint(restore_checkpoint_dir)
logging.info('Found new checkpoint: %s', new_checkpoint)
model_states = checkpoints.restore_checkpoint(model_states,
restore_checkpoint_dir)
replicated_model_states = trainer_lib.replicate_model_state(model_states)
last_checkpoint = new_checkpoint
def _decode_once_pmap_model(
jax_task: base_task.SingleTask,
task_p: InstantiableParams,
inputs: List[base_input.BaseInput],
input_p: Sequence[InstantiableParams],
prng_seed: JTensor,
job_log_dir: Optional[str],
replicated_model_states: train_states.TrainState,
summary_writers: List[SummaryWriter],
) -> None:
model = jax_task.model
model_p = task_p.model
metrics_p = task_p.metrics
if not metrics_p:
metrics_p = base_metrics.MeanMetrics.Params()
decode_metrics = metrics_p.Instantiate()
process_decode_metrics = metrics_p.Instantiate()
step_i = _get_step(replicated_model_states.step)
pmap_axis_name = 'batch'
def decode_step(mdl_states, prng_key, inputs):
mdl_states = trainer_lib.train_state_for_eval_step(mdl_states)
metrics, out = trainer_lib.decode_step(model, mdl_states, prng_key, inputs,
model_p.fprop_dtype)
metrics = decode_metrics.aggregate(metrics)
return metrics, out
ode_step = jax.pmap(
decode_step, axis_name=pmap_axis_name, out_axes=(None, 0))
decode_step_func = functools.partial(pmap_decode_step,
maybe_ema(replicated_model_states),
prng_seed)
num_steps = [
-1 if p.reset_for_eval else p.eval_loop_num_batches for p in input_p
]
decodes = [list() for _ in input_p]
for split, num_split_steps in enumerate(num_steps):
logging.info('Start decoding on input %s', input_p[split].name)
step_num = 0
while num_split_steps < 0 or step_num < num_split_steps:
step_num += 1
try:
batch = inputs[split].get_next()
except (tf.errors.OutOfRangeError, StopIteration):
inputs[split].reset()
break
batch = tf.nest.map_structure(py_utils.reshard, batch)
batch_metrics, out = decode_step_func(batch)
decode_metrics.store(batch_metrics)
logging.info('Finished decoding input batch %d', step_num)
out = tf.nest.map_structure(py_utils.unshard, out)
process_metrics, processed = model.process_decode_out(inputs[split], out)
decodes[split].extend(processed)
logging.info('Finished processing decoded input batch %d', step_num)
process_decode_metrics.update(process_metrics)
with summary_writers[split].as_default():
decode_metrics.summarize(step_i, 'decode_metrics')
process_decode_metrics.summarize(step_i, 'process_decode_metrics')
basedir = os.path.join(job_log_dir, 'decoder_out')
dirnames = _get_dir_names(input_p)
filename = _get_filename(replicated_model_states.step)
for s in dirnames:
dir_path = os.path.join(basedir, s)
if not tf.io.gfile.exists(dir_path):
tf.io.gfile.makedirs(dir_path)
filenames = [os.path.join(basedir, s, filename) for s in dirnames]
for split, output_file in enumerate(filenames):
logging.info('Writing decoder output to %s with %d entries', output_file,
len(decodes[split]))
io_utils.WriteKeyValuePairs(output_file, decodes[split])
def decode_once_spmd_model(
task_p: InstantiableParams,
input_p: Sequence[InstantiableParams],
job_log_dir: Optional[str],
checkpoint_type: CheckpointType,
restore_checkpoint_dir: str,
restore_checkpoint_step: Optional[int],
) -> None:
prng_key = jax.random.PRNGKey(1234)
prng_key, init_key = jax.random.split(prng_key)
if restore_checkpoint_dir:
restore_checkpoint_parent_dir = restore_checkpoint_dir
if checkpoint_type == CheckpointType.CHECKPOINT_MULTI_HOST_FLAX:
restore_checkpoint_dir = os.path.join(restore_checkpoint_dir,
f'{jax.process_index():03d}')
multi_host_checkpointing = bool(checkpoint_type in {
CheckpointType.CHECKPOINT_MULTI_HOST_FLAX, CheckpointType.CHECKPOINT_GDA
})
sample_inputs = input_p[0].Instantiate().get_next()
inputs_shape = tf.nest.map_structure(py_utils.get_global_input_shape_dtype,
sample_inputs)
model_p = task_p.model
model_p.lm = model_p.lm.cls.set_sharding_params_v1(
model_p.lm,
replica_axis=model_p.lm.mesh_axis_names[0],
data_axis=model_p.lm.mesh_axis_names[1],
mdl_axis=model_p.lm.mesh_axis_names[2],
device_ids_mesh=model_p.lm.device_mesh,
mesh_axis_names=model_p.lm.mesh_axis_names,
mode='decode')
mesh_shape = model_p.device_mesh.shape
device_mesh = mesh_utils.create_device_mesh(mesh_shape)
logging.info('device_mesh: %s', device_mesh)
jax_task = task_p.Instantiate()
global_mesh = maps.Mesh(device_mesh, model_p.mesh_axis_names)
with global_mesh:
if restore_checkpoint_dir:
model = jax_task.model
model.instantiate_variable_configs()
partitioned_specs = jax_task.create_train_state_partition_specs(
model.vars, discard_opt_states=True)
partitioned_train_state = checkpoints.restore_checkpoint(
None,
restore_checkpoint_dir,
global_mesh=global_mesh,
checkpoint_type=checkpoint_type,
state_specs=partitioned_specs,
step=restore_checkpoint_step)
if multi_host_checkpointing:
py_utils.sync_global_devices(
f'checkpointer:restored:{restore_checkpoint_parent_dir}')
decode_step_fn, inputs_partition_spec = (
trainer_lib.get_partitioned_spmd_model_decode_fn(
jax_task, init_key, partitioned_specs, inputs_shape))
else:
(partitioned_train_state, inputs_partition_spec, partitioned_specs,
decode_step_fn) = trainer_lib.partition_spmd_model_decode(
task_p, init_key, inputs_shape)
logging.info('partitioned_train_state: %s',
jax.tree_map(lambda x: x.shape, partitioned_train_state))
logging.info('root prng_key: %s', prng_key)
prng_key, decode_key = jax.random.split(prng_key)
logging.info('eval prng_key: %s', decode_key)
spmd_decode_step_fn = functools.partial(
decode_step_fn,
trainer_lib.train_state_for_eval_step(partitioned_train_state),
decode_key)
num_steps = [
-1 if p.reset_for_eval else p.eval_loop_num_batches for p in input_p
]
inputs = [p.Instantiate() for p in input_p]
decodes = [list() for _ in input_p]
process_id = jax.process_index()
for split, num_split_steps in enumerate(num_steps):
logging.info('Start decoding on input %s', input_p[split].name)
step_num = 0
while num_split_steps < 0 or step_num < num_split_steps:
step_num += 1
try:
batch = inputs[split].get_next()
except (tf.errors.OutOfRangeError, StopIteration):
break
if jax.config.jax_parallel_functions_output_gda:
batch = py_utils.create_gda(batch, inputs_shape, global_mesh,
inputs_partition_spec)
_, out = spmd_decode_step_fn(batch)
# retrieving from device 0 only.
out = py_utils.maybe_unreplicate_gda(out)
global_batch_size = next(iter(out.values())).shape[0]
logging.info('Finished decoding input batch %d with %d examples',
step_num, global_batch_size)
# Manually shard the output per each jax process.
# We require that all fields in the output is batch major.
if global_batch_size % jax.process_count() != 0:
raise ValueError(f'Global batch size {global_batch_size} must divide '
f'jax process count {jax.process_count()}')
for k, v in out.items():
if v.shape[0] != global_batch_size:
raise ValueError('We require that all fields in the decode output '
'to have batch size as the first dim, got shape='
f'{v.shape} with key={k}, expect batch size = '
f'{global_batch_size}')
per_process_batch_size = global_batch_size // jax.process_count()
def shard(x, per_process_batch_size=per_process_batch_size):
return x[(process_id *
per_process_batch_size):((process_id + 1) *
per_process_batch_size)]
out = jax.tree_map(shard, out)
_, processed = jax_task.model.process_decode_out(inputs[split], out)
decodes[split].extend(processed)
logging.info('Finished processing decoded input batch %d', step_num)
basedir = os.path.join(job_log_dir, 'decoder_out')
dirnames = _get_dir_names(input_p)
filename = _get_filename(
py_utils.maybe_unreplicate_gda(partitioned_train_state.step))
for s in dirnames:
dir_path = os.path.join(basedir, s)
if not tf.io.gfile.exists(dir_path):
tf.io.gfile.makedirs(dir_path)
filenames = [os.path.join(basedir, s, filename) for s in dirnames]
for split, output_file in enumerate(filenames):
logging.info('Writing decoder output to %s with %d entries', output_file,
len(decodes[split]))
io_utils.WriteKeyValuePairs(output_file, decodes[split])
| true | true |
f72737182c2d3650ddf80bd690d0f8357d6c3fc4 | 6,681 | py | Python | tests/api/v2/managers/test_config_api_manager.py | malached/caldera | b622b0b8d0a04bcd0328040cbf53a01b93505afc | [
"Apache-2.0"
] | 1 | 2021-10-06T09:25:18.000Z | 2021-10-06T09:25:18.000Z | tests/api/v2/managers/test_config_api_manager.py | malached/caldera | b622b0b8d0a04bcd0328040cbf53a01b93505afc | [
"Apache-2.0"
] | 1 | 2019-04-25T07:12:14.000Z | 2019-04-25T07:12:14.000Z | tests/api/v2/managers/test_config_api_manager.py | malached/caldera | b622b0b8d0a04bcd0328040cbf53a01b93505afc | [
"Apache-2.0"
] | null | null | null | import pytest
from app.api.v2 import errors
from app.api.v2.managers import config_api_manager
from app.api.v2.managers.config_api_manager import ConfigApiManager, ConfigNotFound, ConfigUpdateNotAllowed
from app.utility.base_world import BaseWorld
class StubDataService:
def __init__(self,):
self.abilities = []
async def locate(self, key):
assert key == 'abilities'
return self.abilities
@pytest.fixture
def base_world():
main_conf = {
'app.contact.dns.domain': 'mycaldera.caldera',
'app.contact.dns.socket': '0.0.0.0:8853',
'app.contact.html': '/weather',
'app.contact.http': 'http://0.0.0.0:8888',
'app.contact.tcp': '0.0.0.0:7010',
'app.contact.tunnel.ssh.socket': '0.0.0.0:8022',
'app.contact.udp': '0.0.0.0:7013',
'app.contact.websocket': '0.0.0.0:7012',
'exfil_dir': '/tmp/caldera',
'plugins': [
'stockpile',
'atomic'
],
'reports_dir': '/tmp',
'host': '0.0.0.0',
'auth.login.handler.module': 'default',
'users': {
'red': {
'red': 'password-foo'
},
'blue': {
'blue': 'password-bar'
}
}
}
agents_conf = {
'sleep_min': '30',
'sleep_max': '60',
'untrusted_timer': '90',
'watchdog': '0',
'implant_name': 'splunkd',
'deadman_abilities': [
'this-is-a-fake-ability'
],
'bootstrap_abilities': [
'this-is-another-fake-ability'
]
}
BaseWorld.clear_config()
BaseWorld.apply_config('main', main_conf)
BaseWorld.apply_config('agents', agents_conf)
yield BaseWorld
BaseWorld.clear_config()
def test_filter_keys():
mapping = {
'foo': 1,
'bar': 2,
'baz': {
'key3': 3,
'key4': 4
}
}
filtered = config_api_manager.filter_keys(mapping, keys_to_remove=['baz', 'bar'])
expected = {'foo': 1}
assert filtered == expected
def test_get_filtered_config_remove_sensitive_keys(base_world, data_svc):
test_conf = {
'users': 'this should be filtered',
'host': 'this should be filtered',
'foo': '1',
'bar': '2',
'baz': '3'
}
base_world.apply_config('test', test_conf)
manager = ConfigApiManager(data_svc, None)
filtered = manager.get_filtered_config('test')
expected = {
'foo': '1',
'bar': '2',
'baz': '3'
}
assert filtered == expected
def test_get_filtered_config_all_sensitive_keys_filtered(base_world, data_svc):
sensitive_conf = {key: 'foo' for key in config_api_manager.SENSITIVE_CONFIG_PROPS}
base_world.apply_config('test', sensitive_conf)
assert base_world.get_config(name='test') == sensitive_conf
manager = ConfigApiManager(data_svc, None)
filtered = manager.get_filtered_config('test')
assert filtered == {}
def test_get_filtered_config_throws_exception_on_not_found(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(ConfigNotFound):
manager.get_filtered_config('THIS DOES NOT EXIST')
def test_update_main_config(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
manager.update_main_config(prop='foo.bar', value=100)
assert manager.get_filtered_config('main')['foo.bar'] == 100
def test_update_main_config_throws_exception_on_sensitive_field(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(ConfigUpdateNotAllowed):
manager.update_main_config(prop='host', value='this is not allowed')
async def test_update_global_agent_config(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
await manager.update_global_agent_config(sleep_min=5, sleep_max=10)
agent_config = manager.get_filtered_config('agents')
assert agent_config['sleep_min'] == 5
assert agent_config['sleep_max'] == 10
async def test_update_global_agent_config_allows_partial_updates(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
agent_config = manager.get_filtered_config('agents')
await manager.update_global_agent_config() # no arguments passed in--should no-op
assert manager.get_filtered_config('agents') == agent_config
async def test_update_global_agent_config_updates_list_properties(base_world, ability):
stub_data_svc = StubDataService()
stub_data_svc.abilities = [
ability('ability-1'),
ability('ability-2'),
ability('ability-3')
]
manager = ConfigApiManager(data_svc=stub_data_svc, file_svc=None)
await manager.update_global_agent_config(
deadman_abilities=['ability-1', 'ability-2'],
bootstrap_abilities=['ability-3']
)
agent_config = manager.get_filtered_config('agents')
assert agent_config['deadman_abilities'] == ['ability-1', 'ability-2']
assert agent_config['bootstrap_abilities'] == ['ability-3']
async def test_update_global_agent_config_throws_validation_error_bad_sleep_min(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_global_agent_config(sleep_min=-1)
async def test_update_global_agent_config_throws_validation_error_bad_sleep_max(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_global_agent_config(sleep_max=-1)
async def test_update_global_agent_config_throws_validation_error_bad_watchdog(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_global_agent_config(watchdog=-1)
async def test_update_global_agent_config_throws_validation_error_bad_untrusted_timer(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_global_agent_config(untrusted_timer=-1)
async def test_update_global_agent_config_throws_validation_error_bad_implant_name(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_global_agent_config(implant_name='')
async def test_update_main_config_throws_validation_error_empty_prop(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_main_config(prop='', value=1234)
| 31.514151 | 108 | 0.68822 | import pytest
from app.api.v2 import errors
from app.api.v2.managers import config_api_manager
from app.api.v2.managers.config_api_manager import ConfigApiManager, ConfigNotFound, ConfigUpdateNotAllowed
from app.utility.base_world import BaseWorld
class StubDataService:
def __init__(self,):
self.abilities = []
async def locate(self, key):
assert key == 'abilities'
return self.abilities
@pytest.fixture
def base_world():
main_conf = {
'app.contact.dns.domain': 'mycaldera.caldera',
'app.contact.dns.socket': '0.0.0.0:8853',
'app.contact.html': '/weather',
'app.contact.http': 'http://0.0.0.0:8888',
'app.contact.tcp': '0.0.0.0:7010',
'app.contact.tunnel.ssh.socket': '0.0.0.0:8022',
'app.contact.udp': '0.0.0.0:7013',
'app.contact.websocket': '0.0.0.0:7012',
'exfil_dir': '/tmp/caldera',
'plugins': [
'stockpile',
'atomic'
],
'reports_dir': '/tmp',
'host': '0.0.0.0',
'auth.login.handler.module': 'default',
'users': {
'red': {
'red': 'password-foo'
},
'blue': {
'blue': 'password-bar'
}
}
}
agents_conf = {
'sleep_min': '30',
'sleep_max': '60',
'untrusted_timer': '90',
'watchdog': '0',
'implant_name': 'splunkd',
'deadman_abilities': [
'this-is-a-fake-ability'
],
'bootstrap_abilities': [
'this-is-another-fake-ability'
]
}
BaseWorld.clear_config()
BaseWorld.apply_config('main', main_conf)
BaseWorld.apply_config('agents', agents_conf)
yield BaseWorld
BaseWorld.clear_config()
def test_filter_keys():
mapping = {
'foo': 1,
'bar': 2,
'baz': {
'key3': 3,
'key4': 4
}
}
filtered = config_api_manager.filter_keys(mapping, keys_to_remove=['baz', 'bar'])
expected = {'foo': 1}
assert filtered == expected
def test_get_filtered_config_remove_sensitive_keys(base_world, data_svc):
test_conf = {
'users': 'this should be filtered',
'host': 'this should be filtered',
'foo': '1',
'bar': '2',
'baz': '3'
}
base_world.apply_config('test', test_conf)
manager = ConfigApiManager(data_svc, None)
filtered = manager.get_filtered_config('test')
expected = {
'foo': '1',
'bar': '2',
'baz': '3'
}
assert filtered == expected
def test_get_filtered_config_all_sensitive_keys_filtered(base_world, data_svc):
sensitive_conf = {key: 'foo' for key in config_api_manager.SENSITIVE_CONFIG_PROPS}
base_world.apply_config('test', sensitive_conf)
assert base_world.get_config(name='test') == sensitive_conf
manager = ConfigApiManager(data_svc, None)
filtered = manager.get_filtered_config('test')
assert filtered == {}
def test_get_filtered_config_throws_exception_on_not_found(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(ConfigNotFound):
manager.get_filtered_config('THIS DOES NOT EXIST')
def test_update_main_config(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
manager.update_main_config(prop='foo.bar', value=100)
assert manager.get_filtered_config('main')['foo.bar'] == 100
def test_update_main_config_throws_exception_on_sensitive_field(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(ConfigUpdateNotAllowed):
manager.update_main_config(prop='host', value='this is not allowed')
async def test_update_global_agent_config(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
await manager.update_global_agent_config(sleep_min=5, sleep_max=10)
agent_config = manager.get_filtered_config('agents')
assert agent_config['sleep_min'] == 5
assert agent_config['sleep_max'] == 10
async def test_update_global_agent_config_allows_partial_updates(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
agent_config = manager.get_filtered_config('agents')
await manager.update_global_agent_config()
assert manager.get_filtered_config('agents') == agent_config
async def test_update_global_agent_config_updates_list_properties(base_world, ability):
stub_data_svc = StubDataService()
stub_data_svc.abilities = [
ability('ability-1'),
ability('ability-2'),
ability('ability-3')
]
manager = ConfigApiManager(data_svc=stub_data_svc, file_svc=None)
await manager.update_global_agent_config(
deadman_abilities=['ability-1', 'ability-2'],
bootstrap_abilities=['ability-3']
)
agent_config = manager.get_filtered_config('agents')
assert agent_config['deadman_abilities'] == ['ability-1', 'ability-2']
assert agent_config['bootstrap_abilities'] == ['ability-3']
async def test_update_global_agent_config_throws_validation_error_bad_sleep_min(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_global_agent_config(sleep_min=-1)
async def test_update_global_agent_config_throws_validation_error_bad_sleep_max(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_global_agent_config(sleep_max=-1)
async def test_update_global_agent_config_throws_validation_error_bad_watchdog(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_global_agent_config(watchdog=-1)
async def test_update_global_agent_config_throws_validation_error_bad_untrusted_timer(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_global_agent_config(untrusted_timer=-1)
async def test_update_global_agent_config_throws_validation_error_bad_implant_name(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_global_agent_config(implant_name='')
async def test_update_main_config_throws_validation_error_empty_prop(base_world, data_svc):
manager = ConfigApiManager(data_svc, None)
with pytest.raises(errors.DataValidationError):
await manager.update_main_config(prop='', value=1234)
| true | true |
f727385f21f2d811533cd0c665f73487b0a69b03 | 4,078 | py | Python | salt/runners/git_pillar.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | null | null | null | salt/runners/git_pillar.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 1 | 2017-07-10T21:44:39.000Z | 2017-07-10T21:44:39.000Z | salt/runners/git_pillar.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | null | null | null | """
Runner module to directly manage the git external pillar
"""
import logging
import salt.pillar.git_pillar
import salt.utils.gitfs
from salt.exceptions import SaltRunnerError
log = logging.getLogger(__name__)
def update(branch=None, repo=None):
"""
.. versionadded:: 2014.1.0
.. versionchanged:: 2015.8.4
This runner function now supports the :ref:`git_pillar
configuration schema <git-pillar-configuration>` introduced in
2015.8.0. Additionally, the branch and repo can now be omitted to
update all git_pillar remotes. The return data has also changed to
a dictionary. The values will be ``True`` only if new commits were
fetched, and ``False`` if there were errors or no new commits were
fetched.
.. versionchanged:: 2018.3.0
The return for a given git_pillar remote will now be ``None`` when no
changes were fetched. ``False`` now is reserved only for instances in
which there were errors.
.. versionchanged:: 3001
The repo parameter also matches against the repo name.
Fetch one or all configured git_pillar remotes.
.. note::
This will *not* fast-forward the git_pillar cachedir on the master. All
it does is perform a ``git fetch``. If this runner is executed with
``-l debug``, you may see a log message that says that the repo is
up-to-date. Keep in mind that Salt automatically fetches git_pillar
repos roughly every 60 seconds (or whatever
:conf_master:`loop_interval` is set to). So, it is possible that the
repo was fetched automatically in the time between when changes were
pushed to the repo, and when this runner was executed. When in doubt,
simply refresh pillar data using :py:func:`saltutil.refresh_pillar
<salt.modules.saltutil.refresh_pillar>` and then use
:py:func:`pillar.item <salt.modules.pillar.item>` to check if the
pillar data has changed as expected.
CLI Example:
.. code-block:: bash
# Update specific branch and repo
salt-run git_pillar.update branch='branch' repo='https://foo.com/bar.git'
# Update specific repo, by name
salt-run git_pillar.update repo=myrepo
# Update all repos
salt-run git_pillar.update
# Run with debug logging
salt-run git_pillar.update -l debug
"""
ret = {}
for ext_pillar in __opts__.get("ext_pillar", []):
pillar_type = next(iter(ext_pillar))
if pillar_type != "git":
continue
pillar_conf = ext_pillar[pillar_type]
pillar = salt.utils.gitfs.GitPillar(
__opts__,
pillar_conf,
per_remote_overrides=salt.pillar.git_pillar.PER_REMOTE_OVERRIDES,
per_remote_only=salt.pillar.git_pillar.PER_REMOTE_ONLY,
global_only=salt.pillar.git_pillar.GLOBAL_ONLY,
)
for remote in pillar.remotes:
# Skip this remote if it doesn't match the search criteria
if branch is not None:
if branch != remote.branch:
continue
if repo is not None:
if repo != remote.url and repo != getattr(remote, "name", None):
continue
try:
result = remote.fetch()
except Exception as exc: # pylint: disable=broad-except
log.error(
"Exception '%s' caught while fetching git_pillar " "remote '%s'",
exc,
remote.id,
exc_info_on_loglevel=logging.DEBUG,
)
result = False
finally:
remote.clear_lock()
ret[remote.id] = result
if not ret:
if branch is not None or repo is not None:
raise SaltRunnerError(
"Specified git branch/repo not found in ext_pillar config"
)
else:
raise SaltRunnerError("No git_pillar remotes are configured")
return ret
| 37.759259 | 85 | 0.620157 |
import logging
import salt.pillar.git_pillar
import salt.utils.gitfs
from salt.exceptions import SaltRunnerError
log = logging.getLogger(__name__)
def update(branch=None, repo=None):
ret = {}
for ext_pillar in __opts__.get("ext_pillar", []):
pillar_type = next(iter(ext_pillar))
if pillar_type != "git":
continue
pillar_conf = ext_pillar[pillar_type]
pillar = salt.utils.gitfs.GitPillar(
__opts__,
pillar_conf,
per_remote_overrides=salt.pillar.git_pillar.PER_REMOTE_OVERRIDES,
per_remote_only=salt.pillar.git_pillar.PER_REMOTE_ONLY,
global_only=salt.pillar.git_pillar.GLOBAL_ONLY,
)
for remote in pillar.remotes:
if branch is not None:
if branch != remote.branch:
continue
if repo is not None:
if repo != remote.url and repo != getattr(remote, "name", None):
continue
try:
result = remote.fetch()
except Exception as exc: # pylint: disable=broad-except
log.error(
"Exception '%s' caught while fetching git_pillar " "remote '%s'",
exc,
remote.id,
exc_info_on_loglevel=logging.DEBUG,
)
result = False
finally:
remote.clear_lock()
ret[remote.id] = result
if not ret:
if branch is not None or repo is not None:
raise SaltRunnerError(
"Specified git branch/repo not found in ext_pillar config"
)
else:
raise SaltRunnerError("No git_pillar remotes are configured")
return ret
| true | true |
f72738ce22a36dacc0601114240ea55abf166fad | 832 | py | Python | FreeTAKServer/controllers/SpecificCoTControllers/SendFederatedCoT.py | Tapawingo/FreeTakServer | 30259fa0fb5a69bbf6606f06d9cd40a63d2aa4fd | [
"MIT"
] | 27 | 2020-05-01T01:45:59.000Z | 2020-07-03T00:17:13.000Z | FreeTAKServer/controllers/SpecificCoTControllers/SendFederatedCoT.py | Tapawingo/FreeTakServer | 30259fa0fb5a69bbf6606f06d9cd40a63d2aa4fd | [
"MIT"
] | 34 | 2020-04-26T11:25:52.000Z | 2020-07-03T21:06:34.000Z | FreeTAKServer/controllers/SpecificCoTControllers/SendFederatedCoT.py | Tapawingo/FreeTakServer | 30259fa0fb5a69bbf6606f06d9cd40a63d2aa4fd | [
"MIT"
] | 15 | 2020-05-01T01:46:07.000Z | 2020-07-03T12:14:04.000Z | from FreeTAKServer.model.SpecificCoT.SendFederatedCoT import SendFederatedCoT
from .SendCoTAbstractController import SendCoTAbstractController
from FreeTAKServer.controllers.configuration.LoggingConstants import LoggingConstants
from FreeTAKServer.controllers.CreateLoggerController import CreateLoggerController
loggingConstants = LoggingConstants()
logger = CreateLoggerController("SendDisconnectController").getLogger()
class SendFederatedCoT(SendCoTAbstractController):
def __init__(self, RawCoT):
try:
tempObject = super().Event.FederatedCoT()
object = SendFederatedCoT()
self.fill_object(object, tempObject, RawCoT, addToDB=False)
except Exception as e:
logger.error("there has been an exception in the creation of the send federated cot object " + str(e)) | 52 | 114 | 0.78125 | from FreeTAKServer.model.SpecificCoT.SendFederatedCoT import SendFederatedCoT
from .SendCoTAbstractController import SendCoTAbstractController
from FreeTAKServer.controllers.configuration.LoggingConstants import LoggingConstants
from FreeTAKServer.controllers.CreateLoggerController import CreateLoggerController
loggingConstants = LoggingConstants()
logger = CreateLoggerController("SendDisconnectController").getLogger()
class SendFederatedCoT(SendCoTAbstractController):
def __init__(self, RawCoT):
try:
tempObject = super().Event.FederatedCoT()
object = SendFederatedCoT()
self.fill_object(object, tempObject, RawCoT, addToDB=False)
except Exception as e:
logger.error("there has been an exception in the creation of the send federated cot object " + str(e)) | true | true |
f7273915b911e2c9ab5a33795229deb37059132d | 22,981 | py | Python | Tools/scripts/freeze_modules.py | erickpeirson/cpython | d441437ee71ae174c008c23308b749b91020ba77 | [
"0BSD"
] | null | null | null | Tools/scripts/freeze_modules.py | erickpeirson/cpython | d441437ee71ae174c008c23308b749b91020ba77 | [
"0BSD"
] | null | null | null | Tools/scripts/freeze_modules.py | erickpeirson/cpython | d441437ee71ae174c008c23308b749b91020ba77 | [
"0BSD"
] | null | null | null | """Freeze modules and regen related files (e.g. Python/frozen.c).
See the notes at the top of Python/frozen.c for more info.
"""
from collections import namedtuple
import hashlib
import os
import ntpath
import posixpath
import platform
import subprocess
import sys
import textwrap
import time
from update_file import updating_file_with_tmpfile, update_file_with_tmpfile
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
ROOT_DIR = os.path.abspath(ROOT_DIR)
STDLIB_DIR = os.path.join(ROOT_DIR, 'Lib')
# If MODULES_DIR is changed then the .gitattributes and .gitignore files
# need to be updated.
MODULES_DIR = os.path.join(ROOT_DIR, 'Python', 'frozen_modules')
if sys.platform != "win32":
TOOL = os.path.join(ROOT_DIR, 'Programs', '_freeze_module')
if not os.path.isfile(TOOL):
# When building out of the source tree, get the tool from the current
# directory
TOOL = os.path.join('Programs', '_freeze_module')
TOOL = os.path.abspath(TOOL)
if not os.path.isfile(TOOL):
sys.exit("ERROR: missing _freeze_module")
else:
def find_tool():
archs = ['amd64', 'win32']
if platform.machine() == "ARM64":
archs.append('arm64')
for arch in archs:
for exe in ['_freeze_module.exe', '_freeze_module_d.exe']:
tool = os.path.join(ROOT_DIR, 'PCbuild', arch, exe)
if os.path.isfile(tool):
return tool
sys.exit("ERROR: missing _freeze_module.exe; you need to run PCbuild/build.bat")
TOOL = find_tool()
del find_tool
MANIFEST = os.path.join(MODULES_DIR, 'MANIFEST')
FROZEN_FILE = os.path.join(ROOT_DIR, 'Python', 'frozen.c')
MAKEFILE = os.path.join(ROOT_DIR, 'Makefile.pre.in')
PCBUILD_PROJECT = os.path.join(ROOT_DIR, 'PCbuild', '_freeze_module.vcxproj')
PCBUILD_FILTERS = os.path.join(ROOT_DIR, 'PCbuild', '_freeze_module.vcxproj.filters')
TEST_CTYPES = os.path.join(STDLIB_DIR, 'ctypes', 'test', 'test_values.py')
OS_PATH = 'ntpath' if os.name == 'nt' else 'posixpath'
# These are modules that get frozen.
FROZEN = [
# See parse_frozen_spec() for the format.
# In cases where the frozenid is duplicated, the first one is re-used.
('import system', [
# These frozen modules are necessary for bootstrapping
# the import system.
'importlib._bootstrap : _frozen_importlib',
'importlib._bootstrap_external : _frozen_importlib_external',
# This module is important because some Python builds rely
# on a builtin zip file instead of a filesystem.
'zipimport',
]),
('stdlib - startup, without site (python -S)', [
'abc',
'codecs',
# For now we do not freeze the encodings, due # to the noise all
# those extra modules add to the text printed during the build.
# (See https://github.com/python/cpython/pull/28398#pullrequestreview-756856469.)
#'<encodings.*>',
'io',
]),
('stdlib - startup, with site', [
'_collections_abc',
'_sitebuiltins',
'genericpath',
'ntpath',
'posixpath',
# We must explicitly mark os.path as a frozen module
# even though it will never be imported.
f'{OS_PATH} : os.path',
'os',
'site',
'stat',
]),
('Test module', [
'__hello__',
'__hello__ : <__phello__>',
'__hello__ : __phello__.spam',
]),
]
ESSENTIAL = {
'importlib._bootstrap',
'importlib._bootstrap_external',
'zipimport',
}
#######################################
# platform-specific helpers
if os.path is posixpath:
relpath_for_posix_display = os.path.relpath
def relpath_for_windows_display(path, base):
return ntpath.relpath(
ntpath.join(*path.split(os.path.sep)),
ntpath.join(*base.split(os.path.sep)),
)
else:
relpath_for_windows_display = ntpath.relpath
def relpath_for_posix_display(path, base):
return posixpath.relpath(
posixpath.join(*path.split(os.path.sep)),
posixpath.join(*base.split(os.path.sep)),
)
#######################################
# specs
def parse_frozen_specs(sectionalspecs=FROZEN, destdir=None):
seen = {}
for section, specs in sectionalspecs:
parsed = _parse_specs(specs, section, seen)
for frozenid, pyfile, modname, ispkg, section in parsed:
try:
source = seen[frozenid]
except KeyError:
source = FrozenSource.from_id(frozenid, pyfile, destdir)
seen[frozenid] = source
else:
assert not pyfile
yield FrozenModule(modname, ispkg, section, source)
def _parse_specs(specs, section, seen):
for spec in specs:
info, subs = _parse_spec(spec, seen, section)
yield info
for info in subs or ():
yield info
def _parse_spec(spec, knownids=None, section=None):
"""Yield an info tuple for each module corresponding to the given spec.
The info consists of: (frozenid, pyfile, modname, ispkg, section).
Supported formats:
frozenid
frozenid : modname
frozenid : modname = pyfile
"frozenid" and "modname" must be valid module names (dot-separated
identifiers). If "modname" is not provided then "frozenid" is used.
If "pyfile" is not provided then the filename of the module
corresponding to "frozenid" is used.
Angle brackets around a frozenid (e.g. '<encodings>") indicate
it is a package. This also means it must be an actual module
(i.e. "pyfile" cannot have been provided). Such values can have
patterns to expand submodules:
<encodings.*> - also freeze all direct submodules
<encodings.**.*> - also freeze the full submodule tree
As with "frozenid", angle brackets around "modname" indicate
it is a package. However, in this case "pyfile" should not
have been provided and patterns in "modname" are not supported.
Also, if "modname" has brackets then "frozenid" should not,
and "pyfile" should have been provided..
"""
frozenid, _, remainder = spec.partition(':')
modname, _, pyfile = remainder.partition('=')
frozenid = frozenid.strip()
modname = modname.strip()
pyfile = pyfile.strip()
submodules = None
if modname.startswith('<') and modname.endswith('>'):
assert check_modname(frozenid), spec
modname = modname[1:-1]
assert check_modname(modname), spec
if frozenid in knownids:
pass
elif pyfile:
assert not os.path.isdir(pyfile), spec
else:
pyfile = _resolve_module(frozenid, ispkg=False)
ispkg = True
elif pyfile:
assert check_modname(frozenid), spec
assert not knownids or frozenid not in knownids, spec
assert check_modname(modname), spec
assert not os.path.isdir(pyfile), spec
ispkg = False
elif knownids and frozenid in knownids:
assert check_modname(frozenid), spec
assert check_modname(modname), spec
ispkg = False
else:
assert not modname or check_modname(modname), spec
resolved = iter(resolve_modules(frozenid))
frozenid, pyfile, ispkg = next(resolved)
if not modname:
modname = frozenid
if ispkg:
pkgid = frozenid
pkgname = modname
pkgfiles = {pyfile: pkgid}
def iter_subs():
for frozenid, pyfile, ispkg in resolved:
assert not knownids or frozenid not in knownids, (frozenid, spec)
if pkgname:
modname = frozenid.replace(pkgid, pkgname, 1)
else:
modname = frozenid
if pyfile:
if pyfile in pkgfiles:
frozenid = pkgfiles[pyfile]
pyfile = None
elif ispkg:
pkgfiles[pyfile] = frozenid
yield frozenid, pyfile, modname, ispkg, section
submodules = iter_subs()
info = (frozenid, pyfile or None, modname, ispkg, section)
return info, submodules
#######################################
# frozen source files
class FrozenSource(namedtuple('FrozenSource', 'id pyfile frozenfile')):
@classmethod
def from_id(cls, frozenid, pyfile=None, destdir=MODULES_DIR):
if not pyfile:
pyfile = os.path.join(STDLIB_DIR, *frozenid.split('.')) + '.py'
#assert os.path.exists(pyfile), (frozenid, pyfile)
frozenfile = resolve_frozen_file(frozenid, destdir)
return cls(frozenid, pyfile, frozenfile)
@property
def frozenid(self):
return self.id
@property
def modname(self):
if self.pyfile.startswith(STDLIB_DIR):
return self.id
return None
@property
def symbol(self):
# This matches what we do in Programs/_freeze_module.c:
name = self.frozenid.replace('.', '_')
return '_Py_M__' + name
def resolve_frozen_file(frozenid, destdir=MODULES_DIR):
"""Return the filename corresponding to the given frozen ID.
For stdlib modules the ID will always be the full name
of the source module.
"""
if not isinstance(frozenid, str):
try:
frozenid = frozenid.frozenid
except AttributeError:
raise ValueError(f'unsupported frozenid {frozenid!r}')
# We use a consistent naming convention for all frozen modules.
frozenfile = f'{frozenid}.h'
if not destdir:
return frozenfile
return os.path.join(destdir, frozenfile)
#######################################
# frozen modules
class FrozenModule(namedtuple('FrozenModule', 'name ispkg section source')):
def __getattr__(self, name):
return getattr(self.source, name)
@property
def modname(self):
return self.name
def summarize(self):
source = self.source.modname
if source:
source = f'<{source}>'
else:
source = relpath_for_posix_display(self.pyfile, ROOT_DIR)
return {
'module': self.name,
'ispkg': self.ispkg,
'source': source,
'frozen': os.path.basename(self.frozenfile),
'checksum': _get_checksum(self.frozenfile),
}
def _iter_sources(modules):
seen = set()
for mod in modules:
if mod.source not in seen:
yield mod.source
seen.add(mod.source)
#######################################
# generic helpers
def _get_checksum(filename):
with open(filename) as infile:
text = infile.read()
m = hashlib.sha256()
m.update(text.encode('utf8'))
return m.hexdigest()
def resolve_modules(modname, pyfile=None):
if modname.startswith('<') and modname.endswith('>'):
if pyfile:
assert os.path.isdir(pyfile) or os.path.basename(pyfile) == '__init__.py', pyfile
ispkg = True
modname = modname[1:-1]
rawname = modname
# For now, we only expect match patterns at the end of the name.
_modname, sep, match = modname.rpartition('.')
if sep:
if _modname.endswith('.**'):
modname = _modname[:-3]
match = f'**.{match}'
elif match and not match.isidentifier():
modname = _modname
# Otherwise it's a plain name so we leave it alone.
else:
match = None
else:
ispkg = False
rawname = modname
match = None
if not check_modname(modname):
raise ValueError(f'not a valid module name ({rawname})')
if not pyfile:
pyfile = _resolve_module(modname, ispkg=ispkg)
elif os.path.isdir(pyfile):
pyfile = _resolve_module(modname, pyfile, ispkg)
yield modname, pyfile, ispkg
if match:
pkgdir = os.path.dirname(pyfile)
yield from iter_submodules(modname, pkgdir, match)
def check_modname(modname):
return all(n.isidentifier() for n in modname.split('.'))
def iter_submodules(pkgname, pkgdir=None, match='*'):
if not pkgdir:
pkgdir = os.path.join(STDLIB_DIR, *pkgname.split('.'))
if not match:
match = '**.*'
match_modname = _resolve_modname_matcher(match, pkgdir)
def _iter_submodules(pkgname, pkgdir):
for entry in sorted(os.scandir(pkgdir), key=lambda e: e.name):
matched, recursive = match_modname(entry.name)
if not matched:
continue
modname = f'{pkgname}.{entry.name}'
if modname.endswith('.py'):
yield modname[:-3], entry.path, False
elif entry.is_dir():
pyfile = os.path.join(entry.path, '__init__.py')
# We ignore namespace packages.
if os.path.exists(pyfile):
yield modname, pyfile, True
if recursive:
yield from _iter_submodules(modname, entry.path)
return _iter_submodules(pkgname, pkgdir)
def _resolve_modname_matcher(match, rootdir=None):
if isinstance(match, str):
if match.startswith('**.'):
recursive = True
pat = match[3:]
assert match
else:
recursive = False
pat = match
if pat == '*':
def match_modname(modname):
return True, recursive
else:
raise NotImplementedError(match)
elif callable(match):
match_modname = match(rootdir)
else:
raise ValueError(f'unsupported matcher {match!r}')
return match_modname
def _resolve_module(modname, pathentry=STDLIB_DIR, ispkg=False):
assert pathentry, pathentry
pathentry = os.path.normpath(pathentry)
assert os.path.isabs(pathentry)
if ispkg:
return os.path.join(pathentry, *modname.split('.'), '__init__.py')
return os.path.join(pathentry, *modname.split('.')) + '.py'
#######################################
# regenerating dependent files
def find_marker(lines, marker, file):
for pos, line in enumerate(lines):
if marker in line:
return pos
raise Exception(f"Can't find {marker!r} in file {file}")
def replace_block(lines, start_marker, end_marker, replacements, file):
start_pos = find_marker(lines, start_marker, file)
end_pos = find_marker(lines, end_marker, file)
if end_pos <= start_pos:
raise Exception(f"End marker {end_marker!r} "
f"occurs before start marker {start_marker!r} "
f"in file {file}")
replacements = [line.rstrip() + '\n' for line in replacements]
return lines[:start_pos + 1] + replacements + lines[end_pos:]
def regen_manifest(modules):
header = 'module ispkg source frozen checksum'.split()
widths = [5] * len(header)
rows = []
for mod in modules:
info = mod.summarize()
row = []
for i, col in enumerate(header):
value = info[col]
if col == 'checksum':
value = value[:12]
elif col == 'ispkg':
value = 'YES' if value else 'no'
widths[i] = max(widths[i], len(value))
row.append(value or '-')
rows.append(row)
modlines = [
'# The list of frozen modules with key information.',
'# Note that the "check_generated_files" CI job will identify',
'# when source files were changed but regen-frozen wasn\'t run.',
'# This file is auto-generated by Tools/scripts/freeze_modules.py.',
' '.join(c.center(w) for c, w in zip(header, widths)).rstrip(),
' '.join('-' * w for w in widths),
]
for row in rows:
for i, w in enumerate(widths):
if header[i] == 'ispkg':
row[i] = row[i].center(w)
else:
row[i] = row[i].ljust(w)
modlines.append(' '.join(row).rstrip())
print(f'# Updating {os.path.relpath(MANIFEST)}')
with open(MANIFEST, 'w') as outfile:
lines = (l + '\n' for l in modlines)
outfile.writelines(lines)
def regen_frozen(modules):
headerlines = []
parentdir = os.path.dirname(FROZEN_FILE)
for src in _iter_sources(modules):
# Adding a comment to separate sections here doesn't add much,
# so we don't.
header = relpath_for_posix_display(src.frozenfile, parentdir)
headerlines.append(f'#include "{header}"')
deflines = []
indent = ' '
lastsection = None
for mod in modules:
if mod.section != lastsection:
if lastsection is not None:
deflines.append('')
deflines.append(f'/* {mod.section} */')
lastsection = mod.section
symbol = mod.symbol
pkg = '-' if mod.ispkg else ''
line = ('{"%s", %s, %s(int)sizeof(%s)},'
) % (mod.name, symbol, pkg, symbol)
# TODO: Consider not folding lines
if len(line) < 80:
deflines.append(line)
else:
line1, _, line2 = line.rpartition(' ')
deflines.append(line1)
deflines.append(indent + line2)
if not deflines[0]:
del deflines[0]
for i, line in enumerate(deflines):
if line:
deflines[i] = indent + line
print(f'# Updating {os.path.relpath(FROZEN_FILE)}')
with updating_file_with_tmpfile(FROZEN_FILE) as (infile, outfile):
lines = infile.readlines()
# TODO: Use more obvious markers, e.g.
# $START GENERATED FOOBAR$ / $END GENERATED FOOBAR$
lines = replace_block(
lines,
"/* Includes for frozen modules: */",
"/* End includes */",
headerlines,
FROZEN_FILE,
)
lines = replace_block(
lines,
"static const struct _frozen _PyImport_FrozenModules[] =",
"/* sentinel */",
deflines,
FROZEN_FILE,
)
outfile.writelines(lines)
def regen_makefile(modules):
pyfiles = []
frozenfiles = []
rules = ['']
for src in _iter_sources(modules):
header = relpath_for_posix_display(src.frozenfile, ROOT_DIR)
frozenfiles.append(f'\t\t{header} \\')
pyfile = relpath_for_posix_display(src.pyfile, ROOT_DIR)
pyfiles.append(f'\t\t{pyfile} \\')
freeze = (f'Programs/_freeze_module {src.frozenid} '
f'$(srcdir)/{pyfile} $(srcdir)/{header}')
rules.extend([
f'{header}: Programs/_freeze_module {pyfile}',
f'\t{freeze}',
'',
])
pyfiles[-1] = pyfiles[-1].rstrip(" \\")
frozenfiles[-1] = frozenfiles[-1].rstrip(" \\")
print(f'# Updating {os.path.relpath(MAKEFILE)}')
with updating_file_with_tmpfile(MAKEFILE) as (infile, outfile):
lines = infile.readlines()
lines = replace_block(
lines,
"FROZEN_FILES_IN =",
"# End FROZEN_FILES_IN",
pyfiles,
MAKEFILE,
)
lines = replace_block(
lines,
"FROZEN_FILES_OUT =",
"# End FROZEN_FILES_OUT",
frozenfiles,
MAKEFILE,
)
lines = replace_block(
lines,
"# BEGIN: freezing modules",
"# END: freezing modules",
rules,
MAKEFILE,
)
outfile.writelines(lines)
def regen_pcbuild(modules):
projlines = []
filterlines = []
for src in _iter_sources(modules):
pyfile = relpath_for_windows_display(src.pyfile, ROOT_DIR)
header = relpath_for_windows_display(src.frozenfile, ROOT_DIR)
intfile = ntpath.splitext(ntpath.basename(header))[0] + '.g.h'
projlines.append(f' <None Include="..\\{pyfile}">')
projlines.append(f' <ModName>{src.frozenid}</ModName>')
projlines.append(f' <IntFile>$(IntDir){intfile}</IntFile>')
projlines.append(f' <OutFile>$(PySourcePath){header}</OutFile>')
projlines.append(f' </None>')
filterlines.append(f' <None Include="..\\{pyfile}">')
filterlines.append(' <Filter>Python Files</Filter>')
filterlines.append(' </None>')
print(f'# Updating {os.path.relpath(PCBUILD_PROJECT)}')
with updating_file_with_tmpfile(PCBUILD_PROJECT) as (infile, outfile):
lines = infile.readlines()
lines = replace_block(
lines,
'<!-- BEGIN frozen modules -->',
'<!-- END frozen modules -->',
projlines,
PCBUILD_PROJECT,
)
outfile.writelines(lines)
print(f'# Updating {os.path.relpath(PCBUILD_FILTERS)}')
with updating_file_with_tmpfile(PCBUILD_FILTERS) as (infile, outfile):
lines = infile.readlines()
lines = replace_block(
lines,
'<!-- BEGIN frozen modules -->',
'<!-- END frozen modules -->',
filterlines,
PCBUILD_FILTERS,
)
outfile.writelines(lines)
#######################################
# freezing modules
def freeze_module(modname, pyfile=None, destdir=MODULES_DIR):
"""Generate the frozen module .h file for the given module."""
tmpsuffix = f'.{int(time.time())}'
for modname, pyfile, ispkg in resolve_modules(modname, pyfile):
frozenfile = resolve_frozen_file(modname, destdir)
_freeze_module(modname, pyfile, frozenfile, tmpsuffix)
def _freeze_module(frozenid, pyfile, frozenfile, tmpsuffix):
tmpfile = f'{frozenfile}.{int(time.time())}'
print(tmpfile)
argv = [TOOL, frozenid, pyfile, tmpfile]
print('#', ' '.join(os.path.relpath(a) for a in argv), flush=True)
try:
subprocess.run(argv, check=True)
except (FileNotFoundError, subprocess.CalledProcessError):
if not os.path.exists(TOOL):
sys.exit(f'ERROR: missing {TOOL}; you need to run "make regen-frozen"')
raise # re-raise
update_file_with_tmpfile(frozenfile, tmpfile, create=True)
#######################################
# the script
def main():
# Expand the raw specs, preserving order.
modules = list(parse_frozen_specs(destdir=MODULES_DIR))
# Regen build-related files.
regen_makefile(modules)
regen_pcbuild(modules)
# Freeze the target modules.
tmpsuffix = f'.{int(time.time())}'
for src in _iter_sources(modules):
_freeze_module(src.frozenid, src.pyfile, src.frozenfile, tmpsuffix)
# Regen files dependent of frozen file details.
regen_frozen(modules)
regen_manifest(modules)
if __name__ == '__main__':
argv = sys.argv[1:]
if argv:
sys.exit('ERROR: got unexpected args {argv}')
main()
| 32.924069 | 93 | 0.591576 |
from collections import namedtuple
import hashlib
import os
import ntpath
import posixpath
import platform
import subprocess
import sys
import textwrap
import time
from update_file import updating_file_with_tmpfile, update_file_with_tmpfile
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
ROOT_DIR = os.path.abspath(ROOT_DIR)
STDLIB_DIR = os.path.join(ROOT_DIR, 'Lib')
MODULES_DIR = os.path.join(ROOT_DIR, 'Python', 'frozen_modules')
if sys.platform != "win32":
TOOL = os.path.join(ROOT_DIR, 'Programs', '_freeze_module')
if not os.path.isfile(TOOL):
TOOL = os.path.join('Programs', '_freeze_module')
TOOL = os.path.abspath(TOOL)
if not os.path.isfile(TOOL):
sys.exit("ERROR: missing _freeze_module")
else:
def find_tool():
archs = ['amd64', 'win32']
if platform.machine() == "ARM64":
archs.append('arm64')
for arch in archs:
for exe in ['_freeze_module.exe', '_freeze_module_d.exe']:
tool = os.path.join(ROOT_DIR, 'PCbuild', arch, exe)
if os.path.isfile(tool):
return tool
sys.exit("ERROR: missing _freeze_module.exe; you need to run PCbuild/build.bat")
TOOL = find_tool()
del find_tool
MANIFEST = os.path.join(MODULES_DIR, 'MANIFEST')
FROZEN_FILE = os.path.join(ROOT_DIR, 'Python', 'frozen.c')
MAKEFILE = os.path.join(ROOT_DIR, 'Makefile.pre.in')
PCBUILD_PROJECT = os.path.join(ROOT_DIR, 'PCbuild', '_freeze_module.vcxproj')
PCBUILD_FILTERS = os.path.join(ROOT_DIR, 'PCbuild', '_freeze_module.vcxproj.filters')
TEST_CTYPES = os.path.join(STDLIB_DIR, 'ctypes', 'test', 'test_values.py')
OS_PATH = 'ntpath' if os.name == 'nt' else 'posixpath'
FROZEN = [
('import system', [
'importlib._bootstrap : _frozen_importlib',
'importlib._bootstrap_external : _frozen_importlib_external',
'zipimport',
]),
('stdlib - startup, without site (python -S)', [
'abc',
'codecs',
]),
('stdlib - startup, with site', [
'_collections_abc',
'_sitebuiltins',
'genericpath',
'ntpath',
'posixpath',
f'{OS_PATH} : os.path',
'os',
'site',
'stat',
]),
('Test module', [
'__hello__',
'__hello__ : <__phello__>',
'__hello__ : __phello__.spam',
]),
]
ESSENTIAL = {
'importlib._bootstrap',
'importlib._bootstrap_external',
'zipimport',
}
ip()
pyfile = pyfile.strip()
submodules = None
if modname.startswith('<') and modname.endswith('>'):
assert check_modname(frozenid), spec
modname = modname[1:-1]
assert check_modname(modname), spec
if frozenid in knownids:
pass
elif pyfile:
assert not os.path.isdir(pyfile), spec
else:
pyfile = _resolve_module(frozenid, ispkg=False)
ispkg = True
elif pyfile:
assert check_modname(frozenid), spec
assert not knownids or frozenid not in knownids, spec
assert check_modname(modname), spec
assert not os.path.isdir(pyfile), spec
ispkg = False
elif knownids and frozenid in knownids:
assert check_modname(frozenid), spec
assert check_modname(modname), spec
ispkg = False
else:
assert not modname or check_modname(modname), spec
resolved = iter(resolve_modules(frozenid))
frozenid, pyfile, ispkg = next(resolved)
if not modname:
modname = frozenid
if ispkg:
pkgid = frozenid
pkgname = modname
pkgfiles = {pyfile: pkgid}
def iter_subs():
for frozenid, pyfile, ispkg in resolved:
assert not knownids or frozenid not in knownids, (frozenid, spec)
if pkgname:
modname = frozenid.replace(pkgid, pkgname, 1)
else:
modname = frozenid
if pyfile:
if pyfile in pkgfiles:
frozenid = pkgfiles[pyfile]
pyfile = None
elif ispkg:
pkgfiles[pyfile] = frozenid
yield frozenid, pyfile, modname, ispkg, section
submodules = iter_subs()
info = (frozenid, pyfile or None, modname, ispkg, section)
return info, submodules
r=MODULES_DIR):
if not isinstance(frozenid, str):
try:
frozenid = frozenid.frozenid
except AttributeError:
raise ValueError(f'unsupported frozenid {frozenid!r}')
frozenfile = f'{frozenid}.h'
if not destdir:
return frozenfile
return os.path.join(destdir, frozenfile)
.source not in seen:
yield mod.source
seen.add(mod.source)
modname = _modname
else:
match = None
else:
ispkg = False
rawname = modname
match = None
if not check_modname(modname):
raise ValueError(f'not a valid module name ({rawname})')
if not pyfile:
pyfile = _resolve_module(modname, ispkg=ispkg)
elif os.path.isdir(pyfile):
pyfile = _resolve_module(modname, pyfile, ispkg)
yield modname, pyfile, ispkg
if match:
pkgdir = os.path.dirname(pyfile)
yield from iter_submodules(modname, pkgdir, match)
def check_modname(modname):
return all(n.isidentifier() for n in modname.split('.'))
def iter_submodules(pkgname, pkgdir=None, match='*'):
if not pkgdir:
pkgdir = os.path.join(STDLIB_DIR, *pkgname.split('.'))
if not match:
match = '**.*'
match_modname = _resolve_modname_matcher(match, pkgdir)
def _iter_submodules(pkgname, pkgdir):
for entry in sorted(os.scandir(pkgdir), key=lambda e: e.name):
matched, recursive = match_modname(entry.name)
if not matched:
continue
modname = f'{pkgname}.{entry.name}'
if modname.endswith('.py'):
yield modname[:-3], entry.path, False
elif entry.is_dir():
pyfile = os.path.join(entry.path, '__init__.py')
# We ignore namespace packages.
if os.path.exists(pyfile):
yield modname, pyfile, True
if recursive:
yield from _iter_submodules(modname, entry.path)
return _iter_submodules(pkgname, pkgdir)
def _resolve_modname_matcher(match, rootdir=None):
if isinstance(match, str):
if match.startswith('**.'):
recursive = True
pat = match[3:]
assert match
else:
recursive = False
pat = match
if pat == '*':
def match_modname(modname):
return True, recursive
else:
raise NotImplementedError(match)
elif callable(match):
match_modname = match(rootdir)
else:
raise ValueError(f'unsupported matcher {match!r}')
return match_modname
def _resolve_module(modname, pathentry=STDLIB_DIR, ispkg=False):
assert pathentry, pathentry
pathentry = os.path.normpath(pathentry)
assert os.path.isabs(pathentry)
if ispkg:
return os.path.join(pathentry, *modname.split('.'), '__init__.py')
return os.path.join(pathentry, *modname.split('.')) + '.py'
#######################################
# regenerating dependent files
def find_marker(lines, marker, file):
for pos, line in enumerate(lines):
if marker in line:
return pos
raise Exception(f"Can't find {marker!r} in file {file}")
def replace_block(lines, start_marker, end_marker, replacements, file):
start_pos = find_marker(lines, start_marker, file)
end_pos = find_marker(lines, end_marker, file)
if end_pos <= start_pos:
raise Exception(f"End marker {end_marker!r} "
f"occurs before start marker {start_marker!r} "
f"in file {file}")
replacements = [line.rstrip() + '\n' for line in replacements]
return lines[:start_pos + 1] + replacements + lines[end_pos:]
def regen_manifest(modules):
header = 'module ispkg source frozen checksum'.split()
widths = [5] * len(header)
rows = []
for mod in modules:
info = mod.summarize()
row = []
for i, col in enumerate(header):
value = info[col]
if col == 'checksum':
value = value[:12]
elif col == 'ispkg':
value = 'YES' if value else 'no'
widths[i] = max(widths[i], len(value))
row.append(value or '-')
rows.append(row)
modlines = [
'# The list of frozen modules with key information.',
'# Note that the "check_generated_files" CI job will identify',
'# when source files were changed but regen-frozen wasn\'t run.',
'
' '.join(c.center(w) for c, w in zip(header, widths)).rstrip(),
' '.join('-' * w for w in widths),
]
for row in rows:
for i, w in enumerate(widths):
if header[i] == 'ispkg':
row[i] = row[i].center(w)
else:
row[i] = row[i].ljust(w)
modlines.append(' '.join(row).rstrip())
print(f'
with open(MANIFEST, 'w') as outfile:
lines = (l + '\n' for l in modlines)
outfile.writelines(lines)
def regen_frozen(modules):
headerlines = []
parentdir = os.path.dirname(FROZEN_FILE)
for src in _iter_sources(modules):
# Adding a comment to separate sections here doesn't add much,
header = relpath_for_posix_display(src.frozenfile, parentdir)
headerlines.append(f'
deflines = []
indent = ' '
lastsection = None
for mod in modules:
if mod.section != lastsection:
if lastsection is not None:
deflines.append('')
deflines.append(f'/* {mod.section} */')
lastsection = mod.section
symbol = mod.symbol
pkg = '-' if mod.ispkg else ''
line = ('{"%s", %s, %s(int)sizeof(%s)},'
) % (mod.name, symbol, pkg, symbol)
# TODO: Consider not folding lines
if len(line) < 80:
deflines.append(line)
else:
line1, _, line2 = line.rpartition(' ')
deflines.append(line1)
deflines.append(indent + line2)
if not deflines[0]:
del deflines[0]
for i, line in enumerate(deflines):
if line:
deflines[i] = indent + line
print(f'
with updating_file_with_tmpfile(FROZEN_FILE) as (infile, outfile):
lines = infile.readlines()
# TODO: Use more obvious markers, e.g.
# $START GENERATED FOOBAR$ / $END GENERATED FOOBAR$
lines = replace_block(
lines,
"/* Includes for frozen modules: */",
"/* End includes */",
headerlines,
FROZEN_FILE,
)
lines = replace_block(
lines,
"static const struct _frozen _PyImport_FrozenModules[] =",
"/* sentinel */",
deflines,
FROZEN_FILE,
)
outfile.writelines(lines)
def regen_makefile(modules):
pyfiles = []
frozenfiles = []
rules = ['']
for src in _iter_sources(modules):
header = relpath_for_posix_display(src.frozenfile, ROOT_DIR)
frozenfiles.append(f'\t\t{header} \\')
pyfile = relpath_for_posix_display(src.pyfile, ROOT_DIR)
pyfiles.append(f'\t\t{pyfile} \\')
freeze = (f'Programs/_freeze_module {src.frozenid} '
f'$(srcdir)/{pyfile} $(srcdir)/{header}')
rules.extend([
f'{header}: Programs/_freeze_module {pyfile}',
f'\t{freeze}',
'',
])
pyfiles[-1] = pyfiles[-1].rstrip(" \\")
frozenfiles[-1] = frozenfiles[-1].rstrip(" \\")
print(f'
with updating_file_with_tmpfile(MAKEFILE) as (infile, outfile):
lines = infile.readlines()
lines = replace_block(
lines,
"FROZEN_FILES_IN =",
"# End FROZEN_FILES_IN",
pyfiles,
MAKEFILE,
)
lines = replace_block(
lines,
"FROZEN_FILES_OUT =",
"# End FROZEN_FILES_OUT",
frozenfiles,
MAKEFILE,
)
lines = replace_block(
lines,
"# BEGIN: freezing modules",
"# END: freezing modules",
rules,
MAKEFILE,
)
outfile.writelines(lines)
def regen_pcbuild(modules):
projlines = []
filterlines = []
for src in _iter_sources(modules):
pyfile = relpath_for_windows_display(src.pyfile, ROOT_DIR)
header = relpath_for_windows_display(src.frozenfile, ROOT_DIR)
intfile = ntpath.splitext(ntpath.basename(header))[0] + '.g.h'
projlines.append(f' <None Include="..\\{pyfile}">')
projlines.append(f' <ModName>{src.frozenid}</ModName>')
projlines.append(f' <IntFile>$(IntDir){intfile}</IntFile>')
projlines.append(f' <OutFile>$(PySourcePath){header}</OutFile>')
projlines.append(f' </None>')
filterlines.append(f' <None Include="..\\{pyfile}">')
filterlines.append(' <Filter>Python Files</Filter>')
filterlines.append(' </None>')
print(f'
with updating_file_with_tmpfile(PCBUILD_PROJECT) as (infile, outfile):
lines = infile.readlines()
lines = replace_block(
lines,
'<!-- BEGIN frozen modules -->',
'<!-- END frozen modules -->',
projlines,
PCBUILD_PROJECT,
)
outfile.writelines(lines)
print(f'
with updating_file_with_tmpfile(PCBUILD_FILTERS) as (infile, outfile):
lines = infile.readlines()
lines = replace_block(
lines,
'<!-- BEGIN frozen modules -->',
'<!-- END frozen modules -->',
filterlines,
PCBUILD_FILTERS,
)
outfile.writelines(lines)
#######################################
# freezing modules
def freeze_module(modname, pyfile=None, destdir=MODULES_DIR):
tmpsuffix = f'.{int(time.time())}'
for modname, pyfile, ispkg in resolve_modules(modname, pyfile):
frozenfile = resolve_frozen_file(modname, destdir)
_freeze_module(modname, pyfile, frozenfile, tmpsuffix)
def _freeze_module(frozenid, pyfile, frozenfile, tmpsuffix):
tmpfile = f'{frozenfile}.{int(time.time())}'
print(tmpfile)
argv = [TOOL, frozenid, pyfile, tmpfile]
print('
try:
subprocess.run(argv, check=True)
except (FileNotFoundError, subprocess.CalledProcessError):
if not os.path.exists(TOOL):
sys.exit(f'ERROR: missing {TOOL}; you need to run "make regen-frozen"')
raise # re-raise
update_file_with_tmpfile(frozenfile, tmpfile, create=True)
#######################################
# the script
def main():
# Expand the raw specs, preserving order.
modules = list(parse_frozen_specs(destdir=MODULES_DIR))
# Regen build-related files.
regen_makefile(modules)
regen_pcbuild(modules)
# Freeze the target modules.
tmpsuffix = f'.{int(time.time())}'
for src in _iter_sources(modules):
_freeze_module(src.frozenid, src.pyfile, src.frozenfile, tmpsuffix)
# Regen files dependent of frozen file details.
regen_frozen(modules)
regen_manifest(modules)
if __name__ == '__main__':
argv = sys.argv[1:]
if argv:
sys.exit('ERROR: got unexpected args {argv}')
main()
| true | true |
f72739fb303514524a1f36a098a48adc38f45626 | 4,753 | py | Python | explain.py | pakesson/scaml | c69d422d6839d75a81426c81fd8d570fa421744b | [
"MIT"
] | 1 | 2020-12-03T01:34:47.000Z | 2020-12-03T01:34:47.000Z | explain.py | pakesson/scaml | c69d422d6839d75a81426c81fd8d570fa421744b | [
"MIT"
] | null | null | null | explain.py | pakesson/scaml | c69d422d6839d75a81426c81fd8d570fa421744b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import math
import numpy as np
from tensorflow.keras.models import load_model
from aes import aes_sbox, aes_sbox_inv
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
def get_label(plaintext, key, index):
return aes_sbox[plaintext[index] ^ key[index]]
num_classes = 256
attack_byte = 0
start_trace_to_attack = 100
number_of_traces_to_attack = 25
number_of_traces_to_explain = 5
occlusion_size = 1
def apply_occlusion(sample, x, occlusion_size=1, occlusion_value=0):
occluded_sample = np.array(sample, copy=True)
occluded_sample[x:x+occlusion_size, :] = occlusion_value
return occluded_sample
def get_occlusion_sensitivity(samples, model, class_index, occlusion_size=1):
print("Generating occlusion sensitivity maps...")
confidence_map = np.zeros(math.ceil(samples[0].shape[0] / occlusion_size))
sensitivity_map = np.zeros(math.ceil(samples[0].shape[0] / occlusion_size))
for idx, sample in enumerate(samples):
print(f" Sample {idx}")
occlusion_value = np.mean(sample)
occlusions = [
apply_occlusion(sample, x, occlusion_size, occlusion_value)
for x in range(0, sample.shape[0], occlusion_size)
]
predictions = model.predict(np.array(occlusions), batch_size=32)
target_class_predictions = [
prediction[class_index[idx]] for prediction in predictions
]
for x, confidence in zip(range(sensitivity_map.shape[0]), target_class_predictions):
confidence_map[x] += confidence
# Mean confidence value
confidence_map = confidence_map / samples.shape[0]
sensitivity_map = 1 - confidence_map
# Scale back up
result = np.zeros(samples[0].shape[0])
for x in range(result.shape[0]):
result[x] = sensitivity_map[x // occlusion_size]
return result
def explain(data, model, class_index, occlusion_size=1):
# Make sure the data shape is (num_traces, num_points_per_trace, x)
if len(data.shape) == 2:
data = data.reshape((1, data.shape[0], data.shape[1]))
class_index = class_index.reshape((1, class_index.shape[0], class_index.shape[1]))
elif len(data.shape) != 3:
raise ValueError("unsupported data shape")
# Generate one map for all samples
return get_occlusion_sensitivity(data, model, class_index, occlusion_size)
if __name__ == '__main__':
if len(sys.argv) != 4:
print("Usage:")
print(f" {sys.argv[0]} <model filename> <trace filename> <sensitivity map filename>")
exit()
model_filename = sys.argv[1]
trace_filename = sys.argv[2]
sensitivity_map_filename = sys.argv[3]
model = load_model(model_filename)
print("Input shape: " + str(model.input_shape))
traces = np.load(trace_filename)
print(traces.files)
trace_array = traces['trace_array']
textin_array = traces['textin_array']
known_keys = traces['known_keys']
trace_array = trace_array.reshape((trace_array.shape[0], trace_array.shape[1], 1))
# Run an initial prediction before we try to explain anything
result = model.predict(trace_array[start_trace_to_attack:start_trace_to_attack+number_of_traces_to_attack, :, :])
log10_sum_prediction = np.zeros(num_classes)
for k in range(number_of_traces_to_attack):
plaintext = textin_array[start_trace_to_attack+k, attack_byte]
prediction = result[k]
for l in range(num_classes):
key_byte_index = (aes_sbox_inv[l] ^ plaintext)
log10_sum_prediction[key_byte_index] += np.log10(prediction[l] + 1e-22)
print("Best key byte guess: " + str(np.argmax(log10_sum_prediction)))
print("known_keys[0]: " + str(known_keys[0]))
# Run explainer
data = trace_array[start_trace_to_attack:start_trace_to_attack+number_of_traces_to_explain, :, :]
key_index = np.argmax(log10_sum_prediction)
class_index = aes_sbox[textin_array[start_trace_to_attack:start_trace_to_attack+number_of_traces_to_explain, attack_byte] ^ key_index]
sensitivity_map = explain(data, model, class_index, occlusion_size)
# Save results
np.savez_compressed(sensitivity_map_filename, sensitivity_map=sensitivity_map)
# Visualize the results
fig = plt.figure()
plt.title(f"Occlusion sensitivity for key byte {attack_byte} in trace {start_trace_to_attack}")
ax = fig.gca()
x = np.linspace(0, sensitivity_map.shape[0]-1, sensitivity_map.shape[0])
for i in range(0, sensitivity_map.shape[0]-1, occlusion_size):
color = (sensitivity_map[i]-min(sensitivity_map))/np.ptp(sensitivity_map)
ax.plot(x[i:i+occlusion_size+1], data[0, i:i+occlusion_size+1, 0], color=plt.cm.plasma(color))
plt.show()
| 36.007576 | 138 | 0.708605 |
import sys
import math
import numpy as np
from tensorflow.keras.models import load_model
from aes import aes_sbox, aes_sbox_inv
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
def get_label(plaintext, key, index):
return aes_sbox[plaintext[index] ^ key[index]]
num_classes = 256
attack_byte = 0
start_trace_to_attack = 100
number_of_traces_to_attack = 25
number_of_traces_to_explain = 5
occlusion_size = 1
def apply_occlusion(sample, x, occlusion_size=1, occlusion_value=0):
occluded_sample = np.array(sample, copy=True)
occluded_sample[x:x+occlusion_size, :] = occlusion_value
return occluded_sample
def get_occlusion_sensitivity(samples, model, class_index, occlusion_size=1):
print("Generating occlusion sensitivity maps...")
confidence_map = np.zeros(math.ceil(samples[0].shape[0] / occlusion_size))
sensitivity_map = np.zeros(math.ceil(samples[0].shape[0] / occlusion_size))
for idx, sample in enumerate(samples):
print(f" Sample {idx}")
occlusion_value = np.mean(sample)
occlusions = [
apply_occlusion(sample, x, occlusion_size, occlusion_value)
for x in range(0, sample.shape[0], occlusion_size)
]
predictions = model.predict(np.array(occlusions), batch_size=32)
target_class_predictions = [
prediction[class_index[idx]] for prediction in predictions
]
for x, confidence in zip(range(sensitivity_map.shape[0]), target_class_predictions):
confidence_map[x] += confidence
confidence_map = confidence_map / samples.shape[0]
sensitivity_map = 1 - confidence_map
result = np.zeros(samples[0].shape[0])
for x in range(result.shape[0]):
result[x] = sensitivity_map[x // occlusion_size]
return result
def explain(data, model, class_index, occlusion_size=1):
if len(data.shape) == 2:
data = data.reshape((1, data.shape[0], data.shape[1]))
class_index = class_index.reshape((1, class_index.shape[0], class_index.shape[1]))
elif len(data.shape) != 3:
raise ValueError("unsupported data shape")
return get_occlusion_sensitivity(data, model, class_index, occlusion_size)
if __name__ == '__main__':
if len(sys.argv) != 4:
print("Usage:")
print(f" {sys.argv[0]} <model filename> <trace filename> <sensitivity map filename>")
exit()
model_filename = sys.argv[1]
trace_filename = sys.argv[2]
sensitivity_map_filename = sys.argv[3]
model = load_model(model_filename)
print("Input shape: " + str(model.input_shape))
traces = np.load(trace_filename)
print(traces.files)
trace_array = traces['trace_array']
textin_array = traces['textin_array']
known_keys = traces['known_keys']
trace_array = trace_array.reshape((trace_array.shape[0], trace_array.shape[1], 1))
result = model.predict(trace_array[start_trace_to_attack:start_trace_to_attack+number_of_traces_to_attack, :, :])
log10_sum_prediction = np.zeros(num_classes)
for k in range(number_of_traces_to_attack):
plaintext = textin_array[start_trace_to_attack+k, attack_byte]
prediction = result[k]
for l in range(num_classes):
key_byte_index = (aes_sbox_inv[l] ^ plaintext)
log10_sum_prediction[key_byte_index] += np.log10(prediction[l] + 1e-22)
print("Best key byte guess: " + str(np.argmax(log10_sum_prediction)))
print("known_keys[0]: " + str(known_keys[0]))
data = trace_array[start_trace_to_attack:start_trace_to_attack+number_of_traces_to_explain, :, :]
key_index = np.argmax(log10_sum_prediction)
class_index = aes_sbox[textin_array[start_trace_to_attack:start_trace_to_attack+number_of_traces_to_explain, attack_byte] ^ key_index]
sensitivity_map = explain(data, model, class_index, occlusion_size)
np.savez_compressed(sensitivity_map_filename, sensitivity_map=sensitivity_map)
fig = plt.figure()
plt.title(f"Occlusion sensitivity for key byte {attack_byte} in trace {start_trace_to_attack}")
ax = fig.gca()
x = np.linspace(0, sensitivity_map.shape[0]-1, sensitivity_map.shape[0])
for i in range(0, sensitivity_map.shape[0]-1, occlusion_size):
color = (sensitivity_map[i]-min(sensitivity_map))/np.ptp(sensitivity_map)
ax.plot(x[i:i+occlusion_size+1], data[0, i:i+occlusion_size+1, 0], color=plt.cm.plasma(color))
plt.show()
| true | true |
f7273a7b5d7bdf69557a4052a69a66f7ebffb3ac | 588 | py | Python | stats/attendance.py | diegomrsantos/Python-Baseball | 4543df7a4d74e82106a3e8481553149c447d8ab6 | [
"MIT"
] | null | null | null | stats/attendance.py | diegomrsantos/Python-Baseball | 4543df7a4d74e82106a3e8481553149c447d8ab6 | [
"MIT"
] | null | null | null | stats/attendance.py | diegomrsantos/Python-Baseball | 4543df7a4d74e82106a3e8481553149c447d8ab6 | [
"MIT"
] | null | null | null | import pandas as pd
import matplotlib.pyplot as plt
from data import games
info_filter = games['type'] == 'info'
attendance_filter = games['multi2'] == 'attendance'
attendance = games.loc[info_filter & attendance_filter, ['year', 'multi3']]
attendance.columns = ['year', 'attendance']
attendance.loc[:, 'attendance'] = pd.to_numeric(attendance.loc[:, 'attendance'])
attendance.plot(x='year', y='attendance', figsize=(15, 7), kind='bar')
plt.xlabel('Year')
plt.ylabel('Attendance')
plt.axhline(y=attendance['attendance'].mean(), label='Mean', linestyle='--', color='green')
plt.show()
| 32.666667 | 91 | 0.710884 | import pandas as pd
import matplotlib.pyplot as plt
from data import games
info_filter = games['type'] == 'info'
attendance_filter = games['multi2'] == 'attendance'
attendance = games.loc[info_filter & attendance_filter, ['year', 'multi3']]
attendance.columns = ['year', 'attendance']
attendance.loc[:, 'attendance'] = pd.to_numeric(attendance.loc[:, 'attendance'])
attendance.plot(x='year', y='attendance', figsize=(15, 7), kind='bar')
plt.xlabel('Year')
plt.ylabel('Attendance')
plt.axhline(y=attendance['attendance'].mean(), label='Mean', linestyle='--', color='green')
plt.show()
| true | true |
f7273aa823161ba436cb65218833b108a92b9ccc | 651 | py | Python | tests/test_pickling_in_main/main.py | smheidrich/pickle-spree | 73d7a6fd1265f28fc3b91db593309cf5d2ae9195 | [
"MIT"
] | null | null | null | tests/test_pickling_in_main/main.py | smheidrich/pickle-spree | 73d7a6fd1265f28fc3b91db593309cf5d2ae9195 | [
"MIT"
] | 2 | 2022-01-23T18:51:13.000Z | 2022-01-23T18:54:36.000Z | tests/test_pickling_in_main/main.py | smheidrich/pickle-spree | 73d7a6fd1265f28fc3b91db593309cf5d2ae9195 | [
"MIT"
] | null | null | null | from collections import ChainMap
import os
from pathlib import Path
from pickle_spree import PopenFactory
import subprocess
import sys
class CallableDefinedInMain:
def __call__(self):
return 1
callable = CallableDefinedInMain()
new_popen = PopenFactory(callable=callable)
subprocess.Popen = new_popen
pythonpaths = os.environ.get("PYTHONPATH", "").split(":")
pythonpath = ":".join([str(Path(__file__).parent.absolute())]+pythonpaths)
if __name__ == "__main__":
Path("child_script.py").write_text("print('foo')")
subprocess.run([sys.executable, "child_script.py"],
env=ChainMap({"PYTHONPATH": pythonpath}, os.environ), check=True)
| 25.038462 | 74 | 0.752688 | from collections import ChainMap
import os
from pathlib import Path
from pickle_spree import PopenFactory
import subprocess
import sys
class CallableDefinedInMain:
def __call__(self):
return 1
callable = CallableDefinedInMain()
new_popen = PopenFactory(callable=callable)
subprocess.Popen = new_popen
pythonpaths = os.environ.get("PYTHONPATH", "").split(":")
pythonpath = ":".join([str(Path(__file__).parent.absolute())]+pythonpaths)
if __name__ == "__main__":
Path("child_script.py").write_text("print('foo')")
subprocess.run([sys.executable, "child_script.py"],
env=ChainMap({"PYTHONPATH": pythonpath}, os.environ), check=True)
| true | true |
f7273b4fd11cad1a9484b1fbcd350c2e7b6f9e26 | 377 | py | Python | Exercicio6TapeEquilibrium/ResolucaoPropria/start.py | GRParasky/codility-exercises | 1a7144492d78fd712ec8d23d94502e3f5ed642a3 | [
"MIT"
] | null | null | null | Exercicio6TapeEquilibrium/ResolucaoPropria/start.py | GRParasky/codility-exercises | 1a7144492d78fd712ec8d23d94502e3f5ed642a3 | [
"MIT"
] | null | null | null | Exercicio6TapeEquilibrium/ResolucaoPropria/start.py | GRParasky/codility-exercises | 1a7144492d78fd712ec8d23d94502e3f5ed642a3 | [
"MIT"
] | null | null | null | def solution(A):
list_range = len(A)
difference_list = []
for p in range(1, list_range):
post_sum = sum(A[p:])
behind_sum = sum(A[:p])
difference = behind_sum - post_sum
if difference < 0:
difference *= -1
difference_list.append(difference)
return min(difference_list)
print(solution([3, 1, 2, 4, 3]))
| 18.85 | 42 | 0.572944 | def solution(A):
list_range = len(A)
difference_list = []
for p in range(1, list_range):
post_sum = sum(A[p:])
behind_sum = sum(A[:p])
difference = behind_sum - post_sum
if difference < 0:
difference *= -1
difference_list.append(difference)
return min(difference_list)
print(solution([3, 1, 2, 4, 3]))
| true | true |
f7273bbbd5fff48873e854018e8ac2d206d735b8 | 12,117 | py | Python | .github/scripts/check-header.py | githubliweichao/FreeRTOS | 208b260f982d7a0c8b9aaff6bc446f8c7e45d2e2 | [
"MIT"
] | 1 | 2020-12-20T03:45:04.000Z | 2020-12-20T03:45:04.000Z | .github/scripts/check-header.py | githubliweichao/FreeRTOS | 208b260f982d7a0c8b9aaff6bc446f8c7e45d2e2 | [
"MIT"
] | null | null | null | .github/scripts/check-header.py | githubliweichao/FreeRTOS | 208b260f982d7a0c8b9aaff6bc446f8c7e45d2e2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os, sys, re
from argparse import ArgumentParser
from difflib import unified_diff
from json import load
def dprint(msg):
print('[DEBUG]: %s' % str(msg))
class HeaderChecker:
def __init__(self, header, padding=1000, ignored_files=[], ignored_ext=[], ignored_patterns=[]):
self.padding = padding
self.header = header
self.ignorePatternList = ignored_patterns.copy()
self.ignoreFileList = ignored_files.copy()
self.ignoreExtList = ignored_ext.copy()
def checkJSONList(self, path_json):
'''
This is particularly useful when ingesting output from other programs, like git actions
'''
assert os.path.exists(path_json), 'No such file: ' + path_json
# Get list of files to check from JSON file
with open(path_json) as file_json:
file_checklist = load(file_json)
assert isinstance(file_checklist, list), 'Expected list for singular JSON List entry'
# Accrue how how files fail the check
n_failed = 0
for path_file in file_checklist:
assert isinstance(path_file, str), 'Unexpected JSON format for ' + path_json
n_failed += not self.isValidFile(path_file)
return n_failed
def isValidFile(self, path):
assert os.path.exists(path), 'No such file: ' + path
# Skip any ignored files
if self.isIgnoredFile(path):
return True
# Skip if entry is a directory.
if os.path.isdir(path):
print('Skipping valid file check on directory path: %s' % path)
return True
# Don't need entire file. Read sufficienly large chunk of file that should contain the header
with open(path, encoding='utf-8', errors='ignore') as file:
chunk = file.read(len(''.join(self.header)) + self.padding)
lines = [('%s\n' % l) for l in chunk.strip().splitlines()][:len(self.header)]
if self.header == lines:
return True
else:
print('File Delta: %s' % path)
print(*unified_diff(lines[:len(self.header)], self.header))
return False
def ignoreExtension(self, *args):
for ext in args:
self.ignoreExtList.append(ext)
def ignoreFile(self, *args):
for f in args:
self.ignoreFileList.append(f)
def ignorePattern(self, *args):
for p in args:
self.ignorePatternList.append(re.compile(p))
def isIgnoredFile(self, path):
'''
There are multiple ways a file can be ignored. This is a catch all
'''
assert os.path.exists(path), 'No such file: ' + path
# Try simpler checks first
filename = os.path.split(path)[-1]
extension = os.path.splitext(filename)[-1]
if extension in self.ignoreExtList or filename in self.ignoreFileList:
return True
# Then iterate against regex patterns. In future consider Trie
for pattern in self.ignorePatternList:
if pattern.match(path):
return True
return False
def configArgParser():
parser = ArgumentParser(description='FreeRTOS file header checker. We expect a consistent header across all '
'first party files. The header includes current version number, copyright, '
'and FreeRTOS license.')
parser.add_argument('files_checked',
nargs = '+',
metavar = 'FILE_LIST',
help = 'Space separated list of files to check.')
parser.add_argument('-k', '--kernel',
default = False,
action = 'store_true',
help = 'Compare with kernel file header. It has different versioning.')
parser.add_argument('-j', '--json',
default = False,
action = 'store_true',
help = 'Treat arguments json files that store a list of files to check.')
return parser
#--------------------------------------------------------------------------------------------------
# CONFIG
#--------------------------------------------------------------------------------------------------
FREERTOS_IGNORED_EXTENSIONS = [
'.1',
'.ASM',
'.C',
'.DSW',
'.G_C',
'.H',
'.Hbp',
'.IDE',
'.LIB',
'.Opt',
'.PC',
'.PRM',
'.TXT',
'.URL',
'.UVL',
'.Uv2',
'.a',
'.ac',
'.am',
'.atsln',
'.atstart',
'.atsuo',
'.bash',
'.bat',
'.bbl',
'.bit',
'.board',
'.bsb',
'.bsdl',
'.bts',
'.ccxml',
'.cdkproj',
'.cdkws',
'.cfg',
'.cgp',
'.cmake',
'.cmd',
'.config',
'.cpp',
'.cproj',
'.crun',
'.css',
'.csv',
'.custom_argvars',
'.cxx',
'.cydwr',
'.cyprj',
'.cysch',
'.dat',
'.datas',
'.db',
'.dbgdt',
'.dep',
'.dni',
'.dnx',
'.doc',
'.dox',
'.doxygen',
'.ds',
'.dsk',
'.dtd',
'.dts',
'.elf',
'.env_conf',
'.ewd',
'.ewp',
'.ewt',
'.eww',
'.exe',
'.filters',
'.flash',
'.fmt',
'.ftl',
'.gdb',
'.gif',
'.gise',
'.gld',
'.gpdsc',
'.gui',
'.h_from_toolchain',
'.hdf',
'.hdp',
'.hex',
'.hist',
'.history',
'.hsf',
'.htm',
'.html',
'.hwc',
'.hwl',
'.hwp',
'.hws',
'.hzp',
'.hzs',
'.i',
'.icf',
'.ide',
'.idx',
'.in',
'.inc',
'.include',
'.index',
'.inf',
'.ini',
'.init',
'.ipcf',
'.ise',
'.jlink',
'.json',
'.la',
'.launch',
'.lcf',
'.lds',
'.lib',
'.lk1',
'.lkr',
'.lm',
'.lo',
'.lock',
'.lsl',
'.lst',
'.m4',
'.mac',
'.make',
'.map',
'.mbt',
'.mcp',
'.mcpar',
'.mcs',
'.mcw',
'.md',
'.mdm',
'.mem',
'.mhs',
'.mk',
'.mk1',
'.mmi',
'.mrt',
'.mss',
'.mtpj',
'.nav',
'.ntrc_log',
'.opa',
'.opb',
'.opc',
'.opl',
'.opt',
'.opv',
'.out',
'.pack',
'.par',
'.patch',
'.pbd',
'.pdsc',
'.pe',
'.pem',
'.pgs',
'.pl',
'.plg',
'.png',
'.prc',
'.pref',
'.prefs',
'.prj',
'.properties',
'.ps1',
'.ptf',
'.r79',
'.rapp',
'.rc',
'.reggroups',
'.reglist',
'.resc',
'.resources',
'.rom',
'.rprj',
'.s79',
'.s82',
'.s90',
'.sc',
'.scf',
'.scfg',
'.script',
'.sct',
'.scvd',
'.session',
'.sfr',
'.sh',
'.shtml',
'.sig',
'.sln',
'.spec',
'.stf',
'.stg',
'.suo',
'.sup',
'.svg',
'.tags',
'.tcl',
'.tdt',
'.template',
'.tgt',
'.tps',
'.tra',
'.tree',
'.tws',
'.txt',
'.ucf',
'.url',
'.user',
'.ut',
'.uvmpw',
'.uvopt',
'.uvoptx',
'.uvproj',
'.uvprojx',
'.vcproj',
'.vcxproj',
'.version',
'.webserver',
'.wpj',
'.wsdt',
'.wsp',
'.wspos',
'.wsx',
'.x',
'.xbcd',
'.xcl',
'.xise',
'.xml',
'.xmp',
'.xmsgs',
'.xsl',
'.yml',
'.md',
'.zip'
]
FREERTOS_IGNORED_PATTERNS = [
r'.*\.git.*',
r'.*mbedtls_config\.h.*',
r'.*mbedtls_config\.h.*',
r'.*CMSIS.*',
r'.*/makefile',
r'.*/Makefile',
r'.*/trcConfig\.h.*',
r'.*/trcConfig\.c.*',
r'.*/trcSnapshotConfig\.h.*',
]
FREERTOS_HEADER = [
'/*\n',
' * FreeRTOS V202012.00\n',
' * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n',
' *\n',
' * Permission is hereby granted, free of charge, to any person obtaining a copy of\n',
' * this software and associated documentation files (the "Software"), to deal in\n',
' * the Software without restriction, including without limitation the rights to\n',
' * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n',
' * the Software, and to permit persons to whom the Software is furnished to do so,\n',
' * subject to the following conditions:\n',
' *\n',
' * The above copyright notice and this permission notice shall be included in all\n',
' * copies or substantial portions of the Software.\n',
' *\n',
' * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n',
' * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n',
' * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n',
' * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n',
' * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n',
' * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n',
' *\n',
' * https://www.FreeRTOS.org\n',
' * https://github.com/FreeRTOS\n',
' *\n',
' */\n',
]
KERNEL_IGNORED_EXTENSIONS = [
'.yml',
'.css',
'.idx',
'.md',
'.url',
'.sty',
'.0-rc2',
'.s82',
'.js',
'.out',
'.pack',
'.2',
'.1-kernel-only',
'.0-kernel-only',
'.0-rc1',
'.readme',
'.tex',
'.png',
'.bat',
'.sh'
]
KERNEL_IGNORED_PATTERNS = [r'.*\.git.*']
KERNEL_HEADER = [
'/*\n',
' * FreeRTOS Kernel V10.4.2\n',
' * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n',
' *\n',
' * Permission is hereby granted, free of charge, to any person obtaining a copy of\n',
' * this software and associated documentation files (the "Software"), to deal in\n',
' * the Software without restriction, including without limitation the rights to\n',
' * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n',
' * the Software, and to permit persons to whom the Software is furnished to do so,\n',
' * subject to the following conditions:\n',
' *\n',
' * The above copyright notice and this permission notice shall be included in all\n',
' * copies or substantial portions of the Software.\n',
' *\n',
' * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n',
' * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n',
' * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n',
' * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n',
' * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n',
' * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n',
' *\n',
' * https://www.FreeRTOS.org\n',
' * https://github.com/FreeRTOS\n',
' *\n',
' */\n',
]
#--------------------------------------------------------------------------------------------------
# MAIN
#--------------------------------------------------------------------------------------------------
def main():
parser = configArgParser()
args = parser.parse_args()
# Configure checks
if args.kernel:
checker = HeaderChecker(KERNEL_HEADER)
checker.ignoreExtension(*KERNEL_IGNORED_EXTENSIONS)
checker.ignorePattern(*KERNEL_IGNORED_PATTERNS)
else:
checker = HeaderChecker(FREERTOS_HEADER)
checker.ignoreExtension(*FREERTOS_IGNORED_EXTENSIONS)
checker.ignorePattern(*FREERTOS_IGNORED_PATTERNS)
checker.ignoreFile(os.path.split(__file__)[-1])
# Check all input files
print()
n_failed = 0
for path in args.files_checked:
if args.json:
n_failed += checker.checkJSONList(path)
else:
n_failed += not checker.isValidFile(path)
return n_failed
if __name__ == '__main__':
exit(main())
| 25.035124 | 116 | 0.505241 |
import os, sys, re
from argparse import ArgumentParser
from difflib import unified_diff
from json import load
def dprint(msg):
print('[DEBUG]: %s' % str(msg))
class HeaderChecker:
def __init__(self, header, padding=1000, ignored_files=[], ignored_ext=[], ignored_patterns=[]):
self.padding = padding
self.header = header
self.ignorePatternList = ignored_patterns.copy()
self.ignoreFileList = ignored_files.copy()
self.ignoreExtList = ignored_ext.copy()
def checkJSONList(self, path_json):
assert os.path.exists(path_json), 'No such file: ' + path_json
with open(path_json) as file_json:
file_checklist = load(file_json)
assert isinstance(file_checklist, list), 'Expected list for singular JSON List entry'
n_failed = 0
for path_file in file_checklist:
assert isinstance(path_file, str), 'Unexpected JSON format for ' + path_json
n_failed += not self.isValidFile(path_file)
return n_failed
def isValidFile(self, path):
assert os.path.exists(path), 'No such file: ' + path
if self.isIgnoredFile(path):
return True
if os.path.isdir(path):
print('Skipping valid file check on directory path: %s' % path)
return True
with open(path, encoding='utf-8', errors='ignore') as file:
chunk = file.read(len(''.join(self.header)) + self.padding)
lines = [('%s\n' % l) for l in chunk.strip().splitlines()][:len(self.header)]
if self.header == lines:
return True
else:
print('File Delta: %s' % path)
print(*unified_diff(lines[:len(self.header)], self.header))
return False
def ignoreExtension(self, *args):
for ext in args:
self.ignoreExtList.append(ext)
def ignoreFile(self, *args):
for f in args:
self.ignoreFileList.append(f)
def ignorePattern(self, *args):
for p in args:
self.ignorePatternList.append(re.compile(p))
def isIgnoredFile(self, path):
assert os.path.exists(path), 'No such file: ' + path
# Try simpler checks first
filename = os.path.split(path)[-1]
extension = os.path.splitext(filename)[-1]
if extension in self.ignoreExtList or filename in self.ignoreFileList:
return True
# Then iterate against regex patterns. In future consider Trie
for pattern in self.ignorePatternList:
if pattern.match(path):
return True
return False
def configArgParser():
parser = ArgumentParser(description='FreeRTOS file header checker. We expect a consistent header across all '
'first party files. The header includes current version number, copyright, '
'and FreeRTOS license.')
parser.add_argument('files_checked',
nargs = '+',
metavar = 'FILE_LIST',
help = 'Space separated list of files to check.')
parser.add_argument('-k', '--kernel',
default = False,
action = 'store_true',
help = 'Compare with kernel file header. It has different versioning.')
parser.add_argument('-j', '--json',
default = False,
action = 'store_true',
help = 'Treat arguments json files that store a list of files to check.')
return parser
#--------------------------------------------------------------------------------------------------
# CONFIG
#--------------------------------------------------------------------------------------------------
FREERTOS_IGNORED_EXTENSIONS = [
'.1',
'.ASM',
'.C',
'.DSW',
'.G_C',
'.H',
'.Hbp',
'.IDE',
'.LIB',
'.Opt',
'.PC',
'.PRM',
'.TXT',
'.URL',
'.UVL',
'.Uv2',
'.a',
'.ac',
'.am',
'.atsln',
'.atstart',
'.atsuo',
'.bash',
'.bat',
'.bbl',
'.bit',
'.board',
'.bsb',
'.bsdl',
'.bts',
'.ccxml',
'.cdkproj',
'.cdkws',
'.cfg',
'.cgp',
'.cmake',
'.cmd',
'.config',
'.cpp',
'.cproj',
'.crun',
'.css',
'.csv',
'.custom_argvars',
'.cxx',
'.cydwr',
'.cyprj',
'.cysch',
'.dat',
'.datas',
'.db',
'.dbgdt',
'.dep',
'.dni',
'.dnx',
'.doc',
'.dox',
'.doxygen',
'.ds',
'.dsk',
'.dtd',
'.dts',
'.elf',
'.env_conf',
'.ewd',
'.ewp',
'.ewt',
'.eww',
'.exe',
'.filters',
'.flash',
'.fmt',
'.ftl',
'.gdb',
'.gif',
'.gise',
'.gld',
'.gpdsc',
'.gui',
'.h_from_toolchain',
'.hdf',
'.hdp',
'.hex',
'.hist',
'.history',
'.hsf',
'.htm',
'.html',
'.hwc',
'.hwl',
'.hwp',
'.hws',
'.hzp',
'.hzs',
'.i',
'.icf',
'.ide',
'.idx',
'.in',
'.inc',
'.include',
'.index',
'.inf',
'.ini',
'.init',
'.ipcf',
'.ise',
'.jlink',
'.json',
'.la',
'.launch',
'.lcf',
'.lds',
'.lib',
'.lk1',
'.lkr',
'.lm',
'.lo',
'.lock',
'.lsl',
'.lst',
'.m4',
'.mac',
'.make',
'.map',
'.mbt',
'.mcp',
'.mcpar',
'.mcs',
'.mcw',
'.md',
'.mdm',
'.mem',
'.mhs',
'.mk',
'.mk1',
'.mmi',
'.mrt',
'.mss',
'.mtpj',
'.nav',
'.ntrc_log',
'.opa',
'.opb',
'.opc',
'.opl',
'.opt',
'.opv',
'.out',
'.pack',
'.par',
'.patch',
'.pbd',
'.pdsc',
'.pe',
'.pem',
'.pgs',
'.pl',
'.plg',
'.png',
'.prc',
'.pref',
'.prefs',
'.prj',
'.properties',
'.ps1',
'.ptf',
'.r79',
'.rapp',
'.rc',
'.reggroups',
'.reglist',
'.resc',
'.resources',
'.rom',
'.rprj',
'.s79',
'.s82',
'.s90',
'.sc',
'.scf',
'.scfg',
'.script',
'.sct',
'.scvd',
'.session',
'.sfr',
'.sh',
'.shtml',
'.sig',
'.sln',
'.spec',
'.stf',
'.stg',
'.suo',
'.sup',
'.svg',
'.tags',
'.tcl',
'.tdt',
'.template',
'.tgt',
'.tps',
'.tra',
'.tree',
'.tws',
'.txt',
'.ucf',
'.url',
'.user',
'.ut',
'.uvmpw',
'.uvopt',
'.uvoptx',
'.uvproj',
'.uvprojx',
'.vcproj',
'.vcxproj',
'.version',
'.webserver',
'.wpj',
'.wsdt',
'.wsp',
'.wspos',
'.wsx',
'.x',
'.xbcd',
'.xcl',
'.xise',
'.xml',
'.xmp',
'.xmsgs',
'.xsl',
'.yml',
'.md',
'.zip'
]
FREERTOS_IGNORED_PATTERNS = [
r'.*\.git.*',
r'.*mbedtls_config\.h.*',
r'.*mbedtls_config\.h.*',
r'.*CMSIS.*',
r'.*/makefile',
r'.*/Makefile',
r'.*/trcConfig\.h.*',
r'.*/trcConfig\.c.*',
r'.*/trcSnapshotConfig\.h.*',
]
FREERTOS_HEADER = [
'/*\n',
' * FreeRTOS V202012.00\n',
' * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n',
' *\n',
' * Permission is hereby granted, free of charge, to any person obtaining a copy of\n',
' * this software and associated documentation files (the "Software"), to deal in\n',
' * the Software without restriction, including without limitation the rights to\n',
' * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n',
' * the Software, and to permit persons to whom the Software is furnished to do so,\n',
' * subject to the following conditions:\n',
' *\n',
' * The above copyright notice and this permission notice shall be included in all\n',
' * copies or substantial portions of the Software.\n',
' *\n',
' * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n',
' * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n',
' * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n',
' * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n',
' * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n',
' * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n',
' *\n',
' * https://www.FreeRTOS.org\n',
' * https://github.com/FreeRTOS\n',
' *\n',
' */\n',
]
KERNEL_IGNORED_EXTENSIONS = [
'.yml',
'.css',
'.idx',
'.md',
'.url',
'.sty',
'.0-rc2',
'.s82',
'.js',
'.out',
'.pack',
'.2',
'.1-kernel-only',
'.0-kernel-only',
'.0-rc1',
'.readme',
'.tex',
'.png',
'.bat',
'.sh'
]
KERNEL_IGNORED_PATTERNS = [r'.*\.git.*']
KERNEL_HEADER = [
'/*\n',
' * FreeRTOS Kernel V10.4.2\n',
' * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n',
' *\n',
' * Permission is hereby granted, free of charge, to any person obtaining a copy of\n',
' * this software and associated documentation files (the "Software"), to deal in\n',
' * the Software without restriction, including without limitation the rights to\n',
' * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n',
' * the Software, and to permit persons to whom the Software is furnished to do so,\n',
' * subject to the following conditions:\n',
' *\n',
' * The above copyright notice and this permission notice shall be included in all\n',
' * copies or substantial portions of the Software.\n',
' *\n',
' * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n',
' * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n',
' * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n',
' * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n',
' * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n',
' * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n',
' *\n',
' * https://www.FreeRTOS.org\n',
' * https://github.com/FreeRTOS\n',
' *\n',
' */\n',
]
#--------------------------------------------------------------------------------------------------
# MAIN
#--------------------------------------------------------------------------------------------------
def main():
parser = configArgParser()
args = parser.parse_args()
# Configure checks
if args.kernel:
checker = HeaderChecker(KERNEL_HEADER)
checker.ignoreExtension(*KERNEL_IGNORED_EXTENSIONS)
checker.ignorePattern(*KERNEL_IGNORED_PATTERNS)
else:
checker = HeaderChecker(FREERTOS_HEADER)
checker.ignoreExtension(*FREERTOS_IGNORED_EXTENSIONS)
checker.ignorePattern(*FREERTOS_IGNORED_PATTERNS)
checker.ignoreFile(os.path.split(__file__)[-1])
# Check all input files
print()
n_failed = 0
for path in args.files_checked:
if args.json:
n_failed += checker.checkJSONList(path)
else:
n_failed += not checker.isValidFile(path)
return n_failed
if __name__ == '__main__':
exit(main())
| true | true |
f7273bc9f69a30526a9b3eca4ec533b0eff5edfe | 11,534 | py | Python | evaluate/evaluate_FDR.py | rperi/trustworthy-asv-fairness | 15df69a8f3f8ad5262002c9e3d12aa12ea8f1c6f | [
"MIT"
] | 1 | 2022-03-30T07:50:10.000Z | 2022-03-30T07:50:10.000Z | evaluate/evaluate_FDR.py | rperi/trustworthy-asv-fairness | 15df69a8f3f8ad5262002c9e3d12aa12ea8f1c6f | [
"MIT"
] | null | null | null | evaluate/evaluate_FDR.py | rperi/trustworthy-asv-fairness | 15df69a8f3f8ad5262002c9e3d12aa12ea8f1c6f | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import os
import pdb
from scipy.spatial.distance import cosine
from sklearn.metrics import roc_curve, confusion_matrix
import sys
from tqdm import tqdm
from sklearn.metrics import auc
import argparse
fprs = [0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.2,0.3,0.4,0.5]
groups = ['male_male','female_female']
omegas = [0.0, 0.25, 0.5, 0.75, 1.0]
emb_map = {}
xvec_map = {}
def compute_scores(df_, eer_threshold_overall=0, agnostic_FLAG=False, emb_FLAG=True):
if emb_FLAG:
emb_mapping = emb_map
else:
emb_mapping = xvec_map
similarity_scores= []
labels = []
for idx, row in tqdm(enumerate(df_.iterrows())):
enrol = row[1]['audio_1']
test = row[1]['audio_2']
label = row[1]['label']
if not enrol in emb_mapping.keys():
print(enrol)
if not test in emb_mapping.keys():
print(test)
sim = 1 - cosine(emb_mapping[enrol],emb_mapping[test])
similarity_scores.append(sim)
labels.append(label)
fpr, tpr, threshold = roc_curve(labels, similarity_scores)
fnr = 1 - tpr
eer_threshold = threshold[np.nanargmin(np.absolute((fnr - fpr)))]
eer1 = fpr[np.nanargmin(np.absolute((fnr - fpr)))]
eer2 = fnr[np.nanargmin(np.absolute((fnr - fpr)))]
eer = np.mean((eer1,eer2))
sim = np.array(similarity_scores)
labels = np.array(labels)
if not agnostic_FLAG:
fpr, fnr = compute_fpr_fnr(sim, labels, eer_threshold_overall)
return sim, labels, eer, fpr, fnr
else:
return sim, labels, eer, eer_threshold
def compute_fpr_fnr(sim,labels_e1, thresh):
preds = np.zeros(labels_e1.shape[0])
preds[sim > thresh] = 1
tn, fp, fn, tp = confusion_matrix(labels_e1, preds).ravel()
fpr = fp/(fp+tn)
fnr = fn/(fn+tp)
return fpr, fnr
def compute_fdr(fprs, fnrs, omega=0.5):
A = np.absolute(fprs[0]-fprs[1])
B = np.absolute(fnrs[0]-fnrs[1])
return 1 - (omega*A + (1-omega)*B)
def compute_auFDR(fpr_ov, tpr_ov, threshold_ov, sim_g0, sim_g1, labels_g0, labels_g1,
score_dir, emb_FLAG=True, omega=0.5):
# FDRs at various thersholds
fdrs = []
fnrs = []
for fpr in tqdm(fprs):
thresh = threshold_ov[np.nanargmin(np.absolute((fpr_ov-fpr)))]
fnr = 1 - tpr_ov[np.nanargmin(np.absolute((fpr_ov-fpr)))]
fpr_g0, fnr_g0 = compute_fpr_fnr(sim_g0, labels_g0, thresh)
fpr_g1, fnr_g1 = compute_fpr_fnr(sim_g1, labels_g1, thresh)
fdr = compute_fdr((fpr_g0, fpr_g1), (fnr_g0, fnr_g1), float(omega))
fdrs.append(np.round(fdr*100,2))
fnrs.append(np.round(fnr*100,2))
auFDR = auc([x*100 for x in fprs], fdrs)
auFDR_10 = auc([x*100 for x in fprs[0:10]], fdrs[0:10])
df = pd.DataFrame(zip(fprs,fdrs, fnrs), columns=['fpr','fdr', 'fnr'])
if emb_FLAG:
print("Alpha = {} auFDR auFDR_10".format(omega))
print("Embeddings: {} {}\n".format(auFDR, auFDR_10))
df.to_csv(os.path.join(score_dir, 'fdr_at_fpr_gender_omega_{}.csv'.format(omega)), index=None)
else:
print("Alpha = {} auFDR auFDR_10".format(omega))
print("xvectors: {} {}\n".format(auFDR, auFDR_10))
df.to_csv(os.path.join(score_dir, 'fdr_at_fpr_gender_omega_{}.csv'.format(omega)), index=None)
return auFDR, auFDR_10
def main(args):
xvec_FLAG = args.eval_xvector
# Creating necessary trials for gender-specific evaluations
trial_dir = args.trials_root
trials = os.path.join(trial_dir, 'Test-Combined.csv')
df = pd.read_csv(trials)
df['label'] = pd.to_numeric(df['label'])
df_m = df.loc[df["gender_1"]=='male']
df_f = df.loc[df["gender_1"]=='female']
df_m_m = df_m.loc[df_m["gender_2"]=='male']
df_f_f = df_f.loc[df_f["gender_2"]=='female']
if not os.path.exists(os.path.join(trial_dir,'Test-male-all.csv')):
df_m.to_csv(os.path.join(trial_dir,'Test-male-all.csv'), index=None)
if not os.path.exists(os.path.join(trial_dir,'Test-female-all.csv')):
df_f.to_csv(os.path.join(trial_dir,'Test-female-all.csv'), index=None)
if not os.path.exists(os.path.join(trial_dir,'Test-male-male.csv')):
df_m_m.to_csv(os.path.join(trial_dir,'Test-male-male.csv'), index=None)
if not os.path.exists(os.path.join(trial_dir,'Test-female-female.csv')):
df_f_f.to_csv(os.path.join(trial_dir,'Test-female-female.csv'), index=None)
# Create directories to save ASV scores
scores_dir_base = args.scores_root
scores_dir_xvec = os.path.join(scores_dir_base,'baseline')
scores_dir = os.path.join(scores_dir_base,'{}'.format(args.mode))
os.makedirs(scores_dir_xvec, exist_ok=True)
os.makedirs(scores_dir, exist_ok=True)
# Load extracted embeddings and xvectors
test_utts = np.load(os.path.join(args.data_root,'test_utts.npy'))
pred_dir = args.pred_root
e1 = np.load(os.path.join(pred_dir,'emb1.npy'))
for idx, utt in enumerate(test_utts):
emb_map[utt] = e1[idx,:]
if xvec_FLAG:
xvec = np.load(os.path.join(args.data_root,'test_data.npy'))
for idx, utt in enumerate(test_utts):
xvec_map[utt] = xvec[idx,:]
# Gender-agnostic scoring
print("Computing Gender-agnostic scores")
if os.path.exists(os.path.join(scores_dir_xvec, 'sim_xvec_overall.npy')) and os.path.exists(os.path.join(scores_dir, 'sim_e1_overall.npy')) and os.path.exists(os.path.join(scores_dir_xvec, 'labels_overall.npy')):
sim_e1_ov = np.load(os.path.join(scores_dir, 'sim_e1_overall.npy'))
labels_ov = np.load(os.path.join(scores_dir_xvec, 'labels_overall.npy'))
fpr, tpr, threshold = roc_curve(labels_ov, sim_e1_ov)
fnr = 1 - tpr
eer_threshold_e1_ov = threshold[np.nanargmin(np.absolute((fnr - fpr)))]
eer_e1_ov = fpr[np.nanargmin(np.absolute((fnr - fpr))) ]
if xvec_FLAG:
sim_xvec_ov = np.load(os.path.join(scores_dir_xvec, 'sim_xvec_overall.npy'))
fpr, tpr, threshold = roc_curve(labels_ov, sim_xvec_ov)
fnr = 1 - tpr
eer_threshold_xvec_ov = threshold[np.nanargmin(np.absolute((fnr - fpr)))]
eer_xvec_ov = fpr[np.nanargmin(np.absolute((fnr - fpr)))]
print("Done scoring Gender-agnostic trials")
else:
sim_e1_ov, labels_ov, eer_e1_ov, eer_threshold_e1_ov = compute_scores(df, agnostic_FLAG=True)
np.save(os.path.join(scores_dir, 'sim_e1_overall'), sim_e1_ov)
np.save(os.path.join(scores_dir_xvec, 'labels_overall'), labels_ov)
if xvec_FLAG:
sim_xvec_ov, labels_xvec_ov, eer_xvec_ov, eer_threshold_xvec_ov = compute_scores(df, agnostic_FLAG=True, emb_FLAG=False)
np.save(os.path.join(scores_dir_xvec, 'sim_xvec_overall'), sim_xvec_ov)
print("Done scoring Gender-agnostic trials")
#Gender-specific scoring
print("Computing Gender-specific scores")
if (not os.path.exists(os.path.join(scores_dir, 'sim_e1_male_male.npy'))) or (not os.path.exists(os.path.join(scores_dir, 'sim_e1_female_female.npy'))):
sim_e1_m, labels_e1_m, eer_e1_m, fpr_e1_m, fnr_e1_m = compute_scores(df_m_m, eer_threshold_e1_ov)
sim_e1_f, labels_e1_f, eer_e1_f, fpr_e1_f, fnr_e1_f = compute_scores(df_f_f, eer_threshold_e1_ov)
np.save(os.path.join(scores_dir, 'sim_e1_male_male'), sim_e1_m)
np.save(os.path.join(scores_dir, 'sim_e1_female_female'), sim_e1_f)
np.save(os.path.join(scores_dir_xvec, 'labels_male_male'), labels_e1_m)
np.save(os.path.join(scores_dir_xvec, 'labels_female_female'), labels_e1_f)
print("EER_all EER_Male EER_Female")
print("Embeddings: {} {} {}\n".format(np.round(eer_e1_ov*100,2), np.round(eer_e1_m*100,2), np.round(eer_e1_f*100,2)))
sim_e1_g0 = sim_e1_m
sim_e1_g1 = sim_e1_f
labels_g0 = labels_e1_m
labels_g1 = labels_e1_f
print("Done scoring Gender-specific trials")
else:
sim_e1 = []
labels = []
for group in groups:
sim_e1.append(np.load(os.path.join(scores_dir, 'sim_e1_{}.npy'.format(group))))
labels.append(np.load(os.path.join(scores_dir_xvec, 'labels_{}.npy'.format(group))))
sim_e1_g0 = sim_e1[0]
sim_e1_g1 = sim_e1[1]
labels_g0 = labels[0]
labels_g1 = labels[1]
print("Done scoring Gender-specific trials")
if xvec_FLAG:
if (not os.path.exists(os.path.join(scores_dir_xvec, 'sim_xvec_male_male.npy'))) or (not os.path.exists(os.path.join(scores_dir_xvec, 'sim_xvec_female_female.npy'))):
print("Computing Gender-specific scores for x-vectors")
sim_xvec_m, labels_xvec_m, eer_xvec_m, fpr_xvec_m, fnr_xvec_m = compute_scores(df_m_m, eer_threshold_xvec_ov, emb_FLAG=False)
sim_xvec_f, labels_xvec_f, eer_xvec_f, fpr_xvec_f, fnr_xvec_f = compute_scores(df_f_f, eer_threshold_xvec_ov, emb_FLAG=False)
np.save(os.path.join(scores_dir_xvec, 'sim_xvec_male_male'), sim_xvec_m)
np.save(os.path.join(scores_dir_xvec, 'sim_xvec_female_female'), sim_xvec_f)
sim_xvec_g0 = sim_xvec_m
sim_xvec_g1 = sim_xvec_f
print("x-vector: {} {} {}\n".format(np.round(eer_xvec_ov*100,2), np.round(eer_xvec_m*100,2),np.round(eer_xvec_f*100,2)))
print("Done scoring Gender-specific trials for x-vectors")
else:
sim_xvec = []
for group in groups:
sim_xvec.append(np.load(os.path.join(scores_dir_xvec, 'sim_xvec_{}.npy'.format(group))))
sim_xvec_g0 = sim_xvec[0]
sim_xvec_g1 = sim_xvec[1]
print("Done scoring Gender-specific trials for x-vectors")
# Compute area under FDR-FPR curve
fpr_ov, tpr_ov, threshold_ov = roc_curve(labels_ov, sim_e1_ov)
aus, au10s = [], []
for omega in omegas:
au, au10 = compute_auFDR(fpr_ov, tpr_ov, threshold_ov, sim_e1_g0, sim_e1_g1, labels_g0, labels_g1, scores_dir, emb_FLAG=True, omega=omega)
aus.append(au)
au10s.append(au10)
df = pd.DataFrame(zip(omegas,aus, au10s), columns=['omega','au', 'au10'])
df.to_csv(os.path.join(scores_dir, 'au_fdrs.csv'), index=None)
if xvec_FLAG:
fpr_ov, tpr_ov, threshold_ov = roc_curve(labels_ov, sim_xvec_ov)
aus, aus10 = [],[]
for omega in omegas:
compute_auFDR(fpr_ov, tpr_ov, threshold_ov, sim_xvec_g0, sim_xvec_g1, labels_g0, labels_g1, scores_dir_xvec, emb_FLAG=False, omega=omega)
aus.append(au)
au10s.append(au10)
df = pd.DataFrame(zip(omegas,aus, au10s), columns=['omega','au', 'au10'])
df.to_csv(os.path.join(scores_dir_xvec, 'aufdrs.csv'), index=None)
pdb.set_trace()
if __name__=='__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--mode', type=str, required=True)
parser.add_argument('--trials_root', type=str, required=True,
help="Directory containing Test-Combined.csv")
parser.add_argument('--data_root', type=str, required=True,
help="Directory containing test_utts.npy")
parser.add_argument('--pred_root', type=str, required=True,
help="Directory containing Extracted embeddings")
parser.add_argument('--scores_root', type=str, required=True,
help="Directory to save ASV scores")
parser.add_argument('--eval_xvector', default=False, action='store_true')
args = parser.parse_args()
main(args)
| 46.321285 | 216 | 0.658401 | import numpy as np
import pandas as pd
import os
import pdb
from scipy.spatial.distance import cosine
from sklearn.metrics import roc_curve, confusion_matrix
import sys
from tqdm import tqdm
from sklearn.metrics import auc
import argparse
fprs = [0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.2,0.3,0.4,0.5]
groups = ['male_male','female_female']
omegas = [0.0, 0.25, 0.5, 0.75, 1.0]
emb_map = {}
xvec_map = {}
def compute_scores(df_, eer_threshold_overall=0, agnostic_FLAG=False, emb_FLAG=True):
if emb_FLAG:
emb_mapping = emb_map
else:
emb_mapping = xvec_map
similarity_scores= []
labels = []
for idx, row in tqdm(enumerate(df_.iterrows())):
enrol = row[1]['audio_1']
test = row[1]['audio_2']
label = row[1]['label']
if not enrol in emb_mapping.keys():
print(enrol)
if not test in emb_mapping.keys():
print(test)
sim = 1 - cosine(emb_mapping[enrol],emb_mapping[test])
similarity_scores.append(sim)
labels.append(label)
fpr, tpr, threshold = roc_curve(labels, similarity_scores)
fnr = 1 - tpr
eer_threshold = threshold[np.nanargmin(np.absolute((fnr - fpr)))]
eer1 = fpr[np.nanargmin(np.absolute((fnr - fpr)))]
eer2 = fnr[np.nanargmin(np.absolute((fnr - fpr)))]
eer = np.mean((eer1,eer2))
sim = np.array(similarity_scores)
labels = np.array(labels)
if not agnostic_FLAG:
fpr, fnr = compute_fpr_fnr(sim, labels, eer_threshold_overall)
return sim, labels, eer, fpr, fnr
else:
return sim, labels, eer, eer_threshold
def compute_fpr_fnr(sim,labels_e1, thresh):
preds = np.zeros(labels_e1.shape[0])
preds[sim > thresh] = 1
tn, fp, fn, tp = confusion_matrix(labels_e1, preds).ravel()
fpr = fp/(fp+tn)
fnr = fn/(fn+tp)
return fpr, fnr
def compute_fdr(fprs, fnrs, omega=0.5):
A = np.absolute(fprs[0]-fprs[1])
B = np.absolute(fnrs[0]-fnrs[1])
return 1 - (omega*A + (1-omega)*B)
def compute_auFDR(fpr_ov, tpr_ov, threshold_ov, sim_g0, sim_g1, labels_g0, labels_g1,
score_dir, emb_FLAG=True, omega=0.5):
fdrs = []
fnrs = []
for fpr in tqdm(fprs):
thresh = threshold_ov[np.nanargmin(np.absolute((fpr_ov-fpr)))]
fnr = 1 - tpr_ov[np.nanargmin(np.absolute((fpr_ov-fpr)))]
fpr_g0, fnr_g0 = compute_fpr_fnr(sim_g0, labels_g0, thresh)
fpr_g1, fnr_g1 = compute_fpr_fnr(sim_g1, labels_g1, thresh)
fdr = compute_fdr((fpr_g0, fpr_g1), (fnr_g0, fnr_g1), float(omega))
fdrs.append(np.round(fdr*100,2))
fnrs.append(np.round(fnr*100,2))
auFDR = auc([x*100 for x in fprs], fdrs)
auFDR_10 = auc([x*100 for x in fprs[0:10]], fdrs[0:10])
df = pd.DataFrame(zip(fprs,fdrs, fnrs), columns=['fpr','fdr', 'fnr'])
if emb_FLAG:
print("Alpha = {} auFDR auFDR_10".format(omega))
print("Embeddings: {} {}\n".format(auFDR, auFDR_10))
df.to_csv(os.path.join(score_dir, 'fdr_at_fpr_gender_omega_{}.csv'.format(omega)), index=None)
else:
print("Alpha = {} auFDR auFDR_10".format(omega))
print("xvectors: {} {}\n".format(auFDR, auFDR_10))
df.to_csv(os.path.join(score_dir, 'fdr_at_fpr_gender_omega_{}.csv'.format(omega)), index=None)
return auFDR, auFDR_10
def main(args):
xvec_FLAG = args.eval_xvector
trial_dir = args.trials_root
trials = os.path.join(trial_dir, 'Test-Combined.csv')
df = pd.read_csv(trials)
df['label'] = pd.to_numeric(df['label'])
df_m = df.loc[df["gender_1"]=='male']
df_f = df.loc[df["gender_1"]=='female']
df_m_m = df_m.loc[df_m["gender_2"]=='male']
df_f_f = df_f.loc[df_f["gender_2"]=='female']
if not os.path.exists(os.path.join(trial_dir,'Test-male-all.csv')):
df_m.to_csv(os.path.join(trial_dir,'Test-male-all.csv'), index=None)
if not os.path.exists(os.path.join(trial_dir,'Test-female-all.csv')):
df_f.to_csv(os.path.join(trial_dir,'Test-female-all.csv'), index=None)
if not os.path.exists(os.path.join(trial_dir,'Test-male-male.csv')):
df_m_m.to_csv(os.path.join(trial_dir,'Test-male-male.csv'), index=None)
if not os.path.exists(os.path.join(trial_dir,'Test-female-female.csv')):
df_f_f.to_csv(os.path.join(trial_dir,'Test-female-female.csv'), index=None)
scores_dir_base = args.scores_root
scores_dir_xvec = os.path.join(scores_dir_base,'baseline')
scores_dir = os.path.join(scores_dir_base,'{}'.format(args.mode))
os.makedirs(scores_dir_xvec, exist_ok=True)
os.makedirs(scores_dir, exist_ok=True)
test_utts = np.load(os.path.join(args.data_root,'test_utts.npy'))
pred_dir = args.pred_root
e1 = np.load(os.path.join(pred_dir,'emb1.npy'))
for idx, utt in enumerate(test_utts):
emb_map[utt] = e1[idx,:]
if xvec_FLAG:
xvec = np.load(os.path.join(args.data_root,'test_data.npy'))
for idx, utt in enumerate(test_utts):
xvec_map[utt] = xvec[idx,:]
print("Computing Gender-agnostic scores")
if os.path.exists(os.path.join(scores_dir_xvec, 'sim_xvec_overall.npy')) and os.path.exists(os.path.join(scores_dir, 'sim_e1_overall.npy')) and os.path.exists(os.path.join(scores_dir_xvec, 'labels_overall.npy')):
sim_e1_ov = np.load(os.path.join(scores_dir, 'sim_e1_overall.npy'))
labels_ov = np.load(os.path.join(scores_dir_xvec, 'labels_overall.npy'))
fpr, tpr, threshold = roc_curve(labels_ov, sim_e1_ov)
fnr = 1 - tpr
eer_threshold_e1_ov = threshold[np.nanargmin(np.absolute((fnr - fpr)))]
eer_e1_ov = fpr[np.nanargmin(np.absolute((fnr - fpr))) ]
if xvec_FLAG:
sim_xvec_ov = np.load(os.path.join(scores_dir_xvec, 'sim_xvec_overall.npy'))
fpr, tpr, threshold = roc_curve(labels_ov, sim_xvec_ov)
fnr = 1 - tpr
eer_threshold_xvec_ov = threshold[np.nanargmin(np.absolute((fnr - fpr)))]
eer_xvec_ov = fpr[np.nanargmin(np.absolute((fnr - fpr)))]
print("Done scoring Gender-agnostic trials")
else:
sim_e1_ov, labels_ov, eer_e1_ov, eer_threshold_e1_ov = compute_scores(df, agnostic_FLAG=True)
np.save(os.path.join(scores_dir, 'sim_e1_overall'), sim_e1_ov)
np.save(os.path.join(scores_dir_xvec, 'labels_overall'), labels_ov)
if xvec_FLAG:
sim_xvec_ov, labels_xvec_ov, eer_xvec_ov, eer_threshold_xvec_ov = compute_scores(df, agnostic_FLAG=True, emb_FLAG=False)
np.save(os.path.join(scores_dir_xvec, 'sim_xvec_overall'), sim_xvec_ov)
print("Done scoring Gender-agnostic trials")
print("Computing Gender-specific scores")
if (not os.path.exists(os.path.join(scores_dir, 'sim_e1_male_male.npy'))) or (not os.path.exists(os.path.join(scores_dir, 'sim_e1_female_female.npy'))):
sim_e1_m, labels_e1_m, eer_e1_m, fpr_e1_m, fnr_e1_m = compute_scores(df_m_m, eer_threshold_e1_ov)
sim_e1_f, labels_e1_f, eer_e1_f, fpr_e1_f, fnr_e1_f = compute_scores(df_f_f, eer_threshold_e1_ov)
np.save(os.path.join(scores_dir, 'sim_e1_male_male'), sim_e1_m)
np.save(os.path.join(scores_dir, 'sim_e1_female_female'), sim_e1_f)
np.save(os.path.join(scores_dir_xvec, 'labels_male_male'), labels_e1_m)
np.save(os.path.join(scores_dir_xvec, 'labels_female_female'), labels_e1_f)
print("EER_all EER_Male EER_Female")
print("Embeddings: {} {} {}\n".format(np.round(eer_e1_ov*100,2), np.round(eer_e1_m*100,2), np.round(eer_e1_f*100,2)))
sim_e1_g0 = sim_e1_m
sim_e1_g1 = sim_e1_f
labels_g0 = labels_e1_m
labels_g1 = labels_e1_f
print("Done scoring Gender-specific trials")
else:
sim_e1 = []
labels = []
for group in groups:
sim_e1.append(np.load(os.path.join(scores_dir, 'sim_e1_{}.npy'.format(group))))
labels.append(np.load(os.path.join(scores_dir_xvec, 'labels_{}.npy'.format(group))))
sim_e1_g0 = sim_e1[0]
sim_e1_g1 = sim_e1[1]
labels_g0 = labels[0]
labels_g1 = labels[1]
print("Done scoring Gender-specific trials")
if xvec_FLAG:
if (not os.path.exists(os.path.join(scores_dir_xvec, 'sim_xvec_male_male.npy'))) or (not os.path.exists(os.path.join(scores_dir_xvec, 'sim_xvec_female_female.npy'))):
print("Computing Gender-specific scores for x-vectors")
sim_xvec_m, labels_xvec_m, eer_xvec_m, fpr_xvec_m, fnr_xvec_m = compute_scores(df_m_m, eer_threshold_xvec_ov, emb_FLAG=False)
sim_xvec_f, labels_xvec_f, eer_xvec_f, fpr_xvec_f, fnr_xvec_f = compute_scores(df_f_f, eer_threshold_xvec_ov, emb_FLAG=False)
np.save(os.path.join(scores_dir_xvec, 'sim_xvec_male_male'), sim_xvec_m)
np.save(os.path.join(scores_dir_xvec, 'sim_xvec_female_female'), sim_xvec_f)
sim_xvec_g0 = sim_xvec_m
sim_xvec_g1 = sim_xvec_f
print("x-vector: {} {} {}\n".format(np.round(eer_xvec_ov*100,2), np.round(eer_xvec_m*100,2),np.round(eer_xvec_f*100,2)))
print("Done scoring Gender-specific trials for x-vectors")
else:
sim_xvec = []
for group in groups:
sim_xvec.append(np.load(os.path.join(scores_dir_xvec, 'sim_xvec_{}.npy'.format(group))))
sim_xvec_g0 = sim_xvec[0]
sim_xvec_g1 = sim_xvec[1]
print("Done scoring Gender-specific trials for x-vectors")
fpr_ov, tpr_ov, threshold_ov = roc_curve(labels_ov, sim_e1_ov)
aus, au10s = [], []
for omega in omegas:
au, au10 = compute_auFDR(fpr_ov, tpr_ov, threshold_ov, sim_e1_g0, sim_e1_g1, labels_g0, labels_g1, scores_dir, emb_FLAG=True, omega=omega)
aus.append(au)
au10s.append(au10)
df = pd.DataFrame(zip(omegas,aus, au10s), columns=['omega','au', 'au10'])
df.to_csv(os.path.join(scores_dir, 'au_fdrs.csv'), index=None)
if xvec_FLAG:
fpr_ov, tpr_ov, threshold_ov = roc_curve(labels_ov, sim_xvec_ov)
aus, aus10 = [],[]
for omega in omegas:
compute_auFDR(fpr_ov, tpr_ov, threshold_ov, sim_xvec_g0, sim_xvec_g1, labels_g0, labels_g1, scores_dir_xvec, emb_FLAG=False, omega=omega)
aus.append(au)
au10s.append(au10)
df = pd.DataFrame(zip(omegas,aus, au10s), columns=['omega','au', 'au10'])
df.to_csv(os.path.join(scores_dir_xvec, 'aufdrs.csv'), index=None)
pdb.set_trace()
if __name__=='__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--mode', type=str, required=True)
parser.add_argument('--trials_root', type=str, required=True,
help="Directory containing Test-Combined.csv")
parser.add_argument('--data_root', type=str, required=True,
help="Directory containing test_utts.npy")
parser.add_argument('--pred_root', type=str, required=True,
help="Directory containing Extracted embeddings")
parser.add_argument('--scores_root', type=str, required=True,
help="Directory to save ASV scores")
parser.add_argument('--eval_xvector', default=False, action='store_true')
args = parser.parse_args()
main(args)
| true | true |
f7273c1bf115cb1687982e0d1e6f9de4ff2abedf | 11,677 | py | Python | com/precisely/apis/model/individual_value_variable.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | com/precisely/apis/model/individual_value_variable.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | com/precisely/apis/model/individual_value_variable.py | PreciselyData/PreciselyAPIsSDK-Python | 28ffff0c96d81d3a53a5599c987d54d7b632b508 | [
"Apache-2.0"
] | null | null | null | """
Precisely APIs
Enhance & enrich your data, applications, business processes, and workflows with rich location, information, and identify APIs. # noqa: E501
The version of the OpenAPI document: 11.9.3
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from com.precisely.apis.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenApiModel
)
from com.precisely.apis.exceptions import ApiAttributeError
class IndividualValueVariable(ModelNormal):
"""NOTE: This class is auto generated by OpenAPI Generator.
Ref: https://openapi-generator.tech
Do not edit the class manually.
Attributes:
allowed_values (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
with a capitalized key describing the allowed value and an allowed
value. These dicts store the allowed enum values.
attribute_map (dict): The key is attribute name
and the value is json key in definition.
discriminator_value_class_map (dict): A dict to go from the discriminator
variable value to the discriminator class name.
validations (dict): The key is the tuple path to the attribute
and the for var_name this is (var_name,). The value is a dict
that stores validations for max_length, min_length, max_items,
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
inclusive_minimum, and regex.
additional_properties_type (tuple): A tuple of classes accepted
as additional properties values.
"""
allowed_values = {
}
validations = {
}
@cached_property
def additional_properties_type():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@cached_property
def openapi_types():
"""
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
Returns
openapi_types (dict): The key is attribute name
and the value is attribute type.
"""
return {
'name': (str,), # noqa: E501
'description': (str,), # noqa: E501
'year': (str,), # noqa: E501
'value': (str,), # noqa: E501
}
@cached_property
def discriminator():
return None
attribute_map = {
'name': 'name', # noqa: E501
'description': 'description', # noqa: E501
'year': 'year', # noqa: E501
'value': 'value', # noqa: E501
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
"""IndividualValueVariable - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
name (str): [optional] # noqa: E501
description (str): [optional] # noqa: E501
year (str): [optional] # noqa: E501
value (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
return self
required_properties = set([
'_data_store',
'_check_type',
'_spec_property_naming',
'_path_to_item',
'_configuration',
'_visited_composed_classes',
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs): # noqa: E501
"""IndividualValueVariable - a model defined in OpenAPI
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
Defaults to True
_path_to_item (tuple/list): This is a list of keys or values to
drill down to the model in received_data
when deserializing a response
_spec_property_naming (bool): True if the variable names in the input data
are serialized names, as specified in the OpenAPI document.
False if the variable names in the input data
are pythonic names, e.g. snake case (default)
_configuration (Configuration): the instance to use when
deserializing a file_type parameter.
If passed, type conversion is attempted
If omitted no type conversion is done.
_visited_composed_classes (tuple): This stores a tuple of
classes that we have traveled through so that
if we see that class again we will not use its
discriminator again.
When traveling through a discriminator, the
composed schema that is
is traveled through is added to this set.
For example if Animal has a discriminator
petType and we pass in "Dog", and the class Dog
allOf includes Animal, we move through Animal
once using the discriminator, and pick Dog.
Then in Dog, we will make an instance of the
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
name (str): [optional] # noqa: E501
description (str): [optional] # noqa: E501
year (str): [optional] # noqa: E501
value (str): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
if args:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
# discard variable.
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")
| 43.570896 | 145 | 0.565899 |
import re
import sys
from com.precisely.apis.model_utils import (
ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
cached_property,
change_keys_js_to_python,
convert_js_args_to_python_args,
date,
datetime,
file_type,
none_type,
validate_get_composed_info,
OpenApiModel
)
from com.precisely.apis.exceptions import ApiAttributeError
class IndividualValueVariable(ModelNormal):
allowed_values = {
}
validations = {
}
@cached_property
def additional_properties_type():
return (bool, date, datetime, dict, float, int, list, str, none_type,)
_nullable = False
@cached_property
def openapi_types():
return {
'name': (str,),
'description': (str,),
'year': (str,),
'value': (str,),
}
@cached_property
def discriminator():
return None
attribute_map = {
'name': 'name',
'description': 'description',
'year': 'year',
'value': 'value',
}
read_only_vars = {
}
_composed_schemas = {}
@classmethod
@convert_js_args_to_python_args
def _from_openapi_data(cls, *args, **kwargs):
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
self = super(OpenApiModel, cls).__new__(cls)
if args:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
continue
setattr(self, var_name, var_value)
return self
required_properties = set([
'_data_store',
'_check_type',
'_spec_property_naming',
'_path_to_item',
'_configuration',
'_visited_composed_classes',
])
@convert_js_args_to_python_args
def __init__(self, *args, **kwargs):
_check_type = kwargs.pop('_check_type', True)
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
_path_to_item = kwargs.pop('_path_to_item', ())
_configuration = kwargs.pop('_configuration', None)
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
if args:
raise ApiTypeError(
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
args,
self.__class__.__name__,
),
path_to_item=_path_to_item,
valid_classes=(self.__class__,),
)
self._data_store = {}
self._check_type = _check_type
self._spec_property_naming = _spec_property_naming
self._path_to_item = _path_to_item
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
self.additional_properties_type is None:
continue
setattr(self, var_name, var_value)
if var_name in self.read_only_vars:
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
f"class with read only attributes.")
| true | true |
f7273c9914ccfd701d1ff364fe87e5615b331733 | 1,279 | py | Python | ownblock/ownblock/apps/notices/migrations/0001_initial.py | danjac/ownblock | ac662fb7efb2f04567e2f85638c1250286452611 | [
"MIT"
] | 3 | 2015-06-12T04:42:02.000Z | 2018-10-29T17:09:10.000Z | ownblock/ownblock/apps/notices/migrations/0001_initial.py | danjac/ownblock | ac662fb7efb2f04567e2f85638c1250286452611 | [
"MIT"
] | null | null | null | ownblock/ownblock/apps/notices/migrations/0001_initial.py | danjac/ownblock | ac662fb7efb2f04567e2f85638c1250286452611 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
dependencies = [
('buildings', '__first__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Notice',
fields=[
('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)),
('created', model_utils.fields.AutoCreatedField(editable=False, verbose_name='created', default=django.utils.timezone.now)),
('modified', model_utils.fields.AutoLastModifiedField(editable=False, verbose_name='modified', default=django.utils.timezone.now)),
('title', models.CharField(max_length=100)),
('details', models.TextField(blank=True)),
('author', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
('building', models.ForeignKey(to='buildings.Building')),
],
options={
'abstract': False,
},
bases=(models.Model,),
),
]
| 36.542857 | 147 | 0.620797 |
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import django.utils.timezone
import model_utils.fields
class Migration(migrations.Migration):
dependencies = [
('buildings', '__first__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Notice',
fields=[
('id', models.AutoField(primary_key=True, verbose_name='ID', auto_created=True, serialize=False)),
('created', model_utils.fields.AutoCreatedField(editable=False, verbose_name='created', default=django.utils.timezone.now)),
('modified', model_utils.fields.AutoLastModifiedField(editable=False, verbose_name='modified', default=django.utils.timezone.now)),
('title', models.CharField(max_length=100)),
('details', models.TextField(blank=True)),
('author', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
('building', models.ForeignKey(to='buildings.Building')),
],
options={
'abstract': False,
},
bases=(models.Model,),
),
]
| true | true |
f7273d2cdf1526800b8a09c10a36d9eb9438cb1e | 333 | py | Python | Exercicios/Desafio033.py | victorhugof94/Python | 8b42955634f3ae44bded350ac88396a02b1f6970 | [
"MIT"
] | null | null | null | Exercicios/Desafio033.py | victorhugof94/Python | 8b42955634f3ae44bded350ac88396a02b1f6970 | [
"MIT"
] | null | null | null | Exercicios/Desafio033.py | victorhugof94/Python | 8b42955634f3ae44bded350ac88396a02b1f6970 | [
"MIT"
] | null | null | null | n1 = int(input('primeiro numero:'))
n2 = int(input('segundo numero:'))
n3 = int(input('terceiro numero:'))
menor = n1
if n2<n1 and n2<n3:
menor=n2
if n3<n1 and n3<n2:
menor=n3
maior = n1
if n2>n1 and n2>n3:
maior=n2
if n3>n1 and n3>n2:
maior=n3
print ('menor = {}'.format(menor))
print ('maior = {}'.format(maior)) | 18.5 | 35 | 0.621622 | n1 = int(input('primeiro numero:'))
n2 = int(input('segundo numero:'))
n3 = int(input('terceiro numero:'))
menor = n1
if n2<n1 and n2<n3:
menor=n2
if n3<n1 and n3<n2:
menor=n3
maior = n1
if n2>n1 and n2>n3:
maior=n2
if n3>n1 and n3>n2:
maior=n3
print ('menor = {}'.format(menor))
print ('maior = {}'.format(maior)) | true | true |
f7273d39afe2ba8bd90bcbf4e85702e9d6bb3817 | 43,399 | py | Python | podpac/core/coordinates/test/test_uniform_coordinates1d.py | creare-com/podpac | 7feb5c957513c146ce73ba1c36c630284f513a6e | [
"Apache-2.0"
] | 46 | 2018-04-06T19:54:32.000Z | 2022-02-08T02:00:02.000Z | podpac/core/coordinates/test/test_uniform_coordinates1d.py | creare-com/podpac | 7feb5c957513c146ce73ba1c36c630284f513a6e | [
"Apache-2.0"
] | 474 | 2018-04-05T22:21:09.000Z | 2022-02-24T14:21:16.000Z | podpac/core/coordinates/test/test_uniform_coordinates1d.py | creare-com/podpac | 7feb5c957513c146ce73ba1c36c630284f513a6e | [
"Apache-2.0"
] | 4 | 2019-04-11T17:49:53.000Z | 2020-11-29T22:36:53.000Z | from datetime import datetime
import json
import pytest
import traitlets as tl
import numpy as np
from numpy.testing import assert_equal
import podpac
from podpac.core.coordinates.utils import make_coord_array
from podpac.core.coordinates.coordinates1d import Coordinates1d
from podpac.core.coordinates.array_coordinates1d import ArrayCoordinates1d
from podpac.core.coordinates.uniform_coordinates1d import UniformCoordinates1d
from podpac.core.coordinates.coordinates import Coordinates
class TestUniformCoordinatesCreation(object):
def test_numerical(self):
# ascending
c = UniformCoordinates1d(0, 50, 10)
a = np.array([0, 10, 20, 30, 40, 50], dtype=float)
assert c.start == 0
assert c.stop == 50
assert c.step == 10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [0, 50])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 6
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
# descending
c = UniformCoordinates1d(50, 0, -10)
a = np.array([50, 40, 30, 20, 10, 0], dtype=float)
assert c.start == 50
assert c.stop == 0
assert c.step == -10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [0, 50])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 6
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_numerical_inexact(self):
# ascending
c = UniformCoordinates1d(0, 49, 10)
a = np.array([0, 10, 20, 30, 40], dtype=float)
assert c.start == 0
assert c.stop == 49
assert c.step == 10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [0, 40])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 5
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
# descending
c = UniformCoordinates1d(50, 1, -10)
a = np.array([50, 40, 30, 20, 10], dtype=float)
assert c.start == 50
assert c.stop == 1
assert c.step == -10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [10, 50])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.dtype == float
assert c.size == a.size
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_datetime(self):
# ascending
c = UniformCoordinates1d("2018-01-01", "2018-01-04", "1,D")
a = np.array(["2018-01-01", "2018-01-02", "2018-01-03", "2018-01-04"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-04")
assert c.step == np.timedelta64(1, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
# descending
c = UniformCoordinates1d("2018-01-04", "2018-01-01", "-1,D")
a = np.array(["2018-01-04", "2018-01-03", "2018-01-02", "2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-04")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-1, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_datetime_inexact(self):
# ascending
c = UniformCoordinates1d("2018-01-01", "2018-01-06", "2,D")
a = np.array(["2018-01-01", "2018-01-03", "2018-01-05"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-06")
assert c.step == np.timedelta64(2, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
# descending
c = UniformCoordinates1d("2018-01-06", "2018-01-01", "-2,D")
a = np.array(["2018-01-06", "2018-01-04", "2018-01-02"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-06")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-2, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_datetime_month_step(self):
# ascending
c = UniformCoordinates1d("2018-01-01", "2018-04-01", "1,M")
a = np.array(["2018-01-01", "2018-02-01", "2018-03-01", "2018-04-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-04-01")
assert c.step == np.timedelta64(1, "M")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
# descending
c = UniformCoordinates1d("2018-04-01", "2018-01-01", "-1,M")
a = np.array(["2018-04-01", "2018-03-01", "2018-02-01", "2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-04-01")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-1, "M")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_datetime_year_step(self):
# ascending, exact
c = UniformCoordinates1d("2018-01-01", "2021-01-01", "1,Y")
a = np.array(["2018-01-01", "2019-01-01", "2020-01-01", "2021-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2021-01-01")
assert c.step == np.timedelta64(1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
# descending, exact
c = UniformCoordinates1d("2021-01-01", "2018-01-01", "-1,Y")
a = np.array(["2021-01-01", "2020-01-01", "2019-01-01", "2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2021-01-01")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
# ascending, inexact (two cases)
c = UniformCoordinates1d("2018-01-01", "2021-04-01", "1,Y")
a = np.array(["2018-01-01", "2019-01-01", "2020-01-01", "2021-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2021-04-01")
assert c.step == np.timedelta64(1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
c = UniformCoordinates1d("2018-04-01", "2021-01-01", "1,Y")
a = np.array(["2018-04-01", "2019-04-01", "2020-04-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-04-01")
assert c.stop == np.datetime64("2021-01-01")
assert c.step == np.timedelta64(1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
# descending, inexact (two cases)
c = UniformCoordinates1d("2021-01-01", "2018-04-01", "-1,Y")
a = np.array(["2021-01-01", "2020-01-01", "2019-01-01", "2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2021-01-01")
assert c.stop == np.datetime64("2018-04-01")
assert c.step == np.timedelta64(-1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
c = UniformCoordinates1d("2021-04-01", "2018-01-01", "-1,Y")
a = np.array(["2021-04-01", "2020-04-01", "2019-04-01", "2018-04-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2021-04-01")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_numerical_size(self):
# ascending
c = UniformCoordinates1d(0, 10, size=20)
assert c.start == 0
assert c.stop == 10
assert c.step == 10 / 19.0
assert_equal(c.coordinates, np.linspace(0, 10, 20))
assert_equal(c.bounds, [0, 10])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 20
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
# descending
c = UniformCoordinates1d(10, 0, size=20)
assert c.start == 10
assert c.stop == 0
assert c.step == -10 / 19.0
assert_equal(c.coordinates, np.linspace(10, 0, 20))
assert_equal(c.bounds, [0, 10])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 20
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_datetime_size(self):
# ascending
c = UniformCoordinates1d("2018-01-01", "2018-01-10", size=10)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-10")
assert_equal(c.bounds, [np.datetime64("2018-01-01"), np.datetime64("2018-01-10")])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 10
assert c.dtype == np.datetime64
assert c.is_descending == False
# descending
c = UniformCoordinates1d("2018-01-10", "2018-01-01", size=10)
assert c.start == np.datetime64("2018-01-10")
assert c.stop == np.datetime64("2018-01-01")
assert_equal(c.bounds, [np.datetime64("2018-01-01"), np.datetime64("2018-01-10")])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 10
assert c.dtype == np.datetime64
assert c.is_descending == True
# increase resolution
c = UniformCoordinates1d("2018-01-01", "2018-01-10", size=21)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-10")
assert_equal(c.bounds, [np.datetime64("2018-01-01"), np.datetime64("2018-01-10")])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 21
assert c.dtype == np.datetime64
assert c.is_descending == False
def test_datetime_size_invalid(self):
with pytest.raises(ValueError, match="Cannot divide timedelta"):
c = UniformCoordinates1d("2018-01-01", "2018-01-10", size=20)
def test_numerical_size_floating_point_error(self):
c = UniformCoordinates1d(50.619, 50.62795, size=30)
assert c.size == 30
def test_numerical_singleton(self):
# positive step
c = UniformCoordinates1d(1, 1, 10)
a = np.array([1], dtype=float)
assert c.start == 1
assert c.stop == 1
assert c.step == 10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [1, 1])
assert c.size == 1
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == None
assert c.is_uniform == True
# negative step
c = UniformCoordinates1d(1, 1, -10)
a = np.array([1], dtype=float)
assert c.start == 1
assert c.stop == 1
assert c.step == -10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [1, 1])
assert c.size == 1
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == None
assert c.is_uniform == True
def test_datetime_singleton(self):
# positive step
c = UniformCoordinates1d("2018-01-01", "2018-01-01", "1,D")
a = np.array(["2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(1, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == None
assert c.is_uniform == True
# negative step
c = UniformCoordinates1d("2018-01-01", "2018-01-01", "-1,D")
a = np.array(["2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-1, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == None
assert c.is_uniform == True
def test_from_tuple(self):
# numerical, step
c = UniformCoordinates1d.from_tuple((0, 10, 0.5))
assert c.start == 0.0
assert c.stop == 10.0
assert c.step == 0.5
# numerical, size
c = UniformCoordinates1d.from_tuple((0, 10, 20))
assert c.start == 0.0
assert c.stop == 10.0
assert c.size == 20
# datetime, step
c = UniformCoordinates1d.from_tuple(("2018-01-01", "2018-01-04", "1,D"))
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-04")
assert c.step == np.timedelta64(1, "D")
# invalid
with pytest.raises(ValueError, match="UniformCoordinates1d.from_tuple expects a tuple"):
UniformCoordinates1d.from_tuple((0, 10))
with pytest.raises(ValueError, match="UniformCoordinates1d.from_tuple expects a tuple"):
UniformCoordinates1d.from_tuple(np.array([0, 10, 0.5]))
def test_copy(self):
c = UniformCoordinates1d(0, 10, 50, name="lat")
c2 = c.copy()
assert c is not c2
assert c == c2
def test_invalid_init(self):
with pytest.raises(ValueError):
UniformCoordinates1d(0, 0, 0)
with pytest.raises(ValueError):
UniformCoordinates1d(0, 50, 0)
with pytest.raises(ValueError):
UniformCoordinates1d(0, 50, -10)
with pytest.raises(ValueError):
UniformCoordinates1d(50, 0, 10)
with pytest.raises(TypeError):
UniformCoordinates1d(0, "2018-01-01", 10)
with pytest.raises(TypeError):
UniformCoordinates1d("2018-01-01", 50, 10)
with pytest.raises(TypeError):
UniformCoordinates1d("2018-01-01", "2018-01-02", 10)
with pytest.raises(TypeError):
UniformCoordinates1d(0.0, "2018-01-01", "1,D")
with pytest.raises(TypeError):
UniformCoordinates1d("2018-01-01", 50, "1,D")
with pytest.raises(TypeError):
UniformCoordinates1d(0, 50, "1,D")
with pytest.raises(ValueError):
UniformCoordinates1d("a", 50, 10)
with pytest.raises(ValueError):
UniformCoordinates1d(0, "b", 10)
with pytest.raises(ValueError):
UniformCoordinates1d(0, 50, "a")
with pytest.raises(TypeError):
UniformCoordinates1d()
with pytest.raises(TypeError):
UniformCoordinates1d(0)
with pytest.raises(TypeError):
UniformCoordinates1d(0, 50)
with pytest.raises(TypeError):
UniformCoordinates1d(0, 50, 10, size=6)
with pytest.raises(TypeError):
UniformCoordinates1d(0, 10, size=20.0)
with pytest.raises(TypeError):
UniformCoordinates1d(0, 10, size="string")
with pytest.raises(TypeError):
UniformCoordinates1d("2018-01-10", "2018-01-01", size="1,D")
class TestUniformCoordinatesEq(object):
def test_equal(self):
c1 = UniformCoordinates1d(0, 50, 10)
c2 = UniformCoordinates1d(0, 50, 10)
c3 = UniformCoordinates1d(0, 50, 10)
c4 = UniformCoordinates1d(5, 50, 10)
c5 = UniformCoordinates1d(0, 60, 10)
c6 = UniformCoordinates1d(0, 50, 5)
c7 = UniformCoordinates1d(50, 0, -10)
assert c1 == c2
assert c1 == c3
assert c1 != c4
assert c1 != c5
assert c1 != c6
assert c1 != c7
def test_equal_array_coordinates(self):
c1 = UniformCoordinates1d(0, 50, 10)
c2 = ArrayCoordinates1d([0, 10, 20, 30, 40, 50])
c3 = ArrayCoordinates1d([10, 20, 30, 40, 50, 60])
assert c1 == c2
assert c1 != c3
class TestUniformCoordinatesSerialization(object):
def test_definition(self):
# numerical
c = UniformCoordinates1d(0, 50, 10, name="lat")
d = c.definition
assert isinstance(d, dict)
assert set(d.keys()) == set(["start", "stop", "step", "name"])
json.dumps(d, cls=podpac.core.utils.JSONEncoder) # test serializable
c2 = UniformCoordinates1d.from_definition(d) # test from_definition
assert c2 == c
# datetimes
c = UniformCoordinates1d("2018-01-01", "2018-01-03", "1,D")
d = c.definition
assert isinstance(d, dict)
assert set(d.keys()) == set(["start", "stop", "step"])
json.dumps(d, cls=podpac.core.utils.JSONEncoder) # test serializable
c2 = UniformCoordinates1d.from_definition(d) # test from_definition
assert c2 == c
def test_invalid_definition(self):
# incorrect definition
d = {"stop": 50}
with pytest.raises(ValueError, match='UniformCoordinates1d definition requires "start"'):
UniformCoordinates1d.from_definition(d)
d = {"start": 0}
with pytest.raises(ValueError, match='UniformCoordinates1d definition requires "stop"'):
UniformCoordinates1d.from_definition(d)
def test_from_definition_size(self):
# numerical
d = {"start": 0, "stop": 50, "size": 6}
c = UniformCoordinates1d.from_definition(d)
assert_equal(c.coordinates, [0, 10, 20, 30, 40, 50])
# datetime, size
d = {"start": "2018-01-01", "stop": "2018-01-03", "size": 3}
c = UniformCoordinates1d.from_definition(d)
assert_equal(c.coordinates, np.array(["2018-01-01", "2018-01-02", "2018-01-03"]).astype(np.datetime64))
class TestUniformCoordinatesIndexing(object):
def test_len(self):
c = UniformCoordinates1d(0, 50, 10)
assert len(c) == 6
def test_index(self):
c = UniformCoordinates1d(0, 50, 10, name="lat")
# int
c2 = c[2]
assert isinstance(c2, Coordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [20])
c2 = c[-2]
assert isinstance(c2, Coordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [40])
# slice
c2 = c[:2]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 0
assert c2.stop == 10
assert c2.step == 10
c2 = c[2:]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 20
assert c2.stop == 50
assert c2.step == 10
c2 = c[::2]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 0
assert c2.stop == 50
assert c2.step == 20
c2 = c[1:-1]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 10
assert c2.stop == 40
assert c2.step == 10
c2 = c[-3:5]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 30
assert c2.stop == 40
assert c2.step == 10
c2 = c[::-1]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 50
assert c2.stop == 0
assert c2.step == -10
# index array
c2 = c[[0, 1, 3]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [0, 10, 30])
c2 = c[[3, 1, 0]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [30, 10, 0])
c2 = c[[0, 3, 1]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [0, 30, 10])
c2 = c[[]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [])
c2 = c[0:0]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [])
c2 = c[[]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [])
# boolean array
c2 = c[[True, True, True, False, True, False]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [0, 10, 20, 40])
# invalid
with pytest.raises(IndexError):
c[0.3]
with pytest.raises(IndexError):
c[10]
def test_index_descending(self):
c = UniformCoordinates1d(50, 0, -10, name="lat")
# int
c2 = c[2]
assert isinstance(c2, Coordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [30])
c2 = c[-2]
assert isinstance(c2, Coordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [10])
# slice
c2 = c[:2]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 50
assert c2.stop == 40
assert c2.step == -10
c2 = c[2:]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 30
assert c2.stop == 0
assert c2.step == -10
c2 = c[::2]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 50
assert c2.stop == 0
assert c2.step == -20
c2 = c[1:-1]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 40
assert c2.stop == 10
assert c2.step == -10
c2 = c[-3:5]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 20
assert c2.stop == 10
assert c2.step == -10
c2 = c[::-1]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 0
assert c2.stop == 50
assert c2.step == 10
# index array
c2 = c[[0, 1, 3]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [50, 40, 20])
c2 = c[[3, 1, 0]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [20, 40, 50])
c2 = c[[0, 3, 1]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [50, 20, 40])
# boolean array
c2 = c[[True, True, True, False, True, False]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [50, 40, 30, 10])
def test_in(self):
c = UniformCoordinates1d(0, 50, 10, name="lat")
assert 0 in c
assert 10 in c
assert 50 in c
assert -10 not in c
assert 60 not in c
assert 5 not in c
assert np.datetime64("2018") not in c
assert "a" not in c
c = UniformCoordinates1d(50, 0, -10, name="lat")
assert 0 in c
assert 10 in c
assert 50 in c
assert -10 not in c
assert 60 not in c
assert 5 not in c
assert np.datetime64("2018") not in c
assert "a" not in c
c = UniformCoordinates1d("2020-01-01", "2020-01-09", "2,D", name="time")
assert np.datetime64("2020-01-01") in c
assert np.datetime64("2020-01-03") in c
assert np.datetime64("2020-01-09") in c
assert np.datetime64("2020-01-11") not in c
assert np.datetime64("2020-01-02") not in c
assert 10 not in c
assert "a" not in c
class TestArrayCoordinatesAreaBounds(object):
def test_get_area_bounds_numerical(self):
c = UniformCoordinates1d(0, 50, 10)
# point
area_bounds = c.get_area_bounds(None)
assert_equal(area_bounds, [0.0, 50.0])
# uniform
area_bounds = c.get_area_bounds(0.5)
assert_equal(area_bounds, [-0.5, 50.5])
# segment
area_bounds = c.get_area_bounds([-0.2, 0.7])
assert_equal(area_bounds, [-0.2, 50.7])
# polygon (i.e. there would be corresponding offets for another dimension)
area_bounds = c.get_area_bounds([-0.2, -0.5, 0.7, 0.5])
assert_equal(area_bounds, [-0.5, 50.7])
def test_get_area_bounds_datetime(self):
c = UniformCoordinates1d("2018-01-01", "2018-01-04", "1,D")
# point
area_bounds = c.get_area_bounds(None)
assert_equal(area_bounds, make_coord_array(["2018-01-01", "2018-01-04"]))
# uniform
area_bounds = c.get_area_bounds("1,D")
assert_equal(area_bounds, make_coord_array(["2017-12-31", "2018-01-05"]))
area_bounds = c.get_area_bounds("1,M")
assert_equal(area_bounds, make_coord_array(["2017-12-01", "2018-02-04"]))
area_bounds = c.get_area_bounds("1,Y")
assert_equal(area_bounds, make_coord_array(["2017-01-01", "2019-01-04"]))
# segment
area_bounds = c.get_area_bounds(["0,h", "12,h"])
assert_equal(area_bounds, make_coord_array(["2018-01-01 00:00", "2018-01-04 12:00"]))
class TestUniformCoordinatesSelection(object):
def test_select_all_shortcut(self):
c = UniformCoordinates1d(20.0, 70.0, 10.0)
s = c.select([0, 100])
assert s.start == 20.0
assert s.stop == 70.0
assert s.step == 10.0
s, I = c.select([0, 100], return_index=True)
assert s.start == 20.0
assert s.stop == 70.0
assert s.step == 10.0
assert_equal(c[I], s)
def test_select_none_shortcut(self):
c = UniformCoordinates1d(20.0, 70.0, 10.0)
# above
s = c.select([100, 200])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([100, 200], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert c[I] == s
# below
s = c.select([0, 5])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([0, 5], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert c[I] == s
def test_select_ascending(self):
c = UniformCoordinates1d(20.0, 70.0, 10.0)
# inner
s = c.select([35.0, 55.0])
assert s.start == 40.0
assert s.stop == 50.0
assert s.step == 10.0
s, I = c.select([35.0, 55.0], return_index=True)
assert s.start == 40.0
assert s.stop == 50.0
assert s.step == 10.0
assert c[I] == s
# inner with aligned bounds
s = c.select([30.0, 60.0])
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
s, I = c.select([30.0, 60.0], return_index=True)
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
assert c[I] == s
# above
s = c.select([45, 100])
assert s.start == 50.0
assert s.stop == 70.0
assert s.step == 10.0
s, I = c.select([45, 100], return_index=True)
assert s.start == 50.0
assert s.stop == 70.0
assert s.step == 10.0
assert c[I] == s
# below
s = c.select([5, 55])
assert s.start == 20.0
assert s.stop == 50.0
assert s.step == 10.0
s, I = c.select([5, 55], return_index=True)
assert s.start == 20.0
assert s.stop == 50.0
assert s.step == 10.0
assert c[I] == s
# between coordinates
s = c.select([52, 55])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([52, 55], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert_equal(c.coordinates[I], [])
# backwards bounds
s = c.select([70, 30])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([70, 30], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert_equal(c.coordinates[I], [])
def test_select_descending(self):
c = UniformCoordinates1d(70.0, 20.0, -10.0)
# inner
s = c.select([35.0, 55.0])
assert s.start == 50.0
assert s.stop == 40.0
assert s.step == -10.0
s, I = c.select([35.0, 55.0], return_index=True)
assert s.start == 50.0
assert s.stop == 40.0
assert s.step == -10.0
assert c[I] == s
# inner with aligned bounds
s = c.select([30.0, 60.0])
assert s.start == 60.0
assert s.stop == 30.0
assert s.step == -10.0
s, I = c.select([30.0, 60.0], return_index=True)
assert s.start == 60.0
assert s.stop == 30.0
assert s.step == -10.0
assert c[I] == s
# above
s = c.select([45, 100])
assert s.start == 70.0
assert s.stop == 50.0
assert s.step == -10.0
s, I = c.select([45, 100], return_index=True)
assert s.start == 70.0
assert s.stop == 50.0
assert s.step == -10.0
assert c[I] == s
# below
s = c.select([5, 55])
assert s.start == 50.0
assert s.stop == 20.0
assert s.step == -10.0
s, I = c.select([5, 55], return_index=True)
assert s.start == 50.0
assert s.stop == 20.0
assert s.step == -10.0
assert c[I] == s
# between coordinates
s = c.select([52, 55])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([52, 55], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert_equal(c.coordinates[I], [])
# backwards bounds
s = c.select([70, 30])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([70, 30], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert_equal(c.coordinates[I], [])
def test_select_outer(self):
c = UniformCoordinates1d(20.0, 70.0, 10.0)
# inner
s = c.select([35.0, 55.0], outer=True)
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
s, I = c.select([35.0, 55.0], outer=True, return_index=True)
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
assert c[I] == s
# inner with aligned bounds
s = c.select([30.0, 60.0], outer=True)
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
s, I = c.select([30.0, 60.0], outer=True, return_index=True)
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
assert c[I] == s
# above
s = c.select([45, 100], outer=True)
assert s.start == 40.0
assert s.stop == 70.0
assert s.step == 10.0
s, I = c.select([45, 100], outer=True, return_index=True)
assert s.start == 40.0
assert s.stop == 70.0
assert s.step == 10.0
assert c[I] == s
# below
s = c.select([5, 55], outer=True)
assert s.start == 20.0
assert s.stop == 60.0
assert s.step == 10.0
s, I = c.select([5, 55], outer=True, return_index=True)
assert s.start == 20.0
assert s.stop == 60.0
assert s.step == 10.0
assert c[I] == s
# between coordinates
s = c.select([52, 55], outer=True)
assert s.start == 50.0
assert s.stop == 60.0
assert s.step == 10.0
s, I = c.select([52, 55], outer=True, return_index=True)
assert s.start == 50.0
assert s.stop == 60.0
assert s.step == 10.0
assert c[I] == s
# backwards bounds
s = c.select([70, 30], outer=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([70, 30], outer=True, return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert_equal(c.coordinates[I], [])
def test_select_time_variable_precision(self):
c = UniformCoordinates1d("2012-05-19", "2012-05-20", "1,D", name="time")
c2 = UniformCoordinates1d("2012-05-20T12:00:00", "2012-05-21T12:00:00", "1,D", name="time")
s = c.select(c2.bounds, outer=True)
s1 = c.select(c2.bounds, outer=False)
s2 = c2.select(c.bounds)
assert s.size == 1
assert s1.size == 0
assert s2.size == 1
class TestUniformCoordinatesMethods(object):
def test_unique(self):
c = UniformCoordinates1d(1, 5, step=1)
c2 = c.unique()
assert c2 == c and c2 is not c
c2, I = c.unique(return_index=True)
assert c2 == c and c2 is not c
assert c2 == c[I]
def test_simplify(self):
c = UniformCoordinates1d(1, 5, step=1)
c2 = c.simplify()
assert c2 == c and c2 is not c
# reversed, step -2
c = UniformCoordinates1d(4, 0, step=-2)
c2 = c.simplify()
assert c2 == c and c2 is not c
# time, convert to UniformCoordinates
c = UniformCoordinates1d("2020-01-01", "2020-01-05", step="1,D")
c2 = c.simplify()
assert c2 == c and c2 is not c
# time, reverse -2,h
c = UniformCoordinates1d("2020-01-01T12:00", "2020-01-01T08:00", step="-3,h")
c2 = c.simplify()
assert c2 == c and c2 is not c
def test_flatten(self):
c = UniformCoordinates1d(1, 5, step=1)
c2 = c.flatten()
assert c2 == c and c2 is not c
def test_reshape(self):
c = UniformCoordinates1d(1, 6, step=1, name="lat")
c2 = c.reshape((2, 3))
assert c2 == ArrayCoordinates1d(c.coordinates.reshape((2, 3)), name="lat")
def test_issubset(self):
c1 = UniformCoordinates1d(2, 1, step=-1)
c2 = UniformCoordinates1d(1, 3, step=1)
c3 = UniformCoordinates1d(0, 2, step=1)
c4 = UniformCoordinates1d(1, 4, step=0.5)
c5 = UniformCoordinates1d(1.5, 2.5, step=0.5)
c6 = UniformCoordinates1d(1.4, 2.4, step=0.5)
c7 = UniformCoordinates1d(1.4, 2.4, step=10)
# self
assert c1.issubset(c1)
# subsets
assert c1.issubset(c2)
assert c1.issubset(c3)
assert c1.issubset(c4)
assert c5.issubset(c4)
assert c7.issubset(c6)
# not subsets
assert not c2.issubset(c1)
assert not c2.issubset(c3)
assert not c3.issubset(c1)
assert not c3.issubset(c2)
assert not c4.issubset(c1)
assert not c6.issubset(c4)
def test_issubset_datetime(self):
c1 = UniformCoordinates1d("2020-01-01", "2020-01-03", "1,D")
c2 = UniformCoordinates1d("2020-01-01", "2020-01-03", "2,D")
c3 = UniformCoordinates1d("2020-01-01", "2020-01-05", "1,D")
c4 = UniformCoordinates1d("2020-01-05", "2020-01-01", "-2,D")
# self
assert c1.issubset(c1)
# same resolution
assert c1.issubset(c3)
assert c2.issubset(c1)
assert c2.issubset(c4)
assert not c1.issubset(c2)
assert not c1.issubset(c4)
assert not c3.issubset(c1)
# different resolution
c5 = UniformCoordinates1d("2020-01-01T00:00", "2020-01-03T00:00", "1,D")
c6 = UniformCoordinates1d("2020-01-01T00:00", "2020-01-03T00:00", "6,h")
assert c1.issubset(c5)
assert c5.issubset(c1)
assert c1.issubset(c6)
assert not c6.issubset(c1)
def test_issubset_dtype(self):
c1 = UniformCoordinates1d(0, 10, step=1)
c2 = UniformCoordinates1d("2018", "2020", step="1,Y")
assert not c1.issubset(c2)
assert not c2.issubset(c1)
def test_issubset_array_coordinates(self):
u = UniformCoordinates1d(start=1, stop=3, step=1)
a1 = ArrayCoordinates1d([1, 3, 2])
a2 = ArrayCoordinates1d([1, 2, 3])
a3 = ArrayCoordinates1d([1, 3, 4])
e = ArrayCoordinates1d([])
# self
assert u.issubset(a1)
assert u.issubset(a2)
assert not u.issubset(a3)
assert not u.issubset(e)
def test_issubset_coordinates(self):
u = UniformCoordinates1d(1, 3, 1, name="lat")
c1 = Coordinates([[1, 2, 3], [10, 20, 30]], dims=["lat", "lon"])
c2 = Coordinates([[1, 2, 4], [10, 20, 30]], dims=["lat", "lon"])
c3 = Coordinates([[10, 20, 30]], dims=["alt"])
assert u.issubset(c1)
assert not u.issubset(c2)
assert not u.issubset(c3)
| 34.999194 | 111 | 0.57446 | from datetime import datetime
import json
import pytest
import traitlets as tl
import numpy as np
from numpy.testing import assert_equal
import podpac
from podpac.core.coordinates.utils import make_coord_array
from podpac.core.coordinates.coordinates1d import Coordinates1d
from podpac.core.coordinates.array_coordinates1d import ArrayCoordinates1d
from podpac.core.coordinates.uniform_coordinates1d import UniformCoordinates1d
from podpac.core.coordinates.coordinates import Coordinates
class TestUniformCoordinatesCreation(object):
def test_numerical(self):
c = UniformCoordinates1d(0, 50, 10)
a = np.array([0, 10, 20, 30, 40, 50], dtype=float)
assert c.start == 0
assert c.stop == 50
assert c.step == 10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [0, 50])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 6
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
c = UniformCoordinates1d(50, 0, -10)
a = np.array([50, 40, 30, 20, 10, 0], dtype=float)
assert c.start == 50
assert c.stop == 0
assert c.step == -10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [0, 50])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 6
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_numerical_inexact(self):
c = UniformCoordinates1d(0, 49, 10)
a = np.array([0, 10, 20, 30, 40], dtype=float)
assert c.start == 0
assert c.stop == 49
assert c.step == 10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [0, 40])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 5
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
c = UniformCoordinates1d(50, 1, -10)
a = np.array([50, 40, 30, 20, 10], dtype=float)
assert c.start == 50
assert c.stop == 1
assert c.step == -10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [10, 50])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.dtype == float
assert c.size == a.size
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_datetime(self):
c = UniformCoordinates1d("2018-01-01", "2018-01-04", "1,D")
a = np.array(["2018-01-01", "2018-01-02", "2018-01-03", "2018-01-04"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-04")
assert c.step == np.timedelta64(1, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
c = UniformCoordinates1d("2018-01-04", "2018-01-01", "-1,D")
a = np.array(["2018-01-04", "2018-01-03", "2018-01-02", "2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-04")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-1, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_datetime_inexact(self):
c = UniformCoordinates1d("2018-01-01", "2018-01-06", "2,D")
a = np.array(["2018-01-01", "2018-01-03", "2018-01-05"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-06")
assert c.step == np.timedelta64(2, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
c = UniformCoordinates1d("2018-01-06", "2018-01-01", "-2,D")
a = np.array(["2018-01-06", "2018-01-04", "2018-01-02"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-06")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-2, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_datetime_month_step(self):
c = UniformCoordinates1d("2018-01-01", "2018-04-01", "1,M")
a = np.array(["2018-01-01", "2018-02-01", "2018-03-01", "2018-04-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-04-01")
assert c.step == np.timedelta64(1, "M")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
c = UniformCoordinates1d("2018-04-01", "2018-01-01", "-1,M")
a = np.array(["2018-04-01", "2018-03-01", "2018-02-01", "2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-04-01")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-1, "M")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_datetime_year_step(self):
c = UniformCoordinates1d("2018-01-01", "2021-01-01", "1,Y")
a = np.array(["2018-01-01", "2019-01-01", "2020-01-01", "2021-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2021-01-01")
assert c.step == np.timedelta64(1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
c = UniformCoordinates1d("2021-01-01", "2018-01-01", "-1,Y")
a = np.array(["2021-01-01", "2020-01-01", "2019-01-01", "2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2021-01-01")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
c = UniformCoordinates1d("2018-01-01", "2021-04-01", "1,Y")
a = np.array(["2018-01-01", "2019-01-01", "2020-01-01", "2021-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2021-04-01")
assert c.step == np.timedelta64(1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
c = UniformCoordinates1d("2018-04-01", "2021-01-01", "1,Y")
a = np.array(["2018-04-01", "2019-04-01", "2020-04-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-04-01")
assert c.stop == np.datetime64("2021-01-01")
assert c.step == np.timedelta64(1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
c = UniformCoordinates1d("2021-01-01", "2018-04-01", "-1,Y")
a = np.array(["2021-01-01", "2020-01-01", "2019-01-01", "2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2021-01-01")
assert c.stop == np.datetime64("2018-04-01")
assert c.step == np.timedelta64(-1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
c = UniformCoordinates1d("2021-04-01", "2018-01-01", "-1,Y")
a = np.array(["2021-04-01", "2020-04-01", "2019-04-01", "2018-04-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2021-04-01")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-1, "Y")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_numerical_size(self):
c = UniformCoordinates1d(0, 10, size=20)
assert c.start == 0
assert c.stop == 10
assert c.step == 10 / 19.0
assert_equal(c.coordinates, np.linspace(0, 10, 20))
assert_equal(c.bounds, [0, 10])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 20
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == False
assert c.is_uniform == True
c = UniformCoordinates1d(10, 0, size=20)
assert c.start == 10
assert c.stop == 0
assert c.step == -10 / 19.0
assert_equal(c.coordinates, np.linspace(10, 0, 20))
assert_equal(c.bounds, [0, 10])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 20
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == True
assert c.is_uniform == True
def test_datetime_size(self):
c = UniformCoordinates1d("2018-01-01", "2018-01-10", size=10)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-10")
assert_equal(c.bounds, [np.datetime64("2018-01-01"), np.datetime64("2018-01-10")])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 10
assert c.dtype == np.datetime64
assert c.is_descending == False
c = UniformCoordinates1d("2018-01-10", "2018-01-01", size=10)
assert c.start == np.datetime64("2018-01-10")
assert c.stop == np.datetime64("2018-01-01")
assert_equal(c.bounds, [np.datetime64("2018-01-01"), np.datetime64("2018-01-10")])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 10
assert c.dtype == np.datetime64
assert c.is_descending == True
c = UniformCoordinates1d("2018-01-01", "2018-01-10", size=21)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-10")
assert_equal(c.bounds, [np.datetime64("2018-01-01"), np.datetime64("2018-01-10")])
assert c.coordinates[c.argbounds[0]] == c.bounds[0]
assert c.coordinates[c.argbounds[1]] == c.bounds[1]
assert c.size == 21
assert c.dtype == np.datetime64
assert c.is_descending == False
def test_datetime_size_invalid(self):
with pytest.raises(ValueError, match="Cannot divide timedelta"):
c = UniformCoordinates1d("2018-01-01", "2018-01-10", size=20)
def test_numerical_size_floating_point_error(self):
c = UniformCoordinates1d(50.619, 50.62795, size=30)
assert c.size == 30
def test_numerical_singleton(self):
c = UniformCoordinates1d(1, 1, 10)
a = np.array([1], dtype=float)
assert c.start == 1
assert c.stop == 1
assert c.step == 10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [1, 1])
assert c.size == 1
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == None
assert c.is_uniform == True
c = UniformCoordinates1d(1, 1, -10)
a = np.array([1], dtype=float)
assert c.start == 1
assert c.stop == 1
assert c.step == -10
assert_equal(c.coordinates, a)
assert_equal(c.bounds, [1, 1])
assert c.size == 1
assert c.dtype == float
assert c.is_monotonic == True
assert c.is_descending == None
assert c.is_uniform == True
def test_datetime_singleton(self):
c = UniformCoordinates1d("2018-01-01", "2018-01-01", "1,D")
a = np.array(["2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(1, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[0, -1]])
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == None
assert c.is_uniform == True
c = UniformCoordinates1d("2018-01-01", "2018-01-01", "-1,D")
a = np.array(["2018-01-01"]).astype(np.datetime64)
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-01")
assert c.step == np.timedelta64(-1, "D")
assert_equal(c.coordinates, a)
assert_equal(c.bounds, a[[-1, 0]])
assert c.size == a.size
assert c.dtype == np.datetime64
assert c.is_monotonic == True
assert c.is_descending == None
assert c.is_uniform == True
def test_from_tuple(self):
c = UniformCoordinates1d.from_tuple((0, 10, 0.5))
assert c.start == 0.0
assert c.stop == 10.0
assert c.step == 0.5
c = UniformCoordinates1d.from_tuple((0, 10, 20))
assert c.start == 0.0
assert c.stop == 10.0
assert c.size == 20
c = UniformCoordinates1d.from_tuple(("2018-01-01", "2018-01-04", "1,D"))
assert c.start == np.datetime64("2018-01-01")
assert c.stop == np.datetime64("2018-01-04")
assert c.step == np.timedelta64(1, "D")
with pytest.raises(ValueError, match="UniformCoordinates1d.from_tuple expects a tuple"):
UniformCoordinates1d.from_tuple((0, 10))
with pytest.raises(ValueError, match="UniformCoordinates1d.from_tuple expects a tuple"):
UniformCoordinates1d.from_tuple(np.array([0, 10, 0.5]))
def test_copy(self):
c = UniformCoordinates1d(0, 10, 50, name="lat")
c2 = c.copy()
assert c is not c2
assert c == c2
def test_invalid_init(self):
with pytest.raises(ValueError):
UniformCoordinates1d(0, 0, 0)
with pytest.raises(ValueError):
UniformCoordinates1d(0, 50, 0)
with pytest.raises(ValueError):
UniformCoordinates1d(0, 50, -10)
with pytest.raises(ValueError):
UniformCoordinates1d(50, 0, 10)
with pytest.raises(TypeError):
UniformCoordinates1d(0, "2018-01-01", 10)
with pytest.raises(TypeError):
UniformCoordinates1d("2018-01-01", 50, 10)
with pytest.raises(TypeError):
UniformCoordinates1d("2018-01-01", "2018-01-02", 10)
with pytest.raises(TypeError):
UniformCoordinates1d(0.0, "2018-01-01", "1,D")
with pytest.raises(TypeError):
UniformCoordinates1d("2018-01-01", 50, "1,D")
with pytest.raises(TypeError):
UniformCoordinates1d(0, 50, "1,D")
with pytest.raises(ValueError):
UniformCoordinates1d("a", 50, 10)
with pytest.raises(ValueError):
UniformCoordinates1d(0, "b", 10)
with pytest.raises(ValueError):
UniformCoordinates1d(0, 50, "a")
with pytest.raises(TypeError):
UniformCoordinates1d()
with pytest.raises(TypeError):
UniformCoordinates1d(0)
with pytest.raises(TypeError):
UniformCoordinates1d(0, 50)
with pytest.raises(TypeError):
UniformCoordinates1d(0, 50, 10, size=6)
with pytest.raises(TypeError):
UniformCoordinates1d(0, 10, size=20.0)
with pytest.raises(TypeError):
UniformCoordinates1d(0, 10, size="string")
with pytest.raises(TypeError):
UniformCoordinates1d("2018-01-10", "2018-01-01", size="1,D")
class TestUniformCoordinatesEq(object):
def test_equal(self):
c1 = UniformCoordinates1d(0, 50, 10)
c2 = UniformCoordinates1d(0, 50, 10)
c3 = UniformCoordinates1d(0, 50, 10)
c4 = UniformCoordinates1d(5, 50, 10)
c5 = UniformCoordinates1d(0, 60, 10)
c6 = UniformCoordinates1d(0, 50, 5)
c7 = UniformCoordinates1d(50, 0, -10)
assert c1 == c2
assert c1 == c3
assert c1 != c4
assert c1 != c5
assert c1 != c6
assert c1 != c7
def test_equal_array_coordinates(self):
c1 = UniformCoordinates1d(0, 50, 10)
c2 = ArrayCoordinates1d([0, 10, 20, 30, 40, 50])
c3 = ArrayCoordinates1d([10, 20, 30, 40, 50, 60])
assert c1 == c2
assert c1 != c3
class TestUniformCoordinatesSerialization(object):
def test_definition(self):
c = UniformCoordinates1d(0, 50, 10, name="lat")
d = c.definition
assert isinstance(d, dict)
assert set(d.keys()) == set(["start", "stop", "step", "name"])
json.dumps(d, cls=podpac.core.utils.JSONEncoder)
c2 = UniformCoordinates1d.from_definition(d)
assert c2 == c
c = UniformCoordinates1d("2018-01-01", "2018-01-03", "1,D")
d = c.definition
assert isinstance(d, dict)
assert set(d.keys()) == set(["start", "stop", "step"])
json.dumps(d, cls=podpac.core.utils.JSONEncoder)
c2 = UniformCoordinates1d.from_definition(d)
assert c2 == c
def test_invalid_definition(self):
d = {"stop": 50}
with pytest.raises(ValueError, match='UniformCoordinates1d definition requires "start"'):
UniformCoordinates1d.from_definition(d)
d = {"start": 0}
with pytest.raises(ValueError, match='UniformCoordinates1d definition requires "stop"'):
UniformCoordinates1d.from_definition(d)
def test_from_definition_size(self):
d = {"start": 0, "stop": 50, "size": 6}
c = UniformCoordinates1d.from_definition(d)
assert_equal(c.coordinates, [0, 10, 20, 30, 40, 50])
d = {"start": "2018-01-01", "stop": "2018-01-03", "size": 3}
c = UniformCoordinates1d.from_definition(d)
assert_equal(c.coordinates, np.array(["2018-01-01", "2018-01-02", "2018-01-03"]).astype(np.datetime64))
class TestUniformCoordinatesIndexing(object):
def test_len(self):
c = UniformCoordinates1d(0, 50, 10)
assert len(c) == 6
def test_index(self):
c = UniformCoordinates1d(0, 50, 10, name="lat")
c2 = c[2]
assert isinstance(c2, Coordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [20])
c2 = c[-2]
assert isinstance(c2, Coordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [40])
c2 = c[:2]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 0
assert c2.stop == 10
assert c2.step == 10
c2 = c[2:]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 20
assert c2.stop == 50
assert c2.step == 10
c2 = c[::2]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 0
assert c2.stop == 50
assert c2.step == 20
c2 = c[1:-1]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 10
assert c2.stop == 40
assert c2.step == 10
c2 = c[-3:5]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 30
assert c2.stop == 40
assert c2.step == 10
c2 = c[::-1]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 50
assert c2.stop == 0
assert c2.step == -10
c2 = c[[0, 1, 3]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [0, 10, 30])
c2 = c[[3, 1, 0]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [30, 10, 0])
c2 = c[[0, 3, 1]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [0, 30, 10])
c2 = c[[]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [])
c2 = c[0:0]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [])
c2 = c[[]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [])
c2 = c[[True, True, True, False, True, False]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [0, 10, 20, 40])
with pytest.raises(IndexError):
c[0.3]
with pytest.raises(IndexError):
c[10]
def test_index_descending(self):
c = UniformCoordinates1d(50, 0, -10, name="lat")
c2 = c[2]
assert isinstance(c2, Coordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [30])
c2 = c[-2]
assert isinstance(c2, Coordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [10])
c2 = c[:2]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 50
assert c2.stop == 40
assert c2.step == -10
c2 = c[2:]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 30
assert c2.stop == 0
assert c2.step == -10
c2 = c[::2]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 50
assert c2.stop == 0
assert c2.step == -20
c2 = c[1:-1]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 40
assert c2.stop == 10
assert c2.step == -10
c2 = c[-3:5]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 20
assert c2.stop == 10
assert c2.step == -10
c2 = c[::-1]
assert isinstance(c2, UniformCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert c2.start == 0
assert c2.stop == 50
assert c2.step == 10
c2 = c[[0, 1, 3]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [50, 40, 20])
c2 = c[[3, 1, 0]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [20, 40, 50])
c2 = c[[0, 3, 1]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [50, 20, 40])
c2 = c[[True, True, True, False, True, False]]
assert isinstance(c2, ArrayCoordinates1d)
assert c2.name == c.name
assert c2.properties == c.properties
assert_equal(c2.coordinates, [50, 40, 30, 10])
def test_in(self):
c = UniformCoordinates1d(0, 50, 10, name="lat")
assert 0 in c
assert 10 in c
assert 50 in c
assert -10 not in c
assert 60 not in c
assert 5 not in c
assert np.datetime64("2018") not in c
assert "a" not in c
c = UniformCoordinates1d(50, 0, -10, name="lat")
assert 0 in c
assert 10 in c
assert 50 in c
assert -10 not in c
assert 60 not in c
assert 5 not in c
assert np.datetime64("2018") not in c
assert "a" not in c
c = UniformCoordinates1d("2020-01-01", "2020-01-09", "2,D", name="time")
assert np.datetime64("2020-01-01") in c
assert np.datetime64("2020-01-03") in c
assert np.datetime64("2020-01-09") in c
assert np.datetime64("2020-01-11") not in c
assert np.datetime64("2020-01-02") not in c
assert 10 not in c
assert "a" not in c
class TestArrayCoordinatesAreaBounds(object):
def test_get_area_bounds_numerical(self):
c = UniformCoordinates1d(0, 50, 10)
area_bounds = c.get_area_bounds(None)
assert_equal(area_bounds, [0.0, 50.0])
area_bounds = c.get_area_bounds(0.5)
assert_equal(area_bounds, [-0.5, 50.5])
area_bounds = c.get_area_bounds([-0.2, 0.7])
assert_equal(area_bounds, [-0.2, 50.7])
area_bounds = c.get_area_bounds([-0.2, -0.5, 0.7, 0.5])
assert_equal(area_bounds, [-0.5, 50.7])
def test_get_area_bounds_datetime(self):
c = UniformCoordinates1d("2018-01-01", "2018-01-04", "1,D")
area_bounds = c.get_area_bounds(None)
assert_equal(area_bounds, make_coord_array(["2018-01-01", "2018-01-04"]))
area_bounds = c.get_area_bounds("1,D")
assert_equal(area_bounds, make_coord_array(["2017-12-31", "2018-01-05"]))
area_bounds = c.get_area_bounds("1,M")
assert_equal(area_bounds, make_coord_array(["2017-12-01", "2018-02-04"]))
area_bounds = c.get_area_bounds("1,Y")
assert_equal(area_bounds, make_coord_array(["2017-01-01", "2019-01-04"]))
area_bounds = c.get_area_bounds(["0,h", "12,h"])
assert_equal(area_bounds, make_coord_array(["2018-01-01 00:00", "2018-01-04 12:00"]))
class TestUniformCoordinatesSelection(object):
def test_select_all_shortcut(self):
c = UniformCoordinates1d(20.0, 70.0, 10.0)
s = c.select([0, 100])
assert s.start == 20.0
assert s.stop == 70.0
assert s.step == 10.0
s, I = c.select([0, 100], return_index=True)
assert s.start == 20.0
assert s.stop == 70.0
assert s.step == 10.0
assert_equal(c[I], s)
def test_select_none_shortcut(self):
c = UniformCoordinates1d(20.0, 70.0, 10.0)
s = c.select([100, 200])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([100, 200], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert c[I] == s
s = c.select([0, 5])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([0, 5], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert c[I] == s
def test_select_ascending(self):
c = UniformCoordinates1d(20.0, 70.0, 10.0)
s = c.select([35.0, 55.0])
assert s.start == 40.0
assert s.stop == 50.0
assert s.step == 10.0
s, I = c.select([35.0, 55.0], return_index=True)
assert s.start == 40.0
assert s.stop == 50.0
assert s.step == 10.0
assert c[I] == s
s = c.select([30.0, 60.0])
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
s, I = c.select([30.0, 60.0], return_index=True)
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
assert c[I] == s
s = c.select([45, 100])
assert s.start == 50.0
assert s.stop == 70.0
assert s.step == 10.0
s, I = c.select([45, 100], return_index=True)
assert s.start == 50.0
assert s.stop == 70.0
assert s.step == 10.0
assert c[I] == s
s = c.select([5, 55])
assert s.start == 20.0
assert s.stop == 50.0
assert s.step == 10.0
s, I = c.select([5, 55], return_index=True)
assert s.start == 20.0
assert s.stop == 50.0
assert s.step == 10.0
assert c[I] == s
s = c.select([52, 55])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([52, 55], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert_equal(c.coordinates[I], [])
s = c.select([70, 30])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([70, 30], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert_equal(c.coordinates[I], [])
def test_select_descending(self):
c = UniformCoordinates1d(70.0, 20.0, -10.0)
s = c.select([35.0, 55.0])
assert s.start == 50.0
assert s.stop == 40.0
assert s.step == -10.0
s, I = c.select([35.0, 55.0], return_index=True)
assert s.start == 50.0
assert s.stop == 40.0
assert s.step == -10.0
assert c[I] == s
s = c.select([30.0, 60.0])
assert s.start == 60.0
assert s.stop == 30.0
assert s.step == -10.0
s, I = c.select([30.0, 60.0], return_index=True)
assert s.start == 60.0
assert s.stop == 30.0
assert s.step == -10.0
assert c[I] == s
s = c.select([45, 100])
assert s.start == 70.0
assert s.stop == 50.0
assert s.step == -10.0
s, I = c.select([45, 100], return_index=True)
assert s.start == 70.0
assert s.stop == 50.0
assert s.step == -10.0
assert c[I] == s
s = c.select([5, 55])
assert s.start == 50.0
assert s.stop == 20.0
assert s.step == -10.0
s, I = c.select([5, 55], return_index=True)
assert s.start == 50.0
assert s.stop == 20.0
assert s.step == -10.0
assert c[I] == s
s = c.select([52, 55])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([52, 55], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert_equal(c.coordinates[I], [])
s = c.select([70, 30])
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([70, 30], return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert_equal(c.coordinates[I], [])
def test_select_outer(self):
c = UniformCoordinates1d(20.0, 70.0, 10.0)
s = c.select([35.0, 55.0], outer=True)
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
s, I = c.select([35.0, 55.0], outer=True, return_index=True)
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
assert c[I] == s
s = c.select([30.0, 60.0], outer=True)
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
s, I = c.select([30.0, 60.0], outer=True, return_index=True)
assert s.start == 30.0
assert s.stop == 60.0
assert s.step == 10.0
assert c[I] == s
s = c.select([45, 100], outer=True)
assert s.start == 40.0
assert s.stop == 70.0
assert s.step == 10.0
s, I = c.select([45, 100], outer=True, return_index=True)
assert s.start == 40.0
assert s.stop == 70.0
assert s.step == 10.0
assert c[I] == s
s = c.select([5, 55], outer=True)
assert s.start == 20.0
assert s.stop == 60.0
assert s.step == 10.0
s, I = c.select([5, 55], outer=True, return_index=True)
assert s.start == 20.0
assert s.stop == 60.0
assert s.step == 10.0
assert c[I] == s
s = c.select([52, 55], outer=True)
assert s.start == 50.0
assert s.stop == 60.0
assert s.step == 10.0
s, I = c.select([52, 55], outer=True, return_index=True)
assert s.start == 50.0
assert s.stop == 60.0
assert s.step == 10.0
assert c[I] == s
s = c.select([70, 30], outer=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
s, I = c.select([70, 30], outer=True, return_index=True)
assert isinstance(s, ArrayCoordinates1d)
assert_equal(s.coordinates, [])
assert_equal(c.coordinates[I], [])
def test_select_time_variable_precision(self):
c = UniformCoordinates1d("2012-05-19", "2012-05-20", "1,D", name="time")
c2 = UniformCoordinates1d("2012-05-20T12:00:00", "2012-05-21T12:00:00", "1,D", name="time")
s = c.select(c2.bounds, outer=True)
s1 = c.select(c2.bounds, outer=False)
s2 = c2.select(c.bounds)
assert s.size == 1
assert s1.size == 0
assert s2.size == 1
class TestUniformCoordinatesMethods(object):
def test_unique(self):
c = UniformCoordinates1d(1, 5, step=1)
c2 = c.unique()
assert c2 == c and c2 is not c
c2, I = c.unique(return_index=True)
assert c2 == c and c2 is not c
assert c2 == c[I]
def test_simplify(self):
c = UniformCoordinates1d(1, 5, step=1)
c2 = c.simplify()
assert c2 == c and c2 is not c
c = UniformCoordinates1d(4, 0, step=-2)
c2 = c.simplify()
assert c2 == c and c2 is not c
c = UniformCoordinates1d("2020-01-01", "2020-01-05", step="1,D")
c2 = c.simplify()
assert c2 == c and c2 is not c
c = UniformCoordinates1d("2020-01-01T12:00", "2020-01-01T08:00", step="-3,h")
c2 = c.simplify()
assert c2 == c and c2 is not c
def test_flatten(self):
c = UniformCoordinates1d(1, 5, step=1)
c2 = c.flatten()
assert c2 == c and c2 is not c
def test_reshape(self):
c = UniformCoordinates1d(1, 6, step=1, name="lat")
c2 = c.reshape((2, 3))
assert c2 == ArrayCoordinates1d(c.coordinates.reshape((2, 3)), name="lat")
def test_issubset(self):
c1 = UniformCoordinates1d(2, 1, step=-1)
c2 = UniformCoordinates1d(1, 3, step=1)
c3 = UniformCoordinates1d(0, 2, step=1)
c4 = UniformCoordinates1d(1, 4, step=0.5)
c5 = UniformCoordinates1d(1.5, 2.5, step=0.5)
c6 = UniformCoordinates1d(1.4, 2.4, step=0.5)
c7 = UniformCoordinates1d(1.4, 2.4, step=10)
assert c1.issubset(c1)
assert c1.issubset(c2)
assert c1.issubset(c3)
assert c1.issubset(c4)
assert c5.issubset(c4)
assert c7.issubset(c6)
assert not c2.issubset(c1)
assert not c2.issubset(c3)
assert not c3.issubset(c1)
assert not c3.issubset(c2)
assert not c4.issubset(c1)
assert not c6.issubset(c4)
def test_issubset_datetime(self):
c1 = UniformCoordinates1d("2020-01-01", "2020-01-03", "1,D")
c2 = UniformCoordinates1d("2020-01-01", "2020-01-03", "2,D")
c3 = UniformCoordinates1d("2020-01-01", "2020-01-05", "1,D")
c4 = UniformCoordinates1d("2020-01-05", "2020-01-01", "-2,D")
assert c1.issubset(c1)
assert c1.issubset(c3)
assert c2.issubset(c1)
assert c2.issubset(c4)
assert not c1.issubset(c2)
assert not c1.issubset(c4)
assert not c3.issubset(c1)
c5 = UniformCoordinates1d("2020-01-01T00:00", "2020-01-03T00:00", "1,D")
c6 = UniformCoordinates1d("2020-01-01T00:00", "2020-01-03T00:00", "6,h")
assert c1.issubset(c5)
assert c5.issubset(c1)
assert c1.issubset(c6)
assert not c6.issubset(c1)
def test_issubset_dtype(self):
c1 = UniformCoordinates1d(0, 10, step=1)
c2 = UniformCoordinates1d("2018", "2020", step="1,Y")
assert not c1.issubset(c2)
assert not c2.issubset(c1)
def test_issubset_array_coordinates(self):
u = UniformCoordinates1d(start=1, stop=3, step=1)
a1 = ArrayCoordinates1d([1, 3, 2])
a2 = ArrayCoordinates1d([1, 2, 3])
a3 = ArrayCoordinates1d([1, 3, 4])
e = ArrayCoordinates1d([])
assert u.issubset(a1)
assert u.issubset(a2)
assert not u.issubset(a3)
assert not u.issubset(e)
def test_issubset_coordinates(self):
u = UniformCoordinates1d(1, 3, 1, name="lat")
c1 = Coordinates([[1, 2, 3], [10, 20, 30]], dims=["lat", "lon"])
c2 = Coordinates([[1, 2, 4], [10, 20, 30]], dims=["lat", "lon"])
c3 = Coordinates([[10, 20, 30]], dims=["alt"])
assert u.issubset(c1)
assert not u.issubset(c2)
assert not u.issubset(c3)
| true | true |
f7273dd94996a596fd89b435c509524733c41b42 | 4,323 | py | Python | lyft_CNN.py | govindap/lyft_motion_prediction | 15412444fec69ce4a0082d8de730cb882833eab0 | [
"Apache-2.0"
] | null | null | null | lyft_CNN.py | govindap/lyft_motion_prediction | 15412444fec69ce4a0082d8de730cb882833eab0 | [
"Apache-2.0"
] | null | null | null | lyft_CNN.py | govindap/lyft_motion_prediction | 15412444fec69ce4a0082d8de730cb882833eab0 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import torch
from torch import nn, optim
from torch.utils.data import DataLoader
from torchvision.models.resnet import resnet50, resnet34
from torch import Tensor
from typing import Dict
from l5kit.configs import load_config_data
from l5kit.data import LocalDataManager, ChunkedDataset
from l5kit.dataset import AgentDataset, EgoDataset
from l5kit.rasterization import build_rasterizer
from l5kit.evaluation import write_pred_csv, compute_metrics_csv, read_gt_csv, create_chopped_dataset
from l5kit.evaluation.chop_dataset import MIN_FUTURE_STEPS
from l5kit.evaluation.metrics import neg_multi_log_likelihood, time_displace
from l5kit.geometry import transform_points
from l5kit.visualization import PREDICTED_POINTS_COLOR, TARGET_POINTS_COLOR, draw_trajectory
from pathlib import Path
import pandas as pd
import os
import random
import time
import gc, psutil
cfg = {
'format_version': 4,
'model_params': {
'model_architecture': "resnet34",
'history_num_frames': 10,
'history_step_size': 1,
'history_delta_time': 0.1,
'future_num_frames': 50,
'future_step_size': 1,
'future_delta_time': 0.1,
'model_name': "model_resnet34",
'lr': 1e-3,
'train': True,
'predict': True
},
'raster_params': {
'raster_size': [224, 224],
'pixel_size': [0.5, 0.5],
'ego_center': [0.25, 0.5],
'map_type': 'py_semantic',
'satellite_map_key': 'aerial_map/aerial_map.png',
'semantic_map_key': 'semantic_map/semantic_map.pb',
'dataset_meta_key': 'meta.json',
'filter_agents_threshold': 0.5
},
'train_data_loader': {
'key': 'scenes/train.zarr',
'batch_size': 16,
'shuffle': True,
'num_workers': 0
},
'test_data_loader': {
'key': 'scenes/test.zarr',
'batch_size': 16,
'shuffle': False,
'num_workers': 0,
},
'train_params': {
'steps': 120,
'update_steps': 50,
'checkpoint_steps': 100,
'precision': True
}
}
class LyftCNNModel(nn.Module):
def __init__(self, cfg: Dict, num_modes=3):
super().__init__()
architecture = cfg["model_params"]["model_architecture"]
backbone = eval(architecture)(pretrained=True, progress=True)
self.backbone = backbone
num_history_channels = (cfg["model_params"]["history_num_frames"] + 1) * 2
num_in_channels = 3 + num_history_channels
self.backbone.conv1 = nn.Conv2d(
num_in_channels,
self.backbone.conv1.out_channels,
kernel_size=self.backbone.conv1.kernel_size,
stride=self.backbone.conv1.stride,
padding=self.backbone.conv1.padding,
bias=False,
)
if architecture == "resnet50":
backbone_out_features = 2048
else:
backbone_out_features = 512
# X, Y coords for the future positions (output shape: batch_sizex50x2)
self.future_len = cfg["model_params"]["future_num_frames"]
num_targets = 2 * self.future_len
# You can add more layers here.
self.head = nn.Sequential(
# nn.Dropout(0.2),
nn.Linear(in_features=backbone_out_features, out_features=4096),
)
self.num_preds = num_targets * num_modes
self.num_modes = num_modes
self.logit = nn.Linear(4096, out_features=self.num_preds + num_modes)
def forward(self, x):
x = self.backbone.conv1(x)
x = self.backbone.bn1(x)
x = self.backbone.relu(x)
x = self.backbone.maxpool(x)
x = self.backbone.layer1(x)
x = self.backbone.layer2(x)
x = self.backbone.layer3(x)
x = self.backbone.layer4(x)
x = self.backbone.avgpool(x)
x = torch.flatten(x, 1)
x = self.head(x)
x = self.logit(x)
# pred (batch_size)x(modes)x(time)x(2D coords)
# confidences (batch_size)x(modes)
bs, _ = x.shape
pred, confidences = torch.split(x, self.num_preds, dim=1)
pred = pred.view(bs, self.num_modes, self.future_len, 2)
assert confidences.shape == (bs, self.num_modes)
confidences = torch.softmax(confidences, dim=1)
return pred, confidences
| 31.100719 | 101 | 0.635901 | import numpy as np
import torch
from torch import nn, optim
from torch.utils.data import DataLoader
from torchvision.models.resnet import resnet50, resnet34
from torch import Tensor
from typing import Dict
from l5kit.configs import load_config_data
from l5kit.data import LocalDataManager, ChunkedDataset
from l5kit.dataset import AgentDataset, EgoDataset
from l5kit.rasterization import build_rasterizer
from l5kit.evaluation import write_pred_csv, compute_metrics_csv, read_gt_csv, create_chopped_dataset
from l5kit.evaluation.chop_dataset import MIN_FUTURE_STEPS
from l5kit.evaluation.metrics import neg_multi_log_likelihood, time_displace
from l5kit.geometry import transform_points
from l5kit.visualization import PREDICTED_POINTS_COLOR, TARGET_POINTS_COLOR, draw_trajectory
from pathlib import Path
import pandas as pd
import os
import random
import time
import gc, psutil
cfg = {
'format_version': 4,
'model_params': {
'model_architecture': "resnet34",
'history_num_frames': 10,
'history_step_size': 1,
'history_delta_time': 0.1,
'future_num_frames': 50,
'future_step_size': 1,
'future_delta_time': 0.1,
'model_name': "model_resnet34",
'lr': 1e-3,
'train': True,
'predict': True
},
'raster_params': {
'raster_size': [224, 224],
'pixel_size': [0.5, 0.5],
'ego_center': [0.25, 0.5],
'map_type': 'py_semantic',
'satellite_map_key': 'aerial_map/aerial_map.png',
'semantic_map_key': 'semantic_map/semantic_map.pb',
'dataset_meta_key': 'meta.json',
'filter_agents_threshold': 0.5
},
'train_data_loader': {
'key': 'scenes/train.zarr',
'batch_size': 16,
'shuffle': True,
'num_workers': 0
},
'test_data_loader': {
'key': 'scenes/test.zarr',
'batch_size': 16,
'shuffle': False,
'num_workers': 0,
},
'train_params': {
'steps': 120,
'update_steps': 50,
'checkpoint_steps': 100,
'precision': True
}
}
class LyftCNNModel(nn.Module):
def __init__(self, cfg: Dict, num_modes=3):
super().__init__()
architecture = cfg["model_params"]["model_architecture"]
backbone = eval(architecture)(pretrained=True, progress=True)
self.backbone = backbone
num_history_channels = (cfg["model_params"]["history_num_frames"] + 1) * 2
num_in_channels = 3 + num_history_channels
self.backbone.conv1 = nn.Conv2d(
num_in_channels,
self.backbone.conv1.out_channels,
kernel_size=self.backbone.conv1.kernel_size,
stride=self.backbone.conv1.stride,
padding=self.backbone.conv1.padding,
bias=False,
)
if architecture == "resnet50":
backbone_out_features = 2048
else:
backbone_out_features = 512
self.future_len = cfg["model_params"]["future_num_frames"]
num_targets = 2 * self.future_len
self.head = nn.Sequential(
nn.Linear(in_features=backbone_out_features, out_features=4096),
)
self.num_preds = num_targets * num_modes
self.num_modes = num_modes
self.logit = nn.Linear(4096, out_features=self.num_preds + num_modes)
def forward(self, x):
x = self.backbone.conv1(x)
x = self.backbone.bn1(x)
x = self.backbone.relu(x)
x = self.backbone.maxpool(x)
x = self.backbone.layer1(x)
x = self.backbone.layer2(x)
x = self.backbone.layer3(x)
x = self.backbone.layer4(x)
x = self.backbone.avgpool(x)
x = torch.flatten(x, 1)
x = self.head(x)
x = self.logit(x)
bs, _ = x.shape
pred, confidences = torch.split(x, self.num_preds, dim=1)
pred = pred.view(bs, self.num_modes, self.future_len, 2)
assert confidences.shape == (bs, self.num_modes)
confidences = torch.softmax(confidences, dim=1)
return pred, confidences
| true | true |
f7273e61673d7705a50b7baced2d412d3ccc1539 | 167 | py | Python | backend/course_application/apps.py | heyImDrew/edupro | 98b8342dda45071da4871bbf73f2ef002fee938f | [
"Apache-2.0"
] | null | null | null | backend/course_application/apps.py | heyImDrew/edupro | 98b8342dda45071da4871bbf73f2ef002fee938f | [
"Apache-2.0"
] | null | null | null | backend/course_application/apps.py | heyImDrew/edupro | 98b8342dda45071da4871bbf73f2ef002fee938f | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class CourseApplicationConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'course_application'
| 23.857143 | 56 | 0.790419 | from django.apps import AppConfig
class CourseApplicationConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'course_application'
| true | true |
f7273e63342dcead5dd52298df0ffc0e7b2d6ce6 | 41 | py | Python | addons/mail_client_extension/controllers/__init__.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/mail_client_extension/controllers/__init__.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | addons/mail_client_extension/controllers/__init__.py | SHIVJITH/Odoo_Machine_Test | 310497a9872db7844b521e6dab5f7a9f61d365a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*
from . import main | 20.5 | 22 | 0.585366 |
from . import main | true | true |
f7273ea22419d001ae46764df21f035e585f8246 | 1,368 | py | Python | gitflow/util.py | chassing/gitflow | 722ec6a68165bac80443eecf97bd00b8f7818b50 | [
"BSD-3-Clause"
] | 7 | 2015-05-09T20:31:36.000Z | 2021-05-17T02:14:30.000Z | gitflow/util.py | chassing/gitflow | 722ec6a68165bac80443eecf97bd00b8f7818b50 | [
"BSD-3-Clause"
] | 5 | 2016-05-31T22:15:08.000Z | 2021-02-16T08:44:28.000Z | gitflow/util.py | chassing/gitflow | 722ec6a68165bac80443eecf97bd00b8f7818b50 | [
"BSD-3-Clause"
] | 10 | 2016-05-31T21:41:25.000Z | 2021-04-11T13:33:48.000Z | # -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
#
# Shamelessly ripped from
# http://code.activestate.com/recipes/576949-find-all-subclasses-of-a-given-class/
#
def itersubclasses(cls, _seen=None):
"""
itersubclasses(cls)
Generator over all subclasses of a given class, in depth first order.
>>> list(itersubclasses(int)) == [bool]
True
>>> class A(object): pass
>>> class B(A): pass
>>> class C(A): pass
>>> class D(B,C): pass
>>> class E(D): pass
>>>
>>> for cls in itersubclasses(A):
... print(cls.__name__)
B
D
E
C
>>> # get ALL (new-style) classes currently defined
>>> [cls.__name__ for cls in itersubclasses(object)] #doctest: +ELLIPSIS
['type', ...'tuple', ...]
"""
if not isinstance(cls, type):
raise TypeError('itersubclasses must be called with '
'new-style classes, not %.100r' % cls)
if _seen is None:
_seen = set()
try:
subs = cls.__subclasses__()
except TypeError: # fails only when cls is type
subs = cls.__subclasses__(cls)
for sub in subs:
if sub not in _seen:
_seen.add(sub)
yield sub
for sub in itersubclasses(sub, _seen):
yield sub
| 27.36 | 82 | 0.57383 |
from __future__ import (absolute_import, division, print_function,
unicode_literals)
def itersubclasses(cls, _seen=None):
if not isinstance(cls, type):
raise TypeError('itersubclasses must be called with '
'new-style classes, not %.100r' % cls)
if _seen is None:
_seen = set()
try:
subs = cls.__subclasses__()
except TypeError:
subs = cls.__subclasses__(cls)
for sub in subs:
if sub not in _seen:
_seen.add(sub)
yield sub
for sub in itersubclasses(sub, _seen):
yield sub
| true | true |
f7273ee822a983a7b06727171c767b66a9c5a749 | 1,054 | py | Python | tests/functional/test_hooks/test_six.py | yoda-vid/pyinstaller | 419f349dad721a253b19d9c596e251818132d6ba | [
"Apache-2.0"
] | 2 | 2017-02-08T22:22:09.000Z | 2020-10-08T12:28:36.000Z | tests/functional/test_hooks/test_six.py | 416426/pyinstaller | 0f2b2e921433ab5a510c7efdb21d9c1d7cfbc645 | [
"Apache-2.0"
] | 3 | 2020-04-06T15:48:37.000Z | 2021-03-23T10:22:21.000Z | tests/functional/test_hooks/test_six.py | 416426/pyinstaller | 0f2b2e921433ab5a510c7efdb21d9c1d7cfbc645 | [
"Apache-2.0"
] | 4 | 2018-06-04T20:40:37.000Z | 2020-10-13T22:38:40.000Z | # -*- coding: utf-8 -*-
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2021, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------
from PyInstaller.utils.tests import importorskip
@importorskip('six.moves')
def test_six_moves(pyi_builder):
pyi_builder.test_source(
"""
from six.moves import UserList
UserList
""")
# Run the same test a second time to trigger errors like
# Target module "six.moves.urllib" already imported as "AliasNode(…)"
# caused by PyiModuleGraph being cached in a insufficient way.
@importorskip('six.moves')
def test_six_moves_2nd_run(pyi_builder):
return test_six_moves(pyi_builder)
| 34 | 78 | 0.627135 |
from PyInstaller.utils.tests import importorskip
@importorskip('six.moves')
def test_six_moves(pyi_builder):
pyi_builder.test_source(
"""
from six.moves import UserList
UserList
""")
@importorskip('six.moves')
def test_six_moves_2nd_run(pyi_builder):
return test_six_moves(pyi_builder)
| true | true |
f7273f7676d92413f9cd5cae85de640904f6032a | 8,163 | py | Python | accelbyte_py_sdk/api/cloudsave/operations/concurrent_record/put_game_record_concurrent_handler_v1.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/cloudsave/operations/concurrent_record/put_game_record_concurrent_handler_v1.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/cloudsave/operations/concurrent_record/put_game_record_concurrent_handler_v1.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | # Auto-generated at 2021-09-27T17:01:31.256010+08:00
# from: Justice Cloudsave Service (3.38.0)
# Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
# pylint: disable=duplicate-code
# pylint: disable=line-too-long
# pylint: disable=missing-function-docstring
# pylint: disable=missing-module-docstring
# pylint: disable=too-many-arguments
# pylint: disable=too-many-branches
# pylint: disable=too-many-instance-attributes
# pylint: disable=too-many-lines
# pylint: disable=too-many-locals
# pylint: disable=too-many-public-methods
# pylint: disable=too-many-return-statements
# pylint: disable=too-many-statements
# pylint: disable=unused-import
from __future__ import annotations
from typing import Any, Dict, List, Optional, Tuple, Union
from .....core import Operation
from .....core import HttpResponse
from ...models import ModelsConcurrentRecordRequest
from ...models import ResponseError
class PutGameRecordConcurrentHandlerV1(Operation):
"""Create or replace game record (putGameRecordConcurrentHandlerV1)
Properties:
url: /cloudsave/v1/namespaces/{namespace}/concurrent/records/{key}
method: PUT
tags: ConcurrentRecord
consumes: ["application/json"]
produces: ["application/json"]
security: bearer
body: (body) REQUIRED ModelsConcurrentRecordRequest in body
namespace: (namespace) REQUIRED str in path
key: (key) REQUIRED str in path
Responses:
204: No Content - (Record saved)
400: Bad Request - ResponseError (Bad Request)
412: Precondition Failed - ResponseError (Precondition Failed)
500: Internal Server Error - ResponseError (Internal Server Error)
"""
# region fields
_url: str = "/cloudsave/v1/namespaces/{namespace}/concurrent/records/{key}"
_method: str = "PUT"
_consumes: List[str] = ["application/json"]
_produces: List[str] = ["application/json"]
_security: Optional[str] = "bearer"
_location_query: str = None
body: ModelsConcurrentRecordRequest # REQUIRED in [body]
namespace: str # REQUIRED in [path]
key: str # REQUIRED in [path]
# endregion fields
# region properties
@property
def url(self) -> str:
return self._url
@property
def method(self) -> str:
return self._method
@property
def consumes(self) -> List[str]:
return self._consumes
@property
def produces(self) -> List[str]:
return self._produces
@property
def security(self) -> Optional[str]:
return self._security
@property
def location_query(self) -> str:
return self._location_query
# endregion properties
# region get methods
def get_full_url(self, base_url: Union[None, str] = None) -> str:
result = base_url if base_url is not None else ""
# path params
url = self.url
for k, v in self.get_path_params().items():
url = url.replace(f"{{{k}}}", v)
result += url
return result
# noinspection PyMethodMayBeStatic
def get_all_required_fields(self) -> List[str]:
return [
"body",
"namespace",
"key",
]
# endregion get methods
# region get_x_params methods
def get_all_params(self) -> dict:
return {
"body": self.get_body_params(),
"path": self.get_path_params(),
}
def get_body_params(self) -> Any:
return self.body.to_dict()
def get_path_params(self) -> dict:
result = {}
if hasattr(self, "namespace"):
result["namespace"] = self.namespace
if hasattr(self, "key"):
result["key"] = self.key
return result
# endregion get_x_params methods
# region is/has methods
def is_valid(self) -> bool:
if not hasattr(self, "body") or self.body is None:
return False
if not hasattr(self, "namespace") or self.namespace is None:
return False
if not hasattr(self, "key") or self.key is None:
return False
return True
# endregion is/has methods
# region with_x methods
def with_body(self, value: ModelsConcurrentRecordRequest) -> PutGameRecordConcurrentHandlerV1:
self.body = value
return self
def with_namespace(self, value: str) -> PutGameRecordConcurrentHandlerV1:
self.namespace = value
return self
def with_key(self, value: str) -> PutGameRecordConcurrentHandlerV1:
self.key = value
return self
# endregion with_x methods
# region to methods
def to_dict(self, include_empty: bool = False) -> dict:
result = {}
if hasattr(self, "body") and self.body:
result["body"] = self.body.to_dict(include_empty=include_empty)
elif include_empty:
result["body"] = ModelsConcurrentRecordRequest()
if hasattr(self, "namespace") and self.namespace:
result["namespace"] = str(self.namespace)
elif include_empty:
result["namespace"] = str()
if hasattr(self, "key") and self.key:
result["key"] = str(self.key)
elif include_empty:
result["key"] = str()
return result
# endregion to methods
# region response methods
# noinspection PyMethodMayBeStatic
def parse_response(self, code: int, content_type: str, content: Any) -> Tuple[Union[None, HttpResponse], Union[None, ResponseError]]:
"""Parse the given response.
204: No Content - (Record saved)
400: Bad Request - ResponseError (Bad Request)
412: Precondition Failed - ResponseError (Precondition Failed)
500: Internal Server Error - ResponseError (Internal Server Error)
"""
if code == 204:
return HttpResponse.create(code, "No Content"), None
if code == 400:
return None, ResponseError.create_from_dict(content)
if code == 412:
return None, ResponseError.create_from_dict(content)
if code == 500:
return None, ResponseError.create_from_dict(content)
was_handled, undocumented_response = HttpResponse.try_create_undocumented_response(code, content)
if was_handled:
return None, undocumented_response
return None, HttpResponse.create_unhandled_error()
# endregion response methods
# region static methods
@classmethod
def create(
cls,
body: ModelsConcurrentRecordRequest,
namespace: str,
key: str,
) -> PutGameRecordConcurrentHandlerV1:
instance = cls()
instance.body = body
instance.namespace = namespace
instance.key = key
return instance
@classmethod
def create_from_dict(cls, dict_: dict, include_empty: bool = False) -> PutGameRecordConcurrentHandlerV1:
instance = cls()
if "body" in dict_ and dict_["body"] is not None:
instance.body = ModelsConcurrentRecordRequest.create_from_dict(dict_["body"], include_empty=include_empty)
elif include_empty:
instance.body = ModelsConcurrentRecordRequest()
if "namespace" in dict_ and dict_["namespace"] is not None:
instance.namespace = str(dict_["namespace"])
elif include_empty:
instance.namespace = str()
if "key" in dict_ and dict_["key"] is not None:
instance.key = str(dict_["key"])
elif include_empty:
instance.key = str()
return instance
@staticmethod
def get_field_info() -> Dict[str, str]:
return {
"body": "body",
"namespace": "namespace",
"key": "key",
}
# endregion static methods
| 30.233333 | 137 | 0.61987 |
from __future__ import annotations
from typing import Any, Dict, List, Optional, Tuple, Union
from .....core import Operation
from .....core import HttpResponse
from ...models import ModelsConcurrentRecordRequest
from ...models import ResponseError
class PutGameRecordConcurrentHandlerV1(Operation):
_url: str = "/cloudsave/v1/namespaces/{namespace}/concurrent/records/{key}"
_method: str = "PUT"
_consumes: List[str] = ["application/json"]
_produces: List[str] = ["application/json"]
_security: Optional[str] = "bearer"
_location_query: str = None
body: ModelsConcurrentRecordRequest
namespace: str
key: str
@property
def url(self) -> str:
return self._url
@property
def method(self) -> str:
return self._method
@property
def consumes(self) -> List[str]:
return self._consumes
@property
def produces(self) -> List[str]:
return self._produces
@property
def security(self) -> Optional[str]:
return self._security
@property
def location_query(self) -> str:
return self._location_query
def get_full_url(self, base_url: Union[None, str] = None) -> str:
result = base_url if base_url is not None else ""
url = self.url
for k, v in self.get_path_params().items():
url = url.replace(f"{{{k}}}", v)
result += url
return result
def get_all_required_fields(self) -> List[str]:
return [
"body",
"namespace",
"key",
]
def get_all_params(self) -> dict:
return {
"body": self.get_body_params(),
"path": self.get_path_params(),
}
def get_body_params(self) -> Any:
return self.body.to_dict()
def get_path_params(self) -> dict:
result = {}
if hasattr(self, "namespace"):
result["namespace"] = self.namespace
if hasattr(self, "key"):
result["key"] = self.key
return result
def is_valid(self) -> bool:
if not hasattr(self, "body") or self.body is None:
return False
if not hasattr(self, "namespace") or self.namespace is None:
return False
if not hasattr(self, "key") or self.key is None:
return False
return True
def with_body(self, value: ModelsConcurrentRecordRequest) -> PutGameRecordConcurrentHandlerV1:
self.body = value
return self
def with_namespace(self, value: str) -> PutGameRecordConcurrentHandlerV1:
self.namespace = value
return self
def with_key(self, value: str) -> PutGameRecordConcurrentHandlerV1:
self.key = value
return self
def to_dict(self, include_empty: bool = False) -> dict:
result = {}
if hasattr(self, "body") and self.body:
result["body"] = self.body.to_dict(include_empty=include_empty)
elif include_empty:
result["body"] = ModelsConcurrentRecordRequest()
if hasattr(self, "namespace") and self.namespace:
result["namespace"] = str(self.namespace)
elif include_empty:
result["namespace"] = str()
if hasattr(self, "key") and self.key:
result["key"] = str(self.key)
elif include_empty:
result["key"] = str()
return result
def parse_response(self, code: int, content_type: str, content: Any) -> Tuple[Union[None, HttpResponse], Union[None, ResponseError]]:
if code == 204:
return HttpResponse.create(code, "No Content"), None
if code == 400:
return None, ResponseError.create_from_dict(content)
if code == 412:
return None, ResponseError.create_from_dict(content)
if code == 500:
return None, ResponseError.create_from_dict(content)
was_handled, undocumented_response = HttpResponse.try_create_undocumented_response(code, content)
if was_handled:
return None, undocumented_response
return None, HttpResponse.create_unhandled_error()
@classmethod
def create(
cls,
body: ModelsConcurrentRecordRequest,
namespace: str,
key: str,
) -> PutGameRecordConcurrentHandlerV1:
instance = cls()
instance.body = body
instance.namespace = namespace
instance.key = key
return instance
@classmethod
def create_from_dict(cls, dict_: dict, include_empty: bool = False) -> PutGameRecordConcurrentHandlerV1:
instance = cls()
if "body" in dict_ and dict_["body"] is not None:
instance.body = ModelsConcurrentRecordRequest.create_from_dict(dict_["body"], include_empty=include_empty)
elif include_empty:
instance.body = ModelsConcurrentRecordRequest()
if "namespace" in dict_ and dict_["namespace"] is not None:
instance.namespace = str(dict_["namespace"])
elif include_empty:
instance.namespace = str()
if "key" in dict_ and dict_["key"] is not None:
instance.key = str(dict_["key"])
elif include_empty:
instance.key = str()
return instance
@staticmethod
def get_field_info() -> Dict[str, str]:
return {
"body": "body",
"namespace": "namespace",
"key": "key",
}
| true | true |
f72740045bcd8582e8aa4a06002d0eadbb562489 | 2,739 | py | Python | main.py | sem-onyalo/gan-textures | ed75ce150d98920bf0d1f0a00ff42d3992c0e32e | [
"MIT"
] | null | null | null | main.py | sem-onyalo/gan-textures | ed75ce150d98920bf0d1f0a00ff42d3992c0e32e | [
"MIT"
] | null | null | null | main.py | sem-onyalo/gan-textures | ed75ce150d98920bf0d1f0a00ff42d3992c0e32e | [
"MIT"
] | null | null | null | import argparse
import logging
from model import DCGAN_1024
def init_logger():
logging.basicConfig(
format="[%(asctime)s] [%(levelname)s] [%(name)s] %(message)s",
datefmt="%Y/%m/%d %H:%M:%S",
level=logging.INFO
)
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--seed", type=int, default=27)
parser.add_argument("--ngpu", type=int, default=1)
parser.add_argument("--data_root", type=str, default="data")
parser.add_argument("--data_source_dir", type=str, default="01-cur")
parser.add_argument("--data_target_dir", type=str, default="02-trn")
parser.add_argument("--dataloader_workers", type=int, default=2)
parser.add_argument("--epochs", type=int, default=50)
parser.add_argument("--batch_size", type=int, default=128)
parser.add_argument("--learning_rate", type=float, default=0.0002)
parser.add_argument("--adam_beta_1", type=float, default=0.5)
parser.add_argument("--adam_beta_2", type=float, default=0.999)
parser.add_argument("--image_size", type=int, default=1080)
parser.add_argument("--image_channels", type=int, default=3)
parser.add_argument("--g_latent_vector_size", type=int, default=100)
parser.add_argument("--g_feature_map_filters", type=int, default=64)
parser.add_argument("--g_conv_kernel_size", type=int, default=4)
parser.add_argument("--g_conv_stride", type=int, default=2)
parser.add_argument("--d_feature_map_filters", type=int, default=64)
parser.add_argument("--d_conv_kernel_size", type=int, default=4)
parser.add_argument("--d_conv_stride", type=int, default=2)
parser.add_argument("--d_activation_negative_slope", type=float, default=0.2)
parser.add_argument("--eval_sample_count", type=int, default=64)
parser.add_argument("--eval_epoch_frequency", type=int, default=10)
parser.add_argument('--train', action='store_true', help='Train the model')
args = parser.parse_args()
init_logger()
gan = DCGAN_1024(
args.seed,
args.ngpu,
args.data_root,
args.data_source_dir,
args.data_target_dir,
args.dataloader_workers,
args.epochs,
args.batch_size,
args.learning_rate,
args.adam_beta_1,
args.adam_beta_2,
args.image_size,
args.image_channels,
args.g_latent_vector_size,
args.g_feature_map_filters,
args.g_conv_kernel_size,
args.g_conv_stride,
args.d_feature_map_filters,
args.d_conv_kernel_size,
args.d_conv_stride,
args.d_activation_negative_slope,
args.eval_sample_count,
args.eval_epoch_frequency
)
if args.train:
gan.train()
| 38.577465 | 81 | 0.680175 | import argparse
import logging
from model import DCGAN_1024
def init_logger():
logging.basicConfig(
format="[%(asctime)s] [%(levelname)s] [%(name)s] %(message)s",
datefmt="%Y/%m/%d %H:%M:%S",
level=logging.INFO
)
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--seed", type=int, default=27)
parser.add_argument("--ngpu", type=int, default=1)
parser.add_argument("--data_root", type=str, default="data")
parser.add_argument("--data_source_dir", type=str, default="01-cur")
parser.add_argument("--data_target_dir", type=str, default="02-trn")
parser.add_argument("--dataloader_workers", type=int, default=2)
parser.add_argument("--epochs", type=int, default=50)
parser.add_argument("--batch_size", type=int, default=128)
parser.add_argument("--learning_rate", type=float, default=0.0002)
parser.add_argument("--adam_beta_1", type=float, default=0.5)
parser.add_argument("--adam_beta_2", type=float, default=0.999)
parser.add_argument("--image_size", type=int, default=1080)
parser.add_argument("--image_channels", type=int, default=3)
parser.add_argument("--g_latent_vector_size", type=int, default=100)
parser.add_argument("--g_feature_map_filters", type=int, default=64)
parser.add_argument("--g_conv_kernel_size", type=int, default=4)
parser.add_argument("--g_conv_stride", type=int, default=2)
parser.add_argument("--d_feature_map_filters", type=int, default=64)
parser.add_argument("--d_conv_kernel_size", type=int, default=4)
parser.add_argument("--d_conv_stride", type=int, default=2)
parser.add_argument("--d_activation_negative_slope", type=float, default=0.2)
parser.add_argument("--eval_sample_count", type=int, default=64)
parser.add_argument("--eval_epoch_frequency", type=int, default=10)
parser.add_argument('--train', action='store_true', help='Train the model')
args = parser.parse_args()
init_logger()
gan = DCGAN_1024(
args.seed,
args.ngpu,
args.data_root,
args.data_source_dir,
args.data_target_dir,
args.dataloader_workers,
args.epochs,
args.batch_size,
args.learning_rate,
args.adam_beta_1,
args.adam_beta_2,
args.image_size,
args.image_channels,
args.g_latent_vector_size,
args.g_feature_map_filters,
args.g_conv_kernel_size,
args.g_conv_stride,
args.d_feature_map_filters,
args.d_conv_kernel_size,
args.d_conv_stride,
args.d_activation_negative_slope,
args.eval_sample_count,
args.eval_epoch_frequency
)
if args.train:
gan.train()
| true | true |
f727406dcaa18843458f6c479462d8f14bb82493 | 2,802 | py | Python | DLCoursera_part1_week4_1.py | zhouhan921001/DeepLearning-homework | 20562dc49ca5898b531a678c0e54c8d985fcc72f | [
"MIT"
] | null | null | null | DLCoursera_part1_week4_1.py | zhouhan921001/DeepLearning-homework | 20562dc49ca5898b531a678c0e54c8d985fcc72f | [
"MIT"
] | null | null | null | DLCoursera_part1_week4_1.py | zhouhan921001/DeepLearning-homework | 20562dc49ca5898b531a678c0e54c8d985fcc72f | [
"MIT"
] | null | null | null | import numpy as np
from dnn_utils import sigmoid,sigmoid_backward,relu,relu_backward
def initialize_two_layer(n_x,n_h,n_y):
W1 = np.random.randn(n_h,n_x) * 0.01
b1 = np.zeros(n_h,1)
W2 = np.random.randn(n_y,n_h) * 0.01
b2 = np.zeros(n_y,1)
param = {"W1":W1,"b1":b1,"W2":W2,"b2":b2}
return param
def initialize_l_layer(layer_dims):
param = {}
L = len(layer_dims)
for l in range(1, L):
param['W' + str(l)] = np.random.randn(layer_dims[l],layer_dims[l-1]) * 0.01
param['b' + str(l)] = np.zeros(layer_dims[l],1)
return param
def linear_forward(W,A,b):
"""
Implement the linear part of neural unit
"""
Z = np.dot(W,A) + b
return Z
def linear_activation_forward(A_pre,W,b,activation):
"""
Implement neural unit with the activation of Relu or sigmoid
"""
if activation == "Relu":
Z = linear_forward(W,A_pre,b)
A,activation_cache = relu(Z)
elif activation == "sigmoid":
Z = linear_forward(W,A_pre,b)
A,activation_cache = sigmoid(Z)
backward_used_cache = (A_pre,W,b)
cache = (backward_used_cache,activation_cache)
return A,cache
def L_model_forward(X,param):
"""
Implement forward propagation for L layers model
"""
caches = []
L = len(param) // 2
A = X
for l in range(1,L):
A,cache = linear_activation_forward(A,param['W'+str(l)],param['b'+str(l)],Relu)
caches.append(cache)
Al,cache = linear_activation_forward(A,param['W'+str(l)],param['b'+str(l)],Relu)
caches.append(cache)
return Al,caches
def linear_backward(dz,cache):
"""
Implement the backward propagation of linear part
"""
m = dz.shape[1]
dw = np.dot(dz,cache[0]) / m
db = np.sum(dz) / m
dA_pre = np.dot(cache[1],dz)
return dw,db,dA_pre
def linear_activation_backward(dA,cache,activation):
"""
Implement the backward propagation of neural unit
"""
if activation == "Relu":
dz = relu_backward(dA,cache[1])
elif activation == "sigmoid":
dz = sigmoid_backward(dA,cache[1])
dw,db,dA_pre = linear_backward(dz,cache[0])
return dw,db,dA_pre
def L_model_backward(AL,Y,caches):
"""
Implement the backward propagation for L layer model
"""
grads = {}
L = len(caches)
dAl = - (np.divide(Y,AL) - np.divide(1-Y,1-AL))
grads['dw'+str(L)],grads['db'+str(L)],grads['dA'+str(L)] = linear_activation_backward(dAL,caches[-1],"sigmoid")
for l in reversed(range(L-1)):
cache = caches[l]
grads['dw'+str(l+1)],grads['db'+str(l+1)],grads['dA'+str(l+1)] = linear_activation_backward(grads['dA'+str(l+2)],
cache,"Relu")
return grads
def update_param(param,grads,learning_rate):
"""
Update the parameters
"""
L = len(param) // 2
for l in range(L):
param['W'+str(l+1)] = param['W'+str(l+1)] - learning_rate * grads['W'+str(l+1)]
param['b'+str(l+1)] = param['b'+str(l+1)] - learning_rate * grads['b'+str(l+1)]
return param
| 22.062992 | 115 | 0.662384 | import numpy as np
from dnn_utils import sigmoid,sigmoid_backward,relu,relu_backward
def initialize_two_layer(n_x,n_h,n_y):
W1 = np.random.randn(n_h,n_x) * 0.01
b1 = np.zeros(n_h,1)
W2 = np.random.randn(n_y,n_h) * 0.01
b2 = np.zeros(n_y,1)
param = {"W1":W1,"b1":b1,"W2":W2,"b2":b2}
return param
def initialize_l_layer(layer_dims):
param = {}
L = len(layer_dims)
for l in range(1, L):
param['W' + str(l)] = np.random.randn(layer_dims[l],layer_dims[l-1]) * 0.01
param['b' + str(l)] = np.zeros(layer_dims[l],1)
return param
def linear_forward(W,A,b):
Z = np.dot(W,A) + b
return Z
def linear_activation_forward(A_pre,W,b,activation):
if activation == "Relu":
Z = linear_forward(W,A_pre,b)
A,activation_cache = relu(Z)
elif activation == "sigmoid":
Z = linear_forward(W,A_pre,b)
A,activation_cache = sigmoid(Z)
backward_used_cache = (A_pre,W,b)
cache = (backward_used_cache,activation_cache)
return A,cache
def L_model_forward(X,param):
caches = []
L = len(param) // 2
A = X
for l in range(1,L):
A,cache = linear_activation_forward(A,param['W'+str(l)],param['b'+str(l)],Relu)
caches.append(cache)
Al,cache = linear_activation_forward(A,param['W'+str(l)],param['b'+str(l)],Relu)
caches.append(cache)
return Al,caches
def linear_backward(dz,cache):
m = dz.shape[1]
dw = np.dot(dz,cache[0]) / m
db = np.sum(dz) / m
dA_pre = np.dot(cache[1],dz)
return dw,db,dA_pre
def linear_activation_backward(dA,cache,activation):
if activation == "Relu":
dz = relu_backward(dA,cache[1])
elif activation == "sigmoid":
dz = sigmoid_backward(dA,cache[1])
dw,db,dA_pre = linear_backward(dz,cache[0])
return dw,db,dA_pre
def L_model_backward(AL,Y,caches):
grads = {}
L = len(caches)
dAl = - (np.divide(Y,AL) - np.divide(1-Y,1-AL))
grads['dw'+str(L)],grads['db'+str(L)],grads['dA'+str(L)] = linear_activation_backward(dAL,caches[-1],"sigmoid")
for l in reversed(range(L-1)):
cache = caches[l]
grads['dw'+str(l+1)],grads['db'+str(l+1)],grads['dA'+str(l+1)] = linear_activation_backward(grads['dA'+str(l+2)],
cache,"Relu")
return grads
def update_param(param,grads,learning_rate):
L = len(param) // 2
for l in range(L):
param['W'+str(l+1)] = param['W'+str(l+1)] - learning_rate * grads['W'+str(l+1)]
param['b'+str(l+1)] = param['b'+str(l+1)] - learning_rate * grads['b'+str(l+1)]
return param
| true | true |
f727409d08bf28ed9c3b7b788835af2b38189f4f | 15,624 | py | Python | word2vec_basic.py | rmodi6/word-representations | 4f9a13cee9ff60ce3c667c833330b59de774ed39 | [
"MIT"
] | null | null | null | word2vec_basic.py | rmodi6/word-representations | 4f9a13cee9ff60ce3c667c833330b59de774ed39 | [
"MIT"
] | null | null | null | word2vec_basic.py | rmodi6/word-representations | 4f9a13cee9ff60ce3c667c833330b59de774ed39 | [
"MIT"
] | null | null | null | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import math
import os, sys
import random
import zipfile
import numpy as np
from six.moves import urllib
from six.moves import xrange # pylint: disable=redefined-builtin
import tensorflow as tf
import loss_func as tf_func
import pickle
from collections import namedtuple
Word2Vec = namedtuple('Word2Vec', ['train_inputs', 'train_labels', 'loss', 'optimizer', 'global_step',
'embeddings', 'normalized_embeddings', 'valid_embeddings','similarity',
'saver','summary', 'summary_writer'])
def maybe_create_path(path):
if not os.path.exists(path):
os.mkdir(path)
print ("Created a path: %s"%(path))
def maybe_download(filename, expected_bytes):
#Download a file if not present, and make sure it's the right size.
if not os.path.exists(filename):
print('Downloading %s'%(url+filename))
filename, _ = urllib.request.urlretrieve(url + filename, filename)
statinfo = os.stat(filename)
if statinfo.st_size == expected_bytes:
print('Found and verified', filename)
else:
print(statinfo.st_size)
raise Exception(
'Failed to verify ' + filename + '. Can you get to it with a browser?')
return filename
# Read the data into a list of strings.
def read_data(filename):
#Extract the first file enclosed in a zip file as a list of words
with zipfile.ZipFile(filename) as f:
data = tf.compat.as_str(f.read(f.namelist()[0])).split()
return data
def build_dataset(words):
count = [['UNK', -1]]
count.extend(collections.Counter(words).most_common(vocabulary_size - 1))
dictionary = dict()
for word, _ in count:
dictionary[word] = len(dictionary)
data = list()
unk_count = 0
for word in words:
if word in dictionary:
index = dictionary[word]
else:
index = 0 # dictionary['UNK']
unk_count += 1
data.append(index)
count[0][1] = unk_count
reverse_dictionary = dict(zip(dictionary.values(), dictionary.keys()))
return data, count, dictionary, reverse_dictionary
def generate_batch(data, batch_size, num_skips, skip_window):
"""
Write the code generate a training batch
@data_index: the index of a word. You can access a word using data[data_index]
@batch_size: the number of instances in one batch
@num_skips: the number of samples you want to draw in a window
(In the below example, it was 2)
@skip_windows: decides how many words to consider left and right from a context word.
(So, skip_windows*2+1 = window_size)
batch will contain word ids for context words. Dimension is [batch_size].
labels will contain word ids for predicting(target) words. Dimension is [batch_size, 1].
"""
global data_index
assert batch_size % num_skips == 0
assert num_skips <= 2 * skip_window
batch = np.ndarray(shape=(batch_size), dtype=np.int32)
labels = np.ndarray(shape=(batch_size, 1), dtype=np.int32)
"""
=================================================================================
You will generate small subset of training data, which is called batch.
For skip-gram model, you will slide a window
and sample training instances from the data insdie the window.
Here is a small example.
Suppose that we have a text: "The quick brown fox jumps over the lazy dog."
And batch_size = 8, window_size = 3
"[The quick brown] fox jumps over the lazy dog"
Context word would be 'quick' and predicting words are 'The' and 'brown'.
This will generate training examples:
context(x), predicted_word(y)
(quick , The)
(quick , brown)
And then move the sliding window.
"The [quick brown fox] jumps over the lazy dog"
In the same way, we have to two more examples:
(brown, quick)
(brown, fox)
move thd window again,
"The quick [brown fox jumps] over the lazy dog"
and we have
(fox, brown)
(fox, jumps)
Finally we get two instance from the moved window,
"The quick brown [fox jumps over] the lazy dog"
(jumps, fox)
(jumps, over)
Since now we have 8 training instances, which is the batch size,
stop generating batch and return batch data.
===============================================================================
"""
# Initialize batch_count to 0
batch_count = 0
while batch_count < batch_size: # Continue while we haven't generated required number of batches
# Re-initialize data_index so that there are skip_window words on either side of data_index
if (data_index - skip_window) < 0 or (data_index + skip_window) >= len(data):
data_index = skip_window
left_context_word = data_index - 1 # Index for outer words on left side of data_index
right_context_word = data_index + 1 # Index for outer words on right side of data_index
for x in range(skip_window): # Loop skip_window times
batch[batch_count] = data[data_index] # Add data_index word to batch as center word
labels[batch_count, 0] = data[left_context_word] # Add left index word to labels as target word
batch[batch_count+1] = data[data_index] # Add data_index word to batch as center word
labels[batch_count+1, 0] = data[right_context_word] # Add right index word to labels as target word
batch_count += 2 # Increment batch_count by 2 as we added 2 words: one from left and one from right
left_context_word -= 1 # Move left index towards left
right_context_word += 1 # Move right index towards right
data_index += 1 # Increment data_index making next word as center word
return batch, labels # Return the generated batches and labels
def build_model(sess, graph, loss_model):
"""
Builds a tensor graph model
"""
model = None
with graph.as_default():
# Ops and variables pinned to the CPU because of missing GPU implementation
with tf.device('/cpu:0'):
# Input data.
train_inputs = tf.placeholder(tf.int32, shape=[batch_size])
train_labels = tf.placeholder(tf.int32, shape=[batch_size, 1])
valid_dataset = tf.constant(valid_examples, dtype=tf.int32)
global_step = tf.Variable(0, trainable=False)
# Look up embeddings for inputs.
embeddings = tf.Variable(
tf.random_uniform([vocabulary_size, embedding_size], -1.0, 1.0))
embed = tf.nn.embedding_lookup(embeddings, train_inputs)
sm_weights = tf.Variable(
tf.truncated_normal([vocabulary_size, embedding_size],
stddev=1.0 / math.sqrt(embedding_size)))
# Get context embeddings from lables
true_w = tf.nn.embedding_lookup(sm_weights, train_labels)
true_w = tf.reshape(true_w, [-1, embedding_size])
# Construct the variables for the NCE loss
nce_weights = tf.Variable(
tf.truncated_normal([vocabulary_size, embedding_size],
stddev=1.0 / math.sqrt(embedding_size)))
nce_biases = tf.Variable(tf.zeros([vocabulary_size]))
if loss_model == 'cross_entropy':
loss = tf.reduce_mean(tf_func.cross_entropy_loss(embed, true_w))
else:
#sample negative examples with unigram probability
sample = np.random.choice(vocabulary_size, num_sampled, p=unigram_prob, replace=False)
loss = tf.reduce_mean(tf_func.nce_loss(embed, nce_weights, nce_biases, train_labels, sample, unigram_prob))
# tf.summary.scalar('loss', loss)
# Construct the SGD optimizer using a learning rate of 1.0.
optimizer = tf.train.GradientDescentOptimizer(1.0).minimize(loss, global_step=global_step)
# Compute the cosine similarity between minibatch examples and all embeddings.
norm = tf.sqrt(tf.reduce_sum(tf.square(embeddings), 1, keep_dims=True))
normalized_embeddings = embeddings / norm
valid_embeddings = tf.nn.embedding_lookup(
normalized_embeddings, valid_dataset)
similarity = tf.matmul(
valid_embeddings, normalized_embeddings, transpose_b=True)
saver = tf.train.Saver(tf.global_variables())
# Save summary
# summary = tf.summary.merge_all()
# summary_writer = tf.summary.FileWriter(summary_path + '/summary', sess.graph)
summary = None
summary_writer = None
tf.global_variables_initializer().run()
print("Initialized")
model = Word2Vec(train_inputs, train_labels, loss, optimizer, global_step, embeddings,
normalized_embeddings, valid_embeddings, similarity, saver, summary, summary_writer)
return model
def load_pretrained_model(sess, model, pretrained_model_path):
if not os.path.exists(filename):
print("Missing pre-trained model: [%s]"%(pretrained_model_path))
return
ckpt = tf.train.get_checkpoint_state(pretrained_model_path)
if ckpt and tf.train.checkpoint_exists(ckpt.model_checkpoint_path):
print("Reading model parameters from %s" % ckpt.model_checkpoint_path)
model.saver.restore(sess, ckpt.model_checkpoint_path)
def train(sess, model, data, dictionary, batch_size, num_skips, skip_window,
max_num_steps, checkpoint_step, loss_model):
average_loss_step = max(checkpoint_step/10, 100)
average_loss = 0
for step in xrange(max_num_steps):
batch_inputs, batch_labels = generate_batch(data, batch_size, num_skips, skip_window)
feed_dict = {model.train_inputs.name: batch_inputs, model.train_labels.name: batch_labels}
# We perform one update step by evaluating the optimizer op (including it
# in the list of returned values for session.run()
# _, loss_val, summary = sess.run([model.optimizer, model.loss, model.summary], feed_dict=feed_dict)
_, loss_val = sess.run([model.optimizer, model.loss], feed_dict=feed_dict)
average_loss += loss_val
if step % average_loss_step == 0:
if step > 0:
average_loss /= average_loss_step
# The average loss is an estimate of the loss over the last 2000 batches.
print("Average loss at step ", step, ": ", average_loss)
average_loss = 0
# model.summary_writer.add_summary(summary, model.global_step.eval())
# model.summary_writer.flush()
# Note that this is expensive (~20% slowdown if computed every 500 steps)
if step % checkpoint_step == 0:
sim = model.similarity.eval()
for i in xrange(valid_size):
valid_word = reverse_dictionary[valid_examples[i]]
top_k = 8 # number of nearest neighbors
nearest = (-sim[i, :]).argsort()[1:top_k + 1]
log_str = "Nearest to %s:" % valid_word
for k in xrange(top_k):
close_word = reverse_dictionary[nearest[k]]
log_str = "%s %s," % (log_str, close_word)
print(log_str)
# chkpt_path = os.path.join(checkpoint_model_path, 'w2v_%s.cpkt'%(loss_model))
# model.saver.save(sess, chkpt_path, global_step=model.global_step.eval())
# model.summary_writer.close()
# Saving the final embedding to a file
final_embeddings = model.normalized_embeddings.eval()
return final_embeddings
if __name__ == '__main__':
loss_model = 'cross_entropy'
if len(sys.argv) > 1:
if sys.argv[1] == 'nce':
loss_model = 'nce'
####################################################################################
# Step 1: Download the data.
url = 'http://mattmahoney.net/dc/'
filename = maybe_download('text8.zip', 31344016)
words = read_data(filename)
print('Data size', len(words))
####################################################################################
# Step 2: Build the dictionary and replace rare words with UNK token.
vocabulary_size = 100000
data, count, dictionary, reverse_dictionary = build_dataset(words)
del words # Hint to reduce memory.
print('Most common words (+UNK)', count[:5])
print('Sample data', data[:10], [reverse_dictionary[i] for i in data[:10]])
#Calculate the probability of unigrams
unigram_cnt = [c for w, c in count]
total = sum(unigram_cnt)
unigram_prob = [c*1.0/total for c in unigram_cnt]
data_index = 0
####################################################################################
# Step 3: Test the function that generates a training batch for the skip-gram model.
# TODO You must implement this method "generate_batch"
# Uncomment below to check batch output
# batch, labels = generate_batch(data, batch_size=8, num_skips=2, skip_window=1)
# for i in range(8):
# print(batch[i], reverse_dictionary[batch[i]],
# '->', labels[i, 0], reverse_dictionary[labels[i, 0]])
####################################################################################
# Hyper Parameters to config
batch_size = 128
embedding_size = 128 # Dimension of the embedding vector.
skip_window = 4 # How many words to consider left and right.
num_skips = 8 # How many times to reuse an input to generate a label.
# We pick a random validation set to sample nearest neighbors. Here we limit the
# validation samples to the words that have a low numeric ID, which by
# construction are also the most frequent.
valid_size = 16 # Random set of words to evaluate similarity on.
valid_window = 100 # Only pick dev samples in the head of the distribution.
valid_examples = np.random.choice(valid_window, valid_size, replace=False)
num_sampled = 64 # Number of negative examples to sample.
# summary_path = './summary_%s'%(loss_model)
pretrained_model_path = './pretrained/'
checkpoint_model_path = './checkpoints_%s/'%(loss_model)
model_path = './models'
# maximum training step
max_num_steps = 200001
checkpoint_step = 50000
graph = tf.Graph()
with tf.Session(graph=graph) as sess:
####################################################################################
# Step 4: Build and train a skip-gram model.
model = build_model(sess, graph, loss_model)
# You must start with the pretrained model.
# If you want to resume from your checkpoints, change this path name
load_pretrained_model(sess, model, pretrained_model_path)
####################################################################################
# Step 6: Begin training.
maybe_create_path(checkpoint_model_path)
embeddings = train(sess, model, data, dictionary, batch_size, num_skips, skip_window,
max_num_steps, checkpoint_step, loss_model)
####################################################################################
# Step 7: Save the trained model.
trained_steps = model.global_step.eval()
maybe_create_path(model_path)
model_filepath = os.path.join(model_path, 'word2vec_%s.model'%(loss_model))
print("Saving word2vec model as [%s]"%(model_filepath))
pickle.dump([dictionary, trained_steps, embeddings], open(model_filepath, 'w'))
| 37.467626 | 113 | 0.662186 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import math
import os, sys
import random
import zipfile
import numpy as np
from six.moves import urllib
from six.moves import xrange
import tensorflow as tf
import loss_func as tf_func
import pickle
from collections import namedtuple
Word2Vec = namedtuple('Word2Vec', ['train_inputs', 'train_labels', 'loss', 'optimizer', 'global_step',
'embeddings', 'normalized_embeddings', 'valid_embeddings','similarity',
'saver','summary', 'summary_writer'])
def maybe_create_path(path):
if not os.path.exists(path):
os.mkdir(path)
print ("Created a path: %s"%(path))
def maybe_download(filename, expected_bytes):
if not os.path.exists(filename):
print('Downloading %s'%(url+filename))
filename, _ = urllib.request.urlretrieve(url + filename, filename)
statinfo = os.stat(filename)
if statinfo.st_size == expected_bytes:
print('Found and verified', filename)
else:
print(statinfo.st_size)
raise Exception(
'Failed to verify ' + filename + '. Can you get to it with a browser?')
return filename
# Read the data into a list of strings.
def read_data(filename):
#Extract the first file enclosed in a zip file as a list of words
with zipfile.ZipFile(filename) as f:
data = tf.compat.as_str(f.read(f.namelist()[0])).split()
return data
def build_dataset(words):
count = [['UNK', -1]]
count.extend(collections.Counter(words).most_common(vocabulary_size - 1))
dictionary = dict()
for word, _ in count:
dictionary[word] = len(dictionary)
data = list()
unk_count = 0
for word in words:
if word in dictionary:
index = dictionary[word]
else:
index = 0 # dictionary['UNK']
unk_count += 1
data.append(index)
count[0][1] = unk_count
reverse_dictionary = dict(zip(dictionary.values(), dictionary.keys()))
return data, count, dictionary, reverse_dictionary
def generate_batch(data, batch_size, num_skips, skip_window):
global data_index
assert batch_size % num_skips == 0
assert num_skips <= 2 * skip_window
batch = np.ndarray(shape=(batch_size), dtype=np.int32)
labels = np.ndarray(shape=(batch_size, 1), dtype=np.int32)
# Initialize batch_count to 0
batch_count = 0
while batch_count < batch_size: # Continue while we haven't generated required number of batches
if (data_index - skip_window) < 0 or (data_index + skip_window) >= len(data):
data_index = skip_window
left_context_word = data_index - 1
right_context_word = data_index + 1
for x in range(skip_window):
batch[batch_count] = data[data_index]
labels[batch_count, 0] = data[left_context_word]
batch[batch_count+1] = data[data_index]
labels[batch_count+1, 0] = data[right_context_word]
batch_count += 2
left_context_word -= 1
right_context_word += 1
data_index += 1
return batch, labels
def build_model(sess, graph, loss_model):
model = None
with graph.as_default():
with tf.device('/cpu:0'):
train_inputs = tf.placeholder(tf.int32, shape=[batch_size])
train_labels = tf.placeholder(tf.int32, shape=[batch_size, 1])
valid_dataset = tf.constant(valid_examples, dtype=tf.int32)
global_step = tf.Variable(0, trainable=False)
embeddings = tf.Variable(
tf.random_uniform([vocabulary_size, embedding_size], -1.0, 1.0))
embed = tf.nn.embedding_lookup(embeddings, train_inputs)
sm_weights = tf.Variable(
tf.truncated_normal([vocabulary_size, embedding_size],
stddev=1.0 / math.sqrt(embedding_size)))
true_w = tf.nn.embedding_lookup(sm_weights, train_labels)
true_w = tf.reshape(true_w, [-1, embedding_size])
nce_weights = tf.Variable(
tf.truncated_normal([vocabulary_size, embedding_size],
stddev=1.0 / math.sqrt(embedding_size)))
nce_biases = tf.Variable(tf.zeros([vocabulary_size]))
if loss_model == 'cross_entropy':
loss = tf.reduce_mean(tf_func.cross_entropy_loss(embed, true_w))
else:
sample = np.random.choice(vocabulary_size, num_sampled, p=unigram_prob, replace=False)
loss = tf.reduce_mean(tf_func.nce_loss(embed, nce_weights, nce_biases, train_labels, sample, unigram_prob))
optimizer = tf.train.GradientDescentOptimizer(1.0).minimize(loss, global_step=global_step)
norm = tf.sqrt(tf.reduce_sum(tf.square(embeddings), 1, keep_dims=True))
normalized_embeddings = embeddings / norm
valid_embeddings = tf.nn.embedding_lookup(
normalized_embeddings, valid_dataset)
similarity = tf.matmul(
valid_embeddings, normalized_embeddings, transpose_b=True)
saver = tf.train.Saver(tf.global_variables())
summary = None
summary_writer = None
tf.global_variables_initializer().run()
print("Initialized")
model = Word2Vec(train_inputs, train_labels, loss, optimizer, global_step, embeddings,
normalized_embeddings, valid_embeddings, similarity, saver, summary, summary_writer)
return model
def load_pretrained_model(sess, model, pretrained_model_path):
if not os.path.exists(filename):
print("Missing pre-trained model: [%s]"%(pretrained_model_path))
return
ckpt = tf.train.get_checkpoint_state(pretrained_model_path)
if ckpt and tf.train.checkpoint_exists(ckpt.model_checkpoint_path):
print("Reading model parameters from %s" % ckpt.model_checkpoint_path)
model.saver.restore(sess, ckpt.model_checkpoint_path)
def train(sess, model, data, dictionary, batch_size, num_skips, skip_window,
max_num_steps, checkpoint_step, loss_model):
average_loss_step = max(checkpoint_step/10, 100)
average_loss = 0
for step in xrange(max_num_steps):
batch_inputs, batch_labels = generate_batch(data, batch_size, num_skips, skip_window)
feed_dict = {model.train_inputs.name: batch_inputs, model.train_labels.name: batch_labels}
_, loss_val = sess.run([model.optimizer, model.loss], feed_dict=feed_dict)
average_loss += loss_val
if step % average_loss_step == 0:
if step > 0:
average_loss /= average_loss_step
print("Average loss at step ", step, ": ", average_loss)
average_loss = 0
if step % checkpoint_step == 0:
sim = model.similarity.eval()
for i in xrange(valid_size):
valid_word = reverse_dictionary[valid_examples[i]]
top_k = 8
nearest = (-sim[i, :]).argsort()[1:top_k + 1]
log_str = "Nearest to %s:" % valid_word
for k in xrange(top_k):
close_word = reverse_dictionary[nearest[k]]
log_str = "%s %s," % (log_str, close_word)
print(log_str)
final_embeddings = model.normalized_embeddings.eval()
return final_embeddings
if __name__ == '__main__':
loss_model = 'cross_entropy'
if len(sys.argv) > 1:
if sys.argv[1] == 'nce':
loss_model = 'nce'
| true | true |
f7274148a77ac245be2e506c83b47f5520833782 | 2,404 | py | Python | components/org.wso2.ppaas.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/asyncscheduledtask.py | gayangunarathne/private-paas | d4dd794a7dcf46312d17e81fe0442e42d30c8c63 | [
"Apache-2.0"
] | null | null | null | components/org.wso2.ppaas.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/asyncscheduledtask.py | gayangunarathne/private-paas | d4dd794a7dcf46312d17e81fe0442e42d30c8c63 | [
"Apache-2.0"
] | null | null | null | components/org.wso2.ppaas.python.cartridge.agent/src/main/python/cartridge.agent/cartridge.agent/modules/util/asyncscheduledtask.py | gayangunarathne/private-paas | d4dd794a7dcf46312d17e81fe0442e42d30c8c63 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import time
from threading import Thread
class AbstractAsyncScheduledTask:
"""
Exposes the contract to follow to implement a scheduled task to be executed by the ScheduledExecutor
"""
def execute_task(self):
"""
Override this method and implement the task to be executed by the ScheduledExecutor with a specified
interval.
"""
raise NotImplementedError
class ScheduledExecutor(Thread):
"""
Executes a given task with a given interval until being terminated
"""
def __init__(self, delay, task):
"""
Creates a ScheduledExecutor thread to handle interval based repeated execution of a given task of type
AbstractAsyncScheduledTask
:param int delay: The interval to keep between executions
:param AbstractAsyncScheduledTask task: The task to be implemented
:return:
"""
Thread.__init__(self)
self.delay = delay
""" :type : int """
self.task = task
""" :type : AbstractAsyncScheduledTask """
self.terminated = False
""" :type : bool """
def run(self):
"""
Start the scheduled task with a sleep time of delay in between
:return:
"""
while not self.terminated:
time.sleep(self.delay)
task_thread = Thread(target=self.task.execute_task)
task_thread.start()
def terminate(self):
"""
Terminate the scheduled task. Allow a maximum of 'delay' seconds to be terminated.
:return: void
"""
self.terminated = True
| 32.931507 | 110 | 0.669301 |
import time
from threading import Thread
class AbstractAsyncScheduledTask:
def execute_task(self):
raise NotImplementedError
class ScheduledExecutor(Thread):
def __init__(self, delay, task):
Thread.__init__(self)
self.delay = delay
self.task = task
self.terminated = False
def run(self):
while not self.terminated:
time.sleep(self.delay)
task_thread = Thread(target=self.task.execute_task)
task_thread.start()
def terminate(self):
self.terminated = True
| true | true |
f727415cbcd7b0a3044c71aebd591a61b3989d00 | 393 | py | Python | techtest/asgi.py | rising-entropy/Techcurve-Test | eeefd14d1a83451b9b5333f582ed6cc12efca44c | [
"MIT"
] | null | null | null | techtest/asgi.py | rising-entropy/Techcurve-Test | eeefd14d1a83451b9b5333f582ed6cc12efca44c | [
"MIT"
] | null | null | null | techtest/asgi.py | rising-entropy/Techcurve-Test | eeefd14d1a83451b9b5333f582ed6cc12efca44c | [
"MIT"
] | 1 | 2021-03-26T11:39:15.000Z | 2021-03-26T11:39:15.000Z | """
ASGI config for techtest project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'techtest.settings')
application = get_asgi_application()
| 23.117647 | 78 | 0.78626 |
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'techtest.settings')
application = get_asgi_application()
| true | true |
f72741a466183d81d1fca4196b837b1a9535f959 | 6,357 | py | Python | read_xml_all/calcul_matrix_compare_ce_good_192matrix.py | daniel20162016/my-first | f9554dd476302b26e8a296393025f150922f349c | [
"MIT"
] | null | null | null | read_xml_all/calcul_matrix_compare_ce_good_192matrix.py | daniel20162016/my-first | f9554dd476302b26e8a296393025f150922f349c | [
"MIT"
] | null | null | null | read_xml_all/calcul_matrix_compare_ce_good_192matrix.py | daniel20162016/my-first | f9554dd476302b26e8a296393025f150922f349c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Oct 31 15:45:22 2016
@author: wang
"""
#from matplotlib import pylab as plt
#from numpy import fft, fromstring, int16, linspace
#import wave
from read_wav_xml_good_1 import*
from matrix_24_2 import*
from max_matrix_norm import*
import numpy as np
# open a wave file
filename = 'francois_filon_pure_3.wav'
filename_1 ='francois_filon_pure_3.xml'
word ='ce'
wave_signal_float,framerate, word_start_point, word_length_point, word_end_point= read_wav_xml_good_1(filename,filename_1,word)
#print 'word_start_point=',word_start_point
#print 'word_length_point=',word_length_point
#print 'word_end_point=',word_end_point
XJ_1 =wave_signal_float
t_step=1920;
t_entre_step=1440;
t_du_1_1 = int(word_start_point[0]);
t_du_1_2 = int(word_end_point[0]);
t_du_2_1 = int(word_start_point[1]);
t_du_2_2 = int(word_end_point[1]);
t_du_3_1 = int(word_start_point[2]);
t_du_3_2 = int(word_end_point[2]);
t_du_4_1 = int(word_start_point[3]);
t_du_4_2 = int(word_end_point[3]);
t_du_5_1 = int(word_start_point[4]);
t_du_5_2 = int(word_end_point[4]);
fs=framerate
#XJ_du_1 = wave_signal_float[(t_du_1_1-1):t_du_1_2];
#length_XJ_du_1 = int(word_length_point[0]+1);
#x1,y1,z1=matrix_24_2(XJ_du_1,fs)
#x1=max_matrix_norm(x1)
#==============================================================================
# this part is to calcul the first matrix
#==============================================================================
XJ_du_1_2 = XJ_1[(t_du_1_1-1):(t_du_1_1+t_step)];
x1_1,y1_1,z1_1=matrix_24_2(XJ_du_1_2 ,fs)
x1_1=max_matrix_norm(x1_1)
matrix_all_step_new_1 = np.zeros([192])
for i in range(0,24):
matrix_all_step_new_1[i]=x1_1[i]
#==============================================================================
# the other colonne is the all fft
#==============================================================================
for i in range(1,8):
XJ_du_1_total = XJ_1[(t_du_1_1+t_entre_step*(i)-1):(t_du_1_1+t_step+t_entre_step*(i) )];
x1_all,y1_all,z1_all=matrix_24_2(XJ_du_1_total,fs)
x1_all=max_matrix_norm(x1_all)
for j in range(0,24):
matrix_all_step_new_1[24*i+j]=x1_all[j]
#==============================================================================
# this part is to calcul the second matrix
#==============================================================================
for k in range (1,2):
t_start=t_du_2_1
XJ_du_1_2 = XJ_1[(t_start-1):(t_start+t_step)];
x1_1,y1_1,z1_1=matrix_24_2(XJ_du_1_2 ,fs)
x1_1=max_matrix_norm(x1_1)
matrix_all_step_new_2 = np.zeros([192])
for i in range(0,24):
matrix_all_step_new_2[i]=x1_1[i]
#==============================================================================
# the other colonne is the all fft
#==============================================================================
for i in range(1,8):
XJ_du_1_total = XJ_1[(t_start+t_entre_step*(i)-1):(t_start+t_step+t_entre_step*(i) )];
x1_all,y1_all,z1_all=matrix_24_2(XJ_du_1_total,fs)
x1_all=max_matrix_norm(x1_all)
for j in range(0,24):
matrix_all_step_new_2[24*i+j]=x1_all[j]
#==============================================================================
# this part is to calcul the 3 matrix
#==============================================================================
for k in range (1,2):
t_start=t_du_3_1
XJ_du_1_2 = XJ_1[(t_start-1):(t_start+t_step)];
x1_1,y1_1,z1_1=matrix_24_2(XJ_du_1_2 ,fs)
x1_1=max_matrix_norm(x1_1)
matrix_all_step_new_3 = np.zeros([192])
for i in range(0,24):
matrix_all_step_new_3[i]=x1_1[i]
#==============================================================================
# the other colonne is the all fft
#==============================================================================
for i in range(1,8):
XJ_du_1_total = XJ_1[(t_start+t_entre_step*(i)-1):(t_start+t_step+t_entre_step*(i) )];
x1_all,y1_all,z1_all=matrix_24_2(XJ_du_1_total,fs)
x1_all=max_matrix_norm(x1_all)
for j in range(0,24):
matrix_all_step_new_3[24*i+j]=x1_all[j]
#==============================================================================
# this part is to calcul the 4 matrix
#==============================================================================
for k in range (1,2):
t_start=t_du_4_1
XJ_du_1_2 = XJ_1[(t_start-1):(t_start+t_step)];
x1_1,y1_1,z1_1=matrix_24_2(XJ_du_1_2 ,fs)
x1_1=max_matrix_norm(x1_1)
matrix_all_step_new_4 = np.zeros([192])
for i in range(0,24):
matrix_all_step_new_4[i]=x1_1[i]
#==============================================================================
# the other colonne is the all fft
#==============================================================================
for i in range(1,8):
# print i
XJ_du_1_total = XJ_1[(t_start+t_entre_step*(i)-1):(t_start+t_step+t_entre_step*(i) )];
x1_all,y1_all,z1_all=matrix_24_2(XJ_du_1_total,fs)
x1_all=max_matrix_norm(x1_all)
for j in range(0,24):
matrix_all_step_new_4[24*i+j]=x1_all[j]
#print 'matrix_all_step_4=',matrix_all_step_4
#==============================================================================
# this part is to calcul the 5 matrix
#==============================================================================
for k in range (1,2):
t_start=t_du_5_1
XJ_du_1_2 = XJ_1[(t_start-1):(t_start+t_step)];
x1_1,y1_1,z1_1=matrix_24_2(XJ_du_1_2 ,fs)
x1_1=max_matrix_norm(x1_1)
matrix_all_step_new_5 = np.zeros([192])
for i in range(0,24):
matrix_all_step_new_5[i]=x1_1[i]
#==============================================================================
# the other colonne is the all fft
#==============================================================================
for i in range(1,8):
# print i
XJ_du_1_total = XJ_1[(t_start+t_entre_step*(i)-1):(t_start+t_step+t_entre_step*(i) )];
x1_all,y1_all,z1_all=matrix_24_2(XJ_du_1_total,fs)
x1_all=max_matrix_norm(x1_all)
for j in range(0,24):
matrix_all_step_new_5[24*i+j]=x1_all[j]
#print 'matrix_all_step_5=',matrix_all_step_5
np.savez('ce_compare_192_matrix.npz',matrix_all_step_new_1,matrix_all_step_new_2,matrix_all_step_new_3,matrix_all_step_new_4,matrix_all_step_new_5)
| 39.240741 | 147 | 0.532012 |
from read_wav_xml_good_1 import*
from matrix_24_2 import*
from max_matrix_norm import*
import numpy as np
filename = 'francois_filon_pure_3.wav'
filename_1 ='francois_filon_pure_3.xml'
word ='ce'
wave_signal_float,framerate, word_start_point, word_length_point, word_end_point= read_wav_xml_good_1(filename,filename_1,word)
XJ_1 =wave_signal_float
t_step=1920;
t_entre_step=1440;
t_du_1_1 = int(word_start_point[0]);
t_du_1_2 = int(word_end_point[0]);
t_du_2_1 = int(word_start_point[1]);
t_du_2_2 = int(word_end_point[1]);
t_du_3_1 = int(word_start_point[2]);
t_du_3_2 = int(word_end_point[2]);
t_du_4_1 = int(word_start_point[3]);
t_du_4_2 = int(word_end_point[3]);
t_du_5_1 = int(word_start_point[4]);
t_du_5_2 = int(word_end_point[4]);
fs=framerate
XJ_du_1_2 = XJ_1[(t_du_1_1-1):(t_du_1_1+t_step)];
x1_1,y1_1,z1_1=matrix_24_2(XJ_du_1_2 ,fs)
x1_1=max_matrix_norm(x1_1)
matrix_all_step_new_1 = np.zeros([192])
for i in range(0,24):
matrix_all_step_new_1[i]=x1_1[i]
for i in range(1,8):
XJ_du_1_total = XJ_1[(t_du_1_1+t_entre_step*(i)-1):(t_du_1_1+t_step+t_entre_step*(i) )];
x1_all,y1_all,z1_all=matrix_24_2(XJ_du_1_total,fs)
x1_all=max_matrix_norm(x1_all)
for j in range(0,24):
matrix_all_step_new_1[24*i+j]=x1_all[j]
for k in range (1,2):
t_start=t_du_2_1
XJ_du_1_2 = XJ_1[(t_start-1):(t_start+t_step)];
x1_1,y1_1,z1_1=matrix_24_2(XJ_du_1_2 ,fs)
x1_1=max_matrix_norm(x1_1)
matrix_all_step_new_2 = np.zeros([192])
for i in range(0,24):
matrix_all_step_new_2[i]=x1_1[i]
for i in range(1,8):
XJ_du_1_total = XJ_1[(t_start+t_entre_step*(i)-1):(t_start+t_step+t_entre_step*(i) )];
x1_all,y1_all,z1_all=matrix_24_2(XJ_du_1_total,fs)
x1_all=max_matrix_norm(x1_all)
for j in range(0,24):
matrix_all_step_new_2[24*i+j]=x1_all[j]
for k in range (1,2):
t_start=t_du_3_1
XJ_du_1_2 = XJ_1[(t_start-1):(t_start+t_step)];
x1_1,y1_1,z1_1=matrix_24_2(XJ_du_1_2 ,fs)
x1_1=max_matrix_norm(x1_1)
matrix_all_step_new_3 = np.zeros([192])
for i in range(0,24):
matrix_all_step_new_3[i]=x1_1[i]
for i in range(1,8):
XJ_du_1_total = XJ_1[(t_start+t_entre_step*(i)-1):(t_start+t_step+t_entre_step*(i) )];
x1_all,y1_all,z1_all=matrix_24_2(XJ_du_1_total,fs)
x1_all=max_matrix_norm(x1_all)
for j in range(0,24):
matrix_all_step_new_3[24*i+j]=x1_all[j]
for k in range (1,2):
t_start=t_du_4_1
XJ_du_1_2 = XJ_1[(t_start-1):(t_start+t_step)];
x1_1,y1_1,z1_1=matrix_24_2(XJ_du_1_2 ,fs)
x1_1=max_matrix_norm(x1_1)
matrix_all_step_new_4 = np.zeros([192])
for i in range(0,24):
matrix_all_step_new_4[i]=x1_1[i]
for i in range(1,8):
XJ_du_1_total = XJ_1[(t_start+t_entre_step*(i)-1):(t_start+t_step+t_entre_step*(i) )];
x1_all,y1_all,z1_all=matrix_24_2(XJ_du_1_total,fs)
x1_all=max_matrix_norm(x1_all)
for j in range(0,24):
matrix_all_step_new_4[24*i+j]=x1_all[j]
for k in range (1,2):
t_start=t_du_5_1
XJ_du_1_2 = XJ_1[(t_start-1):(t_start+t_step)];
x1_1,y1_1,z1_1=matrix_24_2(XJ_du_1_2 ,fs)
x1_1=max_matrix_norm(x1_1)
matrix_all_step_new_5 = np.zeros([192])
for i in range(0,24):
matrix_all_step_new_5[i]=x1_1[i]
for i in range(1,8):
XJ_du_1_total = XJ_1[(t_start+t_entre_step*(i)-1):(t_start+t_step+t_entre_step*(i) )];
x1_all,y1_all,z1_all=matrix_24_2(XJ_du_1_total,fs)
x1_all=max_matrix_norm(x1_all)
for j in range(0,24):
matrix_all_step_new_5[24*i+j]=x1_all[j]
np.savez('ce_compare_192_matrix.npz',matrix_all_step_new_1,matrix_all_step_new_2,matrix_all_step_new_3,matrix_all_step_new_4,matrix_all_step_new_5)
| true | true |
f7274274d7a0048e67b5610c186be3f936227e5f | 1,037 | py | Python | debussy_concert/data_ingestion/config/movement_parameters/time_partitioned.py | DotzInc/debussy_concert | a28d7ca01814f24ffa75cfece758d619b71509f2 | [
"Apache-2.0"
] | 3 | 2022-03-23T19:16:25.000Z | 2022-03-30T18:12:19.000Z | debussy_concert/data_ingestion/config/movement_parameters/time_partitioned.py | DotzInc/debussy_concert | a28d7ca01814f24ffa75cfece758d619b71509f2 | [
"Apache-2.0"
] | null | null | null | debussy_concert/data_ingestion/config/movement_parameters/time_partitioned.py | DotzInc/debussy_concert | a28d7ca01814f24ffa75cfece758d619b71509f2 | [
"Apache-2.0"
] | 1 | 2022-03-23T20:14:48.000Z | 2022-03-23T20:14:48.000Z | from dataclasses import dataclass
from debussy_concert.core.config.movement_parameters.base import MovementParametersBase
@dataclass(frozen=True)
class BigQueryDataPartitioning:
partitioning_type: str
gcs_partition_schema: str
partition_field: str
destination_partition: str
@dataclass(frozen=True)
class BigQueryTimeDataPartitioning(BigQueryDataPartitioning):
partition_granularity: str
@dataclass(frozen=True)
class TimePartitionedDataIngestionMovementParameters(MovementParametersBase):
extract_connection_id: str
data_partitioning: BigQueryTimeDataPartitioning
def __post_init__(self):
if isinstance(self.data_partitioning, BigQueryTimeDataPartitioning):
return
data_partitioning = BigQueryTimeDataPartitioning(**self.data_partitioning)
# hack for frozen dataclass https://stackoverflow.com/a/54119384
# overwriting data_partitioning with BigQueryTimeDataPartitioning instance
object.__setattr__(self, 'data_partitioning', data_partitioning)
| 34.566667 | 87 | 0.802314 | from dataclasses import dataclass
from debussy_concert.core.config.movement_parameters.base import MovementParametersBase
@dataclass(frozen=True)
class BigQueryDataPartitioning:
partitioning_type: str
gcs_partition_schema: str
partition_field: str
destination_partition: str
@dataclass(frozen=True)
class BigQueryTimeDataPartitioning(BigQueryDataPartitioning):
partition_granularity: str
@dataclass(frozen=True)
class TimePartitionedDataIngestionMovementParameters(MovementParametersBase):
extract_connection_id: str
data_partitioning: BigQueryTimeDataPartitioning
def __post_init__(self):
if isinstance(self.data_partitioning, BigQueryTimeDataPartitioning):
return
data_partitioning = BigQueryTimeDataPartitioning(**self.data_partitioning)
object.__setattr__(self, 'data_partitioning', data_partitioning)
| true | true |
f72742b11c9975baf67b3cee27f9d5f9ddcb878a | 1,593 | py | Python | userbot/plugins/instastory_x3.py | x3raqee/x3raqe | d062ace8d69895a8ab80a003fc76da63e2b63a1d | [
"Apache-2.0"
] | null | null | null | userbot/plugins/instastory_x3.py | x3raqee/x3raqe | d062ace8d69895a8ab80a003fc76da63e2b63a1d | [
"Apache-2.0"
] | null | null | null | userbot/plugins/instastory_x3.py | x3raqee/x3raqe | d062ace8d69895a8ab80a003fc76da63e2b63a1d | [
"Apache-2.0"
] | 1 | 2021-04-27T23:28:43.000Z | 2021-04-27T23:28:43.000Z | # @x3raqe
#ممول محمد
"""QuotLy: Avaible commands: .انستا
"""
import datetime
import asyncio
from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserError
from telethon.tl.functions.account import UpdateNotifySettingsRequest
from userbot.utils import admin_cmd
@borg.on(admin_cmd(pattern="ستوري ?(.*)"))
async def _(event):
if event.fwd_from:
return
if not event.reply_to_msg_id:
await event.edit("``` ~ @X3RAQE - .```")
return
reply_message = await event.get_reply_message()
if not reply_message.text:
await event.edit("``` ~ @X3RAQE - ```")
return
chat = "@x3storybot"
sender = reply_message.sender
if reply_message.sender.bot:
await event.edit("``` ~ @X3RAQE - ```")
return
await event.edit("`جار ارسال لك التحميل من @x3storybot`")
async with event.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True,from_users=1077724863))
await event.client.forward_messages(chat, reply_message)
response = await response
except YouBlockedUserError:
await event.reply("```Please unblock me (@x3storybot) u Nigga```")
return
if response.text.startswith("Hi!"):
await event.edit("```Can you kindly disable your forward privacy settings for good?```")
else:
await event.delete()
await event.client.send_message(event.chat_id, response.message)
| 37.046512 | 102 | 0.629002 |
import datetime
import asyncio
from telethon import events
from telethon.errors.rpcerrorlist import YouBlockedUserError
from telethon.tl.functions.account import UpdateNotifySettingsRequest
from userbot.utils import admin_cmd
@borg.on(admin_cmd(pattern="ستوري ?(.*)"))
async def _(event):
if event.fwd_from:
return
if not event.reply_to_msg_id:
await event.edit("``` ~ @X3RAQE - .```")
return
reply_message = await event.get_reply_message()
if not reply_message.text:
await event.edit("``` ~ @X3RAQE - ```")
return
chat = "@x3storybot"
sender = reply_message.sender
if reply_message.sender.bot:
await event.edit("``` ~ @X3RAQE - ```")
return
await event.edit("`جار ارسال لك التحميل من @x3storybot`")
async with event.client.conversation(chat) as conv:
try:
response = conv.wait_event(events.NewMessage(incoming=True,from_users=1077724863))
await event.client.forward_messages(chat, reply_message)
response = await response
except YouBlockedUserError:
await event.reply("```Please unblock me (@x3storybot) u Nigga```")
return
if response.text.startswith("Hi!"):
await event.edit("```Can you kindly disable your forward privacy settings for good?```")
else:
await event.delete()
await event.client.send_message(event.chat_id, response.message)
| true | true |
f72743000a24fcbc0e4390eb46261f96678ebe0b | 956 | py | Python | jdcloud_sdk/services/vod/models/UpdateTranscodeTemplateGroupReqData.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | jdcloud_sdk/services/vod/models/UpdateTranscodeTemplateGroupReqData.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | jdcloud_sdk/services/vod/models/UpdateTranscodeTemplateGroupReqData.py | Tanc009/jdcloud-sdk-python | 8b045c99bc5b73ca7348e950b6f01e03a27982f5 | [
"Apache-2.0"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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.
#
# NOTE: This class is auto generated by the jdcloud code generator program.
class UpdateTranscodeTemplateGroupReqData(object):
def __init__(self, groupName=None, templates=None):
"""
:param groupName: (Optional) 转码模板组名称
:param templates: (Optional)
"""
self.groupName = groupName
self.templates = templates
| 31.866667 | 75 | 0.722803 |
class UpdateTranscodeTemplateGroupReqData(object):
def __init__(self, groupName=None, templates=None):
self.groupName = groupName
self.templates = templates
| true | true |
f72743d6ec89246b1658151bdccfda8fc5b489b1 | 8,498 | py | Python | docs/conf.py | Akhail/Tebless | 87faff5547f168d0cf2d5caaf313c1efe1c19950 | [
"MIT"
] | 5 | 2017-09-20T02:12:25.000Z | 2019-10-22T14:12:07.000Z | docs/conf.py | mdbetancourt/Tebless | 87faff5547f168d0cf2d5caaf313c1efe1c19950 | [
"MIT"
] | 3 | 2021-06-14T14:20:53.000Z | 2021-11-15T17:47:37.000Z | docs/conf.py | Akhail/Tebless | 87faff5547f168d0cf2d5caaf313c1efe1c19950 | [
"MIT"
] | 1 | 2021-04-13T14:03:53.000Z | 2021-04-13T14:03:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# tebless documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
import sphinx_rtd_theme
# If extensions (or modules to document with autodoc) are in another
# directory, add these directories to sys.path here. If the directory is
# relative to the documentation root, use os.path.abspath to make it
# absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# Get the project root dir, which is the parent dir of this
cwd = os.getcwd()
project_root = os.path.dirname(cwd)
# Insert the project root dir as the first element in the PYTHONPATH.
# This lets us ensure that the source package is imported, and that its
# version is used.
sys.path.insert(0, project_root)
import tebless
# -- General configuration ---------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Tebless'
copyright = u"2017, Michel Betancourt"
# The version info for the project you're documenting, acts as replacement
# for |version| and |release|, also used in various other places throughout
# the built documents.
#
# The short X.Y version.
version = tebless.__version__
# The full version, including alpha/beta/rc tags.
release = tebless.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to
# some non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built
# documents.
#keep_warnings = False
# -- Options for HTML output -------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as
# html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the
# top of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon
# of the docs. This file should be a Windows icon file (.ico) being
# 16x16 or 32x32 pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets)
# here, relative to this directory. They are copied after the builtin
# static files, so a file named "default.css" will overwrite the builtin
# "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names
# to template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer.
# Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer.
# Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages
# will contain a <link> tag referring to it. The value of this option
# must be the base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'teblessdoc'
# -- Options for LaTeX output ------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'tebless.tex',
u'Tebless Documentation',
u'Michel Betancourt', 'manual'),
]
# The name of an image file (relative to this directory) to place at
# the top of the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings
# are parts, not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'tebless',
u'Tebless Documentation',
[u'Michel Betancourt'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ----------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'tebless',
u'Tebless Documentation',
u'Michel Betancourt',
'tebless',
'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
| 30.6787 | 76 | 0.717581 |
import sys
import os
import sphinx_rtd_theme
cwd = os.getcwd()
project_root = os.path.dirname(cwd)
sys.path.insert(0, project_root)
import tebless
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'Tebless'
copyright = u"2017, Michel Betancourt"
# for |version| and |release|, also used in various other places throughout
# the built documents.
#
# The short X.Y version.
version = tebless.__version__
# The full version, including alpha/beta/rc tags.
release = tebless.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to
# some non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built
# documents.
#keep_warnings = False
# -- Options for HTML output -------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# Theme options are theme-specific and customize the look and feel of a
# theme further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as
# html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the
# top of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon
# of the docs. This file should be a Windows icon file (.ico) being
# 16x16 or 32x32 pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets)
# here, relative to this directory. They are copied after the builtin
# static files, so a file named "default.css" will overwrite the builtin
# "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names
# to template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer.
# Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer.
# Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages
# will contain a <link> tag referring to it. The value of this option
# must be the base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'teblessdoc'
# -- Options for LaTeX output ------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'tebless.tex',
u'Tebless Documentation',
u'Michel Betancourt', 'manual'),
]
# The name of an image file (relative to this directory) to place at
# the top of the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings
# are parts, not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'tebless',
u'Tebless Documentation',
[u'Michel Betancourt'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output ----------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'tebless',
u'Tebless Documentation',
u'Michel Betancourt',
'tebless',
'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
| true | true |
f72744a63d45a288c51ef43928f1452981437cd1 | 2,703 | py | Python | snake.py | leonardoarthur/SnakeGame | 106d3d238fd0d15091aa25d1770886961cedcc73 | [
"MIT"
] | 1 | 2021-05-03T02:03:36.000Z | 2021-05-03T02:03:36.000Z | snake.py | leonardoarthur/SnakeGame | 106d3d238fd0d15091aa25d1770886961cedcc73 | [
"MIT"
] | null | null | null | snake.py | leonardoarthur/SnakeGame | 106d3d238fd0d15091aa25d1770886961cedcc73 | [
"MIT"
] | null | null | null | import pygame
import random
pygame.init()
azul = (50, 100, 213)
laranja = (205, 102, 0)
verde = (0, 255, 0)
amarelo = (255, 255, 102)
dimensoes = (600, 600)
x = 300
y = 300
d = 20
lista_cobra = [[x, y]]
dx = 0
dy = 0
x_comida = round(random.randrange(0, 600 - d) /20) * 20
y_comida = round(random.randrange(0, 600 - d) /20) * 20
fonte = pygame.font.SysFont("hack", 35)
tela = pygame.display.set_mode((dimensoes))
pygame.display.set_caption('Snake')
tela.fill(azul)
clock = pygame.time.Clock()
def desenha_cobra(lista_cobra):
tela.fill(azul)
for unidade in lista_cobra:
pygame.draw.rect(tela, laranja, [unidade[0], unidade[1], d, d])
def mover_cobra(dx, dy, lista_cobra):
for event in pygame.event.get():
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_LEFT:
dx = -d
dy = 0
elif event.key == pygame.K_RIGHT:
dx = d
dy = 0
elif event.key == pygame.K_UP:
dx = 0
dy = -d
elif event.key == pygame.K_DOWN:
dx = 0
dy = d
x_novo = lista_cobra[-1][0] + dx
y_novo = lista_cobra[-1][1] + dy
lista_cobra.append([x_novo, y_novo])
del lista_cobra[0]
return dx, dy, lista_cobra
def verifica_comida(dx, dy, x_comida, y_comida, lista_cobra):
head = lista_cobra[-1]
x_novo = head[0] + dx
y_novo = head[1] + dy
if head[0] == x_comida and head[1]== y_comida:
lista_cobra.append([x_novo, y_novo])
x_comida = round(random.randrange(0, 600 - d) / 20) * 20
y_comida = round(random.randrange(0, 600 - d) / 20) * 20
pygame.draw.rect(tela, verde, [x_comida, y_comida, d, d])
return x_comida, y_comida, lista_cobra
def verifica_parede(lista_cobra):
head = lista_cobra[-1]
x = head[0]
y = head[1]
if x not in range(600) or y not in range(600):
raise Exception
def verifica_modeu_cobra(lista_cobra):
head = lista_cobra[-1]
corpo = lista_cobra.copy()
del corpo[-1]
for x, y in corpo:
if x == head[0] and y == head[1]:
raise Exception
def atualizar_pontos(lista_cobra):
pts = str(len(lista_cobra))
escore = fonte.render("pontuação: " + pts, True, amarelo)
tela.blit(escore, [0, 0])
while True:
pygame.display.update()
desenha_cobra(lista_cobra)
dx, dy, lista_cobra = mover_cobra(dx, dy, lista_cobra)
x_comida, y_comida, lista_cobra = verifica_comida(dx, dy, x_comida, y_comida, lista_cobra)
verifica_parede(lista_cobra)
atualizar_pontos(lista_cobra)
verifica_modeu_cobra(lista_cobra)
print(lista_cobra)
clock.tick(10) | 24.572727 | 94 | 0.607103 | import pygame
import random
pygame.init()
azul = (50, 100, 213)
laranja = (205, 102, 0)
verde = (0, 255, 0)
amarelo = (255, 255, 102)
dimensoes = (600, 600)
x = 300
y = 300
d = 20
lista_cobra = [[x, y]]
dx = 0
dy = 0
x_comida = round(random.randrange(0, 600 - d) /20) * 20
y_comida = round(random.randrange(0, 600 - d) /20) * 20
fonte = pygame.font.SysFont("hack", 35)
tela = pygame.display.set_mode((dimensoes))
pygame.display.set_caption('Snake')
tela.fill(azul)
clock = pygame.time.Clock()
def desenha_cobra(lista_cobra):
tela.fill(azul)
for unidade in lista_cobra:
pygame.draw.rect(tela, laranja, [unidade[0], unidade[1], d, d])
def mover_cobra(dx, dy, lista_cobra):
for event in pygame.event.get():
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_LEFT:
dx = -d
dy = 0
elif event.key == pygame.K_RIGHT:
dx = d
dy = 0
elif event.key == pygame.K_UP:
dx = 0
dy = -d
elif event.key == pygame.K_DOWN:
dx = 0
dy = d
x_novo = lista_cobra[-1][0] + dx
y_novo = lista_cobra[-1][1] + dy
lista_cobra.append([x_novo, y_novo])
del lista_cobra[0]
return dx, dy, lista_cobra
def verifica_comida(dx, dy, x_comida, y_comida, lista_cobra):
head = lista_cobra[-1]
x_novo = head[0] + dx
y_novo = head[1] + dy
if head[0] == x_comida and head[1]== y_comida:
lista_cobra.append([x_novo, y_novo])
x_comida = round(random.randrange(0, 600 - d) / 20) * 20
y_comida = round(random.randrange(0, 600 - d) / 20) * 20
pygame.draw.rect(tela, verde, [x_comida, y_comida, d, d])
return x_comida, y_comida, lista_cobra
def verifica_parede(lista_cobra):
head = lista_cobra[-1]
x = head[0]
y = head[1]
if x not in range(600) or y not in range(600):
raise Exception
def verifica_modeu_cobra(lista_cobra):
head = lista_cobra[-1]
corpo = lista_cobra.copy()
del corpo[-1]
for x, y in corpo:
if x == head[0] and y == head[1]:
raise Exception
def atualizar_pontos(lista_cobra):
pts = str(len(lista_cobra))
escore = fonte.render("pontuação: " + pts, True, amarelo)
tela.blit(escore, [0, 0])
while True:
pygame.display.update()
desenha_cobra(lista_cobra)
dx, dy, lista_cobra = mover_cobra(dx, dy, lista_cobra)
x_comida, y_comida, lista_cobra = verifica_comida(dx, dy, x_comida, y_comida, lista_cobra)
verifica_parede(lista_cobra)
atualizar_pontos(lista_cobra)
verifica_modeu_cobra(lista_cobra)
print(lista_cobra)
clock.tick(10) | true | true |
f7274749a010a84dccc4f71883f73ec4a8832b8a | 417 | py | Python | glitter/migrations/0004_object_id_required.py | dhamaniasad/django-glitter | b9b0a3d8b49d5d9b840656f84564ba0a6e016f98 | [
"BSD-3-Clause"
] | 3 | 2017-06-01T16:22:18.000Z | 2018-08-22T21:45:55.000Z | glitter/migrations/0004_object_id_required.py | blancltd/django-glitter | b9b0a3d8b49d5d9b840656f84564ba0a6e016f98 | [
"BSD-3-Clause"
] | 85 | 2016-02-25T10:34:03.000Z | 2017-04-03T11:07:59.000Z | glitter/migrations/0004_object_id_required.py | blancltd/django-glitter | b9b0a3d8b49d5d9b840656f84564ba0a6e016f98 | [
"BSD-3-Clause"
] | 1 | 2016-08-02T08:21:19.000Z | 2016-08-02T08:21:19.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('glitter', '0003_remove_empty_contentblocks'),
]
operations = [
migrations.AlterField(
model_name='contentblock',
name='object_id',
field=models.PositiveIntegerField(),
),
]
| 20.85 | 55 | 0.621103 |
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('glitter', '0003_remove_empty_contentblocks'),
]
operations = [
migrations.AlterField(
model_name='contentblock',
name='object_id',
field=models.PositiveIntegerField(),
),
]
| true | true |
f72747c52a599d07bf9a7350a23de712aeb51d69 | 3,190 | py | Python | app/result/views.py | Ravishrks/examin | 974f8d86ca116b3135a482e8e81532a40ea187c3 | [
"MIT"
] | null | null | null | app/result/views.py | Ravishrks/examin | 974f8d86ca116b3135a482e8e81532a40ea187c3 | [
"MIT"
] | null | null | null | app/result/views.py | Ravishrks/examin | 974f8d86ca116b3135a482e8e81532a40ea187c3 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.views import View
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.http import HttpResponse
from result.models import ResponseSheet
import os
import subprocess
def result(request):
return render(request, 'user/dashboard.html')
def checkResponseSheet(request, exam_id):
my_response_sheet = ResponseSheet.objects.filter(exam__pk = exam_id)
# testing with one entry
print(my_response_sheet)
for sheet in my_response_sheet:
# sheet = my_response_sheet.first()
new_file = f'{sheet.pk}{sheet.exam.pk}{sheet.question.pk}{sheet.profile.user.username}'
my_programme = sheet.response
# taking decision based on programme type
if sheet.question.question_type == "Programme":
my_language_type = sheet.language_type[1:]
programe_file_location = f'result/program/{my_language_type}/files/{new_file}{sheet.language_type}'
output_file_location = f'result/program/{my_language_type}/output/{new_file}{sheet.language_type}.txt'
error_file_location = f'result/program/{my_language_type}/error/{new_file}{sheet.language_type}.txt'
sh_file_location = f'result/program/{my_language_type}/sh/{new_file}{sheet.language_type}.sh'
if sheet.language_type == ".js":
print("It's js bro")
with open(programe_file_location, 'w') as f:
f.write(my_programme)
# create shell script files
with open(sh_file_location, 'w') as sh:
shell_cmd = f'#!/bin/sh\nnode {programe_file_location} > {output_file_location}\nnode {programe_file_location} 2> {error_file_location}'
sh.write(shell_cmd)
subprocess.run(["chmod","777",sh_file_location])
subprocess.run(["chmod","777",programe_file_location])
subprocess.run(["chmod","777",output_file_location])
subprocess.run(["chmod","777",error_file_location])
subprocess.run([sh_file_location])
# Save output or error to response file
with open(output_file_location) as rf:
read_file = rf.read()
sheet.output = read_file
sheet.save()
with open(error_file_location) as ef:
read_file_error = ef.read()
sheet.error = read_file_error
sheet.save()
elif sheet.language_type == ".c":
print("It's c bro")
elif sheet.language_type == ".cpp":
print("It's c++ bro")
elif sheet.language_type == ".py":
print("It's python bro")
elif sheet.language_type == ".php":
print("It's php bro")
elif sheet.language_type == ".java":
print("It's java bro")
return HttpResponse("Checked!")
| 34.673913 | 156 | 0.601254 | from django.shortcuts import render, redirect
from django.views import View
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.http import HttpResponse
from result.models import ResponseSheet
import os
import subprocess
def result(request):
return render(request, 'user/dashboard.html')
def checkResponseSheet(request, exam_id):
my_response_sheet = ResponseSheet.objects.filter(exam__pk = exam_id)
print(my_response_sheet)
for sheet in my_response_sheet:
new_file = f'{sheet.pk}{sheet.exam.pk}{sheet.question.pk}{sheet.profile.user.username}'
my_programme = sheet.response
if sheet.question.question_type == "Programme":
my_language_type = sheet.language_type[1:]
programe_file_location = f'result/program/{my_language_type}/files/{new_file}{sheet.language_type}'
output_file_location = f'result/program/{my_language_type}/output/{new_file}{sheet.language_type}.txt'
error_file_location = f'result/program/{my_language_type}/error/{new_file}{sheet.language_type}.txt'
sh_file_location = f'result/program/{my_language_type}/sh/{new_file}{sheet.language_type}.sh'
if sheet.language_type == ".js":
print("It's js bro")
with open(programe_file_location, 'w') as f:
f.write(my_programme)
# create shell script files
with open(sh_file_location, 'w') as sh:
shell_cmd = f'
sh.write(shell_cmd)
subprocess.run(["chmod","777",sh_file_location])
subprocess.run(["chmod","777",programe_file_location])
subprocess.run(["chmod","777",output_file_location])
subprocess.run(["chmod","777",error_file_location])
subprocess.run([sh_file_location])
# Save output or error to response file
with open(output_file_location) as rf:
read_file = rf.read()
sheet.output = read_file
sheet.save()
with open(error_file_location) as ef:
read_file_error = ef.read()
sheet.error = read_file_error
sheet.save()
elif sheet.language_type == ".c":
print("It's c bro")
elif sheet.language_type == ".cpp":
print("It's c++ bro")
elif sheet.language_type == ".py":
print("It's python bro")
elif sheet.language_type == ".php":
print("It's php bro")
elif sheet.language_type == ".java":
print("It's java bro")
return HttpResponse("Checked!")
| true | true |
f727483e267d49216f2db46205941f51cd603a86 | 544 | py | Python | src/manage.py | tegarty/socialrating | b80888ee8e637bd0a5517614c78235d563fead2e | [
"BSD-3-Clause"
] | 1 | 2019-02-03T17:17:02.000Z | 2019-02-03T17:17:02.000Z | src/manage.py | tegarty/socialrating | b80888ee8e637bd0a5517614c78235d563fead2e | [
"BSD-3-Clause"
] | null | null | null | src/manage.py | tegarty/socialrating | b80888ee8e637bd0a5517614c78235d563fead2e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'socialrating.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
| 34 | 76 | 0.689338 |
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'socialrating.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
| true | true |
f7274a0d65eb66f00c4a41033040a9f2ae9f8cac | 18,672 | py | Python | autobahn/wamp/interfaces.py | meejah/AutobahnPython | 54da8882eea3f4b1da62a6d3481556ab77720d41 | [
"MIT"
] | null | null | null | autobahn/wamp/interfaces.py | meejah/AutobahnPython | 54da8882eea3f4b1da62a6d3481556ab77720d41 | [
"MIT"
] | null | null | null | autobahn/wamp/interfaces.py | meejah/AutobahnPython | 54da8882eea3f4b1da62a6d3481556ab77720d41 | [
"MIT"
] | 1 | 2018-11-07T12:52:07.000Z | 2018-11-07T12:52:07.000Z | ###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Tavendo GmbH
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
###############################################################################
import abc
import six
__all__ = (
'IObjectSerializer',
'ISerializer',
'ITransport',
'ITransportHandler',
'ISession',
'IApplicationSession',
)
@six.add_metaclass(abc.ABCMeta)
class IObjectSerializer(object):
"""
Raw Python object serialization and deserialization. Object serializers are
used by classes implementing WAMP serializers, that is instances of
:class:`autobahn.wamp.interfaces.ISerializer`.
"""
@abc.abstractproperty
def BINARY(self):
"""
Flag (read-only) to indicate if serializer requires a binary clean
transport or if UTF8 transparency is sufficient.
"""
@abc.abstractmethod
def serialize(self, obj):
"""
Serialize an object to a byte string.
:param obj: Object to serialize.
:type obj: Any serializable type.
:returns: bytes -- Serialized byte string.
"""
@abc.abstractmethod
def unserialize(self, payload):
"""
Unserialize objects from a byte string.
:param payload: Objects to unserialize.
:type payload: bytes
:returns: list -- List of (raw) objects unserialized.
"""
@six.add_metaclass(abc.ABCMeta)
class ISerializer(object):
"""
WAMP message serialization and deserialization.
"""
@abc.abstractproperty
def MESSAGE_TYPE_MAP(self):
"""
Mapping of WAMP message type codes to WAMP message classes.
"""
@abc.abstractproperty
def SERIALIZER_ID(self):
"""
The WAMP serialization format ID.
"""
@abc.abstractmethod
def serialize(self, message):
"""
Serializes a WAMP message to bytes for sending over a transport.
:param message: An instance that implements :class:`autobahn.wamp.interfaces.IMessage`
:type message: obj
:returns: tuple -- A pair ``(payload, is_binary)``.
"""
@abc.abstractmethod
def unserialize(self, payload, is_binary):
"""
Deserialize bytes from a transport and parse into WAMP messages.
:param payload: Byte string from wire.
:type payload: bytes
:param is_binary: Type of payload. True if payload is a binary string, else
the payload is UTF-8 encoded Unicode text.
:type is_binary: bool
:returns: list -- List of ``a.w.m.Message`` objects.
"""
@six.add_metaclass(abc.ABCMeta)
class ITransport(object):
"""
A WAMP transport is a bidirectional, full-duplex, reliable, ordered,
message-based channel.
"""
@abc.abstractmethod
def send(self, message):
"""
Send a WAMP message over the transport to the peer. If the transport is
not open, this raises :class:`autobahn.wamp.exception.TransportLost`.
Returns a deferred/future when the message has been processed and more
messages may be sent. When send() is called while a previous deferred/future
has not yet fired, the send will fail immediately.
:param message: An instance that implements :class:`autobahn.wamp.interfaces.IMessage`
:type message: obj
:returns: obj -- A Deferred/Future
"""
@abc.abstractmethod
def is_open(self):
"""
Check if the transport is open for messaging.
:returns: bool -- ``True``, if the transport is open.
"""
@abc.abstractmethod
def close(self):
"""
Close the transport regularly. The transport will perform any
closing handshake if applicable. This should be used for any
application initiated closing.
"""
@abc.abstractmethod
def abort(self):
"""
Abort the transport abruptly. The transport will be destroyed as
fast as possible, and without playing nice to the peer. This should
only be used in case of fatal errors, protocol violations or possible
detected attacks.
"""
@abc.abstractmethod
def get_channel_id(self):
"""
Return the unique channel ID of the underlying transport. This is used to
mitigate credential forwarding man-in-the-middle attacks when running
application level authentication (eg WAMP-cryptosign) which are decoupled
from the underlying transport.
The channel ID is only available when running over TLS (either WAMP-WebSocket
or WAMP-RawSocket). It is not available for non-TLS transports (plain TCP or
Unix domain sockets). It is also not available for WAMP-over-HTTP/Longpoll.
Further, it is currently unimplemented for asyncio (only works on Twisted).
The channel ID is computed as follows:
- for a client, the SHA256 over the "TLS Finished" message sent by the client
to the server is returned.
- for a server, the SHA256 over the "TLS Finished" message the server expected
the client to send
Note: this is similar to `tls-unique` as described in RFC5929, but instead
of returning the raw "TLS Finished" message, it returns a SHA256 over such a
message. The reason is that we use the channel ID mainly with WAMP-cryptosign,
which is based on Ed25519, where keys are always 32 bytes. And having a channel ID
which is always 32 bytes (independent of the TLS ciphers/hashfuns in use) allows
use to easily XOR channel IDs with Ed25519 keys and WAMP-cryptosign challenges.
WARNING: For safe use of this (that is, for safely binding app level authentication
to the underlying transport), you MUST use TLS, and you SHOULD deactivate both
TLS session renegotiation and TLS session resumption.
References:
- https://tools.ietf.org/html/rfc5056
- https://tools.ietf.org/html/rfc5929
- http://www.pyopenssl.org/en/stable/api/ssl.html#OpenSSL.SSL.Connection.get_finished
- http://www.pyopenssl.org/en/stable/api/ssl.html#OpenSSL.SSL.Connection.get_peer_finished
:returns: The channel ID (if available) of the underlying WAMP transport. The
channel ID is a 32 bytes value.
:rtype: binary or None
"""
@six.add_metaclass(abc.ABCMeta)
class ITransportHandler(object):
@abc.abstractproperty
def transport(self):
"""
When the transport this handler is attached to is currently open, this property
can be read from. The property should be considered read-only. When the transport
is gone, this property is set to None.
"""
@abc.abstractmethod
def on_open(self, transport):
"""
Callback fired when transport is open. May run asynchronously. The transport
is considered running and is_open() would return true, as soon as this callback
has completed successfully.
:param transport: An instance that implements :class:`autobahn.wamp.interfaces.ITransport`
:type transport: obj
"""
@abc.abstractmethod
def on_message(self, message):
"""
Callback fired when a WAMP message was received. May run asynchronously. The callback
should return or fire the returned deferred/future when it's done processing the message.
In particular, an implementation of this callback must not access the message afterwards.
:param message: An instance that implements :class:`autobahn.wamp.interfaces.IMessage`
:type message: obj
"""
@abc.abstractmethod
def on_close(self, was_clean):
"""
Callback fired when the transport has been closed.
:param was_clean: Indicates if the transport has been closed regularly.
:type was_clean: bool
"""
@six.add_metaclass(abc.ABCMeta)
class ISession(object):
"""
Base interface for WAMP sessions.
"""
@abc.abstractmethod
def on_connect(self):
"""
Callback fired when the transport this session will run over has been established.
"""
@abc.abstractmethod
def join(self, realm):
"""
Attach the session to the given realm. A session is open as soon as it is attached to a realm.
"""
@abc.abstractmethod
def on_challenge(self, challenge):
"""
Callback fired when the peer demands authentication.
May return a Deferred/Future.
:param challenge: The authentication challenge.
:type challenge: Instance of :class:`autobahn.wamp.types.Challenge`.
"""
@abc.abstractmethod
def on_join(self, details):
"""
Callback fired when WAMP session has been established.
May return a Deferred/Future.
:param details: Session information.
:type details: Instance of :class:`autobahn.wamp.types.SessionDetails`.
"""
@abc.abstractmethod
def leave(self, reason=None, message=None):
"""
Actively close this WAMP session.
:param reason: An optional URI for the closing reason.
:type reason: str
:param message: An optional (human readable) closing message, intended for
logging purposes.
:type message: str
:return: may return a Future/Deferred that fires when we've disconnected
"""
@abc.abstractmethod
def on_leave(self, details):
"""
Callback fired when WAMP session has is closed
:param details: Close information.
:type details: Instance of :class:`autobahn.wamp.types.CloseDetails`.
"""
@abc.abstractmethod
def disconnect(self):
"""
Close the underlying transport.
"""
@abc.abstractmethod
def is_connected(self):
"""
Check if the underlying transport is connected.
"""
@abc.abstractmethod
def is_attached(self):
"""
Check if the session has currently joined a realm.
"""
@abc.abstractmethod
def on_disconnect(self):
"""
Callback fired when underlying transport has been closed.
"""
@six.add_metaclass(abc.ABCMeta)
class IApplicationSession(ISession):
"""
Interface for WAMP client peers implementing the four different
WAMP roles (caller, callee, publisher, subscriber).
"""
@abc.abstractmethod
def define(self, exception, error=None):
"""
Defines an exception for a WAMP error in the context of this WAMP session.
:param exception: The exception class to define an error mapping for.
:type exception: A class that derives of ``Exception``.
:param error: The URI (or URI pattern) the exception class should be mapped for.
Iff the ``exception`` class is decorated, this must be ``None``.
:type error: str
"""
@abc.abstractmethod
def call(self, procedure, *args, **kwargs):
"""
Call a remote procedure.
This will return a Deferred/Future, that when resolved, provides the actual result
returned by the called remote procedure.
- If the result is a single positional return value, it'll be returned "as-is".
- If the result contains multiple positional return values or keyword return values,
the result is wrapped in an instance of :class:`autobahn.wamp.types.CallResult`.
- If the call fails, the returned Deferred/Future will be rejected with an instance
of :class:`autobahn.wamp.exception.ApplicationError`.
If ``kwargs`` contains an ``options`` keyword argument that is an instance of
:class:`autobahn.wamp.types.CallOptions`, this will provide specific options for
the call to perform.
When the *Caller* and *Dealer* implementations support canceling of calls, the call may
be canceled by canceling the returned Deferred/Future.
:param procedure: The URI of the remote procedure to be called, e.g. ``u"com.myapp.hello"``.
:type procedure: unicode
:param args: Any positional arguments for the call.
:type args: list
:param kwargs: Any keyword arguments for the call.
:type kwargs: dict
:returns: A Deferred/Future for the call result -
:rtype: instance of :tx:`twisted.internet.defer.Deferred` / :py:class:`asyncio.Future`
"""
@abc.abstractmethod
def register(self, endpoint, procedure=None, options=None):
"""
Register a procedure for remote calling.
When ``endpoint`` is a callable (function, method or object that implements ``__call__``),
then ``procedure`` must be provided and an instance of
:tx:`twisted.internet.defer.Deferred` (when running on **Twisted**) or an instance
of :py:class:`asyncio.Future` (when running on **asyncio**) is returned.
- If the registration *succeeds* the returned Deferred/Future will *resolve* to
an object that implements :class:`autobahn.wamp.interfaces.IRegistration`.
- If the registration *fails* the returned Deferred/Future will *reject* with an
instance of :class:`autobahn.wamp.exception.ApplicationError`.
When ``endpoint`` is an object, then each of the object's methods that is decorated
with :func:`autobahn.wamp.register` is automatically registered and a (single)
DeferredList or Future is returned that gathers all individual underlying Deferreds/Futures.
:param endpoint: The endpoint called under the procedure.
:type endpoint: callable or object
:param procedure: When ``endpoint`` is a callable, the URI (or URI pattern)
of the procedure to register for. When ``endpoint`` is an object,
the argument is ignored (and should be ``None``).
:type procedure: unicode
:param options: Options for registering.
:type options: instance of :class:`autobahn.wamp.types.RegisterOptions`.
:returns: A registration or a list of registrations (or errors)
:rtype: instance(s) of :tx:`twisted.internet.defer.Deferred` / :py:class:`asyncio.Future`
"""
@abc.abstractmethod
def publish(self, topic, *args, **kwargs):
"""
Publish an event to a topic.
If ``kwargs`` contains an ``options`` keyword argument that is an instance of
:class:`autobahn.wamp.types.PublishOptions`, this will provide
specific options for the publish to perform.
.. note::
By default, publications are non-acknowledged and the publication can
fail silently, e.g. because the session is not authorized to publish
to the topic.
When publication acknowledgement is requested via ``options.acknowledge == True``,
this function returns a Deferred/Future:
- If the publication succeeds the Deferred/Future will resolve to an object
that implements :class:`autobahn.wamp.interfaces.IPublication`.
- If the publication fails the Deferred/Future will reject with an instance
of :class:`autobahn.wamp.exception.ApplicationError`.
:param topic: The URI of the topic to publish to, e.g. ``u"com.myapp.mytopic1"``.
:type topic: unicode
:param args: Arbitrary application payload for the event (positional arguments).
:type args: list
:param kwargs: Arbitrary application payload for the event (keyword arguments).
:type kwargs: dict
:returns: Acknowledgement for acknowledge publications - otherwise nothing.
:rtype: ``None`` or instance of :tx:`twisted.internet.defer.Deferred` / :py:class:`asyncio.Future`
"""
@abc.abstractmethod
def subscribe(self, handler, topic=None, options=None):
"""
Subscribe to a topic for receiving events.
When ``handler`` is a callable (function, method or object that implements ``__call__``),
then `topic` must be provided and an instance of
:tx:`twisted.internet.defer.Deferred` (when running on **Twisted**) or an instance
of :class:`asyncio.Future` (when running on **asyncio**) is returned.
- If the subscription succeeds the Deferred/Future will resolve to an object
that implements :class:`autobahn.wamp.interfaces.ISubscription`.
- If the subscription fails the Deferred/Future will reject with an instance
of :class:`autobahn.wamp.exception.ApplicationError`.
When ``handler`` is an object, then each of the object's methods that is decorated
with :func:`autobahn.wamp.subscribe` is automatically subscribed as event handlers,
and a list of Deferreds/Futures is returned that each resolves or rejects as above.
:param handler: The event handler to receive events.
:type handler: callable or object
:param topic: When ``handler`` is a callable, the URI (or URI pattern)
of the topic to subscribe to. When ``handler`` is an object, this
value is ignored (and should be ``None``).
:type topic: unicode
:param options: Options for subscribing.
:type options: An instance of :class:`autobahn.wamp.types.SubscribeOptions`.
:returns: A single Deferred/Future or a list of such objects
:rtype: instance(s) of :tx:`twisted.internet.defer.Deferred` / :py:class:`asyncio.Future`
"""
| 37.569416 | 106 | 0.658044 | true | true | |
f7274b9a30433a0e80ac0f1cf680738f5e8edb50 | 20,559 | py | Python | PyDSS/pyPostprocessor/PostprocessScripts/DERMSOptimizer_helper_modules/opt_funcs.py | daniel-thom/PyDSS | 8c7ae2d3a17d596b42a92e33f7d29329e26fbc30 | [
"BSD-3-Clause"
] | 1 | 2020-11-25T17:52:53.000Z | 2020-11-25T17:52:53.000Z | PyDSS/pyPostprocessor/PostprocessScripts/DERMSOptimizer_helper_modules/opt_funcs.py | daniel-thom/PyDSS | 8c7ae2d3a17d596b42a92e33f7d29329e26fbc30 | [
"BSD-3-Clause"
] | null | null | null | PyDSS/pyPostprocessor/PostprocessScripts/DERMSOptimizer_helper_modules/opt_funcs.py | daniel-thom/PyDSS | 8c7ae2d3a17d596b42a92e33f7d29329e26fbc30 | [
"BSD-3-Clause"
] | 1 | 2020-07-23T19:52:02.000Z | 2020-07-23T19:52:02.000Z | import numpy as np
from scipy.sparse import lil_matrix
import scipy.sparse.linalg as sp
import scipy.sparse as sparse
import math
import csv
import matplotlib.pyplot as plt
def linear_powerflow_model(Y00,Y01,Y10,Y11_inv,I_coeff,V1,slack_no):
# voltage linearlization
V1_conj = np.conj(V1[slack_no:])
V1_conj_inv = 1 / V1_conj
coeff_V = Y11_inv * V1_conj_inv
coeff_V_P = coeff_V
coeff_V_Q = -1j*coeff_V
coeff_Vm = -np.dot(Y11_inv,np.dot(Y10,V1[:slack_no]))
# voltage magnitude linearization
m = coeff_Vm
m_inv = 1 / coeff_Vm
coeff_Vmag_k = abs(m)
A = (np.multiply(coeff_V.transpose(),m_inv)).transpose()
coeff_Vmag_P = (np.multiply(A.real.transpose(),coeff_Vmag_k)).transpose()
coeff_Vmag_Q = (np.multiply((-1j*A).real.transpose(),coeff_Vmag_k)).transpose()
# current linearization
if len(I_coeff):
coeff_I_P = np.dot(I_coeff[:,slack_no:],coeff_V_P)
coeff_I_Q = np.dot(I_coeff[:,slack_no:],coeff_V_Q)
coeff_I_const = np.dot(I_coeff[:,slack_no:],coeff_Vm) + np.dot(I_coeff[:,:slack_no],V1[:slack_no])
else:
coeff_I_P = []
coeff_I_Q = []
coeff_I_const = []
#=========================================Yiyun's Notes===========================================#
# Output relations: Vmag = coeff_Vmag_P * Pnode + coeff_Vmag_Q * Qnode + coeff_Vm
# I = coeff_I_P * Pnode + coeff_I_Q * Qnode + coeff_I_const (complex value)
# ================================================================================================#
return coeff_V_P, coeff_V_Q, coeff_Vm, coeff_Vmag_P, coeff_Vmag_Q, coeff_Vmag_k, coeff_I_P, coeff_I_Q, coeff_I_const
def validate_linear_model(coeff_Vp,coeff_Vq,coeff_Vm,PQ_node,slack_number):
V_cal = coeff_Vm + np.dot(coeff_Vp,np.array([np.real(ii)*1000 for ii in PQ_node[slack_number:]])) + np.dot(coeff_Vq,np.array([np.imag(ii)*1000 for ii in PQ_node[slack_number:]]))
v_cal_1 = coeff_Vm + np.dot(coeff_Vp,np.conj(PQ_node[slack_number:]*1000))
#coeff_Vp*Pnode + coeff_Vq*Qnode + coeff_Vm
# =========================================Yiyun's Notes===========================================#
# 1000 should be the S base
# =================================================================================================#
return [V_cal,v_cal_1]
def check_VI_correct(V1,PQ_node,slack_number,coeff_V,coeff_Vm,coeff_Vmag_P,coeff_Vmag_Q,coeff_Vmag_k,Y10,Y11,coeff_I_P, coeff_I_Q, coeff_I_const,I_coeff):
V1_linear = np.dot(coeff_V,np.conj(PQ_node[slack_number:]*1000)) + coeff_Vm
V1_linear = list(V1_linear)
Vdiff = list(map(lambda x: abs(x[0]-x[1])/abs(x[0])*100,zip(V1[slack_number:],V1_linear)))
print(sum(Vdiff))
with open('voltage_diff.csv','w') as f:
csvwriter = csv.writer(f)
csvwriter.writerow(Vdiff)
f.close()
V1_mag_linear = np.dot(coeff_Vmag_P,(PQ_node[slack_number:]*1000).real) + np.dot(coeff_Vmag_Q,(PQ_node[slack_number:]*1000).imag) + coeff_Vmag_k
V1_mag_linear = list(V1_mag_linear)
Vdiff = list(map(lambda x: abs(abs(x[0])-x[1])/abs(x[0])*100,zip(V1[slack_number:],V1_mag_linear)))
print(sum(Vdiff))
with open('voltageMag_diff.csv','w') as f:
csvwriter = csv.writer(f)
csvwriter.writerow(Vdiff)
f.close()
# get Ibus
Ibus = list(map(lambda x: (x[0]*1000/x[1]).conjugate(),zip(list(PQ_node)[slack_number:],V1[slack_number:])))
Ibus_cal_0 = np.dot(Y10,V1[0:slack_number])
Ibus_cal_1 = np.dot(Y11,V1[slack_number:])
Ibus_cal = list(map(lambda x: x[0]+x[1],zip(Ibus_cal_0,Ibus_cal_1)))
Idiff = list(map(lambda x: abs(x[0]-x[1]),zip(Ibus,Ibus_cal)))
print(sum(Idiff))
with open('currentBus_diff.csv','w') as f:
csvwriter = csv.writer(f)
csvwriter.writerow(Idiff)
f.close()
# get Ibranch
Ibranch = np.dot(I_coeff,V1)
Ibranch_cal = np.dot(I_coeff[:,slack_number:],V1_linear)+np.dot(I_coeff[:,0:slack_number],V1[:slack_number])
Ibranch_diff = list(map(lambda x: abs(x[0]-x[1]),zip(Ibranch,Ibranch_cal)))
print(sum(Ibranch_diff))
with open('current_diff.csv','w') as f:
csvwriter = csv.writer(f)
csvwriter.writerow(Ibranch_diff)
f.close()
def costFun(x,dual_upper,dual_lower,v1_pu,Ppv_max,coeff_p,coeff_q,NPV,control_bus_index,Vupper,Vlower,dual_current,ThermalLimit,I1_mag):
# cost_function = coeff_p*(Pmax-P)^2+coeff_q*Q^2+dual_upper*(v1-1.05)+dual_lower*(0.95-v1)
f1 = 0
for ii in range(NPV):
f1 = f1 + coeff_p*(Ppv_max[ii]-x[ii])*(Ppv_max[ii]-x[ii])+coeff_q*x[ii+NPV]*x[ii+NPV]
#f = f1 + np.dot(dual_upper,(np.array(v1_pu)[control_bus_index]-Vupper)) + np.dot(dual_lower,(Vlower-np.array(v1_pu)[control_bus_index]))
v_evaluate = [v1_pu[ii] for ii in control_bus_index]
f2 = f1 + np.dot(dual_upper,np.array([max(ii-Vupper,0) for ii in v_evaluate])) + np.dot(dual_lower,np.array([max(Vlower-ii,0) for ii in v_evaluate]))
f3 = np.dot(dual_current,np.array([max(ii,0) for ii in list(map(lambda x: x[0]*x[0]-x[1]*x[1],zip(I1_mag,ThermalLimit)))]))
f = f2+f3
# =========================================Yiyun's Notes===========================================#
# f1 is the quadratic PV curtailment plus quadratic reactive power injection
# f2 is the Lagrangian term for voltage violations and line current violations
# ===> Note the "control_bus_index" might be the index for measurement sensitivity analysis
# =================================================================================================#
return [f1,f]
def PV_costFun_gradient(x, coeff_p, coeff_q, Pmax):
grad = np.zeros(len(x))
for ii in range(int(len(x)/2)):
grad[ii] = -2*coeff_p*(Pmax[ii]*1000-x[ii]*1000)
grad[ii+int(len(x)/2)] = 2*coeff_q*x[ii+int(len(x)/2)]*1000
#grad[ii + int(len(x) / 2)] = 0
# =========================================Yiyun's Notes===========================================#
# x is the decision vector [P,Q]
# =================================================================================================#
return grad
def voltage_constraint_gradient(AllNodeNames,node_withPV, dual_upper, dual_lower, coeff_Vmag_p, coeff_Vmag_q):
node_noslackbus = AllNodeNames
node_noslackbus[0:3] = []
# =========================================Yiyun's Notes===========================================#
# remove the slack bus
# =================================================================================================#
grad_upper = np.matrix([0] * len(node_noslackbus)*2).transpose()
grad_lower = np.matrix([0] * len(node_noslackbus)*2).transpose()
count = 0
for node in node_noslackbus:
if node in node_withPV:
grad_upper[count] = dual_upper.transpose()*coeff_Vmag_p[:,count]
grad_upper[count+len(node_noslackbus)] = dual_upper.transpose() * coeff_Vmag_q[:,count]
grad_lower[count] = -dual_lower.transpose() * coeff_Vmag_p[:, count]
grad_lower[count + len(node_noslackbus)] = -dual_lower.transpose() * coeff_Vmag_q[:, count]
count = count + 1
return [grad_upper,grad_lower]
def current_constraint_gradient(AllNodeNames,node_withPV, dual_upper,coeff_Imag_p, coeff_Imag_q):
node_noslackbus = AllNodeNames
node_noslackbus[0:3] = []
grad_upper = np.matrix([0] * len(node_noslackbus)*2).transpose()
count = 0
for node in node_noslackbus:
if node in node_withPV:
grad_upper[count] = dual_upper.transpose()*coeff_Imag_p[:,count]
grad_upper[count+len(node_noslackbus)] = dual_upper.transpose() * coeff_Imag_q[:,count]
count = count + 1
return grad_upper
# =========================================Yiyun's Notes===========================================#
# PV_costFun_gradient, voltage_constraint_gradient, current_constraint_gradient and project_PV..
# ... are set up for updating the PV decision variables in eq(10)
# =================================================================================================#
def voltage_constraint(V1_mag):
g = V1_mag-1.05
g.append(0.95-V1_mag)
return g
def current_constraint(I1_mag,Imax):
g = []
g.append(I1_mag-Imax)
# =========================================Yiyun's Notes===========================================#
# assume single directional power flow
# voltage_constraint, current_constraint, and project_dualvariable are set up for updating the dual...
# ... variables in eq (11)
# =================================================================================================#
return g
def project_dualvariable(mu):
for ii in range(len(mu)):
mu[ii] = max(mu[ii],0)
# =========================================Yiyun's Notes===========================================#
# If the corresponding constraints in primal problem is in canonical form, then dual variable is >=0
# =================================================================================================#
return mu
def project_PV(x,Pmax,Sinv):
Qavailable = 0
Pavailable = 0
num = len(Sinv)
for ii in range(num):
if x[ii] > Pmax[ii]:
x[ii] = Pmax[ii]
elif x[ii] < 0:
x[ii] = 0
if Sinv[ii] > x[ii]:
Qmax = math.sqrt(Sinv[ii]*Sinv[ii]-x[ii]*x[ii])
else:
Qmax = 0
if x[ii+num] > Qmax:
x[ii+num] = Qmax
# elif x[ii + num] < 0:
# x[ii + num] = 0
elif x[ii+num] < -Qmax:
x[ii+num] = -Qmax
Pavailable = Pavailable + Pmax[ii]
Qavailable = Qavailable + Qmax
return [x,Pavailable,Qavailable]
def dual_update(mu,coeff_mu,constraint):
mu_new = mu + coeff_mu*constraint
mu_new = project_dualvariable(mu_new)
# =========================================Yiyun's Notes===========================================#
# normal way for update Lagrangian variable is by the sub-gradient of cost function
# Here is the equation (11) in the draft paper
# =================================================================================================#
return mu_new
def matrix_cal_for_subPower(V0, Y00, Y01, Y11, V1_noload):
diag_V0 = np.matrix([[complex(0, 0)] * 3] * 3)
diag_V0[0, 0] = V0[0]
diag_V0[1, 1] = V0[1]
diag_V0[2, 2] = V0[2]
K = diag_V0 * Y01.conj() * np.linalg.inv(Y11.conj())
g = diag_V0 * Y00.conj() * np.matrix(V0).transpose().conj() + diag_V0 * Y01.conj() * V1_noload.conj()
return[K,g]
def subPower_PQ(V1, PQ_node, K, g):
diag_V1 = np.matrix([[complex(0, 0)] * len(V1)] * len(V1))
for ii in range(len(V1)):
diag_V1[ii, ii] = V1[ii]
M = K * np.linalg.inv(diag_V1)
MR = M.real
MI = M.imag
P0 = g.real + (MR.dot(PQ_node.real)*1000 - MI.dot(PQ_node.imag)*1000)
Q0 = g.imag + (MR.dot(PQ_node.imag)*1000 + MI.dot(PQ_node.real)*1000)
P0 = P0/1000
Q0 = Q0/1000 # convert to kW/kVar
# =========================================Yiyun's Notes===========================================#
# Power injection at substation/feeder head
# =================================================================================================#
return [P0, Q0, M]
def sub_costFun_gradient(x, sub_ref, coeff_sub, sub_measure, M, node_withPV):
grad_a = np.matrix([0] * len(x)).transpose()
grad_b = np.matrix([0] * len(x)).transpose()
grad_c = np.matrix([0] * len(x)).transpose()
MR = M.real
MI = M.imag
count = 0
for node in node_withPV:
grad_a[count] = -MR[0, int(node)]
grad_b[count] = -MR[1, int(node)]
grad_c[count] = -MR[2, int(node)]
grad_a[count + len(node_withPV)] = MI[0, int(node)]
grad_b[count + len(node_withPV)] = MI[1, int(node)]
grad_c[count + len(node_withPV)] = MI[2, int(node)]
count = count + 1
res = coeff_sub * ((sub_measure[0] - sub_ref[0]) *1000* grad_a + (sub_measure[1] - sub_ref[1])*1000 * grad_b
+ (sub_measure[2] - sub_ref[2])*1000 * grad_c)
res = res/1000
return res
def projection(x,xmax,xmin):
for ii in range(len(x)):
if x.item(ii) > xmax[ii]:
x[ii] = xmax[ii]
if x.item(ii) < xmin[ii]:
x[ii] = xmin[ii]
return x
class DERMS:
def __init__(self, pvData,controlbus,controlelem,controlelem_limit,sub_node_names,sub_elem_names):
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# PV_name: names of all PVs in the zone
# PV_size: sizes of all PVs in the zone
# PV_location: busnames of all PVs in the zone
# controlbus: names of all controlled nodes
# sub_node_names: names of all nodes in the zone
# sub_node_names "include" controlbus
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
self.PV_name = pvData["pvName"]
self.PV_location = pvData["pvLocation"]
self.PV_size = pvData["pvSize"]
self.inverter_size = pvData["inverterSize"]
self.control_bus = controlbus
sub_node_names = [ii.upper() for ii in sub_node_names]
self.controlbus_index = [sub_node_names.index(ii.upper()) for ii in controlbus] # control bus index in the sub system (number)
# here
PVbus_index = []
for bus in self.PV_location:
temp = bus.split('.')
if len(temp) == 1:
temp = temp + ['1', '2', '3']
for ii in range(len(temp) - 1):
PVbus_index.append(sub_node_names.index((temp[0] + '.' + temp[ii + 1]).upper()))
# =========================================Yiyun's Notes===========================================#
# adding .1 .2 .3 following the number to recognize the three phases.
# =================================================================================================#
self.PVbus_index = PVbus_index
self.control_elem = controlelem
self.controlelem_limit = controlelem_limit
self.controlelem_index = [sub_elem_names.index(ii) for ii in controlelem] # control branches index in the sub system (number)
def monitor(self, dss, dssObjects, PVSystem_1phase):
PVpowers = []
for pv in PVSystem_1phase["Name"].tolist():
nPhases = dssObjects["Generators"][pv].GetValue("phases")
power = dssObjects["Generators"][pv].GetValue("Powers")
PVpowers.append([sum(power[::2])/nPhases, sum(power[1::2])/nPhases])
PVpowers = np.asarray(PVpowers)
Vmes = []
for bus in self.control_bus:
busName = bus.split('.')[0].lower()
Vmag = dssObjects["Buses"][busName].GetValue("puVmagAngle")[::2]
allbusnode = dss.Bus.Nodes()
phase = bus.split('.')[1]
index = allbusnode.index(int(phase))
Vnode = Vmag[index]
Vmes.append(Vnode)
Imes = []
for elem in self.control_elem:
className = elem.split('.')[0] + "s"
I = dssObjects[className][elem].GetValue("CurrentsMagAng")[::2][:3] #TODO: Why is there a hardcoded [:3] ?
Imes.append(I)
return [self.PV_location,PVpowers,Vmes,Imes]
def control(self, linear_PF_coeff, Options,stepsize,mu0,Vlimit,PVpower,Imes,Vmes,PV_Pmax_forecast):
coeff_p = Options["coeff_p"]
coeff_q = Options["coeff_q"]
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# linear_PF_coeff is the linear power flow model coefficients for the zone, and linear power flow model
# coefficients are the result vector from function "linear_powerflow_model"
# coeff_p, coeff_q are constant coefficients in PV cost function
# stepsize is a vector of stepsize constants
# mu0 is the dual variable from last time step: mu_Vmag_upper0, mu_Vmag_lower0, mu_I0
# Vlimit is the allowed voltage limit: Vupper and Vlower
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PVname = self.PV_name
NPV = len(PVname)
x0 = np.zeros(2 * NPV)
for ii in range(NPV):
x0[ii] = -PVpower[ii][0] # in kW
x0[ii + NPV] = -PVpower[ii][1] # in kVar
#coeff_V_P = linear_PF_coeff[0]
#coeff_V_Q = linear_PF_coeff[1]
#coeff_Vm = linear_PF_coeff[2]
coeff_Vmag_P = linear_PF_coeff[3]
coeff_Vmag_Q = linear_PF_coeff[4]
#coeff_Vmag_k = linear_PF_coeff[5]
coeff_I_P = linear_PF_coeff[6]
coeff_I_Q = linear_PF_coeff[7]
#coeff_I_const = linear_PF_coeff[8]
stepsize_xp = stepsize[0]
stepsize_xq = stepsize[1]
stepsize_mu = stepsize[2]
Vupper = Vlimit[0]
Vlower = Vlimit[1]
controlbus_index = self.controlbus_index
PVbus_index = self.PVbus_index
controlelem_index = self.controlelem_index
PV_inverter_size = self.inverter_size
Imes_limit = self.controlelem_limit
mu_Vmag_upper0 = mu0[0]
mu_Vmag_lower0 = mu0[1]
mu_I0 = mu0[2]
#print([max(mu_Vmag_upper0),max(mu_Vmag_lower0)])
# compute gradient
PVcost_fun_gradient = PV_costFun_gradient(x0, coeff_p, coeff_q, PV_Pmax_forecast)
Vmag_upper_gradient = np.concatenate((np.dot(coeff_Vmag_P[np.ix_([ii for ii in controlbus_index],[ii for ii in PVbus_index])].transpose(), mu_Vmag_upper0),
np.dot(coeff_Vmag_Q[np.ix_([ii for ii in controlbus_index], [ii for ii in PVbus_index])].transpose(), mu_Vmag_upper0)),axis=0)
Vmag_lower_gradient = np.concatenate((np.dot(coeff_Vmag_P[np.ix_([ii for ii in controlbus_index],[ii for ii in PVbus_index])].transpose(), mu_Vmag_lower0),
np.dot(coeff_Vmag_Q[np.ix_([ii for ii in controlbus_index],[ii for ii in PVbus_index])].transpose(), mu_Vmag_lower0)),axis=0)
Vmag_gradient = Vmag_upper_gradient - Vmag_lower_gradient
if len(mu_I0)>0 :
temp_real = mu_I0 * np.array(Imes.real)
temp_imag = mu_I0 * np.array(Imes.imag)
I_gradient_real = np.concatenate((np.dot(
coeff_I_P[np.ix_([ii for ii in controlelem_index], [ii for ii in PVbus_index])].real.transpose(),
temp_real), np.dot(
coeff_I_Q[np.ix_([ii for ii in controlelem_index], [ii for ii in PVbus_index])].real.transpose(),
temp_real)), axis=0)
I_gradient_imag = np.concatenate((np.dot(
coeff_I_P[np.ix_([ii for ii in controlelem_index], [ii for ii in PVbus_index])].imag.transpose(),
temp_imag), np.dot(
coeff_I_Q[np.ix_([ii for ii in controlelem_index], [ii for ii in PVbus_index])].imag.transpose(),
temp_imag)), axis=0)
I_gradient = 2 * I_gradient_real + 2 * I_gradient_imag
else:
I_gradient = 0
gradient = PVcost_fun_gradient + Vmag_gradient + I_gradient / 1000
# compute x1, mu1
x1 = np.concatenate([x0[:NPV] - stepsize_xp * gradient[:NPV], x0[NPV:] - stepsize_xq * gradient[NPV:]])
#print('solved: '+str(sum(x1[0:NPV]))+','+str(sum(x1[NPV:]))) # in kW/kVar
[x1, Pmax_allPV, Qmax_allPV] = project_PV(x1, PV_Pmax_forecast, PV_inverter_size)
#print('Available P = '+str(Pmax_allPV)+' , Available Q = '+str(Qmax_allPV))
#print('projected: ' + str(sum(x1[0:NPV])) + ',' + str(sum(x1[NPV:]))) # in kW/kVar
x1 = np.array([round(ii, 5) for ii in x1])
mu_Vmag_lower1 = mu_Vmag_lower0 + stepsize_mu * (Vlower - np.array(Vmes))
mu_Vmag_upper1 = mu_Vmag_upper0 + stepsize_mu * (np.array(Vmes) - Vupper)
mu_Vmag_lower1 = project_dualvariable(mu_Vmag_lower1)
mu_Vmag_upper1 = project_dualvariable(mu_Vmag_upper1)
if mu_I0:
mu_I1 = mu_I0 + stepsize_mu / 300 * np.array(list(map(lambda x: x[0] * x[0] - x[1] * x[1], zip(Imes, Imes_limit))))
mu_I1 = project_dualvariable(mu_I1)
else:
mu_I1 = mu_I0
mu1 = [mu_Vmag_upper1,mu_Vmag_lower1,mu_I1]
# =========================================Yiyun's Notes===========================================#
# Each time of calling DERMS.control, it is a one step update of PV real and reactive power outputs
# =================================================================================================#
return [x1,mu1]
| 45.686667 | 182 | 0.555329 | import numpy as np
from scipy.sparse import lil_matrix
import scipy.sparse.linalg as sp
import scipy.sparse as sparse
import math
import csv
import matplotlib.pyplot as plt
def linear_powerflow_model(Y00,Y01,Y10,Y11_inv,I_coeff,V1,slack_no):
V1_conj = np.conj(V1[slack_no:])
V1_conj_inv = 1 / V1_conj
coeff_V = Y11_inv * V1_conj_inv
coeff_V_P = coeff_V
coeff_V_Q = -1j*coeff_V
coeff_Vm = -np.dot(Y11_inv,np.dot(Y10,V1[:slack_no]))
m = coeff_Vm
m_inv = 1 / coeff_Vm
coeff_Vmag_k = abs(m)
A = (np.multiply(coeff_V.transpose(),m_inv)).transpose()
coeff_Vmag_P = (np.multiply(A.real.transpose(),coeff_Vmag_k)).transpose()
coeff_Vmag_Q = (np.multiply((-1j*A).real.transpose(),coeff_Vmag_k)).transpose()
if len(I_coeff):
coeff_I_P = np.dot(I_coeff[:,slack_no:],coeff_V_P)
coeff_I_Q = np.dot(I_coeff[:,slack_no:],coeff_V_Q)
coeff_I_const = np.dot(I_coeff[:,slack_no:],coeff_Vm) + np.dot(I_coeff[:,:slack_no],V1[:slack_no])
else:
coeff_I_P = []
coeff_I_Q = []
coeff_I_const = []
# Output relations: Vmag = coeff_Vmag_P * Pnode + coeff_Vmag_Q * Qnode + coeff_Vm
# I = coeff_I_P * Pnode + coeff_I_Q * Qnode + coeff_I_const (complex value)
# ================================================================================================#
return coeff_V_P, coeff_V_Q, coeff_Vm, coeff_Vmag_P, coeff_Vmag_Q, coeff_Vmag_k, coeff_I_P, coeff_I_Q, coeff_I_const
def validate_linear_model(coeff_Vp,coeff_Vq,coeff_Vm,PQ_node,slack_number):
V_cal = coeff_Vm + np.dot(coeff_Vp,np.array([np.real(ii)*1000 for ii in PQ_node[slack_number:]])) + np.dot(coeff_Vq,np.array([np.imag(ii)*1000 for ii in PQ_node[slack_number:]]))
v_cal_1 = coeff_Vm + np.dot(coeff_Vp,np.conj(PQ_node[slack_number:]*1000))
#coeff_Vp*Pnode + coeff_Vq*Qnode + coeff_Vm
# =========================================Yiyun's Notes===========================================
return [V_cal,v_cal_1]
def check_VI_correct(V1,PQ_node,slack_number,coeff_V,coeff_Vm,coeff_Vmag_P,coeff_Vmag_Q,coeff_Vmag_k,Y10,Y11,coeff_I_P, coeff_I_Q, coeff_I_const,I_coeff):
V1_linear = np.dot(coeff_V,np.conj(PQ_node[slack_number:]*1000)) + coeff_Vm
V1_linear = list(V1_linear)
Vdiff = list(map(lambda x: abs(x[0]-x[1])/abs(x[0])*100,zip(V1[slack_number:],V1_linear)))
print(sum(Vdiff))
with open('voltage_diff.csv','w') as f:
csvwriter = csv.writer(f)
csvwriter.writerow(Vdiff)
f.close()
V1_mag_linear = np.dot(coeff_Vmag_P,(PQ_node[slack_number:]*1000).real) + np.dot(coeff_Vmag_Q,(PQ_node[slack_number:]*1000).imag) + coeff_Vmag_k
V1_mag_linear = list(V1_mag_linear)
Vdiff = list(map(lambda x: abs(abs(x[0])-x[1])/abs(x[0])*100,zip(V1[slack_number:],V1_mag_linear)))
print(sum(Vdiff))
with open('voltageMag_diff.csv','w') as f:
csvwriter = csv.writer(f)
csvwriter.writerow(Vdiff)
f.close()
Ibus = list(map(lambda x: (x[0]*1000/x[1]).conjugate(),zip(list(PQ_node)[slack_number:],V1[slack_number:])))
Ibus_cal_0 = np.dot(Y10,V1[0:slack_number])
Ibus_cal_1 = np.dot(Y11,V1[slack_number:])
Ibus_cal = list(map(lambda x: x[0]+x[1],zip(Ibus_cal_0,Ibus_cal_1)))
Idiff = list(map(lambda x: abs(x[0]-x[1]),zip(Ibus,Ibus_cal)))
print(sum(Idiff))
with open('currentBus_diff.csv','w') as f:
csvwriter = csv.writer(f)
csvwriter.writerow(Idiff)
f.close()
Ibranch = np.dot(I_coeff,V1)
Ibranch_cal = np.dot(I_coeff[:,slack_number:],V1_linear)+np.dot(I_coeff[:,0:slack_number],V1[:slack_number])
Ibranch_diff = list(map(lambda x: abs(x[0]-x[1]),zip(Ibranch,Ibranch_cal)))
print(sum(Ibranch_diff))
with open('current_diff.csv','w') as f:
csvwriter = csv.writer(f)
csvwriter.writerow(Ibranch_diff)
f.close()
def costFun(x,dual_upper,dual_lower,v1_pu,Ppv_max,coeff_p,coeff_q,NPV,control_bus_index,Vupper,Vlower,dual_current,ThermalLimit,I1_mag):
f1 = 0
for ii in range(NPV):
f1 = f1 + coeff_p*(Ppv_max[ii]-x[ii])*(Ppv_max[ii]-x[ii])+coeff_q*x[ii+NPV]*x[ii+NPV]
v_evaluate = [v1_pu[ii] for ii in control_bus_index]
f2 = f1 + np.dot(dual_upper,np.array([max(ii-Vupper,0) for ii in v_evaluate])) + np.dot(dual_lower,np.array([max(Vlower-ii,0) for ii in v_evaluate]))
f3 = np.dot(dual_current,np.array([max(ii,0) for ii in list(map(lambda x: x[0]*x[0]-x[1]*x[1],zip(I1_mag,ThermalLimit)))]))
f = f2+f3
# f1 is the quadratic PV curtailment plus quadratic reactive power injection
# f2 is the Lagrangian term for voltage violations and line current violations
# ===> Note the "control_bus_index" might be the index for measurement sensitivity analysis
# =================================================================================================#
return [f1,f]
def PV_costFun_gradient(x, coeff_p, coeff_q, Pmax):
grad = np.zeros(len(x))
for ii in range(int(len(x)/2)):
grad[ii] = -2*coeff_p*(Pmax[ii]*1000-x[ii]*1000)
grad[ii+int(len(x)/2)] = 2*coeff_q*x[ii+int(len(x)/2)]*1000
#grad[ii + int(len(x) / 2)] = 0
# =========================================Yiyun's Notes===========================================
return grad
def voltage_constraint_gradient(AllNodeNames,node_withPV, dual_upper, dual_lower, coeff_Vmag_p, coeff_Vmag_q):
node_noslackbus = AllNodeNames
node_noslackbus[0:3] = []
# remove the slack bus
# =================================================================================================#
grad_upper = np.matrix([0] * len(node_noslackbus)*2).transpose()
grad_lower = np.matrix([0] * len(node_noslackbus)*2).transpose()
count = 0
for node in node_noslackbus:
if node in node_withPV:
grad_upper[count] = dual_upper.transpose()*coeff_Vmag_p[:,count]
grad_upper[count+len(node_noslackbus)] = dual_upper.transpose() * coeff_Vmag_q[:,count]
grad_lower[count] = -dual_lower.transpose() * coeff_Vmag_p[:, count]
grad_lower[count + len(node_noslackbus)] = -dual_lower.transpose() * coeff_Vmag_q[:, count]
count = count + 1
return [grad_upper,grad_lower]
def current_constraint_gradient(AllNodeNames,node_withPV, dual_upper,coeff_Imag_p, coeff_Imag_q):
node_noslackbus = AllNodeNames
node_noslackbus[0:3] = []
grad_upper = np.matrix([0] * len(node_noslackbus)*2).transpose()
count = 0
for node in node_noslackbus:
if node in node_withPV:
grad_upper[count] = dual_upper.transpose()*coeff_Imag_p[:,count]
grad_upper[count+len(node_noslackbus)] = dual_upper.transpose() * coeff_Imag_q[:,count]
count = count + 1
return grad_upper
# =========================================Yiyun's Notes===========================================
def voltage_constraint(V1_mag):
g = V1_mag-1.05
g.append(0.95-V1_mag)
return g
def current_constraint(I1_mag,Imax):
g = []
g.append(I1_mag-Imax)
# assume single directional power flow
# voltage_constraint, current_constraint, and project_dualvariable are set up for updating the dual...
# ... variables in eq (11)
# =================================================================================================#
return g
def project_dualvariable(mu):
for ii in range(len(mu)):
mu[ii] = max(mu[ii],0)
# =========================================Yiyun's Notes===========================================
return mu
def project_PV(x,Pmax,Sinv):
Qavailable = 0
Pavailable = 0
num = len(Sinv)
for ii in range(num):
if x[ii] > Pmax[ii]:
x[ii] = Pmax[ii]
elif x[ii] < 0:
x[ii] = 0
if Sinv[ii] > x[ii]:
Qmax = math.sqrt(Sinv[ii]*Sinv[ii]-x[ii]*x[ii])
else:
Qmax = 0
if x[ii+num] > Qmax:
x[ii+num] = Qmax
elif x[ii+num] < -Qmax:
x[ii+num] = -Qmax
Pavailable = Pavailable + Pmax[ii]
Qavailable = Qavailable + Qmax
return [x,Pavailable,Qavailable]
def dual_update(mu,coeff_mu,constraint):
mu_new = mu + coeff_mu*constraint
mu_new = project_dualvariable(mu_new)
# normal way for update Lagrangian variable is by the sub-gradient of cost function
# Here is the equation (11) in the draft paper
# =================================================================================================#
return mu_new
def matrix_cal_for_subPower(V0, Y00, Y01, Y11, V1_noload):
diag_V0 = np.matrix([[complex(0, 0)] * 3] * 3)
diag_V0[0, 0] = V0[0]
diag_V0[1, 1] = V0[1]
diag_V0[2, 2] = V0[2]
K = diag_V0 * Y01.conj() * np.linalg.inv(Y11.conj())
g = diag_V0 * Y00.conj() * np.matrix(V0).transpose().conj() + diag_V0 * Y01.conj() * V1_noload.conj()
return[K,g]
def subPower_PQ(V1, PQ_node, K, g):
diag_V1 = np.matrix([[complex(0, 0)] * len(V1)] * len(V1))
for ii in range(len(V1)):
diag_V1[ii, ii] = V1[ii]
M = K * np.linalg.inv(diag_V1)
MR = M.real
MI = M.imag
P0 = g.real + (MR.dot(PQ_node.real)*1000 - MI.dot(PQ_node.imag)*1000)
Q0 = g.imag + (MR.dot(PQ_node.imag)*1000 + MI.dot(PQ_node.real)*1000)
P0 = P0/1000
Q0 = Q0/1000 # convert to kW/kVar
# =========================================Yiyun's Notes===========================================
return [P0, Q0, M]
def sub_costFun_gradient(x, sub_ref, coeff_sub, sub_measure, M, node_withPV):
grad_a = np.matrix([0] * len(x)).transpose()
grad_b = np.matrix([0] * len(x)).transpose()
grad_c = np.matrix([0] * len(x)).transpose()
MR = M.real
MI = M.imag
count = 0
for node in node_withPV:
grad_a[count] = -MR[0, int(node)]
grad_b[count] = -MR[1, int(node)]
grad_c[count] = -MR[2, int(node)]
grad_a[count + len(node_withPV)] = MI[0, int(node)]
grad_b[count + len(node_withPV)] = MI[1, int(node)]
grad_c[count + len(node_withPV)] = MI[2, int(node)]
count = count + 1
res = coeff_sub * ((sub_measure[0] - sub_ref[0]) *1000* grad_a + (sub_measure[1] - sub_ref[1])*1000 * grad_b
+ (sub_measure[2] - sub_ref[2])*1000 * grad_c)
res = res/1000
return res
def projection(x,xmax,xmin):
for ii in range(len(x)):
if x.item(ii) > xmax[ii]:
x[ii] = xmax[ii]
if x.item(ii) < xmin[ii]:
x[ii] = xmin[ii]
return x
class DERMS:
def __init__(self, pvData,controlbus,controlelem,controlelem_limit,sub_node_names,sub_elem_names):
self.PV_name = pvData["pvName"]
self.PV_location = pvData["pvLocation"]
self.PV_size = pvData["pvSize"]
self.inverter_size = pvData["inverterSize"]
self.control_bus = controlbus
sub_node_names = [ii.upper() for ii in sub_node_names]
self.controlbus_index = [sub_node_names.index(ii.upper()) for ii in controlbus]
PVbus_index = []
for bus in self.PV_location:
temp = bus.split('.')
if len(temp) == 1:
temp = temp + ['1', '2', '3']
for ii in range(len(temp) - 1):
PVbus_index.append(sub_node_names.index((temp[0] + '.' + temp[ii + 1]).upper()))
# adding .1 .2 .3 following the number to recognize the three phases.
# =================================================================================================#
self.PVbus_index = PVbus_index
self.control_elem = controlelem
self.controlelem_limit = controlelem_limit
self.controlelem_index = [sub_elem_names.index(ii) for ii in controlelem] # control branches index in the sub system (number)
def monitor(self, dss, dssObjects, PVSystem_1phase):
PVpowers = []
for pv in PVSystem_1phase["Name"].tolist():
nPhases = dssObjects["Generators"][pv].GetValue("phases")
power = dssObjects["Generators"][pv].GetValue("Powers")
PVpowers.append([sum(power[::2])/nPhases, sum(power[1::2])/nPhases])
PVpowers = np.asarray(PVpowers)
Vmes = []
for bus in self.control_bus:
busName = bus.split('.')[0].lower()
Vmag = dssObjects["Buses"][busName].GetValue("puVmagAngle")[::2]
allbusnode = dss.Bus.Nodes()
phase = bus.split('.')[1]
index = allbusnode.index(int(phase))
Vnode = Vmag[index]
Vmes.append(Vnode)
Imes = []
for elem in self.control_elem:
className = elem.split('.')[0] + "s"
I = dssObjects[className][elem].GetValue("CurrentsMagAng")[::2][:3] #TODO: Why is there a hardcoded [:3] ?
Imes.append(I)
return [self.PV_location,PVpowers,Vmes,Imes]
def control(self, linear_PF_coeff, Options,stepsize,mu0,Vlimit,PVpower,Imes,Vmes,PV_Pmax_forecast):
coeff_p = Options["coeff_p"]
coeff_q = Options["coeff_q"]
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# linear_PF_coeff is the linear power flow model coefficients for the zone, and linear power flow model
# coefficients are the result vector from function "linear_powerflow_model"
# coeff_p, coeff_q are constant coefficients in PV cost function
# stepsize is a vector of stepsize constants
# mu0 is the dual variable from last time step: mu_Vmag_upper0, mu_Vmag_lower0, mu_I0
# Vlimit is the allowed voltage limit: Vupper and Vlower
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PVname = self.PV_name
NPV = len(PVname)
x0 = np.zeros(2 * NPV)
for ii in range(NPV):
x0[ii] = -PVpower[ii][0] # in kW
x0[ii + NPV] = -PVpower[ii][1] # in kVar
#coeff_V_P = linear_PF_coeff[0]
#coeff_V_Q = linear_PF_coeff[1]
#coeff_Vm = linear_PF_coeff[2]
coeff_Vmag_P = linear_PF_coeff[3]
coeff_Vmag_Q = linear_PF_coeff[4]
#coeff_Vmag_k = linear_PF_coeff[5]
coeff_I_P = linear_PF_coeff[6]
coeff_I_Q = linear_PF_coeff[7]
#coeff_I_const = linear_PF_coeff[8]
stepsize_xp = stepsize[0]
stepsize_xq = stepsize[1]
stepsize_mu = stepsize[2]
Vupper = Vlimit[0]
Vlower = Vlimit[1]
controlbus_index = self.controlbus_index
PVbus_index = self.PVbus_index
controlelem_index = self.controlelem_index
PV_inverter_size = self.inverter_size
Imes_limit = self.controlelem_limit
mu_Vmag_upper0 = mu0[0]
mu_Vmag_lower0 = mu0[1]
mu_I0 = mu0[2]
#print([max(mu_Vmag_upper0),max(mu_Vmag_lower0)])
# compute gradient
PVcost_fun_gradient = PV_costFun_gradient(x0, coeff_p, coeff_q, PV_Pmax_forecast)
Vmag_upper_gradient = np.concatenate((np.dot(coeff_Vmag_P[np.ix_([ii for ii in controlbus_index],[ii for ii in PVbus_index])].transpose(), mu_Vmag_upper0),
np.dot(coeff_Vmag_Q[np.ix_([ii for ii in controlbus_index], [ii for ii in PVbus_index])].transpose(), mu_Vmag_upper0)),axis=0)
Vmag_lower_gradient = np.concatenate((np.dot(coeff_Vmag_P[np.ix_([ii for ii in controlbus_index],[ii for ii in PVbus_index])].transpose(), mu_Vmag_lower0),
np.dot(coeff_Vmag_Q[np.ix_([ii for ii in controlbus_index],[ii for ii in PVbus_index])].transpose(), mu_Vmag_lower0)),axis=0)
Vmag_gradient = Vmag_upper_gradient - Vmag_lower_gradient
if len(mu_I0)>0 :
temp_real = mu_I0 * np.array(Imes.real)
temp_imag = mu_I0 * np.array(Imes.imag)
I_gradient_real = np.concatenate((np.dot(
coeff_I_P[np.ix_([ii for ii in controlelem_index], [ii for ii in PVbus_index])].real.transpose(),
temp_real), np.dot(
coeff_I_Q[np.ix_([ii for ii in controlelem_index], [ii for ii in PVbus_index])].real.transpose(),
temp_real)), axis=0)
I_gradient_imag = np.concatenate((np.dot(
coeff_I_P[np.ix_([ii for ii in controlelem_index], [ii for ii in PVbus_index])].imag.transpose(),
temp_imag), np.dot(
coeff_I_Q[np.ix_([ii for ii in controlelem_index], [ii for ii in PVbus_index])].imag.transpose(),
temp_imag)), axis=0)
I_gradient = 2 * I_gradient_real + 2 * I_gradient_imag
else:
I_gradient = 0
gradient = PVcost_fun_gradient + Vmag_gradient + I_gradient / 1000
# compute x1, mu1
x1 = np.concatenate([x0[:NPV] - stepsize_xp * gradient[:NPV], x0[NPV:] - stepsize_xq * gradient[NPV:]])
#print('solved: '+str(sum(x1[0:NPV]))+','+str(sum(x1[NPV:]))) # in kW/kVar
[x1, Pmax_allPV, Qmax_allPV] = project_PV(x1, PV_Pmax_forecast, PV_inverter_size)
#print('Available P = '+str(Pmax_allPV)+' , Available Q = '+str(Qmax_allPV))
#print('projected: ' + str(sum(x1[0:NPV])) + ',' + str(sum(x1[NPV:]))) # in kW/kVar
x1 = np.array([round(ii, 5) for ii in x1])
mu_Vmag_lower1 = mu_Vmag_lower0 + stepsize_mu * (Vlower - np.array(Vmes))
mu_Vmag_upper1 = mu_Vmag_upper0 + stepsize_mu * (np.array(Vmes) - Vupper)
mu_Vmag_lower1 = project_dualvariable(mu_Vmag_lower1)
mu_Vmag_upper1 = project_dualvariable(mu_Vmag_upper1)
if mu_I0:
mu_I1 = mu_I0 + stepsize_mu / 300 * np.array(list(map(lambda x: x[0] * x[0] - x[1] * x[1], zip(Imes, Imes_limit))))
mu_I1 = project_dualvariable(mu_I1)
else:
mu_I1 = mu_I0
mu1 = [mu_Vmag_upper1,mu_Vmag_lower1,mu_I1]
# =========================================Yiyun's Notes===========================================
return [x1,mu1]
| true | true |
f7274bbaa9b6a7c957dcc7b0ce646d02630be40a | 956 | py | Python | link_lang_spacy.py | bothub-it/bothub-nlp-ai-platform | 94f1fae57b8e81ed5f71839df6d47b1ee0df53f6 | [
"MIT"
] | null | null | null | link_lang_spacy.py | bothub-it/bothub-nlp-ai-platform | 94f1fae57b8e81ed5f71839df6d47b1ee0df53f6 | [
"MIT"
] | 2 | 2020-06-23T13:57:20.000Z | 2022-02-09T23:39:15.000Z | link_lang_spacy.py | bothub-it/bothub-nlp-ai-platform | 94f1fae57b8e81ed5f71839df6d47b1ee0df53f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import plac
import importlib
from pathlib import Path
from spacy.util import get_package_path
from spacy.compat import symlink_to
@plac.annotations(
lang=plac.Annotation(help='Language code'),
lang_path=plac.Annotation(help='Language path'))
def link_lang_spacy(lang, lang_path):
origin_path = os.path.join(
str(get_package_path('spacy').resolve()),
'lang',
lang,
)
try:
symlink_to(
Path(origin_path),
os.path.abspath(lang_path),
)
try:
importlib.import_module('spacy.lang.{}'.format(lang))
print('link created')
except Exception as e:
print('link not created')
raise e
except Exception as e:
print('error to create link to {} from {}'.format(lang, lang_path))
raise e
if __name__ == '__main__':
plac.call(link_lang_spacy, sys.argv[1:]) | 25.157895 | 75 | 0.623431 |
import os
import sys
import plac
import importlib
from pathlib import Path
from spacy.util import get_package_path
from spacy.compat import symlink_to
@plac.annotations(
lang=plac.Annotation(help='Language code'),
lang_path=plac.Annotation(help='Language path'))
def link_lang_spacy(lang, lang_path):
origin_path = os.path.join(
str(get_package_path('spacy').resolve()),
'lang',
lang,
)
try:
symlink_to(
Path(origin_path),
os.path.abspath(lang_path),
)
try:
importlib.import_module('spacy.lang.{}'.format(lang))
print('link created')
except Exception as e:
print('link not created')
raise e
except Exception as e:
print('error to create link to {} from {}'.format(lang, lang_path))
raise e
if __name__ == '__main__':
plac.call(link_lang_spacy, sys.argv[1:]) | true | true |
f7274bcbf40683a5d160d96b2f06a72cde94327d | 4,927 | py | Python | backend/DankiBackEnd/settings.py | danielpassy/Translang-Deck | 60057dd4eecc929682bb5d154656380b05d040c5 | [
"MIT"
] | 1 | 2020-12-29T16:00:13.000Z | 2020-12-29T16:00:13.000Z | backend/DankiBackEnd/settings.py | danielpassy/Translang-Deck | 60057dd4eecc929682bb5d154656380b05d040c5 | [
"MIT"
] | 8 | 2020-12-08T23:20:01.000Z | 2021-01-28T22:23:22.000Z | backend/DankiBackEnd/settings.py | danielpassy/Translang-Deck | 60057dd4eecc929682bb5d154656380b05d040c5 | [
"MIT"
] | 1 | 2020-12-08T23:38:49.000Z | 2020-12-08T23:38:49.000Z | """
Django settings for DankiBackEnd project.
Generated by 'django-admin startproject' using Django 3.1.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib import Path
from os import path, getcwd
import os
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get(
"SECRET_KEY", "(ac&ri0xuv9_!o#$$=$g#po&mkasdasdqwejqpoweaqaky-glk+vi^^!ka9f8%+$7"
)
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ["translang.live", "www.translang.live", "localhost"]
# ALLOWED_HOSTS_ENV = os.environ.get('ALLOWED_HOST')
# Application definition
INSTALLED_APPS = [
"rest_framework",
"rest_framework.authtoken",
"backend",
# default apps
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
]
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
ROOT_URLCONF = "DankiBackEnd.urls"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
],
},
},
]
WSGI_APPLICATION = "DankiBackEnd.wsgi.application"
APPEND_SLASH = False
# logs
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"root": {"level": "INFO", "handlers": ["file"]},
"handlers": {
"file": {
"level": "INFO",
"class": "logging.FileHandler",
"filename": "C:/Users/Daniel/Documents/Apps/Anki_Card_Builder/Translang-Deck/backend/logs/django.log",
"formatter": "app",
},
"console": {
"level": "DEBUG",
"class": "logging.StreamHandler",
},
},
"loggers": {
"backend.views": {
"handlers": ["file", "console"],
"level": "INFO",
"propagate": True,
},
# "django": {
# "handlers": ["console"],
# "level": "INFO",
# "level": "DEBUG",
# },
},
"formatters": {
"app": {
"format": (
u"%(asctime)s [%(levelname)-8s] "
"(%(module)s.%(funcName)s) %(message)s"
),
"datefmt": "%Y-%m-%d %H:%M:%S",
},
},
}
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
},
{
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
},
]
REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": [
# 'rest_framework.authentication.TokenAuthentication'
],
"DEFAULT_PARSER_CLASSES": [
"rest_framework.parsers.JSONParser",
"rest_framework.parsers.MultiPartParser",
],
}
# Internationalization
# https://docs.djangoproject.com/en/3.1/topics/i18n/
LANGUAGE_CODE = "en-us"
TIME_ZONE = "UTC"
USE_I18N = True
USE_L10N = True
USE_TZ = True
AUTH_USER_MODEL = "backend.User"
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/
MEDIA_ROOT = path.join(BASE_DIR, "decks/", "outputdeck/")
STATIC_ROOT = path.join(BASE_DIR, "static/")
STATICFILE_DIRS = (path.join(BASE_DIR, "static/"),)
MEDIA_URL = "/decks/"
STATIC_URL = "/static/"
| 26.632432 | 114 | 0.635681 |
from pathlib import Path
from os import path, getcwd
import os
BASE_DIR = Path(__file__).resolve(strict=True).parent.parent
SECRET_KEY = os.environ.get(
"SECRET_KEY", "(ac&ri0xuv9_!o#$$=$g#po&mkasdasdqwejqpoweaqaky-glk+vi^^!ka9f8%+$7"
)
DEBUG = True
ALLOWED_HOSTS = ["translang.live", "www.translang.live", "localhost"]
# ALLOWED_HOSTS_ENV = os.environ.get('ALLOWED_HOST')
# Application definition
INSTALLED_APPS = [
"rest_framework",
"rest_framework.authtoken",
"backend",
# default apps
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
]
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
ROOT_URLCONF = "DankiBackEnd.urls"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [],
"APP_DIRS": True,
"OPTIONS": {
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
"django.contrib.auth.context_processors.auth",
"django.contrib.messages.context_processors.messages",
],
},
},
]
WSGI_APPLICATION = "DankiBackEnd.wsgi.application"
APPEND_SLASH = False
# logs
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"root": {"level": "INFO", "handlers": ["file"]},
"handlers": {
"file": {
"level": "INFO",
"class": "logging.FileHandler",
"filename": "C:/Users/Daniel/Documents/Apps/Anki_Card_Builder/Translang-Deck/backend/logs/django.log",
"formatter": "app",
},
"console": {
"level": "DEBUG",
"class": "logging.StreamHandler",
},
},
"loggers": {
"backend.views": {
"handlers": ["file", "console"],
"level": "INFO",
"propagate": True,
},
# "django": {
# "handlers": ["console"],
# "level": "INFO",
# "level": "DEBUG",
# },
},
"formatters": {
"app": {
"format": (
u"%(asctime)s [%(levelname)-8s] "
"(%(module)s.%(funcName)s) %(message)s"
),
"datefmt": "%Y-%m-%d %H:%M:%S",
},
},
}
# Database
# https://docs.djangoproject.com/en/3.1/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
},
{
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
},
{
"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",
},
{
"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",
},
]
REST_FRAMEWORK = {
"DEFAULT_AUTHENTICATION_CLASSES": [
# 'rest_framework.authentication.TokenAuthentication'
],
"DEFAULT_PARSER_CLASSES": [
"rest_framework.parsers.JSONParser",
"rest_framework.parsers.MultiPartParser",
],
}
# Internationalization
# https://docs.djangoproject.com/en/3.1/topics/i18n/
LANGUAGE_CODE = "en-us"
TIME_ZONE = "UTC"
USE_I18N = True
USE_L10N = True
USE_TZ = True
AUTH_USER_MODEL = "backend.User"
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.1/howto/static-files/
MEDIA_ROOT = path.join(BASE_DIR, "decks/", "outputdeck/")
STATIC_ROOT = path.join(BASE_DIR, "static/")
STATICFILE_DIRS = (path.join(BASE_DIR, "static/"),)
MEDIA_URL = "/decks/"
STATIC_URL = "/static/"
| true | true |
f7274bf22c6d405fafa87ecd7084bc1ec5559d84 | 4,583 | py | Python | examples/amac/fund_spider.py | acracker/ruia | b973a47270f72cc16344ac203c00ee4f6d835c04 | [
"MIT"
] | null | null | null | examples/amac/fund_spider.py | acracker/ruia | b973a47270f72cc16344ac203c00ee4f6d835c04 | [
"MIT"
] | null | null | null | examples/amac/fund_spider.py | acracker/ruia | b973a47270f72cc16344ac203c00ee4f6d835c04 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019-01-17 13:49
# @Author : pang
# @File : fund.py
# @Software: PyCharm
import datetime
import os
import asyncio
import re
import logging
import time
import random
import aiohttp
from motor.motor_asyncio import AsyncIOMotorClient
from ruia import Request, Spider, Response
try:
from items import FundInfoItemV1
from settings import *
except ImportError:
import sys
sys.path[0] = os.path.dirname(os.path.abspath(__file__))
from items import FundInfoItemV1
from settings import *
# http://gs.amac.org.cn/amac-infodisc/api/pof/fund?rand=0.03935877331629101&page=0&size=20
"""
从协会网站抓取所有基金基本信息, 不包括扩展信息.
"""
class FundSpider(Spider):
request_config = {
'RETRIES': 1,
'DELAY': 1,
'TIMEOUT': 20
}
name = 'fund_spider'
concurrency = 3
kwargs = {
'proxy': HTTP_PROXY,
}
headers = {'Accept': 'application/json, text/javascript, */*; q=0.01', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9',
'Connection': 'keep-alive', 'Content-Length': '2', 'Content-Type': 'application/json', 'Host': 'gs.amac.org.cn',
'Origin': 'http://gs.amac.org.cn', 'Referer': 'http://gs.amac.org.cn/amac-infodisc/res/pof/fund/index.html',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36',
'X-Requested-With': 'XMLHttpRequest'}
def __init__(self, middleware=None, loop=None, is_async_start=False):
super().__init__(middleware, loop, is_async_start)
self.client = AsyncIOMotorClient(MONGODB_URL, io_loop=loop)
self.db_name = DB_NAME
self.fund_collection = self.client[self.db_name]['fund']
async def get_total_pages(self):
url = "http://gs.amac.org.cn/amac-infodisc/api/pof/fund?rand={rand}&page=0&size=20".format(rand=random.random())
request = self.make_requests_from_url(url, data=b"{}", method="POST", res_type='json')
resp = await request.fetch()
if resp.status == 200:
if 'totalPages' in resp.html:
return resp.html['totalPages']
raise ValueError('failed to get total pages.')
async def start_requests(self):
num = await self.get_total_pages()
for i in range(num):
url = "http://gs.amac.org.cn/amac-infodisc/api/pof/fund?rand={rand}&page={page}&size=20".format(rand=random.random(), page=i)
yield self.make_requests_from_url(url, data=b"{}", method="POST", res_type='json')
async def parse(self, response: Response):
try:
data = response.html
if data is None or 'content' not in data:
return None
data = data['content']
update_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
for item in data:
row = dict()
row['register_number'] = item['fundNo']
row['full_name'] = str(item['fundName']).replace(' ', '')
row['company_name'] = item['managerName']
row['manager_type'] = item['managerType']
row['status'] = item['workingState']
try:
row['establish_date'] = datetime.datetime.fromtimestamp(item['establishDate'] / 1000).strftime("%Y%m%d")
except:
row['establish_date'] = item['establishDate']
row['company_url'] = item['managerUrl']
row['mandator_name'] = item['mandatorName']
row['last_quarter_update'] = item['lastQuarterUpdate']
row['is_depute_manage'] = item['isDeputeManage']
try:
row['put_on_record_date'] = datetime.datetime.fromtimestamp(item['putOnRecordDate'] / 1000).strftime("%Y%m%d")
except:
row['put_on_record_date'] = item['putOnRecordDate']
row['update_time'] = update_time
s = time.time()
await self.fund_collection.update_one({'register_number': row['register_number'], 'full_name': row['full_name']}, {'$set': row}, upsert=True)
e = time.time()
self.logger.info("采集基金[%s]信息, 存储耗时:%s s" % (row['register_number'], round(e - s, 2)))
except Exception as e:
self.logger.info("采集失败. url:%s" % response.url)
self.logger.exception(e)
await self.stop()
if __name__ == '__main__':
FundSpider.start()
| 40.201754 | 157 | 0.592625 |
import datetime
import os
import asyncio
import re
import logging
import time
import random
import aiohttp
from motor.motor_asyncio import AsyncIOMotorClient
from ruia import Request, Spider, Response
try:
from items import FundInfoItemV1
from settings import *
except ImportError:
import sys
sys.path[0] = os.path.dirname(os.path.abspath(__file__))
from items import FundInfoItemV1
from settings import *
class FundSpider(Spider):
request_config = {
'RETRIES': 1,
'DELAY': 1,
'TIMEOUT': 20
}
name = 'fund_spider'
concurrency = 3
kwargs = {
'proxy': HTTP_PROXY,
}
headers = {'Accept': 'application/json, text/javascript, */*; q=0.01', 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'zh-CN,zh;q=0.9',
'Connection': 'keep-alive', 'Content-Length': '2', 'Content-Type': 'application/json', 'Host': 'gs.amac.org.cn',
'Origin': 'http://gs.amac.org.cn', 'Referer': 'http://gs.amac.org.cn/amac-infodisc/res/pof/fund/index.html',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36',
'X-Requested-With': 'XMLHttpRequest'}
def __init__(self, middleware=None, loop=None, is_async_start=False):
super().__init__(middleware, loop, is_async_start)
self.client = AsyncIOMotorClient(MONGODB_URL, io_loop=loop)
self.db_name = DB_NAME
self.fund_collection = self.client[self.db_name]['fund']
async def get_total_pages(self):
url = "http://gs.amac.org.cn/amac-infodisc/api/pof/fund?rand={rand}&page=0&size=20".format(rand=random.random())
request = self.make_requests_from_url(url, data=b"{}", method="POST", res_type='json')
resp = await request.fetch()
if resp.status == 200:
if 'totalPages' in resp.html:
return resp.html['totalPages']
raise ValueError('failed to get total pages.')
async def start_requests(self):
num = await self.get_total_pages()
for i in range(num):
url = "http://gs.amac.org.cn/amac-infodisc/api/pof/fund?rand={rand}&page={page}&size=20".format(rand=random.random(), page=i)
yield self.make_requests_from_url(url, data=b"{}", method="POST", res_type='json')
async def parse(self, response: Response):
try:
data = response.html
if data is None or 'content' not in data:
return None
data = data['content']
update_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
for item in data:
row = dict()
row['register_number'] = item['fundNo']
row['full_name'] = str(item['fundName']).replace(' ', '')
row['company_name'] = item['managerName']
row['manager_type'] = item['managerType']
row['status'] = item['workingState']
try:
row['establish_date'] = datetime.datetime.fromtimestamp(item['establishDate'] / 1000).strftime("%Y%m%d")
except:
row['establish_date'] = item['establishDate']
row['company_url'] = item['managerUrl']
row['mandator_name'] = item['mandatorName']
row['last_quarter_update'] = item['lastQuarterUpdate']
row['is_depute_manage'] = item['isDeputeManage']
try:
row['put_on_record_date'] = datetime.datetime.fromtimestamp(item['putOnRecordDate'] / 1000).strftime("%Y%m%d")
except:
row['put_on_record_date'] = item['putOnRecordDate']
row['update_time'] = update_time
s = time.time()
await self.fund_collection.update_one({'register_number': row['register_number'], 'full_name': row['full_name']}, {'$set': row}, upsert=True)
e = time.time()
self.logger.info("采集基金[%s]信息, 存储耗时:%s s" % (row['register_number'], round(e - s, 2)))
except Exception as e:
self.logger.info("采集失败. url:%s" % response.url)
self.logger.exception(e)
await self.stop()
if __name__ == '__main__':
FundSpider.start()
| true | true |
f7274c9f9d6c7bc1762947fcfb7aab6dfe8470bc | 687 | py | Python | profiles/models.py | Samyak-jain09/QnA | 5044a947b84834cfc36554053a18cc1b12ad0f0e | [
"MIT"
] | null | null | null | profiles/models.py | Samyak-jain09/QnA | 5044a947b84834cfc36554053a18cc1b12ad0f0e | [
"MIT"
] | null | null | null | profiles/models.py | Samyak-jain09/QnA | 5044a947b84834cfc36554053a18cc1b12ad0f0e | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from sorl.thumbnail import ImageField
# Create your models here.
class Profile(models.Model):
user= models.OneToOneField(
User,
on_delete=models.CASCADE,
related_name="profile"
)
image = ImageField(upload_to='profiles')
def __str__(self) :
return self.user.username
@receiver(post_save,sender=User)
def create_user_profile(sender, instance, created, **kwargs):
if created:
Profile.objects.create(user=instance)
| 24.535714 | 62 | 0.672489 | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from sorl.thumbnail import ImageField
class Profile(models.Model):
user= models.OneToOneField(
User,
on_delete=models.CASCADE,
related_name="profile"
)
image = ImageField(upload_to='profiles')
def __str__(self) :
return self.user.username
@receiver(post_save,sender=User)
def create_user_profile(sender, instance, created, **kwargs):
if created:
Profile.objects.create(user=instance)
| true | true |
f7274dc7c0bed6089595d1474055de95254fbc71 | 13,661 | py | Python | pyzombie/Handler.py | lanhel/pyzombie | dba35d98152e5d99d4231ab9124727ae47b3bf72 | [
"Apache-2.0"
] | null | null | null | pyzombie/Handler.py | lanhel/pyzombie | dba35d98152e5d99d4231ab9124727ae47b3bf72 | [
"Apache-2.0"
] | 1 | 2019-12-30T19:30:01.000Z | 2019-12-30T19:30:29.000Z | pyzombie/Handler.py | lanhel/pyzombie | dba35d98152e5d99d4231ab9124727ae47b3bf72 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#-------------------------------------------------------------------------------
"""pyzombie HTTP RESTful resource handler."""
__author__ = ('Lance Finn Helsten',)
__version__ = '1.0.1'
__copyright__ = """Copyright 2009 Lance Finn Helsten (helsten@acm.org)"""
__license__ = """
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.
"""
__docformat__ = "reStructuredText en"
__all__ = ['Handler']
import sys
import os
from datetime import datetime
import mimetypes
import hashlib
import re
import cgi
import cgitb
import http.client
from .ZombieConfig import config, datadir
from .Executable import Executable
#cgitb.enable()
###
### TODO
###
### Pay attention to If-Modified-Since to allow return of 304 Not Modified
### Pay attention to If-None-Match to allow return of 304 Not Modified
### Pay attention to If-Unmodified-Since
### Pay attention to If-Modified-Since
CHUNK_SIZE = 256
FLUSHED = "Flushed"
class Handler:
"""Holds all the information necessary to handle a single resource dispatch.
Properties
----------
executable
The Executable object for this handler. In rare cases no executable
can be determined so this will return None.
"""
@classmethod
def initdispatch(cls, regex, allow, help):
cls.regex = re.compile(regex)
cls.allow = allow
cls.help = help
return cls
@classmethod
def match(cls, path):
"""Check to see if the path is recognized by the dispatch handler,
if so then return a dictionary of recognized parts, otherwise
return None."""
ret = None
mo = cls.regex.match(path)
if mo != None:
ret = mo.groupdict()
return ret
def __init__(self, req, urlargs):
self.req = req
self.urlargs = urlargs
self.content = "Single"
self.nocache = False
self.__status = None
self.headers = {}
self.lines = []
@property
def status(self):
return self.__status
@status.setter
def status(self, value):
self.__status = value
@property
def startstamp(self):
return self.req.server.stamp
@property
def startstamprfc850(self):
return self.req.date_time_string()
@property
def datadir(self):
return datadir()
@property
def executable(self, mediatype=None):
if not hasattr(self, "_Handler__executable"):
self.initexecutable()
return self.__executable
@property
def accept(self):
"""Return an ordered set of media types that will be accepted."""
if not hasattr(self, "acceptset"):
astr = self.req.headers["Accept"]
if astr is None:
astr = "text/html"
self.acceptset = self.__parseq(astr)
self.acceptset.append(None)
return self.acceptset
@property
def acceptlanguage(self):
"""Return an ordered set of languages that will be accepted."""
if not hasattr(self, "acceptlangset"):
astr = self.req.headers["Accept-Language"]
if astr is None:
astr = "en"
self.acceptlangset = self.__parseq(astr)
self.acceptlangset.append(None)
return self.acceptlangset
@property
def acceptencoding(self):
"""Return an ordered set of langauges that will be accepted."""
if not hasattr(self, "acceptencset"):
astr = self.req.headers["Accept-Encoding"]
if astr is None:
astr = ""
self.acceptencset = self.__parseq(astr)
self.acceptencset.append(None)
return self.acceptencset
def __parseq(self, astr):
qre = re.compile(r"([a-zA-Z*]+/[a-zA-Z*]+)(\s*;\s*q=(\d+(\.\d+))?)?")
astr = astr.split(",")
aset = ["DUMMY"]
weight = [0.0]
for a in astr:
q = 1.0
m = qre.match(a.strip())
if m:
a = m.group(1)
if m.group(3):
q = float(m.group(3))
for i, w in enumerate(weight):
if q > w:
aset.insert(i, a)
weight.insert(i, q)
break
return aset[:-1]
def initexecutable(self, mediatype=None):
"""This will initialize the executable property with a given media
type. Generally using the executable property directly will give
correct results. This is really only used when POST of a new exectuable
occurs."""
if hasattr(self, "_Handler__executable"):
raise AttributeError("Executable property is already initialized.")
if 'execname' in self.urlargs:
name = self.urlargs['execname']
else:
name = Executable.createname()
self.__executable = Executable.getcached(name, mediatype)
def serverurl(self, path):
"""Given a path to a resource create a full URL to that resource.
Parameters
----------
path
The relative path on the server to the resource.
Return
------
The URL that can be given to this server to find the given resource.
"""
return "http://{0}:{1}/{2}".format(
self.req.server.server_name,
self.req.server.server_port,
path)
def rfile_safe(self):
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
if sys.version_info >= (3, 2):
return self.req.rfile
else:
return HttpServerFP(self.req)
def multipart(self):
ctype, pdict = cgi.parse_header(self.req.headers['Content-Type'])
if ctype != 'multipart/form-data':
self.error(http.client.UNSUPPORTED_MEDIA_TYPE)
return None
fp = self.rfile_safe()
fs = cgi.FieldStorage(fp=fp, headers=self.req.headers,
environ={'REQUEST_METHOD':'POST'}, strict_parsing=True)
return fs
def readline(self):
"""Read a single line from the input stream in decoded format."""
pass
def writeline(self, line):
"""Write a single line of text to the output stream."""
self.lines.append(line)
def writelines(self, lines):
"""Write a string one line at a time to the output stream."""
for l in lines.splitlines():
self.writeline(l)
def writefile(self, path):
"""Read and then write the file from the given path to the output
stream. This will write all the headers before the file. If there is
an error reading the file then the appropriate HTTP error code will
be sent.
This is meant for static files. Dynamic files should use writeline
or writelines to operate.
Parameters
----------
path
The normalized path to the file.
"""
if os.path.isfile(path):
mediatype, enc = mimetypes.guess_type(path)
self.writefp(open(path, "rb"), mediatype=mediatype, enc=enc)
else:
self.error(http.client.NOT_FOUND)
def writefp(self, fp, mediatype="text/plain", enc=None, chunked=None):
"""Read from the given file object and write the data to the output
stream. If this is chunked then this will not return until the input
file object is closed.
Parameters
----------
fp
The file type object to read from.
chunked
If not ``None`` then the data should be sent in a chunked manner,
and the value should be a function that returns a boolean value
to indicate all data has been sent. The default is no chunked.
"""
self.req.send_response(http.client.OK)
self.req.send_header("Cache-Control", "public max-age={0}".format(self.req.server.maxagestatic))
self.req.send_header("Last-Modified", self.req.date_time_string())
if mediatype == None:
self.req.send_header("Content-Type", "application/octet-stream")
else:
if mediatype in ["text/plain", "text/html"]:
mediatype = "{0};UTF-8".format(mediatype)
self.req.send_header("Content-Type", mediatype)
if enc != None:
self.req.send_header("Content-Encoding", enc)
if chunked is not None:
self.__etag_init()
self.content = "Chunked"
self.req.send_header("Transfer-Encoding", "chunked")
self.req.end_headers()
length = 0
done = False
while not done:
data = fp.read(CHUNK_SIZE)
while not data and not done:
data = fp.read(CHUNK_SIZE)
done = chunked()
if data:
datalen = len(data)
length = length + datalen
self.__etag_feed(data)
self.req.wfile.write("{0:x}".format(datalen).encode("UTF-8"))
self.req.wfile.write(os.linesep.encode("UTF-8"))
if isinstance(data, str):
self.req.wfile.write(data.encode("UTF-8"))
elif isinstance(data, bytes):
self.req.wfile.write(data)
self.req.wfile.write(os.linesep.encode("UTF-8"))
self.req.wfile.write(b"0")
self.req.wfile.write(os.linesep.encode("UTF-8"))
self.req.send_header("Cache-Control", "public max-age={0}".format(self.req.server.maxagedynamic))
self.req.send_header("ETag", self.__etag_value())
self.req.wfile.write(os.linesep.encode("UTF-8"))
self.content = FLUSHED
else:
data = fp.read()
self.req.send_header("ETag", self.etag(data))
self.req.send_header("Content-Length", len(data))
self.req.end_headers()
self.req.wfile.write(data)
self.content = FLUSHED
def error(self, code, message=None):
self.req.send_error(code, message=message)
self.content = FLUSHED
def flush(self):
"""Flush the headers if they have not been written and all the lines
that have been written to the http output stream."""
if self.content == FLUSHED:
return
self.lines.append("")
buf = os.linesep.join(self.lines).encode("UTF-8")
self.lines = []
if not self.nocache:
if "Cache-Control" not in self.headers:
self.headers["Cache-Control"] = "public max-age={0}".format(self.req.server.maxagedynamic)
if "ETag" not in self.headers:
self.headers["ETag"] = self.etag(buf)
if self.content in ["Headers", "Single", "Chunked"]:
self.req.send_response(self.status)
for k in self.headers:
self.req.send_header(k, self.headers[k])
if self.content == "Headers":
self.req.end_headers()
self.content = FLUSHED
elif self.content == "Single":
self.req.send_header("Content-Length", len(buf))
self.req.end_headers()
self.req.wfile.write(buf)
self.content = FLUSHED
elif self.content == "Chunked":
pass
def etag(self, data):
"""Build an ETag representation for the data associated with the given
name."""
self.__etag_init()
self.__etag_feed(data)
return self.__etag_value()
def __etag_init(self):
self.__etag = hashlib.md5()
def __etag_feed(self, data):
if isinstance(data, str):
self.__etag.update(data.encode("UTF-8"))
elif isinstance(data, bytes):
self.__etag.update(data)
else:
self.__etag.update(str(data).encode("UTF-8"))
def __etag_value(self):
return self.__etag.hexdigest()
def __getitem__(self, key):
return self.headers[key]
def __setitem__(self, key, value):
self.headers[key] = value
class HttpServerFP():
"""This will wrap the http.server request rfile so an EOF will be returned
when reading from the rfile. That way the Content-Length is always handled
correctly. This will also convert the binary stream into a character stream.
"""
def __init__(self, req):
self.req = req
self.clen = int(self.req.headers['Content-Length'])
self.rfile = self.req.rfile
def read(self, size=-1):
if size < 0:
size = self.clen
if size > self.clen:
size = self.clen
ret = ''
if size > 0:
ret = self.rfile.read(size)
self.clen = self.clen - len(ret)
ret = str(ret, 'UTF-8')
return ret
| 33.982587 | 109 | 0.566284 |
__author__ = ('Lance Finn Helsten',)
__version__ = '1.0.1'
__copyright__ = """Copyright 2009 Lance Finn Helsten (helsten@acm.org)"""
__license__ = """
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.
"""
__docformat__ = "reStructuredText en"
__all__ = ['Handler']
import sys
import os
from datetime import datetime
import mimetypes
import hashlib
import re
import cgi
import cgitb
import http.client
from .ZombieConfig import config, datadir
from .Executable import Executable
rlargs):
self.req = req
self.urlargs = urlargs
self.content = "Single"
self.nocache = False
self.__status = None
self.headers = {}
self.lines = []
@property
def status(self):
return self.__status
@status.setter
def status(self, value):
self.__status = value
@property
def startstamp(self):
return self.req.server.stamp
@property
def startstamprfc850(self):
return self.req.date_time_string()
@property
def datadir(self):
return datadir()
@property
def executable(self, mediatype=None):
if not hasattr(self, "_Handler__executable"):
self.initexecutable()
return self.__executable
@property
def accept(self):
if not hasattr(self, "acceptset"):
astr = self.req.headers["Accept"]
if astr is None:
astr = "text/html"
self.acceptset = self.__parseq(astr)
self.acceptset.append(None)
return self.acceptset
@property
def acceptlanguage(self):
if not hasattr(self, "acceptlangset"):
astr = self.req.headers["Accept-Language"]
if astr is None:
astr = "en"
self.acceptlangset = self.__parseq(astr)
self.acceptlangset.append(None)
return self.acceptlangset
@property
def acceptencoding(self):
if not hasattr(self, "acceptencset"):
astr = self.req.headers["Accept-Encoding"]
if astr is None:
astr = ""
self.acceptencset = self.__parseq(astr)
self.acceptencset.append(None)
return self.acceptencset
def __parseq(self, astr):
qre = re.compile(r"([a-zA-Z*]+/[a-zA-Z*]+)(\s*;\s*q=(\d+(\.\d+))?)?")
astr = astr.split(",")
aset = ["DUMMY"]
weight = [0.0]
for a in astr:
q = 1.0
m = qre.match(a.strip())
if m:
a = m.group(1)
if m.group(3):
q = float(m.group(3))
for i, w in enumerate(weight):
if q > w:
aset.insert(i, a)
weight.insert(i, q)
break
return aset[:-1]
def initexecutable(self, mediatype=None):
if hasattr(self, "_Handler__executable"):
raise AttributeError("Executable property is already initialized.")
if 'execname' in self.urlargs:
name = self.urlargs['execname']
else:
name = Executable.createname()
self.__executable = Executable.getcached(name, mediatype)
def serverurl(self, path):
return "http://{0}:{1}/{2}".format(
self.req.server.server_name,
self.req.server.server_port,
path)
def rfile_safe(self):
print("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
if sys.version_info >= (3, 2):
return self.req.rfile
else:
return HttpServerFP(self.req)
def multipart(self):
ctype, pdict = cgi.parse_header(self.req.headers['Content-Type'])
if ctype != 'multipart/form-data':
self.error(http.client.UNSUPPORTED_MEDIA_TYPE)
return None
fp = self.rfile_safe()
fs = cgi.FieldStorage(fp=fp, headers=self.req.headers,
environ={'REQUEST_METHOD':'POST'}, strict_parsing=True)
return fs
def readline(self):
pass
def writeline(self, line):
self.lines.append(line)
def writelines(self, lines):
for l in lines.splitlines():
self.writeline(l)
def writefile(self, path):
if os.path.isfile(path):
mediatype, enc = mimetypes.guess_type(path)
self.writefp(open(path, "rb"), mediatype=mediatype, enc=enc)
else:
self.error(http.client.NOT_FOUND)
def writefp(self, fp, mediatype="text/plain", enc=None, chunked=None):
self.req.send_response(http.client.OK)
self.req.send_header("Cache-Control", "public max-age={0}".format(self.req.server.maxagestatic))
self.req.send_header("Last-Modified", self.req.date_time_string())
if mediatype == None:
self.req.send_header("Content-Type", "application/octet-stream")
else:
if mediatype in ["text/plain", "text/html"]:
mediatype = "{0};UTF-8".format(mediatype)
self.req.send_header("Content-Type", mediatype)
if enc != None:
self.req.send_header("Content-Encoding", enc)
if chunked is not None:
self.__etag_init()
self.content = "Chunked"
self.req.send_header("Transfer-Encoding", "chunked")
self.req.end_headers()
length = 0
done = False
while not done:
data = fp.read(CHUNK_SIZE)
while not data and not done:
data = fp.read(CHUNK_SIZE)
done = chunked()
if data:
datalen = len(data)
length = length + datalen
self.__etag_feed(data)
self.req.wfile.write("{0:x}".format(datalen).encode("UTF-8"))
self.req.wfile.write(os.linesep.encode("UTF-8"))
if isinstance(data, str):
self.req.wfile.write(data.encode("UTF-8"))
elif isinstance(data, bytes):
self.req.wfile.write(data)
self.req.wfile.write(os.linesep.encode("UTF-8"))
self.req.wfile.write(b"0")
self.req.wfile.write(os.linesep.encode("UTF-8"))
self.req.send_header("Cache-Control", "public max-age={0}".format(self.req.server.maxagedynamic))
self.req.send_header("ETag", self.__etag_value())
self.req.wfile.write(os.linesep.encode("UTF-8"))
self.content = FLUSHED
else:
data = fp.read()
self.req.send_header("ETag", self.etag(data))
self.req.send_header("Content-Length", len(data))
self.req.end_headers()
self.req.wfile.write(data)
self.content = FLUSHED
def error(self, code, message=None):
self.req.send_error(code, message=message)
self.content = FLUSHED
def flush(self):
if self.content == FLUSHED:
return
self.lines.append("")
buf = os.linesep.join(self.lines).encode("UTF-8")
self.lines = []
if not self.nocache:
if "Cache-Control" not in self.headers:
self.headers["Cache-Control"] = "public max-age={0}".format(self.req.server.maxagedynamic)
if "ETag" not in self.headers:
self.headers["ETag"] = self.etag(buf)
if self.content in ["Headers", "Single", "Chunked"]:
self.req.send_response(self.status)
for k in self.headers:
self.req.send_header(k, self.headers[k])
if self.content == "Headers":
self.req.end_headers()
self.content = FLUSHED
elif self.content == "Single":
self.req.send_header("Content-Length", len(buf))
self.req.end_headers()
self.req.wfile.write(buf)
self.content = FLUSHED
elif self.content == "Chunked":
pass
def etag(self, data):
self.__etag_init()
self.__etag_feed(data)
return self.__etag_value()
def __etag_init(self):
self.__etag = hashlib.md5()
def __etag_feed(self, data):
if isinstance(data, str):
self.__etag.update(data.encode("UTF-8"))
elif isinstance(data, bytes):
self.__etag.update(data)
else:
self.__etag.update(str(data).encode("UTF-8"))
def __etag_value(self):
return self.__etag.hexdigest()
def __getitem__(self, key):
return self.headers[key]
def __setitem__(self, key, value):
self.headers[key] = value
class HttpServerFP():
def __init__(self, req):
self.req = req
self.clen = int(self.req.headers['Content-Length'])
self.rfile = self.req.rfile
def read(self, size=-1):
if size < 0:
size = self.clen
if size > self.clen:
size = self.clen
ret = ''
if size > 0:
ret = self.rfile.read(size)
self.clen = self.clen - len(ret)
ret = str(ret, 'UTF-8')
return ret
| true | true |
f7274e486eedd05c1c6a0c85be46f9c9e766ce1c | 1,073 | py | Python | SimpleShadowsocksSubscribeServer/views/subscribe.py | TomCzHen/py4S | c07b0a05c798809ef95e8ef47e87c877b82358fd | [
"MIT"
] | 1 | 2019-06-05T16:05:28.000Z | 2019-06-05T16:05:28.000Z | SimpleShadowsocksSubscribeServer/views/subscribe.py | TomCzHen/py4S | c07b0a05c798809ef95e8ef47e87c877b82358fd | [
"MIT"
] | null | null | null | SimpleShadowsocksSubscribeServer/views/subscribe.py | TomCzHen/py4S | c07b0a05c798809ef95e8ef47e87c877b82358fd | [
"MIT"
] | null | null | null | import uuid
from sanic import response
from sanic.exceptions import abort
from sanic.request import Request
from sanic.views import HTTPMethodView as SanicHTTPView
from ..cache import cache
class SubscribeView(SanicHTTPView):
async def get(self, request: Request, uid: uuid):
token = request.args.get('token')
num = request.args.get('max', '99')
try:
num = float(num)
except ValueError:
num = 0
else:
num = int(num)
subscribe = await cache.get(key=str(uid)) or abort(404)
accept_contents = request.headers.get('accept').split(',')
if 'text/html' in accept_contents:
abort(404)
if subscribe.token == token:
subscribe_file = await subscribe.output_file(num)
return response.raw(
subscribe_file,
content_type='application/octet-stream; charset=utf-8',
headers={"Content-Disposition": f"attachment; filename={uid}.txt"}
)
else:
abort(404)
| 26.825 | 82 | 0.59739 | import uuid
from sanic import response
from sanic.exceptions import abort
from sanic.request import Request
from sanic.views import HTTPMethodView as SanicHTTPView
from ..cache import cache
class SubscribeView(SanicHTTPView):
async def get(self, request: Request, uid: uuid):
token = request.args.get('token')
num = request.args.get('max', '99')
try:
num = float(num)
except ValueError:
num = 0
else:
num = int(num)
subscribe = await cache.get(key=str(uid)) or abort(404)
accept_contents = request.headers.get('accept').split(',')
if 'text/html' in accept_contents:
abort(404)
if subscribe.token == token:
subscribe_file = await subscribe.output_file(num)
return response.raw(
subscribe_file,
content_type='application/octet-stream; charset=utf-8',
headers={"Content-Disposition": f"attachment; filename={uid}.txt"}
)
else:
abort(404)
| true | true |
f7274e9c19524a8d036639345aeb06261fec049e | 5,177 | py | Python | tests/unit_tests/test_data_photon.py | norberto-schmidt/openmc | ff4844303154a68027b9c746300f5704f73e0875 | [
"MIT"
] | 262 | 2018-08-09T21:27:03.000Z | 2022-03-24T05:02:10.000Z | tests/unit_tests/test_data_photon.py | norberto-schmidt/openmc | ff4844303154a68027b9c746300f5704f73e0875 | [
"MIT"
] | 753 | 2018-08-03T15:26:57.000Z | 2022-03-29T23:54:48.000Z | tests/unit_tests/test_data_photon.py | norberto-schmidt/openmc | ff4844303154a68027b9c746300f5704f73e0875 | [
"MIT"
] | 196 | 2018-08-06T13:41:14.000Z | 2022-03-29T20:47:12.000Z | #!/usr/bin/env python
from collections.abc import Mapping, Callable
import os
from pathlib import Path
import numpy as np
import pandas as pd
import pytest
import openmc.data
@pytest.fixture(scope='module')
def elements_endf():
"""Dictionary of element ENDF data indexed by atomic symbol."""
endf_data = os.environ['OPENMC_ENDF_DATA']
elements = {'H': 1, 'O': 8, 'Al': 13, 'Cu': 29, 'Ag': 47, 'U': 92, 'Pu': 94}
data = {}
for symbol, Z in elements.items():
p_file = 'photoat-{:03}_{}_000.endf'.format(Z, symbol)
p_path = os.path.join(endf_data, 'photoat', p_file)
a_file = 'atom-{:03}_{}_000.endf'.format(Z, symbol)
a_path = os.path.join(endf_data, 'atomic_relax', a_file)
data[symbol] = openmc.data.IncidentPhoton.from_endf(p_path, a_path)
return data
@pytest.fixture()
def element(request, elements_endf):
"""Element ENDF data"""
return elements_endf[request.param]
@pytest.mark.parametrize(
'element, atomic_number', [
('Al', 13),
('Cu', 29),
('Pu', 94)
],
indirect=['element']
)
def test_attributes(element, atomic_number):
assert element.atomic_number == atomic_number
@pytest.mark.parametrize(
'element, subshell, binding_energy, num_electrons', [
('H', 'K', 13.61, 1.0),
('O', 'L3', 14.15, 2.67),
('U', 'P2', 34.09, 2.0)
],
indirect=['element']
)
def test_atomic_relaxation(element, subshell, binding_energy, num_electrons):
atom_relax = element.atomic_relaxation
assert isinstance(atom_relax, openmc.data.photon.AtomicRelaxation)
assert subshell in atom_relax.subshells
assert atom_relax.binding_energy[subshell] == binding_energy
assert atom_relax.num_electrons[subshell] == num_electrons
@pytest.mark.parametrize('element', ['Al', 'Cu', 'Pu'], indirect=True)
def test_transitions(element):
transitions = element.atomic_relaxation.transitions
assert transitions
assert isinstance(transitions, Mapping)
for matrix in transitions.values():
assert isinstance(matrix, pd.core.frame.DataFrame)
assert len(matrix.columns) == 4
assert sum(matrix['probability']) == pytest.approx(1.0)
@pytest.mark.parametrize(
'element, I, i_shell, ionization_energy, num_electrons', [
('H', 19.2, 0, 13.6, 1),
('O', 95.0, 2, 13.62, 4),
('U', 890.0, 25, 6.033, -3)
],
indirect=['element']
)
def test_bremsstrahlung(element, I, i_shell, ionization_energy, num_electrons):
brems = element.bremsstrahlung
assert isinstance(brems, Mapping)
assert brems['I'] == I
assert brems['num_electrons'][i_shell] == num_electrons
assert brems['ionization_energy'][i_shell] == ionization_energy
assert np.all(np.diff(brems['electron_energy']) > 0.0)
assert np.all(np.diff(brems['photon_energy']) > 0.0)
assert brems['photon_energy'][0] == 0.0
assert brems['photon_energy'][-1] == 1.0
assert brems['dcs'].shape == (200, 30)
@pytest.mark.parametrize(
'element, n_shell', [
('H', 1),
('O', 3),
('Al', 5)
],
indirect=['element']
)
def test_compton_profiles(element, n_shell):
profile = element.compton_profiles
assert profile
assert isinstance(profile, Mapping)
assert all(isinstance(x, Callable) for x in profile['J'])
assert all(len(x) == n_shell for x in profile.values())
@pytest.mark.parametrize(
'element, reaction', [
('Cu', 541),
('Ag', 502),
('Pu', 504)
],
indirect=['element']
)
def test_reactions(element, reaction):
reactions = element.reactions
assert all(isinstance(x, openmc.data.PhotonReaction) for x in reactions.values())
assert reaction in reactions
with pytest.raises(KeyError):
reactions[18]
@pytest.mark.parametrize('element', ['Pu'], indirect=True)
def test_export_to_hdf5(tmpdir, element):
filename = str(tmpdir.join('tmp.h5'))
element.export_to_hdf5(filename)
assert os.path.exists(filename)
# Read in data from hdf5
element2 = openmc.data.IncidentPhoton.from_hdf5(filename)
# Check for some cross section and datasets of element and element2
energy = np.logspace(np.log10(1.0), np.log10(1.0e10), num=100)
for mt in (502, 504, 515, 517, 522, 541, 570):
xs = element[mt].xs(energy)
xs2 = element2[mt].xs(energy)
assert np.allclose(xs, xs2)
assert element[502].scattering_factor == element2[502].scattering_factor
assert element.atomic_relaxation.transitions['O3'].equals(
element2.atomic_relaxation.transitions['O3'])
assert (element.compton_profiles['binding_energy'] ==
element2.compton_profiles['binding_energy']).all()
assert (element.bremsstrahlung['electron_energy'] ==
element2.bremsstrahlung['electron_energy']).all()
# Export to hdf5 again
element2.export_to_hdf5(filename, 'w')
def test_photodat_only(run_in_tmpdir):
endf_dir = Path(os.environ['OPENMC_ENDF_DATA'])
photoatomic_file = endf_dir / 'photoat' / 'photoat-001_H_000.endf'
data = openmc.data.IncidentPhoton.from_endf(photoatomic_file)
data.export_to_hdf5('tmp.h5', 'w') | 33.836601 | 85 | 0.66525 |
from collections.abc import Mapping, Callable
import os
from pathlib import Path
import numpy as np
import pandas as pd
import pytest
import openmc.data
@pytest.fixture(scope='module')
def elements_endf():
endf_data = os.environ['OPENMC_ENDF_DATA']
elements = {'H': 1, 'O': 8, 'Al': 13, 'Cu': 29, 'Ag': 47, 'U': 92, 'Pu': 94}
data = {}
for symbol, Z in elements.items():
p_file = 'photoat-{:03}_{}_000.endf'.format(Z, symbol)
p_path = os.path.join(endf_data, 'photoat', p_file)
a_file = 'atom-{:03}_{}_000.endf'.format(Z, symbol)
a_path = os.path.join(endf_data, 'atomic_relax', a_file)
data[symbol] = openmc.data.IncidentPhoton.from_endf(p_path, a_path)
return data
@pytest.fixture()
def element(request, elements_endf):
return elements_endf[request.param]
@pytest.mark.parametrize(
'element, atomic_number', [
('Al', 13),
('Cu', 29),
('Pu', 94)
],
indirect=['element']
)
def test_attributes(element, atomic_number):
assert element.atomic_number == atomic_number
@pytest.mark.parametrize(
'element, subshell, binding_energy, num_electrons', [
('H', 'K', 13.61, 1.0),
('O', 'L3', 14.15, 2.67),
('U', 'P2', 34.09, 2.0)
],
indirect=['element']
)
def test_atomic_relaxation(element, subshell, binding_energy, num_electrons):
atom_relax = element.atomic_relaxation
assert isinstance(atom_relax, openmc.data.photon.AtomicRelaxation)
assert subshell in atom_relax.subshells
assert atom_relax.binding_energy[subshell] == binding_energy
assert atom_relax.num_electrons[subshell] == num_electrons
@pytest.mark.parametrize('element', ['Al', 'Cu', 'Pu'], indirect=True)
def test_transitions(element):
transitions = element.atomic_relaxation.transitions
assert transitions
assert isinstance(transitions, Mapping)
for matrix in transitions.values():
assert isinstance(matrix, pd.core.frame.DataFrame)
assert len(matrix.columns) == 4
assert sum(matrix['probability']) == pytest.approx(1.0)
@pytest.mark.parametrize(
'element, I, i_shell, ionization_energy, num_electrons', [
('H', 19.2, 0, 13.6, 1),
('O', 95.0, 2, 13.62, 4),
('U', 890.0, 25, 6.033, -3)
],
indirect=['element']
)
def test_bremsstrahlung(element, I, i_shell, ionization_energy, num_electrons):
brems = element.bremsstrahlung
assert isinstance(brems, Mapping)
assert brems['I'] == I
assert brems['num_electrons'][i_shell] == num_electrons
assert brems['ionization_energy'][i_shell] == ionization_energy
assert np.all(np.diff(brems['electron_energy']) > 0.0)
assert np.all(np.diff(brems['photon_energy']) > 0.0)
assert brems['photon_energy'][0] == 0.0
assert brems['photon_energy'][-1] == 1.0
assert brems['dcs'].shape == (200, 30)
@pytest.mark.parametrize(
'element, n_shell', [
('H', 1),
('O', 3),
('Al', 5)
],
indirect=['element']
)
def test_compton_profiles(element, n_shell):
profile = element.compton_profiles
assert profile
assert isinstance(profile, Mapping)
assert all(isinstance(x, Callable) for x in profile['J'])
assert all(len(x) == n_shell for x in profile.values())
@pytest.mark.parametrize(
'element, reaction', [
('Cu', 541),
('Ag', 502),
('Pu', 504)
],
indirect=['element']
)
def test_reactions(element, reaction):
reactions = element.reactions
assert all(isinstance(x, openmc.data.PhotonReaction) for x in reactions.values())
assert reaction in reactions
with pytest.raises(KeyError):
reactions[18]
@pytest.mark.parametrize('element', ['Pu'], indirect=True)
def test_export_to_hdf5(tmpdir, element):
filename = str(tmpdir.join('tmp.h5'))
element.export_to_hdf5(filename)
assert os.path.exists(filename)
element2 = openmc.data.IncidentPhoton.from_hdf5(filename)
energy = np.logspace(np.log10(1.0), np.log10(1.0e10), num=100)
for mt in (502, 504, 515, 517, 522, 541, 570):
xs = element[mt].xs(energy)
xs2 = element2[mt].xs(energy)
assert np.allclose(xs, xs2)
assert element[502].scattering_factor == element2[502].scattering_factor
assert element.atomic_relaxation.transitions['O3'].equals(
element2.atomic_relaxation.transitions['O3'])
assert (element.compton_profiles['binding_energy'] ==
element2.compton_profiles['binding_energy']).all()
assert (element.bremsstrahlung['electron_energy'] ==
element2.bremsstrahlung['electron_energy']).all()
element2.export_to_hdf5(filename, 'w')
def test_photodat_only(run_in_tmpdir):
endf_dir = Path(os.environ['OPENMC_ENDF_DATA'])
photoatomic_file = endf_dir / 'photoat' / 'photoat-001_H_000.endf'
data = openmc.data.IncidentPhoton.from_endf(photoatomic_file)
data.export_to_hdf5('tmp.h5', 'w') | true | true |
f7274ee40debdeaa4b9393203cab8d398b64d837 | 756 | py | Python | v_python/conftest.py | spcartman/selenium_full_course | 673f25dcf2340c0c14666c7a91f774fd7659f0b1 | [
"MIT"
] | null | null | null | v_python/conftest.py | spcartman/selenium_full_course | 673f25dcf2340c0c14666c7a91f774fd7659f0b1 | [
"MIT"
] | null | null | null | v_python/conftest.py | spcartman/selenium_full_course | 673f25dcf2340c0c14666c7a91f774fd7659f0b1 | [
"MIT"
] | null | null | null | import pytest
import json
from os import path
from fixture.fixture import Fixture
with open(path.join(path.dirname(path.abspath(__file__)), 'config.json')) as f:
config = json.load(f)
@pytest.fixture(scope="session")
def app(request):
fixture = Fixture(admin_root=config['admin']['url'],
admin_countries_url=config['admin']['countries_url'],
admin_zones_url=config['admin']['zones_url'],
admin_catalog_url=config['admin']['catalog_url'],
admin_name=config['admin']['name'],
admin_password=config['admin']['password'],
shop_root=config['shop']['url'])
request.addfinalizer(fixture.destroy)
return fixture
| 34.363636 | 79 | 0.611111 | import pytest
import json
from os import path
from fixture.fixture import Fixture
with open(path.join(path.dirname(path.abspath(__file__)), 'config.json')) as f:
config = json.load(f)
@pytest.fixture(scope="session")
def app(request):
fixture = Fixture(admin_root=config['admin']['url'],
admin_countries_url=config['admin']['countries_url'],
admin_zones_url=config['admin']['zones_url'],
admin_catalog_url=config['admin']['catalog_url'],
admin_name=config['admin']['name'],
admin_password=config['admin']['password'],
shop_root=config['shop']['url'])
request.addfinalizer(fixture.destroy)
return fixture
| true | true |
f7275019da64b65a5d33210b547cf8cc8acaac87 | 1,094 | py | Python | bitoptions/widgets.py | amateja/django-bitoptions | 6e2d00d8b5d16c4a678a319c06313de6d2c75eda | [
"Unlicense"
] | 3 | 2016-03-16T03:11:01.000Z | 2016-12-31T06:20:57.000Z | bitoptions/widgets.py | amateja/django-bitoptions | 6e2d00d8b5d16c4a678a319c06313de6d2c75eda | [
"Unlicense"
] | 6 | 2018-06-12T12:40:22.000Z | 2018-06-18T09:46:46.000Z | bitoptions/widgets.py | amateja/django-bitoptions | 6e2d00d8b5d16c4a678a319c06313de6d2c75eda | [
"Unlicense"
] | null | null | null | from django import forms
from .utils import number2powers, BitOptions
class BitOptionsWidget(forms.CheckboxSelectMultiple):
"""
Default BitOptionsField widget to present every option (bit) as checkbox.
"""
def value_from_datadict(self, data, files, name):
"""
Given a dictionary of data and this widget's name, returns the value of
this widget.
"""
return sum(map(int, super(BitOptionsWidget, self).value_from_datadict(
data, files, name)))
def render(self, name, value, attrs=None, renderer=None):
"""
Returns HTML for the widget, as a Unicode string.
"""
if isinstance(value, BitOptions):
value = list(number2powers(value.value))
elif isinstance(value, int):
value = list(number2powers(value))
try:
return super(BitOptionsWidget, self).render(name, value,
attrs, renderer)
except TypeError:
return super(BitOptionsWidget, self).render(name, value, attrs)
| 34.1875 | 79 | 0.606947 | from django import forms
from .utils import number2powers, BitOptions
class BitOptionsWidget(forms.CheckboxSelectMultiple):
def value_from_datadict(self, data, files, name):
return sum(map(int, super(BitOptionsWidget, self).value_from_datadict(
data, files, name)))
def render(self, name, value, attrs=None, renderer=None):
if isinstance(value, BitOptions):
value = list(number2powers(value.value))
elif isinstance(value, int):
value = list(number2powers(value))
try:
return super(BitOptionsWidget, self).render(name, value,
attrs, renderer)
except TypeError:
return super(BitOptionsWidget, self).render(name, value, attrs)
| true | true |
f72753101e10bb8565a1a21aa5043b6b642088a5 | 2,482 | py | Python | sdk/python/pulumi_azure_native/network/v20180601/get_virtual_network_gateway_learned_routes.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20180601/get_virtual_network_gateway_learned_routes.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20180601/get_virtual_network_gateway_learned_routes.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . import outputs
__all__ = [
'GetVirtualNetworkGatewayLearnedRoutesResult',
'AwaitableGetVirtualNetworkGatewayLearnedRoutesResult',
'get_virtual_network_gateway_learned_routes',
]
@pulumi.output_type
class GetVirtualNetworkGatewayLearnedRoutesResult:
"""
List of virtual network gateway routes
"""
def __init__(__self__, value=None):
if value and not isinstance(value, list):
raise TypeError("Expected argument 'value' to be a list")
pulumi.set(__self__, "value", value)
@property
@pulumi.getter
def value(self) -> Optional[Sequence['outputs.GatewayRouteResponse']]:
"""
List of gateway routes
"""
return pulumi.get(self, "value")
class AwaitableGetVirtualNetworkGatewayLearnedRoutesResult(GetVirtualNetworkGatewayLearnedRoutesResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetVirtualNetworkGatewayLearnedRoutesResult(
value=self.value)
def get_virtual_network_gateway_learned_routes(resource_group_name: Optional[str] = None,
virtual_network_gateway_name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVirtualNetworkGatewayLearnedRoutesResult:
"""
List of virtual network gateway routes
:param str resource_group_name: The name of the resource group.
:param str virtual_network_gateway_name: The name of the virtual network gateway.
"""
__args__ = dict()
__args__['resourceGroupName'] = resource_group_name
__args__['virtualNetworkGatewayName'] = virtual_network_gateway_name
if opts is None:
opts = pulumi.InvokeOptions()
if opts.version is None:
opts.version = _utilities.get_version()
__ret__ = pulumi.runtime.invoke('azure-native:network/v20180601:getVirtualNetworkGatewayLearnedRoutes', __args__, opts=opts, typ=GetVirtualNetworkGatewayLearnedRoutesResult).value
return AwaitableGetVirtualNetworkGatewayLearnedRoutesResult(
value=__ret__.value)
| 37.044776 | 183 | 0.711523 |
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from . import outputs
__all__ = [
'GetVirtualNetworkGatewayLearnedRoutesResult',
'AwaitableGetVirtualNetworkGatewayLearnedRoutesResult',
'get_virtual_network_gateway_learned_routes',
]
@pulumi.output_type
class GetVirtualNetworkGatewayLearnedRoutesResult:
def __init__(__self__, value=None):
if value and not isinstance(value, list):
raise TypeError("Expected argument 'value' to be a list")
pulumi.set(__self__, "value", value)
@property
@pulumi.getter
def value(self) -> Optional[Sequence['outputs.GatewayRouteResponse']]:
return pulumi.get(self, "value")
class AwaitableGetVirtualNetworkGatewayLearnedRoutesResult(GetVirtualNetworkGatewayLearnedRoutesResult):
# pylint: disable=using-constant-test
def __await__(self):
if False:
yield self
return GetVirtualNetworkGatewayLearnedRoutesResult(
value=self.value)
def get_virtual_network_gateway_learned_routes(resource_group_name: Optional[str] = None,
virtual_network_gateway_name: Optional[str] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVirtualNetworkGatewayLearnedRoutesResult:
__args__ = dict()
__args__['resourceGroupName'] = resource_group_name
__args__['virtualNetworkGatewayName'] = virtual_network_gateway_name
if opts is None:
opts = pulumi.InvokeOptions()
if opts.version is None:
opts.version = _utilities.get_version()
__ret__ = pulumi.runtime.invoke('azure-native:network/v20180601:getVirtualNetworkGatewayLearnedRoutes', __args__, opts=opts, typ=GetVirtualNetworkGatewayLearnedRoutesResult).value
return AwaitableGetVirtualNetworkGatewayLearnedRoutesResult(
value=__ret__.value)
| true | true |
f727542bee6fa712929c024c3afa8e0aad944e62 | 1,255 | py | Python | imaging_db/database/dataset.py | czbiohub/imagingDB | 1b1a58df3dbc94a43fb842cad198fb6c1c833326 | [
"MIT"
] | 5 | 2018-11-07T15:37:41.000Z | 2020-05-27T10:29:02.000Z | imaging_db/database/dataset.py | czbiohub/imagingDB | 1b1a58df3dbc94a43fb842cad198fb6c1c833326 | [
"MIT"
] | 39 | 2018-11-07T21:06:42.000Z | 2019-09-30T21:33:31.000Z | imaging_db/database/dataset.py | czbiohub/imagingDB | 1b1a58df3dbc94a43fb842cad198fb6c1c833326 | [
"MIT"
] | 2 | 2019-11-04T22:25:04.000Z | 2020-11-04T04:13:20.000Z | # coding=utf-8
from datetime import datetime
from sqlalchemy import Column, String, Integer, Boolean, ForeignKey, DateTime
from imaging_db.database.base import Base
def _serial_to_date_time(dataset_serial):
substrs = dataset_serial.split("-")
date_time = datetime(int(substrs[1]), # year
int(substrs[2]), # month
int(substrs[3]), # day
int(substrs[4]), # hour
int(substrs[5]), # minute
int(substrs[6]), # second
)
return date_time
class DataSet(Base):
__tablename__ = 'data_set'
id = Column(Integer, primary_key=True)
dataset_serial = Column(String)
description = Column(String)
microscope = Column(String)
frames = Column(Boolean)
date_time = Column(DateTime)
parent_id = Column(Integer, ForeignKey("data_set.id"))
def __init__(self, dataset_serial, description, microscope, frames, parent_id):
self.dataset_serial = dataset_serial
self.description = description
self.microscope = microscope
self.frames = frames
self.date_time = _serial_to_date_time(dataset_serial)
self.parent_id = parent_id
| 32.179487 | 83 | 0.620717 |
from datetime import datetime
from sqlalchemy import Column, String, Integer, Boolean, ForeignKey, DateTime
from imaging_db.database.base import Base
def _serial_to_date_time(dataset_serial):
substrs = dataset_serial.split("-")
date_time = datetime(int(substrs[1]),
int(substrs[2]),
int(substrs[3]),
int(substrs[4]),
int(substrs[5]),
int(substrs[6]),
)
return date_time
class DataSet(Base):
__tablename__ = 'data_set'
id = Column(Integer, primary_key=True)
dataset_serial = Column(String)
description = Column(String)
microscope = Column(String)
frames = Column(Boolean)
date_time = Column(DateTime)
parent_id = Column(Integer, ForeignKey("data_set.id"))
def __init__(self, dataset_serial, description, microscope, frames, parent_id):
self.dataset_serial = dataset_serial
self.description = description
self.microscope = microscope
self.frames = frames
self.date_time = _serial_to_date_time(dataset_serial)
self.parent_id = parent_id
| true | true |
f7275494b8cb9e77d969fcf6476d10ca21e0e71f | 3,818 | py | Python | salt/sdb/confidant.py | pass-by-value/salt | 2ede44fe54516242e10fe428629d5f5a18e5f7ea | [
"Apache-2.0",
"MIT"
] | 2 | 2015-09-21T14:13:30.000Z | 2016-02-12T11:33:46.000Z | salt/sdb/confidant.py | pass-by-value/salt | 2ede44fe54516242e10fe428629d5f5a18e5f7ea | [
"Apache-2.0",
"MIT"
] | 1 | 2019-09-06T13:57:28.000Z | 2019-09-06T13:57:28.000Z | salt/sdb/confidant.py | pass-by-value/salt | 2ede44fe54516242e10fe428629d5f5a18e5f7ea | [
"Apache-2.0",
"MIT"
] | 2 | 2017-01-05T16:14:59.000Z | 2019-01-31T23:15:25.000Z | # -*- coding: utf-8 -*-
'''
An SDB module for getting credentials from confidant.
Configuring the Confidant module
================================
The module can be configured via sdb in the minion config:
.. code-block:: yaml
confidant:
driver: confidant
# The URL of the confidant web service
url: 'https://confidant-production.example.com'
# The context to use for KMS authentication
auth_context:
from: example-production-iad
to: confidant-production-iad
user_type: service
# The KMS master key to use for authentication
auth_key: "alias/authnz"
# Cache file for KMS auth token
token_cache_file: /run/confidant/confidant_token
# The duration of the validity of a token, in minutes
token_duration: 60
# key, keyid and region can be defined in the profile, but it's generally
# best to use IAM roles or environment variables for AWS auth.
keyid: 98nh9h9h908h09kjjk
key: jhf908gyeghehe0he0g8h9u0j0n0n09hj09h0
region: us-east-1
:depends: confidant-common, confidant-client
Module Documentation
====================
'''
from __future__ import absolute_import
# Import python libs
import logging
import copy
# Import third party libs
try:
import confidant.client
import confidant.formatter
HAS_LIBS = True
except ImportError:
HAS_LIBS = False
# Set up logging
log = logging.getLogger(__name__)
__virtualname__ = 'confidant'
def __virtual__():
'''
Only return if requests and boto are installed.
'''
if HAS_LIBS:
return __virtualname__
else:
return False
def get(key, profile=None):
'''
Read pillar data from Confidant via its API.
CLI Example:
salt myminion sdb.get 'sdb://confidant/credentials'
Valid keys are: credentials, credentials_metadata, result. credentials
returns a dict of joined credential_pairs, credentials_metadata returns a
dict of metadata relevant to the credentials mapped to the confidant
service, and result returns a bool that can be used to determine if the sdb
call succeded or failed to fetch credentials from confidant (or from local
cache). If result is false, the data in credentials or credentials_metadata
can't be trusted.
'''
# default to returning failure
ret = {'result': False, 'credentials': None, 'credentials_metadata': None}
profile_data = copy.deepcopy(profile)
if profile_data.get('disabled', False):
ret['result'] = True
return ret.get(key)
token_version = profile_data.get('token_version', 1)
try:
url = profile_data['url']
auth_key = profile_data['auth_key']
auth_context = profile_data['auth_context']
role = auth_context['from']
except (KeyError, TypeError):
msg = ('profile has undefined url, auth_key or auth_context')
log.debug(msg)
return ret.get(key)
region = profile_data.get('region', 'us-east-1')
token_duration = profile_data.get('token_duration', 60)
retries = profile_data.get('retries', 5)
token_cache_file = profile_data.get('token_cache_file')
backoff = profile_data.get('backoff', 1)
client = confidant.client.ConfidantClient(
url,
auth_key,
auth_context,
token_lifetime=token_duration,
token_version=token_version,
token_cache_file=token_cache_file,
region=region,
retries=retries,
backoff=backoff
)
try:
data = client.get_service(
role,
decrypt_blind=True
)
except confidant.client.TokenCreationError:
return ret.get(key)
if not data['result']:
return ret.get(key)
ret = confidant.formatter.combined_credential_pair_format(data)
ret['result'] = True
return ret.get(key)
| 29.828125 | 79 | 0.678104 |
from __future__ import absolute_import
import logging
import copy
try:
import confidant.client
import confidant.formatter
HAS_LIBS = True
except ImportError:
HAS_LIBS = False
log = logging.getLogger(__name__)
__virtualname__ = 'confidant'
def __virtual__():
if HAS_LIBS:
return __virtualname__
else:
return False
def get(key, profile=None):
ret = {'result': False, 'credentials': None, 'credentials_metadata': None}
profile_data = copy.deepcopy(profile)
if profile_data.get('disabled', False):
ret['result'] = True
return ret.get(key)
token_version = profile_data.get('token_version', 1)
try:
url = profile_data['url']
auth_key = profile_data['auth_key']
auth_context = profile_data['auth_context']
role = auth_context['from']
except (KeyError, TypeError):
msg = ('profile has undefined url, auth_key or auth_context')
log.debug(msg)
return ret.get(key)
region = profile_data.get('region', 'us-east-1')
token_duration = profile_data.get('token_duration', 60)
retries = profile_data.get('retries', 5)
token_cache_file = profile_data.get('token_cache_file')
backoff = profile_data.get('backoff', 1)
client = confidant.client.ConfidantClient(
url,
auth_key,
auth_context,
token_lifetime=token_duration,
token_version=token_version,
token_cache_file=token_cache_file,
region=region,
retries=retries,
backoff=backoff
)
try:
data = client.get_service(
role,
decrypt_blind=True
)
except confidant.client.TokenCreationError:
return ret.get(key)
if not data['result']:
return ret.get(key)
ret = confidant.formatter.combined_credential_pair_format(data)
ret['result'] = True
return ret.get(key)
| true | true |
f72755a1c07aa293fbde7de86964d0198d4ff90b | 2,102 | py | Python | hair_seg/evaluate.py | eric91sanchez/hair_seg | 4f688daac0ec4ea906ff0462ae51634293e35447 | [
"MIT"
] | 4 | 2021-03-04T05:57:45.000Z | 2022-02-15T17:40:57.000Z | hair_seg/evaluate.py | vadik6666/hair-seg | 4f688daac0ec4ea906ff0462ae51634293e35447 | [
"MIT"
] | 4 | 2021-06-08T22:43:59.000Z | 2022-03-12T00:51:40.000Z | hair_seg/evaluate.py | vadik6666/hair_seg | 4f688daac0ec4ea906ff0462ae51634293e35447 | [
"MIT"
] | null | null | null | """
Evaluate
"""
import re
import math
import datetime
import random
import torch
from torch.nn import functional as F
from torch.utils.data import DataLoader
import matplotlib.pyplot as plt
from loss import iou_loss, HairMattingLoss, acc_loss, F1_loss
from utils import create_multi_figure
USE_CUDA = torch.cuda.is_available()
DEVICE = torch.device("cuda" if USE_CUDA else "cpu")
def evalTest(test_data, model, args):
testloader = DataLoader(test_data, batch_size=4, shuffle=False)
hairmat_loss = HairMattingLoss(args.grad_lambda)
total_loss, total_iou, total_acc, total_f1 = 0, 0, 0, 0
for batch in testloader:
image, mask = (i.to(DEVICE) for i in batch)
pred = model(image)
total_loss += hairmat_loss(pred, mask, image).item()
iloss = iou_loss(pred, mask).item()
total_iou += iloss
aloss = acc_loss(pred, mask).item()
total_acc += aloss
floss = F1_loss(pred, mask).item()
total_f1 += floss
print("Testing Loss: ", total_loss / len(testloader))
print("Testing IOU: ", total_iou / len(testloader))
print("Testing Acc: ", total_acc / len(testloader))
print("Testing F1: ", total_f1 / len(testloader))
def evaluateOne(img, model, absolute=True):
img = img.to(DEVICE).unsqueeze(0)
pred = model(img)
if absolute:
pred[pred > 0.5] = 1.0
pred[pred <= 0.5] = 0.0
else:
pred[pred < 0.4] = 0
# pred[pred < .90] = 0
rows = [[img[0], pred[0]]]
create_multi_figure(rows, dye=True)
plt.savefig("result.jpg")
def evaluate(test_data, model, num, absolute=True):
rows = [None] * num
for i in range(num):
idx = random.randint(0, len(test_data) - 1)
image, mask = (i.to(DEVICE).unsqueeze(0) for i in test_data[idx])
pred = model(image)
if absolute:
pred[pred > 0.5] = 1.0
pred[pred <= 0.5] = 0.0
else:
pred[pred < 0.4] = 0
rows[i] = [image[0], mask[0], pred[0]] # get batch
create_multi_figure(rows, dye=True)
plt.savefig("result.jpg")
| 26.948718 | 73 | 0.62274 |
import re
import math
import datetime
import random
import torch
from torch.nn import functional as F
from torch.utils.data import DataLoader
import matplotlib.pyplot as plt
from loss import iou_loss, HairMattingLoss, acc_loss, F1_loss
from utils import create_multi_figure
USE_CUDA = torch.cuda.is_available()
DEVICE = torch.device("cuda" if USE_CUDA else "cpu")
def evalTest(test_data, model, args):
testloader = DataLoader(test_data, batch_size=4, shuffle=False)
hairmat_loss = HairMattingLoss(args.grad_lambda)
total_loss, total_iou, total_acc, total_f1 = 0, 0, 0, 0
for batch in testloader:
image, mask = (i.to(DEVICE) for i in batch)
pred = model(image)
total_loss += hairmat_loss(pred, mask, image).item()
iloss = iou_loss(pred, mask).item()
total_iou += iloss
aloss = acc_loss(pred, mask).item()
total_acc += aloss
floss = F1_loss(pred, mask).item()
total_f1 += floss
print("Testing Loss: ", total_loss / len(testloader))
print("Testing IOU: ", total_iou / len(testloader))
print("Testing Acc: ", total_acc / len(testloader))
print("Testing F1: ", total_f1 / len(testloader))
def evaluateOne(img, model, absolute=True):
img = img.to(DEVICE).unsqueeze(0)
pred = model(img)
if absolute:
pred[pred > 0.5] = 1.0
pred[pred <= 0.5] = 0.0
else:
pred[pred < 0.4] = 0
rows = [[img[0], pred[0]]]
create_multi_figure(rows, dye=True)
plt.savefig("result.jpg")
def evaluate(test_data, model, num, absolute=True):
rows = [None] * num
for i in range(num):
idx = random.randint(0, len(test_data) - 1)
image, mask = (i.to(DEVICE).unsqueeze(0) for i in test_data[idx])
pred = model(image)
if absolute:
pred[pred > 0.5] = 1.0
pred[pred <= 0.5] = 0.0
else:
pred[pred < 0.4] = 0
rows[i] = [image[0], mask[0], pred[0]]
create_multi_figure(rows, dye=True)
plt.savefig("result.jpg")
| true | true |
f72755d6fecdb1531c133393712bc30acc965025 | 5,519 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/aio/operations_async/_network_interface_load_balancers_operations_async.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2019-05-17T21:24:53.000Z | 2020-02-12T11:13:42.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/aio/operations_async/_network_interface_load_balancers_operations_async.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 15 | 2019-07-12T18:18:04.000Z | 2019-07-25T20:55:51.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/aio/operations_async/_network_interface_load_balancers_operations_async.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
class NetworkInterfaceLoadBalancersOperations:
"""NetworkInterfaceLoadBalancersOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that
instantiates it for you and attaches it as an attribute.
:ivar models: Alias to model classes used in this operation group.
:type models: ~azure.mgmt.network.v2020_04_01.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
"""
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config
def list(
self,
resource_group_name: str,
network_interface_name: str,
**kwargs
) -> AsyncIterable["models.NetworkInterfaceLoadBalancerListResult"]:
"""List all load balancers in a network interface.
:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param network_interface_name: The name of the network interface.
:type network_interface_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either NetworkInterfaceLoadBalancerListResult or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2020_04_01.models.NetworkInterfaceLoadBalancerListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.NetworkInterfaceLoadBalancerListResult"]
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-04-01"
def prepare_request(next_link=None):
if not next_link:
# Construct URL
url = self.list.metadata['url'] # type: ignore
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
else:
url = next_link
query_parameters = {} # type: Dict[str, Any]
# Construct headers
header_parameters = {} # type: Dict[str, Any]
header_parameters['Accept'] = 'application/json'
# Construct and send request
request = self._client.get(url, query_parameters, header_parameters)
return request
async def extract_data(pipeline_response):
deserialized = self._deserialize('NetworkInterfaceLoadBalancerListResult', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return deserialized.next_link or None, AsyncList(list_of_elem)
async def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
return pipeline_response
return AsyncItemPaged(
get_next, extract_data
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers'} # type: ignore
| 48.412281 | 196 | 0.673854 |
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core.exceptions import ARMErrorFormat
from ... import models
T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
class NetworkInterfaceLoadBalancersOperations:
models = models
def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self._config = config
def list(
self,
resource_group_name: str,
network_interface_name: str,
**kwargs
) -> AsyncIterable["models.NetworkInterfaceLoadBalancerListResult"]:
cls = kwargs.pop('cls', None)
error_map = {404: ResourceNotFoundError, 409: ResourceExistsError}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-04-01"
def prepare_request(next_link=None):
if not next_link:
url = self.list.metadata['url']
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'),
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')
else:
url = next_link
query_parameters = {}
header_parameters = {}
header_parameters['Accept'] = 'application/json'
request = self._client.get(url, query_parameters, header_parameters)
return request
async def extract_data(pipeline_response):
deserialized = self._deserialize('NetworkInterfaceLoadBalancerListResult', pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return deserialized.next_link or None, AsyncList(list_of_elem)
async def get_next(next_link=None):
request = prepare_request(next_link)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response
if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
return pipeline_response
return AsyncItemPaged(
get_next, extract_data
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers'}
| true | true |
f727572624c9b1104e87598335f97c84bacafded | 842 | py | Python | src/testing/migrations/0006_auto_20210617_1656.py | DiceNameIsMy/testing_sitev2 | c973f796bd1bd7cfcfc53298a3884b92d2a36d27 | [
"MIT"
] | 1 | 2021-06-29T09:47:25.000Z | 2021-06-29T09:47:25.000Z | src/testing/migrations/0006_auto_20210617_1656.py | DiceNameIsMy/testing_sitev2 | c973f796bd1bd7cfcfc53298a3884b92d2a36d27 | [
"MIT"
] | null | null | null | src/testing/migrations/0006_auto_20210617_1656.py | DiceNameIsMy/testing_sitev2 | c973f796bd1bd7cfcfc53298a3884b92d2a36d27 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-06-17 10:56
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('testing', '0005_useranswer_is_correct'),
]
operations = [
migrations.AddField(
model_name='usertestresult',
name='end_time',
field=models.DateTimeField(default=datetime.datetime(2021, 6, 17, 17, 56, 54, 101323)),
),
migrations.AddField(
model_name='usertestresult',
name='is_completed',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='usertestresult',
name='start_time',
field=models.DateTimeField(default=datetime.datetime(2021, 6, 17, 16, 56, 54, 101302)),
),
]
| 28.066667 | 99 | 0.599762 |
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('testing', '0005_useranswer_is_correct'),
]
operations = [
migrations.AddField(
model_name='usertestresult',
name='end_time',
field=models.DateTimeField(default=datetime.datetime(2021, 6, 17, 17, 56, 54, 101323)),
),
migrations.AddField(
model_name='usertestresult',
name='is_completed',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='usertestresult',
name='start_time',
field=models.DateTimeField(default=datetime.datetime(2021, 6, 17, 16, 56, 54, 101302)),
),
]
| true | true |
f72757698a249ebc1ea831e90b3b83ef1660ea9a | 3,589 | py | Python | google/cloud/recommender/v1beta1/recommender-v1beta1-py/noxfile.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/recommender/v1beta1/recommender-v1beta1-py/noxfile.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/recommender/v1beta1/recommender-v1beta1-py/noxfile.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import os
import pathlib
import shutil
import subprocess
import sys
import nox # type: ignore
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt"
PACKAGE_NAME = subprocess.check_output([sys.executable, "setup.py", "--name"], encoding="utf-8")
nox.sessions = [
"unit",
"cover",
"mypy",
"check_lower_bounds"
# exclude update_lower_bounds from default
"docs",
]
@nox.session(python=['3.6', '3.7', '3.8', '3.9'])
def unit(session):
"""Run the unit test suite."""
session.install('coverage', 'pytest', 'pytest-cov', 'asyncmock', 'pytest-asyncio')
session.install('-e', '.')
session.run(
'py.test',
'--quiet',
'--cov=google/cloud/recommender_v1beta1/',
'--cov-config=.coveragerc',
'--cov-report=term',
'--cov-report=html',
os.path.join('tests', 'unit', ''.join(session.posargs))
)
@nox.session(python='3.7')
def cover(session):
"""Run the final coverage report.
This outputs the coverage report aggregating coverage from the unit
test runs (not system test runs), and then erases coverage data.
"""
session.install("coverage", "pytest-cov")
session.run("coverage", "report", "--show-missing", "--fail-under=100")
session.run("coverage", "erase")
@nox.session(python=['3.6', '3.7'])
def mypy(session):
"""Run the type checker."""
session.install('mypy', 'types-pkg_resources')
session.install('.')
session.run(
'mypy',
'--explicit-package-bases',
'google',
)
@nox.session
def update_lower_bounds(session):
"""Update lower bounds in constraints.txt to match setup.py"""
session.install('google-cloud-testutils')
session.install('.')
session.run(
'lower-bound-checker',
'update',
'--package-name',
PACKAGE_NAME,
'--constraints-file',
str(LOWER_BOUND_CONSTRAINTS_FILE),
)
@nox.session
def check_lower_bounds(session):
"""Check lower bounds in setup.py are reflected in constraints file"""
session.install('google-cloud-testutils')
session.install('.')
session.run(
'lower-bound-checker',
'check',
'--package-name',
PACKAGE_NAME,
'--constraints-file',
str(LOWER_BOUND_CONSTRAINTS_FILE),
)
@nox.session(python='3.6')
def docs(session):
"""Build the docs for this library."""
session.install("-e", ".")
session.install("sphinx<3.0.0", "alabaster", "recommonmark")
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
"sphinx-build",
"-W", # warnings as errors
"-T", # show full traceback on exception
"-N", # no colors
"-b",
"html",
"-d",
os.path.join("docs", "_build", "doctrees", ""),
os.path.join("docs", ""),
os.path.join("docs", "_build", "html", ""),
)
| 26.984962 | 96 | 0.627751 |
import os
import pathlib
import shutil
import subprocess
import sys
import nox
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
LOWER_BOUND_CONSTRAINTS_FILE = CURRENT_DIRECTORY / "constraints.txt"
PACKAGE_NAME = subprocess.check_output([sys.executable, "setup.py", "--name"], encoding="utf-8")
nox.sessions = [
"unit",
"cover",
"mypy",
"check_lower_bounds"
"docs",
]
@nox.session(python=['3.6', '3.7', '3.8', '3.9'])
def unit(session):
session.install('coverage', 'pytest', 'pytest-cov', 'asyncmock', 'pytest-asyncio')
session.install('-e', '.')
session.run(
'py.test',
'--quiet',
'--cov=google/cloud/recommender_v1beta1/',
'--cov-config=.coveragerc',
'--cov-report=term',
'--cov-report=html',
os.path.join('tests', 'unit', ''.join(session.posargs))
)
@nox.session(python='3.7')
def cover(session):
session.install("coverage", "pytest-cov")
session.run("coverage", "report", "--show-missing", "--fail-under=100")
session.run("coverage", "erase")
@nox.session(python=['3.6', '3.7'])
def mypy(session):
session.install('mypy', 'types-pkg_resources')
session.install('.')
session.run(
'mypy',
'--explicit-package-bases',
'google',
)
@nox.session
def update_lower_bounds(session):
session.install('google-cloud-testutils')
session.install('.')
session.run(
'lower-bound-checker',
'update',
'--package-name',
PACKAGE_NAME,
'--constraints-file',
str(LOWER_BOUND_CONSTRAINTS_FILE),
)
@nox.session
def check_lower_bounds(session):
session.install('google-cloud-testutils')
session.install('.')
session.run(
'lower-bound-checker',
'check',
'--package-name',
PACKAGE_NAME,
'--constraints-file',
str(LOWER_BOUND_CONSTRAINTS_FILE),
)
@nox.session(python='3.6')
def docs(session):
session.install("-e", ".")
session.install("sphinx<3.0.0", "alabaster", "recommonmark")
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
session.run(
"sphinx-build",
"-W",
"-T",
"-N",
"-b",
"html",
"-d",
os.path.join("docs", "_build", "doctrees", ""),
os.path.join("docs", ""),
os.path.join("docs", "_build", "html", ""),
)
| true | true |
f727578d6163bc38fe54684ae5660bc222bf771a | 9,991 | py | Python | improver_tests/between_thresholds/test_between_thresholds.py | pnijhara/improver | 5961a6fab9a79cd63a943eff07bf79d4e5f0ff03 | [
"BSD-3-Clause"
] | null | null | null | improver_tests/between_thresholds/test_between_thresholds.py | pnijhara/improver | 5961a6fab9a79cd63a943eff07bf79d4e5f0ff03 | [
"BSD-3-Clause"
] | null | null | null | improver_tests/between_thresholds/test_between_thresholds.py | pnijhara/improver | 5961a6fab9a79cd63a943eff07bf79d4e5f0ff03 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2020 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# * Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
"""Tests for the OccurrenceBetweenThresholds plugin"""
import unittest
import iris
import numpy as np
from iris.tests import IrisTest
from improver.between_thresholds import OccurrenceBetweenThresholds
from ..set_up_test_cubes import set_up_percentile_cube, set_up_probability_cube
class Test_process(IrisTest):
"""Test the process method"""
def setUp(self):
"""Set up a test cube with probability data"""
data = np.array(
[
[[1.0, 1.0, 1.0], [1.0, 1.0, 1.0], [1.0, 1.0, 1.0]],
[[0.9, 0.9, 0.9], [0.8, 0.8, 0.8], [0.7, 0.7, 0.7]],
[[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3]],
[[0.0, 0.0, 0.0], [0.1, 0.1, 0.1], [0.1, 0.2, 0.2]],
],
dtype=np.float32,
)
temp_thresholds = np.array([279, 280, 281, 282], dtype=np.float32)
vis_thresholds = np.array([100, 1000, 5000, 10000], dtype=np.float32)
self.temp_cube = set_up_probability_cube(data, temp_thresholds)
self.vis_cube = set_up_probability_cube(
np.flip(data, axis=0),
vis_thresholds,
variable_name="visibility",
threshold_units="m",
spp__relative_to_threshold="below",
)
# set up a cube of rainfall rates in m s-1 (~1e-8 values)
self.precip_cube = self.temp_cube.copy()
self.precip_cube.coord("air_temperature").rename("rainfall_rate")
self.precip_cube.coord("rainfall_rate").var_name = "threshold"
self.precip_cube.coord("rainfall_rate").points = np.array(
[0, 0.25, 0.5, 1], dtype=np.float32
)
self.precip_cube.coord("rainfall_rate").units = "mm h-1"
self.precip_cube.coord("rainfall_rate").convert_units("m s-1")
def test_above_threshold(self):
"""Test values from an "above threshold" cube"""
threshold_ranges = [[280, 281], [281, 282]]
expected_data = np.array(
[
[[0.8, 0.7, 0.6], [0.7, 0.6, 0.5], [0.6, 0.5, 0.4]],
[[0.1, 0.2, 0.3], [0.0, 0.1, 0.2], [0.0, 0.0, 0.1]],
],
dtype=np.float32,
)
plugin = OccurrenceBetweenThresholds(threshold_ranges.copy(), "K")
result = plugin(self.temp_cube)
self.assertIsInstance(result, iris.cube.Cube)
self.assertEqual(
result.name(), "probability_of_air_temperature_between_thresholds"
)
self.assertArrayAlmostEqual(result.data, expected_data)
thresh_coord = result.coord("air_temperature")
self.assertArrayAlmostEqual(thresh_coord.points, [281.0, 282.0])
self.assertArrayAlmostEqual(thresh_coord.bounds, threshold_ranges)
self.assertEqual(
thresh_coord.attributes["spp__relative_to_threshold"], "between_thresholds"
)
def test_below_threshold(self):
"""Test values from a "below threshold" cube"""
threshold_ranges = [[1000, 5000]]
expected_data = np.array(
[[0.8, 0.7, 0.6], [0.7, 0.6, 0.5], [0.6, 0.5, 0.4]], dtype=np.float32
)
plugin = OccurrenceBetweenThresholds(threshold_ranges.copy(), "m")
result = plugin(self.vis_cube)
self.assertArrayAlmostEqual(result.data, expected_data)
self.assertArrayAlmostEqual(result.coord("visibility").points, [5000.0])
self.assertArrayAlmostEqual(result.coord("visibility").bounds, threshold_ranges)
def test_skip_threshold(self):
"""Test calculation works for non-adjacent thresholds"""
threshold_ranges = [[100, 1000], [1000, 10000]]
expected_data = np.array(
[
[[0.1, 0.2, 0.3], [0.0, 0.1, 0.2], [0.0, 0.0, 0.1]],
[[0.9, 0.8, 0.7], [0.9, 0.8, 0.7], [0.9, 0.8, 0.7]],
],
dtype=np.float32,
)
plugin = OccurrenceBetweenThresholds(threshold_ranges, "m")
result = plugin(self.vis_cube)
self.assertArrayAlmostEqual(result.data, expected_data)
def test_threshold_units(self):
"""Test calculation works for thresholds specified in different units
from the cube data"""
threshold_ranges = [[0.1, 1], [1, 10]]
expected_data = np.array(
[
[[0.1, 0.2, 0.3], [0.0, 0.1, 0.2], [0.0, 0.0, 0.1]],
[[0.9, 0.8, 0.7], [0.9, 0.8, 0.7], [0.9, 0.8, 0.7]],
],
dtype=np.float32,
)
plugin = OccurrenceBetweenThresholds(threshold_ranges, "km")
result = plugin(self.vis_cube)
self.assertArrayAlmostEqual(result.data, expected_data)
# check original cube units are not modified
self.assertEqual(self.vis_cube.coord("visibility").units, "m")
# check output cube units match original cube
self.assertEqual(result.coord("visibility").units, "m")
self.assertArrayAlmostEqual(result.coord("visibility").points, [1000, 10000])
def test_error_non_probability_cube(self):
"""Test failure if cube doesn't contain probabilities"""
perc_cube = set_up_percentile_cube(
np.ones((3, 3, 3), dtype=np.float32),
np.array((25, 50, 75), dtype=np.float32),
)
plugin = OccurrenceBetweenThresholds([[25, 50]], "K")
msg = "Input is not a probability cube"
with self.assertRaisesRegex(ValueError, msg):
plugin(perc_cube)
def test_error_between_thresholds_cube(self):
"""Test failure if cube isn't above or below threshold"""
# use plugin to generate a "between_thresholds" cube...
between_thresholds_cube = OccurrenceBetweenThresholds(
[[280, 281], [281, 282]], "K"
)(self.temp_cube)
plugin = OccurrenceBetweenThresholds([[281, 282]], "K")
msg = "Input cube must contain"
with self.assertRaisesRegex(ValueError, msg):
plugin(between_thresholds_cube)
def test_error_thresholds_unavailable(self):
"""Test error if cube doesn't contain the required thresholds"""
threshold_ranges = [[10, 100], [1000, 30000]]
plugin = OccurrenceBetweenThresholds(threshold_ranges, "m")
msg = (
"visibility threshold 10 m is not available\n"
"visibility threshold 30000 m is not available"
)
with self.assertRaisesRegex(ValueError, msg):
plugin(self.vis_cube)
def test_threshold_matching_tolerance(self):
"""Test threshold matching succeeds for absolute values close to
zero"""
new_thresholds = np.array([272.15, 273.15, 274.15, 275.15], dtype=np.float32)
self.temp_cube.coord("air_temperature").points = new_thresholds
threshold_ranges = [[-1, 0], [0, 2]]
expected_data = np.array(
[
[[0.1, 0.1, 0.1], [0.2, 0.2, 0.2], [0.3, 0.3, 0.3]],
[[0.9, 0.9, 0.9], [0.7, 0.7, 0.7], [0.6, 0.5, 0.5]],
],
dtype=np.float32,
)
plugin = OccurrenceBetweenThresholds(threshold_ranges, "degC")
result = plugin(self.temp_cube)
self.assertArrayAlmostEqual(result.data, expected_data)
def test_thresholds_indistinguishable(self):
"""Test behaviour in a case where cube extraction cannot work within a
tolerance of 1e-5"""
# set threshold ranges in m s-1
points = self.precip_cube.coord("rainfall_rate").points.copy()
threshold_ranges = [[points[1], points[2]]]
msg = "Plugin cannot distinguish between thresholds at"
with self.assertRaisesRegex(ValueError, msg):
OccurrenceBetweenThresholds(threshold_ranges, "m s-1")
def test_original_units_indistinguishable(self):
"""Test cubes where thresholds are indistinguisable in SI units can be
correctly processed using threshold ranges specified in a unit with
more than 1e-5 discrimination"""
expected_data = np.array(
[[0.8, 0.7, 0.6], [0.7, 0.6, 0.5], [0.6, 0.5, 0.4]], dtype=np.float32
)
threshold_ranges = [[0.25, 0.5]]
plugin = OccurrenceBetweenThresholds(threshold_ranges, "mm h-1")
result = plugin(self.precip_cube)
self.assertArrayAlmostEqual(result.data, expected_data)
if __name__ == "__main__":
unittest.main()
| 44.404444 | 88 | 0.624362 |
import unittest
import iris
import numpy as np
from iris.tests import IrisTest
from improver.between_thresholds import OccurrenceBetweenThresholds
from ..set_up_test_cubes import set_up_percentile_cube, set_up_probability_cube
class Test_process(IrisTest):
def setUp(self):
data = np.array(
[
[[1.0, 1.0, 1.0], [1.0, 1.0, 1.0], [1.0, 1.0, 1.0]],
[[0.9, 0.9, 0.9], [0.8, 0.8, 0.8], [0.7, 0.7, 0.7]],
[[0.1, 0.2, 0.3], [0.1, 0.2, 0.3], [0.1, 0.2, 0.3]],
[[0.0, 0.0, 0.0], [0.1, 0.1, 0.1], [0.1, 0.2, 0.2]],
],
dtype=np.float32,
)
temp_thresholds = np.array([279, 280, 281, 282], dtype=np.float32)
vis_thresholds = np.array([100, 1000, 5000, 10000], dtype=np.float32)
self.temp_cube = set_up_probability_cube(data, temp_thresholds)
self.vis_cube = set_up_probability_cube(
np.flip(data, axis=0),
vis_thresholds,
variable_name="visibility",
threshold_units="m",
spp__relative_to_threshold="below",
)
self.precip_cube = self.temp_cube.copy()
self.precip_cube.coord("air_temperature").rename("rainfall_rate")
self.precip_cube.coord("rainfall_rate").var_name = "threshold"
self.precip_cube.coord("rainfall_rate").points = np.array(
[0, 0.25, 0.5, 1], dtype=np.float32
)
self.precip_cube.coord("rainfall_rate").units = "mm h-1"
self.precip_cube.coord("rainfall_rate").convert_units("m s-1")
def test_above_threshold(self):
threshold_ranges = [[280, 281], [281, 282]]
expected_data = np.array(
[
[[0.8, 0.7, 0.6], [0.7, 0.6, 0.5], [0.6, 0.5, 0.4]],
[[0.1, 0.2, 0.3], [0.0, 0.1, 0.2], [0.0, 0.0, 0.1]],
],
dtype=np.float32,
)
plugin = OccurrenceBetweenThresholds(threshold_ranges.copy(), "K")
result = plugin(self.temp_cube)
self.assertIsInstance(result, iris.cube.Cube)
self.assertEqual(
result.name(), "probability_of_air_temperature_between_thresholds"
)
self.assertArrayAlmostEqual(result.data, expected_data)
thresh_coord = result.coord("air_temperature")
self.assertArrayAlmostEqual(thresh_coord.points, [281.0, 282.0])
self.assertArrayAlmostEqual(thresh_coord.bounds, threshold_ranges)
self.assertEqual(
thresh_coord.attributes["spp__relative_to_threshold"], "between_thresholds"
)
def test_below_threshold(self):
threshold_ranges = [[1000, 5000]]
expected_data = np.array(
[[0.8, 0.7, 0.6], [0.7, 0.6, 0.5], [0.6, 0.5, 0.4]], dtype=np.float32
)
plugin = OccurrenceBetweenThresholds(threshold_ranges.copy(), "m")
result = plugin(self.vis_cube)
self.assertArrayAlmostEqual(result.data, expected_data)
self.assertArrayAlmostEqual(result.coord("visibility").points, [5000.0])
self.assertArrayAlmostEqual(result.coord("visibility").bounds, threshold_ranges)
def test_skip_threshold(self):
threshold_ranges = [[100, 1000], [1000, 10000]]
expected_data = np.array(
[
[[0.1, 0.2, 0.3], [0.0, 0.1, 0.2], [0.0, 0.0, 0.1]],
[[0.9, 0.8, 0.7], [0.9, 0.8, 0.7], [0.9, 0.8, 0.7]],
],
dtype=np.float32,
)
plugin = OccurrenceBetweenThresholds(threshold_ranges, "m")
result = plugin(self.vis_cube)
self.assertArrayAlmostEqual(result.data, expected_data)
def test_threshold_units(self):
threshold_ranges = [[0.1, 1], [1, 10]]
expected_data = np.array(
[
[[0.1, 0.2, 0.3], [0.0, 0.1, 0.2], [0.0, 0.0, 0.1]],
[[0.9, 0.8, 0.7], [0.9, 0.8, 0.7], [0.9, 0.8, 0.7]],
],
dtype=np.float32,
)
plugin = OccurrenceBetweenThresholds(threshold_ranges, "km")
result = plugin(self.vis_cube)
self.assertArrayAlmostEqual(result.data, expected_data)
self.assertEqual(self.vis_cube.coord("visibility").units, "m")
self.assertEqual(result.coord("visibility").units, "m")
self.assertArrayAlmostEqual(result.coord("visibility").points, [1000, 10000])
def test_error_non_probability_cube(self):
perc_cube = set_up_percentile_cube(
np.ones((3, 3, 3), dtype=np.float32),
np.array((25, 50, 75), dtype=np.float32),
)
plugin = OccurrenceBetweenThresholds([[25, 50]], "K")
msg = "Input is not a probability cube"
with self.assertRaisesRegex(ValueError, msg):
plugin(perc_cube)
def test_error_between_thresholds_cube(self):
between_thresholds_cube = OccurrenceBetweenThresholds(
[[280, 281], [281, 282]], "K"
)(self.temp_cube)
plugin = OccurrenceBetweenThresholds([[281, 282]], "K")
msg = "Input cube must contain"
with self.assertRaisesRegex(ValueError, msg):
plugin(between_thresholds_cube)
def test_error_thresholds_unavailable(self):
threshold_ranges = [[10, 100], [1000, 30000]]
plugin = OccurrenceBetweenThresholds(threshold_ranges, "m")
msg = (
"visibility threshold 10 m is not available\n"
"visibility threshold 30000 m is not available"
)
with self.assertRaisesRegex(ValueError, msg):
plugin(self.vis_cube)
def test_threshold_matching_tolerance(self):
new_thresholds = np.array([272.15, 273.15, 274.15, 275.15], dtype=np.float32)
self.temp_cube.coord("air_temperature").points = new_thresholds
threshold_ranges = [[-1, 0], [0, 2]]
expected_data = np.array(
[
[[0.1, 0.1, 0.1], [0.2, 0.2, 0.2], [0.3, 0.3, 0.3]],
[[0.9, 0.9, 0.9], [0.7, 0.7, 0.7], [0.6, 0.5, 0.5]],
],
dtype=np.float32,
)
plugin = OccurrenceBetweenThresholds(threshold_ranges, "degC")
result = plugin(self.temp_cube)
self.assertArrayAlmostEqual(result.data, expected_data)
def test_thresholds_indistinguishable(self):
points = self.precip_cube.coord("rainfall_rate").points.copy()
threshold_ranges = [[points[1], points[2]]]
msg = "Plugin cannot distinguish between thresholds at"
with self.assertRaisesRegex(ValueError, msg):
OccurrenceBetweenThresholds(threshold_ranges, "m s-1")
def test_original_units_indistinguishable(self):
expected_data = np.array(
[[0.8, 0.7, 0.6], [0.7, 0.6, 0.5], [0.6, 0.5, 0.4]], dtype=np.float32
)
threshold_ranges = [[0.25, 0.5]]
plugin = OccurrenceBetweenThresholds(threshold_ranges, "mm h-1")
result = plugin(self.precip_cube)
self.assertArrayAlmostEqual(result.data, expected_data)
if __name__ == "__main__":
unittest.main()
| true | true |
f72759c1213da47f3d4defce97fc37be89c0f650 | 142 | py | Python | service_app/service_app/doctype/service/test_service.py | NahomAraya/Erpnext-App | 4648aa95b1b6ebf4ef9f80c2c02dbeb22277531d | [
"MIT"
] | null | null | null | service_app/service_app/doctype/service/test_service.py | NahomAraya/Erpnext-App | 4648aa95b1b6ebf4ef9f80c2c02dbeb22277531d | [
"MIT"
] | null | null | null | service_app/service_app/doctype/service/test_service.py | NahomAraya/Erpnext-App | 4648aa95b1b6ebf4ef9f80c2c02dbeb22277531d | [
"MIT"
] | null | null | null | # Copyright (c) 2021, Appman and Contributors
# See license.txt
# import frappe
import unittest
class TestService(unittest.TestCase):
pass
| 15.777778 | 45 | 0.774648 |
import unittest
class TestService(unittest.TestCase):
pass
| true | true |
f72759c8061e47306fba82f635b426668b33c208 | 2,918 | py | Python | modules/swar/doc/splatted_prod.py | brycelelbach/nt2 | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | [
"BSL-1.0"
] | 1 | 2022-03-24T03:35:10.000Z | 2022-03-24T03:35:10.000Z | modules/swar/doc/splatted_prod.py | brycelelbach/nt2 | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | [
"BSL-1.0"
] | null | null | null | modules/swar/doc/splatted_prod.py | brycelelbach/nt2 | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | [
"BSL-1.0"
] | null | null | null | [ ## this file was manually modified by jt
{
'functor' : {
'arity' : '1',
'call_types' : [],
'ret_arity' : '0',
'rturn' : {
'default' : 'T',
},
'special' : ['swar'],
'simd_types' : ['real_'],
'type_defs' : [],
'types' : ['real_'],
},
'info' : 'manually modified',
'unit' : {
'global_header' : {
'first_stamp' : 'created by jt the 24/02/2011',
'simd_included' : ['#include <nt2/include/functions/prod.hpp>'],
'no_ulp' : 'True',
'notes' : [],
'stamp' : 'modified by jt the 24/02/2011',
},
'ranges' : {
'default' : [['nt2::Valmin<T>()', 'nt2::Valmax<T>()']],
'real_' : [['T(-100)', 'T(100)']],
'signed_int_' : [],
'unsigned_int_' : [],
},
'specific_values' : {
'default' : {
'nt2::One<T>()' : {'result' : 'nt2::One<r_t>()','ulp_thresh' : '0',},
'nt2::Zero<T>()' : {'result' : 'nt2::Zero<r_t>()','ulp_thresh' : '0',},
},
'real_' : {
'nt2::Inf<T>()' : {'result' : 'nt2::Inf<r_t>()','ulp_thresh' : '0',},
'nt2::Minf<T>()' : {'result' : 'nt2::Minf<r_t>()','ulp_thresh' : '0',},
'nt2::Mone<T>()' : {'result' : 'nt2::Mone<r_t>()','ulp_thresh' : '0',},
'nt2::Nan<T>()' : {'result' : 'nt2::Nan<r_t>()','ulp_thresh' : '0',},
'nt2::One<T>()' : {'result' : 'nt2::One<r_t>()','ulp_thresh' : '0',},
'nt2::Zero<T>()' : {'result' : 'nt2::Zero<r_t>()','ulp_thresh' : '0',},
},
'signed_int_' : {
'nt2::Mone<T>()' : {'result' : 'nt2::Mone<r_t>()','ulp_thresh' : '0',},
'nt2::One<T>()' : {'result' : 'nt2::One<r_t>()','ulp_thresh' : '0',},
'nt2::Zero<T>()' : {'result' : 'nt2::Zero<r_t>()','ulp_thresh' : '0',},
},
},
'verif_test' : {
'nb_rand' : {
'default' : 'NT2_NB_RANDOM_TEST',
},
'property_call' : {
'default' : ['nt2::splatted_prod(a0)'],
},
'property_value' : {
'default' : ['(a0)'],
},
'ulp_thresh' : {
'default' : ['0.5'],
},
'scalar_simul' :{
'default' : [
" T p= nt2::prod(a0);",
" for(uint32_t i=0; i<cardinal_of<n_t>::value; i++)",
" {",
" NT2_TEST_EQUAL(v[i],p);",
" }",
]
},
},
},
},
]
| 38.906667 | 90 | 0.331391 | [ ty' : '1',
'call_types' : [],
'ret_arity' : '0',
'rturn' : {
'default' : 'T',
},
'special' : ['swar'],
'simd_types' : ['real_'],
'type_defs' : [],
'types' : ['real_'],
},
'info' : 'manually modified',
'unit' : {
'global_header' : {
'first_stamp' : 'created by jt the 24/02/2011',
'simd_included' : ['#include <nt2/include/functions/prod.hpp>'],
'no_ulp' : 'True',
'notes' : [],
'stamp' : 'modified by jt the 24/02/2011',
},
'ranges' : {
'default' : [['nt2::Valmin<T>()', 'nt2::Valmax<T>()']],
'real_' : [['T(-100)', 'T(100)']],
'signed_int_' : [],
'unsigned_int_' : [],
},
'specific_values' : {
'default' : {
'nt2::One<T>()' : {'result' : 'nt2::One<r_t>()','ulp_thresh' : '0',},
'nt2::Zero<T>()' : {'result' : 'nt2::Zero<r_t>()','ulp_thresh' : '0',},
},
'real_' : {
'nt2::Inf<T>()' : {'result' : 'nt2::Inf<r_t>()','ulp_thresh' : '0',},
'nt2::Minf<T>()' : {'result' : 'nt2::Minf<r_t>()','ulp_thresh' : '0',},
'nt2::Mone<T>()' : {'result' : 'nt2::Mone<r_t>()','ulp_thresh' : '0',},
'nt2::Nan<T>()' : {'result' : 'nt2::Nan<r_t>()','ulp_thresh' : '0',},
'nt2::One<T>()' : {'result' : 'nt2::One<r_t>()','ulp_thresh' : '0',},
'nt2::Zero<T>()' : {'result' : 'nt2::Zero<r_t>()','ulp_thresh' : '0',},
},
'signed_int_' : {
'nt2::Mone<T>()' : {'result' : 'nt2::Mone<r_t>()','ulp_thresh' : '0',},
'nt2::One<T>()' : {'result' : 'nt2::One<r_t>()','ulp_thresh' : '0',},
'nt2::Zero<T>()' : {'result' : 'nt2::Zero<r_t>()','ulp_thresh' : '0',},
},
},
'verif_test' : {
'nb_rand' : {
'default' : 'NT2_NB_RANDOM_TEST',
},
'property_call' : {
'default' : ['nt2::splatted_prod(a0)'],
},
'property_value' : {
'default' : ['(a0)'],
},
'ulp_thresh' : {
'default' : ['0.5'],
},
'scalar_simul' :{
'default' : [
" T p= nt2::prod(a0);",
" for(uint32_t i=0; i<cardinal_of<n_t>::value; i++)",
" {",
" NT2_TEST_EQUAL(v[i],p);",
" }",
]
},
},
},
},
]
| true | true |
f7275a40150b0c0246d5e22711d983f8a33d9abc | 1,585 | py | Python | tests/service/watcher/test_util.py | vinifmor/guapow | 59a9a1e6706bacbcb3d4bbc762ff9264d5e6f582 | [
"Zlib"
] | 7 | 2021-10-06T17:02:13.000Z | 2022-03-22T10:45:23.000Z | tests/service/watcher/test_util.py | vinifmor/guapow | 59a9a1e6706bacbcb3d4bbc762ff9264d5e6f582 | [
"Zlib"
] | 2 | 2022-03-16T11:20:54.000Z | 2022-03-24T13:54:49.000Z | tests/service/watcher/test_util.py | vinifmor/guapow | 59a9a1e6706bacbcb3d4bbc762ff9264d5e6f582 | [
"Zlib"
] | null | null | null | from unittest import IsolatedAsyncioTestCase
from unittest.mock import patch, AsyncMock, call
from guapow import __app_name__
from guapow.service.watcher import util
class MapProcessesTest(IsolatedAsyncioTestCase):
@patch(f'{__app_name__}.service.watcher.util.async_syscall', side_effect=[(0, " 1 # a \n 2 # b \n"), (0, "1#/bin/a\n 2 # /bin/b -c \n")])
async def test__must_return_a_dict_with_pids_as_keys_and_tuples_as_values_with_the_cmd_and_comm(self, async_syscall: AsyncMock):
procs = await util.map_processes()
async_syscall.assert_has_awaits([call('ps -Ao "%p#%c" -ww --no-headers'),
call('ps -Ao "%p#%a" -ww --no-headers')], any_order=True)
self.assertIsInstance(procs, dict)
self.assertEqual({1: ('/bin/a', 'a'), 2: ('/bin/b -c', 'b')}, procs)
@patch(f'{__app_name__}.service.watcher.util.async_syscall', side_effect=[(0, "1#a\n3#c\n"), (0, "\n 2#/bin/b -c \n3#/bin/c\n")])
async def test__must_not_return_processes_with_comm_or_cmd_missing(self, async_syscall: AsyncMock):
procs = await util.map_processes()
self.assertEqual(2, async_syscall.await_count)
self.assertIsInstance(procs, dict)
self.assertEqual({3: ('/bin/c', 'c')}, procs)
@patch(f'{__app_name__}.service.watcher.util.async_syscall', return_value=(1, ""))
async def test__must_return_none_when_the_syscall_fails(self, async_syscall: AsyncMock):
procs = await util.map_processes()
self.assertEqual(2, async_syscall.await_count)
self.assertIsNone(procs)
| 49.53125 | 141 | 0.683912 | from unittest import IsolatedAsyncioTestCase
from unittest.mock import patch, AsyncMock, call
from guapow import __app_name__
from guapow.service.watcher import util
class MapProcessesTest(IsolatedAsyncioTestCase):
@patch(f'{__app_name__}.service.watcher.util.async_syscall', side_effect=[(0, " 1 # a \n 2 # b \n"), (0, "1#/bin/a\n 2 # /bin/b -c \n")])
async def test__must_return_a_dict_with_pids_as_keys_and_tuples_as_values_with_the_cmd_and_comm(self, async_syscall: AsyncMock):
procs = await util.map_processes()
async_syscall.assert_has_awaits([call('ps -Ao "%p#%c" -ww --no-headers'),
call('ps -Ao "%p#%a" -ww --no-headers')], any_order=True)
self.assertIsInstance(procs, dict)
self.assertEqual({1: ('/bin/a', 'a'), 2: ('/bin/b -c', 'b')}, procs)
@patch(f'{__app_name__}.service.watcher.util.async_syscall', side_effect=[(0, "1#a\n3#c\n"), (0, "\n 2#/bin/b -c \n3#/bin/c\n")])
async def test__must_not_return_processes_with_comm_or_cmd_missing(self, async_syscall: AsyncMock):
procs = await util.map_processes()
self.assertEqual(2, async_syscall.await_count)
self.assertIsInstance(procs, dict)
self.assertEqual({3: ('/bin/c', 'c')}, procs)
@patch(f'{__app_name__}.service.watcher.util.async_syscall', return_value=(1, ""))
async def test__must_return_none_when_the_syscall_fails(self, async_syscall: AsyncMock):
procs = await util.map_processes()
self.assertEqual(2, async_syscall.await_count)
self.assertIsNone(procs)
| true | true |
f7275ca4a9614ae34d5dae69713b06a583c3d368 | 179 | py | Python | posts/forms.py | Kelit/My_blog | 891f082ac6b7a02ffbc8d106168cb0fd017ba3ef | [
"Apache-2.0"
] | null | null | null | posts/forms.py | Kelit/My_blog | 891f082ac6b7a02ffbc8d106168cb0fd017ba3ef | [
"Apache-2.0"
] | null | null | null | posts/forms.py | Kelit/My_blog | 891f082ac6b7a02ffbc8d106168cb0fd017ba3ef | [
"Apache-2.0"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField
class PostForm(FlaskForm):
title = StringField('Заголовок')
body = TextAreaField('Текст')
| 22.375 | 46 | 0.77095 | from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField
class PostForm(FlaskForm):
title = StringField('Заголовок')
body = TextAreaField('Текст')
| true | true |
f7275ccef7ac1443c9619306e2735d5ade2696fa | 64 | py | Python | ptfims/__init__.py | rbiswas4/ptfdata | f50efd077bbf091e5108a6c95b0e24e4768ca4e6 | [
"MIT"
] | null | null | null | ptfims/__init__.py | rbiswas4/ptfdata | f50efd077bbf091e5108a6c95b0e24e4768ca4e6 | [
"MIT"
] | null | null | null | ptfims/__init__.py | rbiswas4/ptfdata | f50efd077bbf091e5108a6c95b0e24e4768ca4e6 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from .ptfimages import *
| 21.333333 | 38 | 0.84375 | from __future__ import absolute_import
from .ptfimages import *
| true | true |
f7275d33269d0a2ea63c7f66122d5786bb653174 | 870 | py | Python | macWall.py | mathematics128/WinDD_Packaged_Wall | ec136adcf75e3f9c456149b995e2c0744bfe3c61 | [
"MIT"
] | null | null | null | macWall.py | mathematics128/WinDD_Packaged_Wall | ec136adcf75e3f9c456149b995e2c0744bfe3c61 | [
"MIT"
] | null | null | null | macWall.py | mathematics128/WinDD_Packaged_Wall | ec136adcf75e3f9c456149b995e2c0744bfe3c61 | [
"MIT"
] | null | null | null | from os import system, listdir
from PIL import Image
num = int(input('请输入你想生成的缩略图的长: ') )
for pic in listdir('.'):
if pic[-4:] == '.jpg':
tmp_pic = pic[:-4] + '.png'
temp_pic = pic[:-4] + '.bmp'
system('ffmpeg -i ' + pic + ' -vf scale=' + str(num) + ':-1 ' + tmp_pic)
system('ffmpeg -i ' + tmp_pic + ' -vf crop=' + str(num) + ':' + str(num * 0.5625) + ' ' + temp_pic)
img = Image.new('RGB', (num, int(num * 0.5625) ), (0, 0, 0) )
zd = eval(input('请输入图片按顺序对应的字典 (参考theme.json文件) : ') )
name = input('请输入图片的前缀名称: ')
for i in range(len(zd)):
i += 1
box = (int(num / len(zd) ) * (i - 1), 0, num, int(num * 0.5625) )
i = zd[i]
pic = Image.open(name + str(i) + '.bmp')
tmp = pic.crop(box)
img.paste(tmp, box)
pic.close()
system('del *.bmp *.png')
img.save('thumbnail.png')
img.close()
| 33.461538 | 108 | 0.514943 | from os import system, listdir
from PIL import Image
num = int(input('请输入你想生成的缩略图的长: ') )
for pic in listdir('.'):
if pic[-4:] == '.jpg':
tmp_pic = pic[:-4] + '.png'
temp_pic = pic[:-4] + '.bmp'
system('ffmpeg -i ' + pic + ' -vf scale=' + str(num) + ':-1 ' + tmp_pic)
system('ffmpeg -i ' + tmp_pic + ' -vf crop=' + str(num) + ':' + str(num * 0.5625) + ' ' + temp_pic)
img = Image.new('RGB', (num, int(num * 0.5625) ), (0, 0, 0) )
zd = eval(input('请输入图片按顺序对应的字典 (参考theme.json文件) : ') )
name = input('请输入图片的前缀名称: ')
for i in range(len(zd)):
i += 1
box = (int(num / len(zd) ) * (i - 1), 0, num, int(num * 0.5625) )
i = zd[i]
pic = Image.open(name + str(i) + '.bmp')
tmp = pic.crop(box)
img.paste(tmp, box)
pic.close()
system('del *.bmp *.png')
img.save('thumbnail.png')
img.close()
| true | true |
f7275daebdad04b10427a7fe30165f0dd0fc3904 | 533 | py | Python | root/messages.py | FilmyFather/TG-RenameBot | ae5e21c0da7c869c989a4ab7e1c79305f2ad3b61 | [
"MIT"
] | 46 | 2021-05-30T14:35:48.000Z | 2022-02-25T09:58:12.000Z | root/messages.py | FilmyFather/TG-RenameBot | ae5e21c0da7c869c989a4ab7e1c79305f2ad3b61 | [
"MIT"
] | 4 | 2021-08-10T14:11:52.000Z | 2021-12-30T17:59:28.000Z | root/messages.py | FilmyFather/TG-RenameBot | ae5e21c0da7c869c989a4ab7e1c79305f2ad3b61 | [
"MIT"
] | 102 | 2021-05-30T14:11:33.000Z | 2022-03-30T06:36:31.000Z | class Translation(object):
START_TEXT = "**I'm a Rename and Convert Bot\nJust send me any media to change file name.\nUse /help command for more details **"
######################
HELP_USER = """**>>Send File/Video\n>>Select desired Option\n>>And Done wait for it to process files**"""
DOWNLOAD_MSG = "**Downloading **⏬"
DOWNLOAD_FAIL_MSG = "**Failed to Download File**❎"
UPLOAD_MSG = "**Uploading** ⏫"
UPLOAD_FAIL_MSG = "**Failed to Upload File**❎"
UPLOAD_DONE_MSG = "**Uploaded Successfully 💡"
| 53.3 | 134 | 0.634146 | class Translation(object):
START_TEXT = "**I'm a Rename and Convert Bot\nJust send me any media to change file name.\nUse /help command for more details **"
######################
HELP_USER = """**>>Send File/Video\n>>Select desired Option\n>>And Done wait for it to process files**"""
DOWNLOAD_MSG = "**Downloading **⏬"
DOWNLOAD_FAIL_MSG = "**Failed to Download File**❎"
UPLOAD_MSG = "**Uploading** ⏫"
UPLOAD_FAIL_MSG = "**Failed to Upload File**❎"
UPLOAD_DONE_MSG = "**Uploaded Successfully 💡"
| true | true |
f7275dd92e798d7446dcdaf64a7b23e1afc7ec27 | 86,823 | py | Python | phriky_units/test_cps_units_checker.py | unl-nimbus-lab/phriky-units | 16c8cdd91de0899411b139e5a94fcb4ea8104ad2 | [
"MIT"
] | 22 | 2017-07-18T09:39:34.000Z | 2021-09-16T09:41:03.000Z | phriky_units/test_cps_units_checker.py | unl-nimbus-lab/phriky-units | 16c8cdd91de0899411b139e5a94fcb4ea8104ad2 | [
"MIT"
] | 9 | 2016-09-04T13:33:15.000Z | 2018-01-05T22:39:03.000Z | phriky_units/test_cps_units_checker.py | unl-nimbus-lab/phriky-units | 16c8cdd91de0899411b139e5a94fcb4ea8104ad2 | [
"MIT"
] | 4 | 2016-12-07T16:34:57.000Z | 2019-04-03T06:51:55.000Z | #!/usr/local/bin/python
import sys
# sys.path.append('/Users/jore/courses/NIMBUS/RESEARCH/CPS_TYPES/cps_units/')
import unittest
from detect_physical_unit_inconsistencies import CPSUnitsChecker
from unit_error_types import UnitErrorTypes
from unit_error import UnitError
import os
global_debug = False
global_debug_verbose = False
global_debug_AST = False
class TestStringMethods(unittest.TestCase):
def test_function_return_0(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
cps_unit_checker.debug_scope = False
dump_file = './dump_files_for_tests/test_it_function_return_0.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
units_for_f1 = []
# TEST THAT UNITS ARE ASSIGNED TO FUNCTION
for tw in cps_unit_checker.all_tree_walkers:
so = tw.symbol_helper.function_dictionary['scopeObject']
if so.function:
if so.function.name == 'f1':
units_for_f1 = so.function.return_units
self.assertEquals(units_for_f1, [{'meter': 1}], 'Incorrect units returned for function: f1 . Expected [{\'meter\':1}], received %s' % units_for_f1)
# TEST THAT UNITS ARE RECEIVED TO FUNCTION
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][12]['units']
my_oracle = [{'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_function_return_1(self):
''' x SHOULD END UP M/S, but so far THERE'S NO MECHANISM FOR PASSING UNITS IN TO A FUNCTION
'''
cps_unit_checker = CPSUnitsChecker()
dump_file = './dump_files_for_tests/test_it_function_return_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for tw in cps_unit_checker.all_tree_walkers:
so = tw.symbol_helper.function_dictionary['scopeObject']
if so.function:
if so.function.name == 'f1':
units_for_f1 = so.function.return_units
def test_comparisons_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST= False
dump_file = './dump_files_for_tests/test_it_comparisons_1.cpp.dump'
source_file = './dump_files_for_tests/test_it_comparisons_1.cpp'
cps_unit_checker.main_run_check(dump_file, source_file)
e = cps_unit_checker.errors[0]
# ORACLES
token_left_units_oracle = [{'meter': 1}]
token_right_units_oracle = [{'second': -1, 'meter': 1}]
# ASSERTIONS
self.assertEqual(e.token.str, '>')
self.assertEqual(e.token_left.units, token_left_units_oracle)
self.assertEqual(e.token_right.units, token_right_units_oracle)
def test_logical_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_logical_1.cpp.dump'
source_file = './dump_files_for_tests/test_it_logical_1.cpp'
cps_unit_checker.main_run_check(dump_file, source_file)
# TEST 1
e = cps_unit_checker.errors[0]
# ORACLES
token_right_units_oracle = [{'meter': 1}]
# ASSERTIONS
self.assertEqual(e.linenr, 13)
self.assertEqual(e.token.str, '&&')
self.assertEqual(e.token_right.units, token_right_units_oracle)
# TEST 2
e = cps_unit_checker.errors[1]
# ORACLES
token_left_units_oracle = [{'meter': 1}]
# ASSERTIONS
self.assertEqual(e.linenr, 18)
self.assertEqual(e.token.str, '||')
self.assertEqual(e.token_left.units, token_left_units_oracle)
def test_abs_0(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_abs.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
def test_abs_namespace_std_0(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_abs_namespace_std.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
def test_abs_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_abs_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 't'
var_linenr = 9
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
my_oracle = [{'second': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_abs_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_abs_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 's'
var_linenr =11
my_oracle = [{'meter': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_multiplication_assignment_in_multi_configurations_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiplication_assignment_in_multi_configurations.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'a_geometry_msgs_Accel.linear.x'
var_linenr = 19
my_oracle = [{'second': -4, 'meter': 2}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_unit_propagation_by_multiplication_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
#cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_unit_propagation_by_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][14]['units']
my_oracle = [{'second': -4, 'meter': 2}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_unit_propagation_by_division_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
#cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_unit_propagation_by_division_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][14]['units']
my_oracle = None
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_mulitple_units_assigned(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiple_units_assigned_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
expected_errors = ["test_it_multiple_units_assigned_1.cpp : 11 MULTIPLE UNITS BY ASSIGNMENT: [{'second': -1, 'meter': 1}, {'second': -2, 'meter': 2}]"]
# self.assertListEqual([e['error_msg'] for e in cps_unit_checker.errors], expected_errors)
# TEST QUANTITY OF ERRORS
self.assertEqual(1, len(cps_unit_checker.errors))
# TEST TyPE OF ERROR
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
# TEST VALUE OF ERROR
var_name = 'a_geometry_msgs_Accel.linear.x'
var_linenr =11
my_oracle = [{'second': -2, 'meter': 1}, {'second': -4, 'meter': 2}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][12]['units']
my_oracle = [{'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][12]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][12]['units']
my_oracle = None
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][14]['units']
my_oracle = [{'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_5(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_5.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][14]['units']
my_oracle = [{'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_half_units(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_half_units.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][11]['units']
my_oracle = [{'meter': 0.5}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_atan2_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_atan2_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][7]['units']
my_oracle = [{'radian': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_atan2_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
#cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_atan2_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][8]['units']
my_oracle = [{'radian': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_toSec(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_toSec_0.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'duration' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['duration'][7]['units']
my_oracle = [{'second': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'second' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['second'][9]['units']
my_oracle = [{'second': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_float_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_float_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict and 11 in s.var_ordered_dict['f']:
actual_units = s.var_ordered_dict['f'][11]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_float_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_float_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict and 11 in s.var_ordered_dict['f']:
actual_units = s.var_ordered_dict['f'][11]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_float_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_float_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][12]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_float_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_float_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][13]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_float_5(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_float_5.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][11]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_pow_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_pow_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr =10
my_oracle = [{'meter': 4}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_pow_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_pow_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 11
my_oracle = [{'meter': 4}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_pow_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_pow_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 10
my_oracle = [{'meter': 4}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:%s Expected: %s received %s' % (var_name, my_oracle, actual_units))
def test_floor_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_floor_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 's'
var_linenr = 8
my_oracle = [{'meter': 1, 'second':-1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_ceil_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_ceil_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 's'
var_linenr = 8
my_oracle = [{'meter': 1, 'second':-1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_acos_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_acos_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 7
my_oracle = [{'radian': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_asin_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_asin_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 7
my_oracle = [{'radian': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_atan_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_atan_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 7
my_oracle = [{'radian': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_ternary_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_ternary_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 9
my_oracle = [{'second': -1, 'meter': 1}, {'second': -1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_function_args_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_function_args_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# actual_units = None
f = cps_unit_checker.current_configuration.functions[0].arg_units
self.assertEqual(f[0][0]['linenr'], 13)
self.assertEqual(f[0][0]['units'], [{'meter': 1}])
def test_function_args_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_function_args_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for f in cps_unit_checker.current_configuration.functions[0].arg_units:
self.assertEqual(f[0]['linenr'], 13)
self.assertEqual(f[0]['units'], [{'meter': 1}])
def test_function_args_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_function_args_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
my_oracle_1 = 4
my_oracle_2 = [{'meter': 1}]
actual_units = None
all_units_list = cps_unit_checker.current_configuration.functions[0].arg_units
self.assertEqual(len(all_units_list), my_oracle_1)
for u in all_units_list:
self.assertEqual(u[0]['units'], my_oracle_2)
def test_function_args_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_function_args_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
my_oracle = [{'meter': 1}]
actual_units = None
for f in cps_unit_checker.current_configuration.functions:
for arg_u in f.arg_units:
for arg_use_on_line in arg_u:
self.assertEqual(arg_use_on_line['units'], my_oracle)
def test_function_args_5(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_function_args_5.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
my_oracle_1 = [{'meter': 1}]
my_oracle_2 = 15
f = cps_unit_checker.current_configuration.functions[0]
self.assertEqual(f.arg_units[0][0]['units'], my_oracle_1)
self.assertEqual(f.arg_units[0][0]['linenr'], my_oracle_2)
def test_division_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_division_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr = 9
my_oracle = [{'meter': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_division_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_division_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr = 9
my_oracle = [{'meter': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_division_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_division_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr = 9
my_oracle = [{'second': 2, 'meter': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_division_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_division_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr =10
my_oracle = [{'second': 2}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_logical_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_logical_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
def test_error_type_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_error_return_type_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.current_file_under_analysis = dump_file
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
def test_laser_scan_range_size_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_laser_scan_range_count_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr = 7
my_oracle = None
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(0, len(cps_unit_checker.errors))
def test_laser_scan_range_size_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_laser_scan_range_count_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr = 7
my_oracle = [{'meter':1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_ros_duration_isZero_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_ros_duration_isZero_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 't'
var_linenr = 6
my_oracle = None
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_ros_duration_isZero_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_ros_duration_isZero_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 't'
var_linenr = 6
my_oracle = [{'second':1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_ros_header_include_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/src/test_it_header_include_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(2, len(cps_unit_checker.errors))
def test_ros_header_include_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/src/test_it_header_include_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(3, len(cps_unit_checker.errors))
# WEAKER - SOMETHING STOCASTIC IS HAPPENING
e = cps_unit_checker.errors[0]
self.assertEqual(7, e.linenr)
self.assertEqual('./dump_files_for_tests/src/../include/test_it_header_include_2.h', e.get_file_URI_where_error_occured())
e = cps_unit_checker.errors[1]
self.assertEqual(5, e.linenr)
self.assertEqual('./dump_files_for_tests/src/test_it_header_include_2.cpp', e.get_file_URI_where_error_occured())
# DON'T ASSIGN UNITS TO ARRAYS WHEN array.empty() IS CALLED
def test_laser_range_empty_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_range_empty_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# DON'T ASSIGN UNITS TO ARRAYS WHEN time.isZero() IS CALLED
def test_ros_isZero_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_ros_isZero_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# DON'T ASSIGN UNITS DURING x = y = z = 0
def test_multiple_initialization_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiple_initialization.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# WEAKEN ASSIGNMENT WHEN MULTIPLIED BY A CONSTANT (INT)
def test_it_multiplication_with_constant_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiplication_with_constant_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# self.assertEqual(0, len(cps_unit_checker.errors))
var_name = 'f'
var_linenr = 9
my_oracle = [{'second':-1}]
actual_units = None
is_unit_propagation_based_on_constants = False
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
is_unit_propagation_based_on_constants = s.var_ordered_dict[var_name][var_linenr]['is_unit_propagation_based_on_constants']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertTrue(is_unit_propagation_based_on_constants, 'Unit inference should be weakened by constant interaction, but is still strong.')
# WEAKEN ASSIGNMENT WHEN MULTIPLIED BY A CONSTANT (FLOAT)
def test_it_multiplication_with_constant_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiplication_with_constant_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# self.assertEqual(0, len(cps_unit_checker.errors))
var_name = 'f'
var_linenr = 9
my_oracle = [{'second':-1}]
actual_units = None
is_unit_propagation_based_on_constants = False
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
is_unit_propagation_based_on_constants = s.var_ordered_dict[var_name][var_linenr]['is_unit_propagation_based_on_constants']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertTrue(is_unit_propagation_based_on_constants, 'Unit inference should be weakened by constant interaction, but is still strong.')
# WEAKEN ASSIGNMENT WHEN MULTIPLIED BY A CONSTANT (FLOAT)
def test_it_operator_with_unknown_variable_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_operator_with_unknown_variable_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# self.assertEqual(0, len(cps_unit_checker.errors))
var_name = 'f'
var_linenr = 10
my_oracle = [{'second':-1}]
actual_units = None
is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
is_unit_propagation_based_on_unknown_variable = s.var_ordered_dict[var_name][var_linenr]['is_unit_propagation_based_on_unknown_variable']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertTrue(is_unit_propagation_based_on_unknown_variable, 'Unit inference should be weakened by unknown variable interaction, but is still strong.')
# WEAKEN ERROR WHEN MULTIPLIED BY A CONSTANT
def test_it_operator_with_unknown_variable_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_operator_with_unknown_variable_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(2, len(cps_unit_checker.errors))
for e in cps_unit_checker.errors:
self.assertTrue(e.is_warning, 'Should be a warning but is not marked as such')
# WEAKEN ERROR WHEN MULTIPLIED BY A CONSTANT
def test_it_operator_with_unknown_variable_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_operator_with_unknown_variable_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(2, len(cps_unit_checker.errors))
# PROPAGATION ACROSS MIN MAX
def test_it_min_max_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_min_max_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 7
my_oracle = [{'second': -1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(0, len(cps_unit_checker.errors))
# PROPAGATION ACROSS MIN MAX
def test_it_min_max_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_min_max_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 8
my_oracle = [{'second': -1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(0, len(cps_unit_checker.errors))
# PROPAGATION ACROSS MIN MAX
def test_it_min_max_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_min_max_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 8
my_oracle = [{'second': -1}, {'second': -1, 'meter': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[0].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# PROPAGATION ACROSS MIN MAX
def test_it_min_max_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_min_max_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 9
my_oracle = [{'second': -1 }, {'second': -1, 'meter': 1}]
actual_units = None
is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[0].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# PROTECTION AGAINST MULTILINE
def test_it_multiline_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiline_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 25
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'second': -2.0, 'meter': 2.0}, {'second': -3.0, 'meter': 3.0}, {'second': -2.0, 'meter': 1.0}, {'second': -3.0, 'meter': 2.0}, {'second': -4.0, 'meter': 3.0}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
# KNOW FUNCTION quatToRPY
def test_it_quatToRPY_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quatToRPY_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'tw.linear.x'
var_linenr = 17
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian': 1.0}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
# WEAK INFERENCE WARNING
def test_it_weak_inference_multiplication_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_weak_inference_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference: %s warning:%s ' % (e.var_name, str(e.is_warning))
var_name = 'tw.linear.x'
var_linenr = 19
my_oracle = [{'second': -1.0, 'meter': 1.0}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(0, len(cps_unit_checker.errors))
# WEAK INFERENCE WARNING
def test_it_weak_inference_multiplication_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_weak_inference_multiplication_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'tw.linear.x'
var_linenr = 22
my_oracle = [{'second': -1.0, 'meter': 1.0}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(0, len(cps_unit_checker.errors))
# STRONG INFERENCE BECAUSE ADDITION
def test_it_weak_inference_addition_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_weak_inference_addition_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
var_name = 'tw.linear.x'
var_linenr = 22
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(2, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[0].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
var_name = 'tw.linear.y'
var_linenr = 23
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertTrue(cps_unit_checker.errors[1].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[1].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[1].is_warning)
# STRONG INFERENCE BECAUSE ADDITION - SWAPPED OPERAND ORDER
def test_it_weak_inference_addition_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_weak_inference_addition_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
var_name = 'tw.linear.x'
var_linenr = 22
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(2, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[0].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
var_name = 'tw.linear.y'
var_linenr = 23
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertTrue(cps_unit_checker.errors[1].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[1].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[1].is_warning)
# STRONG INFERENCE BECAUSE ADDITION - SWAPPED OPERAND ORDER
def test_it_weak_inference_addition_3 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_weak_inference_addition_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
var_name = 'tw.linear.x'
var_linenr = 22
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian':1.0}, {'second':1.}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(2, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
self.assertTrue(cps_unit_checker.errors[0].is_unit_propagation_based_on_unknown_variable)
self.assertTrue(cps_unit_checker.errors[0].is_warning)
# ADDITION STAND ALONE ERROR FOR ADDITION OF INCOMPATIBLE UNITS - STRONG
def test_it_addition_without_assignment_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_addition_without_assignment_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# ADDITION STAND ALONE ERROR FOR ADDITION OF INCOMPATIBLE UNITS - WEAK UNKNOWN VARIABLE
def test_it_addition_without_assignment_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_addition_without_assignment_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertTrue(cps_unit_checker.errors[0].is_warning)
# ADDITION STAND ALONE ERROR FOR ADDITION OF INCOMPATIBLE UNITS - WEAK CONSTANT
def test_it_addition_without_assignment_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_addition_without_assignment_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertTrue(cps_unit_checker.errors[0].is_warning)
# ADDITION STAND ALONE ERROR FOR SUBTRACTION OF INCOMPATIBLE UNITS - STRONG CONSTANT
def test_it_addition_without_assignment_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_addition_without_assignment_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# ADDITION OF RADIANS
def test_it_radian_addition_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_addition_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(2, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[1].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[1].is_warning)
# ADDITION OF RADIANS
def test_it_radian_addition_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_addition_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# MULTIPLICATION OF RADIANS
def test_it_radian_multiplication_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# MULTIPLICATION OF RADIANS 2
def test_it_radian_multiplication_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_multiplication_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# MULTIPLICATION OF RADIANS
def test_it_radian_multiplication_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_multiplication_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# MULTIPLICATION OF RADIANS 2
def test_it_radian_multiplication_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_multiplication_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# getXYZ
def test_it_getXYZ_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_getXYZ_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
self.assertEqual(0, len(cps_unit_checker.errors))
# getXYZ
def test_it_getXYZ_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_getXYZ_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
var_name = 'tw.linear.x'
var_linenr = 10
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'meter':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
# getXYZ
def test_it_getXYZ_3 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_getXYZ_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'tw.linear.x'
var_linenr = 10
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'quaternion':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
# getXYZ
def test_it_getXYZ_4 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_getXYZ_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# getXYZ
def test_it_getXYZ_5 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_getXYZ_5.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# QUATERNION ADDITION 1
def test_it_quaternion_addition_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_addition_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(2, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[1].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[1].is_warning)
# QUATERNION ADDITION 2
def test_it_quaternion_addition_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_addition_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# QUATERNION ADDITION 3
def test_it_quaternion_addition_3 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_addition_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION ADDITION 4
def test_it_quaternion_addition_4 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_addition_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION 1
def test_it_quaternion_multiplication_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION 2
def test_it_quaternion_multiplication_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_multiplication_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION 3
def test_it_quaternion_multiplication_3 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_multiplication_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION 4
def test_it_quaternion_multiplication_4 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_multiplication_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION CLOSURE
def test_it_quaternion_closed_under_multiplication_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_closed_under_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION CLOSURE
def test_it_quaternion_closed_under_multiplication_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_closed_under_multiplication_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# RADIAN MULTIPLICATION CLOSURE
def test_it_radian_closed_under_multiplication_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_closed_under_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# RADIAN MULTIPLICATION CLOSURE
def test_it_radian_closed_under_multiplication_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_closed_under_multiplication_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# dt Heuristic
def test_it_dt_heuristic (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_dt_heuristic_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# dt Heuristic
def test_it_plus_equals_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_plus_equals_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# dt Heuristic
def test_it_range_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_range_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# same named argument in interface scope bug
def test_it_scope_bug_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_cppcheck_scope_bug_at_argument_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
if __name__ == '__main__':
unittest.main()
| 52.588128 | 212 | 0.685176 |
import sys
import unittest
from detect_physical_unit_inconsistencies import CPSUnitsChecker
from unit_error_types import UnitErrorTypes
from unit_error import UnitError
import os
global_debug = False
global_debug_verbose = False
global_debug_AST = False
class TestStringMethods(unittest.TestCase):
def test_function_return_0(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
cps_unit_checker.debug_scope = False
dump_file = './dump_files_for_tests/test_it_function_return_0.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
units_for_f1 = []
for tw in cps_unit_checker.all_tree_walkers:
so = tw.symbol_helper.function_dictionary['scopeObject']
if so.function:
if so.function.name == 'f1':
units_for_f1 = so.function.return_units
self.assertEquals(units_for_f1, [{'meter': 1}], 'Incorrect units returned for function: f1 . Expected [{\'meter\':1}], received %s' % units_for_f1)
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][12]['units']
my_oracle = [{'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_function_return_1(self):
cps_unit_checker = CPSUnitsChecker()
dump_file = './dump_files_for_tests/test_it_function_return_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for tw in cps_unit_checker.all_tree_walkers:
so = tw.symbol_helper.function_dictionary['scopeObject']
if so.function:
if so.function.name == 'f1':
units_for_f1 = so.function.return_units
def test_comparisons_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST= False
dump_file = './dump_files_for_tests/test_it_comparisons_1.cpp.dump'
source_file = './dump_files_for_tests/test_it_comparisons_1.cpp'
cps_unit_checker.main_run_check(dump_file, source_file)
e = cps_unit_checker.errors[0]
token_left_units_oracle = [{'meter': 1}]
token_right_units_oracle = [{'second': -1, 'meter': 1}]
self.assertEqual(e.token.str, '>')
self.assertEqual(e.token_left.units, token_left_units_oracle)
self.assertEqual(e.token_right.units, token_right_units_oracle)
def test_logical_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_logical_1.cpp.dump'
source_file = './dump_files_for_tests/test_it_logical_1.cpp'
cps_unit_checker.main_run_check(dump_file, source_file)
e = cps_unit_checker.errors[0]
token_right_units_oracle = [{'meter': 1}]
self.assertEqual(e.linenr, 13)
self.assertEqual(e.token.str, '&&')
self.assertEqual(e.token_right.units, token_right_units_oracle)
e = cps_unit_checker.errors[1]
token_left_units_oracle = [{'meter': 1}]
self.assertEqual(e.linenr, 18)
self.assertEqual(e.token.str, '||')
self.assertEqual(e.token_left.units, token_left_units_oracle)
def test_abs_0(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
dump_file = './dump_files_for_tests/test_it_known_function_abs.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
def test_abs_namespace_std_0(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
dump_file = './dump_files_for_tests/test_it_known_function_abs_namespace_std.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
def test_abs_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_abs_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 't'
var_linenr = 9
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
my_oracle = [{'second': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_abs_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_abs_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 's'
var_linenr =11
my_oracle = [{'meter': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_multiplication_assignment_in_multi_configurations_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiplication_assignment_in_multi_configurations.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'a_geometry_msgs_Accel.linear.x'
var_linenr = 19
my_oracle = [{'second': -4, 'meter': 2}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_unit_propagation_by_multiplication_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
dump_file = './dump_files_for_tests/test_it_unit_propagation_by_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][14]['units']
my_oracle = [{'second': -4, 'meter': 2}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_unit_propagation_by_division_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
dump_file = './dump_files_for_tests/test_it_unit_propagation_by_division_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][14]['units']
my_oracle = None
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_mulitple_units_assigned(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiple_units_assigned_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
expected_errors = ["test_it_multiple_units_assigned_1.cpp : 11 MULTIPLE UNITS BY ASSIGNMENT: [{'second': -1, 'meter': 1}, {'second': -2, 'meter': 2}]"]
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
var_name = 'a_geometry_msgs_Accel.linear.x'
var_linenr =11
my_oracle = [{'second': -2, 'meter': 1}, {'second': -4, 'meter': 2}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][12]['units']
my_oracle = [{'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][12]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][12]['units']
my_oracle = None
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][14]['units']
my_oracle = [{'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_5(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_5.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][14]['units']
my_oracle = [{'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_sqrt_half_units(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_sqrt_half_units.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'x' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['x'][11]['units']
my_oracle = [{'meter': 0.5}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_atan2_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_verbose = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_atan2_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][7]['units']
my_oracle = [{'radian': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_known_functions_atan2_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_atan2_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][8]['units']
my_oracle = [{'radian': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_toSec(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_toSec_0.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'duration' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['duration'][7]['units']
my_oracle = [{'second': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'second' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['second'][9]['units']
my_oracle = [{'second': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_float_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_float_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict and 11 in s.var_ordered_dict['f']:
actual_units = s.var_ordered_dict['f'][11]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_float_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_float_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict and 11 in s.var_ordered_dict['f']:
actual_units = s.var_ordered_dict['f'][11]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_float_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_float_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][12]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_float_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_float_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][13]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_float_5(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_float_5.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if 'f' in s.var_ordered_dict:
actual_units = s.var_ordered_dict['f'][11]['units']
my_oracle = [{'second': -1, 'meter': 1}]
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_pow_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_pow_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr =10
my_oracle = [{'meter': 4}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_pow_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_pow_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 11
my_oracle = [{'meter': 4}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_pow_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_pow_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 10
my_oracle = [{'meter': 4}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:%s Expected: %s received %s' % (var_name, my_oracle, actual_units))
def test_floor_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_floor_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 's'
var_linenr = 8
my_oracle = [{'meter': 1, 'second':-1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_ceil_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_ceil_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 's'
var_linenr = 8
my_oracle = [{'meter': 1, 'second':-1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_acos_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_acos_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 7
my_oracle = [{'radian': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_asin_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_asin_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 7
my_oracle = [{'radian': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_atan_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_known_function_atan_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 7
my_oracle = [{'radian': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_ternary_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_ternary_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 9
my_oracle = [{'second': -1, 'meter': 1}, {'second': -1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_function_args_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_function_args_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
f = cps_unit_checker.current_configuration.functions[0].arg_units
self.assertEqual(f[0][0]['linenr'], 13)
self.assertEqual(f[0][0]['units'], [{'meter': 1}])
def test_function_args_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_function_args_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
for f in cps_unit_checker.current_configuration.functions[0].arg_units:
self.assertEqual(f[0]['linenr'], 13)
self.assertEqual(f[0]['units'], [{'meter': 1}])
def test_function_args_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_function_args_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
my_oracle_1 = 4
my_oracle_2 = [{'meter': 1}]
actual_units = None
all_units_list = cps_unit_checker.current_configuration.functions[0].arg_units
self.assertEqual(len(all_units_list), my_oracle_1)
for u in all_units_list:
self.assertEqual(u[0]['units'], my_oracle_2)
def test_function_args_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_function_args_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
my_oracle = [{'meter': 1}]
actual_units = None
for f in cps_unit_checker.current_configuration.functions:
for arg_u in f.arg_units:
for arg_use_on_line in arg_u:
self.assertEqual(arg_use_on_line['units'], my_oracle)
def test_function_args_5(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_function_args_5.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
my_oracle_1 = [{'meter': 1}]
my_oracle_2 = 15
f = cps_unit_checker.current_configuration.functions[0]
self.assertEqual(f.arg_units[0][0]['units'], my_oracle_1)
self.assertEqual(f.arg_units[0][0]['linenr'], my_oracle_2)
def test_division_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_division_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr = 9
my_oracle = [{'meter': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_division_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_division_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr = 9
my_oracle = [{'meter': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_division_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_division_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr = 9
my_oracle = [{'second': 2, 'meter': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_division_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_division_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr =10
my_oracle = [{'second': 2}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_logical_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_logical_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
def test_error_type_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_error_return_type_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.current_file_under_analysis = dump_file
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
def test_laser_scan_range_size_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_laser_scan_range_count_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr = 7
my_oracle = None
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(0, len(cps_unit_checker.errors))
def test_laser_scan_range_size_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_laser_scan_range_count_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'x'
var_linenr = 7
my_oracle = [{'meter':1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_ros_duration_isZero_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_ros_duration_isZero_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 't'
var_linenr = 6
my_oracle = None
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_ros_duration_isZero_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_ros_duration_isZero_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 't'
var_linenr = 6
my_oracle = [{'second':1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
def test_ros_header_include_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/src/test_it_header_include_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(2, len(cps_unit_checker.errors))
def test_ros_header_include_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/src/test_it_header_include_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(3, len(cps_unit_checker.errors))
e = cps_unit_checker.errors[0]
self.assertEqual(7, e.linenr)
self.assertEqual('./dump_files_for_tests/src/../include/test_it_header_include_2.h', e.get_file_URI_where_error_occured())
e = cps_unit_checker.errors[1]
self.assertEqual(5, e.linenr)
self.assertEqual('./dump_files_for_tests/src/test_it_header_include_2.cpp', e.get_file_URI_where_error_occured())
def test_laser_range_empty_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_range_empty_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# DON'T ASSIGN UNITS TO ARRAYS WHEN time.isZero() IS CALLED
def test_ros_isZero_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_ros_isZero_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
def test_multiple_initialization_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiple_initialization.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# WEAKEN ASSIGNMENT WHEN MULTIPLIED BY A CONSTANT (INT)
def test_it_multiplication_with_constant_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiplication_with_constant_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# self.assertEqual(0, len(cps_unit_checker.errors))
var_name = 'f'
var_linenr = 9
my_oracle = [{'second':-1}]
actual_units = None
is_unit_propagation_based_on_constants = False
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
is_unit_propagation_based_on_constants = s.var_ordered_dict[var_name][var_linenr]['is_unit_propagation_based_on_constants']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertTrue(is_unit_propagation_based_on_constants, 'Unit inference should be weakened by constant interaction, but is still strong.')
# WEAKEN ASSIGNMENT WHEN MULTIPLIED BY A CONSTANT (FLOAT)
def test_it_multiplication_with_constant_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiplication_with_constant_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# self.assertEqual(0, len(cps_unit_checker.errors))
var_name = 'f'
var_linenr = 9
my_oracle = [{'second':-1}]
actual_units = None
is_unit_propagation_based_on_constants = False
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
is_unit_propagation_based_on_constants = s.var_ordered_dict[var_name][var_linenr]['is_unit_propagation_based_on_constants']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertTrue(is_unit_propagation_based_on_constants, 'Unit inference should be weakened by constant interaction, but is still strong.')
# WEAKEN ASSIGNMENT WHEN MULTIPLIED BY A CONSTANT (FLOAT)
def test_it_operator_with_unknown_variable_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_operator_with_unknown_variable_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# self.assertEqual(0, len(cps_unit_checker.errors))
var_name = 'f'
var_linenr = 10
my_oracle = [{'second':-1}]
actual_units = None
is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
is_unit_propagation_based_on_unknown_variable = s.var_ordered_dict[var_name][var_linenr]['is_unit_propagation_based_on_unknown_variable']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertTrue(is_unit_propagation_based_on_unknown_variable, 'Unit inference should be weakened by unknown variable interaction, but is still strong.')
# WEAKEN ERROR WHEN MULTIPLIED BY A CONSTANT
def test_it_operator_with_unknown_variable_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_operator_with_unknown_variable_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(2, len(cps_unit_checker.errors))
for e in cps_unit_checker.errors:
self.assertTrue(e.is_warning, 'Should be a warning but is not marked as such')
# WEAKEN ERROR WHEN MULTIPLIED BY A CONSTANT
def test_it_operator_with_unknown_variable_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_operator_with_unknown_variable_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(2, len(cps_unit_checker.errors))
# PROPAGATION ACROSS MIN MAX
def test_it_min_max_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_min_max_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 7
my_oracle = [{'second': -1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(0, len(cps_unit_checker.errors))
# PROPAGATION ACROSS MIN MAX
def test_it_min_max_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_min_max_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 8
my_oracle = [{'second': -1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(0, len(cps_unit_checker.errors))
# PROPAGATION ACROSS MIN MAX
def test_it_min_max_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_min_max_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 8
my_oracle = [{'second': -1}, {'second': -1, 'meter': 1}]
actual_units = None
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[0].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# PROPAGATION ACROSS MIN MAX
def test_it_min_max_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_min_max_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 9
my_oracle = [{'second': -1 }, {'second': -1, 'meter': 1}]
actual_units = None
is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[0].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# PROTECTION AGAINST MULTILINE
def test_it_multiline_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_multiline_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'f'
var_linenr = 25
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'second': -2.0, 'meter': 2.0}, {'second': -3.0, 'meter': 3.0}, {'second': -2.0, 'meter': 1.0}, {'second': -3.0, 'meter': 2.0}, {'second': -4.0, 'meter': 3.0}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
# KNOW FUNCTION quatToRPY
def test_it_quatToRPY_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quatToRPY_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'tw.linear.x'
var_linenr = 17
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian': 1.0}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
# WEAK INFERENCE WARNING
def test_it_weak_inference_multiplication_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_weak_inference_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference: %s warning:%s ' % (e.var_name, str(e.is_warning))
var_name = 'tw.linear.x'
var_linenr = 19
my_oracle = [{'second': -1.0, 'meter': 1.0}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(0, len(cps_unit_checker.errors))
# WEAK INFERENCE WARNING
def test_it_weak_inference_multiplication_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_weak_inference_multiplication_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'tw.linear.x'
var_linenr = 22
my_oracle = [{'second': -1.0, 'meter': 1.0}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(0, len(cps_unit_checker.errors))
# STRONG INFERENCE BECAUSE ADDITION
def test_it_weak_inference_addition_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_weak_inference_addition_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
var_name = 'tw.linear.x'
var_linenr = 22
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(2, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[0].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
var_name = 'tw.linear.y'
var_linenr = 23
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertTrue(cps_unit_checker.errors[1].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[1].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[1].is_warning)
# STRONG INFERENCE BECAUSE ADDITION - SWAPPED OPERAND ORDER
def test_it_weak_inference_addition_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_weak_inference_addition_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
var_name = 'tw.linear.x'
var_linenr = 22
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(2, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[0].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
var_name = 'tw.linear.y'
var_linenr = 23
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertTrue(cps_unit_checker.errors[1].was_assigned_mutiple_units)
self.assertFalse(cps_unit_checker.errors[1].is_unit_propagation_based_on_unknown_variable)
self.assertFalse(cps_unit_checker.errors[1].is_warning)
# STRONG INFERENCE BECAUSE ADDITION - SWAPPED OPERAND ORDER
def test_it_weak_inference_addition_3 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_weak_inference_addition_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
var_name = 'tw.linear.x'
var_linenr = 22
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'radian':1.0}, {'second':1.}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(2, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
self.assertTrue(cps_unit_checker.errors[0].is_unit_propagation_based_on_unknown_variable)
self.assertTrue(cps_unit_checker.errors[0].is_warning)
# ADDITION STAND ALONE ERROR FOR ADDITION OF INCOMPATIBLE UNITS - STRONG
def test_it_addition_without_assignment_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_addition_without_assignment_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# ADDITION STAND ALONE ERROR FOR ADDITION OF INCOMPATIBLE UNITS - WEAK UNKNOWN VARIABLE
def test_it_addition_without_assignment_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_addition_without_assignment_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertTrue(cps_unit_checker.errors[0].is_warning)
# ADDITION STAND ALONE ERROR FOR ADDITION OF INCOMPATIBLE UNITS - WEAK CONSTANT
def test_it_addition_without_assignment_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_addition_without_assignment_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertTrue(cps_unit_checker.errors[0].is_warning)
# ADDITION STAND ALONE ERROR FOR SUBTRACTION OF INCOMPATIBLE UNITS - STRONG CONSTANT
def test_it_addition_without_assignment_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_addition_without_assignment_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# ADDITION OF RADIANS
def test_it_radian_addition_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_addition_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(2, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[1].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[1].is_warning)
# ADDITION OF RADIANS
def test_it_radian_addition_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_addition_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# MULTIPLICATION OF RADIANS
def test_it_radian_multiplication_1(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# MULTIPLICATION OF RADIANS 2
def test_it_radian_multiplication_2(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_multiplication_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# MULTIPLICATION OF RADIANS
def test_it_radian_multiplication_3(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_multiplication_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# MULTIPLICATION OF RADIANS 2
def test_it_radian_multiplication_4(self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_multiplication_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# getXYZ
def test_it_getXYZ_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_getXYZ_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
self.assertEqual(0, len(cps_unit_checker.errors))
# getXYZ
def test_it_getXYZ_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_getXYZ_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
var_name = 'tw.linear.x'
var_linenr = 10
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'meter':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
# getXYZ
def test_it_getXYZ_3 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_getXYZ_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
var_name = 'tw.linear.x'
var_linenr = 10
my_oracle = [{'second': -1.0, 'meter': 1.0}, {'quaternion':1}]
actual_units = None
# is_unit_propagation_based_on_unknown_variable = False
for s in cps_unit_checker.current_configuration.scopes:
# for v in s.var_ordered_dict:
# print v
if s.className == 'main':
if var_name in s.var_ordered_dict and var_linenr in s.var_ordered_dict[var_name]:
actual_units = s.var_ordered_dict[var_name][var_linenr]['units']
self.assertEquals(actual_units, my_oracle, 'Incorrect units assigned to symbol:x Expected: %s received %s' % (my_oracle, actual_units))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertTrue(cps_unit_checker.errors[0].was_assigned_mutiple_units)
# getXYZ
def test_it_getXYZ_4 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_getXYZ_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
# for e in cps_unit_checker.errors:
# print '\nweak inference addition : %s warning:%s ' % (e.var_name, str(e.is_warning))
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# getXYZ
def test_it_getXYZ_5 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_getXYZ_5.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# QUATERNION ADDITION 1
def test_it_quaternion_addition_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_addition_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(2, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
self.assertEqual(UnitErrorTypes.ADDITION_OF_INCOMPATIBLE_UNITS, cps_unit_checker.errors[1].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[1].is_warning)
# QUATERNION ADDITION 2
def test_it_quaternion_addition_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_addition_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# QUATERNION ADDITION 3
def test_it_quaternion_addition_3 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_addition_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION ADDITION 4
def test_it_quaternion_addition_4 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_addition_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION 1
def test_it_quaternion_multiplication_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION 2
def test_it_quaternion_multiplication_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_multiplication_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION 3
def test_it_quaternion_multiplication_3 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_multiplication_3.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION 4
def test_it_quaternion_multiplication_4 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_multiplication_4.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION CLOSURE
def test_it_quaternion_closed_under_multiplication_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_closed_under_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# QUATERNION MULTIPLICATION CLOSURE
def test_it_quaternion_closed_under_multiplication_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_quaternion_closed_under_multiplication_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# RADIAN MULTIPLICATION CLOSURE
def test_it_radian_closed_under_multiplication_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_closed_under_multiplication_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# RADIAN MULTIPLICATION CLOSURE
def test_it_radian_closed_under_multiplication_2 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_radian_closed_under_multiplication_2.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(1, len(cps_unit_checker.errors))
self.assertEqual(UnitErrorTypes.VARIABLE_MULTIPLE_UNITS, cps_unit_checker.errors[0].ERROR_TYPE)
self.assertFalse(cps_unit_checker.errors[0].is_warning)
# dt Heuristic
def test_it_dt_heuristic (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_dt_heuristic_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# dt Heuristic
def test_it_plus_equals_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_plus_equals_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# dt Heuristic
def test_it_range_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_range_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
# same named argument in interface scope bug
def test_it_scope_bug_1 (self):
cps_unit_checker = CPSUnitsChecker()
cps_unit_checker.debug = False
cps_unit_checker.debug_print_AST = False
dump_file = './dump_files_for_tests/test_it_cppcheck_scope_bug_at_argument_1.cpp.dump'
source_file = dump_file.replace('.dump','')
cps_unit_checker.main_run_check(dump_file, source_file)
self.assertEqual(0, len(cps_unit_checker.errors))
if __name__ == '__main__':
unittest.main()
| true | true |
f7275de79abc81f51af3a3242318153f50472d2c | 1,465 | py | Python | app/rooms/examples/eg003_export_data_from_room/controller.py | olegliubimov/code-examples-python | 7af8c58138a9dd0f3b0be12eff1768ae23e449d3 | [
"MIT"
] | 21 | 2020-05-13T21:08:44.000Z | 2022-02-18T01:32:16.000Z | app/rooms/examples/eg003_export_data_from_room/controller.py | olegliubimov/code-examples-python | 7af8c58138a9dd0f3b0be12eff1768ae23e449d3 | [
"MIT"
] | 8 | 2020-11-23T09:28:04.000Z | 2022-02-02T12:04:08.000Z | app/rooms/examples/eg003_export_data_from_room/controller.py | olegliubimov/code-examples-python | 7af8c58138a9dd0f3b0be12eff1768ae23e449d3 | [
"MIT"
] | 26 | 2020-05-12T22:20:01.000Z | 2022-03-09T10:57:27.000Z | from docusign_rooms import RoomsApi
from flask import session, request
from ...utils import create_rooms_api_client
class Eg003Controller:
@staticmethod
def get_args():
"""Get required session and request arguments"""
return {
"account_id": session["ds_account_id"], # Represents your {ACCOUNT_ID}
"access_token": session["ds_access_token"], # Represents your {ACCESS_TOKEN}
"room_id": request.form.get("room_id"),
}
@staticmethod
def get_rooms(args):
"""
1. Create an API client with headers
2. Get rooms
"""
# Step 1. Create an API client with headers
api_client = create_rooms_api_client(access_token=args["access_token"])
# Step 2. Get room templates
rooms_api = RoomsApi(api_client)
rooms = rooms_api.get_rooms(account_id=args["account_id"])
return rooms.rooms
@staticmethod
def worker(args):
"""
1. Create an API client with headers
2. Get room field data using SDK
"""
# Step 1. Create an API client with headers
api_client = create_rooms_api_client(access_token=args["access_token"])
# Step 2. Get room field data using SDK
rooms_api = RoomsApi(api_client)
response = rooms_api.get_room_field_data(
room_id=args['room_id'],
account_id=args["account_id"]
)
return response
| 31.170213 | 89 | 0.627304 | from docusign_rooms import RoomsApi
from flask import session, request
from ...utils import create_rooms_api_client
class Eg003Controller:
@staticmethod
def get_args():
return {
"account_id": session["ds_account_id"],
"access_token": session["ds_access_token"],
"room_id": request.form.get("room_id"),
}
@staticmethod
def get_rooms(args):
api_client = create_rooms_api_client(access_token=args["access_token"])
rooms_api = RoomsApi(api_client)
rooms = rooms_api.get_rooms(account_id=args["account_id"])
return rooms.rooms
@staticmethod
def worker(args):
api_client = create_rooms_api_client(access_token=args["access_token"])
rooms_api = RoomsApi(api_client)
response = rooms_api.get_room_field_data(
room_id=args['room_id'],
account_id=args["account_id"]
)
return response
| true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.