hexsha stringlengths 40 40 | size int64 4 996k | ext stringclasses 8
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 4 996k | avg_line_length float64 1.33 58.2k | max_line_length int64 2 323k | alphanum_fraction float64 0 0.97 | content_no_comment stringlengths 0 946k | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f726ec3d0e2d020ea619b787e5eec91931023911 | 5,455 | py | Python | bin/make_changelog.py | nyuszika7h/rclone | 7bf056316fe82aa9566f6e482da5cd9b184ac3f7 | [
"MIT"
] | 3 | 2018-08-25T01:14:39.000Z | 2022-03-22T00:36:27.000Z | bin/make_changelog.py | nyuszika7h/rclone | 7bf056316fe82aa9566f6e482da5cd9b184ac3f7 | [
"MIT"
] | 1 | 2020-12-01T17:00:00.000Z | 2020-12-01T17:00:00.000Z | bin/make_changelog.py | nyuszika7h/rclone | 7bf056316fe82aa9566f6e482da5cd9b184ac3f7 | [
"MIT"
] | 2 | 2021-01-16T07:35:41.000Z | 2021-01-16T08:41:00.000Z | #!/usr/bin/python3
"""
Generate a markdown changelog for the rclone project
"""
import os
import sys
import re
import datetime
import subprocess
from collections import defaultdict
IGNORE_RES = [
r"^Add .* to contributors$",
r"^Start v\d+\.\d+(\.\d+)?-DEV development$",
r"^Version v\d+\.\d+(\.\d+)?$",
]
IGNORE_RE = re.compile("(?:" + "|".join(IGNORE_RES) + ")")
CATEGORY = re.compile(r"(^[\w/ ]+(?:, *[\w/ ]+)*):\s*(.*)$")
backends = [ x for x in os.listdir("backend") if x != "all"]
backend_aliases = {
"amazon cloud drive" : "amazonclouddrive",
"acd" : "amazonclouddrive",
"google cloud storage" : "googlecloudstorage",
"gcs" : "googlecloudstorage",
"azblob" : "azureblob",
"mountlib": "mount",
"cmount": "mount",
"mount/cmount": "mount",
}
backend_titles = {
"amazonclouddrive": "Amazon Cloud Drive",
"googlecloudstorage": "Google Cloud Storage",
"azureblob": "Azure Blob",
"ftp": "FTP",
"sftp": "SFTP",
"http": "HTTP",
"webdav": "WebDAV",
}
STRIP_FIX_RE = re.compile(r"(\s+-)?\s+((fixes|addresses)\s+)?#\d+", flags=re.I)
STRIP_PATH_RE = re.compile(r"^(backend|fs)/")
IS_FIX_RE = re.compile(r"\b(fix|fixes)\b", flags=re.I)
def make_out(data, indent=""):
"""Return a out, lines the first being a function for output into the second"""
out_lines = []
def out(category, title=None):
if title == None:
title = category
lines = data.get(category)
if not lines:
return
del(data[category])
if indent != "" and len(lines) == 1:
out_lines.append(indent+"* " + title+": " + lines[0])
return
out_lines.append(indent+"* " + title)
for line in lines:
out_lines.append(indent+" * " + line)
return out, out_lines
def process_log(log):
"""Process the incoming log into a category dict of lists"""
by_category = defaultdict(list)
for log_line in reversed(log.split("\n")):
log_line = log_line.strip()
hash, author, timestamp, message = log_line.split("|", 3)
message = message.strip()
if IGNORE_RE.search(message):
continue
match = CATEGORY.search(message)
categories = "UNKNOWN"
if match:
categories = match.group(1).lower()
message = match.group(2)
message = STRIP_FIX_RE.sub("", message)
message = message +" ("+author+")"
message = message[0].upper()+message[1:]
seen = set()
for category in categories.split(","):
category = category.strip()
category = STRIP_PATH_RE.sub("", category)
category = backend_aliases.get(category, category)
if category in seen:
continue
by_category[category].append(message)
seen.add(category)
#print category, hash, author, timestamp, message
return by_category
def main():
if len(sys.argv) != 3:
print("Syntax: %s vX.XX vX.XY" % sys.argv[0], file=sys.stderr)
sys.exit(1)
version, next_version = sys.argv[1], sys.argv[2]
log = subprocess.check_output(["git", "log", '''--pretty=format:%H|%an|%aI|%s'''] + [version+".."+next_version])
log = log.decode("utf-8")
by_category = process_log(log)
# Output backends first so remaining in by_category are core items
out, backend_lines = make_out(by_category)
out("mount", title="Mount")
out("vfs", title="VFS")
out("local", title="Local")
out("cache", title="Cache")
out("crypt", title="Crypt")
backend_names = sorted(x for x in list(by_category.keys()) if x in backends)
for backend_name in backend_names:
if backend_name in backend_titles:
backend_title = backend_titles[backend_name]
else:
backend_title = backend_name.title()
out(backend_name, title=backend_title)
# Split remaining in by_category into new features and fixes
new_features = defaultdict(list)
bugfixes = defaultdict(list)
for name, messages in by_category.items():
for message in messages:
if IS_FIX_RE.search(message):
bugfixes[name].append(message)
else:
new_features[name].append(message)
# Output new features
out, new_features_lines = make_out(new_features, indent=" ")
for name in sorted(new_features.keys()):
out(name)
# Output bugfixes
out, bugfix_lines = make_out(bugfixes, indent=" ")
for name in sorted(bugfixes.keys()):
out(name)
# Read old changlog and split
with open("docs/content/changelog.md") as fd:
old_changelog = fd.read()
heading = "# Changelog"
i = old_changelog.find(heading)
if i < 0:
raise AssertionError("Couldn't find heading in old changelog")
i += len(heading)
old_head, old_tail = old_changelog[:i], old_changelog[i:]
# Update the build date
old_head = re.sub(r"\d\d\d\d-\d\d-\d\d", str(datetime.date.today()), old_head)
# Output combined changelog with new part
sys.stdout.write(old_head)
sys.stdout.write("""
## %s - %s
* New backends
* New commands
* New Features
%s
* Bug Fixes
%s
%s""" % (next_version, datetime.date.today(), "\n".join(new_features_lines), "\n".join(bugfix_lines), "\n".join(backend_lines)))
sys.stdout.write(old_tail)
if __name__ == "__main__":
main()
| 31.171429 | 128 | 0.6033 |
import os
import sys
import re
import datetime
import subprocess
from collections import defaultdict
IGNORE_RES = [
r"^Add .* to contributors$",
r"^Start v\d+\.\d+(\.\d+)?-DEV development$",
r"^Version v\d+\.\d+(\.\d+)?$",
]
IGNORE_RE = re.compile("(?:" + "|".join(IGNORE_RES) + ")")
CATEGORY = re.compile(r"(^[\w/ ]+(?:, *[\w/ ]+)*):\s*(.*)$")
backends = [ x for x in os.listdir("backend") if x != "all"]
backend_aliases = {
"amazon cloud drive" : "amazonclouddrive",
"acd" : "amazonclouddrive",
"google cloud storage" : "googlecloudstorage",
"gcs" : "googlecloudstorage",
"azblob" : "azureblob",
"mountlib": "mount",
"cmount": "mount",
"mount/cmount": "mount",
}
backend_titles = {
"amazonclouddrive": "Amazon Cloud Drive",
"googlecloudstorage": "Google Cloud Storage",
"azureblob": "Azure Blob",
"ftp": "FTP",
"sftp": "SFTP",
"http": "HTTP",
"webdav": "WebDAV",
}
STRIP_FIX_RE = re.compile(r"(\s+-)?\s+((fixes|addresses)\s+)?#\d+", flags=re.I)
STRIP_PATH_RE = re.compile(r"^(backend|fs)/")
IS_FIX_RE = re.compile(r"\b(fix|fixes)\b", flags=re.I)
def make_out(data, indent=""):
out_lines = []
def out(category, title=None):
if title == None:
title = category
lines = data.get(category)
if not lines:
return
del(data[category])
if indent != "" and len(lines) == 1:
out_lines.append(indent+"* " + title+": " + lines[0])
return
out_lines.append(indent+"* " + title)
for line in lines:
out_lines.append(indent+" * " + line)
return out, out_lines
def process_log(log):
by_category = defaultdict(list)
for log_line in reversed(log.split("\n")):
log_line = log_line.strip()
hash, author, timestamp, message = log_line.split("|", 3)
message = message.strip()
if IGNORE_RE.search(message):
continue
match = CATEGORY.search(message)
categories = "UNKNOWN"
if match:
categories = match.group(1).lower()
message = match.group(2)
message = STRIP_FIX_RE.sub("", message)
message = message +" ("+author+")"
message = message[0].upper()+message[1:]
seen = set()
for category in categories.split(","):
category = category.strip()
category = STRIP_PATH_RE.sub("", category)
category = backend_aliases.get(category, category)
if category in seen:
continue
by_category[category].append(message)
seen.add(category)
return by_category
def main():
if len(sys.argv) != 3:
print("Syntax: %s vX.XX vX.XY" % sys.argv[0], file=sys.stderr)
sys.exit(1)
version, next_version = sys.argv[1], sys.argv[2]
log = subprocess.check_output(["git", "log", '''--pretty=format:%H|%an|%aI|%s'''] + [version+".."+next_version])
log = log.decode("utf-8")
by_category = process_log(log)
out, backend_lines = make_out(by_category)
out("mount", title="Mount")
out("vfs", title="VFS")
out("local", title="Local")
out("cache", title="Cache")
out("crypt", title="Crypt")
backend_names = sorted(x for x in list(by_category.keys()) if x in backends)
for backend_name in backend_names:
if backend_name in backend_titles:
backend_title = backend_titles[backend_name]
else:
backend_title = backend_name.title()
out(backend_name, title=backend_title)
new_features = defaultdict(list)
bugfixes = defaultdict(list)
for name, messages in by_category.items():
for message in messages:
if IS_FIX_RE.search(message):
bugfixes[name].append(message)
else:
new_features[name].append(message)
out, new_features_lines = make_out(new_features, indent=" ")
for name in sorted(new_features.keys()):
out(name)
out, bugfix_lines = make_out(bugfixes, indent=" ")
for name in sorted(bugfixes.keys()):
out(name)
with open("docs/content/changelog.md") as fd:
old_changelog = fd.read()
heading = "# Changelog"
i = old_changelog.find(heading)
if i < 0:
raise AssertionError("Couldn't find heading in old changelog")
i += len(heading)
old_head, old_tail = old_changelog[:i], old_changelog[i:]
# Update the build date
old_head = re.sub(r"\d\d\d\d-\d\d-\d\d", str(datetime.date.today()), old_head)
# Output combined changelog with new part
sys.stdout.write(old_head)
sys.stdout.write("""
## %s - %s
* New backends
* New commands
* New Features
%s
* Bug Fixes
%s
%s""" % (next_version, datetime.date.today(), "\n".join(new_features_lines), "\n".join(bugfix_lines), "\n".join(backend_lines)))
sys.stdout.write(old_tail)
if __name__ == "__main__":
main()
| true | true |
f726ef153fc15bb0f73f2ddd0be42d2221822c43 | 12,328 | py | Python | dnnutil/training.py | catalys1/dnnutil | a55a73ae59c5ac0117f58d8d8136bdd32902141f | [
"MIT"
] | null | null | null | dnnutil/training.py | catalys1/dnnutil | a55a73ae59c5ac0117f58d8d8136bdd32902141f | [
"MIT"
] | 9 | 2018-07-31T02:53:23.000Z | 2019-03-28T16:57:45.000Z | dnnutil/training.py | catalys1/dnnutil | a55a73ae59c5ac0117f58d8d8136bdd32902141f | [
"MIT"
] | null | null | null | import torch
import numpy as np
import dnnutil.network as network
import time
__all__ = ['calculate_accuracy', 'Trainer', 'ClassifierTrainer', 'AutoencoderTrainer']
def calculate_accuracy(prediction, label, axis=1):
'''calculate_accuracy(prediction, label)
Computes the mean accuracy over a batch of predictions and corresponding
ground-truth labels.
Args:
prediction (Tensor): A batch of predictions. Assumed to have shape
[batch-size, nclasses, [d0, d1, ...]].
label (LongTensor): A batch of labels. Assumed to have shape
[batch-size, [d0, d1, ...]]). The number of dimensions should be
one less than prediction.
Returns:
accuracy (Tensor): A single-element Tensor containing the percent of
correct predictions in the batch as a value between 0 and 1.
'''
return torch.eq(prediction.argmax(axis), label).float().mean().item()
class Trainer(object):
'''Trainer(net, optim, loss_fn, accuracy_metric=None)
Base class for all network trainers. Network trainer classes provide
methods to facilitate training and testing deep network models. The goal
is to encapsulate the common functionality, to reduce the boilerplate
code that needs to be repeated across projects.
Args:
net (torch.nn.Module): An instance of a network that inherits from
torch.nn.Module.
optim (torch.optim.Optimizer): An instance of an optimizer that
inherits from torch.optim.Optimizer.
loss_fn (callable): A callable that calculates and returns a loss
value. The loss value should be a single-element Tensor.
accuracy_metric (callable): A callabel that calculates and returns
an accuracy value. Usually this will be a floating point number
in [0, 1].
'''
def __init__(self, net, optim, loss_fn, accuracy_metric=None):
self.net = net
self.loss_fn = loss_fn
self.optim = optim
if accuracy_metric is not None:
self.measure_accuracy = accuracy_metric
else:
self.measure_accuracy = calculate_accuracy
self.train_loss = 0.
self.train_acc = 0.
self.test_loss = 0.
self.test_acc = 0.
def _set_train_stats(self, stats):
'''TODO:docs
'''
self.train_loss = stats[0]
self.train_acc = stats[1]
def _set_test_stats(self, stats):
'''TODO:docs
'''
self.test_loss = stats[0]
self.test_acc = stats[1]
def get_stats(self):
'''TODO:docs
'''
return (self.train_loss, self.train_acc,
self.test_loss, self.test_acc)
def train(self, dataloader, epoch):
'''Train the Trainer's network.
Args:
dataloader (torch.utils.data.DataLoader): An instance of a
DataLoader, which will provide access to the training data.
epoch (int): The current epoch.
Returns:
loss (float): The mean loss over the epoch.
accuracy (float): The mean accuracy over the epoch (in [0, 1]).
'''
self.net.train()
stats = self._run_epoch(dataloader, epoch)
self._set_train_stats(stats)
return stats
def eval(self, dataloader, epoch):
'''Evaluate the Trainer's network.
Args:
dataloader (torch.utils.data.DataLoader): An instance of a
DataLoader, which will provide access to the testing data.
epoch (int): The current epoch.
Returns:
loss (float): The mean loss over the epoch.
accuracy (float): The mean accuracy over the epoch (in [0, 1]).
'''
self.net.eval()
stats = self._run_epoch(dataloader, epoch)
self._set_test_stats(stats)
return stats
def _run_epoch(self, dataloader, epoch):
'''Perform a single epoch of either training or evaluation.
Args:
dataloader (torch.utils.data.DataLoader): An instance of a
DataLoader, which will provide access to the testing data.
epoch (int): The current epoch.
Returns:
loss (float): The mean loss over the epoch.
accuracy (float): The mean accuracy over the epoch (in [0, 1]).
'''
N = len(dataloader.batch_sampler)
msg = 'train' if self.net.training else 'test'
func = self.train_batch if self.net.training else self.test_batch
loss = []
acc = []
at = 0
for i, batch in enumerate(dataloader):
t = time.time()
if self.net.training:
self.update_lr(epoch * N + i + 1)
batch_loss, batch_acc = func(batch)
t = time.time() - t
if i == 0:
at = t
else:
at = at * i / (i + 1) + t / (i + 1)
loss.append(batch_loss)
acc.append(batch_acc)
print(f'\rEPOCH {epoch}: {msg} '
f'batch {i + 1:04d}/{N} '
f'lr[ {self.optim.param_groups[0]["lr"]:1.3e} ] '
f'[ {t:.3f} ({at:.3f}) secs ]'
f'{" "*10}',
end='', flush=True)
loss = np.mean(loss)
acc = np.mean(acc)
return loss, acc
def update_lr(self, i=None):
'''Update the optimizer's learning rate. Used for batch-level
learning rate scheduling. If using an epoch-level scheduler,
define and use it in the epoch loop. If the iteration number is
not provided (None) or the Trainer has no lr_schedule attribute,
this function does nothing and returns.
Args:
i (int): iteration number (starts at 1 for the first batch).
'''
if i is None or not hasattr(self, 'lr_schedule'):
return
self.lr_schedule.step(i)
def train_batch(self, batch):
'''Train the Trainer's network on a single training batch.
'''
raise NotImplementedError()
def test_batch(self, batch):
'''Test the Trainer's network on a single testing batch.
'''
raise NotImplementedError()
class ClassifierTrainer(Trainer):
'''ClassifierTrainer(net, optim, loss_fn, accuracy_metric=None)
Trainer for training a network to do image classification.
Args:
net (torch.nn.Module): An instance of a network that inherits from
torch.nn.Module.
optim (torch.optim.Optimizer): An instance of an optimizer that
inherits from torch.optim.Optimizer.
loss_fn (callable): A callable that calculates and returns a loss
value. The loss value should be a single-element Tensor.
accuracy_metric (callable): A callabel that calculates and returns
an accuracy value. Usually this will be a floating point number
in [0, 1].
'''
def train_batch(self, batch):
'''Train the Trainer's network on a single training batch.
Args:
batch (iterable): A 2-tuple of (images, labels). Images is a 4-d
Tensor of shape (BxCxHxW), and labels is a Tensor of 2 or more
dimensions (BxLx*) which matches images in the first (batch)
dimension. The exact dimensionality of labels will depend on
the application and loss function chosen, but often consists
of integer class-indexes.
Returns:
loss (float): The mean loss over the batch.
accuracy (float): The mean accuracy over the batch (in [0, 1]).
'''
self.optim.zero_grad()
imgs, labels = network.tocuda(batch)
predictions = self.net(imgs)
loss = self.loss_fn(predictions, labels)
loss.backward()
self.optim.step()
loss = loss.item()
with torch.no_grad():
accuracy = self.measure_accuracy(predictions, labels)
return loss, accuracy
@torch.no_grad()
def test_batch(self, batch):
'''Evaluate the Trainer's network on a single testing batch.
Args:
batch (iterable): A 2-tuple of (images, labels). Images is a 4-d
Tensor of shape (BxCxHxW), and labels is a Tensor of 2 or more
dimensions (BxLx*) which matches images in the first (batch)
dimension. The exact dimensionality of labels will depend on
the application and loss function chosen, but often consists
of integer class-indexes.
Returns:
loss (float): The mean loss over the batch.
accuracy (float): The mean accuracy over the batch (in [0, 1]).
'''
imgs, labels = network.tocuda(batch)
predictions = self.net(imgs)
loss = self.loss_fn(predictions, labels).item()
accuracy = self.measure_accuracy(predictions, labels)
return loss, accuracy
class AutoencoderTrainer(Trainer):
'''AutoencoderTrainer(net, optim, loss_fn)
Trainer for training an autoencoder network.
Args:
net (torch.nn.Module): An instance of a network that inherits from
torch.nn.Module.
optim (torch.optim.Optimizer): An instance of an optimizer that
inherits from torch.optim.Optimizer.
loss_fn (callable): A callable that calculates and returns a loss
value. The loss value should be a single-element Tensor.
'''
def __init__(self, net, optim, loss_fn):
super(AutoencoderTrainer, self).__init__(
net, optim, loss_fn, None)
delattr(self, 'measure_accuracy')
def train_batch(self, batch):
'''Train the Trainer's network on a single training batch.
Args:
batch (iterable): A 2-tuple of (images, labels). Images is a 4-d
Tensor of shape (BxCxHxW), and labels is a Tensor of 2 or more
dimensions (BxLx*) which matches images in the first (batch)
dimension. The exact dimensionality of labels will depend on
the application and loss function chosen, but often consists
of integer class-indexes.
Returns:
loss (float): The mean loss over the batch.
'''
self.optim.zero_grad()
imgs = network.tocuda(batch)
predictions = self.net(imgs)
loss = self.loss_fn(predictions, imgs)
loss.backward()
self.optim.step()
loss = loss.item()
return loss
@torch.no_grad()
def test_batch(self, batch):
'''Evaluate the Trainer's network on a single testing batch.
Args:
batch (iterable): A 2-tuple of (images, labels). Images is a 4-d
Tensor of shape (BxCxHxW), and labels is a Tensor of 2 or more
dimensions (BxLx*) which matches images in the first (batch)
dimension. The exact dimensionality of labels will depend on
the application and loss function chosen, but often consists
of integer class-indexes.
Returns:
loss (float): The mean loss over the batch.
'''
imgs = network.tocuda(batch)
predictions = self.net(imgs)
loss = self.loss_fn(predictions, imgs).item()
return loss
def _run_epoch(self, dataloader, epoch):
'''Perform a single epoch of either training or evaluation.
Args:
dataloader (torch.utils.data.DataLoader): An instance of a
DataLoader, which will provide access to the testing data.
epoch (int): The current epoch.
Returns:
loss (float): The mean loss over the epoch.
'''
N = int(np.ceil(len(dataloader.dataset) / dataloader.batch_size))
msg = 'train' if self.net.training else 'test'
func = self.train_batch if self.net.training else self.test_batch
loss = []
for i, batch in enumerate(dataloader):
batch_loss = func(batch)
loss.append(batch_loss)
print(f'\rEPOCH {epoch}: {msg} batch {i:04d}/{N}{" "*10}',
end='', flush=True)
loss = np.mean(loss)
return loss
| 36.473373 | 86 | 0.596042 | import torch
import numpy as np
import dnnutil.network as network
import time
__all__ = ['calculate_accuracy', 'Trainer', 'ClassifierTrainer', 'AutoencoderTrainer']
def calculate_accuracy(prediction, label, axis=1):
return torch.eq(prediction.argmax(axis), label).float().mean().item()
class Trainer(object):
def __init__(self, net, optim, loss_fn, accuracy_metric=None):
self.net = net
self.loss_fn = loss_fn
self.optim = optim
if accuracy_metric is not None:
self.measure_accuracy = accuracy_metric
else:
self.measure_accuracy = calculate_accuracy
self.train_loss = 0.
self.train_acc = 0.
self.test_loss = 0.
self.test_acc = 0.
def _set_train_stats(self, stats):
self.train_loss = stats[0]
self.train_acc = stats[1]
def _set_test_stats(self, stats):
self.test_loss = stats[0]
self.test_acc = stats[1]
def get_stats(self):
return (self.train_loss, self.train_acc,
self.test_loss, self.test_acc)
def train(self, dataloader, epoch):
self.net.train()
stats = self._run_epoch(dataloader, epoch)
self._set_train_stats(stats)
return stats
def eval(self, dataloader, epoch):
self.net.eval()
stats = self._run_epoch(dataloader, epoch)
self._set_test_stats(stats)
return stats
def _run_epoch(self, dataloader, epoch):
N = len(dataloader.batch_sampler)
msg = 'train' if self.net.training else 'test'
func = self.train_batch if self.net.training else self.test_batch
loss = []
acc = []
at = 0
for i, batch in enumerate(dataloader):
t = time.time()
if self.net.training:
self.update_lr(epoch * N + i + 1)
batch_loss, batch_acc = func(batch)
t = time.time() - t
if i == 0:
at = t
else:
at = at * i / (i + 1) + t / (i + 1)
loss.append(batch_loss)
acc.append(batch_acc)
print(f'\rEPOCH {epoch}: {msg} '
f'batch {i + 1:04d}/{N} '
f'lr[ {self.optim.param_groups[0]["lr"]:1.3e} ] '
f'[ {t:.3f} ({at:.3f}) secs ]'
f'{" "*10}',
end='', flush=True)
loss = np.mean(loss)
acc = np.mean(acc)
return loss, acc
def update_lr(self, i=None):
if i is None or not hasattr(self, 'lr_schedule'):
return
self.lr_schedule.step(i)
def train_batch(self, batch):
raise NotImplementedError()
def test_batch(self, batch):
raise NotImplementedError()
class ClassifierTrainer(Trainer):
def train_batch(self, batch):
self.optim.zero_grad()
imgs, labels = network.tocuda(batch)
predictions = self.net(imgs)
loss = self.loss_fn(predictions, labels)
loss.backward()
self.optim.step()
loss = loss.item()
with torch.no_grad():
accuracy = self.measure_accuracy(predictions, labels)
return loss, accuracy
@torch.no_grad()
def test_batch(self, batch):
imgs, labels = network.tocuda(batch)
predictions = self.net(imgs)
loss = self.loss_fn(predictions, labels).item()
accuracy = self.measure_accuracy(predictions, labels)
return loss, accuracy
class AutoencoderTrainer(Trainer):
def __init__(self, net, optim, loss_fn):
super(AutoencoderTrainer, self).__init__(
net, optim, loss_fn, None)
delattr(self, 'measure_accuracy')
def train_batch(self, batch):
self.optim.zero_grad()
imgs = network.tocuda(batch)
predictions = self.net(imgs)
loss = self.loss_fn(predictions, imgs)
loss.backward()
self.optim.step()
loss = loss.item()
return loss
@torch.no_grad()
def test_batch(self, batch):
imgs = network.tocuda(batch)
predictions = self.net(imgs)
loss = self.loss_fn(predictions, imgs).item()
return loss
def _run_epoch(self, dataloader, epoch):
N = int(np.ceil(len(dataloader.dataset) / dataloader.batch_size))
msg = 'train' if self.net.training else 'test'
func = self.train_batch if self.net.training else self.test_batch
loss = []
for i, batch in enumerate(dataloader):
batch_loss = func(batch)
loss.append(batch_loss)
print(f'\rEPOCH {epoch}: {msg} batch {i:04d}/{N}{" "*10}',
end='', flush=True)
loss = np.mean(loss)
return loss
| true | true |
f726efc91697481d09f75f4837fbbf66b5fd0535 | 4,736 | py | Python | build_nec_file.py | crumpstrr33/NEC_scripts | fcb88afc538c884dab141ac26529ed3adf53e81e | [
"MIT"
] | null | null | null | build_nec_file.py | crumpstrr33/NEC_scripts | fcb88afc538c884dab141ac26529ed3adf53e81e | [
"MIT"
] | null | null | null | build_nec_file.py | crumpstrr33/NEC_scripts | fcb88afc538c884dab141ac26529ed3adf53e81e | [
"MIT"
] | null | null | null | """
This script uses python to build a `.nec` file. This allows
for the use of variables and other arithmetic which is much
easier in python. For information on the cards specified by the
arguments, e.g. EX or RP, check out https://www.nec2.org/part_3/cards/
"""
from datetime import datetime as dt
from math import *
def build_nec_file(
comments,
wires,
constants,
frequency=[],
excitations=[],
rad_pattern=[],
output="output",
lims=[2, 5, 10, 20, 30, 40, 50, 60, 70, 80],
sig_figs=2,
verbose=0,
):
"""
Creates a `.nec` file. The values can contain arithmetic in it. Anything
that Python's `eval` can handle and any function in the `math` package,
so trig functions, exponentials, etc.
Parameters:
comments - The comments that are found on CM cards, added as a list
wires - The wire data found on GW cards, a list of lists where the
elements of the sublist are each parameter for the wire. Can use
constants defined in the `constants` argument and baisc arithmatic
(or any function defined in Python's `math` package).
constants - A dictionary of constants to be substituted into the nec
file. Constant names may not be such that one is found in another.
For example, you cannot have 'offset' and 'origin_offset' because
'offset' can be found (via Python's `replace` method in 'origin_offset').
frequency (default []) - Defines the FR card, the frequency range and step
for calculations.
excitations (default []) - List for EX cards, cards that define excitations,
e.g. voltage sources.
rad_pattern (default []) - The RP card which defines how to calculate the
the radiation pattern.
output (default 'output') - The name of the output `.nec` file, the
extension is automatically added.
lims (default [2, 5, 10, 20, 30, 40, 50, 60, 70, 80]) - The character
number that each column ends on. For example, for the default,
we allocate 2 characters for the first argument (the card name),
3 for the next column, 5 for the third, and 10 for the rest.
sig_figs (default 2) - The number of significant figures used for the
numbers written in scientific notation (i.e. how many digits after
the decimal point).
verbose (default 2) - If 0, will not print out anything. If 1, will print out
just info on the number of wires, file location and time taken to create
file. If 2, will print out the comments in the .nec file, and info on the
number of wires, file location and time taken to create file.
"""
# scinot_ind tells this function at which column of a row to
# start using scientific notation
def _format_rows(rows, card, scinot_ind):
for row in rows:
row_str = card
for ind, param in enumerate(row):
# Replace constants with values
for const_key, const_val in constants.items():
param = param.replace(const_key, str(const_val))
# Add to line correctly formatted
rlim = lims[ind + 1] - lims[ind]
if ind > (scinot_ind - 1):
# Change to 3-digit rounded scientific notation
val = f"{eval(param):.{sig_figs}e}"
else:
# Otherwise just evaluate, e.g. tag number
val = str(eval(param))
# Add to string and push the rightmost it can go
row_str += f"{val.rjust(rlim):<{rlim}}"
nec_file.append(row_str)
dt_start = dt.now()
nec_file = []
# Add comments
for comment in comments:
nec_file.append(f"CM {comment}")
# Comment end
nec_file.append("CE")
# Add wires
_format_rows(rows=wires, card="GW", scinot_ind=2)
# Wire end
nec_file.append(f"GE{(lims[1] - lims[0] - 1)*' '}0")
# Frequency
if frequency:
_format_rows(rows=[frequency], card="FR", scinot_ind=4)
# Excitations
if excitations:
_format_rows(rows=excitations, card="EX", scinot_ind=4)
# Radation pattern,
if rad_pattern:
_format_rows(rows=[rad_pattern], card="RP", scinot_ind=8)
# File end
nec_file.append("EN\n")
# Write to new file
with open(f"{output}.nec", "w") as f:
f.write("\n".join(nec_file))
dt_end = dt.now()
if verbose:
if verbose == 2:
print("\nComments:")
for comment in comments:
print(" " * 8 + f"{comment}")
print(
f"Wrote {len(wires)} wires to {output}.nec in "
+ f"{(dt_end - dt_start).total_seconds() * 1000:.3f}ms."
)
| 39.798319 | 81 | 0.618243 | from datetime import datetime as dt
from math import *
def build_nec_file(
comments,
wires,
constants,
frequency=[],
excitations=[],
rad_pattern=[],
output="output",
lims=[2, 5, 10, 20, 30, 40, 50, 60, 70, 80],
sig_figs=2,
verbose=0,
):
def _format_rows(rows, card, scinot_ind):
for row in rows:
row_str = card
for ind, param in enumerate(row):
for const_key, const_val in constants.items():
param = param.replace(const_key, str(const_val))
rlim = lims[ind + 1] - lims[ind]
if ind > (scinot_ind - 1):
val = f"{eval(param):.{sig_figs}e}"
else:
val = str(eval(param))
row_str += f"{val.rjust(rlim):<{rlim}}"
nec_file.append(row_str)
dt_start = dt.now()
nec_file = []
for comment in comments:
nec_file.append(f"CM {comment}")
nec_file.append("CE")
_format_rows(rows=wires, card="GW", scinot_ind=2)
nec_file.append(f"GE{(lims[1] - lims[0] - 1)*' '}0")
if frequency:
_format_rows(rows=[frequency], card="FR", scinot_ind=4)
if excitations:
_format_rows(rows=excitations, card="EX", scinot_ind=4)
if rad_pattern:
_format_rows(rows=[rad_pattern], card="RP", scinot_ind=8)
nec_file.append("EN\n")
with open(f"{output}.nec", "w") as f:
f.write("\n".join(nec_file))
dt_end = dt.now()
if verbose:
if verbose == 2:
print("\nComments:")
for comment in comments:
print(" " * 8 + f"{comment}")
print(
f"Wrote {len(wires)} wires to {output}.nec in "
+ f"{(dt_end - dt_start).total_seconds() * 1000:.3f}ms."
)
| true | true |
f726f0ecbf1474170ae42090ca93cfbcb7385ec8 | 1,735 | py | Python | flightServices/flightApp/views.py | saibottrenham/djangorest | 45efadabb19cf421a282b98f3480cf49789eaae1 | [
"MIT"
] | null | null | null | flightServices/flightApp/views.py | saibottrenham/djangorest | 45efadabb19cf421a282b98f3480cf49789eaae1 | [
"MIT"
] | null | null | null | flightServices/flightApp/views.py | saibottrenham/djangorest | 45efadabb19cf421a282b98f3480cf49789eaae1 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from flightApp.models import Flight, Passenger, Reservation
from flightApp.serializers import FlightSerializer, PassengerSerializer, ReservationSerializer
from rest_framework import viewsets
from rest_framework.response import Response
from rest_framework.decorators import api_view
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
@api_view(['POST'])
def find_flights(request):
flights = Flight.objects.filter(
departureCity=request.data['departureCity'],
arrivalCity=request.data['arrivalCity'],
dateOfDeparture=request.data['dateOfDeparture'],
)
serializer = FlightSerializer(flights, many=True)
return Response(serializer.data)
@api_view(['POST'])
def save_reservation(request):
reservation = Reservation.objects.create(
flight=Flight.objects.get(id=request.data['flightId']),
passenger=Passenger.objects.create(
firstName=request.data['firstName'],
lastName=request.data['lastName'],
middleName=request.data['middleName'],
email=request.data['email'],
phone=request.data['phone'],
),
)
return Response(status=status.HTTP_201_CREATED, data=ReservationSerializer(reservation).data)
class FlightViewSet(viewsets.ModelViewSet):
queryset = Flight.objects.all()
serializer_class = FlightSerializer
permission_classes = (IsAuthenticated,)
class PassengerViewSet(viewsets.ModelViewSet):
queryset = Passenger.objects.all()
serializer_class = PassengerSerializer
class ReservationViewSet(viewsets.ModelViewSet):
queryset = Reservation.objects.all()
serializer_class = ReservationSerializer
| 34.019608 | 97 | 0.748703 | from django.shortcuts import render
from flightApp.models import Flight, Passenger, Reservation
from flightApp.serializers import FlightSerializer, PassengerSerializer, ReservationSerializer
from rest_framework import viewsets
from rest_framework.response import Response
from rest_framework.decorators import api_view
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
@api_view(['POST'])
def find_flights(request):
flights = Flight.objects.filter(
departureCity=request.data['departureCity'],
arrivalCity=request.data['arrivalCity'],
dateOfDeparture=request.data['dateOfDeparture'],
)
serializer = FlightSerializer(flights, many=True)
return Response(serializer.data)
@api_view(['POST'])
def save_reservation(request):
reservation = Reservation.objects.create(
flight=Flight.objects.get(id=request.data['flightId']),
passenger=Passenger.objects.create(
firstName=request.data['firstName'],
lastName=request.data['lastName'],
middleName=request.data['middleName'],
email=request.data['email'],
phone=request.data['phone'],
),
)
return Response(status=status.HTTP_201_CREATED, data=ReservationSerializer(reservation).data)
class FlightViewSet(viewsets.ModelViewSet):
queryset = Flight.objects.all()
serializer_class = FlightSerializer
permission_classes = (IsAuthenticated,)
class PassengerViewSet(viewsets.ModelViewSet):
queryset = Passenger.objects.all()
serializer_class = PassengerSerializer
class ReservationViewSet(viewsets.ModelViewSet):
queryset = Reservation.objects.all()
serializer_class = ReservationSerializer
| true | true |
f726f0f2c8fef30d17ac352da7f4d08edb92adb8 | 15,583 | py | Python | nemo/collections/asr/models/classification_models.py | vinayphadnis/NeMo | 9dc7773c48e164b8a82051bb558a728c6eeb85ec | [
"Apache-2.0"
] | 2 | 2020-10-08T13:38:46.000Z | 2020-10-14T15:09:34.000Z | nemo/collections/asr/models/classification_models.py | vinayphadnis/NeMo | 9dc7773c48e164b8a82051bb558a728c6eeb85ec | [
"Apache-2.0"
] | null | null | null | nemo/collections/asr/models/classification_models.py | vinayphadnis/NeMo | 9dc7773c48e164b8a82051bb558a728c6eeb85ec | [
"Apache-2.0"
] | 1 | 2020-12-18T14:23:37.000Z | 2020-12-18T14:23:37.000Z | # Copyright (c) 2020, NVIDIA CORPORATION. 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.
import copy
from typing import Dict, List, Optional, Union
import torch
from omegaconf import DictConfig, ListConfig, OmegaConf
from pytorch_lightning import Trainer
from nemo.collections.asr.data.audio_to_text import AudioLabelDataset
from nemo.collections.asr.models.asr_model import ASRModel
from nemo.collections.asr.parts.features import WaveformFeaturizer
from nemo.collections.asr.parts.perturb import process_augmentations
from nemo.collections.common.losses import CrossEntropyLoss
from nemo.collections.common.metrics import TopKClassificationAccuracy, compute_topk_accuracy
from nemo.core.classes.common import PretrainedModelInfo, typecheck
from nemo.core.neural_types import *
from nemo.utils import logging
__all__ = ['EncDecClassificationModel', 'MatchboxNet']
class EncDecClassificationModel(ASRModel):
"""Encoder decoder CTC-based models."""
def __init__(self, cfg: DictConfig, trainer: Trainer = None):
super().__init__(cfg=cfg, trainer=trainer)
self._update_decoder_config(self.cfg.decoder)
self.preprocessor = EncDecClassificationModel.from_config_dict(self._cfg.preprocessor)
self.encoder = EncDecClassificationModel.from_config_dict(self._cfg.encoder)
self.decoder = EncDecClassificationModel.from_config_dict(self._cfg.decoder)
self.loss = CrossEntropyLoss()
if hasattr(self._cfg, 'spec_augment') and self._cfg.spec_augment is not None:
self.spec_augmentation = EncDecClassificationModel.from_config_dict(self._cfg.spec_augment)
else:
self.spec_augmentation = None
if hasattr(self._cfg, 'crop_or_pad_augment') and self._cfg.crop_or_pad_augment is not None:
self.crop_or_pad = EncDecClassificationModel.from_config_dict(self._cfg.crop_or_pad_augment)
else:
self.crop_or_pad = None
# Setup metric objects
self._accuracy = TopKClassificationAccuracy()
def transcribe(self, paths2audio_files: str) -> str:
raise NotImplementedError("Classification models do not transcribe audio.")
def _setup_dataloader_from_config(self, config: Optional[Dict]):
if config.get('manifest_filepath') is None:
return
if 'augmentor' in config:
augmentor = process_augmentations(config['augmentor'])
else:
augmentor = None
featurizer = WaveformFeaturizer(
sample_rate=config['sample_rate'], int_values=config.get('int_values', False), augmentor=augmentor
)
dataset = AudioLabelDataset(
manifest_filepath=config['manifest_filepath'],
labels=config['labels'],
featurizer=featurizer,
max_duration=config.get('max_duration', None),
min_duration=config.get('min_duration', None),
trim=config.get('trim_silence', True),
load_audio=config.get('load_audio', True),
)
return torch.utils.data.DataLoader(
dataset=dataset,
batch_size=config['batch_size'],
collate_fn=dataset.collate_fn,
drop_last=config.get('drop_last', False),
shuffle=config['shuffle'],
num_workers=config.get('num_workers', 0),
pin_memory=config.get('pin_memory', False),
)
def setup_training_data(self, train_data_config: Optional[Union[DictConfig, Dict]]):
if 'shuffle' not in train_data_config:
train_data_config['shuffle'] = True
self._train_dl = self._setup_dataloader_from_config(config=train_data_config)
def setup_validation_data(self, val_data_config: Optional[Union[DictConfig, Dict]]):
if 'shuffle' not in val_data_config:
val_data_config['shuffle'] = False
self._validation_dl = self._setup_dataloader_from_config(config=val_data_config)
def setup_test_data(self, test_data_config: Optional[Union[DictConfig, Dict]]):
if 'shuffle' not in test_data_config:
test_data_config['shuffle'] = False
self._test_dl = self._setup_dataloader_from_config(config=test_data_config)
def test_dataloader(self):
if self._test_dl is not None:
return self._test_dl
@classmethod
def list_available_models(cls) -> Optional[List[PretrainedModelInfo]]:
"""
This method returns a list of pre-trained model which can be instantiated directly from NVIDIA's NGC cloud.
Returns:
List of available pre-trained models.
"""
result = []
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x1x64-v1",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x1x64-v1.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v1, 30 classes) which obtains 97.32% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x2x64-v1",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x2x64-v1.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v1, 30 classes) which obtains 97.68% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x1x64-v2",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x1x64-v2.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v2, 35 classes) which obtains 97.12% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x1x64-v2",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x1x64-v2.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v2, 30 classes) which obtains 97.29% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x1x64-v2-subset-task",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x1x64-v2-subset-task.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v2, 10+2 classes) which obtains 98.2% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x2x64-v2-subset-task",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x2x64-v2-subset-task.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v2, 10+2 classes) which obtains 98.4% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-VAD-3x2",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet_VAD_3x2.nemo",
description="Voice Activity Detection MatchboxNet model trained on google speech command (v2) and freesound background data, which obtains 0.992 accuracy on testset from same source and 0.852 TPR for FPR=0.315 on testset (ALL) of AVA movie data",
)
result.append(model)
return result
@property
def input_types(self) -> Optional[Dict[str, NeuralType]]:
if hasattr(self.preprocessor, '_sample_rate'):
audio_eltype = AudioSignal(freq=self.preprocessor._sample_rate)
else:
audio_eltype = AudioSignal()
return {
"input_signal": NeuralType(('B', 'T'), audio_eltype),
"input_signal_length": NeuralType(tuple('B'), LengthsType()),
}
@property
def output_types(self) -> Optional[Dict[str, NeuralType]]:
return {"outputs": NeuralType(('B', 'D'), LogitsType())}
@typecheck()
def forward(self, input_signal, input_signal_length):
processed_signal, processed_signal_len = self.preprocessor(
input_signal=input_signal, length=input_signal_length,
)
# Crop or pad is always applied
if self.crop_or_pad is not None:
processed_signal, processed_signal_len = self.crop_or_pad(
input_signal=processed_signal, length=processed_signal_len
)
# Spec augment is not applied during evaluation/testing
if self.spec_augmentation is not None and self.training:
processed_signal = self.spec_augmentation(input_spec=processed_signal)
encoded, encoded_len = self.encoder(audio_signal=processed_signal, length=processed_signal_len)
logits = self.decoder(encoder_output=encoded)
return logits
# PTL-specific methods
def training_step(self, batch, batch_nb):
self.training_step_end()
audio_signal, audio_signal_len, labels, labels_len = batch
logits = self.forward(input_signal=audio_signal, input_signal_length=audio_signal_len)
loss_value = self.loss(logits=logits, labels=labels)
tensorboard_logs = {
'train_loss': loss_value,
'learning_rate': self._optimizer.param_groups[0]['lr'],
}
correct_counts, total_counts = self._accuracy(logits=logits, labels=labels)
for ki in range(correct_counts.shape[-1]):
correct_count = correct_counts[ki]
total_count = total_counts[ki]
top_k = self._accuracy.top_k[ki]
tensorboard_logs['training_batch_accuracy_top@{}'.format(top_k)] = correct_count / float(total_count)
return {'loss': loss_value, 'log': tensorboard_logs}
def validation_step(self, batch, batch_idx, dataloader_idx=0):
audio_signal, audio_signal_len, labels, labels_len = batch
logits = self.forward(input_signal=audio_signal, input_signal_length=audio_signal_len)
loss_value = self.loss(logits=logits, labels=labels)
correct_counts, total_counts = self._accuracy(logits=logits, labels=labels)
return {'val_loss': loss_value, 'val_correct_counts': correct_counts, 'val_total_counts': total_counts}
def test_step(self, batch, batch_idx, dataloader_idx=0):
audio_signal, audio_signal_len, labels, labels_len = batch
logits = self.forward(input_signal=audio_signal, input_signal_length=audio_signal_len)
loss_value = self.loss(logits=logits, labels=labels)
correct_counts, total_counts = self._accuracy(logits=logits, labels=labels)
return {'test_loss': loss_value, 'test_correct_counts': correct_counts, 'test_total_counts': total_counts}
def multi_validation_epoch_end(self, outputs, dataloader_idx: int = 0):
val_loss_mean = torch.stack([x['val_loss'] for x in outputs]).mean()
correct_counts = torch.stack([x['val_correct_counts'] for x in outputs])
total_counts = torch.stack([x['val_total_counts'] for x in outputs])
topk_scores = compute_topk_accuracy(correct_counts, total_counts)
tensorboard_log = {'val_loss': val_loss_mean}
for top_k, score in zip(self._accuracy.top_k, topk_scores):
tensorboard_log['val_epoch_top@{}'.format(top_k)] = score
return {'log': tensorboard_log}
def multi_test_epoch_end(self, outputs, dataloader_idx: int = 0):
test_loss_mean = torch.stack([x['test_loss'] for x in outputs]).mean()
correct_counts = torch.stack([x['test_correct_counts'].unsqueeze(0) for x in outputs])
total_counts = torch.stack([x['test_total_counts'].unsqueeze(0) for x in outputs])
topk_scores = compute_topk_accuracy(correct_counts, total_counts)
tensorboard_log = {'test_loss': test_loss_mean}
for top_k, score in zip(self._accuracy.top_k, topk_scores):
tensorboard_log['test_epoch_top@{}'.format(top_k)] = score
return {'log': tensorboard_log}
def change_labels(self, new_labels: List[str]):
"""
Changes labels used by the decoder model. Use this method when fine-tuning on from pre-trained model.
This method changes only decoder and leaves encoder and pre-processing modules unchanged. For example, you would
use it if you want to use pretrained encoder when fine-tuning on a data in another dataset.
If new_labels == self.decoder.vocabulary then nothing will be changed.
Args:
new_labels: list with new labels. Must contain at least 2 elements. Typically, \
this is set of labels for the dataset.
Returns: None
"""
if new_labels is not None and not isinstance(new_labels, ListConfig):
new_labels = ListConfig(new_labels)
if self._cfg.labels == new_labels:
logging.warning(
f"Old labels ({self._cfg.labels}) and new labels ({new_labels}) match. Not changing anything"
)
else:
if new_labels is None or len(new_labels) == 0:
raise ValueError(f'New labels must be non-empty list of labels. But I got: {new_labels}')
# Update config
self._cfg.labels = new_labels
decoder_config = self.decoder.to_config_dict()
new_decoder_config = copy.deepcopy(decoder_config)
self._update_decoder_config(new_decoder_config)
del self.decoder
self.decoder = EncDecClassificationModel.from_config_dict(new_decoder_config)
OmegaConf.set_struct(self._cfg.decoder, False)
self._cfg.decoder = new_decoder_config
OmegaConf.set_struct(self._cfg.decoder, True)
if 'train_ds' in self._cfg and self._cfg.train_ds is not None:
self._cfg.train_ds.labels = new_labels
if 'validation_ds' in self._cfg and self._cfg.validation_ds is not None:
self._cfg.validation_ds.labels = new_labels
if 'test_ds' in self._cfg and self._cfg.test_ds is not None:
self._cfg.test_ds.labels = new_labels
logging.info(f"Changed decoder output to {self.decoder.num_classes} labels.")
def _update_decoder_config(self, cfg):
"""
Update the number of classes in the decoder based on labels provided.
Args:
cfg: The config of the decoder which will be updated.
"""
OmegaConf.set_struct(cfg, False)
labels = self.cfg.labels
if 'params' in cfg:
cfg.params.num_classes = len(labels)
else:
cfg.num_classes = len(labels)
OmegaConf.set_struct(cfg, True)
class MatchboxNet(EncDecClassificationModel):
pass
| 46.10355 | 258 | 0.686774 |
import copy
from typing import Dict, List, Optional, Union
import torch
from omegaconf import DictConfig, ListConfig, OmegaConf
from pytorch_lightning import Trainer
from nemo.collections.asr.data.audio_to_text import AudioLabelDataset
from nemo.collections.asr.models.asr_model import ASRModel
from nemo.collections.asr.parts.features import WaveformFeaturizer
from nemo.collections.asr.parts.perturb import process_augmentations
from nemo.collections.common.losses import CrossEntropyLoss
from nemo.collections.common.metrics import TopKClassificationAccuracy, compute_topk_accuracy
from nemo.core.classes.common import PretrainedModelInfo, typecheck
from nemo.core.neural_types import *
from nemo.utils import logging
__all__ = ['EncDecClassificationModel', 'MatchboxNet']
class EncDecClassificationModel(ASRModel):
def __init__(self, cfg: DictConfig, trainer: Trainer = None):
super().__init__(cfg=cfg, trainer=trainer)
self._update_decoder_config(self.cfg.decoder)
self.preprocessor = EncDecClassificationModel.from_config_dict(self._cfg.preprocessor)
self.encoder = EncDecClassificationModel.from_config_dict(self._cfg.encoder)
self.decoder = EncDecClassificationModel.from_config_dict(self._cfg.decoder)
self.loss = CrossEntropyLoss()
if hasattr(self._cfg, 'spec_augment') and self._cfg.spec_augment is not None:
self.spec_augmentation = EncDecClassificationModel.from_config_dict(self._cfg.spec_augment)
else:
self.spec_augmentation = None
if hasattr(self._cfg, 'crop_or_pad_augment') and self._cfg.crop_or_pad_augment is not None:
self.crop_or_pad = EncDecClassificationModel.from_config_dict(self._cfg.crop_or_pad_augment)
else:
self.crop_or_pad = None
self._accuracy = TopKClassificationAccuracy()
def transcribe(self, paths2audio_files: str) -> str:
raise NotImplementedError("Classification models do not transcribe audio.")
def _setup_dataloader_from_config(self, config: Optional[Dict]):
if config.get('manifest_filepath') is None:
return
if 'augmentor' in config:
augmentor = process_augmentations(config['augmentor'])
else:
augmentor = None
featurizer = WaveformFeaturizer(
sample_rate=config['sample_rate'], int_values=config.get('int_values', False), augmentor=augmentor
)
dataset = AudioLabelDataset(
manifest_filepath=config['manifest_filepath'],
labels=config['labels'],
featurizer=featurizer,
max_duration=config.get('max_duration', None),
min_duration=config.get('min_duration', None),
trim=config.get('trim_silence', True),
load_audio=config.get('load_audio', True),
)
return torch.utils.data.DataLoader(
dataset=dataset,
batch_size=config['batch_size'],
collate_fn=dataset.collate_fn,
drop_last=config.get('drop_last', False),
shuffle=config['shuffle'],
num_workers=config.get('num_workers', 0),
pin_memory=config.get('pin_memory', False),
)
def setup_training_data(self, train_data_config: Optional[Union[DictConfig, Dict]]):
if 'shuffle' not in train_data_config:
train_data_config['shuffle'] = True
self._train_dl = self._setup_dataloader_from_config(config=train_data_config)
def setup_validation_data(self, val_data_config: Optional[Union[DictConfig, Dict]]):
if 'shuffle' not in val_data_config:
val_data_config['shuffle'] = False
self._validation_dl = self._setup_dataloader_from_config(config=val_data_config)
def setup_test_data(self, test_data_config: Optional[Union[DictConfig, Dict]]):
if 'shuffle' not in test_data_config:
test_data_config['shuffle'] = False
self._test_dl = self._setup_dataloader_from_config(config=test_data_config)
def test_dataloader(self):
if self._test_dl is not None:
return self._test_dl
@classmethod
def list_available_models(cls) -> Optional[List[PretrainedModelInfo]]:
result = []
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x1x64-v1",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x1x64-v1.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v1, 30 classes) which obtains 97.32% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x2x64-v1",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x2x64-v1.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v1, 30 classes) which obtains 97.68% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x1x64-v2",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x1x64-v2.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v2, 35 classes) which obtains 97.12% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x1x64-v2",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x1x64-v2.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v2, 30 classes) which obtains 97.29% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x1x64-v2-subset-task",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x1x64-v2-subset-task.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v2, 10+2 classes) which obtains 98.2% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-3x2x64-v2-subset-task",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet-3x2x64-v2-subset-task.nemo",
description="MatchboxNet model trained on Google Speech Commands dataset (v2, 10+2 classes) which obtains 98.4% accuracy on test set.",
)
result.append(model)
model = PretrainedModelInfo(
pretrained_model_name="MatchboxNet-VAD-3x2",
location="https://api.ngc.nvidia.com/v2/models/nvidia/nemospeechmodels/versions/1.0.0a5/files/MatchboxNet_VAD_3x2.nemo",
description="Voice Activity Detection MatchboxNet model trained on google speech command (v2) and freesound background data, which obtains 0.992 accuracy on testset from same source and 0.852 TPR for FPR=0.315 on testset (ALL) of AVA movie data",
)
result.append(model)
return result
@property
def input_types(self) -> Optional[Dict[str, NeuralType]]:
if hasattr(self.preprocessor, '_sample_rate'):
audio_eltype = AudioSignal(freq=self.preprocessor._sample_rate)
else:
audio_eltype = AudioSignal()
return {
"input_signal": NeuralType(('B', 'T'), audio_eltype),
"input_signal_length": NeuralType(tuple('B'), LengthsType()),
}
@property
def output_types(self) -> Optional[Dict[str, NeuralType]]:
return {"outputs": NeuralType(('B', 'D'), LogitsType())}
@typecheck()
def forward(self, input_signal, input_signal_length):
processed_signal, processed_signal_len = self.preprocessor(
input_signal=input_signal, length=input_signal_length,
)
if self.crop_or_pad is not None:
processed_signal, processed_signal_len = self.crop_or_pad(
input_signal=processed_signal, length=processed_signal_len
)
if self.spec_augmentation is not None and self.training:
processed_signal = self.spec_augmentation(input_spec=processed_signal)
encoded, encoded_len = self.encoder(audio_signal=processed_signal, length=processed_signal_len)
logits = self.decoder(encoder_output=encoded)
return logits
def training_step(self, batch, batch_nb):
self.training_step_end()
audio_signal, audio_signal_len, labels, labels_len = batch
logits = self.forward(input_signal=audio_signal, input_signal_length=audio_signal_len)
loss_value = self.loss(logits=logits, labels=labels)
tensorboard_logs = {
'train_loss': loss_value,
'learning_rate': self._optimizer.param_groups[0]['lr'],
}
correct_counts, total_counts = self._accuracy(logits=logits, labels=labels)
for ki in range(correct_counts.shape[-1]):
correct_count = correct_counts[ki]
total_count = total_counts[ki]
top_k = self._accuracy.top_k[ki]
tensorboard_logs['training_batch_accuracy_top@{}'.format(top_k)] = correct_count / float(total_count)
return {'loss': loss_value, 'log': tensorboard_logs}
def validation_step(self, batch, batch_idx, dataloader_idx=0):
audio_signal, audio_signal_len, labels, labels_len = batch
logits = self.forward(input_signal=audio_signal, input_signal_length=audio_signal_len)
loss_value = self.loss(logits=logits, labels=labels)
correct_counts, total_counts = self._accuracy(logits=logits, labels=labels)
return {'val_loss': loss_value, 'val_correct_counts': correct_counts, 'val_total_counts': total_counts}
def test_step(self, batch, batch_idx, dataloader_idx=0):
audio_signal, audio_signal_len, labels, labels_len = batch
logits = self.forward(input_signal=audio_signal, input_signal_length=audio_signal_len)
loss_value = self.loss(logits=logits, labels=labels)
correct_counts, total_counts = self._accuracy(logits=logits, labels=labels)
return {'test_loss': loss_value, 'test_correct_counts': correct_counts, 'test_total_counts': total_counts}
def multi_validation_epoch_end(self, outputs, dataloader_idx: int = 0):
val_loss_mean = torch.stack([x['val_loss'] for x in outputs]).mean()
correct_counts = torch.stack([x['val_correct_counts'] for x in outputs])
total_counts = torch.stack([x['val_total_counts'] for x in outputs])
topk_scores = compute_topk_accuracy(correct_counts, total_counts)
tensorboard_log = {'val_loss': val_loss_mean}
for top_k, score in zip(self._accuracy.top_k, topk_scores):
tensorboard_log['val_epoch_top@{}'.format(top_k)] = score
return {'log': tensorboard_log}
def multi_test_epoch_end(self, outputs, dataloader_idx: int = 0):
test_loss_mean = torch.stack([x['test_loss'] for x in outputs]).mean()
correct_counts = torch.stack([x['test_correct_counts'].unsqueeze(0) for x in outputs])
total_counts = torch.stack([x['test_total_counts'].unsqueeze(0) for x in outputs])
topk_scores = compute_topk_accuracy(correct_counts, total_counts)
tensorboard_log = {'test_loss': test_loss_mean}
for top_k, score in zip(self._accuracy.top_k, topk_scores):
tensorboard_log['test_epoch_top@{}'.format(top_k)] = score
return {'log': tensorboard_log}
def change_labels(self, new_labels: List[str]):
if new_labels is not None and not isinstance(new_labels, ListConfig):
new_labels = ListConfig(new_labels)
if self._cfg.labels == new_labels:
logging.warning(
f"Old labels ({self._cfg.labels}) and new labels ({new_labels}) match. Not changing anything"
)
else:
if new_labels is None or len(new_labels) == 0:
raise ValueError(f'New labels must be non-empty list of labels. But I got: {new_labels}')
self._cfg.labels = new_labels
decoder_config = self.decoder.to_config_dict()
new_decoder_config = copy.deepcopy(decoder_config)
self._update_decoder_config(new_decoder_config)
del self.decoder
self.decoder = EncDecClassificationModel.from_config_dict(new_decoder_config)
OmegaConf.set_struct(self._cfg.decoder, False)
self._cfg.decoder = new_decoder_config
OmegaConf.set_struct(self._cfg.decoder, True)
if 'train_ds' in self._cfg and self._cfg.train_ds is not None:
self._cfg.train_ds.labels = new_labels
if 'validation_ds' in self._cfg and self._cfg.validation_ds is not None:
self._cfg.validation_ds.labels = new_labels
if 'test_ds' in self._cfg and self._cfg.test_ds is not None:
self._cfg.test_ds.labels = new_labels
logging.info(f"Changed decoder output to {self.decoder.num_classes} labels.")
def _update_decoder_config(self, cfg):
OmegaConf.set_struct(cfg, False)
labels = self.cfg.labels
if 'params' in cfg:
cfg.params.num_classes = len(labels)
else:
cfg.num_classes = len(labels)
OmegaConf.set_struct(cfg, True)
class MatchboxNet(EncDecClassificationModel):
pass
| true | true |
f726f228726b7b2b3f9d488b6ba21009b47132f1 | 881 | py | Python | website/addons/s3/__init__.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | null | null | null | website/addons/s3/__init__.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | 13 | 2020-03-24T15:29:41.000Z | 2022-03-11T23:15:28.000Z | website/addons/s3/__init__.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | null | null | null | import os
from . import model
from . import routes
from . import views
MODELS = [model.AddonS3UserSettings, model.AddonS3NodeSettings]
USER_SETTINGS_MODEL = model.AddonS3UserSettings
NODE_SETTINGS_MODEL = model.AddonS3NodeSettings
ROUTES = [routes.settings_routes]
SHORT_NAME = 's3'
FULL_NAME = 'Amazon S3'
OWNERS = ['user', 'node']
ADDED_DEFAULT = []
ADDED_MANDATORY = []
VIEWS = []
CONFIGS = ['accounts', 'node']
CATEGORIES = ['storage']
INCLUDE_JS = {}
INCLUDE_CSS = {
'widget': [],
'page': [],
}
HAS_HGRID_FILES = True
GET_HGRID_DATA = views.hgrid.s3_hgrid_data
# 1024 ** 1024 # There really shouldnt be a limit...
MAX_FILE_SIZE = 128 # MB
HERE = os.path.dirname(os.path.abspath(__file__))
NODE_SETTINGS_TEMPLATE = os.path.join(HERE, 'templates', 's3_node_settings.mako')
USER_SETTINGS_TEMPLATE = os.path.join(HERE, 'templates', 's3_user_settings.mako')
| 20.97619 | 81 | 0.727582 | import os
from . import model
from . import routes
from . import views
MODELS = [model.AddonS3UserSettings, model.AddonS3NodeSettings]
USER_SETTINGS_MODEL = model.AddonS3UserSettings
NODE_SETTINGS_MODEL = model.AddonS3NodeSettings
ROUTES = [routes.settings_routes]
SHORT_NAME = 's3'
FULL_NAME = 'Amazon S3'
OWNERS = ['user', 'node']
ADDED_DEFAULT = []
ADDED_MANDATORY = []
VIEWS = []
CONFIGS = ['accounts', 'node']
CATEGORIES = ['storage']
INCLUDE_JS = {}
INCLUDE_CSS = {
'widget': [],
'page': [],
}
HAS_HGRID_FILES = True
GET_HGRID_DATA = views.hgrid.s3_hgrid_data
h.dirname(os.path.abspath(__file__))
NODE_SETTINGS_TEMPLATE = os.path.join(HERE, 'templates', 's3_node_settings.mako')
USER_SETTINGS_TEMPLATE = os.path.join(HERE, 'templates', 's3_user_settings.mako')
| true | true |
f726f26f0db530e1d6ac7228dc6da3573ce0200f | 237 | py | Python | CodingTestForEmployment/Part3/implementation/implementation1.py | lkc263/Algorithm_Study_Python | 5b9a74ecf7e864c861df2280a1bf4b393b0fcbca | [
"MIT"
] | null | null | null | CodingTestForEmployment/Part3/implementation/implementation1.py | lkc263/Algorithm_Study_Python | 5b9a74ecf7e864c861df2280a1bf4b393b0fcbca | [
"MIT"
] | null | null | null | CodingTestForEmployment/Part3/implementation/implementation1.py | lkc263/Algorithm_Study_Python | 5b9a74ecf7e864c861df2280a1bf4b393b0fcbca | [
"MIT"
] | null | null | null | n = input()
front_n = n[0:len(n)//2]
back_n = n[len(n)//2:len(n)]
front_n = map(int,front_n)
back_n = map(int,back_n)
result_f = sum(front_n)
result_b = sum(back_n)
if result_f == result_b:
print('LUCKY')
else:
print('READY') | 15.8 | 28 | 0.637131 | n = input()
front_n = n[0:len(n)//2]
back_n = n[len(n)//2:len(n)]
front_n = map(int,front_n)
back_n = map(int,back_n)
result_f = sum(front_n)
result_b = sum(back_n)
if result_f == result_b:
print('LUCKY')
else:
print('READY') | true | true |
f726f3e6b68297e13227e122ba85506dd2bb46e5 | 2,762 | py | Python | pyclustering/samples/__init__.py | JosephChataignon/pyclustering | bf4f51a472622292627ec8c294eb205585e50f52 | [
"BSD-3-Clause"
] | 1,013 | 2015-01-26T19:50:14.000Z | 2022-03-31T07:38:48.000Z | pyclustering/samples/__init__.py | peterlau0626/pyclustering | bf4f51a472622292627ec8c294eb205585e50f52 | [
"BSD-3-Clause"
] | 542 | 2015-01-20T16:44:32.000Z | 2022-01-29T14:57:20.000Z | pyclustering/samples/__init__.py | peterlau0626/pyclustering | bf4f51a472622292627ec8c294eb205585e50f52 | [
"BSD-3-Clause"
] | 262 | 2015-03-19T07:28:12.000Z | 2022-03-30T07:28:24.000Z | """!
@brief pyclustering module for samples.
@authors Andrei Novikov (pyclustering@yandex.ru)
@date 2014-2020
@copyright BSD-3-Clause
"""
class answer_reader:
"""!
@brief Answer reader for samples that are used by pyclustering library.
"""
def __init__(self, answer_path):
"""!
@brief Creates instance of answer reader to read proper clustering results of samples.
@param[in] answer_path (string): Path to clustering results (answers).
"""
self.__answer_path = answer_path
self.__clusters = None
self.__noise = None
def get_clusters(self):
"""!
@brief Read proper clustering results.
@return (list) Clusters where each cluster is represented by list of index point from dataset.
"""
self.__read_answer()
return self.__clusters
def get_noise(self):
"""!
@brief Read proper clustering results
@return (list) Noise where each outlier is represented by index point from dataset.
"""
self.__read_answer()
return self.__noise
def get_cluster_lengths(self):
"""!
@brief Read proper cluster lengths.
@details Cluster length means amount of point in a cluster.
@return (list) Cluster lengths where each length means amount of points in a cluster.
"""
clusters = self.get_clusters()
return [len(cluster) for cluster in clusters]
def __read_answer_from_line(self, index_point, line):
"""!
@brief Read information about point from the specific line and place it to cluster or noise in line with that
information.
@param[in] index_point (uint): Index point that should be placed to cluster or noise.
@param[in] line (string): Line where information about point should be read.
"""
if line[0] == 'n':
self.__noise.append(index_point)
else:
index_cluster = int(line)
if index_cluster >= len(self.__clusters):
self.__clusters.append([index_point])
else:
self.__clusters[index_cluster].append(index_point)
def __read_answer(self):
"""!
@brief Read information about proper clusters and noises from the file.
"""
if self.__clusters is not None:
return
file = open(self.__answer_path, 'r')
self.__clusters, self.__noise = [], []
index_point = 0
for line in file:
self.__read_answer_from_line(index_point, line)
index_point += 1
file.close()
| 26.815534 | 118 | 0.589428 |
class answer_reader:
def __init__(self, answer_path):
self.__answer_path = answer_path
self.__clusters = None
self.__noise = None
def get_clusters(self):
self.__read_answer()
return self.__clusters
def get_noise(self):
self.__read_answer()
return self.__noise
def get_cluster_lengths(self):
clusters = self.get_clusters()
return [len(cluster) for cluster in clusters]
def __read_answer_from_line(self, index_point, line):
if line[0] == 'n':
self.__noise.append(index_point)
else:
index_cluster = int(line)
if index_cluster >= len(self.__clusters):
self.__clusters.append([index_point])
else:
self.__clusters[index_cluster].append(index_point)
def __read_answer(self):
if self.__clusters is not None:
return
file = open(self.__answer_path, 'r')
self.__clusters, self.__noise = [], []
index_point = 0
for line in file:
self.__read_answer_from_line(index_point, line)
index_point += 1
file.close()
| true | true |
f726f53393a6475b58d999e2bc14d087f34c543e | 1,919 | py | Python | calendar_events/views.py | alexkyllo/django-calendar-events | f1ad2c2b858f93a1256604ff9f7b223914acf29e | [
"Apache-2.0"
] | 1 | 2016-09-09T04:16:10.000Z | 2016-09-09T04:16:10.000Z | calendar_events/views.py | alexkyllo/django-calendar-events | f1ad2c2b858f93a1256604ff9f7b223914acf29e | [
"Apache-2.0"
] | null | null | null | calendar_events/views.py | alexkyllo/django-calendar-events | f1ad2c2b858f93a1256604ff9f7b223914acf29e | [
"Apache-2.0"
] | 2 | 2018-04-19T19:29:46.000Z | 2018-09-21T00:18:22.000Z | from django.shortcuts import render, render_to_response
from django.http import Http404
from django.http import HttpResponse, HttpResponseRedirect
from django.template import RequestContext
from django.views.decorators.http import require_GET, require_POST, require_http_methods
from models import *
from forms import *
from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView
from dateutil import parser
import json
# Create your views here.
def show_calendar(request, *args, **kwargs):
return render_to_response('calendar_events/show_calendar.html', context_instance=RequestContext(request))
@require_GET
def view_all_events_between(request, **kwargs):
'''
This view is for the jquery-ui fullcalendar widget. Takes a GET request with a date range and returns all events inside the range
in the JSON format that fullcalendar is expecting.
'''
startdatetime = parser.parse(request.GET['start']+'T00:00:00.0+00:00')
enddatetime = parser.parse(request.GET['end']+'T00:00:00.0+00:00')
events = Event.objects.all()
event_occurrences = [event.get_occurrences(startdatetime,enddatetime) for event in events]
if event_occurrences is None:
return HttpResponse("[]")
else:
event_occurrences_flat = [item for sublist in event_occurrences for item in sublist] #flatten the list of lists of events
fullcalendar_events = [occurrence.to_fullcalendar() for occurrence in event_occurrences_flat]
return HttpResponse(json.dumps(fullcalendar_events))
class EventList(ListView):
model = Event
# def get_queryset(self):
# return Event.objects.all()
class EventCreate(CreateView):
model = Event
form_class = EventForm
class EventDelete(DeleteView):
model = Event
class EventUpdate(UpdateView):
model = Event
form_class = EventForm
class EventDetail(DetailView):
model = Event | 35.537037 | 133 | 0.756123 | from django.shortcuts import render, render_to_response
from django.http import Http404
from django.http import HttpResponse, HttpResponseRedirect
from django.template import RequestContext
from django.views.decorators.http import require_GET, require_POST, require_http_methods
from models import *
from forms import *
from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView
from dateutil import parser
import json
def show_calendar(request, *args, **kwargs):
return render_to_response('calendar_events/show_calendar.html', context_instance=RequestContext(request))
@require_GET
def view_all_events_between(request, **kwargs):
startdatetime = parser.parse(request.GET['start']+'T00:00:00.0+00:00')
enddatetime = parser.parse(request.GET['end']+'T00:00:00.0+00:00')
events = Event.objects.all()
event_occurrences = [event.get_occurrences(startdatetime,enddatetime) for event in events]
if event_occurrences is None:
return HttpResponse("[]")
else:
event_occurrences_flat = [item for sublist in event_occurrences for item in sublist]
fullcalendar_events = [occurrence.to_fullcalendar() for occurrence in event_occurrences_flat]
return HttpResponse(json.dumps(fullcalendar_events))
class EventList(ListView):
model = Event
class EventCreate(CreateView):
model = Event
form_class = EventForm
class EventDelete(DeleteView):
model = Event
class EventUpdate(UpdateView):
model = Event
form_class = EventForm
class EventDetail(DetailView):
model = Event | true | true |
f726f57c229488230500b5d7998e2d3d8ba1a490 | 176 | py | Python | regular-expressions-tutorial/verify_email.py | dapopov-st/python-youtube-code | 770c9291988898f259ad28bbab5989acee8fb830 | [
"MIT"
] | 262 | 2020-03-17T03:24:35.000Z | 2022-03-22T12:50:02.000Z | regular-expressions-tutorial/verify_email.py | dapopov-st/python-youtube-code | 770c9291988898f259ad28bbab5989acee8fb830 | [
"MIT"
] | 14 | 2020-07-12T14:17:36.000Z | 2022-03-21T09:38:45.000Z | regular-expressions-tutorial/verify_email.py | dapopov-st/python-youtube-code | 770c9291988898f259ad28bbab5989acee8fb830 | [
"MIT"
] | 583 | 2020-02-12T17:54:21.000Z | 2022-03-30T03:59:21.000Z | import re
pattern = "[a-zA-Z0-9]+@[a-zA-z]+\.(com|edu|net)"
user_input = input()
if(re.search(pattern, user_input)):
print("valid email")
else:
print("invalid email")
| 19.555556 | 49 | 0.636364 | import re
pattern = "[a-zA-Z0-9]+@[a-zA-z]+\.(com|edu|net)"
user_input = input()
if(re.search(pattern, user_input)):
print("valid email")
else:
print("invalid email")
| true | true |
f726f5c4e2f692389ad5a170f072d70c27e57734 | 3,838 | py | Python | reservation_rest_api.py | usc-isi-i2/wikidata-reservation | 1298ec2a7b347ed88bc93fa30531fa9b10c651a7 | [
"MIT"
] | null | null | null | reservation_rest_api.py | usc-isi-i2/wikidata-reservation | 1298ec2a7b347ed88bc93fa30531fa9b10c651a7 | [
"MIT"
] | null | null | null | reservation_rest_api.py | usc-isi-i2/wikidata-reservation | 1298ec2a7b347ed88bc93fa30531fa9b10c651a7 | [
"MIT"
] | null | null | null | from flask import Flask, request
from reservation_service import get_qnode, read_data, register, delete_namespace
import json
import logging
from tabulate import tabulate
app = Flask(__name__)
ALLOWED_EXTENSIONS = {'xls', 'yaml', 'csv', 'json'}
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
# logging.basicConfig(format=FORMAT, stream=sys.stdout, level=logging.DEBUG)
# set up logging to file - see previous section for more details
logging.basicConfig(level=logging.DEBUG,
format="%(asctime)s [%(levelname)s] %(name)s %(lineno)d -- %(message)s",
datefmt='%m-%d %H:%M:%S',
filename='reservation_rest_api.log',
filemode='w')
# define a Handler which writes INFO messages or higher to the sys.stderr
console = logging.StreamHandler()
console.setLevel(logging.DEBUG)
# # set a format which is simpler for console use
formatter = logging.Formatter("%(asctime)s [%(levelname)s] %(name)s %(lineno)d -- %(message)s", '%m-%d %H:%M:%S')
# # tell the handler to use this format
console.setFormatter(formatter)
# # add the handler to the root logger
logging.getLogger('').addHandler(console)
def allowed_file(filename):
return '.' in filename and filename.rsplit('.', 1)[1] in ALLOWED_EXTENSIONS
@app.route('/<namespace>', methods=['GET'])
def get_ns_list(namespace):
data = read_data()
if data:
table = []
headers = ['Satellite', 'Satellite URI', 'Latest qnode number', 'Prefix', 'num_of_0']
if namespace == 'all':
logger.debug('return all namespaces')
for k, v in data.items():
table.append([k, v['uri'], v['latest'], v['prefix'], v['num_of_0']])
else:
if namespace in data.keys():
logger.debug('return ' + namespace + ' namespace')
table.append([namespace, data[namespace]['uri'], data[namespace]['latest'],
data[namespace]['prefix'], data[namespace]['num_of_0']])
else:
raise Exception('Namespace does not exist in satellite.')
return tabulate(table, headers, tablefmt="psql")
return 'There is no satellite. Please register your satellite at first.'
@app.route('/<namespace>/reservation', methods=['GET', 'POST'])
def get_qnode_by_ns(namespace):
if namespace:
data = get_qnode(namespace)
if data:
logger.debug('reserve a qnode in ' + namespace + ' namespace')
return json.dumps({'Latest qnode': data}, indent=2)
else:
raise Exception('Please register your satellite at first.')
return 'Welcome to the reservation service.'
@app.route('/delete', methods=['GET', 'POST'])
def delete_ns():
namespace = request.values.get('namespace')
if namespace:
flag = delete_namespace(namespace)
if flag:
logger.debug('delete ' + namespace + ' namespace success.')
return 'Success'
else:
raise Exception('Namespace does not exist in satellite.')
return 'Welcome to the reservation service.'
@app.route('/register', methods=['GET', 'POST'])
def register_ns():
namespace = request.values.get('namespace')
uri = request.values.get('uri')
prefix = request.values.get('prefix')
num_of_0 = request.values.get('num_of_0')
if not num_of_0:
num_of_0 = 7
if namespace and uri and prefix:
flag = register(namespace, uri, prefix, num_of_0)
if flag:
logger.debug('register ' + namespace + ' namespace success.')
return 'Register successfully and you are ready to use this satellite. '
else:
raise Exception('This satellite already exists.')
return 'Welcome to the reservation service.'
if __name__ == '__main__':
app.run() | 36.552381 | 113 | 0.632882 | from flask import Flask, request
from reservation_service import get_qnode, read_data, register, delete_namespace
import json
import logging
from tabulate import tabulate
app = Flask(__name__)
ALLOWED_EXTENSIONS = {'xls', 'yaml', 'csv', 'json'}
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
logging.basicConfig(level=logging.DEBUG,
format="%(asctime)s [%(levelname)s] %(name)s %(lineno)d -- %(message)s",
datefmt='%m-%d %H:%M:%S',
filename='reservation_rest_api.log',
filemode='w')
console = logging.StreamHandler()
console.setLevel(logging.DEBUG)
levelname)s] %(name)s %(lineno)d -- %(message)s", '%m-%d %H:%M:%S')
e)
def allowed_file(filename):
return '.' in filename and filename.rsplit('.', 1)[1] in ALLOWED_EXTENSIONS
@app.route('/<namespace>', methods=['GET'])
def get_ns_list(namespace):
data = read_data()
if data:
table = []
headers = ['Satellite', 'Satellite URI', 'Latest qnode number', 'Prefix', 'num_of_0']
if namespace == 'all':
logger.debug('return all namespaces')
for k, v in data.items():
table.append([k, v['uri'], v['latest'], v['prefix'], v['num_of_0']])
else:
if namespace in data.keys():
logger.debug('return ' + namespace + ' namespace')
table.append([namespace, data[namespace]['uri'], data[namespace]['latest'],
data[namespace]['prefix'], data[namespace]['num_of_0']])
else:
raise Exception('Namespace does not exist in satellite.')
return tabulate(table, headers, tablefmt="psql")
return 'There is no satellite. Please register your satellite at first.'
@app.route('/<namespace>/reservation', methods=['GET', 'POST'])
def get_qnode_by_ns(namespace):
if namespace:
data = get_qnode(namespace)
if data:
logger.debug('reserve a qnode in ' + namespace + ' namespace')
return json.dumps({'Latest qnode': data}, indent=2)
else:
raise Exception('Please register your satellite at first.')
return 'Welcome to the reservation service.'
@app.route('/delete', methods=['GET', 'POST'])
def delete_ns():
namespace = request.values.get('namespace')
if namespace:
flag = delete_namespace(namespace)
if flag:
logger.debug('delete ' + namespace + ' namespace success.')
return 'Success'
else:
raise Exception('Namespace does not exist in satellite.')
return 'Welcome to the reservation service.'
@app.route('/register', methods=['GET', 'POST'])
def register_ns():
namespace = request.values.get('namespace')
uri = request.values.get('uri')
prefix = request.values.get('prefix')
num_of_0 = request.values.get('num_of_0')
if not num_of_0:
num_of_0 = 7
if namespace and uri and prefix:
flag = register(namespace, uri, prefix, num_of_0)
if flag:
logger.debug('register ' + namespace + ' namespace success.')
return 'Register successfully and you are ready to use this satellite. '
else:
raise Exception('This satellite already exists.')
return 'Welcome to the reservation service.'
if __name__ == '__main__':
app.run() | true | true |
f726f5c80de9e071ad05e77e26f7512ec0cee0dd | 5,269 | py | Python | models.py | gautamMalu/Aesthetic_attributes_maps | f2462c92d414f9457a3babd32171b071e4703515 | [
"MIT"
] | 22 | 2017-07-14T02:53:27.000Z | 2021-03-19T20:13:12.000Z | models.py | gautamMalu/Aesthetic_attributes_maps | f2462c92d414f9457a3babd32171b071e4703515 | [
"MIT"
] | 3 | 2017-07-25T03:01:23.000Z | 2018-06-27T14:03:43.000Z | models.py | gautamMalu/Aesthetic_attributes_maps | f2462c92d414f9457a3babd32171b071e4703515 | [
"MIT"
] | 11 | 2017-07-14T08:23:33.000Z | 2021-11-24T09:18:48.000Z | from keras.applications.resnet50 import ResNet50
from keras.applications.vgg16 import VGG16
from keras.layers import Flatten, Dropout, Lambda, GlobalAveragePooling2D, merge, Input, Dense
from keras.models import Model
import keras.backend as K
#from keras.utils.visualize_util import plot
#from SpatialPyramidPooling import SpatialPyramidPooling
def l2_normalize(x):
return K.l2_normalize(x, 0)
def l2_normalize_output_shape(input_shape):
return input_shape
def squared_root_normalization(x):
"""
Squared root normalization for convolution layers` output
first apply global average pooling followed by squared root on all elements
then l2 normalize the vector
:param x: input tensor, output of convolution layer
:return:
"""
x = GlobalAveragePooling2D()(x)
#output shape = (None, nc)
# x = K.sqrt(x)
#x = K.l2_normalize(x, axis=0)
return x
def squared_root_normalization_output_shape(input_shape):
"""
Return the output shape for squared root normalization layer
for any given input size of the convolution filter
:param input_shape: shape of the input
:return: output shape
"""
return (input_shape[0], input_shape[-1])
def model1(weights_path=None):
'''
Basic ResNet-FT for baseline comparisions.
Creates a model by for all aesthetic attributes along
with overall aesthetic score, by finetuning resnet50
:param weights_path: path of the weight file
:return: Keras model instance
'''
_input = Input(shape=(299, 299, 3))
resnet = ResNet50(include_top=False, weights='imagenet', input_tensor=_input)
last_layer_output = GlobalAveragePooling2D()(resnet.get_layer('activation_49').output)
# output of model
outputs = []
attrs = ['BalacingElements', 'ColorHarmony', 'Content', 'DoF',
'Light', 'MotionBlur', 'Object', 'RuleOfThirds', 'VividColor']
for attribute in attrs:
outputs.append(Dense(1, init='glorot_uniform', activation='tanh', name=attribute)(last_layer_output))
non_negative_attrs = ['Repetition', 'Symmetry', 'score']
for attribute in non_negative_attrs:
outputs.append(Dense(1, init='glorot_uniform', activation='sigmoid', name=attribute)(last_layer_output))
model = Model(input=_input, output=outputs)
if weights_path:
model.load_weights(weights_path)
return model
def model2(weights_path=None):
'''
Creates a model by concatenating the features from lower layers
with high level convolution features for all aesthetic attributes along
with overall aesthetic score
:param weights_path: path of the weight file
:return: Keras model instance
This is the model used in the paper
'''
_input = Input(shape=(299, 299, 3))
resnet = ResNet50(include_top=False, weights='imagenet', input_tensor=_input)
activation_layers = []
layers = resnet.layers
for layer in layers:
# print layer.name, layer.input_shape, layer.output_shape
if 'activation' in layer.name:
activation_layers.append(layer)
activations = 0
activation_plus_squared_outputs = []
# Remove last activation layer so
# it can be used with spatial pooling layer if required
nlayers = len(activation_layers) - 1
for i in range(1, nlayers):
layer = activation_layers[i]
if layer.output_shape[-1] > activation_layers[i - 1].output_shape[-1]:
# print layer.name, layer.input_shape, layer.output_shape
activations += layer.output_shape[-1]
_out = Lambda(squared_root_normalization,
output_shape=squared_root_normalization_output_shape, name=layer.name + '_normalized')(layer.output)
activation_plus_squared_outputs.append(_out)
# print "sum of all activations should be {}".format(activations)
last_layer_output = GlobalAveragePooling2D()(activation_layers[-1].output)
# last_layer_output = Lambda(K.sqrt, output_shape=squared_root_normalization_output_shape)(last_layer_output)
last_layer_output = Lambda(l2_normalize, output_shape=l2_normalize_output_shape,
name=activation_layers[-1].name+'_normalized')(last_layer_output)
activation_plus_squared_outputs.append(last_layer_output)
merged = merge(activation_plus_squared_outputs, mode='concat', concat_axis=1)
merged = Lambda(l2_normalize, output_shape=l2_normalize_output_shape, name='merge')(merged)
# output of model
outputs = []
attrs = ['BalacingElements', 'ColorHarmony', 'Content', 'DoF',
'Light', 'MotionBlur', 'Object', 'RuleOfThirds', 'VividColor']
for attribute in attrs:
outputs.append(Dense(1, init='glorot_uniform', activation='tanh', name=attribute)(merged))
non_negative_attrs = ['Repetition', 'Symmetry', 'score']
for attribute in non_negative_attrs:
outputs.append(Dense(1, init='glorot_uniform', activation='sigmoid', name=attribute)(merged))
model = Model(input=_input, output=outputs)
if weights_path:
model.load_weights(weights_path)
return model
if __name__ == '__main__':
model = model2()
model.summary()
# plot(model, to_file='model2.png', show_shapes=True)
| 37.368794 | 126 | 0.707155 | from keras.applications.resnet50 import ResNet50
from keras.applications.vgg16 import VGG16
from keras.layers import Flatten, Dropout, Lambda, GlobalAveragePooling2D, merge, Input, Dense
from keras.models import Model
import keras.backend as K
def l2_normalize(x):
return K.l2_normalize(x, 0)
def l2_normalize_output_shape(input_shape):
return input_shape
def squared_root_normalization(x):
x = GlobalAveragePooling2D()(x)
return x
def squared_root_normalization_output_shape(input_shape):
return (input_shape[0], input_shape[-1])
def model1(weights_path=None):
_input = Input(shape=(299, 299, 3))
resnet = ResNet50(include_top=False, weights='imagenet', input_tensor=_input)
last_layer_output = GlobalAveragePooling2D()(resnet.get_layer('activation_49').output)
outputs = []
attrs = ['BalacingElements', 'ColorHarmony', 'Content', 'DoF',
'Light', 'MotionBlur', 'Object', 'RuleOfThirds', 'VividColor']
for attribute in attrs:
outputs.append(Dense(1, init='glorot_uniform', activation='tanh', name=attribute)(last_layer_output))
non_negative_attrs = ['Repetition', 'Symmetry', 'score']
for attribute in non_negative_attrs:
outputs.append(Dense(1, init='glorot_uniform', activation='sigmoid', name=attribute)(last_layer_output))
model = Model(input=_input, output=outputs)
if weights_path:
model.load_weights(weights_path)
return model
def model2(weights_path=None):
_input = Input(shape=(299, 299, 3))
resnet = ResNet50(include_top=False, weights='imagenet', input_tensor=_input)
activation_layers = []
layers = resnet.layers
for layer in layers:
if 'activation' in layer.name:
activation_layers.append(layer)
activations = 0
activation_plus_squared_outputs = []
nlayers = len(activation_layers) - 1
for i in range(1, nlayers):
layer = activation_layers[i]
if layer.output_shape[-1] > activation_layers[i - 1].output_shape[-1]:
activations += layer.output_shape[-1]
_out = Lambda(squared_root_normalization,
output_shape=squared_root_normalization_output_shape, name=layer.name + '_normalized')(layer.output)
activation_plus_squared_outputs.append(_out)
last_layer_output = GlobalAveragePooling2D()(activation_layers[-1].output)
last_layer_output = Lambda(l2_normalize, output_shape=l2_normalize_output_shape,
name=activation_layers[-1].name+'_normalized')(last_layer_output)
activation_plus_squared_outputs.append(last_layer_output)
merged = merge(activation_plus_squared_outputs, mode='concat', concat_axis=1)
merged = Lambda(l2_normalize, output_shape=l2_normalize_output_shape, name='merge')(merged)
outputs = []
attrs = ['BalacingElements', 'ColorHarmony', 'Content', 'DoF',
'Light', 'MotionBlur', 'Object', 'RuleOfThirds', 'VividColor']
for attribute in attrs:
outputs.append(Dense(1, init='glorot_uniform', activation='tanh', name=attribute)(merged))
non_negative_attrs = ['Repetition', 'Symmetry', 'score']
for attribute in non_negative_attrs:
outputs.append(Dense(1, init='glorot_uniform', activation='sigmoid', name=attribute)(merged))
model = Model(input=_input, output=outputs)
if weights_path:
model.load_weights(weights_path)
return model
if __name__ == '__main__':
model = model2()
model.summary()
| true | true |
f726f884a93cc0f5b265ff93d535edd969498ccd | 518 | py | Python | Models/initialize.py | jeffrey-clark/gender_in_academia | 25f76abfccb06ee7d6a630ee1d4cecdbf6dbe21d | [
"MIT"
] | null | null | null | Models/initialize.py | jeffrey-clark/gender_in_academia | 25f76abfccb06ee7d6a630ee1d4cecdbf6dbe21d | [
"MIT"
] | null | null | null | Models/initialize.py | jeffrey-clark/gender_in_academia | 25f76abfccb06ee7d6a630ee1d4cecdbf6dbe21d | [
"MIT"
] | null | null | null | # import dependencies
import os, re, io, sys
import pandas as pd
#import mysql.connector
import json
import numpy as np
# import function collections
from Functions.j_functions import *
from Functions.language import *
from Functions.functions import *
# set universal variables
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
pref_order = ['app_id', 'name', 'surname', 'financier', 'keywords', 'keyword_lang']
nonelist = ['None', 'NA', 'N/A', '-', '', ' ', '--', "null", "N.A.", ]
| 24.666667 | 83 | 0.69305 |
import os, re, io, sys
import pandas as pd
import json
import numpy as np
from Functions.j_functions import *
from Functions.language import *
from Functions.functions import *
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
pref_order = ['app_id', 'name', 'surname', 'financier', 'keywords', 'keyword_lang']
nonelist = ['None', 'NA', 'N/A', '-', '', ' ', '--', "null", "N.A.", ]
| true | true |
f726f911716ec981e91b4ea974dc3e14779424c2 | 29,285 | py | Python | zdd.py | sonecabr/marathon-lb-rsyslog | 1e4f6a738b7b7afaa0b2a70c67963b95f8ee54c8 | [
"Apache-2.0"
] | null | null | null | zdd.py | sonecabr/marathon-lb-rsyslog | 1e4f6a738b7b7afaa0b2a70c67963b95f8ee54c8 | [
"Apache-2.0"
] | null | null | null | zdd.py | sonecabr/marathon-lb-rsyslog | 1e4f6a738b7b7afaa0b2a70c67963b95f8ee54c8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import argparse
import csv
import json
import logging
import math
import socket
import subprocess
import sys
import time
import traceback
from datetime import datetime
from collections import namedtuple
import requests
import six.moves.urllib as urllib
from common import (get_marathon_auth_params, set_logging_args,
set_marathon_auth_args, setup_logging)
from utils import get_task_ip_and_ports
from zdd_exceptions import (
AppCreateException, AppDeleteException, AppScaleException,
InvalidArgException, MarathonEndpointException,
MarathonLbEndpointException, MissingFieldException)
logger = logging.getLogger('zdd')
def query_yes_no(question, default="yes"):
# Thanks stackoverflow:
# https://stackoverflow.com/questions/3041986/python-command-line-yes-no-input
"""Ask a yes/no question via input() and return their answer.
"question" is a string that is presented to the user.
"default" is the presumed answer if the user just hits <Enter>.
It must be "yes" (the default), "no" or None (meaning
an answer is required of the user).
The "answer" return value is True for "yes" or False for "no".
"""
valid = {"yes": True, "y": True, "ye": True,
"no": False, "n": False}
if default is None:
prompt = " [y/n] "
elif default == "yes":
prompt = " [Y/n] "
elif default == "no":
prompt = " [y/N] "
else:
raise ValueError("invalid default answer: '%s'" % default)
while True:
sys.stdout.write(question + prompt)
choice = input().lower()
if default is not None and choice == '':
return valid[default]
elif choice in valid:
return valid[choice]
else:
sys.stdout.write("Please respond with 'yes' or 'no' "
"(or 'y' or 'n').\n")
def marathon_get_request(args, path):
url = args.marathon + path
try:
response = requests.get(url, auth=get_marathon_auth_params(args))
response.raise_for_status()
except requests.exceptions.RequestException:
raise MarathonEndpointException(
"Error while querying marathon", url, traceback.format_exc())
return response
def list_marathon_apps(args):
response = marathon_get_request(args, "/v2/apps")
return response.json()['apps']
def fetch_marathon_app(args, app_id):
response = marathon_get_request(args, "/v2/apps" + app_id)
return response.json()['app']
def _get_alias_records(hostname):
"""Return all IPv4 A records for a given hostname
"""
return socket.gethostbyname_ex(hostname)[2]
def _unparse_url_alias(url, addr):
"""Reassemble a url object into a string but with a new address
"""
return urllib.parse.urlunparse((url[0],
addr + ":" + str(url.port),
url[2],
url[3],
url[4],
url[5]))
def get_marathon_lb_urls(args):
"""Return a list of urls for all Aliases of the
marathon_lb url passed in as an argument
"""
url = urllib.parse.urlparse(args.marathon_lb)
addrs = _get_alias_records(url.hostname)
return [_unparse_url_alias(url, addr) for addr in addrs]
def fetch_haproxy_pids(haproxy_url):
try:
response = requests.get(haproxy_url + "/_haproxy_getpids")
response.raise_for_status()
except requests.exceptions.RequestException:
logger.exception("Caught exception when retrieving HAProxy"
" pids from " + haproxy_url)
raise
return response.text.split()
def check_haproxy_reloading(haproxy_url):
"""Return False if haproxy has only one pid, it is not reloading.
Return True if we catch an exception while making a request to
haproxy or if more than one pid is returned
"""
try:
pids = fetch_haproxy_pids(haproxy_url)
except requests.exceptions.RequestException:
# Assume reloading on any error, this should be caught with a timeout
return True
if len(pids) > 1:
logger.info("Waiting for {} pids on {}".format(len(pids), haproxy_url))
return True
return False
def any_marathon_lb_reloading(marathon_lb_urls):
return any([check_haproxy_reloading(url) for url in marathon_lb_urls])
def fetch_haproxy_stats(haproxy_url):
try:
response = requests.get(haproxy_url + "/haproxy?stats;csv")
response.raise_for_status()
except requests.exceptions.RequestException:
logger.exception("Caught exception when retrieving HAProxy"
" stats from " + haproxy_url)
raise
return response.text
def fetch_combined_haproxy_stats(marathon_lb_urls):
raw = ''.join([fetch_haproxy_stats(url) for url in marathon_lb_urls])
return parse_haproxy_stats(raw)
def parse_haproxy_stats(csv_data):
rows = csv_data.splitlines()
headings = rows.pop(0).lstrip('# ').rstrip(',\n').split(',')
csv_reader = csv.reader(rows, delimiter=',', quotechar="'")
Row = namedtuple('Row', headings)
return [Row(*row[0:-1]) for row in csv_reader if row[0][0] != '#']
def get_deployment_label(app):
return get_deployment_group(app) + "_" + app['labels']['HAPROXY_0_PORT']
def _if_app_listener(app, listener):
return (listener.pxname == get_deployment_label(app) and
listener.svname not in ['BACKEND', 'FRONTEND'])
def fetch_app_listeners(app, marathon_lb_urls):
haproxy_stats = fetch_combined_haproxy_stats(marathon_lb_urls)
return [l for l in haproxy_stats if _if_app_listener(app, l)]
def waiting_for_listeners(new_app, old_app, listeners, haproxy_count):
listener_count = (len(listeners) / haproxy_count)
return listener_count != new_app['instances'] + old_app['instances']
def get_deployment_target(app):
if 'HAPROXY_DEPLOYMENT_TARGET_INSTANCES' in app['labels']:
return int(app['labels']['HAPROXY_DEPLOYMENT_TARGET_INSTANCES'])
else:
return app['instances']
def get_new_instance_count(app):
if 'HAPROXY_DEPLOYMENT_NEW_INSTANCES' in app['labels']:
return int(app['labels']['HAPROXY_DEPLOYMENT_NEW_INSTANCES'])
else:
return 0
def waiting_for_up_listeners(app, listeners, haproxy_count):
up_listeners = [l for l in listeners if l.status == 'UP']
up_listener_count = (len(up_listeners) / haproxy_count)
return up_listener_count < get_deployment_target(app)
def select_draining_listeners(listeners):
return [l for l in listeners if l.status == 'MAINT']
def select_drained_listeners(listeners):
draining_listeners = select_draining_listeners(listeners)
return [l for l in draining_listeners if not _has_pending_requests(l)]
def get_svnames_from_task(app, task):
prefix = task['host'].replace('.', '_')
task_ip, task_port = get_task_ip_and_ports(app, task)
if task['host'] == task_ip:
for port in task['ports']:
yield('{}_{}'.format(prefix, port))
else:
for port in task['ports']:
yield('{}_{}_{}'.format(prefix, task_ip.replace('.', '_'), port))
def get_svnames_from_tasks(app, tasks):
svnames = []
for task in tasks:
svnames += get_svnames_from_task(app, task)
return svnames
def _has_pending_requests(listener):
return int(listener.qcur or 0) > 0 or int(listener.scur or 0) > 0
def is_hybrid_deployment(args, app):
if (get_new_instance_count(app) != 0 and not args.complete_cur and
not args.complete_prev):
return True
else:
return False
def find_drained_task_ids(app, listeners, haproxy_count):
"""Return app tasks which have all haproxy listeners down and draining
of any pending sessions or connections
"""
tasks = zip(get_svnames_from_tasks(app, app['tasks']), app['tasks'])
drained_listeners = select_drained_listeners(listeners)
drained_task_ids = []
for svname, task in tasks:
task_listeners = [l for l in drained_listeners if l.svname == svname]
if len(task_listeners) == haproxy_count:
drained_task_ids.append(task['id'])
return drained_task_ids
def find_draining_task_ids(app, listeners, haproxy_count):
"""Return app tasks which have all haproxy listeners draining
"""
tasks = zip(get_svnames_from_tasks(app, app['tasks']), app['tasks'])
draining_listeners = select_draining_listeners(listeners)
draining_task_ids = []
for svname, task in tasks:
task_listeners = [l for l in draining_listeners if l.svname == svname]
if len(task_listeners) == haproxy_count:
draining_task_ids.append(task['id'])
return draining_task_ids
def max_wait_not_exceeded(max_wait, timestamp):
return time.time() - timestamp < max_wait
def find_tasks_to_kill(args, new_app, old_app, timestamp):
marathon_lb_urls = get_marathon_lb_urls(args)
haproxy_count = len(marathon_lb_urls)
try:
listeners = fetch_app_listeners(new_app, marathon_lb_urls)
except requests.exceptions.RequestException:
raise MarathonLbEndpointException(
"Error while querying Marathon-LB",
marathon_lb_urls,
traceback.format_exc())
while max_wait_not_exceeded(args.max_wait, timestamp):
time.sleep(args.step_delay)
logger.info("Existing app running {} instances, "
"new app running {} instances"
.format(old_app['instances'], new_app['instances']))
if any_marathon_lb_reloading(marathon_lb_urls):
continue
try:
listeners = fetch_app_listeners(new_app, marathon_lb_urls)
except requests.exceptions.RequestException:
# Restart loop if we hit an exception while loading listeners,
# this may be normal behaviour
continue
logger.info("Found {} app listeners across {} HAProxy instances"
.format(len(listeners), haproxy_count))
if waiting_for_listeners(new_app, old_app, listeners, haproxy_count):
continue
if waiting_for_up_listeners(new_app, listeners, haproxy_count):
continue
if waiting_for_drained_listeners(listeners):
continue
return find_drained_task_ids(old_app, listeners, haproxy_count)
logger.info('Timed out waiting for tasks to fully drain, find any draining'
' tasks and continue with deployment...')
return find_draining_task_ids(old_app, listeners, haproxy_count)
def deployment_in_progress(app):
return len(app['deployments']) > 0
def execute_pre_kill_hook(args, old_app, tasks_to_kill, new_app):
if args.pre_kill_hook is not None:
logger.info("Calling pre-kill hook '{}'".format(args.pre_kill_hook))
subprocess.check_call([args.pre_kill_hook,
json.dumps(old_app),
json.dumps(tasks_to_kill),
json.dumps(new_app)])
def swap_zdd_apps(args, new_app, old_app):
func_args = (args, new_app, old_app)
while True:
res = _swap_zdd_apps(func_args[0], func_args[1], func_args[2])
if isinstance(res, bool):
return res
func_args = res
def _swap_zdd_apps(args, new_app, old_app):
old_app = fetch_marathon_app(args, old_app['id'])
new_app = fetch_marathon_app(args, new_app['id'])
if deployment_in_progress(new_app):
time.sleep(args.step_delay)
return args, new_app, old_app
tasks_to_kill = find_tasks_to_kill(args, new_app, old_app, time.time())
if ready_to_delete_old_app(args, new_app, old_app, tasks_to_kill):
return safe_delete_app(args, old_app, new_app)
if len(tasks_to_kill) > 0:
execute_pre_kill_hook(args, old_app, tasks_to_kill, new_app)
logger.info("There are {} draining listeners, "
"about to kill the following tasks:\n - {}"
.format(len(tasks_to_kill),
"\n - ".join(tasks_to_kill)))
if args.force or query_yes_no("Continue?"):
logger.info("Scaling down old app by {} instances"
.format(len(tasks_to_kill)))
kill_marathon_tasks(args, tasks_to_kill)
else:
return False
if is_hybrid_deployment(args, new_app):
if new_app['instances'] < get_new_instance_count(new_app):
scale_new_app_instances(args, new_app, old_app)
else:
if new_app['instances'] < get_deployment_target(new_app):
scale_new_app_instances(args, new_app, old_app)
return (args, new_app, old_app)
def ready_to_delete_old_app(args, new_app, old_app, draining_task_ids):
new_instances = get_new_instance_count(new_app)
if is_hybrid_deployment(args, new_app):
return (int(new_app['instances']) == new_instances and
int(old_app['instances']) == (
get_deployment_target(old_app) - new_instances))
else:
return (int(new_app['instances']) == get_deployment_target(new_app) and
len(draining_task_ids) == int(old_app['instances']))
def waiting_for_drained_listeners(listeners):
return len(select_drained_listeners(listeners)) < 1
def scale_new_app_instances(args, new_app, old_app):
"""Scale the app by 50% of its existing instances until we
meet or surpass instances deployed for old_app.
At which point go right to the new_app deployment target
"""
instances = (math.floor(new_app['instances'] +
(new_app['instances'] + 1) / 2))
if is_hybrid_deployment(args, new_app):
if instances > get_new_instance_count(new_app):
instances = get_new_instance_count(new_app)
else:
if instances >= old_app['instances']:
instances = get_deployment_target(new_app)
logger.info("Scaling new app up to {} instances".format(instances))
return scale_marathon_app_instances(args, new_app, instances)
def safe_delete_app(args, app, new_app):
if is_hybrid_deployment(args, new_app):
logger.info("Not deleting old app, as its hybrid configuration")
return True
else:
logger.info("About to delete old app {}".format(app['id']))
if args.force or query_yes_no("Continue?"):
delete_marathon_app(args, app)
return True
else:
return False
def delete_marathon_app(args, app):
url = args.marathon + '/v2/apps' + app['id']
try:
response = requests.delete(url,
auth=get_marathon_auth_params(args))
response.raise_for_status()
except requests.exceptions.RequestException:
raise AppDeleteException(
"Error while deleting the app", url, traceback.format_exc())
return response
def kill_marathon_tasks(args, ids):
data = json.dumps({'ids': ids})
url = args.marathon + "/v2/tasks/delete?scale=true"
headers = {'Content-Type': 'application/json'}
try:
response = requests.post(url, headers=headers, data=data,
auth=get_marathon_auth_params(args))
response.raise_for_status()
except requests.exceptions.RequestException:
# This is App Scale Down, so raising AppScale Exception
raise AppScaleException(
"Error while scaling the app", url, data, traceback.format_exc())
return response
def scale_marathon_app_instances(args, app, instances):
url = args.marathon + "/v2/apps" + app['id']
data = json.dumps({'instances': instances})
headers = {'Content-Type': 'application/json'}
try:
response = requests.put(url, headers=headers, data=data,
auth=get_marathon_auth_params(args))
response.raise_for_status()
except requests.exceptions.RequestException:
# This is App Scale Up, so raising AppScale Exception
raise AppScaleException(
"Error while scaling the app", url, data, traceback.format_exc())
return response
def deploy_marathon_app(args, app):
url = args.marathon + "/v2/apps"
data = json.dumps(app)
headers = {'Content-Type': 'application/json'}
try:
response = requests.post(url, headers=headers, data=data,
auth=get_marathon_auth_params(args))
response.raise_for_status()
except requests.exceptions.RequestException:
raise AppCreateException(
"Error while creating the app", url, data, traceback.format_exc())
return response
def get_service_port(app):
try:
return \
int(app['container']['docker']['portMappings'][0]['servicePort'])
except KeyError:
try:
return \
int(app['portDefinitions'][0]['port'])
except KeyError:
return int(app['ports'][0])
def set_service_port(app, servicePort):
try:
app['container']['docker']['portMappings'][0]['servicePort'] = \
int(servicePort)
except KeyError:
app['ports'][0] = int(servicePort)
return app
def validate_app(app):
if app['id'] is None:
raise MissingFieldException("App doesn't contain a valid App ID",
'id')
if 'labels' not in app:
raise MissingFieldException("No labels found. Please define the"
" HAPROXY_DEPLOYMENT_GROUP label",
'label')
if 'HAPROXY_DEPLOYMENT_GROUP' not in app['labels']:
raise MissingFieldException("Please define the "
"HAPROXY_DEPLOYMENT_GROUP label",
'HAPROXY_DEPLOYMENT_GROUP')
if 'HAPROXY_DEPLOYMENT_ALT_PORT' not in app['labels']:
raise MissingFieldException("Please define the "
"HAPROXY_DEPLOYMENT_ALT_PORT label",
'HAPROXY_DEPLOYMENT_ALT_PORT')
def set_app_ids(app, colour):
app['labels']['HAPROXY_APP_ID'] = app['id']
app['id'] = app['id'] + '-' + colour
if app['id'][0] != '/':
app['id'] = '/' + app['id']
return app
def set_service_ports(app, servicePort):
app['labels']['HAPROXY_0_PORT'] = str(get_service_port(app))
try:
app['container']['docker']['portMappings'][0]['servicePort'] = \
int(servicePort)
return app
except KeyError:
app['ports'][0] = int(servicePort)
return app
def select_next_port(app):
alt_port = int(app['labels']['HAPROXY_DEPLOYMENT_ALT_PORT'])
if int(app['ports'][0]) == alt_port:
return int(app['labels']['HAPROXY_0_PORT'])
else:
return alt_port
def select_next_colour(app):
if app['labels'].get('HAPROXY_DEPLOYMENT_COLOUR') == 'blue':
return 'green'
else:
return 'blue'
def sort_deploys(apps):
return sorted(apps, key=lambda a: a.get('labels', {})
.get('HAPROXY_DEPLOYMENT_STARTED_AT', '0'))
def select_last_deploy(apps):
return sort_deploys(apps).pop()
def select_last_two_deploys(apps):
return sort_deploys(apps)[:-3:-1]
def get_deployment_group(app):
return app.get('labels', {}).get('HAPROXY_DEPLOYMENT_GROUP')
def fetch_previous_deploys(args, app):
apps = list_marathon_apps(args)
app_deployment_group = get_deployment_group(app)
return [a for a in apps if get_deployment_group(a) == app_deployment_group]
def prepare_deploy(args, previous_deploys, app):
""" Return a blue or a green version of `app` based on preexisting deploys
"""
if len(previous_deploys) > 0:
last_deploy = select_last_deploy(previous_deploys)
next_colour = select_next_colour(last_deploy)
next_port = select_next_port(last_deploy)
deployment_target_instances = last_deploy['instances']
if args.new_instances > deployment_target_instances:
args.new_instances = deployment_target_instances
if args.new_instances and args.new_instances > 0:
if args.initial_instances > args.new_instances:
app['instances'] = args.new_instances
else:
app['instances'] = args.initial_instances
else:
if args.initial_instances > deployment_target_instances:
app['instances'] = deployment_target_instances
else:
app['instances'] = args.initial_instances
app['labels']['HAPROXY_DEPLOYMENT_NEW_INSTANCES'] = str(
args.new_instances)
else:
next_colour = 'blue'
next_port = get_service_port(app)
deployment_target_instances = app['instances']
app['labels']['HAPROXY_DEPLOYMENT_NEW_INSTANCES'] = "0"
app = set_app_ids(app, next_colour)
app = set_service_ports(app, next_port)
app['labels']['HAPROXY_DEPLOYMENT_TARGET_INSTANCES'] = \
str(deployment_target_instances)
app['labels']['HAPROXY_DEPLOYMENT_COLOUR'] = next_colour
app['labels']['HAPROXY_DEPLOYMENT_STARTED_AT'] = datetime.now().isoformat()
return app
def load_app_json(args):
with open(args.json) as content_file:
return json.load(content_file)
def safe_resume_deploy(args, previous_deploys):
if args.complete_cur:
logger.info("Converting all instances to current config")
new_app, old_app = select_last_two_deploys(previous_deploys)
logger.info("Current config color is %s" % new_app[
'labels']['HAPROXY_DEPLOYMENT_COLOUR'])
logger.info("Considering %s color as existing app"
% old_app['labels']['HAPROXY_DEPLOYMENT_COLOUR'] +
" and %s color as new app"
% new_app['labels']['HAPROXY_DEPLOYMENT_COLOUR'])
return swap_zdd_apps(args, new_app, old_app)
elif args.complete_prev:
logger.info("Converting all instances to previous config")
old_app, new_app = select_last_two_deploys(previous_deploys)
logger.info("Previous config color is %s" % new_app[
'labels']['HAPROXY_DEPLOYMENT_COLOUR'])
logger.info("Considering %s color as existing app"
% old_app['labels']['HAPROXY_DEPLOYMENT_COLOUR'] +
" and %s color as new app"
% new_app['labels']['HAPROXY_DEPLOYMENT_COLOUR'])
return swap_zdd_apps(args, new_app, old_app)
elif args.resume:
logger.info("Found previous deployment, resuming")
new_app, old_app = select_last_two_deploys(previous_deploys)
return swap_zdd_apps(args, new_app, old_app)
else:
raise Exception("There appears to be an"
" existing deployment in progress")
def do_zdd(args, out=sys.stdout):
app = load_app_json(args)
validate_app(app)
previous_deploys = fetch_previous_deploys(args, app)
if len(previous_deploys) > 1:
# There is a stuck deploy or hybrid deploy
return safe_resume_deploy(args, previous_deploys)
if args.complete_cur or args.complete_prev:
raise InvalidArgException("Cannot use --complete-cur, --complete-prev"
" flags when config is not hybrid")
new_app = prepare_deploy(args, previous_deploys, app)
logger.info('Final app definition:')
out.write(json.dumps(new_app, sort_keys=True, indent=2))
out.write("\n")
if args.dry_run:
return True
if args.force or query_yes_no("Continue with deployment?"):
deploy_marathon_app(args, new_app)
if len(previous_deploys) == 0:
# This was the first deploy, nothing to swap
return True
else:
# This is a standard blue/green deploy, swap new app with old
old_app = select_last_deploy(previous_deploys)
return swap_zdd_apps(args, new_app, old_app)
def get_arg_parser():
parser = argparse.ArgumentParser(
description="Zero-downtime deployment orchestrator for marathon-lb",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--longhelp",
help="Print out configuration details",
action="store_true"
)
parser.add_argument("--marathon", "-m",
help="[required] Marathon endpoint, eg. -m " +
"http://marathon1:8080"
)
parser.add_argument("--marathon-lb", "-l",
help="[required] Marathon-lb stats endpoint, eg. -l " +
"http://marathon-lb.marathon.mesos:9090"
)
parser.add_argument("--json", "-j",
help="[required] App JSON"
)
parser.add_argument("--dry-run", "-d",
help="Perform a dry run",
action="store_true"
)
parser.add_argument("--force", "-f",
help="Perform deployment un-prompted",
action="store_true"
)
parser.add_argument("--step-delay", "-s",
help="Delay (in seconds) between each successive"
" deployment step",
type=int, default=5
)
parser.add_argument("--initial-instances", "-i",
help="Initial number of app instances to launch."
" If this number is greater than total number of"
" existing instances, then this will be overridden"
" by the latter number",
type=int, default=1
)
parser.add_argument("--resume", "-r",
help="Resume from a previous deployment",
action="store_true"
)
parser.add_argument("--max-wait", "-w",
help="Maximum amount of time (in seconds) to wait"
" for HAProxy to drain connections",
type=int, default=300
)
parser.add_argument("--new-instances", "-n",
help="Number of new instances to replace the existing"
" instances. This is for having instances of both blue"
" and green at the same time",
type=int, default=0)
parser.add_argument("--complete-cur", "-c",
help="Change hybrid app entirely to"
" current (new) app's instances", action="store_true")
parser.add_argument("--complete-prev", "-p",
help="Change hybrid app entirely to"
" previous (old) app's instances", action="store_true")
parser.add_argument("--pre-kill-hook",
help="A path to an executable (such as a script) "
"which will be called before killing any tasks marked "
"for draining at each step. The script will be called "
"with 3 arguments (in JSON): the old app definition, "
"the list of tasks which will be killed, "
"and the new app definition. An exit "
"code of 0 indicates the deploy may continue. "
"If the hook returns a non-zero exit code, the deploy "
"will stop, and an operator must intervene."
)
parser = set_logging_args(parser)
parser = set_marathon_auth_args(parser)
return parser
def set_request_retries():
s = requests.Session()
a = requests.adapters.HTTPAdapter(max_retries=3)
s.mount('http://', a)
def process_arguments():
# Process arguments
arg_parser = get_arg_parser()
args = arg_parser.parse_args()
if args.longhelp:
print(__doc__)
sys.exit()
# otherwise make sure that a Marathon URL was specified
else:
if args.marathon is None:
arg_parser.error('argument --marathon/-m is required')
if args.marathon_lb is None:
arg_parser.error('argument --marathon-lb/-l is required')
if args.json is None:
arg_parser.error('argument --json/-j is required')
return args
if __name__ == '__main__':
args = process_arguments()
set_request_retries()
setup_logging(logger, args.syslog_socket, args.log_format, args.log_level)
try:
if do_zdd(args):
sys.exit(0)
else:
sys.exit(1)
except Exception as e:
if hasattr(e, 'zdd_exit_status'):
if hasattr(e, 'error'):
logger.exception(str(e.error))
else:
logger.exception(traceback.print_exc())
sys.exit(e.zdd_exit_status)
else:
# For Unknown Exceptions
logger.exception(traceback.print_exc())
sys.exit(2)
| 35.325694 | 82 | 0.623937 |
import argparse
import csv
import json
import logging
import math
import socket
import subprocess
import sys
import time
import traceback
from datetime import datetime
from collections import namedtuple
import requests
import six.moves.urllib as urllib
from common import (get_marathon_auth_params, set_logging_args,
set_marathon_auth_args, setup_logging)
from utils import get_task_ip_and_ports
from zdd_exceptions import (
AppCreateException, AppDeleteException, AppScaleException,
InvalidArgException, MarathonEndpointException,
MarathonLbEndpointException, MissingFieldException)
logger = logging.getLogger('zdd')
def query_yes_no(question, default="yes"):
valid = {"yes": True, "y": True, "ye": True,
"no": False, "n": False}
if default is None:
prompt = " [y/n] "
elif default == "yes":
prompt = " [Y/n] "
elif default == "no":
prompt = " [y/N] "
else:
raise ValueError("invalid default answer: '%s'" % default)
while True:
sys.stdout.write(question + prompt)
choice = input().lower()
if default is not None and choice == '':
return valid[default]
elif choice in valid:
return valid[choice]
else:
sys.stdout.write("Please respond with 'yes' or 'no' "
"(or 'y' or 'n').\n")
def marathon_get_request(args, path):
url = args.marathon + path
try:
response = requests.get(url, auth=get_marathon_auth_params(args))
response.raise_for_status()
except requests.exceptions.RequestException:
raise MarathonEndpointException(
"Error while querying marathon", url, traceback.format_exc())
return response
def list_marathon_apps(args):
response = marathon_get_request(args, "/v2/apps")
return response.json()['apps']
def fetch_marathon_app(args, app_id):
response = marathon_get_request(args, "/v2/apps" + app_id)
return response.json()['app']
def _get_alias_records(hostname):
return socket.gethostbyname_ex(hostname)[2]
def _unparse_url_alias(url, addr):
return urllib.parse.urlunparse((url[0],
addr + ":" + str(url.port),
url[2],
url[3],
url[4],
url[5]))
def get_marathon_lb_urls(args):
url = urllib.parse.urlparse(args.marathon_lb)
addrs = _get_alias_records(url.hostname)
return [_unparse_url_alias(url, addr) for addr in addrs]
def fetch_haproxy_pids(haproxy_url):
try:
response = requests.get(haproxy_url + "/_haproxy_getpids")
response.raise_for_status()
except requests.exceptions.RequestException:
logger.exception("Caught exception when retrieving HAProxy"
" pids from " + haproxy_url)
raise
return response.text.split()
def check_haproxy_reloading(haproxy_url):
try:
pids = fetch_haproxy_pids(haproxy_url)
except requests.exceptions.RequestException:
return True
if len(pids) > 1:
logger.info("Waiting for {} pids on {}".format(len(pids), haproxy_url))
return True
return False
def any_marathon_lb_reloading(marathon_lb_urls):
return any([check_haproxy_reloading(url) for url in marathon_lb_urls])
def fetch_haproxy_stats(haproxy_url):
try:
response = requests.get(haproxy_url + "/haproxy?stats;csv")
response.raise_for_status()
except requests.exceptions.RequestException:
logger.exception("Caught exception when retrieving HAProxy"
" stats from " + haproxy_url)
raise
return response.text
def fetch_combined_haproxy_stats(marathon_lb_urls):
raw = ''.join([fetch_haproxy_stats(url) for url in marathon_lb_urls])
return parse_haproxy_stats(raw)
def parse_haproxy_stats(csv_data):
rows = csv_data.splitlines()
headings = rows.pop(0).lstrip('# ').rstrip(',\n').split(',')
csv_reader = csv.reader(rows, delimiter=',', quotechar="'")
Row = namedtuple('Row', headings)
return [Row(*row[0:-1]) for row in csv_reader if row[0][0] != '
def get_deployment_label(app):
return get_deployment_group(app) + "_" + app['labels']['HAPROXY_0_PORT']
def _if_app_listener(app, listener):
return (listener.pxname == get_deployment_label(app) and
listener.svname not in ['BACKEND', 'FRONTEND'])
def fetch_app_listeners(app, marathon_lb_urls):
haproxy_stats = fetch_combined_haproxy_stats(marathon_lb_urls)
return [l for l in haproxy_stats if _if_app_listener(app, l)]
def waiting_for_listeners(new_app, old_app, listeners, haproxy_count):
listener_count = (len(listeners) / haproxy_count)
return listener_count != new_app['instances'] + old_app['instances']
def get_deployment_target(app):
if 'HAPROXY_DEPLOYMENT_TARGET_INSTANCES' in app['labels']:
return int(app['labels']['HAPROXY_DEPLOYMENT_TARGET_INSTANCES'])
else:
return app['instances']
def get_new_instance_count(app):
if 'HAPROXY_DEPLOYMENT_NEW_INSTANCES' in app['labels']:
return int(app['labels']['HAPROXY_DEPLOYMENT_NEW_INSTANCES'])
else:
return 0
def waiting_for_up_listeners(app, listeners, haproxy_count):
up_listeners = [l for l in listeners if l.status == 'UP']
up_listener_count = (len(up_listeners) / haproxy_count)
return up_listener_count < get_deployment_target(app)
def select_draining_listeners(listeners):
return [l for l in listeners if l.status == 'MAINT']
def select_drained_listeners(listeners):
draining_listeners = select_draining_listeners(listeners)
return [l for l in draining_listeners if not _has_pending_requests(l)]
def get_svnames_from_task(app, task):
prefix = task['host'].replace('.', '_')
task_ip, task_port = get_task_ip_and_ports(app, task)
if task['host'] == task_ip:
for port in task['ports']:
yield('{}_{}'.format(prefix, port))
else:
for port in task['ports']:
yield('{}_{}_{}'.format(prefix, task_ip.replace('.', '_'), port))
def get_svnames_from_tasks(app, tasks):
svnames = []
for task in tasks:
svnames += get_svnames_from_task(app, task)
return svnames
def _has_pending_requests(listener):
return int(listener.qcur or 0) > 0 or int(listener.scur or 0) > 0
def is_hybrid_deployment(args, app):
if (get_new_instance_count(app) != 0 and not args.complete_cur and
not args.complete_prev):
return True
else:
return False
def find_drained_task_ids(app, listeners, haproxy_count):
tasks = zip(get_svnames_from_tasks(app, app['tasks']), app['tasks'])
drained_listeners = select_drained_listeners(listeners)
drained_task_ids = []
for svname, task in tasks:
task_listeners = [l for l in drained_listeners if l.svname == svname]
if len(task_listeners) == haproxy_count:
drained_task_ids.append(task['id'])
return drained_task_ids
def find_draining_task_ids(app, listeners, haproxy_count):
tasks = zip(get_svnames_from_tasks(app, app['tasks']), app['tasks'])
draining_listeners = select_draining_listeners(listeners)
draining_task_ids = []
for svname, task in tasks:
task_listeners = [l for l in draining_listeners if l.svname == svname]
if len(task_listeners) == haproxy_count:
draining_task_ids.append(task['id'])
return draining_task_ids
def max_wait_not_exceeded(max_wait, timestamp):
return time.time() - timestamp < max_wait
def find_tasks_to_kill(args, new_app, old_app, timestamp):
marathon_lb_urls = get_marathon_lb_urls(args)
haproxy_count = len(marathon_lb_urls)
try:
listeners = fetch_app_listeners(new_app, marathon_lb_urls)
except requests.exceptions.RequestException:
raise MarathonLbEndpointException(
"Error while querying Marathon-LB",
marathon_lb_urls,
traceback.format_exc())
while max_wait_not_exceeded(args.max_wait, timestamp):
time.sleep(args.step_delay)
logger.info("Existing app running {} instances, "
"new app running {} instances"
.format(old_app['instances'], new_app['instances']))
if any_marathon_lb_reloading(marathon_lb_urls):
continue
try:
listeners = fetch_app_listeners(new_app, marathon_lb_urls)
except requests.exceptions.RequestException:
# Restart loop if we hit an exception while loading listeners,
# this may be normal behaviour
continue
logger.info("Found {} app listeners across {} HAProxy instances"
.format(len(listeners), haproxy_count))
if waiting_for_listeners(new_app, old_app, listeners, haproxy_count):
continue
if waiting_for_up_listeners(new_app, listeners, haproxy_count):
continue
if waiting_for_drained_listeners(listeners):
continue
return find_drained_task_ids(old_app, listeners, haproxy_count)
logger.info('Timed out waiting for tasks to fully drain, find any draining'
' tasks and continue with deployment...')
return find_draining_task_ids(old_app, listeners, haproxy_count)
def deployment_in_progress(app):
return len(app['deployments']) > 0
def execute_pre_kill_hook(args, old_app, tasks_to_kill, new_app):
if args.pre_kill_hook is not None:
logger.info("Calling pre-kill hook '{}'".format(args.pre_kill_hook))
subprocess.check_call([args.pre_kill_hook,
json.dumps(old_app),
json.dumps(tasks_to_kill),
json.dumps(new_app)])
def swap_zdd_apps(args, new_app, old_app):
func_args = (args, new_app, old_app)
while True:
res = _swap_zdd_apps(func_args[0], func_args[1], func_args[2])
if isinstance(res, bool):
return res
func_args = res
def _swap_zdd_apps(args, new_app, old_app):
old_app = fetch_marathon_app(args, old_app['id'])
new_app = fetch_marathon_app(args, new_app['id'])
if deployment_in_progress(new_app):
time.sleep(args.step_delay)
return args, new_app, old_app
tasks_to_kill = find_tasks_to_kill(args, new_app, old_app, time.time())
if ready_to_delete_old_app(args, new_app, old_app, tasks_to_kill):
return safe_delete_app(args, old_app, new_app)
if len(tasks_to_kill) > 0:
execute_pre_kill_hook(args, old_app, tasks_to_kill, new_app)
logger.info("There are {} draining listeners, "
"about to kill the following tasks:\n - {}"
.format(len(tasks_to_kill),
"\n - ".join(tasks_to_kill)))
if args.force or query_yes_no("Continue?"):
logger.info("Scaling down old app by {} instances"
.format(len(tasks_to_kill)))
kill_marathon_tasks(args, tasks_to_kill)
else:
return False
if is_hybrid_deployment(args, new_app):
if new_app['instances'] < get_new_instance_count(new_app):
scale_new_app_instances(args, new_app, old_app)
else:
if new_app['instances'] < get_deployment_target(new_app):
scale_new_app_instances(args, new_app, old_app)
return (args, new_app, old_app)
def ready_to_delete_old_app(args, new_app, old_app, draining_task_ids):
new_instances = get_new_instance_count(new_app)
if is_hybrid_deployment(args, new_app):
return (int(new_app['instances']) == new_instances and
int(old_app['instances']) == (
get_deployment_target(old_app) - new_instances))
else:
return (int(new_app['instances']) == get_deployment_target(new_app) and
len(draining_task_ids) == int(old_app['instances']))
def waiting_for_drained_listeners(listeners):
return len(select_drained_listeners(listeners)) < 1
def scale_new_app_instances(args, new_app, old_app):
instances = (math.floor(new_app['instances'] +
(new_app['instances'] + 1) / 2))
if is_hybrid_deployment(args, new_app):
if instances > get_new_instance_count(new_app):
instances = get_new_instance_count(new_app)
else:
if instances >= old_app['instances']:
instances = get_deployment_target(new_app)
logger.info("Scaling new app up to {} instances".format(instances))
return scale_marathon_app_instances(args, new_app, instances)
def safe_delete_app(args, app, new_app):
if is_hybrid_deployment(args, new_app):
logger.info("Not deleting old app, as its hybrid configuration")
return True
else:
logger.info("About to delete old app {}".format(app['id']))
if args.force or query_yes_no("Continue?"):
delete_marathon_app(args, app)
return True
else:
return False
def delete_marathon_app(args, app):
url = args.marathon + '/v2/apps' + app['id']
try:
response = requests.delete(url,
auth=get_marathon_auth_params(args))
response.raise_for_status()
except requests.exceptions.RequestException:
raise AppDeleteException(
"Error while deleting the app", url, traceback.format_exc())
return response
def kill_marathon_tasks(args, ids):
data = json.dumps({'ids': ids})
url = args.marathon + "/v2/tasks/delete?scale=true"
headers = {'Content-Type': 'application/json'}
try:
response = requests.post(url, headers=headers, data=data,
auth=get_marathon_auth_params(args))
response.raise_for_status()
except requests.exceptions.RequestException:
# This is App Scale Down, so raising AppScale Exception
raise AppScaleException(
"Error while scaling the app", url, data, traceback.format_exc())
return response
def scale_marathon_app_instances(args, app, instances):
url = args.marathon + "/v2/apps" + app['id']
data = json.dumps({'instances': instances})
headers = {'Content-Type': 'application/json'}
try:
response = requests.put(url, headers=headers, data=data,
auth=get_marathon_auth_params(args))
response.raise_for_status()
except requests.exceptions.RequestException:
# This is App Scale Up, so raising AppScale Exception
raise AppScaleException(
"Error while scaling the app", url, data, traceback.format_exc())
return response
def deploy_marathon_app(args, app):
url = args.marathon + "/v2/apps"
data = json.dumps(app)
headers = {'Content-Type': 'application/json'}
try:
response = requests.post(url, headers=headers, data=data,
auth=get_marathon_auth_params(args))
response.raise_for_status()
except requests.exceptions.RequestException:
raise AppCreateException(
"Error while creating the app", url, data, traceback.format_exc())
return response
def get_service_port(app):
try:
return \
int(app['container']['docker']['portMappings'][0]['servicePort'])
except KeyError:
try:
return \
int(app['portDefinitions'][0]['port'])
except KeyError:
return int(app['ports'][0])
def set_service_port(app, servicePort):
try:
app['container']['docker']['portMappings'][0]['servicePort'] = \
int(servicePort)
except KeyError:
app['ports'][0] = int(servicePort)
return app
def validate_app(app):
if app['id'] is None:
raise MissingFieldException("App doesn't contain a valid App ID",
'id')
if 'labels' not in app:
raise MissingFieldException("No labels found. Please define the"
" HAPROXY_DEPLOYMENT_GROUP label",
'label')
if 'HAPROXY_DEPLOYMENT_GROUP' not in app['labels']:
raise MissingFieldException("Please define the "
"HAPROXY_DEPLOYMENT_GROUP label",
'HAPROXY_DEPLOYMENT_GROUP')
if 'HAPROXY_DEPLOYMENT_ALT_PORT' not in app['labels']:
raise MissingFieldException("Please define the "
"HAPROXY_DEPLOYMENT_ALT_PORT label",
'HAPROXY_DEPLOYMENT_ALT_PORT')
def set_app_ids(app, colour):
app['labels']['HAPROXY_APP_ID'] = app['id']
app['id'] = app['id'] + '-' + colour
if app['id'][0] != '/':
app['id'] = '/' + app['id']
return app
def set_service_ports(app, servicePort):
app['labels']['HAPROXY_0_PORT'] = str(get_service_port(app))
try:
app['container']['docker']['portMappings'][0]['servicePort'] = \
int(servicePort)
return app
except KeyError:
app['ports'][0] = int(servicePort)
return app
def select_next_port(app):
alt_port = int(app['labels']['HAPROXY_DEPLOYMENT_ALT_PORT'])
if int(app['ports'][0]) == alt_port:
return int(app['labels']['HAPROXY_0_PORT'])
else:
return alt_port
def select_next_colour(app):
if app['labels'].get('HAPROXY_DEPLOYMENT_COLOUR') == 'blue':
return 'green'
else:
return 'blue'
def sort_deploys(apps):
return sorted(apps, key=lambda a: a.get('labels', {})
.get('HAPROXY_DEPLOYMENT_STARTED_AT', '0'))
def select_last_deploy(apps):
return sort_deploys(apps).pop()
def select_last_two_deploys(apps):
return sort_deploys(apps)[:-3:-1]
def get_deployment_group(app):
return app.get('labels', {}).get('HAPROXY_DEPLOYMENT_GROUP')
def fetch_previous_deploys(args, app):
apps = list_marathon_apps(args)
app_deployment_group = get_deployment_group(app)
return [a for a in apps if get_deployment_group(a) == app_deployment_group]
def prepare_deploy(args, previous_deploys, app):
if len(previous_deploys) > 0:
last_deploy = select_last_deploy(previous_deploys)
next_colour = select_next_colour(last_deploy)
next_port = select_next_port(last_deploy)
deployment_target_instances = last_deploy['instances']
if args.new_instances > deployment_target_instances:
args.new_instances = deployment_target_instances
if args.new_instances and args.new_instances > 0:
if args.initial_instances > args.new_instances:
app['instances'] = args.new_instances
else:
app['instances'] = args.initial_instances
else:
if args.initial_instances > deployment_target_instances:
app['instances'] = deployment_target_instances
else:
app['instances'] = args.initial_instances
app['labels']['HAPROXY_DEPLOYMENT_NEW_INSTANCES'] = str(
args.new_instances)
else:
next_colour = 'blue'
next_port = get_service_port(app)
deployment_target_instances = app['instances']
app['labels']['HAPROXY_DEPLOYMENT_NEW_INSTANCES'] = "0"
app = set_app_ids(app, next_colour)
app = set_service_ports(app, next_port)
app['labels']['HAPROXY_DEPLOYMENT_TARGET_INSTANCES'] = \
str(deployment_target_instances)
app['labels']['HAPROXY_DEPLOYMENT_COLOUR'] = next_colour
app['labels']['HAPROXY_DEPLOYMENT_STARTED_AT'] = datetime.now().isoformat()
return app
def load_app_json(args):
with open(args.json) as content_file:
return json.load(content_file)
def safe_resume_deploy(args, previous_deploys):
if args.complete_cur:
logger.info("Converting all instances to current config")
new_app, old_app = select_last_two_deploys(previous_deploys)
logger.info("Current config color is %s" % new_app[
'labels']['HAPROXY_DEPLOYMENT_COLOUR'])
logger.info("Considering %s color as existing app"
% old_app['labels']['HAPROXY_DEPLOYMENT_COLOUR'] +
" and %s color as new app"
% new_app['labels']['HAPROXY_DEPLOYMENT_COLOUR'])
return swap_zdd_apps(args, new_app, old_app)
elif args.complete_prev:
logger.info("Converting all instances to previous config")
old_app, new_app = select_last_two_deploys(previous_deploys)
logger.info("Previous config color is %s" % new_app[
'labels']['HAPROXY_DEPLOYMENT_COLOUR'])
logger.info("Considering %s color as existing app"
% old_app['labels']['HAPROXY_DEPLOYMENT_COLOUR'] +
" and %s color as new app"
% new_app['labels']['HAPROXY_DEPLOYMENT_COLOUR'])
return swap_zdd_apps(args, new_app, old_app)
elif args.resume:
logger.info("Found previous deployment, resuming")
new_app, old_app = select_last_two_deploys(previous_deploys)
return swap_zdd_apps(args, new_app, old_app)
else:
raise Exception("There appears to be an"
" existing deployment in progress")
def do_zdd(args, out=sys.stdout):
app = load_app_json(args)
validate_app(app)
previous_deploys = fetch_previous_deploys(args, app)
if len(previous_deploys) > 1:
return safe_resume_deploy(args, previous_deploys)
if args.complete_cur or args.complete_prev:
raise InvalidArgException("Cannot use --complete-cur, --complete-prev"
" flags when config is not hybrid")
new_app = prepare_deploy(args, previous_deploys, app)
logger.info('Final app definition:')
out.write(json.dumps(new_app, sort_keys=True, indent=2))
out.write("\n")
if args.dry_run:
return True
if args.force or query_yes_no("Continue with deployment?"):
deploy_marathon_app(args, new_app)
if len(previous_deploys) == 0:
return True
else:
old_app = select_last_deploy(previous_deploys)
return swap_zdd_apps(args, new_app, old_app)
def get_arg_parser():
parser = argparse.ArgumentParser(
description="Zero-downtime deployment orchestrator for marathon-lb",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--longhelp",
help="Print out configuration details",
action="store_true"
)
parser.add_argument("--marathon", "-m",
help="[required] Marathon endpoint, eg. -m " +
"http://marathon1:8080"
)
parser.add_argument("--marathon-lb", "-l",
help="[required] Marathon-lb stats endpoint, eg. -l " +
"http://marathon-lb.marathon.mesos:9090"
)
parser.add_argument("--json", "-j",
help="[required] App JSON"
)
parser.add_argument("--dry-run", "-d",
help="Perform a dry run",
action="store_true"
)
parser.add_argument("--force", "-f",
help="Perform deployment un-prompted",
action="store_true"
)
parser.add_argument("--step-delay", "-s",
help="Delay (in seconds) between each successive"
" deployment step",
type=int, default=5
)
parser.add_argument("--initial-instances", "-i",
help="Initial number of app instances to launch."
" If this number is greater than total number of"
" existing instances, then this will be overridden"
" by the latter number",
type=int, default=1
)
parser.add_argument("--resume", "-r",
help="Resume from a previous deployment",
action="store_true"
)
parser.add_argument("--max-wait", "-w",
help="Maximum amount of time (in seconds) to wait"
" for HAProxy to drain connections",
type=int, default=300
)
parser.add_argument("--new-instances", "-n",
help="Number of new instances to replace the existing"
" instances. This is for having instances of both blue"
" and green at the same time",
type=int, default=0)
parser.add_argument("--complete-cur", "-c",
help="Change hybrid app entirely to"
" current (new) app's instances", action="store_true")
parser.add_argument("--complete-prev", "-p",
help="Change hybrid app entirely to"
" previous (old) app's instances", action="store_true")
parser.add_argument("--pre-kill-hook",
help="A path to an executable (such as a script) "
"which will be called before killing any tasks marked "
"for draining at each step. The script will be called "
"with 3 arguments (in JSON): the old app definition, "
"the list of tasks which will be killed, "
"and the new app definition. An exit "
"code of 0 indicates the deploy may continue. "
"If the hook returns a non-zero exit code, the deploy "
"will stop, and an operator must intervene."
)
parser = set_logging_args(parser)
parser = set_marathon_auth_args(parser)
return parser
def set_request_retries():
s = requests.Session()
a = requests.adapters.HTTPAdapter(max_retries=3)
s.mount('http://', a)
def process_arguments():
arg_parser = get_arg_parser()
args = arg_parser.parse_args()
if args.longhelp:
print(__doc__)
sys.exit()
else:
if args.marathon is None:
arg_parser.error('argument --marathon/-m is required')
if args.marathon_lb is None:
arg_parser.error('argument --marathon-lb/-l is required')
if args.json is None:
arg_parser.error('argument --json/-j is required')
return args
if __name__ == '__main__':
args = process_arguments()
set_request_retries()
setup_logging(logger, args.syslog_socket, args.log_format, args.log_level)
try:
if do_zdd(args):
sys.exit(0)
else:
sys.exit(1)
except Exception as e:
if hasattr(e, 'zdd_exit_status'):
if hasattr(e, 'error'):
logger.exception(str(e.error))
else:
logger.exception(traceback.print_exc())
sys.exit(e.zdd_exit_status)
else:
logger.exception(traceback.print_exc())
sys.exit(2)
| true | true |
f726fa1e73e6103ef46be0193e0b17c20617c6fb | 2,819 | py | Python | generator/modules/caffe.py | kklemon/deepo | 038063faf9a4c883a853aac77471e859f61b0d0a | [
"MIT"
] | null | null | null | generator/modules/caffe.py | kklemon/deepo | 038063faf9a4c883a853aac77471e859f61b0d0a | [
"MIT"
] | null | null | null | generator/modules/caffe.py | kklemon/deepo | 038063faf9a4c883a853aac77471e859f61b0d0a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .__module__ import Module, dependency, source
from .tools import Tools
from .boost import Boost
from .python import Python
from .opencv import Opencv
@dependency(Tools, Python, Boost, Opencv)
@source('git')
class Caffe(Module):
def build(self):
pyver = self.composer.ver(Python)
cpu_only = self.composer.cuda_ver is None
return (r'''
$GIT_CLONE https://github.com/BVLC/caffe ~/caffe && \
cp ~/caffe/Makefile.config.example ~/caffe/Makefile.config && \
sed -i 's/# %s/%s/g' ~/caffe/Makefile.config && \
''' % (
('CPU_ONLY', 'CPU_ONLY') if cpu_only else \
('USE_CUDNN', 'USE_CUDNN') \
)).rstrip() + (
'' if pyver == '2.7' else r'''
sed -i 's/# PYTHON_LIBRARIES/PYTHON_LIBRARIES/g' '''
+ r'''~/caffe/Makefile.config && \
'''.rstrip()
) + r'''
sed -i 's/# WITH_PYTHON_LAYER/WITH_PYTHON_LAYER/g' ''' \
+ r'''~/caffe/Makefile.config && \
sed -i 's/# OPENCV_VERSION/OPENCV_VERSION/g' ''' \
+ r'''~/caffe/Makefile.config && \
'''.rstrip() + (
r'' if cpu_only else r'''
sed -i 's/# USE_NCCL/USE_NCCL/g' ~/caffe/Makefile.config && \
sed -i 's/-gencode arch=compute_20,code=sm_20//g' ~/caffe/Makefile.config && \
sed -i 's/-gencode arch=compute_20,code=sm_21//g' ~/caffe/Makefile.config && \
'''.rstrip()
) + (r'''
sed -i 's/2\.7/3\.5/g' ~/caffe/Makefile.config && \
''' if pyver == '3.5' else (
r'''
sed -i 's/2\.7/3\.6/g' ~/caffe/Makefile.config && \
sed -i 's/3\.5/3\.6/g' ~/caffe/Makefile.config && \
''' if pyver == '3.6' else
r'''
'''
)).rstrip() + r'''
sed -i 's/\/usr\/lib\/python/\/usr\/local\/lib\/python/g' ''' \
+ r'''~/caffe/Makefile.config && \
sed -i 's/\/usr\/local\/include/\/usr\/local\/include ''' \
+ r'''\/usr\/include\/hdf5\/serial/g' ~/caffe/Makefile.config && \
sed -i 's/hdf5/hdf5_serial/g' ~/caffe/Makefile && \
cd ~/caffe && \
make -j"$(nproc)" -Wno-deprecated-gpu-targets distribute && \
# fix ValueError caused by python-dateutil 1.x
sed -i 's/,<2//g' ~/caffe/python/requirements.txt && \
$PIP_INSTALL \
-r ~/caffe/python/requirements.txt && \
cd ~/caffe/distribute/bin && \
for file in *.bin; do mv "$file" "${file%%%%.bin}"; done && \
cd ~/caffe/distribute && \
cp -r bin include lib proto /usr/local/ && \
cp -r python/caffe /usr/local/lib/python%s/dist-packages/ && \
''' % pyver
| 40.855072 | 90 | 0.496985 |
from .__module__ import Module, dependency, source
from .tools import Tools
from .boost import Boost
from .python import Python
from .opencv import Opencv
@dependency(Tools, Python, Boost, Opencv)
@source('git')
class Caffe(Module):
def build(self):
pyver = self.composer.ver(Python)
cpu_only = self.composer.cuda_ver is None
return (r'''
$GIT_CLONE https://github.com/BVLC/caffe ~/caffe && \
cp ~/caffe/Makefile.config.example ~/caffe/Makefile.config && \
sed -i 's/# %s/%s/g' ~/caffe/Makefile.config && \
''' % (
('CPU_ONLY', 'CPU_ONLY') if cpu_only else \
('USE_CUDNN', 'USE_CUDNN') \
)).rstrip() + (
'' if pyver == '2.7' else r'''
sed -i 's/# PYTHON_LIBRARIES/PYTHON_LIBRARIES/g' '''
+ r'''~/caffe/Makefile.config && \
'''.rstrip()
) + r'''
sed -i 's/# WITH_PYTHON_LAYER/WITH_PYTHON_LAYER/g' ''' \
+ r'''~/caffe/Makefile.config && \
sed -i 's/# OPENCV_VERSION/OPENCV_VERSION/g' ''' \
+ r'''~/caffe/Makefile.config && \
'''.rstrip() + (
r'' if cpu_only else r'''
sed -i 's/# USE_NCCL/USE_NCCL/g' ~/caffe/Makefile.config && \
sed -i 's/-gencode arch=compute_20,code=sm_20//g' ~/caffe/Makefile.config && \
sed -i 's/-gencode arch=compute_20,code=sm_21//g' ~/caffe/Makefile.config && \
'''.rstrip()
) + (r'''
sed -i 's/2\.7/3\.5/g' ~/caffe/Makefile.config && \
''' if pyver == '3.5' else (
r'''
sed -i 's/2\.7/3\.6/g' ~/caffe/Makefile.config && \
sed -i 's/3\.5/3\.6/g' ~/caffe/Makefile.config && \
''' if pyver == '3.6' else
r'''
'''
)).rstrip() + r'''
sed -i 's/\/usr\/lib\/python/\/usr\/local\/lib\/python/g' ''' \
+ r'''~/caffe/Makefile.config && \
sed -i 's/\/usr\/local\/include/\/usr\/local\/include ''' \
+ r'''\/usr\/include\/hdf5\/serial/g' ~/caffe/Makefile.config && \
sed -i 's/hdf5/hdf5_serial/g' ~/caffe/Makefile && \
cd ~/caffe && \
make -j"$(nproc)" -Wno-deprecated-gpu-targets distribute && \
# fix ValueError caused by python-dateutil 1.x
sed -i 's/,<2//g' ~/caffe/python/requirements.txt && \
$PIP_INSTALL \
-r ~/caffe/python/requirements.txt && \
cd ~/caffe/distribute/bin && \
for file in *.bin; do mv "$file" "${file%%%%.bin}"; done && \
cd ~/caffe/distribute && \
cp -r bin include lib proto /usr/local/ && \
cp -r python/caffe /usr/local/lib/python%s/dist-packages/ && \
''' % pyver
| true | true |
f726fac98d42191736a2bb1553a3990d3286b9b1 | 4,770 | py | Python | surfpy/simplegribmessage.py | mjmayank1/surfpy | 969b1a626db7606a42fab0eae445fcb351d6cbcd | [
"MIT"
] | 46 | 2018-04-08T15:56:32.000Z | 2022-01-05T17:36:55.000Z | surfpy/simplegribmessage.py | mjmayank1/surfpy | 969b1a626db7606a42fab0eae445fcb351d6cbcd | [
"MIT"
] | 13 | 2017-08-15T13:12:10.000Z | 2021-03-23T09:09:04.000Z | surfpy/simplegribmessage.py | mjmayank1/surfpy | 969b1a626db7606a42fab0eae445fcb351d6cbcd | [
"MIT"
] | 15 | 2018-03-08T16:52:19.000Z | 2021-12-27T21:17:37.000Z | try:
from grippy.message import Message
except:
Message = None
from .location import Location
import math
import datetime
from . import tools
class SimpleGribMessage(Message):
def __init__(self, data, offset):
super(SimpleGribMessage, self).__init__(data, offset)
@property
def model_time(self):
return self.sections[self.IDENTIFICATION_SECTION_INDEX].reference_date
@property
def hour(self):
return self.sections[self.PRODUCT_DEFINITION_SECTION_INDEX].template.forecast_time
@property
def forecast_time(self):
forc_time = self.model_time
return forc_time + datetime.timedelta(hours=self.hour)
@property
def var(self):
return self.sections[self.PRODUCT_DEFINITION_SECTION_INDEX].template.parameter_number.abbrev
@property
def is_array_var(self):
return self.sections[self.PRODUCT_DEFINITION_SECTION_INDEX].template.first_fixed_surface_type_value == 241
@property
def var_index(self):
if not self.is_array_var:
return -1
return self.sections[self.PRODUCT_DEFINITION_SECTION_INDEX].template.first_fixed_surface_scaled_value
@property
def lat_count(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.meridian_point_count
@property
def lon_count(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.parallel_point_count
@property
def start_lat(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.start_latitude
@property
def start_lon(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.start_longitude
@property
def lat_step(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.i_direction_increment
@property
def lon_step(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.j_direction_increment
@property
def end_lat(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.end_latitude
@property
def end_lon(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.end_longitude
@property
def lat_indices(self):
start = self.start_lat
step = self.lat_step
count = self.lat_count
return list([start + x*step for x in range(0, count)])
@property
def lon_indices(self):
start = self.start_lon
step = self.lon_step
count = self.lon_count
return list([start + x*step for x in range(0, count)])
@property
def origin_location(self):
lat = (self.start_lat + self.end_lat) * 0.5
lon = (self.start_lon + self.end_lon) * 0.5
return Location(lat, lon)
def location_for_index(self, index):
if index >= self.lat_count*self.lon_count:
return Location(float('NaN'), float('NaN'), 'invalid')
lat_index = int(index/self.lat_count)
lon_index = index % self.lat_count
return Location(self.start_lat + (lat_index*self.lat_step), self.start_lon + (lon_index*self.lon_step))
def index_for_location(self, location):
if location.latitude < self.start_lat or location.latitude > self.end_lat:
return -1
elif location.absolute_longitude < self.start_lon or location.absolute_longitude > self.end_lon:
return -1
closest_lat_index = tools.closest_index(self.lat_indices, location.latitude)
closest_lon_index = tools.closest_index(self.lon_indices, location.absolute_longitude)
return closest_lat_index*self.lon_count+closest_lon_index
@property
def data(self):
return self.sections[self.DATA_SECTION_INDEX].all_scaled_values(self.sections[self.BITMAP_SECTION_INDEX].all_bit_truths)
@property
def data_mean(self):
all_data = [x for x in self.data if not math.isnan(x)]
if len(all_data) < 1:
return 0
return sum(all_data)/float(len(all_data))
def read_simple_grib_messages_raw(all_data, count=-1):
messages = []
offset = 0
while offset < len(all_data):
messages.append(SimpleGribMessage(all_data, offset))
offset = offset + messages[-1].length
if count > 0 and len(messages) == count:
break
return messages
def read_simple_grib_messages(filename, count=-1):
messages = []
with open(filename, 'rb') as stream:
all_data = stream.read()
offset = 0
while offset < len(all_data):
messages.append(SimpleGribMessage(all_data, offset))
offset = offset + messages[-1].length
if count > 0 and len(messages) == count:
break
return messages
| 30.974026 | 128 | 0.692034 | try:
from grippy.message import Message
except:
Message = None
from .location import Location
import math
import datetime
from . import tools
class SimpleGribMessage(Message):
def __init__(self, data, offset):
super(SimpleGribMessage, self).__init__(data, offset)
@property
def model_time(self):
return self.sections[self.IDENTIFICATION_SECTION_INDEX].reference_date
@property
def hour(self):
return self.sections[self.PRODUCT_DEFINITION_SECTION_INDEX].template.forecast_time
@property
def forecast_time(self):
forc_time = self.model_time
return forc_time + datetime.timedelta(hours=self.hour)
@property
def var(self):
return self.sections[self.PRODUCT_DEFINITION_SECTION_INDEX].template.parameter_number.abbrev
@property
def is_array_var(self):
return self.sections[self.PRODUCT_DEFINITION_SECTION_INDEX].template.first_fixed_surface_type_value == 241
@property
def var_index(self):
if not self.is_array_var:
return -1
return self.sections[self.PRODUCT_DEFINITION_SECTION_INDEX].template.first_fixed_surface_scaled_value
@property
def lat_count(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.meridian_point_count
@property
def lon_count(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.parallel_point_count
@property
def start_lat(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.start_latitude
@property
def start_lon(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.start_longitude
@property
def lat_step(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.i_direction_increment
@property
def lon_step(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.j_direction_increment
@property
def end_lat(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.end_latitude
@property
def end_lon(self):
return self.sections[self.GRID_DEFINITION_SECTION_INDEX].template.end_longitude
@property
def lat_indices(self):
start = self.start_lat
step = self.lat_step
count = self.lat_count
return list([start + x*step for x in range(0, count)])
@property
def lon_indices(self):
start = self.start_lon
step = self.lon_step
count = self.lon_count
return list([start + x*step for x in range(0, count)])
@property
def origin_location(self):
lat = (self.start_lat + self.end_lat) * 0.5
lon = (self.start_lon + self.end_lon) * 0.5
return Location(lat, lon)
def location_for_index(self, index):
if index >= self.lat_count*self.lon_count:
return Location(float('NaN'), float('NaN'), 'invalid')
lat_index = int(index/self.lat_count)
lon_index = index % self.lat_count
return Location(self.start_lat + (lat_index*self.lat_step), self.start_lon + (lon_index*self.lon_step))
def index_for_location(self, location):
if location.latitude < self.start_lat or location.latitude > self.end_lat:
return -1
elif location.absolute_longitude < self.start_lon or location.absolute_longitude > self.end_lon:
return -1
closest_lat_index = tools.closest_index(self.lat_indices, location.latitude)
closest_lon_index = tools.closest_index(self.lon_indices, location.absolute_longitude)
return closest_lat_index*self.lon_count+closest_lon_index
@property
def data(self):
return self.sections[self.DATA_SECTION_INDEX].all_scaled_values(self.sections[self.BITMAP_SECTION_INDEX].all_bit_truths)
@property
def data_mean(self):
all_data = [x for x in self.data if not math.isnan(x)]
if len(all_data) < 1:
return 0
return sum(all_data)/float(len(all_data))
def read_simple_grib_messages_raw(all_data, count=-1):
messages = []
offset = 0
while offset < len(all_data):
messages.append(SimpleGribMessage(all_data, offset))
offset = offset + messages[-1].length
if count > 0 and len(messages) == count:
break
return messages
def read_simple_grib_messages(filename, count=-1):
messages = []
with open(filename, 'rb') as stream:
all_data = stream.read()
offset = 0
while offset < len(all_data):
messages.append(SimpleGribMessage(all_data, offset))
offset = offset + messages[-1].length
if count > 0 and len(messages) == count:
break
return messages
| true | true |
f726fb4d2abc77279d107a4f456ba056c71958e4 | 2,801 | py | Python | tests/test_lsp.py | Zhu-Liu/cp2k-input-tools | 3c84e82554bc5cde687395499e3d6f9e2b50e13b | [
"MIT"
] | null | null | null | tests/test_lsp.py | Zhu-Liu/cp2k-input-tools | 3c84e82554bc5cde687395499e3d6f9e2b50e13b | [
"MIT"
] | null | null | null | tests/test_lsp.py | Zhu-Liu/cp2k-input-tools | 3c84e82554bc5cde687395499e3d6f9e2b50e13b | [
"MIT"
] | 1 | 2020-12-22T19:20:53.000Z | 2020-12-22T19:20:53.000Z | from pathlib import Path
from time import sleep
import io
import sys
import pytest
from . import TEST_DIR
try:
from pygls.features import INITIALIZE, TEXT_DOCUMENT_DID_OPEN
from pygls.types import DidOpenTextDocumentParams, TextDocumentItem, InitializeParams
except ImportError:
pytest.skip("pygls unavailable", allow_module_level=True)
if hasattr(sys, "pypy_version_info"):
# the LSP implementation seems to behave completely different on pypy
pytest.skip("pypy is currently not supported", allow_module_level=True)
CALL_TIMEOUT = 2
def _initialize_server(server):
server.lsp.bf_initialize(InitializeParams(process_id=1234, root_uri=Path(__file__).parent.as_uri(), capabilities=None))
def test_initialize(client_server):
"""Simple initialization of the LSP server and single request"""
client, server = client_server
root_uri = Path(__file__).parent.as_uri()
process_id = 1234
response = client.lsp.send_request(INITIALIZE, {"processId": process_id, "rootUri": root_uri, "capabilities": None}).result(
timeout=CALL_TIMEOUT
)
assert server.process_id == process_id
assert server.workspace.root_uri == root_uri
assert hasattr(response, "capabilities")
def test_text_document_did_open(client_server):
"""Check that the server opens an input file"""
client, server = client_server
_initialize_server(server)
testpath = TEST_DIR / "inputs" / "test01.inp"
with testpath.open("r") as fhandle:
content = fhandle.read()
client.lsp.notify(TEXT_DOCUMENT_DID_OPEN, DidOpenTextDocumentParams(TextDocumentItem(str(testpath), "cp2k", 1, content)))
sleep(1)
assert len(server.lsp.workspace.documents) == 1
assert "Validating CP2K input..." in client.msg
def test_text_document_did_open_error(client_server):
"""Check that the server opens an input file with a syntax error"""
client, server = client_server
_initialize_server(server)
testpath = TEST_DIR / "inputs" / "unterminated_string.inp"
with testpath.open("r") as fhandle:
content = fhandle.read()
client.lsp.notify(TEXT_DOCUMENT_DID_OPEN, DidOpenTextDocumentParams(TextDocumentItem(str(testpath), "cp2k", 1, content)))
sleep(1)
assert len(server.lsp.workspace.documents) == 1
assert "Validating CP2K input..." in client.msg
assert "Syntax error: unterminated string detected" in client.diagnostics[0].message
@pytest.mark.script_launch_mode("subprocess")
def test_cli(script_runner):
"""Simply check whether the server reacts to an exist notification"""
stdin = io.StringIO('Content-Length: 45\r\n\r\n{"method":"exit","jsonrpc":"2.0","params":{}}')
ret = script_runner.run("cp2k-language-server", stdin=stdin)
assert ret.stderr == ""
assert ret.success
| 32.952941 | 128 | 0.735809 | from pathlib import Path
from time import sleep
import io
import sys
import pytest
from . import TEST_DIR
try:
from pygls.features import INITIALIZE, TEXT_DOCUMENT_DID_OPEN
from pygls.types import DidOpenTextDocumentParams, TextDocumentItem, InitializeParams
except ImportError:
pytest.skip("pygls unavailable", allow_module_level=True)
if hasattr(sys, "pypy_version_info"):
pytest.skip("pypy is currently not supported", allow_module_level=True)
CALL_TIMEOUT = 2
def _initialize_server(server):
server.lsp.bf_initialize(InitializeParams(process_id=1234, root_uri=Path(__file__).parent.as_uri(), capabilities=None))
def test_initialize(client_server):
client, server = client_server
root_uri = Path(__file__).parent.as_uri()
process_id = 1234
response = client.lsp.send_request(INITIALIZE, {"processId": process_id, "rootUri": root_uri, "capabilities": None}).result(
timeout=CALL_TIMEOUT
)
assert server.process_id == process_id
assert server.workspace.root_uri == root_uri
assert hasattr(response, "capabilities")
def test_text_document_did_open(client_server):
client, server = client_server
_initialize_server(server)
testpath = TEST_DIR / "inputs" / "test01.inp"
with testpath.open("r") as fhandle:
content = fhandle.read()
client.lsp.notify(TEXT_DOCUMENT_DID_OPEN, DidOpenTextDocumentParams(TextDocumentItem(str(testpath), "cp2k", 1, content)))
sleep(1)
assert len(server.lsp.workspace.documents) == 1
assert "Validating CP2K input..." in client.msg
def test_text_document_did_open_error(client_server):
client, server = client_server
_initialize_server(server)
testpath = TEST_DIR / "inputs" / "unterminated_string.inp"
with testpath.open("r") as fhandle:
content = fhandle.read()
client.lsp.notify(TEXT_DOCUMENT_DID_OPEN, DidOpenTextDocumentParams(TextDocumentItem(str(testpath), "cp2k", 1, content)))
sleep(1)
assert len(server.lsp.workspace.documents) == 1
assert "Validating CP2K input..." in client.msg
assert "Syntax error: unterminated string detected" in client.diagnostics[0].message
@pytest.mark.script_launch_mode("subprocess")
def test_cli(script_runner):
stdin = io.StringIO('Content-Length: 45\r\n\r\n{"method":"exit","jsonrpc":"2.0","params":{}}')
ret = script_runner.run("cp2k-language-server", stdin=stdin)
assert ret.stderr == ""
assert ret.success
| true | true |
f726fcafaecf7a7db97b64adcecf290f5e75fcde | 862 | py | Python | emailnetwork/tests/test_graph.py | utomoreza/emailnetwork | 5b9e3532173256be6e766e216d54aaa895210adc | [
"MIT"
] | 8 | 2021-03-26T12:36:47.000Z | 2022-03-16T22:48:05.000Z | emailnetwork/tests/test_graph.py | utomoreza/emailnetwork | 5b9e3532173256be6e766e216d54aaa895210adc | [
"MIT"
] | 8 | 2021-02-20T08:47:21.000Z | 2022-01-21T10:18:50.000Z | emailnetwork/tests/test_graph.py | utomoreza/emailnetwork | 5b9e3532173256be6e766e216d54aaa895210adc | [
"MIT"
] | 17 | 2021-01-28T02:38:38.000Z | 2022-03-27T08:07:49.000Z | import os
from unittest import TestCase, mock
from emailnetwork.extract import MBoxReader
# from emailnetwork.graph import plot_single_email
import emailnetwork.graph as graph
MBOX_PATH = f'{os.path.dirname(__file__)}/test.mbox'
@mock.patch(f"{__name__}.graph.plt")
def test_plot_single_directed(mock_plt):
reader = MBoxReader(MBOX_PATH)
graph.plot_single_directed(reader, 1, True)
mock_plt.title.assert_called_once_with("Three tips to get the most out of Gmail\n Delivery date: 04/17/2020", fontdict={'fontname': 'Helvetica', 'color': 'k', 'fontweight': 'bold', 'fontsize': 8})
assert mock_plt.figure.called
class TestGraph(TestCase):
def setUp(self):
self.reader = MBoxReader(MBOX_PATH)
self.emails = self.reader.extract()
def test_single_graph(self):
# TODO: to be implemented later
pass
| 31.925926 | 200 | 0.722738 | import os
from unittest import TestCase, mock
from emailnetwork.extract import MBoxReader
import emailnetwork.graph as graph
MBOX_PATH = f'{os.path.dirname(__file__)}/test.mbox'
@mock.patch(f"{__name__}.graph.plt")
def test_plot_single_directed(mock_plt):
reader = MBoxReader(MBOX_PATH)
graph.plot_single_directed(reader, 1, True)
mock_plt.title.assert_called_once_with("Three tips to get the most out of Gmail\n Delivery date: 04/17/2020", fontdict={'fontname': 'Helvetica', 'color': 'k', 'fontweight': 'bold', 'fontsize': 8})
assert mock_plt.figure.called
class TestGraph(TestCase):
def setUp(self):
self.reader = MBoxReader(MBOX_PATH)
self.emails = self.reader.extract()
def test_single_graph(self):
pass
| true | true |
f726fcb5e7e57b3c5f279ecd143cbfc0329a5cc9 | 5,866 | py | Python | globus_cli/parsing/command_state.py | glentner/globus-cli | a6542d6824cc123f60088bf2602cd7a0fdb0e64e | [
"Apache-2.0"
] | null | null | null | globus_cli/parsing/command_state.py | glentner/globus-cli | a6542d6824cc123f60088bf2602cd7a0fdb0e64e | [
"Apache-2.0"
] | null | null | null | globus_cli/parsing/command_state.py | glentner/globus-cli | a6542d6824cc123f60088bf2602cd7a0fdb0e64e | [
"Apache-2.0"
] | null | null | null | import warnings
import click
import jmespath
from globus_cli import config
# Format Enum for output formatting
# could use a namedtuple, but that's overkill
JSON_FORMAT = "json"
TEXT_FORMAT = "text"
UNIX_FORMAT = "unix"
class CommandState:
def __init__(self):
# default is config value, or TEXT if it's not set
self.output_format = config.get_output_format() or TEXT_FORMAT
# a jmespath expression to process on the json output
self.jmespath_expr = None
# default is always False
self.debug = False
# default is 0
self.verbosity = 0
# by default, empty dict
self.http_status_map = {}
def outformat_is_text(self):
return self.output_format == TEXT_FORMAT
def outformat_is_json(self):
return self.output_format == JSON_FORMAT
def outformat_is_unix(self):
return self.output_format == UNIX_FORMAT
def is_verbose(self):
return self.verbosity > 0
def format_option(f):
def callback(ctx, param, value):
if not value:
return
state = ctx.ensure_object(CommandState)
# when a jmespath expr is set, ignore --format=text
if value == TEXT_FORMAT and state.jmespath_expr:
return
state.output_format = value.lower()
def jmespath_callback(ctx, param, value):
if value is None:
return
state = ctx.ensure_object(CommandState)
state.jmespath_expr = jmespath.compile(value)
if state.output_format == TEXT_FORMAT:
state.output_format = JSON_FORMAT
f = click.option(
"-F",
"--format",
type=click.Choice(
[UNIX_FORMAT, JSON_FORMAT, TEXT_FORMAT], case_sensitive=False
),
help="Output format for stdout. Defaults to text",
expose_value=False,
callback=callback,
)(f)
f = click.option(
"--jmespath",
"--jq",
help=(
"A JMESPath expression to apply to json output. "
"Takes precedence over any specified '--format' and forces "
"the format to be json processed by this expression"
),
expose_value=False,
callback=jmespath_callback,
)(f)
return f
def debug_option(f):
def callback(ctx, param, value):
if not value or ctx.resilient_parsing:
# turn off warnings altogether
warnings.simplefilter("ignore")
return
warnings.simplefilter("default")
state = ctx.ensure_object(CommandState)
state.debug = True
config.setup_logging(level="DEBUG")
return click.option(
"--debug",
is_flag=True,
hidden=True,
expose_value=False,
callback=callback,
is_eager=True,
)(f)
def verbose_option(f):
def callback(ctx, param, value):
# set state verbosity value from option
state = ctx.ensure_object(CommandState)
state.verbosity = value
# no verbosity
# all warnings are ignored
# logging is not turned on
if value == 0:
warnings.simplefilter("ignore")
# verbosity level 1
# warnings set to once
# logging set to error
if value == 1:
warnings.simplefilter("once")
config.setup_logging(level="ERROR")
# verbosity level 2
# warnings set to default
# logging set to info
if value == 2:
warnings.simplefilter("default")
config.setup_logging(level="INFO")
# verbosity level 3+
# warnings set to always
# logging set to debug
# sets debug flag to true
if value >= 3:
warnings.simplefilter("always")
state.debug = True
config.setup_logging(level="DEBUG")
return click.option(
"--verbose",
"-v",
count=True,
expose_value=False,
callback=callback,
is_eager=True,
help="Control level of output",
)(f)
def map_http_status_option(f):
exit_stat_set = [0, 1] + list(range(50, 100))
def per_val_callback(ctx, value):
if value is None:
return None
state = ctx.ensure_object(CommandState)
try:
# we may be given a comma-delimited list of values
# any cases of empty strings are dropped
pairs = [x for x in (y.strip() for y in value.split(",")) if len(x)]
# iterate over those pairs, splitting them on `=` signs
for http_stat, exit_stat in (pair.split("=") for pair in pairs):
# "parse" as ints
http_stat, exit_stat = int(http_stat), int(exit_stat)
# force into the desired range
if exit_stat not in exit_stat_set:
raise ValueError()
# map the status
state.http_status_map[http_stat] = exit_stat
# two conditions can cause ValueError: split didn't give right number
# of args, or results weren't int()-able
except ValueError:
raise click.UsageError(
"--map-http-status must have an argument of the form "
'"INT=INT,INT=INT,..." and values of exit codes must be in '
"0,1,50-99"
)
def callback(ctx, param, value):
"""
Wrap the per-value callback -- multiple=True means that the value is
always a tuple of given vals.
"""
for v in value:
per_val_callback(ctx, v)
return click.option(
"--map-http-status",
help=(
"Map HTTP statuses to any of these exit codes: 0,1,50-99. "
'e.g. "404=50,403=51"'
),
expose_value=False,
callback=callback,
multiple=True,
)(f)
| 28.896552 | 80 | 0.579782 | import warnings
import click
import jmespath
from globus_cli import config
JSON_FORMAT = "json"
TEXT_FORMAT = "text"
UNIX_FORMAT = "unix"
class CommandState:
def __init__(self):
# default is config value, or TEXT if it's not set
self.output_format = config.get_output_format() or TEXT_FORMAT
self.jmespath_expr = None
self.debug = False
self.verbosity = 0
self.http_status_map = {}
def outformat_is_text(self):
return self.output_format == TEXT_FORMAT
def outformat_is_json(self):
return self.output_format == JSON_FORMAT
def outformat_is_unix(self):
return self.output_format == UNIX_FORMAT
def is_verbose(self):
return self.verbosity > 0
def format_option(f):
def callback(ctx, param, value):
if not value:
return
state = ctx.ensure_object(CommandState)
if value == TEXT_FORMAT and state.jmespath_expr:
return
state.output_format = value.lower()
def jmespath_callback(ctx, param, value):
if value is None:
return
state = ctx.ensure_object(CommandState)
state.jmespath_expr = jmespath.compile(value)
if state.output_format == TEXT_FORMAT:
state.output_format = JSON_FORMAT
f = click.option(
"-F",
"--format",
type=click.Choice(
[UNIX_FORMAT, JSON_FORMAT, TEXT_FORMAT], case_sensitive=False
),
help="Output format for stdout. Defaults to text",
expose_value=False,
callback=callback,
)(f)
f = click.option(
"--jmespath",
"--jq",
help=(
"A JMESPath expression to apply to json output. "
"Takes precedence over any specified '--format' and forces "
"the format to be json processed by this expression"
),
expose_value=False,
callback=jmespath_callback,
)(f)
return f
def debug_option(f):
def callback(ctx, param, value):
if not value or ctx.resilient_parsing:
warnings.simplefilter("ignore")
return
warnings.simplefilter("default")
state = ctx.ensure_object(CommandState)
state.debug = True
config.setup_logging(level="DEBUG")
return click.option(
"--debug",
is_flag=True,
hidden=True,
expose_value=False,
callback=callback,
is_eager=True,
)(f)
def verbose_option(f):
def callback(ctx, param, value):
state = ctx.ensure_object(CommandState)
state.verbosity = value
if value == 0:
warnings.simplefilter("ignore")
if value == 1:
warnings.simplefilter("once")
config.setup_logging(level="ERROR")
if value == 2:
warnings.simplefilter("default")
config.setup_logging(level="INFO")
if value >= 3:
warnings.simplefilter("always")
state.debug = True
config.setup_logging(level="DEBUG")
return click.option(
"--verbose",
"-v",
count=True,
expose_value=False,
callback=callback,
is_eager=True,
help="Control level of output",
)(f)
def map_http_status_option(f):
exit_stat_set = [0, 1] + list(range(50, 100))
def per_val_callback(ctx, value):
if value is None:
return None
state = ctx.ensure_object(CommandState)
try:
pairs = [x for x in (y.strip() for y in value.split(",")) if len(x)]
for http_stat, exit_stat in (pair.split("=") for pair in pairs):
http_stat, exit_stat = int(http_stat), int(exit_stat)
if exit_stat not in exit_stat_set:
raise ValueError()
state.http_status_map[http_stat] = exit_stat
# of args, or results weren't int()-able
except ValueError:
raise click.UsageError(
"--map-http-status must have an argument of the form "
'"INT=INT,INT=INT,..." and values of exit codes must be in '
"0,1,50-99"
)
def callback(ctx, param, value):
for v in value:
per_val_callback(ctx, v)
return click.option(
"--map-http-status",
help=(
"Map HTTP statuses to any of these exit codes: 0,1,50-99. "
'e.g. "404=50,403=51"'
),
expose_value=False,
callback=callback,
multiple=True,
)(f)
| true | true |
f726fe1931108c84f05c321fc08cb81032045981 | 272 | py | Python | accounts/views.py | Monkasen/blog_project | fac6618007d03e4f127f0c0c302a90595054ff12 | [
"CC0-1.0"
] | null | null | null | accounts/views.py | Monkasen/blog_project | fac6618007d03e4f127f0c0c302a90595054ff12 | [
"CC0-1.0"
] | null | null | null | accounts/views.py | Monkasen/blog_project | fac6618007d03e4f127f0c0c302a90595054ff12 | [
"CC0-1.0"
] | null | null | null | from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse_lazy
from django.views import generic
class SignUpView(generic.CreateView):
form_class = UserCreationForm
success_url = reverse_lazy('login')
template_name = 'signup.html'
| 30.222222 | 54 | 0.797794 | from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse_lazy
from django.views import generic
class SignUpView(generic.CreateView):
form_class = UserCreationForm
success_url = reverse_lazy('login')
template_name = 'signup.html'
| true | true |
f726fee2b9520f0732bc657c2498044fa21cf593 | 6,213 | py | Python | human_eval.py | nlindqv/pytorch_RVAE | d9e58134965f69aad557fb3bd2478500a51210f8 | [
"MIT"
] | null | null | null | human_eval.py | nlindqv/pytorch_RVAE | d9e58134965f69aad557fb3bd2478500a51210f8 | [
"MIT"
] | null | null | null | human_eval.py | nlindqv/pytorch_RVAE | d9e58134965f69aad557fb3bd2478500a51210f8 | [
"MIT"
] | null | null | null | import argparse
import os
import pandas as pd
import numpy as np
import torch as t
from torch.optim import Adam
import pickle5 as pickle
import json
import random
from sample import sample_with_input, sample_with_beam
from utils.batch_loader import BatchLoader, clean_str
from model.paraphraser import Paraphraser
from model.generator import Generator
from synonym_paraphraser import SynonymParaphraser
def main():
parser = argparse.ArgumentParser(description='Paraphraser')
parser.add_argument('--use-cuda', type=bool, default=False, metavar='CUDA', help='use cuda (default: False)')
parser.add_argument('--seq-len', default=30, metavar='SL', help='max length of sequence (default: 30)')
parser.add_argument('--ml', type=bool, default=True, metavar='ML', help='sample by maximum likelihood')
args = parser.parse_args()
# Read data
if not os.path.exists('datasets/human_test.csv'):
source_file = 'datasets/test.csv'
source_data = pd.read_csv(source_file)[['question1', 'question2']]
sentence_categories = [[] for _ in range(5)]
for i in range(len(source_data)):
sent = clean_str(source_data['question1'][i])
sent_len = len(sent.split())
if sent_len < 6:
j = 0
elif sent_len < 11:
j = 1
elif sent_len < 16:
j = 2
elif sent_len < 21:
j = 3
else:
j = 4
sentence_categories[j].append([source_data['question1'][i], source_data['question2'][i]])
sample_data = []
for category in sentence_categories:
sample_data += random.sample(category, 20)
source_data = pd.DataFrame(sample_data, columns=['question1', 'question2'])
source_data.to_csv('datasets/human_test.csv')
else:
source_data = pd.read_csv('datasets/human_test_1.csv')[['question1', 'question2']]
# Sample from Guptas original model
batch_loader = BatchLoader()
from model.parameters import Parameters
parameters = Parameters(batch_loader.max_seq_len, batch_loader.vocab_size)
paraphraser = Paraphraser(parameters)
paraphraser.load_state_dict(t.load('saved_models/trained_paraphraser_ori_32', map_location=t.device('cpu')))
samples_ori, target, source_ori = sample_with_input(batch_loader, paraphraser, args,
decoder_only=True,
file_name='datasets/human_test.csv')
ref_items = generate_items(source_ori, target, 'ref')
ori_items = generate_items(source_ori, samples_ori[0], 'ori')
# Sample from Guptas model with two-path-loss
batch_loader = BatchLoader()
parameters = Parameters(batch_loader.max_seq_len, batch_loader.vocab_size, use_two_path_loss=True)
paraphraser = Paraphraser(parameters)
paraphraser.load_state_dict(t.load('saved_models/trained_paraphraser_tpl_16_32', map_location=t.device('cpu')))
samples_tpl, target, source_tpl = sample_with_input(batch_loader, paraphraser, args,
decoder_only=False,
file_name='datasets/human_test.csv')
tpl_items = generate_items(source_tpl, samples_tpl[0], 'tpl')
# Sample from GAN model
batch_loader = BatchLoader()
from model.parametersGAN import Parameters
parameters = Parameters(batch_loader.max_seq_len, batch_loader.vocab_size)
paraphraser = Generator(parameters)
paraphraser.load_state_dict(t.load('saved_models/trained_generator_gan_140k', map_location=t.device('cpu')))
samples_gan, target, source_gan = sample_with_input(batch_loader, paraphraser, args,
decoder_only=False,
file_name='datasets/human_test.csv')
gan_items = generate_items(source_gan, samples_gan[0], 'gan')
# Sample from synonym model
paraphraser = SynonymParaphraser()
samples_synonym = paraphraser.generate_paraphrases('datasets/human_test.csv')
base_items = generate_items(source_data['question1'], samples_synonym, 'base')
all_items = ref_items + ori_items + tpl_items + gan_items + base_items
eval_results = {'name' : 'Paraphrase Survey Full Ordered', 'items' : all_items}
res = json.dumps(eval_results, ensure_ascii=False)
with open('datasets/human_test_ordered.json', 'w') as f:
f.write(res)
random.shuffle(all_items)
eval_results = {'name' : 'Paraphrase Survey Full Shuffled', 'items' : all_items}
res = json.dumps(eval_results, ensure_ascii=False)
with open('datasets/human_test_shuffled.json', 'w') as f:
f.write(res)
for i in range(10):
eval_results = {'name' : f'Paraphrase Survey Part {i+1}/{10}', 'items' : all_items[i*50:((i+1)*50)-1]}
res = json.dumps(eval_results, ensure_ascii=False)
with open(f'datasets/human_test_p_{i}_{10}.json', 'w') as f:
f.write(res)
def generate_items(original, paraphrase, model):
items = []
for i in range(len(original)):
questions = 'Fråga 1: ' + original[i] + '?<br>Fråga 2: ' + paraphrase[i] + '?'
item = {
'question' : questions,
'required' : True,
'extra' : {'model' : model},
'order': -1,
'answer_sets' : [
{
"type": "radio",
"name": "Fråga 1 är grammatiskt korrekt: ",
"choices": [ "0", "1", "2", "3"]
},
{
"type": "radio",
"name": "Fråga 2 är grammatiskt korrekt: ",
"choices": [ "0", "1", "2", "3"]
},
{
"type": "radio",
"name": "Fråga 2 är betyder samma sak som Fråga 1: ",
"choices": [ "0", "1", "2", "3"]
}]
}
items.append(item)
return items
if __name__ == '__main__':
main()
| 40.607843 | 116 | 0.597779 | import argparse
import os
import pandas as pd
import numpy as np
import torch as t
from torch.optim import Adam
import pickle5 as pickle
import json
import random
from sample import sample_with_input, sample_with_beam
from utils.batch_loader import BatchLoader, clean_str
from model.paraphraser import Paraphraser
from model.generator import Generator
from synonym_paraphraser import SynonymParaphraser
def main():
parser = argparse.ArgumentParser(description='Paraphraser')
parser.add_argument('--use-cuda', type=bool, default=False, metavar='CUDA', help='use cuda (default: False)')
parser.add_argument('--seq-len', default=30, metavar='SL', help='max length of sequence (default: 30)')
parser.add_argument('--ml', type=bool, default=True, metavar='ML', help='sample by maximum likelihood')
args = parser.parse_args()
if not os.path.exists('datasets/human_test.csv'):
source_file = 'datasets/test.csv'
source_data = pd.read_csv(source_file)[['question1', 'question2']]
sentence_categories = [[] for _ in range(5)]
for i in range(len(source_data)):
sent = clean_str(source_data['question1'][i])
sent_len = len(sent.split())
if sent_len < 6:
j = 0
elif sent_len < 11:
j = 1
elif sent_len < 16:
j = 2
elif sent_len < 21:
j = 3
else:
j = 4
sentence_categories[j].append([source_data['question1'][i], source_data['question2'][i]])
sample_data = []
for category in sentence_categories:
sample_data += random.sample(category, 20)
source_data = pd.DataFrame(sample_data, columns=['question1', 'question2'])
source_data.to_csv('datasets/human_test.csv')
else:
source_data = pd.read_csv('datasets/human_test_1.csv')[['question1', 'question2']]
batch_loader = BatchLoader()
from model.parameters import Parameters
parameters = Parameters(batch_loader.max_seq_len, batch_loader.vocab_size)
paraphraser = Paraphraser(parameters)
paraphraser.load_state_dict(t.load('saved_models/trained_paraphraser_ori_32', map_location=t.device('cpu')))
samples_ori, target, source_ori = sample_with_input(batch_loader, paraphraser, args,
decoder_only=True,
file_name='datasets/human_test.csv')
ref_items = generate_items(source_ori, target, 'ref')
ori_items = generate_items(source_ori, samples_ori[0], 'ori')
batch_loader = BatchLoader()
parameters = Parameters(batch_loader.max_seq_len, batch_loader.vocab_size, use_two_path_loss=True)
paraphraser = Paraphraser(parameters)
paraphraser.load_state_dict(t.load('saved_models/trained_paraphraser_tpl_16_32', map_location=t.device('cpu')))
samples_tpl, target, source_tpl = sample_with_input(batch_loader, paraphraser, args,
decoder_only=False,
file_name='datasets/human_test.csv')
tpl_items = generate_items(source_tpl, samples_tpl[0], 'tpl')
batch_loader = BatchLoader()
from model.parametersGAN import Parameters
parameters = Parameters(batch_loader.max_seq_len, batch_loader.vocab_size)
paraphraser = Generator(parameters)
paraphraser.load_state_dict(t.load('saved_models/trained_generator_gan_140k', map_location=t.device('cpu')))
samples_gan, target, source_gan = sample_with_input(batch_loader, paraphraser, args,
decoder_only=False,
file_name='datasets/human_test.csv')
gan_items = generate_items(source_gan, samples_gan[0], 'gan')
paraphraser = SynonymParaphraser()
samples_synonym = paraphraser.generate_paraphrases('datasets/human_test.csv')
base_items = generate_items(source_data['question1'], samples_synonym, 'base')
all_items = ref_items + ori_items + tpl_items + gan_items + base_items
eval_results = {'name' : 'Paraphrase Survey Full Ordered', 'items' : all_items}
res = json.dumps(eval_results, ensure_ascii=False)
with open('datasets/human_test_ordered.json', 'w') as f:
f.write(res)
random.shuffle(all_items)
eval_results = {'name' : 'Paraphrase Survey Full Shuffled', 'items' : all_items}
res = json.dumps(eval_results, ensure_ascii=False)
with open('datasets/human_test_shuffled.json', 'w') as f:
f.write(res)
for i in range(10):
eval_results = {'name' : f'Paraphrase Survey Part {i+1}/{10}', 'items' : all_items[i*50:((i+1)*50)-1]}
res = json.dumps(eval_results, ensure_ascii=False)
with open(f'datasets/human_test_p_{i}_{10}.json', 'w') as f:
f.write(res)
def generate_items(original, paraphrase, model):
items = []
for i in range(len(original)):
questions = 'Fråga 1: ' + original[i] + '?<br>Fråga 2: ' + paraphrase[i] + '?'
item = {
'question' : questions,
'required' : True,
'extra' : {'model' : model},
'order': -1,
'answer_sets' : [
{
"type": "radio",
"name": "Fråga 1 är grammatiskt korrekt: ",
"choices": [ "0", "1", "2", "3"]
},
{
"type": "radio",
"name": "Fråga 2 är grammatiskt korrekt: ",
"choices": [ "0", "1", "2", "3"]
},
{
"type": "radio",
"name": "Fråga 2 är betyder samma sak som Fråga 1: ",
"choices": [ "0", "1", "2", "3"]
}]
}
items.append(item)
return items
if __name__ == '__main__':
main()
| true | true |
f726fef4bfca13a95ea4893f0812a453b7a6ce20 | 727 | py | Python | setup.py | krajasek/pyjama | e8cfd7ac07cfca37a73f8060ff28867a0e35909e | [
"MIT"
] | null | null | null | setup.py | krajasek/pyjama | e8cfd7ac07cfca37a73f8060ff28867a0e35909e | [
"MIT"
] | null | null | null | setup.py | krajasek/pyjama | e8cfd7ac07cfca37a73f8060ff28867a0e35909e | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from pyjamaparty.strutils.string_builder import StringBuilder
description = 'Set of casual python utilities'
long_description = StringBuilder('{}, written standing on shoulders of giants.'.format(description))
long_description += ' Tools include a string builder, singleton decorator'
requirements = []
setup(
name='pyjamaparty',
version='0.2',
description=description,
license="MIT",
long_description=str(long_description),
author='Karthik Rajasekaran',
author_email='krajasek@gmail.com',
url="http://github.com/krajasek/pyjamaparty",
install_requires=requirements,
packages=find_packages(exclude=('pyjamaparty.tests',)),
python_requires='>=2.7'
) | 34.619048 | 100 | 0.763411 | from setuptools import setup, find_packages
from pyjamaparty.strutils.string_builder import StringBuilder
description = 'Set of casual python utilities'
long_description = StringBuilder('{}, written standing on shoulders of giants.'.format(description))
long_description += ' Tools include a string builder, singleton decorator'
requirements = []
setup(
name='pyjamaparty',
version='0.2',
description=description,
license="MIT",
long_description=str(long_description),
author='Karthik Rajasekaran',
author_email='krajasek@gmail.com',
url="http://github.com/krajasek/pyjamaparty",
install_requires=requirements,
packages=find_packages(exclude=('pyjamaparty.tests',)),
python_requires='>=2.7'
) | true | true |
f726ff12eef650ff5b72b0281b3558b574845521 | 2,507 | py | Python | app.py | jleclanche/quassel-weblog | 127de4f13f61e424fad4e33c89c288a64cef9b61 | [
"MIT"
] | 5 | 2016-08-08T17:32:52.000Z | 2019-06-04T13:21:18.000Z | app.py | quassel/quassel-weblog | 127de4f13f61e424fad4e33c89c288a64cef9b61 | [
"MIT"
] | null | null | null | app.py | quassel/quassel-weblog | 127de4f13f61e424fad4e33c89c288a64cef9b61 | [
"MIT"
] | null | null | null | import hashlib
import re
from datetime import date, timedelta
from flask import Flask, render_template, request, abort
from jinja2.utils import urlize
from sqlalchemy import asc, desc
from sqlalchemy.orm import joinedload
from quassel import quassel_session, Message, Buffer, Sender, Network
import settings
app = Flask(__name__)
app.config["PROPAGATE_EXCEPTIONS"] = True
## Quassel Connection
session = quassel_session(settings.uri)
def hash_nick(nick):
hash = hashlib.sha1(nick.encode("utf-8"))
return int(hash.hexdigest(), 16)
def process_message(message):
# NOTE: Working around jinja2.utils.urlize being far too greedy on matches
if not message:
return ""
message = message.replace("\x0f", " \x0f")
message = urlize(message)
message = message.replace(" \x0f", "\x0f")
message = re.sub("\x03(\\d\\d)", r'<span class="color\1">', message)
message = message.replace("\x03", "</span>")
message = message.replace("\x0f", "</b></em></u></span>") # Nasty.
while "\x02" in message:
message = message.replace("\x02", "<b>", 1)
message = message.replace("\x02", "</b>", 1)
while "\x1d" in message:
message = message.replace("\x1d", "<em>", 1)
message = message.replace("\x1d", "</em>", 1)
while "\x1f" in message:
message = message.replace("\x1f", "<u>", 1)
message = message.replace("\x1f", "</u>", 1)
return message
@app.route("/<name>/")
def channel_index(name):
if name not in settings.channels:
abort(404)
days = request.args.get("days", "")
if days.isdigit():
days = min(int(days), 200)
else:
days = settings.days
query = session.query(Message).join(Sender)
query = query.order_by(asc(Message.time))
query = query.filter(Message.time >= date.today() - timedelta(days))
#query = query.options(joinedload(Message.sender))
#query = query.options(joinedload(Message.buffer))
query = query.join(Message.buffer)
query = query.filter(Buffer.userid == 1)
channel_name = "#" + name # XXX
query = query.filter(Buffer.name == channel_name)
nick = request.args.get("nick")
if nick:
query = query.filter(Sender.name.startswith(nick))
search = request.args.get("search")
if search:
query = query.filter(Message.message.contains(search))
context = {
"channel": channel_name,
"highlight": request.args.get("highlight", "").lower(),
"messages": list(query),
"hash": hash_nick,
"process_message": process_message,
}
return render_template("backlog.html", **context)
if __name__ == "__main__":
app.debug = True
app.run()
session.close()
| 28.168539 | 75 | 0.691264 | import hashlib
import re
from datetime import date, timedelta
from flask import Flask, render_template, request, abort
from jinja2.utils import urlize
from sqlalchemy import asc, desc
from sqlalchemy.orm import joinedload
from quassel import quassel_session, Message, Buffer, Sender, Network
import settings
app = Flask(__name__)
app.config["PROPAGATE_EXCEPTIONS"] = True
ession(settings.uri)
def hash_nick(nick):
hash = hashlib.sha1(nick.encode("utf-8"))
return int(hash.hexdigest(), 16)
def process_message(message):
if not message:
return ""
message = message.replace("\x0f", " \x0f")
message = urlize(message)
message = message.replace(" \x0f", "\x0f")
message = re.sub("\x03(\\d\\d)", r'<span class="color\1">', message)
message = message.replace("\x03", "</span>")
message = message.replace("\x0f", "</b></em></u></span>")
while "\x02" in message:
message = message.replace("\x02", "<b>", 1)
message = message.replace("\x02", "</b>", 1)
while "\x1d" in message:
message = message.replace("\x1d", "<em>", 1)
message = message.replace("\x1d", "</em>", 1)
while "\x1f" in message:
message = message.replace("\x1f", "<u>", 1)
message = message.replace("\x1f", "</u>", 1)
return message
@app.route("/<name>/")
def channel_index(name):
if name not in settings.channels:
abort(404)
days = request.args.get("days", "")
if days.isdigit():
days = min(int(days), 200)
else:
days = settings.days
query = session.query(Message).join(Sender)
query = query.order_by(asc(Message.time))
query = query.filter(Message.time >= date.today() - timedelta(days))
query = query.join(Message.buffer)
query = query.filter(Buffer.userid == 1)
channel_name = "#" + name
query = query.filter(Buffer.name == channel_name)
nick = request.args.get("nick")
if nick:
query = query.filter(Sender.name.startswith(nick))
search = request.args.get("search")
if search:
query = query.filter(Message.message.contains(search))
context = {
"channel": channel_name,
"highlight": request.args.get("highlight", "").lower(),
"messages": list(query),
"hash": hash_nick,
"process_message": process_message,
}
return render_template("backlog.html", **context)
if __name__ == "__main__":
app.debug = True
app.run()
session.close()
| true | true |
f727011bf8d2cc213c21de27b98b3b27c47d249a | 520 | py | Python | tests/nnapi/specs/V1_2/reduce_any_2D_nnfw.mod.py | bogus-sudo/ONE-1 | 7052a817eff661ec2854ed2e7ee0de5e8ba82b55 | [
"Apache-2.0"
] | 255 | 2020-05-22T07:45:29.000Z | 2022-03-29T23:58:22.000Z | tests/nnapi/specs/V1_2/reduce_any_2D_nnfw.mod.py | bogus-sudo/ONE-1 | 7052a817eff661ec2854ed2e7ee0de5e8ba82b55 | [
"Apache-2.0"
] | 5,102 | 2020-05-22T07:48:33.000Z | 2022-03-31T23:43:39.000Z | tests/nnapi/specs/V1_2/reduce_any_2D_nnfw.mod.py | bogus-sudo/ONE-1 | 7052a817eff661ec2854ed2e7ee0de5e8ba82b55 | [
"Apache-2.0"
] | 120 | 2020-05-22T07:51:08.000Z | 2022-02-16T19:08:05.000Z | # model
model = Model()
i1 = Input("input", "TENSOR_BOOL8", "{3, 4}")
axis = Int32Scalar("axis", 1)
keepDims = False
out1 = Output("output", "TENSOR_BOOL8", "{3}")
model = model.Operation("REDUCE_ANY", i1, axis, keepDims).To(out1)
# Example 1. Input in operand 0, 1
input0 = {i1: # input 0
[False, False, False, False,
False, True, False, False,
True, False, True, False]}
output0 = {out1: # output 0
[False, True, True]}
# Instantiate an example
Example((input0, output0))
| 26 | 66 | 0.611538 |
model = Model()
i1 = Input("input", "TENSOR_BOOL8", "{3, 4}")
axis = Int32Scalar("axis", 1)
keepDims = False
out1 = Output("output", "TENSOR_BOOL8", "{3}")
model = model.Operation("REDUCE_ANY", i1, axis, keepDims).To(out1)
input0 = {i1:
[False, False, False, False,
False, True, False, False,
True, False, True, False]}
output0 = {out1:
[False, True, True]}
Example((input0, output0))
| true | true |
f727017762f29818a9fcaf162bb13d318487b8a6 | 1,219 | py | Python | var/spack/repos/builtin/packages/relax/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/relax/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/relax/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Relax(CMakePackage):
"""A set of Reflex libraries for the most common used general data types in
the LHC Computing Grid"""
homepage = "https://twiki.cern.ch/twiki/bin/view/LCG/RELAX"
url = "http://lcgpackages.web.cern.ch/lcgpackages/tarFiles/sources/RELAX-1.tar.gz"
tags = ['hep']
version('root6', sha256='1d24b1a0884bbe99d60f7d02fea45d59695c158ab5e53516ac3fb780eb460bb4')
depends_on('clhep')
depends_on('gsl')
depends_on('hepmc@:2')
depends_on('root@6.0.0:')
def cmake_args(self):
spec = self.spec
cxxstd = self.spec['root'].variants['cxxstd'].value
hepmc_lib = spec['hepmc'].prefix.lib.join('libHepMC.so')
args = [
'-DCMAKE_CXX_STANDARD={0}'.format(cxxstd),
'-DROOT_BINARY_PATH={0}'.format(spec['root'].prefix.bin),
'-DHEPMC_INCLUDE_DIR={0}'.format(spec['hepmc'].prefix.include),
'-DHEPMC_LIBRARIES={0}'.format(hepmc_lib)
]
return args
| 32.078947 | 95 | 0.656276 |
from spack import *
class Relax(CMakePackage):
homepage = "https://twiki.cern.ch/twiki/bin/view/LCG/RELAX"
url = "http://lcgpackages.web.cern.ch/lcgpackages/tarFiles/sources/RELAX-1.tar.gz"
tags = ['hep']
version('root6', sha256='1d24b1a0884bbe99d60f7d02fea45d59695c158ab5e53516ac3fb780eb460bb4')
depends_on('clhep')
depends_on('gsl')
depends_on('hepmc@:2')
depends_on('root@6.0.0:')
def cmake_args(self):
spec = self.spec
cxxstd = self.spec['root'].variants['cxxstd'].value
hepmc_lib = spec['hepmc'].prefix.lib.join('libHepMC.so')
args = [
'-DCMAKE_CXX_STANDARD={0}'.format(cxxstd),
'-DROOT_BINARY_PATH={0}'.format(spec['root'].prefix.bin),
'-DHEPMC_INCLUDE_DIR={0}'.format(spec['hepmc'].prefix.include),
'-DHEPMC_LIBRARIES={0}'.format(hepmc_lib)
]
return args
| true | true |
f72701a8444dcb76142a4a452fafb56971989631 | 4,930 | py | Python | Fashion_Test.py | denis19973/Keras-RFCN | e62670c2e01ac1e942f513d324642cf8d6aee368 | [
"MIT"
] | 88 | 2018-05-04T08:04:02.000Z | 2022-01-05T02:57:28.000Z | Fashion_Test.py | denis19973/Keras-RFCN | e62670c2e01ac1e942f513d324642cf8d6aee368 | [
"MIT"
] | 16 | 2018-07-03T11:58:51.000Z | 2021-07-12T04:49:05.000Z | Fashion_Test.py | mitulrm/FaceRFCN | 5e1fdaf197b3a93c22a82d9476a3f9a1c804e398 | [
"MIT"
] | 33 | 2018-05-04T08:02:32.000Z | 2022-01-09T14:39:06.000Z | """
Keras RFCN
Copyright (c) 2018
Licensed under the MIT License (see LICENSE for details)
Written by parap1uie-s@github.com
"""
'''
This is a demo to Eval a RFCN model with DeepFashion Dataset
http://mmlab.ie.cuhk.edu.hk/projects/DeepFashion.html
'''
from KerasRFCN.Model.Model import RFCN_Model
from KerasRFCN.Config import Config
import KerasRFCN.Utils
import os
from keras.preprocessing import image
import pickle
import numpy as np
import argparse
import matplotlib.pyplot as plt
import matplotlib.patches as patches
class RFCNNConfig(Config):
"""Configuration for training on the toy shapes dataset.
Derives from the base Config class and overrides values specific
to the toy shapes dataset.
"""
# Give the configuration a recognizable name
NAME = "Fashion"
# Backbone model
# choose one from ['resnet50', 'resnet101', 'resnet50_dilated', 'resnet101_dilated']
BACKBONE = "resnet101"
# Train on 1 GPU and 8 images per GPU. We can put multiple images on each
# GPU because the images are small. Batch size is 8 (GPUs * images/GPU).
GPU_COUNT = 1
IMAGES_PER_GPU = 1
# Number of classes (including background)
C = 1 + 46 # background + 2 tags
NUM_CLASSES = C
# Use small images for faster training. Set the limits of the small side
# the large side, and that determines the image shape.
IMAGE_MIN_DIM = 640
IMAGE_MAX_DIM = 768
# Use smaller anchors because our image and objects are small
RPN_ANCHOR_SCALES = (32, 64, 128, 256, 512) # anchor side in pixels
# Use same strides on stage 4-6 if use dilated resnet of DetNet
# Like BACKBONE_STRIDES = [4, 8, 16, 16, 16]
BACKBONE_STRIDES = [4, 8, 16, 32, 64]
# Reduce training ROIs per image because the images are small and have
# few objects. Aim to allow ROI sampling to pick 33% positive ROIs.
TRAIN_ROIS_PER_IMAGE = 200
# Use a small epoch since the data is simple
STEPS_PER_EPOCH = 100
# use small validation steps since the epoch is small
VALIDATION_STEPS = 5
RPN_NMS_THRESHOLD = 0.7
DETECTION_MIN_CONFIDENCE = 0.4
POOL_SIZE = 7
def Test(model, loadpath, savepath):
assert not loadpath == savepath, "loadpath should'n same with savepath"
model_path = model.find_last()[1]
# Load trained weights (fill in path to trained weights here)
model.load_weights(model_path, by_name=True)
print("Loading weights from ", model_path)
if os.path.isdir(loadpath):
for idx, imgname in enumerate(os.listdir(loadpath)):
if not imgname.lower().endswith(('.bmp', '.jpeg', '.jpg', '.png', '.tif', '.tiff')):
continue
print(imgname)
imageoriChannel = np.array(plt.imread( os.path.join(loadpath, imgname) )) / 255.0
img = image.img_to_array( image.load_img(os.path.join(loadpath, imgname)) )
TestSinglePic(img, imageoriChannel, model, savepath=savepath, imgname=imgname)
elif os.path.isfile(loadpath):
if not loadpath.lower().endswith(('.bmp', '.jpeg', '.jpg', '.png', '.tif', '.tiff')):
print("not image file!")
return
print(loadpath)
imageoriChannel = np.array(plt.imread( loadpath )) / 255.0
img = image.img_to_array( image.load_img(loadpath) )
(filename,extension) = os.path.splitext(loadpath)
TestSinglePic(img, imageoriChannel, model, savepath=savepath, imgname=filename)
def TestSinglePic(image, image_ori, model, savepath, imgname):
r = model.detect([image], verbose=1)[0]
print(r)
def get_ax(rows=1, cols=1, size=8):
_, ax = plt.subplots(rows, cols, figsize=(size*cols, size*rows))
return ax
ax = get_ax(1)
assert not savepath == "", "empty save path"
assert not imgname == "", "empty image file name"
for box in r['rois']:
y1, x1, y2, x2 = box
p = patches.Rectangle((x1, y1), x2 - x1, y2 - y1, linewidth=2,
alpha=0.7, linestyle="dashed",
edgecolor="red", facecolor='none')
ax.add_patch(p)
ax.imshow(image_ori)
plt.savefig(os.path.join(savepath, imgname),bbox_inches='tight')
plt.clf()
if __name__ == '__main__':
ROOT_DIR = os.getcwd()
parser = argparse.ArgumentParser()
parser.add_argument('--loadpath', required=False,
default="images/",
metavar="evaluate images loadpath",
help="evaluate images loadpath")
parser.add_argument('--savepath', required=False,
default="result/",
metavar="evaluate images savepath",
help="evaluate images savepath")
config = RFCNNConfig()
args = parser.parse_args()
model = RFCN_Model(mode="inference", config=config,
model_dir=os.path.join(ROOT_DIR, "logs") )
Test(model, args.loadpath, args.savepath) | 35.214286 | 96 | 0.650913 |
from KerasRFCN.Model.Model import RFCN_Model
from KerasRFCN.Config import Config
import KerasRFCN.Utils
import os
from keras.preprocessing import image
import pickle
import numpy as np
import argparse
import matplotlib.pyplot as plt
import matplotlib.patches as patches
class RFCNNConfig(Config):
NAME = "Fashion"
BACKBONE = "resnet101"
GPU_COUNT = 1
IMAGES_PER_GPU = 1
C = 1 + 46
NUM_CLASSES = C
IMAGE_MIN_DIM = 640
IMAGE_MAX_DIM = 768
RPN_ANCHOR_SCALES = (32, 64, 128, 256, 512)
BACKBONE_STRIDES = [4, 8, 16, 32, 64]
TRAIN_ROIS_PER_IMAGE = 200
STEPS_PER_EPOCH = 100
VALIDATION_STEPS = 5
RPN_NMS_THRESHOLD = 0.7
DETECTION_MIN_CONFIDENCE = 0.4
POOL_SIZE = 7
def Test(model, loadpath, savepath):
assert not loadpath == savepath, "loadpath should'n same with savepath"
model_path = model.find_last()[1]
# Load trained weights (fill in path to trained weights here)
model.load_weights(model_path, by_name=True)
print("Loading weights from ", model_path)
if os.path.isdir(loadpath):
for idx, imgname in enumerate(os.listdir(loadpath)):
if not imgname.lower().endswith(('.bmp', '.jpeg', '.jpg', '.png', '.tif', '.tiff')):
continue
print(imgname)
imageoriChannel = np.array(plt.imread( os.path.join(loadpath, imgname) )) / 255.0
img = image.img_to_array( image.load_img(os.path.join(loadpath, imgname)) )
TestSinglePic(img, imageoriChannel, model, savepath=savepath, imgname=imgname)
elif os.path.isfile(loadpath):
if not loadpath.lower().endswith(('.bmp', '.jpeg', '.jpg', '.png', '.tif', '.tiff')):
print("not image file!")
return
print(loadpath)
imageoriChannel = np.array(plt.imread( loadpath )) / 255.0
img = image.img_to_array( image.load_img(loadpath) )
(filename,extension) = os.path.splitext(loadpath)
TestSinglePic(img, imageoriChannel, model, savepath=savepath, imgname=filename)
def TestSinglePic(image, image_ori, model, savepath, imgname):
r = model.detect([image], verbose=1)[0]
print(r)
def get_ax(rows=1, cols=1, size=8):
_, ax = plt.subplots(rows, cols, figsize=(size*cols, size*rows))
return ax
ax = get_ax(1)
assert not savepath == "", "empty save path"
assert not imgname == "", "empty image file name"
for box in r['rois']:
y1, x1, y2, x2 = box
p = patches.Rectangle((x1, y1), x2 - x1, y2 - y1, linewidth=2,
alpha=0.7, linestyle="dashed",
edgecolor="red", facecolor='none')
ax.add_patch(p)
ax.imshow(image_ori)
plt.savefig(os.path.join(savepath, imgname),bbox_inches='tight')
plt.clf()
if __name__ == '__main__':
ROOT_DIR = os.getcwd()
parser = argparse.ArgumentParser()
parser.add_argument('--loadpath', required=False,
default="images/",
metavar="evaluate images loadpath",
help="evaluate images loadpath")
parser.add_argument('--savepath', required=False,
default="result/",
metavar="evaluate images savepath",
help="evaluate images savepath")
config = RFCNNConfig()
args = parser.parse_args()
model = RFCN_Model(mode="inference", config=config,
model_dir=os.path.join(ROOT_DIR, "logs") )
Test(model, args.loadpath, args.savepath) | true | true |
f72701ca82258a63b2f05eaaa0b57d341079e90e | 13,760 | py | Python | mhdb/write_ttl.py | charlie42/mhdb-tables2turtles | b289cc79b85e7c5d63bdf1b718e4e1d7bf188864 | [
"Apache-2.0"
] | 1 | 2020-04-15T14:22:14.000Z | 2020-04-15T14:22:14.000Z | mhdb/write_ttl.py | charlie42/mhdb-tables2turtles | b289cc79b85e7c5d63bdf1b718e4e1d7bf188864 | [
"Apache-2.0"
] | 3 | 2020-03-03T17:49:04.000Z | 2020-03-09T18:40:26.000Z | mhdb/write_ttl.py | charlie42/mhdb-tables2turtles | b289cc79b85e7c5d63bdf1b718e4e1d7bf188864 | [
"Apache-2.0"
] | 1 | 2020-04-20T15:05:42.000Z | 2020-04-20T15:05:42.000Z | #!/usr/bin/env python3
"""
This program contains generic functions to build a Turtle (Terse RDF Triple Language) document.
Authors:
- Arno Klein, 2017-2020 (arno@childmind.org) http://binarybottle.com
- Jon Clucas, 2017–2018 (jon.clucas@childmind.org)
Copyright 2020, Child Mind Institute (http://childmind.org), Apache v2.0 License
"""
import os
import sys
top_dir = os.path.abspath(os.path.join(
(__file__),
os.pardir,
os.pardir
))
if top_dir not in sys.path:
sys.path.append(top_dir)
import numpy as np
def language_string(s, lang="en"):
"""
Function to encode a literal as being in a specific language.
Parameters
----------
s : string
lang : string
ISO character code, default="en"
Returns
-------
s : string
triple quoted Turtle literal with language encoding
Example
-------
>>> print(language_string("Canada goose"))
\"""Canada goose\"""@en
"""
return(
"\"\"\"{0}\"\"\"@{1}".format(
return_string(
s,
[
'"'
],
[
"'"
]
),
lang
)
)
def return_string(input_string, replace=[], replace_with=[]):
"""
Return a stripped string with optional character replacements.
Parameters
----------
input_string : string
arbitrary string
replace : list of strings
strings to substitute
replace_with : list of strings
strings with which to substitute 'replace' strings
Returns
-------
output_string : string
stripped input_string
"""
if input_string:
if not isinstance(input_string, str):
input_string = str(input_string)
output_string = input_string.replace(
"\n",
" "
).replace(
"\"",
"\\\""
).strip()
if replace:
if len(replace) == len(replace_with):
for i, s in enumerate(replace):
output_string = output_string.replace(s, replace_with[i])
return output_string
else:
raise Exception("replace and replace_with should be the same length.")
else:
return output_string
else:
return ""
def create_label(input_string):
"""
Clean up a string and create a corresponding (shortened) label.
Parameters
----------
input_string : string
arbitrary string
Returns
-------
output_string : string
stripped input_string
label_string : string
alphanumeric characters of input_string
"""
from mhdb.spreadsheet_io import return_string
from mhdb.spreadsheet_io import convert_string_to_label
if input_string:
if isinstance(input_string, str):
output_string = return_string(input_string,
replace=['"', '\n'],
replace_with=['', ''])
if output_string:
label_string = convert_string_to_label(output_string)
return output_string, label_string
else:
return '', ''
else:
raise Exception('input_string is not a string!')
else:
raise Exception('input_string is None!')
def convert_string_to_label(input_string, label_type='delimited'):
"""
Remove all non-alphanumeric characters from a string.
Parameters
----------
input_string : string
input string
label_type: string
'PascalCase', 'camelCase', or 'delimited'
('delimited' uses '_' delimiters and keeps hyphens)
Returns
-------
output_string : string
output string
"""
def toPascal(s):
"""
Usage: toPascal("WRITE this in pascalcase")
'WriteThisInPascalCase'
"""
return ''.join(x for x in s.title() if not x.isspace())
def toCamel(s):
"""
Usage: toCamel("WRITE this in camelcase")
'writeThisInCamelcase'
(from: https://stackoverflow.com/questions/8347048/
how-to-convert-string-to-title-case-in-python)
"""
ret = s.split(' ')
return ret[0].lower() + \
''.join(x.title() for x in ret[1:] if not x.isspace())
def toDelimit(s):
"""
Usage: toDelimit("WRITE this-in delimited")
'WRITE_this-in_delimited'
"""
while " " in s:
s = s.replace(" ", "_")
while "__" in s:
s = s.replace("__", "_")
s = s.replace("_-_", "-")
while "--" in s:
s = s.replace("--", "-")
return s
# input_string = return_string(input_string,
# replace=['"', '\n'],
# replace_with=['', ''])
if input_string:
if label_type == 'PascalCase':
output_string = toPascal(input_string)
elif label_type == 'camelCase':
output_string = toCamel(input_string)
elif label_type == 'delimited':
output_string = toDelimit(input_string)
else:
Exception('label_type input is incorrect')
keep_chars = ('-', '_')
output_string = "".join(c for c in str(output_string) if c.isalnum()
or c in keep_chars).rstrip()
#output_string = ''.join(x for x in output_string if not x.isspace())
return output_string
else:
raise Exception('"{0}" is not a string!'.format(input_string))
def check_iri(iri, label_type='delimited'):
"""
Function to format IRIs by type, such as <iri> or prefix:iri
Parameters
---------
iri: string
label_type: string
'PascalCase', 'camelCase', or 'delimited'
('delimited' uses '_' delimiters and keeps hyphens)
Removed:
prefixes: set of 2-or-3-tuples
prefixes={("mhdb", "mhdb-states", "mhdb-disorders", "mhdb-resources",
"mhdb-assessments", "mhdb-measures")}
Returns
-------
iri: string
"""
#prefix_strings = {"","_"} if not prefixes else {
# "",
# "_",
# *[prefix[0] for prefix in prefixes]
#}
iri = str(iri).strip()
if ":" in iri and not [x for x in iri if x.isspace()]:
if iri.endswith(":"):
return check_iri(iri[:-1], label_type) #, prefixes)
elif ":/" in iri and \
not iri.startswith('<') and not iri.endswith('>'):
return "<{0}>".format(convert_string_to_label(iri, label_type))
# elif iri.split(":")[0] in prefix_strings:
# return iri
else:
return iri
else:
return ":" + convert_string_to_label(iri, label_type)
def turtle_from_dict(ttl_dict):
"""
Function to convert a dictionary to a Terse Triple Language string
Parameters
----------
ttl_dict: dictionary
key: string
RDF subject
value: dictionary
key: string
RDF predicate
value: {string}
set of RDF objects
Returns
-------
ttl_string: str
ttl
Example
-------
>>> turtle_from_dict({
... "duck": {
... "continues": {
... "sitting"
... }
... },
... "goose": {
... "begins": {
... "chasing"
... }
... }
... })
'duck continues sitting .\\n\\ngoose begins chasing .'
"""
x = [
":None",
":nan",
"nan",
np.nan,
None
]
return(
"\n\n".join([
"{0} {1} .".format(
subject,
" ;\n\t".join([
"{0} {1}".format(
predicate,
object
) for predicate in ttl_dict[
subject
] for object in ttl_dict[
subject
][
predicate
]
])
) for subject in ttl_dict
])
)
def write_about_statement(subject, predicate, object, predicates):
"""
Function to write one or more rdf statements in terse triple format.
Parameters
----------
subject: string
subject of this statement
predicate: string
predicate of this statement
object: string
object of this statement
predicates: iterable of 2-tuples
predicate: string
nth property
object: string
nth object
Returns
-------
ttl_string: string
Turtle string
Example
-------
>>> statement = {"duck": {"continues": {"sitting"}}}
>>> predicates = {
... ("source", '"Duck Duck Goose"'),
... ("statementType", "role")
... }
>>> for subject in statement:
... for predicate in statement[subject]:
... for object in statement[subject][predicate]:
... print(len(write_about_statement(
... subject, predicate, object, predicates
... )))
168
"""
return(
write_ttl(
"_:{0}".format(create_label("_".join([
subject,
predicate,
object
]))),
[
("rdf:type", "rdf:Statement"),
("rdf:subject", subject),
("rdf:predicate", predicate),
("rdf:object", object),
*predicates
]
)
)
def write_header(base_uri, base_prefix, version, label, comment, prefixes):
"""
Print out the beginning of an RDF text file.
Parameters
----------
base_uri : string
base URI
base_prefix : string
base prefix
version : string
version
label : string
label
comment : string
comment
prefixes : list
list of 2-or-3-tuples of TTL prefix strings and prefix IRIs
each tuple is
[0] a prefix string
[1] an iri string
[2] an optional import URL
eg, ("owl", "http://www.w3.org/2002/07/owl#")
REMOVED:
imports : Boolean, optional, default=False
import external ontologies?
Returns
-------
header : string
owl header
"""
header = write_header_prefixes(base_uri, base_prefix, prefixes)
header = """{4}<{0}> a owl:Ontology ;
owl:versionIRI <{0}/{1}> ;
owl:versionInfo "{1}"^^rdfs:Literal ;
rdfs:label "{2}"^^rdfs:Literal ;
rdfs:comment \"\"\"{3}\"\"\"@en .
""".format(base_uri, version, label, comment, header)
return header
def write_header_prefixes(base_uri, base_prefix, prefixes):
"""
Write turtle-formatted header prefix string for list of (prefix, iri) tuples.
Parameter
---------
base_uri : string
base URI
base_prefix : string
base prefix
prefixes: list of 2 or 3-tuples
each tuple is
[0] a prefix string
[1] an iri string
[2] an optional import URL
REMOVED:
imports : Boolean, optional, default=False
import external ontologies?
Returns
-------
header_prefix: string
"""
header_prefix = ""
for prefix in prefixes:
header_prefix="""{0}PREFIX {1}: <{2}> \n""".format(
header_prefix,
prefix[0],
prefix[1]
)
#header_prefix = """{0}\nBASE <{1}#> \n""".format(
# header_prefix, base_uri
#)
header_prefix = """{0}\nPREFIX : <{1}#> \n""".format(
header_prefix, base_uri
)
# if imports:
# header_prefix = """{0}\n<> owl:imports {1} .\n\n""".format(
# header_prefix,
# " ,\n\t".join(
# [check_iri(prefix[1])
# if ((len(prefix) < 3) or (isinstance(prefix[2], float))
# ) else check_iri(prefix[2]) for prefix in prefixes if (
# (prefix[0] not in [base_prefix]) and
# (prefix[1] not in [base_uri])
# )
# ]
# )
# )
return header_prefix
def write_ttl(subject, predicates, common_statements=None):
"""
Function to write one or more rdf statements in terse triple format.
Parameters
----------
subject: string
subject of all triples in these statements
predicates: iterable of 2-tuples
statements about subject
predicate: string
nth property
object: string
nth object
common_statements: iterable of 2-tuples, optional
statements about all previous statements
predicate: string
nth property
object: string
nth object
Returns
-------
ttl_string: string
Turtle string
"""
ttl_string = ""
if common_statements:
ttl_string = "\n\n".join([
write_about_statement(
subject,
predicate[0],
predicate[1],
common_statements
) for predicate in predicates
])
ttl_string = "{0}\n\n".format(ttl_string) if len(ttl_string) else ""
ttl_string = "".join([
ttl_string,
"{0} {1} .".format(
subject,
" ;\n\t".join([
" ".join([
predicate[0],
predicate[1]
]) for predicate in predicates
])
)
])
return(ttl_string)
| 25.063752 | 95 | 0.50952 |
import os
import sys
top_dir = os.path.abspath(os.path.join(
(__file__),
os.pardir,
os.pardir
))
if top_dir not in sys.path:
sys.path.append(top_dir)
import numpy as np
def language_string(s, lang="en"):
return(
"\"\"\"{0}\"\"\"@{1}".format(
return_string(
s,
[
'"'
],
[
"'"
]
),
lang
)
)
def return_string(input_string, replace=[], replace_with=[]):
if input_string:
if not isinstance(input_string, str):
input_string = str(input_string)
output_string = input_string.replace(
"\n",
" "
).replace(
"\"",
"\\\""
).strip()
if replace:
if len(replace) == len(replace_with):
for i, s in enumerate(replace):
output_string = output_string.replace(s, replace_with[i])
return output_string
else:
raise Exception("replace and replace_with should be the same length.")
else:
return output_string
else:
return ""
def create_label(input_string):
from mhdb.spreadsheet_io import return_string
from mhdb.spreadsheet_io import convert_string_to_label
if input_string:
if isinstance(input_string, str):
output_string = return_string(input_string,
replace=['"', '\n'],
replace_with=['', ''])
if output_string:
label_string = convert_string_to_label(output_string)
return output_string, label_string
else:
return '', ''
else:
raise Exception('input_string is not a string!')
else:
raise Exception('input_string is None!')
def convert_string_to_label(input_string, label_type='delimited'):
def toPascal(s):
return ''.join(x for x in s.title() if not x.isspace())
def toCamel(s):
ret = s.split(' ')
return ret[0].lower() + \
''.join(x.title() for x in ret[1:] if not x.isspace())
def toDelimit(s):
while " " in s:
s = s.replace(" ", "_")
while "__" in s:
s = s.replace("__", "_")
s = s.replace("_-_", "-")
while "--" in s:
s = s.replace("--", "-")
return s
# input_string = return_string(input_string,
# replace=['"', '\n'],
# replace_with=['', ''])
if input_string:
if label_type == 'PascalCase':
output_string = toPascal(input_string)
elif label_type == 'camelCase':
output_string = toCamel(input_string)
elif label_type == 'delimited':
output_string = toDelimit(input_string)
else:
Exception('label_type input is incorrect')
keep_chars = ('-', '_')
output_string = "".join(c for c in str(output_string) if c.isalnum()
or c in keep_chars).rstrip()
#output_string = ''.join(x for x in output_string if not x.isspace())
return output_string
else:
raise Exception('"{0}" is not a string!'.format(input_string))
def check_iri(iri, label_type='delimited'):
#prefix_strings = {"","_"} if not prefixes else {
# "",
# "_",
# *[prefix[0] for prefix in prefixes]
#}
iri = str(iri).strip()
if ":" in iri and not [x for x in iri if x.isspace()]:
if iri.endswith(":"):
return check_iri(iri[:-1], label_type) #, prefixes)
elif ":/" in iri and \
not iri.startswith('<') and not iri.endswith('>'):
return "<{0}>".format(convert_string_to_label(iri, label_type))
# elif iri.split(":")[0] in prefix_strings:
# return iri
else:
return iri
else:
return ":" + convert_string_to_label(iri, label_type)
def turtle_from_dict(ttl_dict):
x = [
":None",
":nan",
"nan",
np.nan,
None
]
return(
"\n\n".join([
"{0} {1} .".format(
subject,
" ;\n\t".join([
"{0} {1}".format(
predicate,
object
) for predicate in ttl_dict[
subject
] for object in ttl_dict[
subject
][
predicate
]
])
) for subject in ttl_dict
])
)
def write_about_statement(subject, predicate, object, predicates):
return(
write_ttl(
"_:{0}".format(create_label("_".join([
subject,
predicate,
object
]))),
[
("rdf:type", "rdf:Statement"),
("rdf:subject", subject),
("rdf:predicate", predicate),
("rdf:object", object),
*predicates
]
)
)
def write_header(base_uri, base_prefix, version, label, comment, prefixes):
header = write_header_prefixes(base_uri, base_prefix, prefixes)
header = """{4}<{0}> a owl:Ontology ;
owl:versionIRI <{0}/{1}> ;
owl:versionInfo "{1}"^^rdfs:Literal ;
rdfs:label "{2}"^^rdfs:Literal ;
rdfs:comment \"\"\"{3}\"\"\"@en .
""".format(base_uri, version, label, comment, header)
return header
def write_header_prefixes(base_uri, base_prefix, prefixes):
header_prefix = ""
for prefix in prefixes:
header_prefix="""{0}PREFIX {1}: <{2}> \n""".format(
header_prefix,
prefix[0],
prefix[1]
)
#header_prefix = """{0}\nBASE <{1}#> \n""".format(
# header_prefix, base_uri
#)
header_prefix = """{0}\nPREFIX : <{1}#> \n""".format(
header_prefix, base_uri
)
# if imports:
# header_prefix = """{0}\n<> owl:imports {1} .\n\n""".format(
# header_prefix,
# " ,\n\t".join(
# [check_iri(prefix[1])
# if ((len(prefix) < 3) or (isinstance(prefix[2], float))
# ) else check_iri(prefix[2]) for prefix in prefixes if (
# (prefix[0] not in [base_prefix]) and
# (prefix[1] not in [base_uri])
# )
# ]
# )
# )
return header_prefix
def write_ttl(subject, predicates, common_statements=None):
ttl_string = ""
if common_statements:
ttl_string = "\n\n".join([
write_about_statement(
subject,
predicate[0],
predicate[1],
common_statements
) for predicate in predicates
])
ttl_string = "{0}\n\n".format(ttl_string) if len(ttl_string) else ""
ttl_string = "".join([
ttl_string,
"{0} {1} .".format(
subject,
" ;\n\t".join([
" ".join([
predicate[0],
predicate[1]
]) for predicate in predicates
])
)
])
return(ttl_string)
| true | true |
f72703a3d0c01193efa4ecd4a94ed6ea309de133 | 3,106 | py | Python | Question_prepare/answers/answer_rotation.py | KuKuXia/DeepLearningMugenKnock | 979cf05e65e352da36453337380a418a2a2fdccb | [
"MIT"
] | null | null | null | Question_prepare/answers/answer_rotation.py | KuKuXia/DeepLearningMugenKnock | 979cf05e65e352da36453337380a418a2a2fdccb | [
"MIT"
] | null | null | null | Question_prepare/answers/answer_rotation.py | KuKuXia/DeepLearningMugenKnock | 979cf05e65e352da36453337380a418a2a2fdccb | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from glob import glob
import matplotlib.pyplot as plt
np.random.seed(0)
num_classes = 2
img_height, img_width = 64, 64
CLS = ['akahara', 'madara']
# get train data
def data_load(path, hf=False, vf=False, rot=None):
xs = []
ts = []
paths = []
for dir_path in glob(path + '/*'):
for path in glob(dir_path + '/*'):
x = cv2.imread(path)
x = cv2.resize(x, (img_width, img_height)).astype(np.float32)
x /= 255.
x = x[..., ::-1]
xs.append(x)
for i, cls in enumerate(CLS):
if cls in path:
t = i
ts.append(t)
paths.append(path)
if hf:
xs.append(x[:, ::-1])
ts.append(t)
paths.append(path)
if vf:
xs.append(x[::-1])
ts.append(t)
paths.append(path)
if hf and vf:
xs.append(x[::-1, ::-1])
ts.append(t)
paths.append(path)
if rot is not None:
angle = rot
scale = 1
# show
a_num = 360 // rot
w_num = np.ceil(np.sqrt(a_num))
h_num = np.ceil(a_num / w_num)
count = 1
plt.subplot(h_num, w_num, count)
plt.axis('off')
plt.imshow(x)
plt.title("angle=0")
while angle < 360:
_h, _w, _c = x.shape
max_side = max(_h, _w)
tmp = np.zeros((max_side, max_side, _c))
tx = int((max_side - _w) / 2)
ty = int((max_side - _h) / 2)
tmp[ty: ty+_h, tx: tx+_w] = x.copy()
M = cv2.getRotationMatrix2D((max_side/2, max_side/2), angle, scale)
_x = cv2.warpAffine(tmp, M, (max_side, max_side))
_x = _x[tx:tx+_w, ty:ty+_h]
xs.append(x)
ts.append(t)
paths.append(path)
# show
count += 1
plt.subplot(h_num, w_num, count)
plt.imshow(_x)
plt.axis('off')
plt.title("angle={}".format(angle))
angle += rot
plt.show()
xs = np.array(xs, dtype=np.float32)
ts = np.array(ts, dtype=np.int)
xs = xs.transpose(0,3,1,2)
return xs, ts, paths
xs, ts, paths = data_load("../Dataset/train/images/", hf=True, vf=True, rot=1)
mb = 3
mbi = 0
train_ind = np.arange(len(xs))
np.random.seed(0)
np.random.shuffle(train_ind)
for i in range(10):
if mbi + mb > len(xs):
mb_ind = train_ind[mbi:]
np.random.shuffle(train_ind)
mb_ind = np.hstack((mb_ind, train_ind[:(mb-(len(xs)-mbi))]))
mbi = mb - (len(xs) - mbi)
else:
mb_ind = train_ind[mbi: mbi+mb]
mbi += mb
print(mb_ind)
| 26.775862 | 87 | 0.433033 | import cv2
import numpy as np
from glob import glob
import matplotlib.pyplot as plt
np.random.seed(0)
num_classes = 2
img_height, img_width = 64, 64
CLS = ['akahara', 'madara']
def data_load(path, hf=False, vf=False, rot=None):
xs = []
ts = []
paths = []
for dir_path in glob(path + '/*'):
for path in glob(dir_path + '/*'):
x = cv2.imread(path)
x = cv2.resize(x, (img_width, img_height)).astype(np.float32)
x /= 255.
x = x[..., ::-1]
xs.append(x)
for i, cls in enumerate(CLS):
if cls in path:
t = i
ts.append(t)
paths.append(path)
if hf:
xs.append(x[:, ::-1])
ts.append(t)
paths.append(path)
if vf:
xs.append(x[::-1])
ts.append(t)
paths.append(path)
if hf and vf:
xs.append(x[::-1, ::-1])
ts.append(t)
paths.append(path)
if rot is not None:
angle = rot
scale = 1
a_num = 360 // rot
w_num = np.ceil(np.sqrt(a_num))
h_num = np.ceil(a_num / w_num)
count = 1
plt.subplot(h_num, w_num, count)
plt.axis('off')
plt.imshow(x)
plt.title("angle=0")
while angle < 360:
_h, _w, _c = x.shape
max_side = max(_h, _w)
tmp = np.zeros((max_side, max_side, _c))
tx = int((max_side - _w) / 2)
ty = int((max_side - _h) / 2)
tmp[ty: ty+_h, tx: tx+_w] = x.copy()
M = cv2.getRotationMatrix2D((max_side/2, max_side/2), angle, scale)
_x = cv2.warpAffine(tmp, M, (max_side, max_side))
_x = _x[tx:tx+_w, ty:ty+_h]
xs.append(x)
ts.append(t)
paths.append(path)
count += 1
plt.subplot(h_num, w_num, count)
plt.imshow(_x)
plt.axis('off')
plt.title("angle={}".format(angle))
angle += rot
plt.show()
xs = np.array(xs, dtype=np.float32)
ts = np.array(ts, dtype=np.int)
xs = xs.transpose(0,3,1,2)
return xs, ts, paths
xs, ts, paths = data_load("../Dataset/train/images/", hf=True, vf=True, rot=1)
mb = 3
mbi = 0
train_ind = np.arange(len(xs))
np.random.seed(0)
np.random.shuffle(train_ind)
for i in range(10):
if mbi + mb > len(xs):
mb_ind = train_ind[mbi:]
np.random.shuffle(train_ind)
mb_ind = np.hstack((mb_ind, train_ind[:(mb-(len(xs)-mbi))]))
mbi = mb - (len(xs) - mbi)
else:
mb_ind = train_ind[mbi: mbi+mb]
mbi += mb
print(mb_ind)
| true | true |
f72703e878cca7379abbf6d41d3989ee572b5ae9 | 283 | py | Python | app/user/urls.py | Eslamhathout/restuarant_reservation_api | 67292e95eed13b5bee423a443180230b9de4c036 | [
"MIT"
] | null | null | null | app/user/urls.py | Eslamhathout/restuarant_reservation_api | 67292e95eed13b5bee423a443180230b9de4c036 | [
"MIT"
] | null | null | null | app/user/urls.py | Eslamhathout/restuarant_reservation_api | 67292e95eed13b5bee423a443180230b9de4c036 | [
"MIT"
] | null | null | null | from django.urls import path
from user import views
app_name = 'user'
urlpatterns = [
path('create/', views.createUserView.as_view(), name='create'),
path('token/', views.CreateTokenView.as_view(), name='token'),
path('me/', views.ManageUserView.as_view(), name='me'),
] | 31.444444 | 67 | 0.689046 | from django.urls import path
from user import views
app_name = 'user'
urlpatterns = [
path('create/', views.createUserView.as_view(), name='create'),
path('token/', views.CreateTokenView.as_view(), name='token'),
path('me/', views.ManageUserView.as_view(), name='me'),
] | true | true |
f7270451a42cc428358813a37592ce306c2d3a9e | 263 | py | Python | courses/templatetags/course_tags.py | pauljherrera/avantiweb | 40b87e754e68a0e2adcf5e1640d5e2e0c8637d0a | [
"MIT"
] | null | null | null | courses/templatetags/course_tags.py | pauljherrera/avantiweb | 40b87e754e68a0e2adcf5e1640d5e2e0c8637d0a | [
"MIT"
] | null | null | null | courses/templatetags/course_tags.py | pauljherrera/avantiweb | 40b87e754e68a0e2adcf5e1640d5e2e0c8637d0a | [
"MIT"
] | null | null | null | from django import template
register = template.Library()
@register.filter
def model_name(obj):
try:
return obj._meta.model_name
except AttributeError:
return None
@register.filter
def filter_course_id(obj, filter_):
return obj.filter(course_id=filter_) | 18.785714 | 37 | 0.790875 | from django import template
register = template.Library()
@register.filter
def model_name(obj):
try:
return obj._meta.model_name
except AttributeError:
return None
@register.filter
def filter_course_id(obj, filter_):
return obj.filter(course_id=filter_) | true | true |
f72704eca60cfb15f7653086792eaae9dad19395 | 21,810 | py | Python | backend/opnreco/syncbase.py | OpenPaymentNetwork/opnreco | 99c8955d7e200fe11fc23c3568879c543940b168 | [
"MIT"
] | null | null | null | backend/opnreco/syncbase.py | OpenPaymentNetwork/opnreco | 99c8955d7e200fe11fc23c3568879c543940b168 | [
"MIT"
] | null | null | null | backend/opnreco/syncbase.py | OpenPaymentNetwork/opnreco | 99c8955d7e200fe11fc23c3568879c543940b168 | [
"MIT"
] | null | null | null |
from decimal import Decimal
from opnreco.models.db import File
from opnreco.models.db import Movement
from opnreco.models.db import now_func
from opnreco.models.db import OwnerLog
from opnreco.models.db import Peer
from opnreco.models.db import TransferDownloadRecord
from opnreco.models.db import TransferRecord
from opnreco.mvinterp import MovementInterpreter
from opnreco.util import check_requests_response
from opnreco.util import to_datetime
from pyramid.decorator import reify
import collections
import logging
import os
import requests
log = logging.getLogger(__name__)
zero = Decimal()
null = None
class VerificationFailure(Exception):
"""A transfer failed verification"""
def __init__(self, msg, transfer_id):
Exception.__init__(self, msg)
self.transfer_id = transfer_id
class SyncBase:
"""Base class for views that sync with OPN.
This is a base class for either downloading all transfers and movements
since the last sync or for verifying that existing transfers and
movements have not changed.
"""
write_enabled = True
batch_limit = None
def __init__(self, request):
self.request = request
self.owner = owner = request.owner
self.owner_id = owner.id
self.api_url = os.environ['opn_api_url']
self.change_log = []
# peers is a cache of {peer_id: Peer}.
self.peers = {}
def download_batch(self, sync_ts_iso, sync_transfer_id, count_remain):
url = '%s/wallet/history_sync' % self.api_url
postdata = {
'sync_ts': sync_ts_iso,
'transfer_id': sync_transfer_id,
}
if count_remain:
postdata['count_remain'] = 'true'
if self.batch_limit:
postdata['limit'] = self.batch_limit
r = requests.post(
url,
data=postdata,
headers={'Authorization': 'Bearer %s' % self.request.access_token})
check_requests_response(r)
return r.json()
def import_transfer_records(self, transfers_download):
"""Add and update TransferRecord rows."""
dbsession = self.request.dbsession
owner_id = self.owner_id
write_enabled = self.write_enabled
change_log = self.change_log
transfer_ids = [item['id'] for item in transfers_download['results']]
if not transfer_ids:
return
record_list = (
dbsession.query(TransferRecord)
.filter(
TransferRecord.owner_id == owner_id,
TransferRecord.transfer_id.in_(transfer_ids),
)
.all())
record_map = {record.transfer_id: record for record in record_list}
existing_movements_map = self.get_existing_movements_map(transfer_ids)
# peer_ids is the set of all peer IDs referenced by the transfers.
peer_ids = set()
peer_ids.add(self.owner_id)
for tsum in transfers_download['results']:
sender_id = tsum['sender_id']
if sender_id:
peer_ids.add(sender_id)
recipient_id = tsum['recipient_id']
if recipient_id:
peer_ids.add(recipient_id)
for m in tsum['movements']:
from_id = m['from_id']
if from_id:
peer_ids.add(from_id)
peer_ids.add(m['to_id'])
for loop in m['loops']:
peer_ids.add(loop['issuer_id'])
peer_rows = (
dbsession.query(Peer)
.filter(
Peer.owner_id == owner_id,
Peer.peer_id.in_(peer_ids),
).all())
for peer in peer_rows:
self.peers[peer.peer_id] = peer
if write_enabled:
self.import_peer(self.owner_id, None)
for tsum in transfers_download['results']:
if write_enabled:
self.import_peer(tsum['sender_id'], tsum['sender_info'])
if tsum.get('recipient_is_dfi_account'):
recipient_info = {}
recipient_info.update(tsum['recipient_info'])
recipient_info['is_dfi_account'] = True
else:
recipient_info = tsum['recipient_info']
if write_enabled:
self.import_peer(tsum['recipient_id'], recipient_info)
transfer_id = tsum['id']
bundled_transfers = tsum.get('bundled_transfers')
if (bundled_transfers is not None and
not isinstance(bundled_transfers, list)):
# Don't let something weird get into the database.
raise ValueError(
"Transfer %s: bundled_transfers should be None or a list, "
"not %s" % (transfer_id, repr(bundled_transfers)))
bundle_transfer_id = tsum.get('bundle_transfer_id')
if bundle_transfer_id:
bundle_transfer_id = str(bundle_transfer_id)
changed = []
kw = {
'workflow_type': tsum['workflow_type'],
'start': to_datetime(tsum['start']),
'currency': tsum['currency'],
'amount': Decimal(tsum['amount']),
'timestamp': to_datetime(tsum['timestamp']),
'next_activity': tsum['next_activity'],
'completed': tsum['completed'],
'canceled': tsum['canceled'],
'sender_id': tsum['sender_id'] or None,
'sender_uid': tsum['sender_uid'] or None,
'sender_info': tsum['sender_info'],
'recipient_id': tsum['recipient_id'] or None,
'recipient_uid': tsum['recipient_uid'] or None,
'recipient_info': tsum['recipient_info'],
'bundled_transfers': bundled_transfers,
'bundle_transfer_id': bundle_transfer_id,
}
record = record_map.get(transfer_id)
if record is None:
# Add a TransferRecord.
is_new_record = True
if write_enabled:
record = TransferRecord(
transfer_id=transfer_id,
owner_id=owner_id,
**kw)
changed.append(kw)
dbsession.add(record)
dbsession.flush() # Assign record.id
record_map[transfer_id] = record
change_log.append({
'event_type': 'transfer_add',
'transfer_id': transfer_id,
})
else:
# Update a TransferRecord.
is_new_record = False
immutable_attrs = ('workflow_type', 'start')
for attr in immutable_attrs:
if kw[attr] != getattr(record, attr):
msg = (
"Verification failure in transfer %s. "
"Immutable attribute changed. "
"Old %s was %s, new %s is %s" %
(transfer_id, attr, repr(getattr(record, attr)),
attr, repr(kw[attr])))
log.error(msg)
raise VerificationFailure(msg, transfer_id=transfer_id)
changed_map = {}
for attr, value in sorted(kw.items()):
if getattr(record, attr) != value:
if write_enabled:
setattr(record, attr, value)
changed_map[attr] = value
if changed_map:
changed.append(changed_map)
change_log.append({
'event_type': 'transfer_changes',
'transfer_id': transfer_id,
'changes': sorted(changed_map.keys()),
})
if write_enabled:
dbsession.add(TransferDownloadRecord(
opn_download_id=self.opn_download_id,
transfer_record_id=record.id,
transfer_id=transfer_id,
changed=changed))
if record is not None:
self.import_movements(
record, tsum,
is_new_record=is_new_record,
existing_movements=existing_movements_map[record.id])
dbsession.flush()
def get_existing_movements_map(self, transfer_ids):
"""List all movements recorded for the given transfer IDs.
Return a defaultdict: {transfer_record_id: [Movement]}.
"""
dbsession = self.request.dbsession
owner_id = self.owner_id
all_movements = (
dbsession.query(Movement)
.join(
TransferRecord,
TransferRecord.id == Movement.transfer_record_id)
.filter(
TransferRecord.owner_id == owner_id,
TransferRecord.transfer_id.in_(transfer_ids))
.all())
res = collections.defaultdict(list)
for m in all_movements:
res[m.transfer_record_id].append(m)
return res
@reify
def account_map(self):
# Get the map of accounts from /wallet/info.
account_list = self.request.wallet_info['profile']['accounts']
return {a['id']: a for a in account_list}
def import_peer(self, peer_id, info):
"""Import a peer from a transfer record or other source."""
if not peer_id:
# A transfer's sender or recipient is not yet known.
# There's nothing to import.
return
if not self.write_enabled:
# This method doesn't need to do anything when writing is
# disabled.
return
if peer_id == self.owner_id:
# Get better info from the owner profile.
info = {
'title': self.owner.title,
'screen_name': self.owner.username,
'is_dfi_account': False,
'is_own_dfi_account': False,
}
else:
# Is the peer an account held by the user? If so, get
# better info from the account map.
account = self.account_map.get(peer_id)
if account:
title = '%s at %s' % (
account['redacted_account_num'],
account['rdfi_name'],
)
if account['alias']:
title += ' (%s)' % account['alias']
info = {
'title': title,
'screen_name': '',
'is_dfi_account': True,
'is_own_dfi_account': True,
}
dbsession = self.request.dbsession
peer = self.peers.get(peer_id)
if peer is None:
peer = Peer(
owner_id=self.owner_id,
peer_id=peer_id,
title=info.get('title'),
username=info.get('screen_name'),
is_dfi_account=info.get('is_dfi_account'),
is_own_dfi_account=info.get('is_own_dfi_account'),
last_update=now_func,
)
dbsession.add(peer)
self.change_log.append({
'event_type': 'peer_add',
'peer_id': peer_id,
})
self.peers[peer_id] = peer
dbsession.add(OwnerLog(
owner_id=self.owner_id,
personal_id=self.request.personal_id,
event_type='peer_add',
content={
'peer_id': peer_id,
'info': info,
}))
else:
attrs_found = 0
changes = {}
# Changeable attrs
attrs = (
('title', 'title'),
('screen_name', 'username'),
)
for source_attr, dest_attr in attrs:
value = info.get(source_attr)
if value:
attrs_found += 1
if getattr(peer, dest_attr) != value:
changes[dest_attr] = value
setattr(peer, dest_attr, value)
# One-shot boolean attrs (once set, stay set)
attrs = (
('is_dfi_account', 'is_dfi_account'),
('is_own_dfi_account', 'is_own_dfi_account'),
)
for source_attr, dest_attr in attrs:
value = info.get(source_attr)
if value is not None:
attrs_found += 1
if value and not getattr(peer, dest_attr):
changes[dest_attr] = True
setattr(peer, dest_attr, True)
if attrs_found:
peer.last_update = now_func
if changes:
self.change_log.append({
'event_type': 'peer_update',
'peer_id': peer_id,
})
dbsession.add(OwnerLog(
owner_id=self.owner_id,
personal_id=self.request.personal_id,
event_type='peer_update',
content={
'peer_id': peer_id,
'changes': changes,
}))
def import_movements(
self, record, item, is_new_record, existing_movements):
transfer_id = item['id']
dbsession = self.request.dbsession
write_enabled = self.write_enabled
change_log = self.change_log
# Prepare movement_dict, a dict of movements already imported.
# movement_dict: {
# (number, amount_index, loop_id, currency, issuer_id): Movement
# }
movement_dict = {}
for movement in existing_movements:
row_key = (
movement.number,
movement.amount_index,
movement.loop_id,
movement.currency,
movement.issuer_id,
)
movement_dict[row_key] = movement
movements_unseen = set(movement_dict.keys())
item_movements = item['movements'] or ()
for movement in item_movements:
number = movement.get('number')
if not number:
raise ValueError(
"The OPN service needs to be migrated to support "
"movement numbers. (OPN: upgrade and run bin/resummarize)")
ts = to_datetime(movement['timestamp'])
action = movement['action']
from_id = movement['from_id']
to_id = movement['to_id']
by_loop = self.summarize_movement(
movement=movement, transfer_id=transfer_id, ts=ts)
# Add movement records based on the by_ploop dict.
for loop_key, delta_list in sorted(by_loop.items()):
loop_id, currency, issuer_id = loop_key
for amount_index, amount in enumerate(delta_list):
row_key = (number, amount_index) + loop_key
old_movement = movement_dict.get(row_key)
if old_movement is not None:
# The movement is already recorded.
movements_unseen.discard(row_key)
# Verify it has not changed, then continue.
self.verify_old_movement(
transfer_id=transfer_id,
number=number,
old_movement=old_movement,
ts=ts,
from_id=from_id,
to_id=to_id,
action=action,
amount=amount,
loop_id=loop_id,
currency=currency,
issuer_id=issuer_id,
)
continue
if write_enabled:
# Record the new movement.
movement = Movement(
transfer_record_id=record.id,
owner_id=self.owner_id,
number=number,
amount_index=amount_index,
loop_id=loop_id,
currency=currency,
issuer_id=issuer_id,
from_id=from_id,
to_id=to_id,
amount=amount,
action=action,
ts=ts,
)
dbsession.add(movement)
movement_dict[row_key] = movement
existing_movements.append(movement)
change_log.append({
'event_type': 'movement_add',
'transfer_id': transfer_id,
'movement_number': number,
})
if movements_unseen:
old_movement_numbers = sorted(
row_key[0] for row_key in movement_dict.keys())
new_movement_numbers = sorted(
movement['number'] for movement in item_movements)
msg = (
"Verification failure in transfer %s. "
"Previously downloaded movement(s) are no longer available. "
"Old movement numbers: %s, new movement numbers: %s" %
(transfer_id, old_movement_numbers, new_movement_numbers))
log.error(msg)
raise VerificationFailure(msg, transfer_id=transfer_id)
if write_enabled:
dbsession.flush() # Assign the movement IDs and log the movements
for interpreter in self.interpreters:
interpreter.sync_file_movements(
record=record,
movements=list(movement_dict.values()),
is_new_record=is_new_record)
def summarize_movement(self, movement, transfer_id, ts):
"""Summarize a movement.
Return {(loop_id, currency, issuer_id): [amount]}.
"""
if not movement['to_id']:
number = movement['number']
raise AssertionError(
"Movement %s in transfer %s has no to_id"
% (number, transfer_id))
# res: {(loop_id, currency, issuer_id): [amount]}
res = collections.defaultdict(list)
for loop in movement['loops']:
loop_id = loop['loop_id']
currency = loop['currency']
issuer_id = loop['issuer_id']
amount = Decimal(loop['amount'])
res[(loop_id, currency, issuer_id)].append(amount)
return res
def verify_old_movement(
self, old_movement, transfer_id, number,
ts, from_id, to_id, action,
amount, issuer_id, loop_id, currency):
if old_movement.ts != ts:
msg = (
"Verification failure in transfer %s. "
"Movement %s has changed: "
"recorded timestamp is %s, "
"new timestamp is %s" % (
transfer_id, number,
old_movement.ts.isoformat(),
ts.isoformat()))
raise VerificationFailure(msg, transfer_id=transfer_id)
if (old_movement.from_id != from_id or
old_movement.to_id != to_id):
msg = (
"Verification failure in transfer %s. "
"Movement %s has changed: "
"movement was from %s to %s, "
"new movement is from %s to %s" % (
transfer_id, number,
old_movement.from_id,
old_movement.to_id,
from_id,
to_id))
raise VerificationFailure(msg, transfer_id=transfer_id)
for attr, new_value in (
('currency', currency),
('loop_id', loop_id),
('amount', amount),
('issuer_id', issuer_id),
('action', action),
):
old_value = getattr(old_movement, attr)
if new_value != old_value:
msg = (
"Verification failure in transfer %s. "
"Movement %s has changed: "
"recorded %s is %s, new %s is %s" % (
transfer_id, number,
attr, old_value,
attr, new_value))
raise VerificationFailure(msg, transfer_id=transfer_id)
@reify
def interpreters(self):
"""Prepare the owner's file-specific movement interpreters.
Ignore all archived Files.
"""
request = self.request
dbsession = request.dbsession
owner_id = self.owner_id
files = (
dbsession.query(File)
.filter(File.owner_id == owner_id, ~File.archived)
.order_by(File.id)
.all())
return [
MovementInterpreter(
request=self.request,
file=file,
change_log=self.change_log)
for file in files]
def sync_missing(self):
"""Fill in any missing transfer interpretations for the user's Files.
"""
for interpreter in self.interpreters:
interpreter.sync_missing()
| 36.966102 | 79 | 0.509078 |
from decimal import Decimal
from opnreco.models.db import File
from opnreco.models.db import Movement
from opnreco.models.db import now_func
from opnreco.models.db import OwnerLog
from opnreco.models.db import Peer
from opnreco.models.db import TransferDownloadRecord
from opnreco.models.db import TransferRecord
from opnreco.mvinterp import MovementInterpreter
from opnreco.util import check_requests_response
from opnreco.util import to_datetime
from pyramid.decorator import reify
import collections
import logging
import os
import requests
log = logging.getLogger(__name__)
zero = Decimal()
null = None
class VerificationFailure(Exception):
def __init__(self, msg, transfer_id):
Exception.__init__(self, msg)
self.transfer_id = transfer_id
class SyncBase:
write_enabled = True
batch_limit = None
def __init__(self, request):
self.request = request
self.owner = owner = request.owner
self.owner_id = owner.id
self.api_url = os.environ['opn_api_url']
self.change_log = []
self.peers = {}
def download_batch(self, sync_ts_iso, sync_transfer_id, count_remain):
url = '%s/wallet/history_sync' % self.api_url
postdata = {
'sync_ts': sync_ts_iso,
'transfer_id': sync_transfer_id,
}
if count_remain:
postdata['count_remain'] = 'true'
if self.batch_limit:
postdata['limit'] = self.batch_limit
r = requests.post(
url,
data=postdata,
headers={'Authorization': 'Bearer %s' % self.request.access_token})
check_requests_response(r)
return r.json()
def import_transfer_records(self, transfers_download):
dbsession = self.request.dbsession
owner_id = self.owner_id
write_enabled = self.write_enabled
change_log = self.change_log
transfer_ids = [item['id'] for item in transfers_download['results']]
if not transfer_ids:
return
record_list = (
dbsession.query(TransferRecord)
.filter(
TransferRecord.owner_id == owner_id,
TransferRecord.transfer_id.in_(transfer_ids),
)
.all())
record_map = {record.transfer_id: record for record in record_list}
existing_movements_map = self.get_existing_movements_map(transfer_ids)
peer_ids = set()
peer_ids.add(self.owner_id)
for tsum in transfers_download['results']:
sender_id = tsum['sender_id']
if sender_id:
peer_ids.add(sender_id)
recipient_id = tsum['recipient_id']
if recipient_id:
peer_ids.add(recipient_id)
for m in tsum['movements']:
from_id = m['from_id']
if from_id:
peer_ids.add(from_id)
peer_ids.add(m['to_id'])
for loop in m['loops']:
peer_ids.add(loop['issuer_id'])
peer_rows = (
dbsession.query(Peer)
.filter(
Peer.owner_id == owner_id,
Peer.peer_id.in_(peer_ids),
).all())
for peer in peer_rows:
self.peers[peer.peer_id] = peer
if write_enabled:
self.import_peer(self.owner_id, None)
for tsum in transfers_download['results']:
if write_enabled:
self.import_peer(tsum['sender_id'], tsum['sender_info'])
if tsum.get('recipient_is_dfi_account'):
recipient_info = {}
recipient_info.update(tsum['recipient_info'])
recipient_info['is_dfi_account'] = True
else:
recipient_info = tsum['recipient_info']
if write_enabled:
self.import_peer(tsum['recipient_id'], recipient_info)
transfer_id = tsum['id']
bundled_transfers = tsum.get('bundled_transfers')
if (bundled_transfers is not None and
not isinstance(bundled_transfers, list)):
raise ValueError(
"Transfer %s: bundled_transfers should be None or a list, "
"not %s" % (transfer_id, repr(bundled_transfers)))
bundle_transfer_id = tsum.get('bundle_transfer_id')
if bundle_transfer_id:
bundle_transfer_id = str(bundle_transfer_id)
changed = []
kw = {
'workflow_type': tsum['workflow_type'],
'start': to_datetime(tsum['start']),
'currency': tsum['currency'],
'amount': Decimal(tsum['amount']),
'timestamp': to_datetime(tsum['timestamp']),
'next_activity': tsum['next_activity'],
'completed': tsum['completed'],
'canceled': tsum['canceled'],
'sender_id': tsum['sender_id'] or None,
'sender_uid': tsum['sender_uid'] or None,
'sender_info': tsum['sender_info'],
'recipient_id': tsum['recipient_id'] or None,
'recipient_uid': tsum['recipient_uid'] or None,
'recipient_info': tsum['recipient_info'],
'bundled_transfers': bundled_transfers,
'bundle_transfer_id': bundle_transfer_id,
}
record = record_map.get(transfer_id)
if record is None:
# Add a TransferRecord.
is_new_record = True
if write_enabled:
record = TransferRecord(
transfer_id=transfer_id,
owner_id=owner_id,
**kw)
changed.append(kw)
dbsession.add(record)
dbsession.flush() # Assign record.id
record_map[transfer_id] = record
change_log.append({
'event_type': 'transfer_add',
'transfer_id': transfer_id,
})
else:
# Update a TransferRecord.
is_new_record = False
immutable_attrs = ('workflow_type', 'start')
for attr in immutable_attrs:
if kw[attr] != getattr(record, attr):
msg = (
"Verification failure in transfer %s. "
"Immutable attribute changed. "
"Old %s was %s, new %s is %s" %
(transfer_id, attr, repr(getattr(record, attr)),
attr, repr(kw[attr])))
log.error(msg)
raise VerificationFailure(msg, transfer_id=transfer_id)
changed_map = {}
for attr, value in sorted(kw.items()):
if getattr(record, attr) != value:
if write_enabled:
setattr(record, attr, value)
changed_map[attr] = value
if changed_map:
changed.append(changed_map)
change_log.append({
'event_type': 'transfer_changes',
'transfer_id': transfer_id,
'changes': sorted(changed_map.keys()),
})
if write_enabled:
dbsession.add(TransferDownloadRecord(
opn_download_id=self.opn_download_id,
transfer_record_id=record.id,
transfer_id=transfer_id,
changed=changed))
if record is not None:
self.import_movements(
record, tsum,
is_new_record=is_new_record,
existing_movements=existing_movements_map[record.id])
dbsession.flush()
def get_existing_movements_map(self, transfer_ids):
dbsession = self.request.dbsession
owner_id = self.owner_id
all_movements = (
dbsession.query(Movement)
.join(
TransferRecord,
TransferRecord.id == Movement.transfer_record_id)
.filter(
TransferRecord.owner_id == owner_id,
TransferRecord.transfer_id.in_(transfer_ids))
.all())
res = collections.defaultdict(list)
for m in all_movements:
res[m.transfer_record_id].append(m)
return res
@reify
def account_map(self):
# Get the map of accounts from /wallet/info.
account_list = self.request.wallet_info['profile']['accounts']
return {a['id']: a for a in account_list}
def import_peer(self, peer_id, info):
if not peer_id:
# A transfer's sender or recipient is not yet known.
return
if not self.write_enabled:
# This method doesn't need to do anything when writing is
return
if peer_id == self.owner_id:
info = {
'title': self.owner.title,
'screen_name': self.owner.username,
'is_dfi_account': False,
'is_own_dfi_account': False,
}
else:
account = self.account_map.get(peer_id)
if account:
title = '%s at %s' % (
account['redacted_account_num'],
account['rdfi_name'],
)
if account['alias']:
title += ' (%s)' % account['alias']
info = {
'title': title,
'screen_name': '',
'is_dfi_account': True,
'is_own_dfi_account': True,
}
dbsession = self.request.dbsession
peer = self.peers.get(peer_id)
if peer is None:
peer = Peer(
owner_id=self.owner_id,
peer_id=peer_id,
title=info.get('title'),
username=info.get('screen_name'),
is_dfi_account=info.get('is_dfi_account'),
is_own_dfi_account=info.get('is_own_dfi_account'),
last_update=now_func,
)
dbsession.add(peer)
self.change_log.append({
'event_type': 'peer_add',
'peer_id': peer_id,
})
self.peers[peer_id] = peer
dbsession.add(OwnerLog(
owner_id=self.owner_id,
personal_id=self.request.personal_id,
event_type='peer_add',
content={
'peer_id': peer_id,
'info': info,
}))
else:
attrs_found = 0
changes = {}
attrs = (
('title', 'title'),
('screen_name', 'username'),
)
for source_attr, dest_attr in attrs:
value = info.get(source_attr)
if value:
attrs_found += 1
if getattr(peer, dest_attr) != value:
changes[dest_attr] = value
setattr(peer, dest_attr, value)
attrs = (
('is_dfi_account', 'is_dfi_account'),
('is_own_dfi_account', 'is_own_dfi_account'),
)
for source_attr, dest_attr in attrs:
value = info.get(source_attr)
if value is not None:
attrs_found += 1
if value and not getattr(peer, dest_attr):
changes[dest_attr] = True
setattr(peer, dest_attr, True)
if attrs_found:
peer.last_update = now_func
if changes:
self.change_log.append({
'event_type': 'peer_update',
'peer_id': peer_id,
})
dbsession.add(OwnerLog(
owner_id=self.owner_id,
personal_id=self.request.personal_id,
event_type='peer_update',
content={
'peer_id': peer_id,
'changes': changes,
}))
def import_movements(
self, record, item, is_new_record, existing_movements):
transfer_id = item['id']
dbsession = self.request.dbsession
write_enabled = self.write_enabled
change_log = self.change_log
movement_dict = {}
for movement in existing_movements:
row_key = (
movement.number,
movement.amount_index,
movement.loop_id,
movement.currency,
movement.issuer_id,
)
movement_dict[row_key] = movement
movements_unseen = set(movement_dict.keys())
item_movements = item['movements'] or ()
for movement in item_movements:
number = movement.get('number')
if not number:
raise ValueError(
"The OPN service needs to be migrated to support "
"movement numbers. (OPN: upgrade and run bin/resummarize)")
ts = to_datetime(movement['timestamp'])
action = movement['action']
from_id = movement['from_id']
to_id = movement['to_id']
by_loop = self.summarize_movement(
movement=movement, transfer_id=transfer_id, ts=ts)
for loop_key, delta_list in sorted(by_loop.items()):
loop_id, currency, issuer_id = loop_key
for amount_index, amount in enumerate(delta_list):
row_key = (number, amount_index) + loop_key
old_movement = movement_dict.get(row_key)
if old_movement is not None:
movements_unseen.discard(row_key)
self.verify_old_movement(
transfer_id=transfer_id,
number=number,
old_movement=old_movement,
ts=ts,
from_id=from_id,
to_id=to_id,
action=action,
amount=amount,
loop_id=loop_id,
currency=currency,
issuer_id=issuer_id,
)
continue
if write_enabled:
movement = Movement(
transfer_record_id=record.id,
owner_id=self.owner_id,
number=number,
amount_index=amount_index,
loop_id=loop_id,
currency=currency,
issuer_id=issuer_id,
from_id=from_id,
to_id=to_id,
amount=amount,
action=action,
ts=ts,
)
dbsession.add(movement)
movement_dict[row_key] = movement
existing_movements.append(movement)
change_log.append({
'event_type': 'movement_add',
'transfer_id': transfer_id,
'movement_number': number,
})
if movements_unseen:
old_movement_numbers = sorted(
row_key[0] for row_key in movement_dict.keys())
new_movement_numbers = sorted(
movement['number'] for movement in item_movements)
msg = (
"Verification failure in transfer %s. "
"Previously downloaded movement(s) are no longer available. "
"Old movement numbers: %s, new movement numbers: %s" %
(transfer_id, old_movement_numbers, new_movement_numbers))
log.error(msg)
raise VerificationFailure(msg, transfer_id=transfer_id)
if write_enabled:
dbsession.flush()
for interpreter in self.interpreters:
interpreter.sync_file_movements(
record=record,
movements=list(movement_dict.values()),
is_new_record=is_new_record)
def summarize_movement(self, movement, transfer_id, ts):
if not movement['to_id']:
number = movement['number']
raise AssertionError(
"Movement %s in transfer %s has no to_id"
% (number, transfer_id))
res = collections.defaultdict(list)
for loop in movement['loops']:
loop_id = loop['loop_id']
currency = loop['currency']
issuer_id = loop['issuer_id']
amount = Decimal(loop['amount'])
res[(loop_id, currency, issuer_id)].append(amount)
return res
def verify_old_movement(
self, old_movement, transfer_id, number,
ts, from_id, to_id, action,
amount, issuer_id, loop_id, currency):
if old_movement.ts != ts:
msg = (
"Verification failure in transfer %s. "
"Movement %s has changed: "
"recorded timestamp is %s, "
"new timestamp is %s" % (
transfer_id, number,
old_movement.ts.isoformat(),
ts.isoformat()))
raise VerificationFailure(msg, transfer_id=transfer_id)
if (old_movement.from_id != from_id or
old_movement.to_id != to_id):
msg = (
"Verification failure in transfer %s. "
"Movement %s has changed: "
"movement was from %s to %s, "
"new movement is from %s to %s" % (
transfer_id, number,
old_movement.from_id,
old_movement.to_id,
from_id,
to_id))
raise VerificationFailure(msg, transfer_id=transfer_id)
for attr, new_value in (
('currency', currency),
('loop_id', loop_id),
('amount', amount),
('issuer_id', issuer_id),
('action', action),
):
old_value = getattr(old_movement, attr)
if new_value != old_value:
msg = (
"Verification failure in transfer %s. "
"Movement %s has changed: "
"recorded %s is %s, new %s is %s" % (
transfer_id, number,
attr, old_value,
attr, new_value))
raise VerificationFailure(msg, transfer_id=transfer_id)
@reify
def interpreters(self):
request = self.request
dbsession = request.dbsession
owner_id = self.owner_id
files = (
dbsession.query(File)
.filter(File.owner_id == owner_id, ~File.archived)
.order_by(File.id)
.all())
return [
MovementInterpreter(
request=self.request,
file=file,
change_log=self.change_log)
for file in files]
def sync_missing(self):
for interpreter in self.interpreters:
interpreter.sync_missing()
| true | true |
f727055625800f39e74865dd3234c711f006f0de | 23,966 | py | Python | electroncash/tests/test_transaction.py | christroutner/Electron-Cash | d5217ed3e878bd56977181f022f9e5c43f449241 | [
"MIT"
] | 208 | 2017-07-25T19:52:15.000Z | 2018-09-21T13:44:58.000Z | electroncash/tests/test_transaction.py | christroutner/Electron-Cash | d5217ed3e878bd56977181f022f9e5c43f449241 | [
"MIT"
] | 1,478 | 2018-09-24T09:30:13.000Z | 2022-03-29T15:48:17.000Z | electroncash/tests/test_transaction.py | christroutner/Electron-Cash | d5217ed3e878bd56977181f022f9e5c43f449241 | [
"MIT"
] | 159 | 2018-09-24T12:56:47.000Z | 2022-03-28T23:52:17.000Z | import unittest
from pprint import pprint
from .. import transaction
from ..address import Address, ScriptOutput, PublicKey
from ..bitcoin import TYPE_ADDRESS, TYPE_PUBKEY, TYPE_SCRIPT
from ..keystore import xpubkey_to_address
from ..util import bh2u
unsigned_blob = '010000000149f35e43fefd22d8bb9e4b3ff294c6286154c25712baf6ab77b646e5074d6aed010000005701ff4c53ff0488b21e0000000000000000004f130d773e678a58366711837ec2e33ea601858262f8eaef246a7ebd19909c9a03c3b30e38ca7d797fee1223df1c9827b2a9f3379768f520910260220e0560014600002300feffffffd8e43201000000000118e43201000000001976a914e158fb15c888037fdc40fb9133b4c1c3c688706488ac5fbd0700'
signed_blob = '010000000149f35e43fefd22d8bb9e4b3ff294c6286154c25712baf6ab77b646e5074d6aed010000006a473044022025bdc804c6fe30966f6822dc25086bc6bb0366016e68e880cf6efd2468921f3202200e665db0404f6d6d9f86f73838306ac55bb0d0f6040ac6047d4e820f24f46885412103b5bbebceeb33c1b61f649596b9c3611c6b2853a1f6b48bce05dd54f667fa2166feffffff0118e43201000000001976a914e158fb15c888037fdc40fb9133b4c1c3c688706488ac5fbd0700'
v2_blob = "0200000001191601a44a81e061502b7bfbc6eaa1cef6d1e6af5308ef96c9342f71dbf4b9b5000000006b483045022100a6d44d0a651790a477e75334adfb8aae94d6612d01187b2c02526e340a7fd6c8022028bdf7a64a54906b13b145cd5dab21a26bd4b85d6044e9b97bceab5be44c2a9201210253e8e0254b0c95776786e40984c1aa32a7d03efa6bdacdea5f421b774917d346feffffff026b20fa04000000001976a914024db2e87dd7cfd0e5f266c5f212e21a31d805a588aca0860100000000001976a91421919b94ae5cefcdf0271191459157cdb41c4cbf88aca6240700"
nonmin_blob = '010000000142b88360bd83813139af3a251922b7f3d2ac88e45a2a703c28db8ee8580dc3a300000000654c41151dc44bece88c5933d737176499209a0b1688d5eb51eb6f1fd9fcf2fb32d138c94b96a4311673b75a31c054210b2058735ce6c12e529ddea4a6b91e4a3786d94121034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1feffffff012e030000000000001976a914480d1be8ab76f8cdd85ce4077f51d35b0baaa25a88ac4b521400'
class TestBCDataStream(unittest.TestCase):
def test_compact_size(self):
s = transaction.BCDataStream()
values = [0, 1, 252, 253, 2**16-1, 2**16, 2**32-1, 2**32, 2**64-1]
for v in values:
s.write_compact_size(v)
with self.assertRaises(transaction.SerializationError):
s.write_compact_size(-1)
self.assertEqual(bh2u(s.input),
'0001fcfdfd00fdfffffe00000100feffffffffff0000000001000000ffffffffffffffffff')
for v in values:
self.assertEqual(s.read_compact_size(), v)
with self.assertRaises(transaction.SerializationError):
s.read_compact_size()
def test_string(self):
s = transaction.BCDataStream()
with self.assertRaises(transaction.SerializationError):
s.read_string()
msgs = ['Hello', ' ', 'World', '', '!']
for msg in msgs:
s.write_string(msg)
for msg in msgs:
self.assertEqual(s.read_string(), msg)
with self.assertRaises(transaction.SerializationError):
s.read_string()
def test_bytes(self):
s = transaction.BCDataStream()
s.write(b'foobar')
self.assertEqual(s.read_bytes(3), b'foo')
self.assertEqual(s.read_bytes(2), b'ba')
self.assertEqual(s.read_bytes(4), b'r')
self.assertEqual(s.read_bytes(1), b'')
class TestTransaction(unittest.TestCase):
def test_tx_unsigned(self):
expected = {
'inputs': [{'address': Address.from_string('13Vp8Y3hD5Cb6sERfpxePz5vGJizXbWciN'),
'num_sig': 1,
'prevout_hash': 'ed6a4d07e546b677abf6ba1257c2546128c694f23f4b9ebbd822fdfe435ef349',
'prevout_n': 1,
'pubkeys': ['03b5bbebceeb33c1b61f649596b9c3611c6b2853a1f6b48bce05dd54f667fa2166'],
'sequence': 4294967294,
'signatures': [None],
'type': 'p2pkh',
'value': 20112600,
'x_pubkeys': ['ff0488b21e0000000000000000004f130d773e678a58366711837ec2e33ea601858262f8eaef246a7ebd19909c9a03c3b30e38ca7d797fee1223df1c9827b2a9f3379768f520910260220e0560014600002300']}],
'lockTime': 507231,
'outputs': [{'address': Address.from_string('1MYXdf4moacvaEKZ57ozerpJ3t9xSeN6LK'),
'prevout_n': 0,
'scriptPubKey': '76a914e158fb15c888037fdc40fb9133b4c1c3c688706488ac',
'type': 0,
'value': 20112408}],
'version': 1}
tx = transaction.Transaction(unsigned_blob)
calc = tx.deserialize()
self.assertEqual(calc, expected)
self.assertEqual(tx.deserialize(), None)
self.assertEqual(tx.as_dict(), {'hex': unsigned_blob, 'complete': False, 'final': True})
self.assertEqual(tx.get_outputs(), [(Address.from_string('1MYXdf4moacvaEKZ57ozerpJ3t9xSeN6LK'), 20112408)])
self.assertEqual(tx.get_output_addresses(), [Address.from_string('1MYXdf4moacvaEKZ57ozerpJ3t9xSeN6LK')])
self.assertTrue(tx.has_address(Address.from_string('1MYXdf4moacvaEKZ57ozerpJ3t9xSeN6LK')))
self.assertTrue(tx.has_address(Address.from_string('13Vp8Y3hD5Cb6sERfpxePz5vGJizXbWciN')))
self.assertFalse(tx.has_address(Address.from_string('1CQj15y1N7LDHp7wTt28eoD1QhHgFgxECH')))
self.assertEqual(tx.serialize(), unsigned_blob)
tx.update_signatures(['3044022025bdc804c6fe30966f6822dc25086bc6bb0366016e68e880cf6efd2468921f3202200e665db0404f6d6d9f86f73838306ac55bb0d0f6040ac6047d4e820f24f46885'])
self.assertEqual(tx.raw, signed_blob)
tx.update(unsigned_blob)
tx.raw = None
blob = str(tx)
self.assertEqual(transaction.deserialize(blob), expected)
def test_tx_signed(self):
expected = {
'inputs': [{'address': Address.from_string('13Vp8Y3hD5Cb6sERfpxePz5vGJizXbWciN'),
'num_sig': 1,
'prevout_hash': 'ed6a4d07e546b677abf6ba1257c2546128c694f23f4b9ebbd822fdfe435ef349',
'prevout_n': 1,
'pubkeys': ['03b5bbebceeb33c1b61f649596b9c3611c6b2853a1f6b48bce05dd54f667fa2166'],
'scriptSig': '473044022025bdc804c6fe30966f6822dc25086bc6bb0366016e68e880cf6efd2468921f3202200e665db0404f6d6d9f86f73838306ac55bb0d0f6040ac6047d4e820f24f46885412103b5bbebceeb33c1b61f649596b9c3611c6b2853a1f6b48bce05dd54f667fa2166',
'sequence': 4294967294,
'signatures': ['3044022025bdc804c6fe30966f6822dc25086bc6bb0366016e68e880cf6efd2468921f3202200e665db0404f6d6d9f86f73838306ac55bb0d0f6040ac6047d4e820f24f4688541'],
'type': 'p2pkh',
'x_pubkeys': ['03b5bbebceeb33c1b61f649596b9c3611c6b2853a1f6b48bce05dd54f667fa2166']}],
'lockTime': 507231,
'outputs': [{'address': Address.from_string('1MYXdf4moacvaEKZ57ozerpJ3t9xSeN6LK'),
'prevout_n': 0,
'scriptPubKey': '76a914e158fb15c888037fdc40fb9133b4c1c3c688706488ac',
'type': 0,
'value': 20112408}],
'version': 1
}
tx = transaction.Transaction(signed_blob)
self.assertEqual(tx.deserialize(), expected)
self.assertEqual(tx.deserialize(), None)
self.assertEqual(tx.as_dict(), {'hex': signed_blob, 'complete': True, 'final': True})
self.assertEqual(tx.serialize(), signed_blob)
tx.update_signatures([expected['inputs'][0]['signatures'][0][:-2]])
self.assertEqual(tx.estimated_size(), 191)
def test_tx_nonminimal_scriptSig(self):
# The nonminimal push is the '4c41...' (PUSHDATA1 length=0x41 [...]) at
# the start of the scriptSig. Minimal is '41...' (PUSH0x41 [...]).
expected = {
'inputs': [{'address': Address.from_pubkey('034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1'),
'num_sig': 1,
'prevout_hash': 'a3c30d58e88edb283c702a5ae488acd2f3b72219253aaf39318183bd6083b842',
'prevout_n': 0,
'pubkeys': ['034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1'],
'scriptSig': '4c41151dc44bece88c5933d737176499209a0b1688d5eb51eb6f1fd9fcf2fb32d138c94b96a4311673b75a31c054210b2058735ce6c12e529ddea4a6b91e4a3786d94121034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1',
'sequence': 4294967294,
'signatures': ['151dc44bece88c5933d737176499209a0b1688d5eb51eb6f1fd9fcf2fb32d138c94b96a4311673b75a31c054210b2058735ce6c12e529ddea4a6b91e4a3786d941'],
'type': 'p2pkh',
'x_pubkeys': ['034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1']}],
'lockTime': 1331787,
'outputs': [{'address': Address.from_pubkey('034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1'),
'prevout_n': 0,
'scriptPubKey': '76a914480d1be8ab76f8cdd85ce4077f51d35b0baaa25a88ac',
'type': 0,
'value': 814}],
'version': 1
}
tx = transaction.Transaction(nonmin_blob)
self.assertEqual(tx.deserialize(), expected)
self.assertEqual(tx.deserialize(), None)
self.assertEqual(tx.as_dict(), {'hex': nonmin_blob, 'complete': True, 'final': True})
self.assertEqual(tx.serialize(), nonmin_blob)
# if original push is lost, will wrongly be e64808c1eb86e8cab68fcbd8b7f3b01f8cc8f39bd05722f1cf2d7cd9b35fb4e3
self.assertEqual(tx.txid(), '66020177ae3273d874728667b6a24e0a1c0200079119f3d0c294da40f0e85d34')
# cause it to lose the original push, and reserialize with minimal
del tx.inputs()[0]['scriptSig']
self.assertEqual(tx.txid(), 'e64808c1eb86e8cab68fcbd8b7f3b01f8cc8f39bd05722f1cf2d7cd9b35fb4e3')
def test_errors(self):
with self.assertRaises(TypeError):
transaction.Transaction.pay_script(output_type=None, addr='')
with self.assertRaises(BaseException):
xpubkey_to_address('')
def test_parse_xpub(self):
res = xpubkey_to_address('fe4e13b0f311a55b8a5db9a32e959da9f011b131019d4cebe6141b9e2c93edcbfc0954c358b062a9f94111548e50bde5847a3096b8b7872dcffadb0e9579b9017b01000200')
self.assertEqual(res, ('04ee98d63800824486a1cf5b4376f2f574d86e0a3009a6448105703453f3368e8e1d8d090aaecdd626a45cc49876709a3bbb6dc96a4311b3cac03e225df5f63dfc', Address.from_string('19h943e4diLc68GXW7G75QNe2KWuMu7BaJ')))
def test_version_field(self):
tx = transaction.Transaction(v2_blob)
self.assertEqual(tx.txid(), "b97f9180173ab141b61b9f944d841e60feec691d6daab4d4d932b24dd36606fe")
def test_txid_coinbase_to_p2pk(self):
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4103400d0302ef02062f503253482f522cfabe6d6dd90d39663d10f8fd25ec88338295d4c6ce1c90d4aeb368d8bdbadcc1da3b635801000000000000000474073e03ffffffff013c25cf2d01000000434104b0bd634234abbb1ba1e986e884185c61cf43e001f9137f23c2c409273eb16e6537a576782eba668a7ef8bd3b3cfb1edb7117ab65129b8a2e681f3c1e0908ef7bac00000000')
self.assertEqual('dbaf14e1c476e76ea05a8b71921a46d6b06f0a950f17c5f9f1a03b8fae467f10', tx.txid())
def test_txid_coinbase_to_p2pkh(self):
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff25033ca0030400001256124d696e656420627920425443204775696c640800000d41000007daffffffff01c00d1298000000001976a91427a1f12771de5cc3b73941664b2537c15316be4388ac00000000')
self.assertEqual('4328f9311c6defd9ae1bd7f4516b62acf64b361eb39dfcf09d9925c5fd5c61e8', tx.txid())
def test_txid_p2pk_to_p2pkh(self):
tx = transaction.Transaction('010000000118231a31d2df84f884ced6af11dc24306319577d4d7c340124a7e2dd9c314077000000004847304402200b6c45891aed48937241907bc3e3868ee4c792819821fcde33311e5a3da4789a02205021b59692b652a01f5f009bd481acac2f647a7d9c076d71d85869763337882e01fdffffff016c95052a010000001976a9149c4891e7791da9e622532c97f43863768264faaf88ac00000000')
self.assertEqual('90ba90a5b115106d26663fce6c6215b8699c5d4b2672dd30756115f3337dddf9', tx.txid())
def test_txid_p2pk_to_p2sh(self):
tx = transaction.Transaction('0100000001e4643183d6497823576d17ac2439fb97eba24be8137f312e10fcc16483bb2d070000000048473044022032bbf0394dfe3b004075e3cbb3ea7071b9184547e27f8f73f967c4b3f6a21fa4022073edd5ae8b7b638f25872a7a308bb53a848baa9b9cc70af45fcf3c683d36a55301fdffffff011821814a0000000017a9143c640bc28a346749c09615b50211cb051faff00f8700000000')
self.assertEqual('172bdf5a690b874385b98d7ab6f6af807356f03a26033c6a65ab79b4ac2085b5', tx.txid())
def test_txid_p2pkh_to_p2pkh(self):
tx = transaction.Transaction('0100000001f9dd7d33f315617530dd72264b5d9c69b815626cce3f66266d1015b1a590ba90000000006a4730440220699bfee3d280a499daf4af5593e8750b54fef0557f3c9f717bfa909493a84f60022057718eec7985b7796bb8630bf6ea2e9bf2892ac21bd6ab8f741a008537139ffe012103b4289890b40590447b57f773b5843bf0400e9cead08be225fac587b3c2a8e973fdffffff01ec24052a010000001976a914ce9ff3d15ed5f3a3d94b583b12796d063879b11588ac00000000')
self.assertEqual('24737c68f53d4b519939119ed83b2a8d44d716d7f3ca98bcecc0fbb92c2085ce', tx.txid())
def test_txid_p2pkh_to_p2sh(self):
tx = transaction.Transaction('010000000195232c30f6611b9f2f82ec63f5b443b132219c425e1824584411f3d16a7a54bc000000006b4830450221009f39ac457dc8ff316e5cc03161c9eff6212d8694ccb88d801dbb32e85d8ed100022074230bb05e99b85a6a50d2b71e7bf04d80be3f1d014ea038f93943abd79421d101210317be0f7e5478e087453b9b5111bdad586038720f16ac9658fd16217ffd7e5785fdffffff0200e40b540200000017a914d81df3751b9e7dca920678cc19cac8d7ec9010b08718dfd63c2c0000001976a914303c42b63569ff5b390a2016ff44651cd84c7c8988acc7010000')
self.assertEqual('155e4740fa59f374abb4e133b87247dccc3afc233cb97c2bf2b46bba3094aedc', tx.txid())
def test_txid_p2sh_to_p2pkh(self):
tx = transaction.Transaction('0100000001b98d550fa331da21038952d6931ffd3607c440ab2985b75477181b577de118b10b000000fdfd0000483045022100a26ea637a6d39aa27ea7a0065e9691d477e23ad5970b5937a9b06754140cf27102201b00ed050b5c468ee66f9ef1ff41dfb3bd64451469efaab1d4b56fbf92f9df48014730440220080421482a37cc9a98a8dc3bf9d6b828092ad1a1357e3be34d9c5bbdca59bb5f02206fa88a389c4bf31fa062977606801f3ea87e86636da2625776c8c228bcd59f8a014c69522102420e820f71d17989ed73c0ff2ec1c1926cf989ad6909610614ee90cf7db3ef8721036eae8acbae031fdcaf74a824f3894bf54881b42911bd3ad056ea59a33ffb3d312103752669b75eb4dc0cca209af77a59d2c761cbb47acc4cf4b316ded35080d92e8253aeffffffff0101ac3a00000000001976a914a6b6bcc85975bf6a01a0eabb2ac97d5a418223ad88ac00000000')
self.assertEqual('0ea982e8e601863e604ef6d9acf9317ae59d3eac9cafee6dd946abadafd35af8', tx.txid())
def test_txid_p2sh_to_p2sh(self):
tx = transaction.Transaction('01000000018695eef2250b3a3b6ef45fe065e601610e69dd7a56de742092d40e6276e6c9ec00000000fdfd000047304402203199bf8e49f7203e8bcbfd754aa356c6ba61643a3490f8aef3888e0aaa7c048c02201e7180bfd670f4404e513359b4020fbc85d6625e3e265e0c357e8611f11b83e401483045022100e60f897db114679f9a310a032a22e9a7c2b8080affe2036c480ff87bf6f45ada02202dbd27af38dd97d418e24d89c3bb7a97e359dd927c1094d8c9e5cac57df704fb014c69522103adc563b9f5e506f485978f4e913c10da208eac6d96d49df4beae469e81a4dd982102c52bc9643a021464a31a3bfa99cfa46afaa4b3acda31e025da204b4ee44cc07a2103a1c8edcc3310b3d7937e9e4179e7bd9cdf31c276f985f4eb356f21b874225eb153aeffffffff02b8ce05000000000017a9145c9c158430b7b79c3ad7ef9bdf981601eda2412d87b82400000000000017a9146bf3ff89019ecc5971a39cdd4f1cabd3b647ad5d8700000000')
self.assertEqual('2caab5a11fa1ec0f5bb014b8858d00fecf2c001e15d22ad04379ad7b36fef305', tx.txid())
def test_parse_output_p2pkh(self):
tx = transaction.Transaction('010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000001976a914aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa88ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_ADDRESS, Address.from_P2PKH_hash(b'\xaa'*20), 0)])
self.assertEqual('7a0e3fcbdaa9ecc6ccce1ad325b6b661e774a57f2e8519c679964e2dd32e200f', tx.txid())
def test_parse_output_p2pkh_nonmin(self):
tx = transaction.Transaction('010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000001a76a94c14aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa88ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(bytes.fromhex('76a94c14aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa88ac')), 0)])
self.assertEqual('69706667959fd2e6aa3385acdcd2c478e875344422e1f4c94eb06065268540d1', tx.txid())
def test_parse_output_p2sh(self):
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000017a914aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8700000000')
self.assertEqual(tx.outputs(), [(TYPE_ADDRESS, Address.from_P2SH_hash(b'\xaa'*20), 0)])
self.assertEqual('d33750908965d24a411d94371fdc64ebb06f13bf4d19e73372347e6b4eeca49f', tx.txid())
def test_parse_output_p2sh_nonmin(self):
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000018a94c14aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8700000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(bytes.fromhex('a94c14aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa87')), 0)])
self.assertEqual('dd4b174d7094c63c9f530703702a8d76c7b3fe5fc278ba2837dbd75bc5b0b296', tx.txid())
def test_parse_output_p2pk(self):
tx = transaction.Transaction('010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000002321030000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_PUBKEY, PublicKey.from_pubkey(b'\x03' + b'\x00'*32), 0)])
self.assertEqual('78afa0576a4ee6e7db663a58202f11bab8e860dd4a2226f856a2490187046b3d', tx.txid())
def test_parse_output_p2pk_badpubkey(self):
tx = transaction.Transaction('010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000002321040000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(bytes.fromhex('21040000000000000000000000000000000000000000000000000000000000000000ac')), 0)])
self.assertEqual('8e57f026081b6589570dc5e6e339b706d2ac75e6cbd1896275dee176b8d35ba6', tx.txid())
def test_parse_output_p2pk_nonmin(self):
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000244c21030000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(bytes.fromhex('4c21030000000000000000000000000000000000000000000000000000000000000000ac')), 0)])
self.assertEqual('730d77384d7bfc965caa338b501e7b071092474320af6ea19052859c93bfaf98', tx.txid())
def test_parse_output_p2pk_uncomp(self):
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000043410400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_PUBKEY, PublicKey.from_pubkey(b'\x04' + b'\x00'*64), 0)])
self.assertEqual('053626542393dd957a14bb2bcbfdcf3564a5f438e923799e1b9714c4a8e70a7c', tx.txid())
def test_parse_output_p2pk_uncomp_badpubkey(self):
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000043410300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x41\x03' + b'\x00'*64 + b'\xac'), 0)])
self.assertEqual('a15a9f86f5a47ef7efc28ae701f5b2a353aff76a21cb22ff08b77759533fb59b', tx.txid())
def test_parse_output_p2pk_uncomp_nonmin(self):
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000444c410400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x4c\x41\x04' + b'\x00'*64 + b'\xac'), 0)])
self.assertEqual('bd8e0827c8bacd6bac10dd28d5fc6ad52f3fef3f91200c7c1d8698531c9325e9', tx.txid())
def test_parse_output_baremultisig(self):
# no special support for recognizing bare multisig outputs
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000025512103000000000000000000000000000000000000000000000000000000000000000051ae00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x51\x21\x03' + b'\x00'*32 + b'\x51\xae'), 0)])
self.assertEqual('b1f66fde0aa3d5af03be3c69f599069aad217e939f36cacc2372ea4fece7d57b', tx.txid())
def test_parse_output_baremultisig_nonmin(self):
# even if bare multisig support is added, note that this case should still remain unrecognized
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000026514c2103000000000000000000000000000000000000000000000000000000000000000051ae00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x51\x4c\x21\x03' + b'\x00'*32 + b'\x51\xae'), 0)])
self.assertEqual('eb0b69c86a05499cabc42b12d4706b18eab97ed6155fc966e488a433edf05932', tx.txid())
def test_parse_output_truncated1(self):
# truncated in middle of PUSHDATA2's first argument
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000024d0100000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x4d\x01'), 0)])
self.assertIn("Invalid script", tx.outputs()[0][1].to_ui_string())
self.assertEqual('72d8af8edcc603c6c64390ac5eb913b97a80efe0f5ae7c00ad5397eb5786cd33', tx.txid())
def test_parse_output_truncated1(self):
# truncated in middle of PUSHDATA2's second argument
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000044d0200ff00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x4d\x02\x00\xff'), 0)])
self.assertIn("Invalid script", tx.outputs()[0][1].to_ui_string())
self.assertEqual('976667816c4955189973cc56ac839844da4ed32a8bd22a8c6217c2c04e69e9d7', tx.txid())
def test_parse_output_empty(self):
# nothing wrong with empty output script
tx = transaction.Transaction('010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b''), 0)])
self.assertEqual("", tx.outputs()[0][1].to_ui_string())
self.assertEqual('50fa7bd4e5e2d3220fd2e84effec495b9845aba379d853408779d59a4b0b4f59', tx.txid())
class NetworkMock(object):
def __init__(self, unspent):
self.unspent = unspent
def synchronous_get(self, arg):
return self.unspent
| 78.320261 | 780 | 0.791747 | import unittest
from pprint import pprint
from .. import transaction
from ..address import Address, ScriptOutput, PublicKey
from ..bitcoin import TYPE_ADDRESS, TYPE_PUBKEY, TYPE_SCRIPT
from ..keystore import xpubkey_to_address
from ..util import bh2u
unsigned_blob = '010000000149f35e43fefd22d8bb9e4b3ff294c6286154c25712baf6ab77b646e5074d6aed010000005701ff4c53ff0488b21e0000000000000000004f130d773e678a58366711837ec2e33ea601858262f8eaef246a7ebd19909c9a03c3b30e38ca7d797fee1223df1c9827b2a9f3379768f520910260220e0560014600002300feffffffd8e43201000000000118e43201000000001976a914e158fb15c888037fdc40fb9133b4c1c3c688706488ac5fbd0700'
signed_blob = '010000000149f35e43fefd22d8bb9e4b3ff294c6286154c25712baf6ab77b646e5074d6aed010000006a473044022025bdc804c6fe30966f6822dc25086bc6bb0366016e68e880cf6efd2468921f3202200e665db0404f6d6d9f86f73838306ac55bb0d0f6040ac6047d4e820f24f46885412103b5bbebceeb33c1b61f649596b9c3611c6b2853a1f6b48bce05dd54f667fa2166feffffff0118e43201000000001976a914e158fb15c888037fdc40fb9133b4c1c3c688706488ac5fbd0700'
v2_blob = "0200000001191601a44a81e061502b7bfbc6eaa1cef6d1e6af5308ef96c9342f71dbf4b9b5000000006b483045022100a6d44d0a651790a477e75334adfb8aae94d6612d01187b2c02526e340a7fd6c8022028bdf7a64a54906b13b145cd5dab21a26bd4b85d6044e9b97bceab5be44c2a9201210253e8e0254b0c95776786e40984c1aa32a7d03efa6bdacdea5f421b774917d346feffffff026b20fa04000000001976a914024db2e87dd7cfd0e5f266c5f212e21a31d805a588aca0860100000000001976a91421919b94ae5cefcdf0271191459157cdb41c4cbf88aca6240700"
nonmin_blob = '010000000142b88360bd83813139af3a251922b7f3d2ac88e45a2a703c28db8ee8580dc3a300000000654c41151dc44bece88c5933d737176499209a0b1688d5eb51eb6f1fd9fcf2fb32d138c94b96a4311673b75a31c054210b2058735ce6c12e529ddea4a6b91e4a3786d94121034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1feffffff012e030000000000001976a914480d1be8ab76f8cdd85ce4077f51d35b0baaa25a88ac4b521400'
class TestBCDataStream(unittest.TestCase):
def test_compact_size(self):
s = transaction.BCDataStream()
values = [0, 1, 252, 253, 2**16-1, 2**16, 2**32-1, 2**32, 2**64-1]
for v in values:
s.write_compact_size(v)
with self.assertRaises(transaction.SerializationError):
s.write_compact_size(-1)
self.assertEqual(bh2u(s.input),
'0001fcfdfd00fdfffffe00000100feffffffffff0000000001000000ffffffffffffffffff')
for v in values:
self.assertEqual(s.read_compact_size(), v)
with self.assertRaises(transaction.SerializationError):
s.read_compact_size()
def test_string(self):
s = transaction.BCDataStream()
with self.assertRaises(transaction.SerializationError):
s.read_string()
msgs = ['Hello', ' ', 'World', '', '!']
for msg in msgs:
s.write_string(msg)
for msg in msgs:
self.assertEqual(s.read_string(), msg)
with self.assertRaises(transaction.SerializationError):
s.read_string()
def test_bytes(self):
s = transaction.BCDataStream()
s.write(b'foobar')
self.assertEqual(s.read_bytes(3), b'foo')
self.assertEqual(s.read_bytes(2), b'ba')
self.assertEqual(s.read_bytes(4), b'r')
self.assertEqual(s.read_bytes(1), b'')
class TestTransaction(unittest.TestCase):
def test_tx_unsigned(self):
expected = {
'inputs': [{'address': Address.from_string('13Vp8Y3hD5Cb6sERfpxePz5vGJizXbWciN'),
'num_sig': 1,
'prevout_hash': 'ed6a4d07e546b677abf6ba1257c2546128c694f23f4b9ebbd822fdfe435ef349',
'prevout_n': 1,
'pubkeys': ['03b5bbebceeb33c1b61f649596b9c3611c6b2853a1f6b48bce05dd54f667fa2166'],
'sequence': 4294967294,
'signatures': [None],
'type': 'p2pkh',
'value': 20112600,
'x_pubkeys': ['ff0488b21e0000000000000000004f130d773e678a58366711837ec2e33ea601858262f8eaef246a7ebd19909c9a03c3b30e38ca7d797fee1223df1c9827b2a9f3379768f520910260220e0560014600002300']}],
'lockTime': 507231,
'outputs': [{'address': Address.from_string('1MYXdf4moacvaEKZ57ozerpJ3t9xSeN6LK'),
'prevout_n': 0,
'scriptPubKey': '76a914e158fb15c888037fdc40fb9133b4c1c3c688706488ac',
'type': 0,
'value': 20112408}],
'version': 1}
tx = transaction.Transaction(unsigned_blob)
calc = tx.deserialize()
self.assertEqual(calc, expected)
self.assertEqual(tx.deserialize(), None)
self.assertEqual(tx.as_dict(), {'hex': unsigned_blob, 'complete': False, 'final': True})
self.assertEqual(tx.get_outputs(), [(Address.from_string('1MYXdf4moacvaEKZ57ozerpJ3t9xSeN6LK'), 20112408)])
self.assertEqual(tx.get_output_addresses(), [Address.from_string('1MYXdf4moacvaEKZ57ozerpJ3t9xSeN6LK')])
self.assertTrue(tx.has_address(Address.from_string('1MYXdf4moacvaEKZ57ozerpJ3t9xSeN6LK')))
self.assertTrue(tx.has_address(Address.from_string('13Vp8Y3hD5Cb6sERfpxePz5vGJizXbWciN')))
self.assertFalse(tx.has_address(Address.from_string('1CQj15y1N7LDHp7wTt28eoD1QhHgFgxECH')))
self.assertEqual(tx.serialize(), unsigned_blob)
tx.update_signatures(['3044022025bdc804c6fe30966f6822dc25086bc6bb0366016e68e880cf6efd2468921f3202200e665db0404f6d6d9f86f73838306ac55bb0d0f6040ac6047d4e820f24f46885'])
self.assertEqual(tx.raw, signed_blob)
tx.update(unsigned_blob)
tx.raw = None
blob = str(tx)
self.assertEqual(transaction.deserialize(blob), expected)
def test_tx_signed(self):
expected = {
'inputs': [{'address': Address.from_string('13Vp8Y3hD5Cb6sERfpxePz5vGJizXbWciN'),
'num_sig': 1,
'prevout_hash': 'ed6a4d07e546b677abf6ba1257c2546128c694f23f4b9ebbd822fdfe435ef349',
'prevout_n': 1,
'pubkeys': ['03b5bbebceeb33c1b61f649596b9c3611c6b2853a1f6b48bce05dd54f667fa2166'],
'scriptSig': '473044022025bdc804c6fe30966f6822dc25086bc6bb0366016e68e880cf6efd2468921f3202200e665db0404f6d6d9f86f73838306ac55bb0d0f6040ac6047d4e820f24f46885412103b5bbebceeb33c1b61f649596b9c3611c6b2853a1f6b48bce05dd54f667fa2166',
'sequence': 4294967294,
'signatures': ['3044022025bdc804c6fe30966f6822dc25086bc6bb0366016e68e880cf6efd2468921f3202200e665db0404f6d6d9f86f73838306ac55bb0d0f6040ac6047d4e820f24f4688541'],
'type': 'p2pkh',
'x_pubkeys': ['03b5bbebceeb33c1b61f649596b9c3611c6b2853a1f6b48bce05dd54f667fa2166']}],
'lockTime': 507231,
'outputs': [{'address': Address.from_string('1MYXdf4moacvaEKZ57ozerpJ3t9xSeN6LK'),
'prevout_n': 0,
'scriptPubKey': '76a914e158fb15c888037fdc40fb9133b4c1c3c688706488ac',
'type': 0,
'value': 20112408}],
'version': 1
}
tx = transaction.Transaction(signed_blob)
self.assertEqual(tx.deserialize(), expected)
self.assertEqual(tx.deserialize(), None)
self.assertEqual(tx.as_dict(), {'hex': signed_blob, 'complete': True, 'final': True})
self.assertEqual(tx.serialize(), signed_blob)
tx.update_signatures([expected['inputs'][0]['signatures'][0][:-2]])
self.assertEqual(tx.estimated_size(), 191)
def test_tx_nonminimal_scriptSig(self):
expected = {
'inputs': [{'address': Address.from_pubkey('034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1'),
'num_sig': 1,
'prevout_hash': 'a3c30d58e88edb283c702a5ae488acd2f3b72219253aaf39318183bd6083b842',
'prevout_n': 0,
'pubkeys': ['034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1'],
'scriptSig': '4c41151dc44bece88c5933d737176499209a0b1688d5eb51eb6f1fd9fcf2fb32d138c94b96a4311673b75a31c054210b2058735ce6c12e529ddea4a6b91e4a3786d94121034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1',
'sequence': 4294967294,
'signatures': ['151dc44bece88c5933d737176499209a0b1688d5eb51eb6f1fd9fcf2fb32d138c94b96a4311673b75a31c054210b2058735ce6c12e529ddea4a6b91e4a3786d941'],
'type': 'p2pkh',
'x_pubkeys': ['034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1']}],
'lockTime': 1331787,
'outputs': [{'address': Address.from_pubkey('034a29987f30ad5d23d79ed5215e034c51f6825bdb2aa595c2bdeb37902960b3d1'),
'prevout_n': 0,
'scriptPubKey': '76a914480d1be8ab76f8cdd85ce4077f51d35b0baaa25a88ac',
'type': 0,
'value': 814}],
'version': 1
}
tx = transaction.Transaction(nonmin_blob)
self.assertEqual(tx.deserialize(), expected)
self.assertEqual(tx.deserialize(), None)
self.assertEqual(tx.as_dict(), {'hex': nonmin_blob, 'complete': True, 'final': True})
self.assertEqual(tx.serialize(), nonmin_blob)
self.assertEqual(tx.txid(), '66020177ae3273d874728667b6a24e0a1c0200079119f3d0c294da40f0e85d34')
del tx.inputs()[0]['scriptSig']
self.assertEqual(tx.txid(), 'e64808c1eb86e8cab68fcbd8b7f3b01f8cc8f39bd05722f1cf2d7cd9b35fb4e3')
def test_errors(self):
with self.assertRaises(TypeError):
transaction.Transaction.pay_script(output_type=None, addr='')
with self.assertRaises(BaseException):
xpubkey_to_address('')
def test_parse_xpub(self):
res = xpubkey_to_address('fe4e13b0f311a55b8a5db9a32e959da9f011b131019d4cebe6141b9e2c93edcbfc0954c358b062a9f94111548e50bde5847a3096b8b7872dcffadb0e9579b9017b01000200')
self.assertEqual(res, ('04ee98d63800824486a1cf5b4376f2f574d86e0a3009a6448105703453f3368e8e1d8d090aaecdd626a45cc49876709a3bbb6dc96a4311b3cac03e225df5f63dfc', Address.from_string('19h943e4diLc68GXW7G75QNe2KWuMu7BaJ')))
def test_version_field(self):
tx = transaction.Transaction(v2_blob)
self.assertEqual(tx.txid(), "b97f9180173ab141b61b9f944d841e60feec691d6daab4d4d932b24dd36606fe")
def test_txid_coinbase_to_p2pk(self):
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff4103400d0302ef02062f503253482f522cfabe6d6dd90d39663d10f8fd25ec88338295d4c6ce1c90d4aeb368d8bdbadcc1da3b635801000000000000000474073e03ffffffff013c25cf2d01000000434104b0bd634234abbb1ba1e986e884185c61cf43e001f9137f23c2c409273eb16e6537a576782eba668a7ef8bd3b3cfb1edb7117ab65129b8a2e681f3c1e0908ef7bac00000000')
self.assertEqual('dbaf14e1c476e76ea05a8b71921a46d6b06f0a950f17c5f9f1a03b8fae467f10', tx.txid())
def test_txid_coinbase_to_p2pkh(self):
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff25033ca0030400001256124d696e656420627920425443204775696c640800000d41000007daffffffff01c00d1298000000001976a91427a1f12771de5cc3b73941664b2537c15316be4388ac00000000')
self.assertEqual('4328f9311c6defd9ae1bd7f4516b62acf64b361eb39dfcf09d9925c5fd5c61e8', tx.txid())
def test_txid_p2pk_to_p2pkh(self):
tx = transaction.Transaction('010000000118231a31d2df84f884ced6af11dc24306319577d4d7c340124a7e2dd9c314077000000004847304402200b6c45891aed48937241907bc3e3868ee4c792819821fcde33311e5a3da4789a02205021b59692b652a01f5f009bd481acac2f647a7d9c076d71d85869763337882e01fdffffff016c95052a010000001976a9149c4891e7791da9e622532c97f43863768264faaf88ac00000000')
self.assertEqual('90ba90a5b115106d26663fce6c6215b8699c5d4b2672dd30756115f3337dddf9', tx.txid())
def test_txid_p2pk_to_p2sh(self):
tx = transaction.Transaction('0100000001e4643183d6497823576d17ac2439fb97eba24be8137f312e10fcc16483bb2d070000000048473044022032bbf0394dfe3b004075e3cbb3ea7071b9184547e27f8f73f967c4b3f6a21fa4022073edd5ae8b7b638f25872a7a308bb53a848baa9b9cc70af45fcf3c683d36a55301fdffffff011821814a0000000017a9143c640bc28a346749c09615b50211cb051faff00f8700000000')
self.assertEqual('172bdf5a690b874385b98d7ab6f6af807356f03a26033c6a65ab79b4ac2085b5', tx.txid())
def test_txid_p2pkh_to_p2pkh(self):
tx = transaction.Transaction('0100000001f9dd7d33f315617530dd72264b5d9c69b815626cce3f66266d1015b1a590ba90000000006a4730440220699bfee3d280a499daf4af5593e8750b54fef0557f3c9f717bfa909493a84f60022057718eec7985b7796bb8630bf6ea2e9bf2892ac21bd6ab8f741a008537139ffe012103b4289890b40590447b57f773b5843bf0400e9cead08be225fac587b3c2a8e973fdffffff01ec24052a010000001976a914ce9ff3d15ed5f3a3d94b583b12796d063879b11588ac00000000')
self.assertEqual('24737c68f53d4b519939119ed83b2a8d44d716d7f3ca98bcecc0fbb92c2085ce', tx.txid())
def test_txid_p2pkh_to_p2sh(self):
tx = transaction.Transaction('010000000195232c30f6611b9f2f82ec63f5b443b132219c425e1824584411f3d16a7a54bc000000006b4830450221009f39ac457dc8ff316e5cc03161c9eff6212d8694ccb88d801dbb32e85d8ed100022074230bb05e99b85a6a50d2b71e7bf04d80be3f1d014ea038f93943abd79421d101210317be0f7e5478e087453b9b5111bdad586038720f16ac9658fd16217ffd7e5785fdffffff0200e40b540200000017a914d81df3751b9e7dca920678cc19cac8d7ec9010b08718dfd63c2c0000001976a914303c42b63569ff5b390a2016ff44651cd84c7c8988acc7010000')
self.assertEqual('155e4740fa59f374abb4e133b87247dccc3afc233cb97c2bf2b46bba3094aedc', tx.txid())
def test_txid_p2sh_to_p2pkh(self):
tx = transaction.Transaction('0100000001b98d550fa331da21038952d6931ffd3607c440ab2985b75477181b577de118b10b000000fdfd0000483045022100a26ea637a6d39aa27ea7a0065e9691d477e23ad5970b5937a9b06754140cf27102201b00ed050b5c468ee66f9ef1ff41dfb3bd64451469efaab1d4b56fbf92f9df48014730440220080421482a37cc9a98a8dc3bf9d6b828092ad1a1357e3be34d9c5bbdca59bb5f02206fa88a389c4bf31fa062977606801f3ea87e86636da2625776c8c228bcd59f8a014c69522102420e820f71d17989ed73c0ff2ec1c1926cf989ad6909610614ee90cf7db3ef8721036eae8acbae031fdcaf74a824f3894bf54881b42911bd3ad056ea59a33ffb3d312103752669b75eb4dc0cca209af77a59d2c761cbb47acc4cf4b316ded35080d92e8253aeffffffff0101ac3a00000000001976a914a6b6bcc85975bf6a01a0eabb2ac97d5a418223ad88ac00000000')
self.assertEqual('0ea982e8e601863e604ef6d9acf9317ae59d3eac9cafee6dd946abadafd35af8', tx.txid())
def test_txid_p2sh_to_p2sh(self):
tx = transaction.Transaction('01000000018695eef2250b3a3b6ef45fe065e601610e69dd7a56de742092d40e6276e6c9ec00000000fdfd000047304402203199bf8e49f7203e8bcbfd754aa356c6ba61643a3490f8aef3888e0aaa7c048c02201e7180bfd670f4404e513359b4020fbc85d6625e3e265e0c357e8611f11b83e401483045022100e60f897db114679f9a310a032a22e9a7c2b8080affe2036c480ff87bf6f45ada02202dbd27af38dd97d418e24d89c3bb7a97e359dd927c1094d8c9e5cac57df704fb014c69522103adc563b9f5e506f485978f4e913c10da208eac6d96d49df4beae469e81a4dd982102c52bc9643a021464a31a3bfa99cfa46afaa4b3acda31e025da204b4ee44cc07a2103a1c8edcc3310b3d7937e9e4179e7bd9cdf31c276f985f4eb356f21b874225eb153aeffffffff02b8ce05000000000017a9145c9c158430b7b79c3ad7ef9bdf981601eda2412d87b82400000000000017a9146bf3ff89019ecc5971a39cdd4f1cabd3b647ad5d8700000000')
self.assertEqual('2caab5a11fa1ec0f5bb014b8858d00fecf2c001e15d22ad04379ad7b36fef305', tx.txid())
def test_parse_output_p2pkh(self):
tx = transaction.Transaction('010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000001976a914aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa88ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_ADDRESS, Address.from_P2PKH_hash(b'\xaa'*20), 0)])
self.assertEqual('7a0e3fcbdaa9ecc6ccce1ad325b6b661e774a57f2e8519c679964e2dd32e200f', tx.txid())
def test_parse_output_p2pkh_nonmin(self):
tx = transaction.Transaction('010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000001a76a94c14aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa88ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(bytes.fromhex('76a94c14aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa88ac')), 0)])
self.assertEqual('69706667959fd2e6aa3385acdcd2c478e875344422e1f4c94eb06065268540d1', tx.txid())
def test_parse_output_p2sh(self):
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000017a914aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8700000000')
self.assertEqual(tx.outputs(), [(TYPE_ADDRESS, Address.from_P2SH_hash(b'\xaa'*20), 0)])
self.assertEqual('d33750908965d24a411d94371fdc64ebb06f13bf4d19e73372347e6b4eeca49f', tx.txid())
def test_parse_output_p2sh_nonmin(self):
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000018a94c14aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa8700000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(bytes.fromhex('a94c14aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa87')), 0)])
self.assertEqual('dd4b174d7094c63c9f530703702a8d76c7b3fe5fc278ba2837dbd75bc5b0b296', tx.txid())
def test_parse_output_p2pk(self):
tx = transaction.Transaction('010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000002321030000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_PUBKEY, PublicKey.from_pubkey(b'\x03' + b'\x00'*32), 0)])
self.assertEqual('78afa0576a4ee6e7db663a58202f11bab8e860dd4a2226f856a2490187046b3d', tx.txid())
def test_parse_output_p2pk_badpubkey(self):
tx = transaction.Transaction('010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000002321040000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(bytes.fromhex('21040000000000000000000000000000000000000000000000000000000000000000ac')), 0)])
self.assertEqual('8e57f026081b6589570dc5e6e339b706d2ac75e6cbd1896275dee176b8d35ba6', tx.txid())
def test_parse_output_p2pk_nonmin(self):
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000244c21030000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(bytes.fromhex('4c21030000000000000000000000000000000000000000000000000000000000000000ac')), 0)])
self.assertEqual('730d77384d7bfc965caa338b501e7b071092474320af6ea19052859c93bfaf98', tx.txid())
def test_parse_output_p2pk_uncomp(self):
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000043410400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_PUBKEY, PublicKey.from_pubkey(b'\x04' + b'\x00'*64), 0)])
self.assertEqual('053626542393dd957a14bb2bcbfdcf3564a5f438e923799e1b9714c4a8e70a7c', tx.txid())
def test_parse_output_p2pk_uncomp_badpubkey(self):
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000043410300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x41\x03' + b'\x00'*64 + b'\xac'), 0)])
self.assertEqual('a15a9f86f5a47ef7efc28ae701f5b2a353aff76a21cb22ff08b77759533fb59b', tx.txid())
def test_parse_output_p2pk_uncomp_nonmin(self):
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000444c410400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ac00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x4c\x41\x04' + b'\x00'*64 + b'\xac'), 0)])
self.assertEqual('bd8e0827c8bacd6bac10dd28d5fc6ad52f3fef3f91200c7c1d8698531c9325e9', tx.txid())
def test_parse_output_baremultisig(self):
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000025512103000000000000000000000000000000000000000000000000000000000000000051ae00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x51\x21\x03' + b'\x00'*32 + b'\x51\xae'), 0)])
self.assertEqual('b1f66fde0aa3d5af03be3c69f599069aad217e939f36cacc2372ea4fece7d57b', tx.txid())
def test_parse_output_baremultisig_nonmin(self):
tx = transaction.Transaction('0100000001000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000026514c2103000000000000000000000000000000000000000000000000000000000000000051ae00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x51\x4c\x21\x03' + b'\x00'*32 + b'\x51\xae'), 0)])
self.assertEqual('eb0b69c86a05499cabc42b12d4706b18eab97ed6155fc966e488a433edf05932', tx.txid())
def test_parse_output_truncated1(self):
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000024d0100000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x4d\x01'), 0)])
self.assertIn("Invalid script", tx.outputs()[0][1].to_ui_string())
self.assertEqual('72d8af8edcc603c6c64390ac5eb913b97a80efe0f5ae7c00ad5397eb5786cd33', tx.txid())
def test_parse_output_truncated1(self):
# truncated in middle of PUSHDATA2's second argument
tx = transaction.Transaction('01000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000044d0200ff00000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b'\x4d\x02\x00\xff'), 0)])
self.assertIn("Invalid script", tx.outputs()[0][1].to_ui_string())
self.assertEqual('976667816c4955189973cc56ac839844da4ed32a8bd22a8c6217c2c04e69e9d7', tx.txid())
def test_parse_output_empty(self):
tx = transaction.Transaction('010000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000')
self.assertEqual(tx.outputs(), [(TYPE_SCRIPT, ScriptOutput(b''), 0)])
self.assertEqual("", tx.outputs()[0][1].to_ui_string())
self.assertEqual('50fa7bd4e5e2d3220fd2e84effec495b9845aba379d853408779d59a4b0b4f59', tx.txid())
class NetworkMock(object):
def __init__(self, unspent):
self.unspent = unspent
def synchronous_get(self, arg):
return self.unspent
| true | true |
f7270752dcf18a0603f052723ab81ca799050193 | 2,977 | py | Python | parsers/archived/US_BPA.py | electricitymap/electricitymap-contrib | 6572b12d1cef72c734b80273598e156ebe3c22ea | [
"MIT"
] | 143 | 2022-01-01T10:56:58.000Z | 2022-03-31T11:25:47.000Z | parsers/archived/US_BPA.py | electricitymap/electricitymap-contrib | 6572b12d1cef72c734b80273598e156ebe3c22ea | [
"MIT"
] | 276 | 2021-12-30T15:57:15.000Z | 2022-03-31T14:57:16.000Z | parsers/archived/US_BPA.py | electricitymap/electricitymap-contrib | 6572b12d1cef72c734b80273598e156ebe3c22ea | [
"MIT"
] | 44 | 2021-12-30T19:48:42.000Z | 2022-03-29T22:46:16.000Z | #!/usr/bin/env python3
# Archive reason: No longer in use.
"""Parser for the Bonneville Power Administration area of the USA."""
import logging
from io import StringIO
import arrow
import pandas as pd
import requests
GENERATION_URL = "https://transmission.bpa.gov/business/operations/Wind/baltwg.txt"
GENERATION_MAPPING = {
"Wind": "wind",
"Hydro": "hydro",
"Fossil/Biomass": "unknown",
"Nuclear": "nuclear",
}
def get_data(url, session=None):
"""Returns a pandas dataframe."""
s = session or requests.Session()
req = s.get(url)
df = pd.read_table(StringIO(req.text), skiprows=11)
return df
def timestamp_converter(timestamp):
"""Turns a timestamp str into an aware datetime object."""
arr_dt_naive = arrow.get(timestamp, "MM/DD/YYYY HH:mm")
dt_aware = arr_dt_naive.replace(tzinfo="America/Los_Angeles").datetime
return dt_aware
def data_processor(df, logger) -> list:
"""
Takes a dataframe and drops all generation rows that are empty or more than 1 day old.
Turns each row into a dictionary and removes any generation types that are unknown.
:return: list of tuples in the form of (datetime, production).
"""
df = df.dropna(thresh=2)
df.columns = df.columns.str.strip()
# 5min data for the last 24 hours.
df = df.tail(288)
df["Date/Time"] = df["Date/Time"].map(timestamp_converter)
known_keys = GENERATION_MAPPING.keys() | {"Date/Time", "Load"}
column_headers = set(df.columns)
unknown_keys = column_headers - known_keys
for k in unknown_keys:
logger.warning(
"New data {} seen in US-BPA data source".format(k), extra={"key": "US-BPA"}
)
keys_to_remove = unknown_keys | {"Load"}
processed_data = []
for index, row in df.iterrows():
production = row.to_dict()
dt = production.pop("Date/Time")
dt = dt.to_pydatetime()
mapped_production = {
GENERATION_MAPPING[k]: v
for k, v in production.items()
if k not in keys_to_remove
}
processed_data.append((dt, mapped_production))
return processed_data
def fetch_production(
zone_key="US-BPA",
session=None,
target_datetime=None,
logger=logging.getLogger(__name__),
) -> list:
"""Requests the last known production mix (in MW) of a given zone."""
if target_datetime:
raise NotImplementedError("This parser is not yet able to parse past dates")
raw_data = get_data(GENERATION_URL, session=session)
processed_data = data_processor(raw_data, logger)
data = []
for item in processed_data:
datapoint = {
"zoneKey": zone_key,
"datetime": item[0],
"production": item[1],
"storage": {},
"source": "bpa.gov",
}
data.append(datapoint)
return data
if __name__ == "__main__":
print("fetch_production() ->")
print(fetch_production())
| 25.228814 | 90 | 0.64125 |
import logging
from io import StringIO
import arrow
import pandas as pd
import requests
GENERATION_URL = "https://transmission.bpa.gov/business/operations/Wind/baltwg.txt"
GENERATION_MAPPING = {
"Wind": "wind",
"Hydro": "hydro",
"Fossil/Biomass": "unknown",
"Nuclear": "nuclear",
}
def get_data(url, session=None):
s = session or requests.Session()
req = s.get(url)
df = pd.read_table(StringIO(req.text), skiprows=11)
return df
def timestamp_converter(timestamp):
arr_dt_naive = arrow.get(timestamp, "MM/DD/YYYY HH:mm")
dt_aware = arr_dt_naive.replace(tzinfo="America/Los_Angeles").datetime
return dt_aware
def data_processor(df, logger) -> list:
df = df.dropna(thresh=2)
df.columns = df.columns.str.strip()
df = df.tail(288)
df["Date/Time"] = df["Date/Time"].map(timestamp_converter)
known_keys = GENERATION_MAPPING.keys() | {"Date/Time", "Load"}
column_headers = set(df.columns)
unknown_keys = column_headers - known_keys
for k in unknown_keys:
logger.warning(
"New data {} seen in US-BPA data source".format(k), extra={"key": "US-BPA"}
)
keys_to_remove = unknown_keys | {"Load"}
processed_data = []
for index, row in df.iterrows():
production = row.to_dict()
dt = production.pop("Date/Time")
dt = dt.to_pydatetime()
mapped_production = {
GENERATION_MAPPING[k]: v
for k, v in production.items()
if k not in keys_to_remove
}
processed_data.append((dt, mapped_production))
return processed_data
def fetch_production(
zone_key="US-BPA",
session=None,
target_datetime=None,
logger=logging.getLogger(__name__),
) -> list:
if target_datetime:
raise NotImplementedError("This parser is not yet able to parse past dates")
raw_data = get_data(GENERATION_URL, session=session)
processed_data = data_processor(raw_data, logger)
data = []
for item in processed_data:
datapoint = {
"zoneKey": zone_key,
"datetime": item[0],
"production": item[1],
"storage": {},
"source": "bpa.gov",
}
data.append(datapoint)
return data
if __name__ == "__main__":
print("fetch_production() ->")
print(fetch_production())
| true | true |
f727078e22cc661d90d89e25a90adb97e4f7dee0 | 2,049 | py | Python | pre_commit_hooks/detect_aws_credentials.py | pk026/pre-commit-hooks | 3fa02652357ff0dbb42b5bc78c673b7bc105fcf3 | [
"MIT"
] | null | null | null | pre_commit_hooks/detect_aws_credentials.py | pk026/pre-commit-hooks | 3fa02652357ff0dbb42b5bc78c673b7bc105fcf3 | [
"MIT"
] | null | null | null | pre_commit_hooks/detect_aws_credentials.py | pk026/pre-commit-hooks | 3fa02652357ff0dbb42b5bc78c673b7bc105fcf3 | [
"MIT"
] | 1 | 2016-05-06T15:27:07.000Z | 2016-05-06T15:27:07.000Z | from __future__ import print_function
from __future__ import unicode_literals
import argparse
import os
from six.moves import configparser # pylint: disable=import-error
def get_your_keys(credentials_file):
"""reads the secret keys in your credentials file in order to be able to
look for them in the submitted code.
"""
aws_credentials_file_path = os.path.expanduser(credentials_file)
if not os.path.exists(aws_credentials_file_path):
return None
parser = configparser.ConfigParser()
parser.read(aws_credentials_file_path)
keys = set()
for section in parser.sections():
keys.add(parser.get(section, 'aws_secret_access_key'))
return keys
def check_file_for_aws_keys(filenames, keys):
bad_files = []
for filename in filenames:
with open(filename, 'r') as content:
text_body = content.read()
if any(key in text_body for key in keys):
# naively match the entire file, low chance of incorrect collision
bad_files.append(filename)
return bad_files
def main(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('filenames', nargs='*', help='Filenames to run')
parser.add_argument(
'--credentials-file',
default='~/.aws/credentials',
help=(
'location of aws credentials file from which to get the secret '
"keys we're looking for"
),
)
args = parser.parse_args(argv)
keys = get_your_keys(args.credentials_file)
if not keys:
print(
'No aws keys were configured at {0}\n'
'Configure them with --credentials-file'.format(
args.credentials_file,
),
)
return 2
bad_filenames = check_file_for_aws_keys(args.filenames, keys)
if bad_filenames:
for bad_file in bad_filenames:
print('AWS secret key found: {0}'.format(bad_file))
return 1
else:
return 0
if __name__ == '__main__':
exit(main())
| 28.458333 | 82 | 0.646657 | from __future__ import print_function
from __future__ import unicode_literals
import argparse
import os
from six.moves import configparser
def get_your_keys(credentials_file):
aws_credentials_file_path = os.path.expanduser(credentials_file)
if not os.path.exists(aws_credentials_file_path):
return None
parser = configparser.ConfigParser()
parser.read(aws_credentials_file_path)
keys = set()
for section in parser.sections():
keys.add(parser.get(section, 'aws_secret_access_key'))
return keys
def check_file_for_aws_keys(filenames, keys):
bad_files = []
for filename in filenames:
with open(filename, 'r') as content:
text_body = content.read()
if any(key in text_body for key in keys):
bad_files.append(filename)
return bad_files
def main(argv=None):
parser = argparse.ArgumentParser()
parser.add_argument('filenames', nargs='*', help='Filenames to run')
parser.add_argument(
'--credentials-file',
default='~/.aws/credentials',
help=(
'location of aws credentials file from which to get the secret '
"keys we're looking for"
),
)
args = parser.parse_args(argv)
keys = get_your_keys(args.credentials_file)
if not keys:
print(
'No aws keys were configured at {0}\n'
'Configure them with --credentials-file'.format(
args.credentials_file,
),
)
return 2
bad_filenames = check_file_for_aws_keys(args.filenames, keys)
if bad_filenames:
for bad_file in bad_filenames:
print('AWS secret key found: {0}'.format(bad_file))
return 1
else:
return 0
if __name__ == '__main__':
exit(main())
| true | true |
f72707b300b185159ce19245e032dddc604d32ab | 17,706 | py | Python | pytorch_src/ResnetV2.py | ccj5351/hmr_rgbd | d1dcf81d72c11e1f502f2c494cd86425f384d9cc | [
"MIT"
] | null | null | null | pytorch_src/ResnetV2.py | ccj5351/hmr_rgbd | d1dcf81d72c11e1f502f2c494cd86425f384d9cc | [
"MIT"
] | 1 | 2020-12-09T07:29:00.000Z | 2020-12-09T07:29:00.000Z | pytorch_src/ResnetV2.py | ccj5351/hmr_rgbd | d1dcf81d72c11e1f502f2c494cd86425f384d9cc | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
# -*-coding:utf-8-*-
# @file:
# @brief:
# @author: Changjiang Cai, ccai1@stevens.edu, caicj5351@gmail.com
# @version: 0.0.1
# @creation date: 23-10-2019
# @last modified: Wed 30 Oct 2019 03:17:36 PM EDT
"""
file: ResnetV2.py
author: Changjiang Cai
mark: adopted from:
1) pytorch source code, and
2) and https://github.com/MandyMo/pytorch_HMR.git
3) and https://github.com/lucasb-eyer/lbtoolbox/blob/master/lbtoolbox/pytorch.py#L61;
"""
import torch.nn as nn
import torch.nn.functional as F
import torch
from torch.nn.parameter import Parameter
import torch.optim as optim
import numpy as np
import math
import torchvision
import sys
#from dollections import OrderedDict
"""Contains definitions for the preactivation form of Residual Networks.
Residual networks (ResNets) were originally proposed in:
[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
Deep Residual Learning for Image Recognition. arXiv:1512.03385
The full preactivation 'v2' ResNet variant implemented in this module was
introduced by:
[2] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
Identity Mappings in Deep Residual Networks. arXiv: 1603.05027
The key difference of the full preactivation 'v2' variant compared to the
'v1' variant in [1] is the use of batch normalization before every weight layer.
"""
########################################
# Kaiming's blocks
########################################
def conv3x3(cin, cout, stride=1, groups=1, bias=False):
return nn.Conv2d(cin, cout, kernel_size=3, stride=stride, padding=1, bias=bias,
groups=groups)
def conv1x1(cin, cout, stride=1,bias=False):
return nn.Conv2d(cin, cout, kernel_size=1, stride=stride, padding=0, bias=bias)
# bottleneck_v2
# x-->BN --> ReLU-->(conv1, BN, ReLU)-->(conv2, BN, ReLU) --> conv3
# | |
# | |
# | |
# |--------------------------------------------> Addition --> x_new
class Bottleneck_V2(nn.Module):
expansion = 4
def __init__(self, cin, cout, stride):
super(Bottleneck_V2, self).__init__()
cmid = cout// self.expansion
self.relu = nn.ReLU(inplace=True)
""" Pre Act """
self.bn0 = nn.BatchNorm2d(cin)
""" (conv1, BN, ReLU)"""
self.conv1 = conv1x1(cin, cmid, bias=False) #conv1
self.bn1 = nn.BatchNorm2d(cmid) #conv1/BatchNorm
""" (conv2, BN, ReLU)"""
self.conv2 = conv3x3(cmid, cmid, stride, bias=False) #conv2
self.bn2 = nn.BatchNorm2d(cmid) #conv2/BatchNorm
""" (conv3 )"""
self.conv3 = conv1x1(cmid, cout, bias=True) # conv3
self.stride = stride
self.maxpool2d= nn.MaxPool2d(kernel_size=1, stride = stride)
self.shortcut = None
if cin != cout:
# conv, 1 x 1
self.shortcut = conv1x1(cin, cout, stride, bias = True)
def forward(self, x):
""" Pre Act """
preact = self.relu(self.bn0(x))
if self.shortcut is not None:
shortcut = self.shortcut(preact) # e.g., stride = 2
else:
shortcut = self.maxpool2d(x)
""" (conv1, BN, ReLU)"""
residual = self.relu(self.bn1(self.conv1(preact)))
""" (conv2, BN, ReLU)"""
residual = self.relu(self.bn2(self.conv2(residual)))
""" (conv3 )"""
residual = self.conv3(residual)
output = shortcut + residual
return output
class ResNet_V2(nn.Module):
def __init__(self, block, layers, num_classes=None, global_pool = True,
isFetchDictForDebug = False):
self.isFetchDictForDebug = isFetchDictForDebug
self.inplanes = 64
self.expansion = 4
super(ResNet_V2, self).__init__()
self.conv1 = nn.Conv2d(3, 64, kernel_size=7, stride=2, padding=3, bias=True)
# We do not include batch normalization or activation functions in
# conv1 because the first ResNet unit will perform these. Cf.
# Appendix of [2].
#self.bn1 = nn.BatchNorm2d(64)
#self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=0)
#Updated to implement 'same' padding in tensorflow; do manually padding to bottom and right,
# then apply the follwoing maxpool with padding = 0 as its argument;
self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=0)
# padding size: starting from the last dimension and moving forward;
self.maxpool_pad = (0,1,0,1)# i.e, (padding_left, padding_right, padding_top, padding_bottom)
self.layer1 = self._make_layer(block, 64, layers[0], stride=2)
self.layer2 = self._make_layer(block, 128, layers[1], stride=2)
self.layer3 = self._make_layer(block, 256, layers[2], stride=2)
self.layer4 = self._make_layer(block, 512, layers[3], stride=1)
# This is needed because the pre-activation variant does not have batch
# normalization or activation functions in the residual unit output. See
# Appendix of [2].
self.postnorm = nn.BatchNorm2d(512*self.expansion)
self.relu = nn.ReLU(inplace=True)
#self.avgpool = nn.AdaptiveAvgPool2d((1, 1)) # output is of size 1 x 1 here;
self.global_pool = global_pool
#Note: in HMR project, we set `num_classes=None`;
if num_classes is not None:
self.fc = nn.Linear(512 * block.expansion, num_classes)
else:
self.fc = None
#leave it here FYI:
#for m in self.modules():
# if isinstance(m, nn.Conv2d):
# n = m.kernel_size[0] * m.kernel_size[1] * m.out_channels
# m.weight.data.normal_(0, math.sqrt(2. / n))
# elif isinstance(m, nn.BatchNorm2d):
# m.weight.data.fill_(1)
# m.bias.data.zero_()
# the new version is shown below:
for m in self.modules():
if isinstance(m, nn.Conv2d):
nn.init.kaiming_normal_(m.weight, mode='fan_out', nonlinearity='relu')
elif isinstance(m, (nn.BatchNorm2d, nn.GroupNorm)):
nn.init.constant_(m.weight, 1)
nn.init.constant_(m.bias, 0)
#def __init__(self, cin, cout, stride=1):
def _make_layer(self, block, planes, numBlocks, stride):
expansion = block.expansion
layers = []
for i in range(0, numBlocks):
cur_inplanes = planes * expansion if i > 0 else self.inplanes
tmp_stride = 1 if i < (numBlocks - 1) else stride
layers.append(block(cur_inplanes, planes*expansion, tmp_stride))
#update self.inplanes = output planes, for next incoming Residual block, with new palnes #;
self.inplanes = planes * expansion
return nn.Sequential(*layers)
def forward(self, x):
""" fetch dict """
fetch_dict = {}
x = self.conv1(x)
fetch_dict['x_conv1'] = x
#Updated to implement 'same' padding in tensorflow; do manually padding to bottom and right,
# then apply the follwoing maxpool with padding = 0 as its argument;
x = F.pad(x, pad = self.maxpool_pad, mode = 'constant', value = 0)
x = self.maxpool(x)
fetch_dict['x_maxpool'] = x
x = self.layer1(x)
fetch_dict['x_layer1'] = x
x = self.layer2(x)
fetch_dict['x_layer2'] = x
x = self.layer3(x)
fetch_dict['x_layer3'] = x
x = self.layer4(x)
fetch_dict['x_layer4'] = x
x = self.postnorm(x)
#Updated on 2019/10/30: missing the relu added!!!
x = self.relu(x)
fetch_dict['x_postnorm'] = x
if self.global_pool:
x = torch.mean(x, dim=[2,3], keepdim = True)
fetch_dict['x_global_pool'] = x
if self.fc is not None:
x = self.fc(torch.flatten(x,1))
if self.isFetchDictForDebug:
return x, fetch_dict
else:
return x
def resnet_v2_50(num_classes=None, global_pool = True, isFetchDictForDebug = False):
model = ResNet_V2(Bottleneck_V2, [3,4,6,3],num_classes, global_pool, isFetchDictForDebug)
return model
def get_tf2pt_key_map_dict():
map_dict = {
'' : '',
# for root block: conv1 --> pool1
# that is: input x --> (conv1 --> pool1 )--> (residual-block1,2,3,4) --> postnorm --> global avg-pool --> output
'conv1/weights' : 'conv1.weight',
'conv1/biases' : 'conv1.bias',
# for post norm:
'postnorm/beta': 'postnorm.bias',
'postnorm/gamma': 'postnorm.weight',
'postnorm/moving_mean': 'postnorm.running_mean',
'postnorm/moving_variance': 'postnorm.running_var',
}
""" block 1, has 3 unites """
""" block 2, has 4 unites """
""" block 3, has 6 unites """
""" block 4, has 3 unites """
# processing tf_key_1
blks = [(1,3), (2,4), (3,6), (4,3)]
for t in blks:
b_idx = t[0]
for u_idx in range(t[1]):
key = 'block{}/unit_{}'.format(b_idx, u_idx + 1)
vaule = 'layer{}.{}'.format(b_idx, u_idx )
map_dict[key] = vaule
# processing tf_key_2
#Example: (tf_key, pt_key)
""" In each bottleneck block: we have the following: """
bottleneck_tf_pt_tuples = [
# Note: 'resnet_v2_50/block1/unit_1/bottleneck_v2/preact/beta/Adam':
# 'Adam' is related to Adam Optimization, so here we do not use it!!!
# Pre-Act: bn0"""
# BN: out = gamma * X_norm + beta, so beta is bias, gamma is weight;
['preact/gamma','bn0.weight'],
['preact/beta', 'bn0.bias'],
['preact/moving_mean', 'bn0.running_mean'],
['preact/moving_variance', 'bn0.running_var'],
#conv1 + bn1 + relu1
['conv1/weights', 'conv1.weight'],
['conv1/BatchNorm/gamma', 'bn1.weight'],
['conv1/BatchNorm/beta', 'bn1.bias'],
['conv1/BatchNorm/moving_mean', 'bn1.running_mean'],
['conv1/BatchNorm/moving_variance', 'bn1.running_var'],
#conv2 + bn2 + relu2
['conv2/weights', 'conv2.weight'],
['conv2/BatchNorm/gamma', 'bn2.weight'],
['conv2/BatchNorm/beta', 'bn2.bias'],
['conv2/BatchNorm/moving_mean', 'bn2.running_mean'],
['conv2/BatchNorm/moving_variance', 'bn2.running_var'],
#conv3
['conv3/weights', 'conv3.weight'],
['conv3/biases', 'conv3.bias'],
#shortcut
['shortcut/weights', 'shortcut.weight'],
['shortcut/biases', 'shortcut.bias'],
]
for cur_tuple in bottleneck_tf_pt_tuples:
map_dict[cur_tuple[0]] = cur_tuple[1]
#print (map_dict)
return map_dict
def map_tf_dictKeys_2PyTorch_dictKeys( map_dict,
tf_key = 'resnet_v2_50/block1/unit_1/bottleneck_v2/conv1/BatchNorm/beta'):
# E.g.:
# tf_key = 'resnet_v2_50/block1/unit_1/bottleneck_v2/conv1/BatchNorm/beta'
# or tf_key = 'resnet_v2_50/conv1/biases'
# 1) skip the first part : 'resnet_v2_50'
tf_key = tf_key[len('resnet_v2_50')+1:]
# 2) find 'bottleneck_v2' if exists, and pick the part before and after 'bottleneck_v2'
pos = tf_key.find('bottleneck_v2')
if pos > 0: # if found 'bottleneck_v2'
tf_key_1, tf_key_2 = tf_key[0:pos-1], tf_key[pos+1+len('bottleneck_v2'):]
else: # no found 'bottleneck_v2'
tf_key_1, tf_key_2 = '', tf_key
# processing tf_key_1
#print (tf_key_1)
pt_key_1 = map_dict[tf_key_1]
#print (pt_key_1)
#print (tf_key_2)
pt_key_2 = map_dict[tf_key_2]
#print (pt_key_2)
if pt_key_1 == '':
pt_key = pt_key_2
else:
pt_key = pt_key_1 + '.' + pt_key_2
#print ("[***] {} --> {}".format(tf_key, pt_key))
return pt_key
#>see https://stackoverflow.com/questions/51628607/pytorch-passing-numpy-array-for-weight-initialization
def set_resnet_parameter_data(layer, parameter_name, new_torch_data):
param = getattr(layer, parameter_name)
param.data = new_torch_data
def pass_np_model_state_to_resnet(src_np_model_state_dict, dst_resnet_model):
map_dict = get_tf2pt_key_map_dict()
dst_state_dict = dst_resnet_model.state_dict()
n_valid = 0
n_adam = 0
tf_var_names = list(src_np_model_state_dict['resnet_v2_50_names'])
N = len(tf_var_names)
for tf_key in sorted(src_np_model_state_dict.keys()):
# Note: 'resnet_v2_50/block1/unit_1/bottleneck_v2/preact/beta/Adam':
# 'Adam' is related to Adam Optimization, so here we do not use it!!!
param = src_np_model_state_dict[tf_key]
if 'Adam' in tf_key:
#print('Adam! {} is only for Adam Optimization, not uesed here!!'.format(tf_key))
n_adam += 1
tf_var_names.remove(tf_key)
continue
elif 'resnet_v2_50_names' == tf_key:
continue
pt_key = map_tf_dictKeys_2PyTorch_dictKeys(map_dict, tf_key)
if pt_key not in dst_state_dict:
print('unexpected ', pt_key, ' !')
continue
if not isinstance(param, np.ndarray):
raise ValueError('Expected a np.ndarray')
else:
# !!! Note: added by CCJ on 2019/10/24;
# tensorflow conv2d weight in size of [kernel_size[0], kernel_size[1], in_channels, out_channels],
# e.g., weight in size [7,7,3,64] means applying 7x7-kernel-size convolution to input image with 3 channel
# and output channel is 64;
# While, PyTorch will have its weight in shape [out_channels, in_channels/groups, kernel_size[0], kernel_size[1]],
# here we assume gropus = 1;
if param.ndim == 4:
param = np.transpose(param, [3,2,0,1])
param = torch.from_numpy(param).contiguous()
try:
dst_state_dict[pt_key].copy_(param)
n_valid += 1
tf_var_names.remove(tf_key)
except:
print(pt_key, ' is inconsistent!')
print ('src np.ndarray in shape {}, dst tensor in shape {}'.format(param.shape,
dst_state_dict[pt_key].shape))
n_valid -= 1
tf_var_names.append(tf_key)
continue
print('%d out of %d variables processed! Wherein:'%(n_valid + n_adam, N))
print(' [***] Copyed state dict for %d variables and finished!' %n_valid)
print(' [***] Skip %d adam variables, which are related to Adam optimaization state' %(n_adam))
print(' [***] {} variables are left unprocessed!'.format(len(tf_var_names)))
if n_valid + n_adam == N:
print (" [***] Resnet_V2_50 loading Numpy weights Succeed!!!")
else:
print (" [***] Resnet_V2_50 loading Numpy weights Failed !!!")
#print('[***] Including: ', tf_var_names)
def load_Res50ModelFromNpyFile(npy_file = '/home/ccj/hmr-rgbd/results/saved_weights/hmr_pre_trained_resnet_v2_50.npy'):
dst_resnet_model = resnet_v2_50()
assert (npy_file is not None)
# this npy file is generated by Python2, due to Tensorflow is installed in Python2;
# load this npy file (generated by Python2) to Python3, due to PyTorch is installed in Python3;
src_np_model_state_dict = np.load(npy_file, allow_pickle= True, encoding = 'latin1').item()
#tmp_name = 'resnet_v2_50/block4/unit_3/bottleneck_v2/conv2/weights'
# check the variable dimensionality
# print should be : [3, 3, 512, 512];
#print(src_np_model_state_dict[tmp_name].shape)
pass_np_model_state_to_resnet(src_np_model_state_dict, dst_resnet_model)
return dst_resnet_model
if __name__ == '__main__':
if 0:
print ('resnet_v2_50 state_dict():')
n = 0
for k,v in resnet_v2_50().state_dict().items():
print (k, v.shape)
n += 1
print (n)
if 0:
""" load dictionary """
npy_file = '/home/ccj/hmr-rgbd/results/saved_weights/hmr_pre_trained_resnet_v2_50.npy'
resnet_dict2 = np.load(npy_file, allow_pickle= True, encoding = 'latin1').item()
print ('loaded var_names : ', resnet_dict2['resnet_v2_50_names'])
tmp_name = 'resnet_v2_50/block4/unit_3/bottleneck_v2/conv2/weights'
# check the variable dimensionality
# print should be : [3, 3, 512, 512];
print (resnet_dict2[tmp_name].shape)
""" load numpy dictionary to Pytorch model and save the model"""
if 1:
# this npy file is generated by Python2, due to Tensorflow is installed in Python2;
npy_file = '/home/ccj/hmr-rgbd/results/saved_weights/hmr_pre_trained_resnet_v2_50.npy'
# load this npy file (generated by Python2) to Python3, due to PyTorch is installed in Python3;
dst_resnet_model = load_Res50ModelFromNpyFile(npy_file)
dst_state_dict = dst_resnet_model.state_dict()
model_path = '/home/ccj/hmr-rgbd/results/saved_weights/hmr_pre_trained_resnet_v2_50.pt'
torch.save(dst_state_dict, model_path)
print ('saved %s' % model_path)
#n = 0
#for k,v in dst_state_dict.items():
# print (k, v.shape)
# n += 1
#print (n)
if 1:
# get a new model
resnet_v2_50 = resnet_v2_50()
model_path = '/home/ccj/hmr-rgbd/results/saved_weights/hmr_pre_trained_resnet_v2_50.pt'
# load the weights
resnet_v2_50.load_state_dict(torch.load(model_path))
print ('Loading %s' % model_path)
| 40.797235 | 127 | 0.605162 |
import torch.nn as nn
import torch.nn.functional as F
import torch
from torch.nn.parameter import Parameter
import torch.optim as optim
import numpy as np
import math
import torchvision
import sys
cout, stride):
super(Bottleneck_V2, self).__init__()
cmid = cout// self.expansion
self.relu = nn.ReLU(inplace=True)
self.bn0 = nn.BatchNorm2d(cin)
self.conv1 = conv1x1(cin, cmid, bias=False) #conv1
self.bn1 = nn.BatchNorm2d(cmid) #conv1/BatchNorm
self.conv2 = conv3x3(cmid, cmid, stride, bias=False) #conv2
self.bn2 = nn.BatchNorm2d(cmid) #conv2/BatchNorm
self.conv3 = conv1x1(cmid, cout, bias=True) # conv3
self.stride = stride
self.maxpool2d= nn.MaxPool2d(kernel_size=1, stride = stride)
self.shortcut = None
if cin != cout:
# conv, 1 x 1
self.shortcut = conv1x1(cin, cout, stride, bias = True)
def forward(self, x):
preact = self.relu(self.bn0(x))
if self.shortcut is not None:
shortcut = self.shortcut(preact) # e.g., stride = 2
else:
shortcut = self.maxpool2d(x)
residual = self.relu(self.bn1(self.conv1(preact)))
residual = self.relu(self.bn2(self.conv2(residual)))
residual = self.conv3(residual)
output = shortcut + residual
return output
class ResNet_V2(nn.Module):
def __init__(self, block, layers, num_classes=None, global_pool = True,
isFetchDictForDebug = False):
self.isFetchDictForDebug = isFetchDictForDebug
self.inplanes = 64
self.expansion = 4
super(ResNet_V2, self).__init__()
self.conv1 = nn.Conv2d(3, 64, kernel_size=7, stride=2, padding=3, bias=True)
# We do not include batch normalization or activation functions in
# conv1 because the first ResNet unit will perform these. Cf.
# Appendix of [2].
#self.bn1 = nn.BatchNorm2d(64)
#self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=0)
#Updated to implement 'same' padding in tensorflow; do manually padding to bottom and right,
# then apply the follwoing maxpool with padding = 0 as its argument;
self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=0)
# padding size: starting from the last dimension and moving forward;
self.maxpool_pad = (0,1,0,1)# i.e, (padding_left, padding_right, padding_top, padding_bottom)
self.layer1 = self._make_layer(block, 64, layers[0], stride=2)
self.layer2 = self._make_layer(block, 128, layers[1], stride=2)
self.layer3 = self._make_layer(block, 256, layers[2], stride=2)
self.layer4 = self._make_layer(block, 512, layers[3], stride=1)
# This is needed because the pre-activation variant does not have batch
# normalization or activation functions in the residual unit output. See
# Appendix of [2].
self.postnorm = nn.BatchNorm2d(512*self.expansion)
self.relu = nn.ReLU(inplace=True)
#self.avgpool = nn.AdaptiveAvgPool2d((1, 1)) # output is of size 1 x 1 here;
self.global_pool = global_pool
#Note: in HMR project, we set `num_classes=None`;
if num_classes is not None:
self.fc = nn.Linear(512 * block.expansion, num_classes)
else:
self.fc = None
#leave it here FYI:
#for m in self.modules():
# if isinstance(m, nn.Conv2d):
# n = m.kernel_size[0] * m.kernel_size[1] * m.out_channels
# m.weight.data.normal_(0, math.sqrt(2. / n))
# elif isinstance(m, nn.BatchNorm2d):
# m.weight.data.fill_(1)
# m.bias.data.zero_()
# the new version is shown below:
for m in self.modules():
if isinstance(m, nn.Conv2d):
nn.init.kaiming_normal_(m.weight, mode='fan_out', nonlinearity='relu')
elif isinstance(m, (nn.BatchNorm2d, nn.GroupNorm)):
nn.init.constant_(m.weight, 1)
nn.init.constant_(m.bias, 0)
#def __init__(self, cin, cout, stride=1):
def _make_layer(self, block, planes, numBlocks, stride):
expansion = block.expansion
layers = []
for i in range(0, numBlocks):
cur_inplanes = planes * expansion if i > 0 else self.inplanes
tmp_stride = 1 if i < (numBlocks - 1) else stride
layers.append(block(cur_inplanes, planes*expansion, tmp_stride))
#update self.inplanes = output planes, for next incoming Residual block, with new palnes #;
self.inplanes = planes * expansion
return nn.Sequential(*layers)
def forward(self, x):
fetch_dict = {}
x = self.conv1(x)
fetch_dict['x_conv1'] = x
#Updated to implement 'same' padding in tensorflow; do manually padding to bottom and right,
# then apply the follwoing maxpool with padding = 0 as its argument;
x = F.pad(x, pad = self.maxpool_pad, mode = 'constant', value = 0)
x = self.maxpool(x)
fetch_dict['x_maxpool'] = x
x = self.layer1(x)
fetch_dict['x_layer1'] = x
x = self.layer2(x)
fetch_dict['x_layer2'] = x
x = self.layer3(x)
fetch_dict['x_layer3'] = x
x = self.layer4(x)
fetch_dict['x_layer4'] = x
x = self.postnorm(x)
#Updated on 2019/10/30: missing the relu added!!!
x = self.relu(x)
fetch_dict['x_postnorm'] = x
if self.global_pool:
x = torch.mean(x, dim=[2,3], keepdim = True)
fetch_dict['x_global_pool'] = x
if self.fc is not None:
x = self.fc(torch.flatten(x,1))
if self.isFetchDictForDebug:
return x, fetch_dict
else:
return x
def resnet_v2_50(num_classes=None, global_pool = True, isFetchDictForDebug = False):
model = ResNet_V2(Bottleneck_V2, [3,4,6,3],num_classes, global_pool, isFetchDictForDebug)
return model
def get_tf2pt_key_map_dict():
map_dict = {
'' : '',
# for root block: conv1 --> pool1
# that is: input x --> (conv1 --> pool1 )--> (residual-block1,2,3,4) --> postnorm --> global avg-pool --> output
'conv1/weights' : 'conv1.weight',
'conv1/biases' : 'conv1.bias',
# for post norm:
'postnorm/beta': 'postnorm.bias',
'postnorm/gamma': 'postnorm.weight',
'postnorm/moving_mean': 'postnorm.running_mean',
'postnorm/moving_variance': 'postnorm.running_var',
}
# processing tf_key_1
blks = [(1,3), (2,4), (3,6), (4,3)]
for t in blks:
b_idx = t[0]
for u_idx in range(t[1]):
key = 'block{}/unit_{}'.format(b_idx, u_idx + 1)
vaule = 'layer{}.{}'.format(b_idx, u_idx )
map_dict[key] = vaule
# processing tf_key_2
#Example: (tf_key, pt_key)
bottleneck_tf_pt_tuples = [
# Note: 'resnet_v2_50/block1/unit_1/bottleneck_v2/preact/beta/Adam':
# 'Adam' is related to Adam Optimization, so here we do not use it!!!
# Pre-Act: bn0"""
# BN: out = gamma * X_norm + beta, so beta is bias, gamma is weight;
['preact/gamma','bn0.weight'],
['preact/beta', 'bn0.bias'],
['preact/moving_mean', 'bn0.running_mean'],
['preact/moving_variance', 'bn0.running_var'],
#conv1 + bn1 + relu1
['conv1/weights', 'conv1.weight'],
['conv1/BatchNorm/gamma', 'bn1.weight'],
['conv1/BatchNorm/beta', 'bn1.bias'],
['conv1/BatchNorm/moving_mean', 'bn1.running_mean'],
['conv1/BatchNorm/moving_variance', 'bn1.running_var'],
#conv2 + bn2 + relu2
['conv2/weights', 'conv2.weight'],
['conv2/BatchNorm/gamma', 'bn2.weight'],
['conv2/BatchNorm/beta', 'bn2.bias'],
['conv2/BatchNorm/moving_mean', 'bn2.running_mean'],
['conv2/BatchNorm/moving_variance', 'bn2.running_var'],
#conv3
['conv3/weights', 'conv3.weight'],
['conv3/biases', 'conv3.bias'],
#shortcut
['shortcut/weights', 'shortcut.weight'],
['shortcut/biases', 'shortcut.bias'],
]
for cur_tuple in bottleneck_tf_pt_tuples:
map_dict[cur_tuple[0]] = cur_tuple[1]
#print (map_dict)
return map_dict
def map_tf_dictKeys_2PyTorch_dictKeys( map_dict,
tf_key = 'resnet_v2_50/block1/unit_1/bottleneck_v2/conv1/BatchNorm/beta'):
# E.g.:
# tf_key = 'resnet_v2_50/block1/unit_1/bottleneck_v2/conv1/BatchNorm/beta'
# or tf_key = 'resnet_v2_50/conv1/biases'
# 1) skip the first part : 'resnet_v2_50'
tf_key = tf_key[len('resnet_v2_50')+1:]
# 2) find 'bottleneck_v2' if exists, and pick the part before and after 'bottleneck_v2'
pos = tf_key.find('bottleneck_v2')
if pos > 0: # if found 'bottleneck_v2'
tf_key_1, tf_key_2 = tf_key[0:pos-1], tf_key[pos+1+len('bottleneck_v2'):]
else: # no found 'bottleneck_v2'
tf_key_1, tf_key_2 = '', tf_key
# processing tf_key_1
#print (tf_key_1)
pt_key_1 = map_dict[tf_key_1]
#print (pt_key_1)
#print (tf_key_2)
pt_key_2 = map_dict[tf_key_2]
#print (pt_key_2)
if pt_key_1 == '':
pt_key = pt_key_2
else:
pt_key = pt_key_1 + '.' + pt_key_2
#print ("[***] {} --> {}".format(tf_key, pt_key))
return pt_key
#>see https://stackoverflow.com/questions/51628607/pytorch-passing-numpy-array-for-weight-initialization
def set_resnet_parameter_data(layer, parameter_name, new_torch_data):
param = getattr(layer, parameter_name)
param.data = new_torch_data
def pass_np_model_state_to_resnet(src_np_model_state_dict, dst_resnet_model):
map_dict = get_tf2pt_key_map_dict()
dst_state_dict = dst_resnet_model.state_dict()
n_valid = 0
n_adam = 0
tf_var_names = list(src_np_model_state_dict['resnet_v2_50_names'])
N = len(tf_var_names)
for tf_key in sorted(src_np_model_state_dict.keys()):
# Note: 'resnet_v2_50/block1/unit_1/bottleneck_v2/preact/beta/Adam':
# 'Adam' is related to Adam Optimization, so here we do not use it!!!
param = src_np_model_state_dict[tf_key]
if 'Adam' in tf_key:
#print('Adam! {} is only for Adam Optimization, not uesed here!!'.format(tf_key))
n_adam += 1
tf_var_names.remove(tf_key)
continue
elif 'resnet_v2_50_names' == tf_key:
continue
pt_key = map_tf_dictKeys_2PyTorch_dictKeys(map_dict, tf_key)
if pt_key not in dst_state_dict:
print('unexpected ', pt_key, ' !')
continue
if not isinstance(param, np.ndarray):
raise ValueError('Expected a np.ndarray')
else:
# !!! Note: added by CCJ on 2019/10/24;
# tensorflow conv2d weight in size of [kernel_size[0], kernel_size[1], in_channels, out_channels],
# e.g., weight in size [7,7,3,64] means applying 7x7-kernel-size convolution to input image with 3 channel
# and output channel is 64;
# While, PyTorch will have its weight in shape [out_channels, in_channels/groups, kernel_size[0], kernel_size[1]],
# here we assume gropus = 1;
if param.ndim == 4:
param = np.transpose(param, [3,2,0,1])
param = torch.from_numpy(param).contiguous()
try:
dst_state_dict[pt_key].copy_(param)
n_valid += 1
tf_var_names.remove(tf_key)
except:
print(pt_key, ' is inconsistent!')
print ('src np.ndarray in shape {}, dst tensor in shape {}'.format(param.shape,
dst_state_dict[pt_key].shape))
n_valid -= 1
tf_var_names.append(tf_key)
continue
print('%d out of %d variables processed! Wherein:'%(n_valid + n_adam, N))
print(' [***] Copyed state dict for %d variables and finished!' %n_valid)
print(' [***] Skip %d adam variables, which are related to Adam optimaization state' %(n_adam))
print(' [***] {} variables are left unprocessed!'.format(len(tf_var_names)))
if n_valid + n_adam == N:
print (" [***] Resnet_V2_50 loading Numpy weights Succeed!!!")
else:
print (" [***] Resnet_V2_50 loading Numpy weights Failed !!!")
#print('[***] Including: ', tf_var_names)
def load_Res50ModelFromNpyFile(npy_file = '/home/ccj/hmr-rgbd/results/saved_weights/hmr_pre_trained_resnet_v2_50.npy'):
dst_resnet_model = resnet_v2_50()
assert (npy_file is not None)
# this npy file is generated by Python2, due to Tensorflow is installed in Python2;
# load this npy file (generated by Python2) to Python3, due to PyTorch is installed in Python3;
src_np_model_state_dict = np.load(npy_file, allow_pickle= True, encoding = 'latin1').item()
#tmp_name = 'resnet_v2_50/block4/unit_3/bottleneck_v2/conv2/weights'
# check the variable dimensionality
# print should be : [3, 3, 512, 512];
#print(src_np_model_state_dict[tmp_name].shape)
pass_np_model_state_to_resnet(src_np_model_state_dict, dst_resnet_model)
return dst_resnet_model
if __name__ == '__main__':
if 0:
print ('resnet_v2_50 state_dict():')
n = 0
for k,v in resnet_v2_50().state_dict().items():
print (k, v.shape)
n += 1
print (n)
if 0:
npy_file = '/home/ccj/hmr-rgbd/results/saved_weights/hmr_pre_trained_resnet_v2_50.npy'
resnet_dict2 = np.load(npy_file, allow_pickle= True, encoding = 'latin1').item()
print ('loaded var_names : ', resnet_dict2['resnet_v2_50_names'])
tmp_name = 'resnet_v2_50/block4/unit_3/bottleneck_v2/conv2/weights'
# check the variable dimensionality
# print should be : [3, 3, 512, 512];
print (resnet_dict2[tmp_name].shape)
if 1:
# this npy file is generated by Python2, due to Tensorflow is installed in Python2;
npy_file = '/home/ccj/hmr-rgbd/results/saved_weights/hmr_pre_trained_resnet_v2_50.npy'
# load this npy file (generated by Python2) to Python3, due to PyTorch is installed in Python3;
dst_resnet_model = load_Res50ModelFromNpyFile(npy_file)
dst_state_dict = dst_resnet_model.state_dict()
model_path = '/home/ccj/hmr-rgbd/results/saved_weights/hmr_pre_trained_resnet_v2_50.pt'
torch.save(dst_state_dict, model_path)
print ('saved %s' % model_path)
#n = 0
#for k,v in dst_state_dict.items():
# print (k, v.shape)
# n += 1
#print (n)
if 1:
# get a new model
resnet_v2_50 = resnet_v2_50()
model_path = '/home/ccj/hmr-rgbd/results/saved_weights/hmr_pre_trained_resnet_v2_50.pt'
# load the weights
resnet_v2_50.load_state_dict(torch.load(model_path))
print ('Loading %s' % model_path)
| true | true |
f727081df263bc130ba55eb6cf42a0583ef84e06 | 543 | py | Python | problems/chapter05/Ysi/dp_c.py | tokuma09/algorithm_problems | 58534620df73b230afbeb12de126174362625a78 | [
"CC0-1.0"
] | 1 | 2021-07-07T15:46:58.000Z | 2021-07-07T15:46:58.000Z | problems/chapter05/Ysi/dp_c.py | tokuma09/algorithm_problems | 58534620df73b230afbeb12de126174362625a78 | [
"CC0-1.0"
] | 5 | 2021-06-05T14:16:41.000Z | 2021-07-10T07:08:28.000Z | problems/chapter05/Ysi/dp_c.py | tokuma09/algorithm_problems | 58534620df73b230afbeb12de126174362625a78 | [
"CC0-1.0"
] | null | null | null | def main():
n = int(input())
welfare = []
for i in range(n):
a, b, c = map(int, input().split())
welfare.append([a, b, c])
dp = [[0, 0, 0] for _ in range(n+1)]
for i in range(1, n+1):
dp[i][0] = max(dp[i-1][1] + welfare[i-1][0], dp[i-1][2] + welfare[i-1][0])
dp[i][1] = max(dp[i-1][0] + welfare[i-1][1], dp[i-1][2] + welfare[i-1][1])
dp[i][2] = max(dp[i-1][0] + welfare[i-1][2], dp[i-1][1] + welfare[i-1][2])
ans = max(dp[n])
print(ans)
if __name__=='__main__':
main() | 30.166667 | 82 | 0.464088 | def main():
n = int(input())
welfare = []
for i in range(n):
a, b, c = map(int, input().split())
welfare.append([a, b, c])
dp = [[0, 0, 0] for _ in range(n+1)]
for i in range(1, n+1):
dp[i][0] = max(dp[i-1][1] + welfare[i-1][0], dp[i-1][2] + welfare[i-1][0])
dp[i][1] = max(dp[i-1][0] + welfare[i-1][1], dp[i-1][2] + welfare[i-1][1])
dp[i][2] = max(dp[i-1][0] + welfare[i-1][2], dp[i-1][1] + welfare[i-1][2])
ans = max(dp[n])
print(ans)
if __name__=='__main__':
main() | true | true |
f7270905c7aba4a402b7cd24c6eb95248f25ce9c | 1,368 | py | Python | setup.py | RevengeComing/DemonHunter | 8ab5fc0e8e4f33c3e299cba78555f33b96cc28d8 | [
"MIT"
] | 52 | 2017-02-06T10:43:42.000Z | 2022-03-06T02:21:57.000Z | setup.py | RevengeComing/DemonHunter | 8ab5fc0e8e4f33c3e299cba78555f33b96cc28d8 | [
"MIT"
] | 4 | 2017-05-03T23:28:43.000Z | 2018-05-16T18:40:28.000Z | setup.py | RevengeComing/DemonHunter | 8ab5fc0e8e4f33c3e299cba78555f33b96cc28d8 | [
"MIT"
] | 10 | 2017-05-03T23:18:45.000Z | 2022-03-31T13:51:06.000Z | from setuptools import setup, find_packages
long_description = """
DemonHunter is a framework to create a Honeypot network very simple and easy.
"""
requirements = [
"httptools==0.0.11",
"aiohttp==2.3.10",
"bcrypt==3.1.4",
"flask==0.12.2",
"flask-login==0.4.1",
"flask-sqlalchemy==2.3.2",
"flask-sockets==0.2.1",
"meinheld==0.6.1",
"click==6.7",
]
setup(
name='demonhunter',
version='2.0.3',
description='A Distributed Honeypot',
long_description=long_description,
url='https://github.com/RevengeComing/DemonHunter',
author='Sepehr Hamzelooy',
author_email='s.hamzelooy@gmail.com',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.5',
],
install_requires=requirements,
packages=find_packages(),
keywords='honeypot honeynet agent',
scripts = [
'bin/dh_run'
],
package_data = {
'': ['*.html', '*.js', '*.css'],
'demonhunter': [
'nodes/honeypots/http/nginx/*.html',
'nodes/honeypots/http/apache/*.html',
'nodes/master/templates/*',
'nodes/master/static/css/*',
'nodes/master/static/js/*'
],
}
) | 23.186441 | 77 | 0.574561 | from setuptools import setup, find_packages
long_description = """
DemonHunter is a framework to create a Honeypot network very simple and easy.
"""
requirements = [
"httptools==0.0.11",
"aiohttp==2.3.10",
"bcrypt==3.1.4",
"flask==0.12.2",
"flask-login==0.4.1",
"flask-sqlalchemy==2.3.2",
"flask-sockets==0.2.1",
"meinheld==0.6.1",
"click==6.7",
]
setup(
name='demonhunter',
version='2.0.3',
description='A Distributed Honeypot',
long_description=long_description,
url='https://github.com/RevengeComing/DemonHunter',
author='Sepehr Hamzelooy',
author_email='s.hamzelooy@gmail.com',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.5',
],
install_requires=requirements,
packages=find_packages(),
keywords='honeypot honeynet agent',
scripts = [
'bin/dh_run'
],
package_data = {
'': ['*.html', '*.js', '*.css'],
'demonhunter': [
'nodes/honeypots/http/nginx/*.html',
'nodes/honeypots/http/apache/*.html',
'nodes/master/templates/*',
'nodes/master/static/css/*',
'nodes/master/static/js/*'
],
}
) | true | true |
f727096ddb4e3b582b8a50d866549fed8ea616db | 2,026 | py | Python | exp/python_c3_class_mro/python_c3_mro_anler.py | nicolasessisbreton/fython | 988f5a94cee8b16b0000501a22239195c73424a1 | [
"Apache-2.0"
] | 41 | 2016-01-21T05:14:45.000Z | 2021-11-24T20:37:21.000Z | exp/python_c3_class_mro/python_c3_mro_anler.py | nicolasessisbreton/fython | 988f5a94cee8b16b0000501a22239195c73424a1 | [
"Apache-2.0"
] | 5 | 2016-01-21T05:36:37.000Z | 2016-08-22T19:26:51.000Z | exp/python_c3_class_mro/python_c3_mro_anler.py | nicolasessisbreton/fython | 988f5a94cee8b16b0000501a22239195c73424a1 | [
"Apache-2.0"
] | 3 | 2016-01-23T04:03:44.000Z | 2016-08-21T15:58:38.000Z | # taken from https://gist.github.com/anler/1144867
def C3(cls, *mro_lists):
"""Implementation of the Python's C3 Algorithm.
Notes:
* The order of items in an MRO should be preserved in all of
its future subclasses
"""
import itertools
# Make a copy so we don't change existing content
mro_lists = [list(mro_list[:]) for mro_list in mro_lists]
# Set up the new MRO with the class itself
mro = [cls]
# The real algorithm goes here
while True:
# Reset for the next round of tests
candidate_found = False
for mro_list in mro_lists:
if not len(mro_list):
# Any empty lists are of no use to the algorithm
continue
# Get the first item as a potential candidate for the MRO
candidate = mro_list[0]
if candidate_found:
# Candidates promoted to the MRO are no longer of use
if candidate in mro:
mro_list.pop(0)
# Don't bother checking any more candidates if one was found
continue
# See if it's in any position other than fist in any of the other lists
if candidate in itertools.chain(*(x[1:] for x in mro_lists)):
# Isn't a valid candidate yet and we need to move on to the first class
# in the next list
continue
else:
# The candidate is valid and should be promoted to the MRO
mro.append(candidate)
mro_list.pop(0)
candidate_found = True
if not sum(len(mro_list) for mro_list in mro_lists):
# There are no MROs to cycle through, so we're all done
break
if not candidate_found:
# No valid candidate was available, so we have to bail out
raise TypeError("Inconsistent MRO")
return tuple(mro) | 36.836364 | 87 | 0.55923 |
def C3(cls, *mro_lists):
import itertools
mro_lists = [list(mro_list[:]) for mro_list in mro_lists]
# Set up the new MRO with the class itself
mro = [cls]
# The real algorithm goes here
while True:
# Reset for the next round of tests
candidate_found = False
for mro_list in mro_lists:
if not len(mro_list):
# Any empty lists are of no use to the algorithm
continue
# Get the first item as a potential candidate for the MRO
candidate = mro_list[0]
if candidate_found:
# Candidates promoted to the MRO are no longer of use
if candidate in mro:
mro_list.pop(0)
# Don't bother checking any more candidates if one was found
continue
if candidate in itertools.chain(*(x[1:] for x in mro_lists)):
# Isn't a valid candidate yet and we need to move on to the first class
continue
else:
mro.append(candidate)
mro_list.pop(0)
candidate_found = True
if not sum(len(mro_list) for mro_list in mro_lists):
break
if not candidate_found:
# No valid candidate was available, so we have to bail out
raise TypeError("Inconsistent MRO")
return tuple(mro) | true | true |
f72709c4742158734a8a8151b8c373a41c265cb7 | 13,728 | py | Python | jc/parsers/netstat.py | shaikustin/jc | b59e38cfd2c8a7f5868e05d5562557b1c27e5e56 | [
"MIT"
] | 3,215 | 2019-10-24T15:25:56.000Z | 2022-03-31T15:43:01.000Z | jc/parsers/netstat.py | shaikustin/jc | b59e38cfd2c8a7f5868e05d5562557b1c27e5e56 | [
"MIT"
] | 109 | 2019-11-02T16:22:29.000Z | 2022-03-30T17:32:17.000Z | jc/parsers/netstat.py | shaikustin/jc | b59e38cfd2c8a7f5868e05d5562557b1c27e5e56 | [
"MIT"
] | 75 | 2020-02-07T00:16:32.000Z | 2022-03-29T09:29:53.000Z | """jc - JSON CLI output utility `netstat` command output parser
Caveats:
- Use of multiple `l` options is not supported on OSX (e.g. `netstat -rlll`)
- Use of the `A` option is not supported on OSX when using the `r` option (e.g. `netstat -rA`)
Usage (cli):
$ netstat | jc --netstat
or
$ jc netstat
Usage (module):
import jc.parsers.netstat
result = jc.parsers.netstat.parse(netstat_command_output)
Schema:
[
{
"proto": string,
"recv_q": integer,
"send_q": integer,
"transport_protocol" string,
"network_protocol": string,
"local_address": string,
"local_port": string,
"local_port_num": integer,
"foreign_address": string,
"foreign_port": string,
"foreign_port_num": integer,
"state": string,
"program_name": string,
"pid": integer,
"user": string,
"security_context": string,
"refcnt": integer,
"flags": string,
"type": string,
"inode": integer,
"path": string,
"kind": string,
"address": string,
"unix_inode": string,
"conn": string,
"refs": string,
"nextref": string,
"name": string,
"unit": integer,
"vendor": integer,
"class": integer,
"subcla": integer,
"unix_flags": integer,
"pcbcount": integer,
"rcvbuf": integer,
"sndbuf": integer,
"rxbytes": integer,
"txbytes": integer,
"destination": string,
"gateway": string,
"route_flags": string,
"route_flags_pretty": [
string,
]
"route_refs": integer,
"use": integer,
"mtu": integer,
"expire": string,
"genmask": string,
"mss": integer,
"window": integer,
"irtt": integer,
"iface": string,
"metric": integer,
"network": string,
"address": string,
"ipkts": integer, # - = null
"ierrs": integer, # - = null
"idrop": integer, # - = null
"opkts": integer, # - = null
"oerrs": integer, # - = null
"coll": integer, # - = null
"rx_ok": integer,
"rx_err": integer,
"rx_drp": integer,
"rx_ovr": integer,
"tx_ok": integer,
"tx_err": integer,
"tx_drp": integer,
"tx_ovr": integer,
"flg": string,
"ibytes": integer,
"obytes": integer,
"r_mbuf": integer,
"s_mbuf": integer,
"r_clus": integer,
"s_clus": integer,
"r_hiwa": integer,
"s_hiwa": integer,
"r_lowa": integer,
"s_lowa": integer,
"r_bcnt": integer,
"s_bcnt": integer,
"r_bmax": integer,
"s_bmax": integer,
"rexmit": integer,
"ooorcv": integer,
"0_win": integer,
"rexmt": float,
"persist": float,
"keep": float,
"2msl": float,
"delack": float,
"rcvtime": float,
}
]
Examples:
# netstat -apee | jc --netstat -p
[
{
"proto": "tcp",
"recv_q": 0,
"send_q": 0,
"local_address": "localhost",
"foreign_address": "0.0.0.0",
"state": "LISTEN",
"user": "systemd-resolve",
"inode": 26958,
"program_name": "systemd-resolve",
"kind": "network",
"pid": 887,
"local_port": "domain",
"foreign_port": "*",
"transport_protocol": "tcp",
"network_protocol": "ipv4"
},
{
"proto": "tcp",
"recv_q": 0,
"send_q": 0,
"local_address": "0.0.0.0",
"foreign_address": "0.0.0.0",
"state": "LISTEN",
"user": "root",
"inode": 30499,
"program_name": "sshd",
"kind": "network",
"pid": 1186,
"local_port": "ssh",
"foreign_port": "*",
"transport_protocol": "tcp",
"network_protocol": "ipv4"
},
{
"proto": "tcp",
"recv_q": 0,
"send_q": 0,
"local_address": "localhost",
"foreign_address": "localhost",
"state": "ESTABLISHED",
"user": "root",
"inode": 46829,
"program_name": "sshd: root",
"kind": "network",
"pid": 2242,
"local_port": "ssh",
"foreign_port": "52186",
"transport_protocol": "tcp",
"network_protocol": "ipv4",
"foreign_port_num": 52186
},
{
"proto": "tcp",
"recv_q": 0,
"send_q": 0,
"local_address": "localhost",
"foreign_address": "localhost",
"state": "ESTABLISHED",
"user": "root",
"inode": 46828,
"program_name": "ssh",
"kind": "network",
"pid": 2241,
"local_port": "52186",
"foreign_port": "ssh",
"transport_protocol": "tcp",
"network_protocol": "ipv4",
"local_port_num": 52186
},
{
"proto": "tcp6",
"recv_q": 0,
"send_q": 0,
"local_address": "[::]",
"foreign_address": "[::]",
"state": "LISTEN",
"user": "root",
"inode": 30510,
"program_name": "sshd",
"kind": "network",
"pid": 1186,
"local_port": "ssh",
"foreign_port": "*",
"transport_protocol": "tcp",
"network_protocol": "ipv6"
},
{
"proto": "udp",
"recv_q": 0,
"send_q": 0,
"local_address": "localhost",
"foreign_address": "0.0.0.0",
"state": null,
"user": "systemd-resolve",
"inode": 26957,
"program_name": "systemd-resolve",
"kind": "network",
"pid": 887,
"local_port": "domain",
"foreign_port": "*",
"transport_protocol": "udp",
"network_protocol": "ipv4"
},
{
"proto": "raw6",
"recv_q": 0,
"send_q": 0,
"local_address": "[::]",
"foreign_address": "[::]",
"state": "7",
"user": "systemd-network",
"inode": 27001,
"program_name": "systemd-network",
"kind": "network",
"pid": 867,
"local_port": "ipv6-icmp",
"foreign_port": "*",
"transport_protocol": null,
"network_protocol": "ipv6"
},
{
"proto": "unix",
"refcnt": 2,
"flags": null,
"type": "DGRAM",
"state": null,
"inode": 33322,
"program_name": "systemd",
"path": "/run/user/1000/systemd/notify",
"kind": "socket",
"pid": 1607
},
{
"proto": "unix",
"refcnt": 2,
"flags": "ACC",
"type": "SEQPACKET",
"state": "LISTENING",
"inode": 20835,
"program_name": "init",
"path": "/run/udev/control",
"kind": "socket",
"pid": 1
},
...
]
$ netstat -r | jc --netstat -p
[
{
"destination": "default",
"gateway": "gateway",
"genmask": "0.0.0.0",
"route_flags": "UG",
"mss": 0,
"window": 0,
"irtt": 0,
"iface": "ens33",
"kind": "route",
"route_flags_pretty": [
"UP",
"GATEWAY"
]
},
{
"destination": "172.17.0.0",
"gateway": "0.0.0.0",
"genmask": "255.255.0.0",
"route_flags": "U",
"mss": 0,
"window": 0,
"irtt": 0,
"iface": "docker0",
"kind": "route",
"route_flags_pretty": [
"UP"
]
},
{
"destination": "192.168.71.0",
"gateway": "0.0.0.0",
"genmask": "255.255.255.0",
"route_flags": "U",
"mss": 0,
"window": 0,
"irtt": 0,
"iface": "ens33",
"kind": "route",
"route_flags_pretty": [
"UP"
]
}
]
$ netstat -i | jc --netstat -p
[
{
"iface": "ens33",
"mtu": 1500,
"rx_ok": 476,
"rx_err": 0,
"rx_drp": 0,
"rx_ovr": 0,
"tx_ok": 312,
"tx_err": 0,
"tx_drp": 0,
"tx_ovr": 0,
"flg": "BMRU",
"kind": "interface"
},
{
"iface": "lo",
"mtu": 65536,
"rx_ok": 0,
"rx_err": 0,
"rx_drp": 0,
"rx_ovr": 0,
"tx_ok": 0,
"tx_err": 0,
"tx_drp": 0,
"tx_ovr": 0,
"flg": "LRU",
"kind": "interface"
}
]
"""
import jc.utils
class info():
"""Provides parser metadata (version, author, etc.)"""
version = '1.10'
description = '`netstat` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
# compatible options: linux, darwin, cygwin, win32, aix, freebsd
compatible = ['linux', 'darwin', 'freebsd']
magic_commands = ['netstat']
__version__ = info.version
def _process(proc_data):
"""
Final processing to conform to the schema.
Parameters:
proc_data: (List of Dictionaries) raw structured data to process
Returns:
List of Dictionaries. Structured data to conform to the schema.
"""
for entry in proc_data:
# integer and float conversions
int_list = ['recv_q', 'send_q', 'pid', 'refcnt', 'inode', 'unit', 'vendor', 'class',
'osx_flags', 'subcla', 'pcbcount', 'rcvbuf', 'sndbuf', 'rxbytes', 'txbytes',
'route_refs', 'use', 'mtu', 'mss', 'window', 'irtt', 'metric', 'ipkts',
'ierrs', 'opkts', 'oerrs', 'coll', 'rx_ok', 'rx_err', 'rx_drp', 'rx_ovr',
'tx_ok', 'tx_err', 'tx_drp', 'tx_ovr', 'idrop', 'ibytes', 'obytes', 'r_mbuf',
's_mbuf', 'r_clus', 's_clus', 'r_hiwa', 's_hiwa', 'r_lowa', 's_lowa', 'r_bcnt',
's_bcnt', 'r_bmax', 's_bmax', 'rexmit', 'ooorcv', '0_win']
float_list = ['rexmt', 'persist', 'keep', '2msl', 'delack', 'rcvtime']
for key in entry:
if key in int_list:
entry[key] = jc.utils.convert_to_int(entry[key])
if key in float_list:
entry[key] = jc.utils.convert_to_float(entry[key])
# add number keys
if 'local_port' in entry:
local_num = jc.utils.convert_to_int(entry['local_port'])
if local_num:
entry['local_port_num'] = local_num
if 'foreign_port' in entry:
foreign_num = jc.utils.convert_to_int(entry['foreign_port'])
if foreign_num:
entry['foreign_port_num'] = foreign_num
return proc_data
def parse(data, raw=False, quiet=False):
"""
Main text parsing function
Parameters:
data: (string) text data to parse
raw: (boolean) output preprocessed JSON if True
quiet: (boolean) suppress warning messages if True
Returns:
List of Dictionaries. Raw or processed structured data.
"""
import jc.utils
if not quiet:
jc.utils.compatibility(__name__, info.compatible)
cleandata = list(filter(None, data.splitlines()))
raw_output = []
if jc.utils.has_data(data):
# check for FreeBSD/OSX vs Linux
# is this from FreeBSD/OSX?
if cleandata[0] == 'Active Internet connections' \
or cleandata[0] == 'Active Internet connections (including servers)' \
or cleandata[0] == 'Active Multipath Internet connections' \
or cleandata[0] == 'Active LOCAL (UNIX) domain sockets' \
or cleandata[0] == 'Registered kernel control modules' \
or cleandata[0] == 'Active kernel event sockets' \
or cleandata[0] == 'Active kernel control sockets' \
or cleandata[0] == 'Routing tables' \
or cleandata[0].startswith('Name '):
import jc.parsers.netstat_freebsd_osx
raw_output = jc.parsers.netstat_freebsd_osx.parse(cleandata)
# use linux parser
else:
import jc.parsers.netstat_linux
raw_output = jc.parsers.netstat_linux.parse(cleandata)
if raw:
return raw_output
else:
return _process(raw_output)
| 29.908497 | 99 | 0.436844 | import jc.utils
class info():
version = '1.10'
description = '`netstat` command parser'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
compatible = ['linux', 'darwin', 'freebsd']
magic_commands = ['netstat']
__version__ = info.version
def _process(proc_data):
for entry in proc_data:
int_list = ['recv_q', 'send_q', 'pid', 'refcnt', 'inode', 'unit', 'vendor', 'class',
'osx_flags', 'subcla', 'pcbcount', 'rcvbuf', 'sndbuf', 'rxbytes', 'txbytes',
'route_refs', 'use', 'mtu', 'mss', 'window', 'irtt', 'metric', 'ipkts',
'ierrs', 'opkts', 'oerrs', 'coll', 'rx_ok', 'rx_err', 'rx_drp', 'rx_ovr',
'tx_ok', 'tx_err', 'tx_drp', 'tx_ovr', 'idrop', 'ibytes', 'obytes', 'r_mbuf',
's_mbuf', 'r_clus', 's_clus', 'r_hiwa', 's_hiwa', 'r_lowa', 's_lowa', 'r_bcnt',
's_bcnt', 'r_bmax', 's_bmax', 'rexmit', 'ooorcv', '0_win']
float_list = ['rexmt', 'persist', 'keep', '2msl', 'delack', 'rcvtime']
for key in entry:
if key in int_list:
entry[key] = jc.utils.convert_to_int(entry[key])
if key in float_list:
entry[key] = jc.utils.convert_to_float(entry[key])
if 'local_port' in entry:
local_num = jc.utils.convert_to_int(entry['local_port'])
if local_num:
entry['local_port_num'] = local_num
if 'foreign_port' in entry:
foreign_num = jc.utils.convert_to_int(entry['foreign_port'])
if foreign_num:
entry['foreign_port_num'] = foreign_num
return proc_data
def parse(data, raw=False, quiet=False):
import jc.utils
if not quiet:
jc.utils.compatibility(__name__, info.compatible)
cleandata = list(filter(None, data.splitlines()))
raw_output = []
if jc.utils.has_data(data):
if cleandata[0] == 'Active Internet connections' \
or cleandata[0] == 'Active Internet connections (including servers)' \
or cleandata[0] == 'Active Multipath Internet connections' \
or cleandata[0] == 'Active LOCAL (UNIX) domain sockets' \
or cleandata[0] == 'Registered kernel control modules' \
or cleandata[0] == 'Active kernel event sockets' \
or cleandata[0] == 'Active kernel control sockets' \
or cleandata[0] == 'Routing tables' \
or cleandata[0].startswith('Name '):
import jc.parsers.netstat_freebsd_osx
raw_output = jc.parsers.netstat_freebsd_osx.parse(cleandata)
else:
import jc.parsers.netstat_linux
raw_output = jc.parsers.netstat_linux.parse(cleandata)
if raw:
return raw_output
else:
return _process(raw_output)
| true | true |
f7270a9ece60d01e3332a67758dc9efe26f5976e | 3,799 | py | Python | tests/test_02_app/test_custom_app.py | hairychris/uvicorn-gunicorn-docker | 5c1f3538b14a52676e0723497e1f65947382888b | [
"MIT"
] | null | null | null | tests/test_02_app/test_custom_app.py | hairychris/uvicorn-gunicorn-docker | 5c1f3538b14a52676e0723497e1f65947382888b | [
"MIT"
] | null | null | null | tests/test_02_app/test_custom_app.py | hairychris/uvicorn-gunicorn-docker | 5c1f3538b14a52676e0723497e1f65947382888b | [
"MIT"
] | null | null | null | import time
from pathlib import Path, PurePath
import docker
import pytest
import requests
from ..utils import (
CONTAINER_NAME,
IMAGE_NAME,
get_config,
get_logs,
remove_previous_container,
)
client = docker.from_env()
def verify_container(container, response_text):
config_data = get_config(container)
assert config_data["workers_per_core"] == 1
assert config_data["host"] == "0.0.0.0"
assert config_data["port"] == "80"
assert config_data["loglevel"] == "info"
assert config_data["workers"] >= 2
assert config_data["bind"] == "0.0.0.0:80"
logs = get_logs(container)
assert "Checking for script in /app/prestart.sh" in logs
assert "Running script /app/prestart.sh" in logs
assert (
"Running inside /app/prestart.sh, you could add migrations to this file" in logs
)
response = requests.get("http://127.0.0.1:8000")
assert response.text == response_text
@pytest.mark.parametrize(
"dockerfile,environment,response_text",
[
(
"python3.6.dockerfile",
{"MODULE_NAME": "custom_app.custom_main", "VARIABLE_NAME": "custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.6",
),
(
"python3.7.dockerfile",
{"MODULE_NAME": "custom_app.custom_main", "VARIABLE_NAME": "custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
(
"latest.dockerfile",
{"MODULE_NAME": "custom_app.custom_main", "VARIABLE_NAME": "custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
(
"python3.6-alpine3.9.dockerfile",
{"MODULE_NAME": "custom_app.custom_main", "VARIABLE_NAME": "custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.6",
),
(
"python3.7-alpine3.9.dockerfile",
{"MODULE_NAME": "custom_app.custom_main", "VARIABLE_NAME": "custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
(
"python3.6.dockerfile",
{"APP_MODULE": "custom_app.custom_main:custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.6",
),
(
"python3.7.dockerfile",
{"APP_MODULE": "custom_app.custom_main:custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
(
"latest.dockerfile",
{"APP_MODULE": "custom_app.custom_main:custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
(
"python3.6-alpine3.9.dockerfile",
{"APP_MODULE": "custom_app.custom_main:custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.6",
),
(
"python3.7-alpine3.9.dockerfile",
{"APP_MODULE": "custom_app.custom_main:custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
],
)
def test_custom_app(dockerfile, environment, response_text):
remove_previous_container(client)
test_path: PurePath = Path(__file__)
path = test_path.parent / "custom_app"
client.images.build(path=str(path), dockerfile=dockerfile, tag=IMAGE_NAME)
container = client.containers.run(
IMAGE_NAME,
name=CONTAINER_NAME,
environment=environment,
ports={"80": "8000"},
detach=True,
)
time.sleep(1)
verify_container(container, response_text)
container.stop()
# Test that everything works after restarting too
container.start()
time.sleep(1)
verify_container(container, response_text)
container.stop()
container.remove()
| 33.619469 | 88 | 0.609371 | import time
from pathlib import Path, PurePath
import docker
import pytest
import requests
from ..utils import (
CONTAINER_NAME,
IMAGE_NAME,
get_config,
get_logs,
remove_previous_container,
)
client = docker.from_env()
def verify_container(container, response_text):
config_data = get_config(container)
assert config_data["workers_per_core"] == 1
assert config_data["host"] == "0.0.0.0"
assert config_data["port"] == "80"
assert config_data["loglevel"] == "info"
assert config_data["workers"] >= 2
assert config_data["bind"] == "0.0.0.0:80"
logs = get_logs(container)
assert "Checking for script in /app/prestart.sh" in logs
assert "Running script /app/prestart.sh" in logs
assert (
"Running inside /app/prestart.sh, you could add migrations to this file" in logs
)
response = requests.get("http://127.0.0.1:8000")
assert response.text == response_text
@pytest.mark.parametrize(
"dockerfile,environment,response_text",
[
(
"python3.6.dockerfile",
{"MODULE_NAME": "custom_app.custom_main", "VARIABLE_NAME": "custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.6",
),
(
"python3.7.dockerfile",
{"MODULE_NAME": "custom_app.custom_main", "VARIABLE_NAME": "custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
(
"latest.dockerfile",
{"MODULE_NAME": "custom_app.custom_main", "VARIABLE_NAME": "custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
(
"python3.6-alpine3.9.dockerfile",
{"MODULE_NAME": "custom_app.custom_main", "VARIABLE_NAME": "custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.6",
),
(
"python3.7-alpine3.9.dockerfile",
{"MODULE_NAME": "custom_app.custom_main", "VARIABLE_NAME": "custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
(
"python3.6.dockerfile",
{"APP_MODULE": "custom_app.custom_main:custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.6",
),
(
"python3.7.dockerfile",
{"APP_MODULE": "custom_app.custom_main:custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
(
"latest.dockerfile",
{"APP_MODULE": "custom_app.custom_main:custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
(
"python3.6-alpine3.9.dockerfile",
{"APP_MODULE": "custom_app.custom_main:custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.6",
),
(
"python3.7-alpine3.9.dockerfile",
{"APP_MODULE": "custom_app.custom_main:custom_var"},
"Test app. From Uvicorn with Gunicorn. Using Python 3.7",
),
],
)
def test_custom_app(dockerfile, environment, response_text):
remove_previous_container(client)
test_path: PurePath = Path(__file__)
path = test_path.parent / "custom_app"
client.images.build(path=str(path), dockerfile=dockerfile, tag=IMAGE_NAME)
container = client.containers.run(
IMAGE_NAME,
name=CONTAINER_NAME,
environment=environment,
ports={"80": "8000"},
detach=True,
)
time.sleep(1)
verify_container(container, response_text)
container.stop()
container.start()
time.sleep(1)
verify_container(container, response_text)
container.stop()
container.remove()
| true | true |
f7270af0eb3dba69ec7cddb1fdb8c33f7344108d | 1,231 | py | Python | src/modules/agents/noisy_agents.py | mariuslindegaard/6.867_MARL_project | 572b88b4d491db8a1673535868f4bf9aff58f73d | [
"Apache-2.0"
] | 401 | 2021-02-23T02:42:42.000Z | 2022-03-21T08:22:37.000Z | src/modules/agents/noisy_agents.py | mariuslindegaard/6.867_MARL_project | 572b88b4d491db8a1673535868f4bf9aff58f73d | [
"Apache-2.0"
] | 21 | 2021-04-10T10:05:07.000Z | 2022-03-29T10:09:03.000Z | src/modules/agents/noisy_agents.py | mariuslindegaard/6.867_MARL_project | 572b88b4d491db8a1673535868f4bf9aff58f73d | [
"Apache-2.0"
] | 90 | 2021-02-15T08:37:04.000Z | 2022-03-21T06:37:15.000Z | import torch.nn as nn
import torch.nn.functional as F
from utils.noisy_liner import NoisyLinear
from torch.nn import LayerNorm
class NoisyRNNAgent(nn.Module):
def __init__(self, input_shape, args):
super(NoisyRNNAgent, self).__init__()
self.args = args
self.fc1 = nn.Linear(input_shape, args.rnn_hidden_dim)
self.rnn = nn.GRUCell(args.rnn_hidden_dim, args.rnn_hidden_dim)
self.fc2 = NoisyLinear(args.rnn_hidden_dim, args.n_actions, True, args.device)
if getattr(args, "use_layer_norm", False):
self.layer_norm = LayerNorm(args.rnn_hidden_dim)
def init_hidden(self):
# make hidden states on same device as model
return self.fc1.weight.new(1, self.args.rnn_hidden_dim).zero_()
def forward(self, inputs, hidden_state):
b, a, e = inputs.size()
inputs = inputs.view(-1, e)
x = F.relu(self.fc1(inputs), inplace=True)
h_in = hidden_state.reshape(-1, self.args.rnn_hidden_dim)
hh = self.rnn(x, h_in)
if getattr(self.args, "use_layer_norm", False):
q = self.fc2(self.layer_norm(hh))
else:
q = self.fc2(hh)
return q.view(b, a, -1), hh.view(b, a, -1) | 35.171429 | 86 | 0.640942 | import torch.nn as nn
import torch.nn.functional as F
from utils.noisy_liner import NoisyLinear
from torch.nn import LayerNorm
class NoisyRNNAgent(nn.Module):
def __init__(self, input_shape, args):
super(NoisyRNNAgent, self).__init__()
self.args = args
self.fc1 = nn.Linear(input_shape, args.rnn_hidden_dim)
self.rnn = nn.GRUCell(args.rnn_hidden_dim, args.rnn_hidden_dim)
self.fc2 = NoisyLinear(args.rnn_hidden_dim, args.n_actions, True, args.device)
if getattr(args, "use_layer_norm", False):
self.layer_norm = LayerNorm(args.rnn_hidden_dim)
def init_hidden(self):
return self.fc1.weight.new(1, self.args.rnn_hidden_dim).zero_()
def forward(self, inputs, hidden_state):
b, a, e = inputs.size()
inputs = inputs.view(-1, e)
x = F.relu(self.fc1(inputs), inplace=True)
h_in = hidden_state.reshape(-1, self.args.rnn_hidden_dim)
hh = self.rnn(x, h_in)
if getattr(self.args, "use_layer_norm", False):
q = self.fc2(self.layer_norm(hh))
else:
q = self.fc2(hh)
return q.view(b, a, -1), hh.view(b, a, -1) | true | true |
f7270bef7a963e5cdee0174d9826895442fbf65b | 11,468 | py | Python | modules/flow.py | aasensio/bayesDI | 4ddad57d89c3512b4c4ee5684ddc5608060ebdec | [
"MIT"
] | 2 | 2021-08-20T07:59:05.000Z | 2021-12-02T20:19:48.000Z | modules/flow.py | aasensio/bayesDI | 4ddad57d89c3512b4c4ee5684ddc5608060ebdec | [
"MIT"
] | null | null | null | modules/flow.py | aasensio/bayesDI | 4ddad57d89c3512b4c4ee5684ddc5608060ebdec | [
"MIT"
] | null | null | null | import numpy as np
import torch
import torch.nn.functional as F
from nflows import transforms, distributions, flows, utils
import nflows.nn.nets as nn_
import matplotlib.pyplot as pl
from modules import resnet
# https://github.com/stephengreen/lfi-gw/blob/master/lfigw/nde_flows.py
def create_linear_transform(input_dim):
"""Create the composite linear transform PLU.
Arguments:
input_dim {int} -- dimension of the space
Returns:
Transform -- nde.Transform object
"""
permutation = transforms.RandomPermutation(features = input_dim)
linear = transforms.LULinear(input_dim, identity_init=True)
return transforms.CompositeTransform([permutation, linear])
def create_base_transform(i,
input_dim,
context_dim,
hidden_dim=512,
num_transform_blocks=2,
activation='relu',
dropout_probability=0.0,
batch_norm=False,
num_bins=8,
tail_bound=1.,
apply_unconditional_transform=False,
base_transform_type='rq-coupling',
transform_net='conv'):
"""Build a base NSF transform of x, conditioned on y.
This uses the PiecewiseRationalQuadraticCoupling transform or
the MaskedPiecewiseRationalQuadraticAutoregressiveTransform, as described
in the Neural Spline Flow paper (https://arxiv.org/abs/1906.04032).
Code is adapted from the uci.py example from
https://github.com/bayesiains/nsf.
A coupling flow fixes half the components of x, and applies a transform
to the remaining components, conditioned on the fixed components. This is
a restricted form of an autoregressive transform, with a single split into
fixed/transformed components.
The transform here is a neural spline flow, where the flow is parametrized
by a residual neural network that depends on x_fixed and y. The residual
network consists of a sequence of two-layer fully-connected blocks.
Arguments:
i {int} -- index of transform in sequence
param_dim {int} -- dimensionality of x
Keyword Arguments:
context_dim {int} -- dimensionality of y (default: {None})
hidden_dim {int} -- number of hidden units per layer (default: {512})
num_transform_blocks {int} -- number of transform blocks comprising the
transform (default: {2})
activation {str} -- activation function (default: {'relu'})
dropout_probability {float} -- probability of dropping out a unit
(default: {0.0})
batch_norm {bool} -- whether to use batch normalization
(default: {False})
num_bins {int} -- number of bins for the spline (default: {8})
tail_bound {[type]} -- [description] (default: {1.})
apply_unconditional_transform {bool} -- whether to apply an
unconditional transform to
fixed components
(default: {False})
base_transform_type {str} -- type of base transform
([rq-coupling], rq-autoregressive)
Returns:
Transform -- the NSF transform
"""
if activation == 'elu':
activation_fn = F.elu
elif activation == 'relu':
activation_fn = F.relu
elif activation == 'leaky_relu':
activation_fn = F.leaky_relu
else:
activation_fn = F.relu # Default
print('Invalid activation function specified. Using ReLU.')
if base_transform_type == 'rq-coupling':
mask = utils.create_alternating_binary_mask(input_dim, even=(i % 2 == 0))
if (transform_net == 'fc'):
transform_net = lambda in_features, out_features: nn_.ResidualNet(
in_features = in_features,
out_features = out_features,
hidden_features = hidden_dim,
context_features = context_dim,
num_blocks = num_transform_blocks,
activation = activation_fn,
dropout_probability = dropout_probability,
use_batch_norm = batch_norm)
if (transform_net == 'conv'):
transform_net = lambda in_features, out_features: resnet.ConvResidualNet1d(
in_channels = 1,
out_channels = out_features // in_features,
hidden_channels = hidden_dim,
context_channels = context_dim,
num_blocks = num_transform_blocks,
activation = activation_fn,
dropout_probability = dropout_probability,
use_batch_norm = batch_norm)
transform = transforms.PiecewiseRationalQuadraticCouplingTransform(
mask = mask,
transform_net_create_fn = transform_net,
num_bins = num_bins,
tails = 'linear',
tail_bound = tail_bound,
apply_unconditional_transform = apply_unconditional_transform
)
elif base_transform_type == 'rq-autoregressive':
transform = transforms.MaskedPiecewiseRationalQuadraticAutoregressiveTransform(
features=input_dim,
hidden_features=hidden_dim,
context_features=context_dim,
num_bins=num_bins,
tails='linear',
tail_bound=tail_bound,
num_blocks=num_transform_blocks,
use_residual_blocks=True,
random_mask=False,
activation=activation_fn,
dropout_probability=dropout_probability,
use_batch_norm=batch_norm
)
else:
raise ValueError
return transform
def create_transform(input_dim, context_dim, num_flow_steps, base_transform_kwargs):
"""Build a sequence of NSF transforms, which maps parameters x into the
base distribution u (noise). Transforms are conditioned on strain data y.
Note that the forward map is f^{-1}(x, y).
Each step in the sequence consists of
* A linear transform of x, which in particular permutes components
* A NSF transform of x, conditioned on y.
There is one final linear transform at the end.
This function was adapted from the uci.py example in
https://github.com/bayesiains/nsf
Arguments:
num_flow_steps {int} -- number of transforms in sequence
param_dim {int} -- dimensionality of x
context_dim {int} -- dimensionality of y
base_transform_kwargs {dict} -- hyperparameters for NSF step
Returns:
Transform -- the constructed transform
"""
transform = transforms.CompositeTransform([
transforms.CompositeTransform([
create_linear_transform(input_dim),
create_base_transform(i, input_dim, context_dim=context_dim, **base_transform_kwargs)
]) for i in range(num_flow_steps)] + [create_linear_transform(input_dim)])
return transform
def fun(input_dim):
return fun
def create_nsf_model(input_dim, context_dim, num_flow_steps, base_transform_kwargs, learn_normal=False):
"""Build NSF (neural spline flow) model. This uses the nsf module
available at https://github.com/bayesiains/nsf.
This models the posterior distribution p(x|y).
The model consists of
* a base distribution (StandardNormal, dim(x))
* a sequence of transforms, each conditioned on y
Arguments:
input_dim {int} -- dimensionality of x
context_dim {int} -- dimensionality of y
num_flow_steps {int} -- number of sequential transforms
base_transform_kwargs {dict} -- hyperparameters for transform steps
Returns:
Flow -- the model
"""
# Define a base distribution.
if (learn_normal):
base_distribution = distributions.DiagonalNormal(shape=(input_dim,))
else:
base_distribution = distributions.StandardNormal(shape=(input_dim,))
# if (sigma_base != 1):
# def fun2(x):
# n_batch, n = x.shape
# return torch.cat([torch.zeros((n_batch, input_dim), device=x.device), sigma_base * torch.ones((n_batch, input_dim), device=x.device)], dim=1)
# base_distribution = distributions.ConditionalDiagonalNormal(shape=(input_dim,), context_encoder=fun2)
# Define the neural spline transform
transform = create_transform(input_dim, context_dim, num_flow_steps, base_transform_kwargs)
# Create the flow
flow = flows.Flow(transform=transform, distribution=base_distribution)
# Add the hyperparameters for reconstructing the model after loading
flow.model_hyperparams = {
'input_dim': input_dim,
'num_flow_steps': num_flow_steps,
'context_dim': context_dim,
'base_transform_kwargs': base_transform_kwargs
}
return flow
def obtain_samples(flow, y, nsamples, device=None, batch_size=512):
"""Draw samples from the posterior.
Arguments:
flow {Flow} -- NSF model
y {array} -- strain data
nsamples {int} -- number of samples desired
Keyword Arguments:
device {torch.device} -- model device (CPU or GPU) (default: {None})
batch_size {int} -- batch size for sampling (default: {512})
Returns:
Tensor -- samples
"""
with torch.no_grad():
flow.eval()
y = torch.from_numpy(y).unsqueeze(0).to(device)
num_batches = nsamples // batch_size
num_leftover = nsamples % batch_size
samples = [flow.sample(batch_size, y) for _ in range(num_batches)]
if num_leftover > 0:
samples.append(flow.sample(num_leftover, y))
# The batching in the nsf package seems screwed up, so we had to do it
# ourselves, as above. They are concatenating on the wrong axis.
# samples = flow.sample(nsamples, context=y, batch_size=batch_size)
return torch.cat(samples, dim=1)[0]
if (__name__ == '__main__'):
base_transform_kwargs = {
'hidden_dim': 50,
'num_transform_blocks': 2,
'activation': 'relu',
'dropout_probability': 0.0,
'batch_norm': False,
'num_bins': 10,
'tail_bound': 3.0,
'apply_unconditional_transform': False
}
model = create_nsf_model(20, 1, 3, base_transform_kwargs)
# context = np.array([[2.]])
# context = torch.tensor(context.astype('float32'))
# samples = model.sample(5000, context).detach().cpu().numpy()
# pl.plot(samples[0,:,0], samples[0,:,1], '.')
# pl.show() | 42.791045 | 155 | 0.593129 | import numpy as np
import torch
import torch.nn.functional as F
from nflows import transforms, distributions, flows, utils
import nflows.nn.nets as nn_
import matplotlib.pyplot as pl
from modules import resnet
def create_linear_transform(input_dim):
permutation = transforms.RandomPermutation(features = input_dim)
linear = transforms.LULinear(input_dim, identity_init=True)
return transforms.CompositeTransform([permutation, linear])
def create_base_transform(i,
input_dim,
context_dim,
hidden_dim=512,
num_transform_blocks=2,
activation='relu',
dropout_probability=0.0,
batch_norm=False,
num_bins=8,
tail_bound=1.,
apply_unconditional_transform=False,
base_transform_type='rq-coupling',
transform_net='conv'):
if activation == 'elu':
activation_fn = F.elu
elif activation == 'relu':
activation_fn = F.relu
elif activation == 'leaky_relu':
activation_fn = F.leaky_relu
else:
activation_fn = F.relu
print('Invalid activation function specified. Using ReLU.')
if base_transform_type == 'rq-coupling':
mask = utils.create_alternating_binary_mask(input_dim, even=(i % 2 == 0))
if (transform_net == 'fc'):
transform_net = lambda in_features, out_features: nn_.ResidualNet(
in_features = in_features,
out_features = out_features,
hidden_features = hidden_dim,
context_features = context_dim,
num_blocks = num_transform_blocks,
activation = activation_fn,
dropout_probability = dropout_probability,
use_batch_norm = batch_norm)
if (transform_net == 'conv'):
transform_net = lambda in_features, out_features: resnet.ConvResidualNet1d(
in_channels = 1,
out_channels = out_features // in_features,
hidden_channels = hidden_dim,
context_channels = context_dim,
num_blocks = num_transform_blocks,
activation = activation_fn,
dropout_probability = dropout_probability,
use_batch_norm = batch_norm)
transform = transforms.PiecewiseRationalQuadraticCouplingTransform(
mask = mask,
transform_net_create_fn = transform_net,
num_bins = num_bins,
tails = 'linear',
tail_bound = tail_bound,
apply_unconditional_transform = apply_unconditional_transform
)
elif base_transform_type == 'rq-autoregressive':
transform = transforms.MaskedPiecewiseRationalQuadraticAutoregressiveTransform(
features=input_dim,
hidden_features=hidden_dim,
context_features=context_dim,
num_bins=num_bins,
tails='linear',
tail_bound=tail_bound,
num_blocks=num_transform_blocks,
use_residual_blocks=True,
random_mask=False,
activation=activation_fn,
dropout_probability=dropout_probability,
use_batch_norm=batch_norm
)
else:
raise ValueError
return transform
def create_transform(input_dim, context_dim, num_flow_steps, base_transform_kwargs):
transform = transforms.CompositeTransform([
transforms.CompositeTransform([
create_linear_transform(input_dim),
create_base_transform(i, input_dim, context_dim=context_dim, **base_transform_kwargs)
]) for i in range(num_flow_steps)] + [create_linear_transform(input_dim)])
return transform
def fun(input_dim):
return fun
def create_nsf_model(input_dim, context_dim, num_flow_steps, base_transform_kwargs, learn_normal=False):
if (learn_normal):
base_distribution = distributions.DiagonalNormal(shape=(input_dim,))
else:
base_distribution = distributions.StandardNormal(shape=(input_dim,))
transform = create_transform(input_dim, context_dim, num_flow_steps, base_transform_kwargs)
flow = flows.Flow(transform=transform, distribution=base_distribution)
flow.model_hyperparams = {
'input_dim': input_dim,
'num_flow_steps': num_flow_steps,
'context_dim': context_dim,
'base_transform_kwargs': base_transform_kwargs
}
return flow
def obtain_samples(flow, y, nsamples, device=None, batch_size=512):
with torch.no_grad():
flow.eval()
y = torch.from_numpy(y).unsqueeze(0).to(device)
num_batches = nsamples // batch_size
num_leftover = nsamples % batch_size
samples = [flow.sample(batch_size, y) for _ in range(num_batches)]
if num_leftover > 0:
samples.append(flow.sample(num_leftover, y))
return torch.cat(samples, dim=1)[0]
if (__name__ == '__main__'):
base_transform_kwargs = {
'hidden_dim': 50,
'num_transform_blocks': 2,
'activation': 'relu',
'dropout_probability': 0.0,
'batch_norm': False,
'num_bins': 10,
'tail_bound': 3.0,
'apply_unconditional_transform': False
}
model = create_nsf_model(20, 1, 3, base_transform_kwargs)
| true | true |
f7270cc5a74622d850496e16ffaf8362ce017691 | 3,489 | py | Python | WebServer/microservices/dispatcher/auth_token.py | AnneEjsing/TrafficDataAnonymisation | 6ee5b4a46d53a656299d6a53896175b78008228a | [
"MIT"
] | 1 | 2020-03-12T13:27:58.000Z | 2020-03-12T13:27:58.000Z | WebServer/microservices/dispatcher/auth_token.py | AnneEjsing/TrafficDataAnonymisation | 6ee5b4a46d53a656299d6a53896175b78008228a | [
"MIT"
] | 7 | 2020-04-02T12:47:45.000Z | 2022-03-02T07:35:49.000Z | WebServer/microservices/dispatcher/auth_token.py | AnneEjsing/Traffic-Data-Anonymisation-Web | 6ee5b4a46d53a656299d6a53896175b78008228a | [
"MIT"
] | null | null | null | import base64
import requests
import json
import hashlib
import hmac
from enum import IntEnum
from datetime import datetime, timedelta
import os
secretKey = os.getenv("SECRET_KEY")
def valid_token(token):
return ('.' in token) and len(token.split('.')) == 3
def verify_credentials(email, pwd):
data = {"email": email, "password": pwd}
resp = requests.request(method='get', url='http://profileservice:1338/login', headers={'content-type': 'text/json'}, json=data)
if (resp.status_code == 200):
json_data = resp.json()
return (True, json_data['user_id'], json_data['role'])
else:
return (False, "", "")
def is_not_expired(token):
if not valid_token(token):
return False
header, payload, signature = token.split('.')
id, subject, role, expiration = get_payload_info(payload)
is_valid = verify_date(expiration)
if not is_valid:
return False
else:
return True
def authenticate(token):
if not valid_token(token):
return False
header, payload, signature = token.split('.')
new_signature = encode(create_signature(header, payload))
if (new_signature == signature):
return is_not_expired(token)
else:
return False
def verify_token(token, desired_rights):
is_success = authenticate(token)
if (is_success):
is_auth = is_authorized(token, desired_rights)
if (is_auth):
return True, 200
else:
return False, 403
else:
return False, 401
def is_authorized(token, desired_rights):
if not valid_token(token):
return False
header, payload, signature = token.split('.')
id, subject, role, expiration = get_payload_info(payload)
return role == desired_rights
def get_user_id(token):
if not valid_token(token):
return None
header, payload, signature = token.split('.')
id, subject, role, expiration = get_payload_info(payload)
return subject
def get_rights(token):
if not valid_token(token):
return None
header, payload, signature = token.split('.')
id, subject, role, expiration = get_payload_info(payload)
return role
def verify_date(date):
return (datetime.utcnow() < datetime.strptime(date, '%Y-%m-%dT%H:%M:%S.%f'))
def get_payload_info(payload):
text = base64.urlsafe_b64decode(payload + '=' * (4 - len(payload) % 4))
json_obj = json.loads(text)
return json_obj['jid'], json_obj['sub'], json_obj['rights'], json_obj['exp']
def create_token(user_id, rights):
header = encode(json.dumps({"alg": "HS512", "type": "JWT"}))
payload = encode(create_payload(user_id, rights))
signature = encode(create_signature(header, payload))
return '.'.join([header, payload, signature])
def encode(encoding_input):
"""This function converts a string to base64, and removes trailing ="""
if (isinstance(encoding_input, str)):
byte = str.encode(encoding_input)
else:
byte = encoding_input
b64 = base64.urlsafe_b64encode(byte)
res = b64.decode('utf-8')
return res.replace('=', '')
def create_payload(user_id, rights):
return json.dumps({'sub': user_id, 'rights': rights, 'exp': generate_token_exp_time()})
def create_signature(header, payload):
return hmac.new(str.encode(secretKey), str.encode(header + '.' + payload), hashlib.sha512).digest()
def generate_token_exp_time():
return (datetime.utcnow() + timedelta(hours=3)).isoformat()
| 28.137097 | 131 | 0.665807 | import base64
import requests
import json
import hashlib
import hmac
from enum import IntEnum
from datetime import datetime, timedelta
import os
secretKey = os.getenv("SECRET_KEY")
def valid_token(token):
return ('.' in token) and len(token.split('.')) == 3
def verify_credentials(email, pwd):
data = {"email": email, "password": pwd}
resp = requests.request(method='get', url='http://profileservice:1338/login', headers={'content-type': 'text/json'}, json=data)
if (resp.status_code == 200):
json_data = resp.json()
return (True, json_data['user_id'], json_data['role'])
else:
return (False, "", "")
def is_not_expired(token):
if not valid_token(token):
return False
header, payload, signature = token.split('.')
id, subject, role, expiration = get_payload_info(payload)
is_valid = verify_date(expiration)
if not is_valid:
return False
else:
return True
def authenticate(token):
if not valid_token(token):
return False
header, payload, signature = token.split('.')
new_signature = encode(create_signature(header, payload))
if (new_signature == signature):
return is_not_expired(token)
else:
return False
def verify_token(token, desired_rights):
is_success = authenticate(token)
if (is_success):
is_auth = is_authorized(token, desired_rights)
if (is_auth):
return True, 200
else:
return False, 403
else:
return False, 401
def is_authorized(token, desired_rights):
if not valid_token(token):
return False
header, payload, signature = token.split('.')
id, subject, role, expiration = get_payload_info(payload)
return role == desired_rights
def get_user_id(token):
if not valid_token(token):
return None
header, payload, signature = token.split('.')
id, subject, role, expiration = get_payload_info(payload)
return subject
def get_rights(token):
if not valid_token(token):
return None
header, payload, signature = token.split('.')
id, subject, role, expiration = get_payload_info(payload)
return role
def verify_date(date):
return (datetime.utcnow() < datetime.strptime(date, '%Y-%m-%dT%H:%M:%S.%f'))
def get_payload_info(payload):
text = base64.urlsafe_b64decode(payload + '=' * (4 - len(payload) % 4))
json_obj = json.loads(text)
return json_obj['jid'], json_obj['sub'], json_obj['rights'], json_obj['exp']
def create_token(user_id, rights):
header = encode(json.dumps({"alg": "HS512", "type": "JWT"}))
payload = encode(create_payload(user_id, rights))
signature = encode(create_signature(header, payload))
return '.'.join([header, payload, signature])
def encode(encoding_input):
if (isinstance(encoding_input, str)):
byte = str.encode(encoding_input)
else:
byte = encoding_input
b64 = base64.urlsafe_b64encode(byte)
res = b64.decode('utf-8')
return res.replace('=', '')
def create_payload(user_id, rights):
return json.dumps({'sub': user_id, 'rights': rights, 'exp': generate_token_exp_time()})
def create_signature(header, payload):
return hmac.new(str.encode(secretKey), str.encode(header + '.' + payload), hashlib.sha512).digest()
def generate_token_exp_time():
return (datetime.utcnow() + timedelta(hours=3)).isoformat()
| true | true |
f7270eb6f31c026c910661b3d770b077b26405bb | 990 | py | Python | scenedetect/main.py | zhaipro/MySceneDetect | fbbe085b05e916d52253ffddd91848c3e85b2fe9 | [
"MIT"
] | null | null | null | scenedetect/main.py | zhaipro/MySceneDetect | fbbe085b05e916d52253ffddd91848c3e85b2fe9 | [
"MIT"
] | null | null | null | scenedetect/main.py | zhaipro/MySceneDetect | fbbe085b05e916d52253ffddd91848c3e85b2fe9 | [
"MIT"
] | 2 | 2019-11-27T04:44:11.000Z | 2020-01-15T05:32:59.000Z | import sys
import time
import cv2
import numpy as np
def scenedetect(cap, threshold=30, min_scene_len=15):
w = cap.get(cv2.CAP_PROP_FRAME_WIDTH)
downscale_factor = int(w / 200)
last_hsv = None
first = 0
curr = 0
while True:
ret, im = cap.read()
if not ret:
break
curr_hsv = im[::downscale_factor, ::downscale_factor]
curr_hsv = cv2.cvtColor(curr_hsv, cv2.COLOR_BGR2HSV)
curr_hsv = curr_hsv.astype('int32')
if last_hsv is not None:
delta_hsv = np.mean(np.abs(curr_hsv - last_hsv))
if delta_hsv >= threshold and curr - first >= min_scene_len:
yield first, curr, delta_hsv
first = curr
last_hsv = curr_hsv
curr += 1
yield first, curr, 0
fn = 'video.rmvb'
cap = cv2.VideoCapture(fn)
start = time.time()
for first, last, delta_hsv in scenedetect(cap):
print(first, last, delta_hsv)
print(time.time() - start)
cap.release()
| 24.146341 | 72 | 0.614141 | import sys
import time
import cv2
import numpy as np
def scenedetect(cap, threshold=30, min_scene_len=15):
w = cap.get(cv2.CAP_PROP_FRAME_WIDTH)
downscale_factor = int(w / 200)
last_hsv = None
first = 0
curr = 0
while True:
ret, im = cap.read()
if not ret:
break
curr_hsv = im[::downscale_factor, ::downscale_factor]
curr_hsv = cv2.cvtColor(curr_hsv, cv2.COLOR_BGR2HSV)
curr_hsv = curr_hsv.astype('int32')
if last_hsv is not None:
delta_hsv = np.mean(np.abs(curr_hsv - last_hsv))
if delta_hsv >= threshold and curr - first >= min_scene_len:
yield first, curr, delta_hsv
first = curr
last_hsv = curr_hsv
curr += 1
yield first, curr, 0
fn = 'video.rmvb'
cap = cv2.VideoCapture(fn)
start = time.time()
for first, last, delta_hsv in scenedetect(cap):
print(first, last, delta_hsv)
print(time.time() - start)
cap.release()
| true | true |
f727103bf36fa5841b9d61da58cc4ea81dc4118e | 4,404 | py | Python | desertbot/modules/admin/Ignore.py | Helle-Daryd/DesertBot | 0b497db135a4c08dfbdb59108f830ba12fdc6465 | [
"MIT",
"BSD-3-Clause"
] | 7 | 2018-03-20T17:10:10.000Z | 2021-11-17T18:58:04.000Z | desertbot/modules/admin/Ignore.py | Helle-Daryd/DesertBot | 0b497db135a4c08dfbdb59108f830ba12fdc6465 | [
"MIT",
"BSD-3-Clause"
] | 109 | 2015-08-20T13:16:35.000Z | 2022-01-21T19:40:35.000Z | desertbot/modules/admin/Ignore.py | Helle-Daryd/DesertBot | 0b497db135a4c08dfbdb59108f830ba12fdc6465 | [
"MIT",
"BSD-3-Clause"
] | 7 | 2018-03-29T05:55:01.000Z | 2021-02-05T19:19:39.000Z | """
Created on Feb 09, 2018
@author: StarlitGhost
"""
import re
from collections import OrderedDict
from twisted.plugin import IPlugin
from zope.interface import implementer
from desertbot.moduleinterface import IModule
from desertbot.modules.commandinterface import BotCommand, admin
from desertbot.response import IRCResponse
@implementer(IPlugin, IModule)
class Ignore(BotCommand):
def triggers(self):
return ['ignore']
@admin("Only my admins may add new ignores!")
def _add(self, message):
"""add <nick/full hostmask> - adds the specified user to the ignored list.
You can list multiple users to add them all at once.
Nick alone will be converted to a glob hostmask, eg: *!user@host"""
if len(message.parameterList) < 2:
return IRCResponse("You didn't give me a user to ignore!", message.replyTo)
for ignore in message.parameterList[1:]:
if message.replyTo in self.bot.channels:
if ignore in self.bot.channels[message.replyTo].users:
user = self.bot.channels[message.replyTo].users[ignore]
ignore = '*!{}@{}'.format(user.nick, user.host)
ignores = self.bot.config.getWithDefault('ignored', [])
ignores.append(ignore)
self.bot.config['ignored'] = ignores
self.bot.config.writeConfig()
return IRCResponse("Now ignoring specified users!", message.replyTo)
@admin("Only my admins may remove ignores!")
def _del(self, message):
"""del <full hostmask> - removes the specified user from the ignored list.
You can list multiple users to remove them all at once."""
if len(message.parameterList) < 2:
return IRCResponse("You didn't give me a user to unignore!", message.replyTo)
deleted = []
skipped = []
ignores = self.bot.config.getWithDefault('ignored', [])
for unignore in message.parameterList[1:]:
if message.replyTo in self.bot.channels:
if unignore in self.bot.channels[message.replyTo].users:
user = self.bot.channels[message.replyTo].users[unignore]
unignore = '*!{}@{}'.format(user.nick, user.host)
if unignore not in ignores:
skipped.append(unignore)
continue
ignores.remove(unignore)
deleted.append(unignore)
self.bot.config['ignored'] = ignores
self.bot.config.writeConfig()
return IRCResponse("Removed '{}' from ignored list, {} skipped"
.format(', '.join(deleted), len(skipped)), message.replyTo)
def _list(self, message):
"""list - lists all ignored users"""
ignores = self.bot.config.getWithDefault('ignored', [])
return IRCResponse("Ignored Users: {}".format(', '.join(ignores)), message.replyTo)
subCommands = OrderedDict([
('add', _add),
('del', _del),
('list', _list)])
def help(self, query) -> str:
if len(query) > 1:
subCommand = query[1].lower()
if subCommand in self.subCommands:
return ('{1}ignore {0}'
.format(re.sub(r"\s+", " ", self.subCommands[subCommand].__doc__),
self.bot.commandChar))
else:
return self._unrecognizedSubcommand(subCommand)
else:
return self._helpText()
def _unrecognizedSubcommand(self, subCommand):
return ("unrecognized subcommand '{}', "
"available subcommands for ignore are: {}"
.format(subCommand, ', '.join(self.subCommands)))
def _helpText(self):
return ("{1}ignore ({0})"
" - manages ignored users."
" Use '{1}help ignore <subcommand> for subcommand help."
.format('/'.join(self.subCommands), self.bot.commandChar))
def execute(self, message):
if len(message.parameterList) > 0:
subCommand = message.parameterList[0].lower()
if subCommand not in self.subCommands:
return IRCResponse(self._unrecognizedSubcommand(subCommand), message.replyTo)
return self.subCommands[subCommand](self, message)
else:
return IRCResponse(self._helpText(), message.replyTo)
ignore = Ignore()
| 37.965517 | 93 | 0.603542 | import re
from collections import OrderedDict
from twisted.plugin import IPlugin
from zope.interface import implementer
from desertbot.moduleinterface import IModule
from desertbot.modules.commandinterface import BotCommand, admin
from desertbot.response import IRCResponse
@implementer(IPlugin, IModule)
class Ignore(BotCommand):
def triggers(self):
return ['ignore']
@admin("Only my admins may add new ignores!")
def _add(self, message):
if len(message.parameterList) < 2:
return IRCResponse("You didn't give me a user to ignore!", message.replyTo)
for ignore in message.parameterList[1:]:
if message.replyTo in self.bot.channels:
if ignore in self.bot.channels[message.replyTo].users:
user = self.bot.channels[message.replyTo].users[ignore]
ignore = '*!{}@{}'.format(user.nick, user.host)
ignores = self.bot.config.getWithDefault('ignored', [])
ignores.append(ignore)
self.bot.config['ignored'] = ignores
self.bot.config.writeConfig()
return IRCResponse("Now ignoring specified users!", message.replyTo)
@admin("Only my admins may remove ignores!")
def _del(self, message):
if len(message.parameterList) < 2:
return IRCResponse("You didn't give me a user to unignore!", message.replyTo)
deleted = []
skipped = []
ignores = self.bot.config.getWithDefault('ignored', [])
for unignore in message.parameterList[1:]:
if message.replyTo in self.bot.channels:
if unignore in self.bot.channels[message.replyTo].users:
user = self.bot.channels[message.replyTo].users[unignore]
unignore = '*!{}@{}'.format(user.nick, user.host)
if unignore not in ignores:
skipped.append(unignore)
continue
ignores.remove(unignore)
deleted.append(unignore)
self.bot.config['ignored'] = ignores
self.bot.config.writeConfig()
return IRCResponse("Removed '{}' from ignored list, {} skipped"
.format(', '.join(deleted), len(skipped)), message.replyTo)
def _list(self, message):
ignores = self.bot.config.getWithDefault('ignored', [])
return IRCResponse("Ignored Users: {}".format(', '.join(ignores)), message.replyTo)
subCommands = OrderedDict([
('add', _add),
('del', _del),
('list', _list)])
def help(self, query) -> str:
if len(query) > 1:
subCommand = query[1].lower()
if subCommand in self.subCommands:
return ('{1}ignore {0}'
.format(re.sub(r"\s+", " ", self.subCommands[subCommand].__doc__),
self.bot.commandChar))
else:
return self._unrecognizedSubcommand(subCommand)
else:
return self._helpText()
def _unrecognizedSubcommand(self, subCommand):
return ("unrecognized subcommand '{}', "
"available subcommands for ignore are: {}"
.format(subCommand, ', '.join(self.subCommands)))
def _helpText(self):
return ("{1}ignore ({0})"
" - manages ignored users."
" Use '{1}help ignore <subcommand> for subcommand help."
.format('/'.join(self.subCommands), self.bot.commandChar))
def execute(self, message):
if len(message.parameterList) > 0:
subCommand = message.parameterList[0].lower()
if subCommand not in self.subCommands:
return IRCResponse(self._unrecognizedSubcommand(subCommand), message.replyTo)
return self.subCommands[subCommand](self, message)
else:
return IRCResponse(self._helpText(), message.replyTo)
ignore = Ignore()
| true | true |
f727105123cecc3f0975d6ac12017569a168ee54 | 3,444 | py | Python | tests/ut/python/parallel/test_dropout_do_mask.py | GuoSuiming/mindspore | 48afc4cfa53d970c0b20eedfb46e039db2a133d5 | [
"Apache-2.0"
] | 55 | 2020-12-17T10:26:06.000Z | 2022-03-28T07:18:26.000Z | tests/ut/python/parallel/test_dropout_do_mask.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | null | null | null | tests/ut/python/parallel/test_dropout_do_mask.py | forwhat461/mindspore | 59a277756eb4faad9ac9afcc7fd526e8277d4994 | [
"Apache-2.0"
] | 14 | 2021-01-29T02:39:47.000Z | 2022-03-23T05:00:26.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable 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 numpy as np
import mindspore as ms
from mindspore import context, Tensor, Parameter
from mindspore.common.api import _executor
from mindspore.nn import Cell, TrainOneStepCell, Momentum
from mindspore.ops import operations as P
class Net(Cell):
def __init__(self, mul_weight, strategy1=None, strategy2=None):
super().__init__()
self.mul = P.Mul().shard(strategy1)
self.mul2 = P.Mul().shard(strategy1)
self.dropout_do_mask = P.DropoutDoMask().shard(strategy2)
self.dropout_gen_mask = P.DropoutGenMask()
self.get_shape = P.Shape()
self.cast = P.Cast()
self.mul_weight = Parameter(mul_weight, "w1")
self.mul_weight2 = Parameter(mul_weight, "w2")
self.keep_prob = Tensor(0.9)
def construct(self, x, b):
out = self.mul(x, self.mul_weight)
shape = self.get_shape(out)
dtype = P.DType()(out)
keep_prob = self.cast(self.keep_prob, dtype)
mask = self.dropout_gen_mask(shape, keep_prob)
out = self.dropout_do_mask(out, mask, keep_prob)
out = self.mul2(out, self.mul_weight2)
return out
_x = Tensor(np.ones([128, 64]), dtype=ms.float32)
_w1 = Tensor(np.ones([128, 64]), dtype=ms.float32)
_b = Tensor(np.ones([128, 64]), dtype=ms.float32)
def compile_net(net):
optimizer = Momentum(net.trainable_params(), learning_rate=0.1, momentum=0.9)
train_net = TrainOneStepCell(net, optimizer)
train_net.set_auto_parallel()
train_net.set_train()
_executor.compile(train_net, _x, _b)
context.reset_auto_parallel_context()
def test_dropout_do_mask_data_parallel():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=16, global_rank=0)
strategy1 = ((16, 1), (16, 1))
strategy2 = ((16, 1),)
net = Net(_w1, strategy1, strategy2)
compile_net(net)
def test_dropout_do_mask_model_parallel():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=16, global_rank=0)
strategy1 = ((1, 16), (1, 16))
strategy2 = ((1, 16),)
net = Net(_w1, strategy1, strategy2)
compile_net(net)
def test_dropout_do_mask_hybrid_parallel():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=16, global_rank=0)
strategy1 = ((4, 4), (4, 4))
strategy2 = ((4, 4),)
net = Net(_w1, strategy1, strategy2)
compile_net(net)
def test_dropout_do_mask_auto_parallel():
context.set_auto_parallel_context(parallel_mode="auto_parallel", device_num=16, global_rank=0)
net = Net(_w1)
compile_net(net)
def test_dropout_do_mask_repeat_calc():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=16, global_rank=0)
strategy1 = ((4, 4), (4, 4))
strategy2 = ((2, 4),)
net = Net(_w1, strategy1, strategy2)
compile_net(net)
| 35.142857 | 103 | 0.707027 |
import numpy as np
import mindspore as ms
from mindspore import context, Tensor, Parameter
from mindspore.common.api import _executor
from mindspore.nn import Cell, TrainOneStepCell, Momentum
from mindspore.ops import operations as P
class Net(Cell):
def __init__(self, mul_weight, strategy1=None, strategy2=None):
super().__init__()
self.mul = P.Mul().shard(strategy1)
self.mul2 = P.Mul().shard(strategy1)
self.dropout_do_mask = P.DropoutDoMask().shard(strategy2)
self.dropout_gen_mask = P.DropoutGenMask()
self.get_shape = P.Shape()
self.cast = P.Cast()
self.mul_weight = Parameter(mul_weight, "w1")
self.mul_weight2 = Parameter(mul_weight, "w2")
self.keep_prob = Tensor(0.9)
def construct(self, x, b):
out = self.mul(x, self.mul_weight)
shape = self.get_shape(out)
dtype = P.DType()(out)
keep_prob = self.cast(self.keep_prob, dtype)
mask = self.dropout_gen_mask(shape, keep_prob)
out = self.dropout_do_mask(out, mask, keep_prob)
out = self.mul2(out, self.mul_weight2)
return out
_x = Tensor(np.ones([128, 64]), dtype=ms.float32)
_w1 = Tensor(np.ones([128, 64]), dtype=ms.float32)
_b = Tensor(np.ones([128, 64]), dtype=ms.float32)
def compile_net(net):
optimizer = Momentum(net.trainable_params(), learning_rate=0.1, momentum=0.9)
train_net = TrainOneStepCell(net, optimizer)
train_net.set_auto_parallel()
train_net.set_train()
_executor.compile(train_net, _x, _b)
context.reset_auto_parallel_context()
def test_dropout_do_mask_data_parallel():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=16, global_rank=0)
strategy1 = ((16, 1), (16, 1))
strategy2 = ((16, 1),)
net = Net(_w1, strategy1, strategy2)
compile_net(net)
def test_dropout_do_mask_model_parallel():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=16, global_rank=0)
strategy1 = ((1, 16), (1, 16))
strategy2 = ((1, 16),)
net = Net(_w1, strategy1, strategy2)
compile_net(net)
def test_dropout_do_mask_hybrid_parallel():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=16, global_rank=0)
strategy1 = ((4, 4), (4, 4))
strategy2 = ((4, 4),)
net = Net(_w1, strategy1, strategy2)
compile_net(net)
def test_dropout_do_mask_auto_parallel():
context.set_auto_parallel_context(parallel_mode="auto_parallel", device_num=16, global_rank=0)
net = Net(_w1)
compile_net(net)
def test_dropout_do_mask_repeat_calc():
context.set_auto_parallel_context(parallel_mode="semi_auto_parallel", device_num=16, global_rank=0)
strategy1 = ((4, 4), (4, 4))
strategy2 = ((2, 4),)
net = Net(_w1, strategy1, strategy2)
compile_net(net)
| true | true |
f72710d9f65e5ca4beff6e82aed8a822c535c132 | 5,172 | py | Python | tests/unit/test_charm.py | gabrielcocenza/prometheus-bind-exporter-operator | 8998f049f68e72a71b7d97949d9a0e1dc57d8113 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_charm.py | gabrielcocenza/prometheus-bind-exporter-operator | 8998f049f68e72a71b7d97949d9a0e1dc57d8113 | [
"Apache-2.0"
] | null | null | null | tests/unit/test_charm.py | gabrielcocenza/prometheus-bind-exporter-operator | 8998f049f68e72a71b7d97949d9a0e1dc57d8113 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Unicorn
# See LICENSE file for licensing details.
#
# Learn more about testing at: https://juju.is/docs/sdk/testing
import unittest
from unittest import mock
import charm
from ops.model import Unit
from ops.testing import Harness
class TestCharm(unittest.TestCase):
def assert_active_unit(self, unit: Unit):
self.assertEqual(unit.status.name, "active")
self.assertEqual(unit.status.message, "Unit is ready")
class TestInitCharm(TestCharm):
def test_init(self):
"""Test initialization of charm."""
harness = Harness(charm.PrometheusBindExporterOperatorCharm)
harness.begin()
self.assert_active_unit(harness.charm.unit)
class TestCharmHooks(TestCharm):
def patch(self, obj, method):
"""Mock the method."""
_patch = mock.patch.object(obj, method)
mock_method = _patch.start()
self.addCleanup(_patch.stop)
return mock_method
def setUp(self):
self.harness = Harness(charm.PrometheusBindExporterOperatorCharm)
self.addCleanup(self.harness.cleanup)
self.harness.begin()
# mock subprocess
self.mock_subprocess = self.patch(charm, "subprocess")
# mock getting private address
mock_get_binding = self.patch(self.harness.model, "get_binding")
mock_get_binding.return_value = self.mock_binding = mock.MagicMock()
self.mock_binding.network.bind_address = "127.0.0.1"
# mock fetch resource
self.mock_fetch = self.patch(self.harness.model.resources, "fetch")
self.mock_fetch.return_value = "prometheus-bind-exporter.snap"
def _add_bind_exporter_relation(self):
"""Help function to add bind-exporter relation."""
relation_id = self.harness.add_relation("bind-exporter", "prometheus2")
self.harness.add_relation_unit(relation_id, "prometheus2/0")
return relation_id
def test_manage_prometheus_bind_exporter_service(self):
"""Test manage the prometheus-bind-exporter snap."""
self.harness.charm._manage_prometheus_bind_exporter_service()
self.mock_subprocess.check_call.assert_called_once_with(
["snap", "set", "prometheus-bind-exporter",
"web.listen-address=127.0.0.1:9119",
"web.stats-groups=server,view,tasks"])
def test_private_address(self):
"""Test help function to get private address."""
address = self.harness.charm.private_address
self.assertEqual("127.0.0.1", address)
def test_on_install(self):
"""Test install hook."""
exp_call = mock.call(["snap", "install", "--dangerous",
"prometheus-bind-exporter.snap"])
self.harness.charm.on.install.emit()
self.mock_fetch.assert_called_once_with("prometheus-bind-exporter")
self.assertIn(exp_call, self.mock_subprocess.check_call.mock_calls)
self.assert_active_unit(self.harness.charm.unit)
def test_on_config_changed(self):
"""Test config-changed hook."""
# this will trigger self.harness.charm.on.config_changed.emit()
self.harness.update_config({"exporter-listen-port": "9120",
"exporter-stats-groups": "server"})
self.assertEqual(self.harness.charm._stored.listen_port, "9120")
self.assertEqual(self.harness.charm._stored.stats_groups, "server")
self.mock_subprocess.check_call.assert_called_once_with(
["snap", "set", "prometheus-bind-exporter",
"web.listen-address=127.0.0.1:9120",
"web.stats-groups=server"])
self.assert_active_unit(self.harness.charm.unit)
def test_on_config_changed_with_bind_exporter_relation(self):
"""Test config-changed hook with existing bind-exporter relation."""
relation_id = self._add_bind_exporter_relation()
self.harness.update_config({"exporter-listen-port": "9120"})
relation_data = self.harness.get_relation_data(relation_id, self.harness.charm.unit.name)
self.assertDictEqual(relation_data, {"hostname": "127.0.0.1", "port": "9120"})
self.assert_active_unit(self.harness.charm.unit)
def test_on_bind_exporter_relation_changed(self):
"""Test Prometheus relation changed hook."""
relation_id = self._add_bind_exporter_relation()
# update relation -> trigger bind_exporter_relation_changed hook
self.harness.update_relation_data(relation_id, "prometheus2/0", {})
relation_data = self.harness.get_relation_data(relation_id, self.harness.charm.unit.name)
self.assertDictEqual(relation_data, {"hostname": "127.0.0.1", "port": "9119"})
self.assert_active_unit(self.harness.charm.unit)
def test_on_prometheus_relation_departed(self):
"""Test Prometheus relation changed hook."""
relation_id = self._add_bind_exporter_relation()
# remove relation -> trigger bind_exporter_departed hook
self.harness.remove_relation(relation_id)
self.assertEqual(0, len(self.harness.model.relations.get("bind-exporter")))
self.assert_active_unit(self.harness.charm.unit)
| 42.04878 | 97 | 0.687355 |
import unittest
from unittest import mock
import charm
from ops.model import Unit
from ops.testing import Harness
class TestCharm(unittest.TestCase):
def assert_active_unit(self, unit: Unit):
self.assertEqual(unit.status.name, "active")
self.assertEqual(unit.status.message, "Unit is ready")
class TestInitCharm(TestCharm):
def test_init(self):
harness = Harness(charm.PrometheusBindExporterOperatorCharm)
harness.begin()
self.assert_active_unit(harness.charm.unit)
class TestCharmHooks(TestCharm):
def patch(self, obj, method):
_patch = mock.patch.object(obj, method)
mock_method = _patch.start()
self.addCleanup(_patch.stop)
return mock_method
def setUp(self):
self.harness = Harness(charm.PrometheusBindExporterOperatorCharm)
self.addCleanup(self.harness.cleanup)
self.harness.begin()
self.mock_subprocess = self.patch(charm, "subprocess")
mock_get_binding = self.patch(self.harness.model, "get_binding")
mock_get_binding.return_value = self.mock_binding = mock.MagicMock()
self.mock_binding.network.bind_address = "127.0.0.1"
self.mock_fetch = self.patch(self.harness.model.resources, "fetch")
self.mock_fetch.return_value = "prometheus-bind-exporter.snap"
def _add_bind_exporter_relation(self):
relation_id = self.harness.add_relation("bind-exporter", "prometheus2")
self.harness.add_relation_unit(relation_id, "prometheus2/0")
return relation_id
def test_manage_prometheus_bind_exporter_service(self):
self.harness.charm._manage_prometheus_bind_exporter_service()
self.mock_subprocess.check_call.assert_called_once_with(
["snap", "set", "prometheus-bind-exporter",
"web.listen-address=127.0.0.1:9119",
"web.stats-groups=server,view,tasks"])
def test_private_address(self):
address = self.harness.charm.private_address
self.assertEqual("127.0.0.1", address)
def test_on_install(self):
exp_call = mock.call(["snap", "install", "--dangerous",
"prometheus-bind-exporter.snap"])
self.harness.charm.on.install.emit()
self.mock_fetch.assert_called_once_with("prometheus-bind-exporter")
self.assertIn(exp_call, self.mock_subprocess.check_call.mock_calls)
self.assert_active_unit(self.harness.charm.unit)
def test_on_config_changed(self):
self.harness.update_config({"exporter-listen-port": "9120",
"exporter-stats-groups": "server"})
self.assertEqual(self.harness.charm._stored.listen_port, "9120")
self.assertEqual(self.harness.charm._stored.stats_groups, "server")
self.mock_subprocess.check_call.assert_called_once_with(
["snap", "set", "prometheus-bind-exporter",
"web.listen-address=127.0.0.1:9120",
"web.stats-groups=server"])
self.assert_active_unit(self.harness.charm.unit)
def test_on_config_changed_with_bind_exporter_relation(self):
relation_id = self._add_bind_exporter_relation()
self.harness.update_config({"exporter-listen-port": "9120"})
relation_data = self.harness.get_relation_data(relation_id, self.harness.charm.unit.name)
self.assertDictEqual(relation_data, {"hostname": "127.0.0.1", "port": "9120"})
self.assert_active_unit(self.harness.charm.unit)
def test_on_bind_exporter_relation_changed(self):
relation_id = self._add_bind_exporter_relation()
self.harness.update_relation_data(relation_id, "prometheus2/0", {})
relation_data = self.harness.get_relation_data(relation_id, self.harness.charm.unit.name)
self.assertDictEqual(relation_data, {"hostname": "127.0.0.1", "port": "9119"})
self.assert_active_unit(self.harness.charm.unit)
def test_on_prometheus_relation_departed(self):
relation_id = self._add_bind_exporter_relation()
self.harness.remove_relation(relation_id)
self.assertEqual(0, len(self.harness.model.relations.get("bind-exporter")))
self.assert_active_unit(self.harness.charm.unit)
| true | true |
f727121629beee502e1de4f5eae42d70c7b1b0db | 12,344 | py | Python | tensorflow/python/keras/layers/preprocessing/categorical.py | lightyang/tensorflow | 1a455a77d80fa788fd7963530dd130ad7d902226 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/layers/preprocessing/categorical.py | lightyang/tensorflow | 1a455a77d80fa788fd7963530dd130ad7d902226 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:13:06.000Z | 2022-02-10T02:19:43.000Z | tensorflow/python/keras/layers/preprocessing/categorical.py | Hyperclaw79/tensorflow | 14c58e1d380b2001ffdf7ef782d44ad1a21f763c | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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.
# ==============================================================================
"""Keras categorical preprocessing layers."""
# pylint: disable=g-classes-have-attributes
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework import sparse_tensor
from tensorflow.python.framework import tensor_shape
from tensorflow.python.framework import tensor_spec
from tensorflow.python.keras.engine.base_layer import Layer
from tensorflow.python.ops import lookup_ops
from tensorflow.python.ops import sparse_ops
from tensorflow.python.ops import string_ops
class CategoryLookup(Layer):
"""Category lookup layer.
This layer looks up tokens (int or string) in a vocabulary table,
and return their indices (int). It converts a sequence of int or string to a
sequence of int.
Attributes:
max_tokens: The maximum size of the vocabulary for this layer. If None,
there is no cap on the size of the vocabulary. This is used when `adapt`
is called.
num_oov_tokens: Non-negative integer. The number of out-of-vocab tokens. All
out-of-vocab inputs will be assigned IDs in the range of [0,
num_oov_tokens) based on a hash.
vocabulary: The vocabulary to lookup the input. If it is a file, it
represents the source vocab file; If it is a list/tuple, it represents the
source vocab list. If it is None, the vocabulary can later be set.
name: Name to give to the layer.
**kwargs: Keyword arguments to construct a layer.
Input shape: A string or int tensor of shape `[batch_size, d1, ..., dm]`
Output shape: An int tensor of shape `[batch_size, d1, .., dm]`
Example: Consider a batch of a single input sample, `[["a", "c", "d", "a",
"x"]]`. Let's say the vocabulary is `["a", "b", "c", "d"]` and a single OOV
token is used (`num_oov_tokens=1`). Then the corresponding output is `[[1,
3, 4, 1, 0]]`. 0 stands for an OOV token.
"""
def __init__(self,
max_tokens=None,
num_oov_tokens=1,
vocabulary=None,
name=None,
**kwargs):
if max_tokens is not None:
raise ValueError('`max_tokens` and `adapt` is not supported yet.')
if vocabulary is None:
raise ValueError('for now, you must pass a `vocabulary` argument')
self.max_tokens = max_tokens
self.num_oov_tokens = num_oov_tokens
self.vocabulary = vocabulary
super(CategoryLookup, self).__init__(name=name, **kwargs)
def __call__(self, inputs, *args, **kwargs):
if isinstance(inputs, (np.ndarray, float, int)):
inputs = ops.convert_to_tensor(inputs)
self._input_dtype = inputs.dtype
return super(CategoryLookup, self).__call__(inputs, *args, **kwargs)
def build(self, input_shape):
# categorical with vocabulary list.
if isinstance(self.vocabulary, (tuple, list, np.ndarray)):
self.table = lookup_ops.index_table_from_tensor(
vocabulary_list=self.vocabulary,
num_oov_buckets=self.num_oov_tokens,
dtype=self._input_dtype)
# categorical with vocabulary file.
elif self.vocabulary:
self.table = lookup_ops.index_table_from_file(
vocabulary_file=self.vocabulary,
num_oov_buckets=self.num_oov_tokens,
key_dtype=self._input_dtype)
def call(self, inputs):
return self.table.lookup(inputs)
def compute_output_shape(self, input_shape):
return input_shape
def compute_output_signature(self, input_spec):
output_shape = self.compute_output_shape(input_spec.shape.as_list())
output_dtype = dtypes.int64
if isinstance(input_spec, sparse_tensor.SparseTensorSpec):
return sparse_tensor.SparseTensorSpec(
shape=output_shape, dtype=output_dtype)
else:
return tensor_spec.TensorSpec(shape=output_shape, dtype=output_dtype)
def get_config(self):
config = {
'max_tokens': self.max_tokens,
'num_oov_tokens': self.num_oov_tokens,
'vocabulary': self.vocabulary
}
base_config = super(CategoryLookup, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
class CategoryCrossing(Layer):
"""Category crossing layer.
This layer transforms multiple categorical inputs to categorical outputs
by Cartesian product, and hash the output if necessary. Without hashing
(`num_bins=None`) the output dtype is string, with hashing the output dtype
is int64.
Arguments:
depth: depth of input crossing. By default None, all inputs are crossed into
one output. It can also be an int or tuple/list of ints. Passing an
integer will create combinations of crossed outputs with depth up to that
integer, i.e., [1, 2, ..., `depth`), and passing a tuple of integers will
create crossed outputs with depth for the specified values in the tuple,
i.e., `depth`=(N1, N2) will create all possible crossed outputs with depth
equal to N1 or N2. Passing `None` means a single crossed output with all
inputs. For example, with inputs `a`, `b` and `c`, `depth=2` means the
output will be [a;b;c;cross(a, b);cross(bc);cross(ca)].
num_bins: Number of hash bins. By default None, no hashing is performed.
name: Name to give to the layer.
**kwargs: Keyword arguments to construct a layer.
Input shape: a list of string or int tensors or sparse tensors of shape
`[batch_size, d1, ..., dm]`
Output shape: a single string or int tensor or sparse tensor of shape
`[batch_size, d1, ..., dm]`
Example: (`depth`=None)
If the layer receives three inputs:
`a=[[1], [4]]`, `b=[[2], [5]]`, `c=[[3], [6]]`
the output will be a string tensor if not hashed:
`[[b'1_X_2_X_3'], [b'4_X_5_X_6']]`
the output will be an int64 tensor if hashed:
`[[hash(b'1_X_2_X_3')], [hash(b'4_X_5_X_6')]]`
Example: (`depth` is an integer)
With the same input above, and if `depth`=2,
the output will be a list of 6 string tensors if not hashed:
`[[b'1'], [b'4']]`
`[[b'2'], [b'5']]`
`[[b'3'], [b'6']]`
`[[b'1_X_2'], [b'4_X_5']]`,
`[[b'2_X_3'], [b'5_X_6']]`,
`[[b'3_X_1'], [b'6_X_4']]`
the output will be a list of 6 int64 tensors if hashed:
`[[hash(b'1')], [hash(b'4')]]`
`[[hash(b'2')], [hash(b'5')]]`
`[[hash(b'3')], [hash(b'6')]]`
`[[hash(b'1_X_2')], [hash(b'4_X_5')]]`,
`[[hash(b'2_X_3')], [hash(b'5_X_6')]]`,
`[[hash(b'3_X_1')], [hash(b'6_X_4')]]`
Example: (`depth` is a tuple/list of integers)
With the same input above, and if `depth`=(2, 3)
the output will be a list of 4 string tensors if not hashed:
`[[b'1_X_2'], [b'4_X_5']]`,
`[[b'2_X_3'], [b'5_X_6']]`,
`[[b'3_X_1'], [b'6_X_4']]`,
`[[b'1_X_2_X_3'], [b'4_X_5_X_6']]`
the output will be a list of 4 int64 tensors if hashed:
`[[hash(b'1_X_2')], [hash(b'4_X_5')]]`,
`[[hash(b'2_X_3')], [hash(b'5_X_6')]]`,
`[[hash(b'3_X_1')], [hash(b'6_X_4')]]`,
`[[hash(b'1_X_2_X_3')], [hash(b'4_X_5_X_6')]]`
"""
def __init__(self, depth=None, num_bins=None, name=None, **kwargs):
# TODO(tanzheny): Add support for depth.
# TODO(tanzheny): Consider making seperator configurable.
if depth is not None:
raise NotImplementedError('`depth` is not supported yet.')
self.num_bins = num_bins
self.depth = depth
super(CategoryCrossing, self).__init__(name=name, **kwargs)
def call(self, inputs):
sparse_output = False
if any([isinstance(inp, sparse_tensor.SparseTensor) for inp in inputs]):
sparse_output = True
if self.num_bins is not None:
output = sparse_ops.sparse_cross_hashed(
inputs, num_buckets=self.num_bins)
else:
output = sparse_ops.sparse_cross(inputs)
if not sparse_output:
output = sparse_ops.sparse_tensor_to_dense(output)
return output
def compute_output_shape(self, input_shape):
if not isinstance(input_shape, (tuple, list)):
raise ValueError('A `CategoryCrossing` layer should be called '
'on a list of inputs.')
input_shapes = input_shape
batch_size = None
for inp_shape in input_shapes:
inp_tensor_shape = tensor_shape.TensorShape(inp_shape).as_list()
if len(inp_tensor_shape) != 2:
raise ValueError('Inputs must be rank 2, get {}'.format(input_shapes))
if batch_size is None:
batch_size = inp_tensor_shape[0]
# The second dimension is dynamic based on inputs.
output_shape = [batch_size, None]
return tensor_shape.TensorShape(output_shape)
def compute_output_signature(self, input_spec):
input_shapes = [x.shape for x in input_spec]
output_shape = self.compute_output_shape(input_shapes)
output_dtype = dtypes.int64 if self.num_bins else dtypes.string
return sparse_tensor.SparseTensorSpec(
shape=output_shape, dtype=output_dtype)
def get_config(self):
config = {'depth': self.depth, 'num_bins': self.num_bins}
base_config = super(CategoryCrossing, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
class Hashing(Layer):
"""Implements categorical feature hashing, also known as "hashing trick".
This layer transforms categorical inputs to hashed output. It converts a
sequence of int or string to a sequence of int. The stable hash function uses
tensorflow::ops::Fingerprint to produce universal output that is consistent
across platforms.
Usage:
```python
layer = Hashing(num_bins=3)
inp = np.asarray([['A', 'B'], ['C', 'A']])
layer(inputs)
[[0, 0], [1, 0]]
```
Arguments:
num_bins: Number of hash bins.
name: Name to give to the layer.
**kwargs: Keyword arguments to construct a layer.
Input shape: A string, int32 or int64 tensor of shape
`[batch_size, d1, ..., dm]`
Output shape: An int64 tensor of shape `[batch_size, d1, ..., dm]`
Example:
If the input is a 5 by 1 string tensor '[['A'], ['B'], ['C'], ['D'], ['E']]'
with `num_bins=2`, then output is 5 by 1 integer tensor
[[hash('A')], [hash('B')], [hash('C')], [hash('D')], [hash('E')]].
"""
def __init__(self, num_bins, name=None, **kwargs):
# TODO(tanzheny): consider adding strong hash variant.
self._num_bins = num_bins
super(Hashing, self).__init__(name=name, **kwargs)
def call(self, inputs):
# TODO(tanzheny): Add ragged support.
# TODO(tanzheny): Add int support.
if isinstance(inputs, sparse_tensor.SparseTensor):
sparse_values = inputs.values
sparse_hashed_values = string_ops.string_to_hash_bucket_fast(
sparse_values, self._num_bins, name='lookup')
return sparse_tensor.SparseTensor(
indices=inputs.indices,
values=sparse_hashed_values,
dense_shape=inputs.dense_shape)
# string_to_hash_bucket_fast uses FarmHash as hash function.
return string_ops.string_to_hash_bucket_fast(
inputs, self._num_bins, name='lookup')
def compute_output_shape(self, input_shape):
return input_shape
def compute_output_signature(self, input_spec):
output_shape = self.compute_output_shape(input_spec.shape.as_list())
output_dtype = dtypes.int64
if isinstance(input_spec, sparse_tensor.SparseTensorSpec):
return sparse_tensor.SparseTensorSpec(
shape=output_shape, dtype=output_dtype)
else:
return tensor_spec.TensorSpec(shape=output_shape, dtype=output_dtype)
def get_config(self):
config = {'num_bins': self._num_bins}
base_config = super(Hashing, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
| 40.208469 | 80 | 0.679439 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework import sparse_tensor
from tensorflow.python.framework import tensor_shape
from tensorflow.python.framework import tensor_spec
from tensorflow.python.keras.engine.base_layer import Layer
from tensorflow.python.ops import lookup_ops
from tensorflow.python.ops import sparse_ops
from tensorflow.python.ops import string_ops
class CategoryLookup(Layer):
def __init__(self,
max_tokens=None,
num_oov_tokens=1,
vocabulary=None,
name=None,
**kwargs):
if max_tokens is not None:
raise ValueError('`max_tokens` and `adapt` is not supported yet.')
if vocabulary is None:
raise ValueError('for now, you must pass a `vocabulary` argument')
self.max_tokens = max_tokens
self.num_oov_tokens = num_oov_tokens
self.vocabulary = vocabulary
super(CategoryLookup, self).__init__(name=name, **kwargs)
def __call__(self, inputs, *args, **kwargs):
if isinstance(inputs, (np.ndarray, float, int)):
inputs = ops.convert_to_tensor(inputs)
self._input_dtype = inputs.dtype
return super(CategoryLookup, self).__call__(inputs, *args, **kwargs)
def build(self, input_shape):
if isinstance(self.vocabulary, (tuple, list, np.ndarray)):
self.table = lookup_ops.index_table_from_tensor(
vocabulary_list=self.vocabulary,
num_oov_buckets=self.num_oov_tokens,
dtype=self._input_dtype)
elif self.vocabulary:
self.table = lookup_ops.index_table_from_file(
vocabulary_file=self.vocabulary,
num_oov_buckets=self.num_oov_tokens,
key_dtype=self._input_dtype)
def call(self, inputs):
return self.table.lookup(inputs)
def compute_output_shape(self, input_shape):
return input_shape
def compute_output_signature(self, input_spec):
output_shape = self.compute_output_shape(input_spec.shape.as_list())
output_dtype = dtypes.int64
if isinstance(input_spec, sparse_tensor.SparseTensorSpec):
return sparse_tensor.SparseTensorSpec(
shape=output_shape, dtype=output_dtype)
else:
return tensor_spec.TensorSpec(shape=output_shape, dtype=output_dtype)
def get_config(self):
config = {
'max_tokens': self.max_tokens,
'num_oov_tokens': self.num_oov_tokens,
'vocabulary': self.vocabulary
}
base_config = super(CategoryLookup, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
class CategoryCrossing(Layer):
def __init__(self, depth=None, num_bins=None, name=None, **kwargs):
if depth is not None:
raise NotImplementedError('`depth` is not supported yet.')
self.num_bins = num_bins
self.depth = depth
super(CategoryCrossing, self).__init__(name=name, **kwargs)
def call(self, inputs):
sparse_output = False
if any([isinstance(inp, sparse_tensor.SparseTensor) for inp in inputs]):
sparse_output = True
if self.num_bins is not None:
output = sparse_ops.sparse_cross_hashed(
inputs, num_buckets=self.num_bins)
else:
output = sparse_ops.sparse_cross(inputs)
if not sparse_output:
output = sparse_ops.sparse_tensor_to_dense(output)
return output
def compute_output_shape(self, input_shape):
if not isinstance(input_shape, (tuple, list)):
raise ValueError('A `CategoryCrossing` layer should be called '
'on a list of inputs.')
input_shapes = input_shape
batch_size = None
for inp_shape in input_shapes:
inp_tensor_shape = tensor_shape.TensorShape(inp_shape).as_list()
if len(inp_tensor_shape) != 2:
raise ValueError('Inputs must be rank 2, get {}'.format(input_shapes))
if batch_size is None:
batch_size = inp_tensor_shape[0]
output_shape = [batch_size, None]
return tensor_shape.TensorShape(output_shape)
def compute_output_signature(self, input_spec):
input_shapes = [x.shape for x in input_spec]
output_shape = self.compute_output_shape(input_shapes)
output_dtype = dtypes.int64 if self.num_bins else dtypes.string
return sparse_tensor.SparseTensorSpec(
shape=output_shape, dtype=output_dtype)
def get_config(self):
config = {'depth': self.depth, 'num_bins': self.num_bins}
base_config = super(CategoryCrossing, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
class Hashing(Layer):
def __init__(self, num_bins, name=None, **kwargs):
self._num_bins = num_bins
super(Hashing, self).__init__(name=name, **kwargs)
def call(self, inputs):
if isinstance(inputs, sparse_tensor.SparseTensor):
sparse_values = inputs.values
sparse_hashed_values = string_ops.string_to_hash_bucket_fast(
sparse_values, self._num_bins, name='lookup')
return sparse_tensor.SparseTensor(
indices=inputs.indices,
values=sparse_hashed_values,
dense_shape=inputs.dense_shape)
return string_ops.string_to_hash_bucket_fast(
inputs, self._num_bins, name='lookup')
def compute_output_shape(self, input_shape):
return input_shape
def compute_output_signature(self, input_spec):
output_shape = self.compute_output_shape(input_spec.shape.as_list())
output_dtype = dtypes.int64
if isinstance(input_spec, sparse_tensor.SparseTensorSpec):
return sparse_tensor.SparseTensorSpec(
shape=output_shape, dtype=output_dtype)
else:
return tensor_spec.TensorSpec(shape=output_shape, dtype=output_dtype)
def get_config(self):
config = {'num_bins': self._num_bins}
base_config = super(Hashing, self).get_config()
return dict(list(base_config.items()) + list(config.items()))
| true | true |
f727139b39073fe544e6ea44332b015dc4cb68d8 | 7,589 | py | Python | applications/views.py | AndyUGA/ugahacks5 | 6a7787b50d9e8ea9685c3e36c38da6bc699bca77 | [
"MIT"
] | null | null | null | applications/views.py | AndyUGA/ugahacks5 | 6a7787b50d9e8ea9685c3e36c38da6bc699bca77 | [
"MIT"
] | null | null | null | applications/views.py | AndyUGA/ugahacks5 | 6a7787b50d9e8ea9685c3e36c38da6bc699bca77 | [
"MIT"
] | null | null | null | # Create your views here.
from __future__ import print_function
import logging
from datetime import timedelta
from django import http
from django.contrib import messages
from django.contrib.auth.mixins import UserPassesTestMixin
from django.core.exceptions import ValidationError
from django.http import Http404, HttpResponseRedirect, JsonResponse, HttpResponse
from django.shortcuts import render, get_object_or_404
from django.utils import timezone
from django.views import View
from app import slack
from app.slack import SlackInvitationException
from app.utils import reverse, hacker_tabs
from app.views import TabsView
from applications import models, emails, forms
from user.mixins import IsHackerMixin, is_hacker
def check_application_exists(user, uuid):
try:
application = models.Application.objects.get(user=user)
except models.Application.DoesNotExist:
raise Http404
if not application or uuid != application.uuid_str:
raise Http404
class ConfirmApplication(IsHackerMixin, UserPassesTestMixin, View):
def test_func(self):
check_application_exists(self.request.user, self.kwargs.get('id', None))
return True
def get(self, request, *args, **kwargs):
application = models.Application.objects.get(user=request.user)
msg = None
if application.can_confirm():
msg = emails.create_confirmation_email(application, self.request)
try:
application.confirm()
except:
raise Http404
if msg:
msg.send()
try:
slack.send_slack_invite(request.user.email)
# Ignore if we can't send, it's only optional
except SlackInvitationException as e:
logging.error(e)
return http.HttpResponseRedirect(reverse('dashboard'))
class CancelApplication(IsHackerMixin, UserPassesTestMixin, TabsView):
template_name = 'cancel.html'
def test_func(self):
check_application_exists(self.request.user, self.kwargs.get('id', None))
return True
def get_back_url(self):
return reverse('dashboard')
def get_context_data(self, **kwargs):
context = super(CancelApplication, self).get_context_data(**kwargs)
application = models.Application.objects.get(user=self.request.user)
context.update({'application': application, })
if application.status == models.APP_CANCELLED:
context.update({'error': "Thank you for responding. We're sorry you won't be able to make it."
" Hope to see you next edition!"
})
elif application.status == models.APP_EXPIRED:
context.update({'error': "Unfortunately your invite has expired."})
elif not application.can_be_cancelled():
context.update({
'error': "You found a glitch! You can't cancel this invitation. Is this the question for 42?",
'application': None
})
return context
def post(self, request, *args, **kwargs):
application = models.Application.objects.get(user=self.request.user)
try:
application.cancel()
except ValidationError:
pass
return http.HttpResponseRedirect(reverse('dashboard'))
def get_deadline(application):
last_updated = application.status_update_date
if application.status == models.APP_INVITED:
deadline = last_updated + timedelta(days=5)
else:
deadline = last_updated + timedelta(days=1)
return deadline
class HackerDashboard(IsHackerMixin, TabsView):
template_name = 'dashboard.html'
def get_current_tabs(self):
return hacker_tabs(self.request.user)
def get_context_data(self, **kwargs):
context = super(HackerDashboard, self).get_context_data(**kwargs)
try:
draft = models.DraftApplication.objects.get(user=self.request.user)
form = forms.ApplicationForm(instance=models.Application(**draft.get_dict()))
except:
form = forms.ApplicationForm()
context.update({'form': form})
try:
application = models.Application.objects.get(user=self.request.user)
deadline = get_deadline(application)
context.update({'invite_timeleft': deadline - timezone.now()})
except:
# We ignore this as we are okay if the user has not created an application yet
pass
return context
def post(self, request, *args, **kwargs):
new_application = True
try:
form = forms.ApplicationForm(request.POST, request.FILES, instance=request.user.application)
new_application = False
except:
form = forms.ApplicationForm(request.POST, request.FILES)
if form.is_valid():
application = form.save(commit=False)
application.user = request.user
application.save()
if new_application:
messages.success(request,
'We have now received your application. '
'Processing your application will take some time, so please be patient.')
else:
messages.success(request, 'Application changes saved successfully!')
return HttpResponseRedirect(reverse('root'))
else:
c = self.get_context_data()
c.update({'form': form})
return render(request, self.template_name, c)
class HackerApplication(IsHackerMixin, TabsView):
template_name = 'application.html'
def get_current_tabs(self):
return hacker_tabs(self.request.user)
def get_context_data(self, **kwargs):
context = super(HackerApplication, self).get_context_data(**kwargs)
application = get_object_or_404(models.Application, user=self.request.user)
deadline = get_deadline(application)
context.update(
{'invite_timeleft': deadline - timezone.now(), 'form': forms.ApplicationForm(instance=application)})
return context
def post(self, request, *args, **kwargs):
try:
form = forms.ApplicationForm(request.POST, request.FILES, instance=request.user.application)
except:
form = forms.ApplicationForm(request.POST, request.FILES)
if form.is_valid():
application = form.save(commit=False)
application.user = request.user
application.save()
messages.success(request, 'Application changes saved successfully!')
return HttpResponseRedirect(reverse('dashboard'))
else:
c = self.get_context_data()
c.update({'form': form})
return render(request, self.template_name, c)
@is_hacker
def save_draft(request):
d = models.DraftApplication()
d.user = request.user
form_keys = set(dict(forms.ApplicationForm().fields).keys())
valid_keys = set([field.name for field in models.Application()._meta.get_fields()])
d.save_dict(dict((k, v) for k, v in request.POST.items() if k in valid_keys.intersection(form_keys) and v))
d.save()
return JsonResponse({'saved': True})
def export_resume(request):
try:
response = HttpResponse(open("./files/resumes/resume_export.tar.gz", 'rb').read())
response['Content-Type'] = 'text/plain'
response['Content-Disposition'] = 'attachment; filename=resume_export.tar.gz'
return response
except:
raise Http404
| 36.311005 | 112 | 0.65305 |
from __future__ import print_function
import logging
from datetime import timedelta
from django import http
from django.contrib import messages
from django.contrib.auth.mixins import UserPassesTestMixin
from django.core.exceptions import ValidationError
from django.http import Http404, HttpResponseRedirect, JsonResponse, HttpResponse
from django.shortcuts import render, get_object_or_404
from django.utils import timezone
from django.views import View
from app import slack
from app.slack import SlackInvitationException
from app.utils import reverse, hacker_tabs
from app.views import TabsView
from applications import models, emails, forms
from user.mixins import IsHackerMixin, is_hacker
def check_application_exists(user, uuid):
try:
application = models.Application.objects.get(user=user)
except models.Application.DoesNotExist:
raise Http404
if not application or uuid != application.uuid_str:
raise Http404
class ConfirmApplication(IsHackerMixin, UserPassesTestMixin, View):
def test_func(self):
check_application_exists(self.request.user, self.kwargs.get('id', None))
return True
def get(self, request, *args, **kwargs):
application = models.Application.objects.get(user=request.user)
msg = None
if application.can_confirm():
msg = emails.create_confirmation_email(application, self.request)
try:
application.confirm()
except:
raise Http404
if msg:
msg.send()
try:
slack.send_slack_invite(request.user.email)
except SlackInvitationException as e:
logging.error(e)
return http.HttpResponseRedirect(reverse('dashboard'))
class CancelApplication(IsHackerMixin, UserPassesTestMixin, TabsView):
template_name = 'cancel.html'
def test_func(self):
check_application_exists(self.request.user, self.kwargs.get('id', None))
return True
def get_back_url(self):
return reverse('dashboard')
def get_context_data(self, **kwargs):
context = super(CancelApplication, self).get_context_data(**kwargs)
application = models.Application.objects.get(user=self.request.user)
context.update({'application': application, })
if application.status == models.APP_CANCELLED:
context.update({'error': "Thank you for responding. We're sorry you won't be able to make it."
" Hope to see you next edition!"
})
elif application.status == models.APP_EXPIRED:
context.update({'error': "Unfortunately your invite has expired."})
elif not application.can_be_cancelled():
context.update({
'error': "You found a glitch! You can't cancel this invitation. Is this the question for 42?",
'application': None
})
return context
def post(self, request, *args, **kwargs):
application = models.Application.objects.get(user=self.request.user)
try:
application.cancel()
except ValidationError:
pass
return http.HttpResponseRedirect(reverse('dashboard'))
def get_deadline(application):
last_updated = application.status_update_date
if application.status == models.APP_INVITED:
deadline = last_updated + timedelta(days=5)
else:
deadline = last_updated + timedelta(days=1)
return deadline
class HackerDashboard(IsHackerMixin, TabsView):
template_name = 'dashboard.html'
def get_current_tabs(self):
return hacker_tabs(self.request.user)
def get_context_data(self, **kwargs):
context = super(HackerDashboard, self).get_context_data(**kwargs)
try:
draft = models.DraftApplication.objects.get(user=self.request.user)
form = forms.ApplicationForm(instance=models.Application(**draft.get_dict()))
except:
form = forms.ApplicationForm()
context.update({'form': form})
try:
application = models.Application.objects.get(user=self.request.user)
deadline = get_deadline(application)
context.update({'invite_timeleft': deadline - timezone.now()})
except:
# We ignore this as we are okay if the user has not created an application yet
pass
return context
def post(self, request, *args, **kwargs):
new_application = True
try:
form = forms.ApplicationForm(request.POST, request.FILES, instance=request.user.application)
new_application = False
except:
form = forms.ApplicationForm(request.POST, request.FILES)
if form.is_valid():
application = form.save(commit=False)
application.user = request.user
application.save()
if new_application:
messages.success(request,
'We have now received your application. '
'Processing your application will take some time, so please be patient.')
else:
messages.success(request, 'Application changes saved successfully!')
return HttpResponseRedirect(reverse('root'))
else:
c = self.get_context_data()
c.update({'form': form})
return render(request, self.template_name, c)
class HackerApplication(IsHackerMixin, TabsView):
template_name = 'application.html'
def get_current_tabs(self):
return hacker_tabs(self.request.user)
def get_context_data(self, **kwargs):
context = super(HackerApplication, self).get_context_data(**kwargs)
application = get_object_or_404(models.Application, user=self.request.user)
deadline = get_deadline(application)
context.update(
{'invite_timeleft': deadline - timezone.now(), 'form': forms.ApplicationForm(instance=application)})
return context
def post(self, request, *args, **kwargs):
try:
form = forms.ApplicationForm(request.POST, request.FILES, instance=request.user.application)
except:
form = forms.ApplicationForm(request.POST, request.FILES)
if form.is_valid():
application = form.save(commit=False)
application.user = request.user
application.save()
messages.success(request, 'Application changes saved successfully!')
return HttpResponseRedirect(reverse('dashboard'))
else:
c = self.get_context_data()
c.update({'form': form})
return render(request, self.template_name, c)
@is_hacker
def save_draft(request):
d = models.DraftApplication()
d.user = request.user
form_keys = set(dict(forms.ApplicationForm().fields).keys())
valid_keys = set([field.name for field in models.Application()._meta.get_fields()])
d.save_dict(dict((k, v) for k, v in request.POST.items() if k in valid_keys.intersection(form_keys) and v))
d.save()
return JsonResponse({'saved': True})
def export_resume(request):
try:
response = HttpResponse(open("./files/resumes/resume_export.tar.gz", 'rb').read())
response['Content-Type'] = 'text/plain'
response['Content-Disposition'] = 'attachment; filename=resume_export.tar.gz'
return response
except:
raise Http404
| true | true |
f72715df1abfb3b959b3006e717ef5f1bb7888f0 | 90 | py | Python | app/reserve/__init__.py | YaJunCui/bhbmjsfwzx | 1241b433663d5bcd170d61ab3e31423304f8a257 | [
"Apache-2.0"
] | null | null | null | app/reserve/__init__.py | YaJunCui/bhbmjsfwzx | 1241b433663d5bcd170d61ab3e31423304f8a257 | [
"Apache-2.0"
] | null | null | null | app/reserve/__init__.py | YaJunCui/bhbmjsfwzx | 1241b433663d5bcd170d61ab3e31423304f8a257 | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint
reserve = Blueprint('reserve', __name__)
from . import views | 18 | 40 | 0.777778 | from flask import Blueprint
reserve = Blueprint('reserve', __name__)
from . import views | true | true |
f727170830757a9927a76f877b9aa62a8ac16456 | 4,123 | py | Python | scripts/appleseedMaya/menu.py | mororo250/appleseed-maya | 267d747d56b10fea716d014a6952e2a3de91b69c | [
"MIT"
] | 85 | 2016-03-02T13:52:08.000Z | 2022-01-07T22:45:30.000Z | scripts/appleseedMaya/menu.py | markreidvfx/appleseed-maya | d8dbf4b4134b34edc6c30b3f5e51f042de6abbf0 | [
"MIT"
] | 167 | 2016-01-29T17:45:44.000Z | 2021-09-17T04:47:17.000Z | scripts/appleseedMaya/menu.py | markreidvfx/appleseed-maya | d8dbf4b4134b34edc6c30b3f5e51f042de6abbf0 | [
"MIT"
] | 24 | 2016-01-29T17:37:06.000Z | 2022-01-07T15:55:24.000Z |
#
# This source file is part of appleseed.
# Visit https://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2016-2019 Esteban Tovagliari, The appleseedhq Organization
#
# 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.
#
# Standard imports.
import os
# Maya imports.
import maya.cmds as mc
import maya.mel as mel
# appleseedMaya imports.
from logger import logger
from util import createLocator
def showAbout():
if mc.window('appleseedAboutDialog', query=True, exists=True):
mc.deleteUI('appleseedAboutDialog')
window = mc.window('appleseedAboutDialog', title='About appleseed-maya')
mc.columnLayout(rs=20, columnOffset=['both', 22], width=200)
# Add some empty space. Is there a better way to do this?
mc.text(label='')
mc.image(image='appleseed-logo-256.png')
mc.text(
label='Plugin version: ' + mc.pluginInfo("appleseedMaya", q=True, v=True),
font='boldLabelFont',
align='center')
mc.text(
label='Copyright (c) 2019 The appleseedhq Organization',
font='boldLabelFont',
align='center')
mc.text(
label='This software is released under the MIT license.',
font='boldLabelFont',
align='center')
# Add some empty space. Is there a better way to do this?
mc.text(label='')
mc.setParent('..')
mc.showWindow(window)
__g_appleseedMenu = None
def createSkyDomeLight():
(xform, shape) = createLocator('appleseedSkyDomeLight')
# Add the locator to the light set.
mc.connectAttr(
xform + '.instObjGroups',
'defaultLightSet.dagSetMembers',
nextAvailable=True)
def createPhysicalLight():
(xform, shape) = createLocator('appleseedPhysicalSkyLight')
# Add the locator to the light set.
mc.connectAttr(
xform + '.instObjGroups',
'defaultLightSet.dagSetMembers',
nextAvailable=True)
def createMenu():
logger.debug("creating appleseed menu.")
global __g_appleseedMenu
deleteMenu()
gMainWindow = mel.eval('$temp1=$gMainWindow')
__g_appleseedMenu = mc.menu(
'appleseedMenu', parent=gMainWindow, label='appleseed', tearOff=True)
mc.menuItem(
'appleseedLightMenu',
subMenu=True,
label='Lights',
to=True,
parent='appleseedMenu')
mc.menuItem(
label='Create Dome Light',
parent='appleseedLightMenu',
command='import appleseedMaya.menu\nappleseedMaya.menu.createSkyDomeLight()')
mc.menuItem(
label='Create Physical Sky',
parent='appleseedLightMenu',
command='import appleseedMaya.menu\nappleseedMaya.menu.createPhysicalLight()')
mc.menuItem(divider=True, parent='appleseedMenu')
mc.menuItem(
label='About',
parent='appleseedMenu',
command='import appleseedMaya.menu\nappleseedMaya.menu.showAbout()')
def deleteMenu():
global __g_appleseedMenu
try:
mc.deleteUI(__g_appleseedMenu)
logger.debug("deleted appleseed menu.")
except:
pass
| 29.876812 | 86 | 0.696338 |
import os
import maya.cmds as mc
import maya.mel as mel
from logger import logger
from util import createLocator
def showAbout():
if mc.window('appleseedAboutDialog', query=True, exists=True):
mc.deleteUI('appleseedAboutDialog')
window = mc.window('appleseedAboutDialog', title='About appleseed-maya')
mc.columnLayout(rs=20, columnOffset=['both', 22], width=200)
mc.text(label='')
mc.image(image='appleseed-logo-256.png')
mc.text(
label='Plugin version: ' + mc.pluginInfo("appleseedMaya", q=True, v=True),
font='boldLabelFont',
align='center')
mc.text(
label='Copyright (c) 2019 The appleseedhq Organization',
font='boldLabelFont',
align='center')
mc.text(
label='This software is released under the MIT license.',
font='boldLabelFont',
align='center')
mc.text(label='')
mc.setParent('..')
mc.showWindow(window)
__g_appleseedMenu = None
def createSkyDomeLight():
(xform, shape) = createLocator('appleseedSkyDomeLight')
mc.connectAttr(
xform + '.instObjGroups',
'defaultLightSet.dagSetMembers',
nextAvailable=True)
def createPhysicalLight():
(xform, shape) = createLocator('appleseedPhysicalSkyLight')
mc.connectAttr(
xform + '.instObjGroups',
'defaultLightSet.dagSetMembers',
nextAvailable=True)
def createMenu():
logger.debug("creating appleseed menu.")
global __g_appleseedMenu
deleteMenu()
gMainWindow = mel.eval('$temp1=$gMainWindow')
__g_appleseedMenu = mc.menu(
'appleseedMenu', parent=gMainWindow, label='appleseed', tearOff=True)
mc.menuItem(
'appleseedLightMenu',
subMenu=True,
label='Lights',
to=True,
parent='appleseedMenu')
mc.menuItem(
label='Create Dome Light',
parent='appleseedLightMenu',
command='import appleseedMaya.menu\nappleseedMaya.menu.createSkyDomeLight()')
mc.menuItem(
label='Create Physical Sky',
parent='appleseedLightMenu',
command='import appleseedMaya.menu\nappleseedMaya.menu.createPhysicalLight()')
mc.menuItem(divider=True, parent='appleseedMenu')
mc.menuItem(
label='About',
parent='appleseedMenu',
command='import appleseedMaya.menu\nappleseedMaya.menu.showAbout()')
def deleteMenu():
global __g_appleseedMenu
try:
mc.deleteUI(__g_appleseedMenu)
logger.debug("deleted appleseed menu.")
except:
pass
| true | true |
f727178eb81e72d2d877679f084f64e3e80cf022 | 2,302 | py | Python | test/functional/wallet_coinbase_category.py | picacoin/picacoin | a6b6c1053d796fac077d1c4ce63e09014002b364 | [
"MIT"
] | 1 | 2021-06-17T01:38:26.000Z | 2021-06-17T01:38:26.000Z | test/functional/wallet_coinbase_category.py | picacoin/picacoin | a6b6c1053d796fac077d1c4ce63e09014002b364 | [
"MIT"
] | null | null | null | test/functional/wallet_coinbase_category.py | picacoin/picacoin | a6b6c1053d796fac077d1c4ce63e09014002b364 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Picacoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test coinbase transactions return the correct categories.
Tests listtransactions, listsinceblock, and gettransaction.
"""
from test_framework.test_framework import PicacoinTestFramework
from test_framework.util import (
assert_array_result
)
class CoinbaseCategoryTest(PicacoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
def assert_category(self, category, address, txid, skip):
assert_array_result(self.nodes[0].listtransactions(skip=skip),
{"address": address},
{"category": category})
assert_array_result(self.nodes[0].listsinceblock()["transactions"],
{"address": address},
{"category": category})
assert_array_result(self.nodes[0].gettransaction(txid)["details"],
{"address": address},
{"category": category})
def run_test(self):
# Generate one block to an address
address = self.nodes[0].getnewaddress()
self.nodes[0].generatetoaddress(1, address)
hash = self.nodes[0].getbestblockhash()
txid = self.nodes[0].getblock(hash)["tx"][0]
# Coinbase transaction is immature after 1 confirmation
self.assert_category("immature", address, txid, 0)
# Mine another 99 blocks on top
self.nodes[0].generate(99)
# Coinbase transaction is still immature after 100 confirmations
self.assert_category("immature", address, txid, 99)
# Mine one more block
self.nodes[0].generate(1)
# Coinbase transaction is now matured, so category is "generate"
self.assert_category("generate", address, txid, 100)
# Orphan block that paid to address
self.nodes[0].invalidateblock(hash)
# Coinbase transaction is now orphaned
self.assert_category("orphan", address, txid, 100)
if __name__ == '__main__':
CoinbaseCategoryTest().main()
| 38.366667 | 75 | 0.650738 |
from test_framework.test_framework import PicacoinTestFramework
from test_framework.util import (
assert_array_result
)
class CoinbaseCategoryTest(PicacoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
def assert_category(self, category, address, txid, skip):
assert_array_result(self.nodes[0].listtransactions(skip=skip),
{"address": address},
{"category": category})
assert_array_result(self.nodes[0].listsinceblock()["transactions"],
{"address": address},
{"category": category})
assert_array_result(self.nodes[0].gettransaction(txid)["details"],
{"address": address},
{"category": category})
def run_test(self):
address = self.nodes[0].getnewaddress()
self.nodes[0].generatetoaddress(1, address)
hash = self.nodes[0].getbestblockhash()
txid = self.nodes[0].getblock(hash)["tx"][0]
self.assert_category("immature", address, txid, 0)
self.nodes[0].generate(99)
self.assert_category("immature", address, txid, 99)
self.nodes[0].generate(1)
self.assert_category("generate", address, txid, 100)
self.nodes[0].invalidateblock(hash)
self.assert_category("orphan", address, txid, 100)
if __name__ == '__main__':
CoinbaseCategoryTest().main()
| true | true |
f727180f817153cce34f871f9fe22f9853129f9e | 717 | py | Python | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/re/re_negative_look_behind.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/re/re_negative_look_behind.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/re/re_negative_look_behind.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | null | null | null | # Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Negative look behind assertion.
"""
# end_pymotw_header
import re
address = re.compile(
"""
^
# An address: username@domain.tld
[\w\d.+-]+ # username
# Ignore noreply addresses
(?<!noreply)
@
([\w\d.]+\.)+ # domain name prefix
(com|org|edu) # limit the allowed top-level domains
$
""",
re.VERBOSE,
)
candidates = [u"first.last@example.com", u"noreply@example.com"]
for candidate in candidates:
print("Candidate:", candidate)
match = address.search(candidate)
if match:
print(" Match:", candidate[match.start() : match.end()])
else:
print(" No match")
| 18.868421 | 65 | 0.591353 |
import re
address = re.compile(
"""
^
# An address: username@domain.tld
[\w\d.+-]+ # username
# Ignore noreply addresses
(?<!noreply)
@
([\w\d.]+\.)+ # domain name prefix
(com|org|edu) # limit the allowed top-level domains
$
""",
re.VERBOSE,
)
candidates = [u"first.last@example.com", u"noreply@example.com"]
for candidate in candidates:
print("Candidate:", candidate)
match = address.search(candidate)
if match:
print(" Match:", candidate[match.start() : match.end()])
else:
print(" No match")
| true | true |
f727184e862d83fc9178a8cd67a0568c1ac7bed2 | 1,740 | py | Python | pandas/tests/categorical/test_algos.py | stillmatic/pandas | da067b2fe4cdc43eac5349e0648cfbbe4b96dbbd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-01-13T09:40:44.000Z | 2021-01-13T09:40:52.000Z | pandas/tests/categorical/test_algos.py | stillmatic/pandas | da067b2fe4cdc43eac5349e0648cfbbe4b96dbbd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/tests/categorical/test_algos.py | stillmatic/pandas | da067b2fe4cdc43eac5349e0648cfbbe4b96dbbd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | import pytest
import numpy as np
import pandas as pd
import pandas.util.testing as tm
@pytest.mark.parametrize('ordered', [True, False])
@pytest.mark.parametrize('categories', [
['b', 'a', 'c'],
['a', 'b', 'c', 'd'],
])
def test_factorize(categories, ordered):
cat = pd.Categorical(['b', 'b', 'a', 'c', None],
categories=categories,
ordered=ordered)
labels, uniques = pd.factorize(cat)
expected_labels = np.array([0, 0, 1, 2, -1], dtype=np.intp)
expected_uniques = pd.Categorical(['b', 'a', 'c'],
categories=categories,
ordered=ordered)
tm.assert_numpy_array_equal(labels, expected_labels)
tm.assert_categorical_equal(uniques, expected_uniques)
def test_factorized_sort():
cat = pd.Categorical(['b', 'b', None, 'a'])
labels, uniques = pd.factorize(cat, sort=True)
expected_labels = np.array([1, 1, -1, 0], dtype=np.intp)
expected_uniques = pd.Categorical(['a', 'b'])
tm.assert_numpy_array_equal(labels, expected_labels)
tm.assert_categorical_equal(uniques, expected_uniques)
def test_factorized_sort_ordered():
cat = pd.Categorical(['b', 'b', None, 'a'],
categories=['c', 'b', 'a'],
ordered=True)
labels, uniques = pd.factorize(cat, sort=True)
expected_labels = np.array([0, 0, -1, 1], dtype=np.intp)
expected_uniques = pd.Categorical(['b', 'a'],
categories=['c', 'b', 'a'],
ordered=True)
tm.assert_numpy_array_equal(labels, expected_labels)
tm.assert_categorical_equal(uniques, expected_uniques)
| 34.8 | 65 | 0.58046 | import pytest
import numpy as np
import pandas as pd
import pandas.util.testing as tm
@pytest.mark.parametrize('ordered', [True, False])
@pytest.mark.parametrize('categories', [
['b', 'a', 'c'],
['a', 'b', 'c', 'd'],
])
def test_factorize(categories, ordered):
cat = pd.Categorical(['b', 'b', 'a', 'c', None],
categories=categories,
ordered=ordered)
labels, uniques = pd.factorize(cat)
expected_labels = np.array([0, 0, 1, 2, -1], dtype=np.intp)
expected_uniques = pd.Categorical(['b', 'a', 'c'],
categories=categories,
ordered=ordered)
tm.assert_numpy_array_equal(labels, expected_labels)
tm.assert_categorical_equal(uniques, expected_uniques)
def test_factorized_sort():
cat = pd.Categorical(['b', 'b', None, 'a'])
labels, uniques = pd.factorize(cat, sort=True)
expected_labels = np.array([1, 1, -1, 0], dtype=np.intp)
expected_uniques = pd.Categorical(['a', 'b'])
tm.assert_numpy_array_equal(labels, expected_labels)
tm.assert_categorical_equal(uniques, expected_uniques)
def test_factorized_sort_ordered():
cat = pd.Categorical(['b', 'b', None, 'a'],
categories=['c', 'b', 'a'],
ordered=True)
labels, uniques = pd.factorize(cat, sort=True)
expected_labels = np.array([0, 0, -1, 1], dtype=np.intp)
expected_uniques = pd.Categorical(['b', 'a'],
categories=['c', 'b', 'a'],
ordered=True)
tm.assert_numpy_array_equal(labels, expected_labels)
tm.assert_categorical_equal(uniques, expected_uniques)
| true | true |
f727187cf5688be60c2c2db7a635f08927f1a6e9 | 3,431 | py | Python | utils/unshrtn.py | rongpenl/twarc | 1294fc717d16787b631236cd43e9f2b3155d3d96 | [
"MIT"
] | null | null | null | utils/unshrtn.py | rongpenl/twarc | 1294fc717d16787b631236cd43e9f2b3155d3d96 | [
"MIT"
] | null | null | null | utils/unshrtn.py | rongpenl/twarc | 1294fc717d16787b631236cd43e9f2b3155d3d96 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Unfortunately the "expanded_url" as supplied by Twitter aren't fully
expanded one hop past t.co.
unshrtn.py will attempt to completely unshorten URLs and add them as the
"unshortened_url" key to each url, and emit the tweet as JSON again on stdout.
This script starts 10 seaprate processes which talk to an instance of unshrtn
that is running:
http://github.com/edsu/unshrtn
"""
import re
import json
import time
import urllib.request, urllib.parse, urllib.error
import logging
import argparse
import fileinput
import multiprocessing
# number of urls to look up in parallel
POOL_SIZE = 10
unshrtn_url = "http://localhost:3000"
retries = 2
wait = 15
logging.basicConfig(filename="unshorten.log", level=logging.INFO)
def unshorten_url(url):
if url is None:
return None
# TODO: Worth providing some way for the user to specify specific hostnames they want to expand,
# instead of assuming that all hostnames need expanding?
if re.match(r"^https?://twitter.com/", url):
return url
u = "{}/?{}".format(
unshrtn_url, urllib.parse.urlencode({"url": url.encode("utf8")})
)
resp = None
for retry in range(0, retries):
try:
resp = json.loads(urllib.request.urlopen(u).read().decode("utf-8"))
break
except Exception as e:
logging.error(
"http error: %s when looking up %s. Try %s of %s",
e,
url,
retry,
retries,
)
time.sleep(wait)
for key in ["canonical", "long"]:
if key in resp:
return resp[key]
return None
def rewrite_line(line):
try:
tweet = json.loads(line)
except Exception as e:
# garbage in, garbage out
logging.error(e)
return line
for url_dict in tweet["entities"]["urls"]:
if "expanded_url" in url_dict:
url = url_dict["expanded_url"]
else:
url = url_dict["url"]
url_dict["unshortened_url"] = unshorten_url(url)
tweet["user"]["unshortened_url"] = unshorten_url(tweet["user"]["url"])
return json.dumps(tweet)
def main():
global unshrtn_url, retries, wait
parser = argparse.ArgumentParser()
parser.add_argument(
"--pool-size",
help="number of urls to look up in parallel",
default=POOL_SIZE,
type=int,
)
parser.add_argument(
"--unshrtn", help="url of the unshrtn service", default=unshrtn_url
)
parser.add_argument(
"--retries",
help="number of time to retry if error from unshrtn service",
default=retries,
type=int,
)
parser.add_argument(
"--wait",
help="number of seconds to wait between retries if error from unshrtn service",
default=wait,
type=int,
)
parser.add_argument(
"files",
metavar="FILE",
nargs="*",
help="files to read, if empty, stdin is used",
)
args = parser.parse_args()
unshrtn_url = args.unshrtn
retries = args.retries
wait = args.wait
pool = multiprocessing.Pool(args.pool_size)
for line in pool.imap_unordered(
rewrite_line,
fileinput.input(files=args.files if len(args.files) > 0 else ("-",)),
):
if line != "\n":
print(line)
if __name__ == "__main__":
main()
| 25.043796 | 100 | 0.609443 |
import re
import json
import time
import urllib.request, urllib.parse, urllib.error
import logging
import argparse
import fileinput
import multiprocessing
POOL_SIZE = 10
unshrtn_url = "http://localhost:3000"
retries = 2
wait = 15
logging.basicConfig(filename="unshorten.log", level=logging.INFO)
def unshorten_url(url):
if url is None:
return None
if re.match(r"^https?://twitter.com/", url):
return url
u = "{}/?{}".format(
unshrtn_url, urllib.parse.urlencode({"url": url.encode("utf8")})
)
resp = None
for retry in range(0, retries):
try:
resp = json.loads(urllib.request.urlopen(u).read().decode("utf-8"))
break
except Exception as e:
logging.error(
"http error: %s when looking up %s. Try %s of %s",
e,
url,
retry,
retries,
)
time.sleep(wait)
for key in ["canonical", "long"]:
if key in resp:
return resp[key]
return None
def rewrite_line(line):
try:
tweet = json.loads(line)
except Exception as e:
logging.error(e)
return line
for url_dict in tweet["entities"]["urls"]:
if "expanded_url" in url_dict:
url = url_dict["expanded_url"]
else:
url = url_dict["url"]
url_dict["unshortened_url"] = unshorten_url(url)
tweet["user"]["unshortened_url"] = unshorten_url(tweet["user"]["url"])
return json.dumps(tweet)
def main():
global unshrtn_url, retries, wait
parser = argparse.ArgumentParser()
parser.add_argument(
"--pool-size",
help="number of urls to look up in parallel",
default=POOL_SIZE,
type=int,
)
parser.add_argument(
"--unshrtn", help="url of the unshrtn service", default=unshrtn_url
)
parser.add_argument(
"--retries",
help="number of time to retry if error from unshrtn service",
default=retries,
type=int,
)
parser.add_argument(
"--wait",
help="number of seconds to wait between retries if error from unshrtn service",
default=wait,
type=int,
)
parser.add_argument(
"files",
metavar="FILE",
nargs="*",
help="files to read, if empty, stdin is used",
)
args = parser.parse_args()
unshrtn_url = args.unshrtn
retries = args.retries
wait = args.wait
pool = multiprocessing.Pool(args.pool_size)
for line in pool.imap_unordered(
rewrite_line,
fileinput.input(files=args.files if len(args.files) > 0 else ("-",)),
):
if line != "\n":
print(line)
if __name__ == "__main__":
main()
| true | true |
f727189e07ca7e93ec6cf131f33eb666eb02749e | 7,355 | py | Python | python/dl.py | mkuznets/ytbackup | 834cf65432860bc3fbd92d7d79f2449464ee3ed0 | [
"MIT"
] | null | null | null | python/dl.py | mkuznets/ytbackup | 834cf65432860bc3fbd92d7d79f2449464ee3ed0 | [
"MIT"
] | null | null | null | python/dl.py | mkuznets/ytbackup | 834cf65432860bc3fbd92d7d79f2449464ee3ed0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
import contextlib
import copy
import glob
import hashlib
import http.client
import json
import logging
import os
import shutil
import stat
import sys
import typing
import urllib.error
from unittest import mock
SYSTEM_EXCS = (urllib.error.URLError, http.client.HTTPException, OSError)
STDERR = sys.stderr
YDL_OPTIONS = {
"buffersize": 16 * 1024,
"retries": 5,
"fragment_retries": 5,
"quiet": True,
"noprogress": True,
"youtube_include_dash_manifest": True,
"no_color": True,
"call_home": False,
"ignoreerrors": False,
"geo_bypass": True,
"verbose": False,
"prefer_ffmpeg": True,
"noplaylist": True,
"write_all_thumbnails": True,
"allsubtitles": True,
"writesubtitles": True,
"writeinfojson": True,
"format": "bestvideo+bestaudio/best",
"merge_output_format": "mkv",
}
# ------------------------------------------------------------------------------
class Error(Exception):
def __init__(self, *args, reason=None, **kwargs):
self.reason = reason or "unknown"
# noinspection PyArgumentList
super().__init__(*args, **kwargs)
def json_dump(data, f: typing.TextIO):
json.dump(
data, f, indent=2, skipkeys=True, ensure_ascii=False, default=lambda x: None,
)
f.write("\n")
@contextlib.contextmanager
def suppress_output():
with open(os.devnull, "w") as f:
with contextlib.redirect_stdout(f), contextlib.redirect_stderr(f):
yield
def get_logger(filename: typing.Optional[str] = None) -> logging.Logger:
logger = logging.getLogger("log")
logger.setLevel(logging.DEBUG)
if not logger.handlers:
stream = STDERR
if filename:
stream = open(filename, "a")
handler = logging.StreamHandler(stream)
fmt = logging.Formatter("%(asctime)s\t%(levelname)s\t%(message)s")
handler.setFormatter(fmt)
handler.setLevel(logging.DEBUG)
logger.addHandler(handler)
return logger
def create_progress_hook(logger):
def log_hook(data):
size_done = data.get("downloaded_bytes", None)
size_total = data.get("total_bytes", None)
report = {
"finished": data.get("status") == "finished",
"done": "unk",
}
if size_done is not None and size_total is not None:
report["downloaded"] = size_done
report["total"] = size_total
report["done"] = "%.2f%%" % (size_done * 100 / size_total)
logger.info("__progress__ %s", json.dumps(report))
return log_hook
# noinspection PyUnresolvedReferences
def sha256sum(filename: str, logger: logging.Logger) -> str:
h = hashlib.sha256()
b = bytearray(128 * 1024)
mv = memoryview(b)
total = 0
with open(filename, "rb", buffering=0) as f:
for i, n in enumerate(iter(lambda: f.readinto(mv), 0)):
total += n
if not (i % 160):
logger.info("sha256: %d", total)
h.update(mv[:n])
return h.hexdigest()
# ------------------------------------------------------------------------------
class Download:
def __init__(self, args: argparse.Namespace):
self.url = args.url
self.logger = get_logger(args.log)
# ----------------------------------------------------------------------
self.dest_dir = os.path.abspath(os.path.expanduser(args.dst))
os.makedirs(os.path.dirname(self.dest_dir), exist_ok=True)
self.root = os.path.abspath(os.path.expanduser(args.root))
self.output_dir = tmp_dir = os.path.join(self.root, ".tmp")
os.makedirs(self.output_dir, exist_ok=True)
# Cache for youtube-dl
cache_dir = args.cache or os.path.join(tmp_dir, "ydl_cache")
os.makedirs(cache_dir, exist_ok=True)
# ----------------------------------------------------------------------
custom_opts = json.loads(os.environ.get("YDL_OPTS", "{}"))
assert isinstance(custom_opts, dict)
opts = copy.copy(YDL_OPTIONS)
opts.update(
logger=self.logger,
outtmpl=os.path.join(self.output_dir, "%(id)s/%(id)s.%(ext)s"),
progress_hooks=[create_progress_hook(self.logger)],
cachedir=cache_dir,
)
if args.log:
ffmpeg_log = str(args.log).replace(".log", "-ffmpeg.log")
opts["postprocessor_args"] = ["-progress", "file:{}".format(ffmpeg_log)]
if custom_opts:
self.logger.info("Custom youtube-dl options: %s", custom_opts)
opts.update(custom_opts)
self.opts = opts
def execute(self) -> typing.Any:
import youtube_dl
ydl = youtube_dl.YoutubeDL(self.opts)
process_info = ydl.process_info
infos = {}
def process_hook(data):
if not data.get("id"):
return
infos[data["id"]] = data
return process_info(data)
try:
with mock.patch.object(ydl, "process_info", process_hook):
ydl.download([self.url])
except youtube_dl.DownloadError as exc:
if exc.exc_info[0] in SYSTEM_EXCS:
raise Error(str(exc), reason="system") from exc
raise
if not infos:
raise Error("result is empty")
result = []
for info in infos.values():
result_dir = os.path.join(self.output_dir, info["id"])
if not os.path.exists(result_dir):
raise Error("result directory is not found: %s".format(info["id"]))
shutil.rmtree(self.dest_dir, ignore_errors=True)
shutil.move(result_dir, self.dest_dir)
files = []
for path in glob.glob(os.path.join(self.dest_dir, "**"), recursive=True):
self.logger.info("output file: %s", path)
try:
fi = os.stat(path)
except OSError as exc:
raise Error("could not stat output file") from exc
if stat.S_ISREG(fi.st_mode):
files.append(
{
"path": os.path.relpath(path, self.root),
"hash": sha256sum(path, self.logger),
"size": fi.st_size,
}
)
result.append({"id": info["id"], "files": files})
return result
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--log")
parser.add_argument("--root", required=True)
parser.add_argument("--dst", required=True)
parser.add_argument("--cache")
parser.add_argument("url")
args = parser.parse_args()
logger = get_logger(args.log)
try:
with suppress_output():
result = Download(args).execute()
json_dump(result, sys.stdout)
except Exception as exc:
if isinstance(exc, Error):
msg = str(exc)
reason = exc.reason
else:
logger.exception("unknown error")
msg = "{}: {}".format(exc.__class__.__name__, str(exc))
reason = "unknown"
json_dump({"error": msg, "reason": reason}, sys.stderr)
sys.exit(0xE7)
if __name__ == "__main__":
main()
| 28.397683 | 85 | 0.556628 |
import argparse
import contextlib
import copy
import glob
import hashlib
import http.client
import json
import logging
import os
import shutil
import stat
import sys
import typing
import urllib.error
from unittest import mock
SYSTEM_EXCS = (urllib.error.URLError, http.client.HTTPException, OSError)
STDERR = sys.stderr
YDL_OPTIONS = {
"buffersize": 16 * 1024,
"retries": 5,
"fragment_retries": 5,
"quiet": True,
"noprogress": True,
"youtube_include_dash_manifest": True,
"no_color": True,
"call_home": False,
"ignoreerrors": False,
"geo_bypass": True,
"verbose": False,
"prefer_ffmpeg": True,
"noplaylist": True,
"write_all_thumbnails": True,
"allsubtitles": True,
"writesubtitles": True,
"writeinfojson": True,
"format": "bestvideo+bestaudio/best",
"merge_output_format": "mkv",
}
class Error(Exception):
def __init__(self, *args, reason=None, **kwargs):
self.reason = reason or "unknown"
super().__init__(*args, **kwargs)
def json_dump(data, f: typing.TextIO):
json.dump(
data, f, indent=2, skipkeys=True, ensure_ascii=False, default=lambda x: None,
)
f.write("\n")
@contextlib.contextmanager
def suppress_output():
with open(os.devnull, "w") as f:
with contextlib.redirect_stdout(f), contextlib.redirect_stderr(f):
yield
def get_logger(filename: typing.Optional[str] = None) -> logging.Logger:
logger = logging.getLogger("log")
logger.setLevel(logging.DEBUG)
if not logger.handlers:
stream = STDERR
if filename:
stream = open(filename, "a")
handler = logging.StreamHandler(stream)
fmt = logging.Formatter("%(asctime)s\t%(levelname)s\t%(message)s")
handler.setFormatter(fmt)
handler.setLevel(logging.DEBUG)
logger.addHandler(handler)
return logger
def create_progress_hook(logger):
def log_hook(data):
size_done = data.get("downloaded_bytes", None)
size_total = data.get("total_bytes", None)
report = {
"finished": data.get("status") == "finished",
"done": "unk",
}
if size_done is not None and size_total is not None:
report["downloaded"] = size_done
report["total"] = size_total
report["done"] = "%.2f%%" % (size_done * 100 / size_total)
logger.info("__progress__ %s", json.dumps(report))
return log_hook
def sha256sum(filename: str, logger: logging.Logger) -> str:
h = hashlib.sha256()
b = bytearray(128 * 1024)
mv = memoryview(b)
total = 0
with open(filename, "rb", buffering=0) as f:
for i, n in enumerate(iter(lambda: f.readinto(mv), 0)):
total += n
if not (i % 160):
logger.info("sha256: %d", total)
h.update(mv[:n])
return h.hexdigest()
class Download:
def __init__(self, args: argparse.Namespace):
self.url = args.url
self.logger = get_logger(args.log)
self.dest_dir = os.path.abspath(os.path.expanduser(args.dst))
os.makedirs(os.path.dirname(self.dest_dir), exist_ok=True)
self.root = os.path.abspath(os.path.expanduser(args.root))
self.output_dir = tmp_dir = os.path.join(self.root, ".tmp")
os.makedirs(self.output_dir, exist_ok=True)
cache_dir = args.cache or os.path.join(tmp_dir, "ydl_cache")
os.makedirs(cache_dir, exist_ok=True)
custom_opts = json.loads(os.environ.get("YDL_OPTS", "{}"))
assert isinstance(custom_opts, dict)
opts = copy.copy(YDL_OPTIONS)
opts.update(
logger=self.logger,
outtmpl=os.path.join(self.output_dir, "%(id)s/%(id)s.%(ext)s"),
progress_hooks=[create_progress_hook(self.logger)],
cachedir=cache_dir,
)
if args.log:
ffmpeg_log = str(args.log).replace(".log", "-ffmpeg.log")
opts["postprocessor_args"] = ["-progress", "file:{}".format(ffmpeg_log)]
if custom_opts:
self.logger.info("Custom youtube-dl options: %s", custom_opts)
opts.update(custom_opts)
self.opts = opts
def execute(self) -> typing.Any:
import youtube_dl
ydl = youtube_dl.YoutubeDL(self.opts)
process_info = ydl.process_info
infos = {}
def process_hook(data):
if not data.get("id"):
return
infos[data["id"]] = data
return process_info(data)
try:
with mock.patch.object(ydl, "process_info", process_hook):
ydl.download([self.url])
except youtube_dl.DownloadError as exc:
if exc.exc_info[0] in SYSTEM_EXCS:
raise Error(str(exc), reason="system") from exc
raise
if not infos:
raise Error("result is empty")
result = []
for info in infos.values():
result_dir = os.path.join(self.output_dir, info["id"])
if not os.path.exists(result_dir):
raise Error("result directory is not found: %s".format(info["id"]))
shutil.rmtree(self.dest_dir, ignore_errors=True)
shutil.move(result_dir, self.dest_dir)
files = []
for path in glob.glob(os.path.join(self.dest_dir, "**"), recursive=True):
self.logger.info("output file: %s", path)
try:
fi = os.stat(path)
except OSError as exc:
raise Error("could not stat output file") from exc
if stat.S_ISREG(fi.st_mode):
files.append(
{
"path": os.path.relpath(path, self.root),
"hash": sha256sum(path, self.logger),
"size": fi.st_size,
}
)
result.append({"id": info["id"], "files": files})
return result
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--log")
parser.add_argument("--root", required=True)
parser.add_argument("--dst", required=True)
parser.add_argument("--cache")
parser.add_argument("url")
args = parser.parse_args()
logger = get_logger(args.log)
try:
with suppress_output():
result = Download(args).execute()
json_dump(result, sys.stdout)
except Exception as exc:
if isinstance(exc, Error):
msg = str(exc)
reason = exc.reason
else:
logger.exception("unknown error")
msg = "{}: {}".format(exc.__class__.__name__, str(exc))
reason = "unknown"
json_dump({"error": msg, "reason": reason}, sys.stderr)
sys.exit(0xE7)
if __name__ == "__main__":
main()
| true | true |
f727190f87503bd55a12dd3ee0e9882c00f0b9d2 | 4,189 | py | Python | Prototype.py | supersamdam/ConversationalAI | bb6013c33f6332aee57abbae310577c056c6fdc1 | [
"MIT"
] | 1 | 2021-02-17T16:38:56.000Z | 2021-02-17T16:38:56.000Z | Prototype.py | samaydumasia/ConversationalAI | bb6013c33f6332aee57abbae310577c056c6fdc1 | [
"MIT"
] | null | null | null | Prototype.py | samaydumasia/ConversationalAI | bb6013c33f6332aee57abbae310577c056c6fdc1 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import re
import nltk
nltk.download('stopwords')
from nltk.corpus import stopwords
from nltk.stem.porter import PorterStemmer
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import GaussianNB
from sklearn.metrics import confusion_matrix, accuracy_score
import pickle
import joblib
# Class starts from here
class CONVAI:
#this is the empty vocabulary (vectorizer)
cv = CountVectorizer(max_features = 20000) #change in no of features will result in how many different/unique words it will have
classifier = GaussianNB() #this is the main algorith which works on probablistic approach
no = 1000 #change this to change the number of data in terms of line you want to fed in model
def init(self): #basic function
dataset = pd.read_csv('data.csv') #dataset loaded
no=self.no
corpus = [] #corpus will have cleaned data
for i in range(0, no):
review = re.sub('[^a-zA-Z]', ' ', dataset['0'][i])
review = review.lower()
review = review.split()
ps = PorterStemmer()
all_stopwords = stopwords.words('english')
all_stopwords.remove('not')
review = [ps.stem(word) for word in review if not word in set(all_stopwords)]
review = ' '.join(review)
corpus.append(review)
print(corpus)
X = self.cv.fit_transform(corpus).toarray() #divided dataset into 2 parts this will be like questions
y = dataset.iloc[0:no, 2].values #this will be like answer to the abouve question
# print(X)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.20, random_state = 0) #splitted dataset into train and test
sav = self.classifier.fit(X_train, y_train)
y_pred = self.classifier.predict(X_test) #all the action is done here
print(np.concatenate((y_pred.reshape(len(y_pred),1,), y_test.reshape(len(y_test),1)),1),) #printing the current actions
cm = confusion_matrix(y_test, y_pred)
print(cm)
a = accuracy_score(y_test, y_pred)
print(a)
joblib.dump(self.cv, "vectorizer1.pkl") #vocabulary is saved here
joblib.dump(self.classifier, "classifier1.pkl") #algorithm is saved here
# with open('model.pkl', 'wb') as fout:
# pickle.dump((cv, classifier), fout)
# filename = 'finalized_model.sav'
# pickle.dump(cv, open(filename, 'wb'))
# filename = 'finalized.sav'
# pickle.dump(cv, open(filename, 'wb'))
# saved_model = pickle.dumps(classifier)
def Test(self,query): #this is the function for implementation of new inputs
vectorizer = joblib.load("vectorizer.pkl") #vocabulary is loaded
classifier = joblib.load("classifier.pkl") #algoritm is loaded
# with open('model.pkl', 'rb') as fin:
# cv, classifier = pickle.load(fin)
#This is known as preprocessing the data
cv = self.cv
classifier = self.classifier
#query = input()
new_review = query
new_review = re.sub('[^a-zA-Z]', ' ', new_review)
new_review = new_review.lower()
new_review = new_review.split()
ps = PorterStemmer()
all_stopwords = stopwords.words('english')
all_stopwords.remove('not')
new_review = [ps.stem(word) for word in new_review if not word in set(all_stopwords)]
new_review = ' '.join(new_review)
new_corpus = [new_review]
new_X_test = cv.transform(new_corpus).toarray()
new_y_pred = classifier.predict(new_X_test)
print(new_y_pred) #output from the algorithm is printed
return new_y_pred #output from the algorithm is returned
if __name__ == "__main__": #main class
a=CONVAI() #created instance(object) of the class CONVAI
a.init() #called the function which will start training
a.Test("hello") #enter different type of input here to get new output results
| 39.149533 | 139 | 0.644307 | import numpy as np
import pandas as pd
import re
import nltk
nltk.download('stopwords')
from nltk.corpus import stopwords
from nltk.stem.porter import PorterStemmer
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import GaussianNB
from sklearn.metrics import confusion_matrix, accuracy_score
import pickle
import joblib
class CONVAI:
cv = CountVectorizer(max_features = 20000)
classifier = GaussianNB()
no = 1000
def init(self):
dataset = pd.read_csv('data.csv')
no=self.no
corpus = []
for i in range(0, no):
review = re.sub('[^a-zA-Z]', ' ', dataset['0'][i])
review = review.lower()
review = review.split()
ps = PorterStemmer()
all_stopwords = stopwords.words('english')
all_stopwords.remove('not')
review = [ps.stem(word) for word in review if not word in set(all_stopwords)]
review = ' '.join(review)
corpus.append(review)
print(corpus)
X = self.cv.fit_transform(corpus).toarray()
y = dataset.iloc[0:no, 2].values
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.20, random_state = 0)
sav = self.classifier.fit(X_train, y_train)
y_pred = self.classifier.predict(X_test)
print(np.concatenate((y_pred.reshape(len(y_pred),1,), y_test.reshape(len(y_test),1)),1),)
cm = confusion_matrix(y_test, y_pred)
print(cm)
a = accuracy_score(y_test, y_pred)
print(a)
joblib.dump(self.cv, "vectorizer1.pkl")
joblib.dump(self.classifier, "classifier1.pkl")
def Test(self,query):
vectorizer = joblib.load("vectorizer.pkl")
classifier = joblib.load("classifier.pkl")
cv = self.cv
classifier = self.classifier
new_review = query
new_review = re.sub('[^a-zA-Z]', ' ', new_review)
new_review = new_review.lower()
new_review = new_review.split()
ps = PorterStemmer()
all_stopwords = stopwords.words('english')
all_stopwords.remove('not')
new_review = [ps.stem(word) for word in new_review if not word in set(all_stopwords)]
new_review = ' '.join(new_review)
new_corpus = [new_review]
new_X_test = cv.transform(new_corpus).toarray()
new_y_pred = classifier.predict(new_X_test)
print(new_y_pred)
return new_y_pred
if __name__ == "__main__":
a=CONVAI()
a.init()
a.Test("hello")
| true | true |
f7271956500274e8b25a12c00f4764c1033c5146 | 4,346 | py | Python | modisco/value_provider.py | XiaotingChen/tfmodisco | 17cbafe806942304a02e8134fe10224bdff38b0c | [
"MIT"
] | null | null | null | modisco/value_provider.py | XiaotingChen/tfmodisco | 17cbafe806942304a02e8134fe10224bdff38b0c | [
"MIT"
] | null | null | null | modisco/value_provider.py | XiaotingChen/tfmodisco | 17cbafe806942304a02e8134fe10224bdff38b0c | [
"MIT"
] | null | null | null | from __future__ import division, print_function, absolute_import
import numpy as np
import scipy.stats
class AbstractValueProvider(object):
def __call__(self, seqlet):
raise NotImplementedError()
@classmethod
def from_hdf5(cls, grp):
the_class = eval(grp.attrs["class"])
return the_class.from_hdf5(grp)
class CoorScoreValueProvider(AbstractValueProvider):
def __call__(self, seqlet):
return seqlet.coor.score
def save_hdf5(self, grp):
grp.attrs["class"] = type(self).__name__
@classmethod
def from_hdf5(cls, grp):
return cls()
class TransformCentralWindowValueProvider(AbstractValueProvider):
def __init__(self, track_name, central_window, val_transformer):
if isinstance(track_name, str):
self.track_name = track_name
else:
self.track_name = track_name.decode('utf-8')
self.central_window = central_window
self.val_transformer = val_transformer
def __call__(self, seqlet):
val = self.get_val(seqlet=seqlet)
return self.val_transformer(val=val)
def get_val(self, seqlet):
flank_to_ignore = int(0.5*(len(seqlet)-self.central_window))
track_values = seqlet[self.track_name]\
.fwd[flank_to_ignore:(len(seqlet)-flank_to_ignore)]
return np.sum(track_values)
def save_hdf5(self, grp):
grp.attrs["class"] = type(self).__name__
grp.attrs["track_name"] = self.track_name
grp.attrs["central_window"] = self.central_window
self.val_transformer.save_hdf5(grp.create_group("val_transformer"))
@classmethod
def from_hdf5(cls, grp):
if isinstance(grp.attrs["track_name"], str):
track_name = grp.attrs["track_name"]
else:
track_name = grp.attrs["track_name"].decode('utf-8')
central_window = grp.attrs["central_window"]
val_transformer = AbstractValTransformer.from_hdf5(
grp["val_transformer"])
return cls(track_name=track_name,
central_window=central_window,
val_transformer=val_transformer)
class AbstractValTransformer(object):
def __call__(self, val):
raise NotImplementedError()
@classmethod
def from_hdf5(cls, grp):
the_class = eval(grp.attrs["class"])
return the_class.from_hdf5(grp)
class AbsPercentileValTransformer(AbstractValTransformer):
def __init__(self, distribution):
self.distribution = np.array(sorted(np.abs(distribution)))
@classmethod
def from_hdf5(cls, grp):
distribution = np.array(grp["distribution"][:])
return cls(distribution=distribution)
def save_hdf5(self, grp):
grp.attrs["class"] = type(self).__name__
grp.create_dataset("distribution", data=self.distribution)
def __call__(self, val):
return np.sign(val)*np.searchsorted(
a=self.distribution,
v=abs(val))/float(len(self.distribution))
class SignedPercentileValTransformer(AbstractValTransformer):
def __init__(self, distribution):
self.distribution = np.array(distribution)
self.pos_dist = np.array(sorted(
[x for x in self.distribution if x > 0]))
self.abs_neg_dist = np.array(sorted(
[abs(x) for x in self.distribution if x < 0]))
@classmethod
def from_hdf5(cls, grp):
distribution = np.array(grp["distribution"][:])
return cls(distribution=distribution)
def save_hdf5(self, grp):
grp.attrs["class"] = type(self).__name__
grp.create_dataset("distribution", data=self.distribution)
def __call__(self, val):
if (val == 0):
return 0
elif (val > 0):
#add 1E-7 for complicated numerical stability issues
# basically need robustness when dealing with ties
return np.searchsorted(
a=self.pos_dist, v=(val+1E-7))/float(len(self.pos_dist))
else:
#add 1E-7 for complicated numerical stability issues
# basically need robustness when dealing with ties
return np.searchsorted(
a=self.abs_neg_dist, v=(abs(val)+1E-7))/float(
len(self.abs_neg_dist))
| 32.676692 | 77 | 0.637598 | from __future__ import division, print_function, absolute_import
import numpy as np
import scipy.stats
class AbstractValueProvider(object):
def __call__(self, seqlet):
raise NotImplementedError()
@classmethod
def from_hdf5(cls, grp):
the_class = eval(grp.attrs["class"])
return the_class.from_hdf5(grp)
class CoorScoreValueProvider(AbstractValueProvider):
def __call__(self, seqlet):
return seqlet.coor.score
def save_hdf5(self, grp):
grp.attrs["class"] = type(self).__name__
@classmethod
def from_hdf5(cls, grp):
return cls()
class TransformCentralWindowValueProvider(AbstractValueProvider):
def __init__(self, track_name, central_window, val_transformer):
if isinstance(track_name, str):
self.track_name = track_name
else:
self.track_name = track_name.decode('utf-8')
self.central_window = central_window
self.val_transformer = val_transformer
def __call__(self, seqlet):
val = self.get_val(seqlet=seqlet)
return self.val_transformer(val=val)
def get_val(self, seqlet):
flank_to_ignore = int(0.5*(len(seqlet)-self.central_window))
track_values = seqlet[self.track_name]\
.fwd[flank_to_ignore:(len(seqlet)-flank_to_ignore)]
return np.sum(track_values)
def save_hdf5(self, grp):
grp.attrs["class"] = type(self).__name__
grp.attrs["track_name"] = self.track_name
grp.attrs["central_window"] = self.central_window
self.val_transformer.save_hdf5(grp.create_group("val_transformer"))
@classmethod
def from_hdf5(cls, grp):
if isinstance(grp.attrs["track_name"], str):
track_name = grp.attrs["track_name"]
else:
track_name = grp.attrs["track_name"].decode('utf-8')
central_window = grp.attrs["central_window"]
val_transformer = AbstractValTransformer.from_hdf5(
grp["val_transformer"])
return cls(track_name=track_name,
central_window=central_window,
val_transformer=val_transformer)
class AbstractValTransformer(object):
def __call__(self, val):
raise NotImplementedError()
@classmethod
def from_hdf5(cls, grp):
the_class = eval(grp.attrs["class"])
return the_class.from_hdf5(grp)
class AbsPercentileValTransformer(AbstractValTransformer):
def __init__(self, distribution):
self.distribution = np.array(sorted(np.abs(distribution)))
@classmethod
def from_hdf5(cls, grp):
distribution = np.array(grp["distribution"][:])
return cls(distribution=distribution)
def save_hdf5(self, grp):
grp.attrs["class"] = type(self).__name__
grp.create_dataset("distribution", data=self.distribution)
def __call__(self, val):
return np.sign(val)*np.searchsorted(
a=self.distribution,
v=abs(val))/float(len(self.distribution))
class SignedPercentileValTransformer(AbstractValTransformer):
def __init__(self, distribution):
self.distribution = np.array(distribution)
self.pos_dist = np.array(sorted(
[x for x in self.distribution if x > 0]))
self.abs_neg_dist = np.array(sorted(
[abs(x) for x in self.distribution if x < 0]))
@classmethod
def from_hdf5(cls, grp):
distribution = np.array(grp["distribution"][:])
return cls(distribution=distribution)
def save_hdf5(self, grp):
grp.attrs["class"] = type(self).__name__
grp.create_dataset("distribution", data=self.distribution)
def __call__(self, val):
if (val == 0):
return 0
elif (val > 0):
return np.searchsorted(
a=self.pos_dist, v=(val+1E-7))/float(len(self.pos_dist))
else:
return np.searchsorted(
a=self.abs_neg_dist, v=(abs(val)+1E-7))/float(
len(self.abs_neg_dist))
| true | true |
f727196220df796339c62b0c3941e771d9d06e76 | 119 | py | Python | model_helpers/flatten.py | FlorianKlemt/pytorch-latent-i2a | 36809bf3adda1fcffaccd27e352b7ad2338060a7 | [
"MIT"
] | 3 | 2019-02-24T07:37:36.000Z | 2020-03-17T16:00:38.000Z | model_helpers/flatten.py | FlorianKlemt/pytorch-latent-i2a | 36809bf3adda1fcffaccd27e352b7ad2338060a7 | [
"MIT"
] | null | null | null | model_helpers/flatten.py | FlorianKlemt/pytorch-latent-i2a | 36809bf3adda1fcffaccd27e352b7ad2338060a7 | [
"MIT"
] | null | null | null | import torch
class Flatten(torch.nn.Module):
def forward(self,input):
return input.view(input.size(0), -1) | 23.8 | 44 | 0.680672 | import torch
class Flatten(torch.nn.Module):
def forward(self,input):
return input.view(input.size(0), -1) | true | true |
f7271973927dc75098169d414d35dcc361007bc5 | 2,078 | py | Python | scripts/data_dir_to_fasta.py | yuzhiguo07/openfold | 5fb0f074066387b9969578b8bf68f7e046c778af | [
"Apache-2.0"
] | 789 | 2021-11-12T16:12:21.000Z | 2022-03-28T05:45:19.000Z | scripts/data_dir_to_fasta.py | yuzhiguo07/openfold | 5fb0f074066387b9969578b8bf68f7e046c778af | [
"Apache-2.0"
] | 84 | 2021-11-12T22:23:50.000Z | 2022-03-29T01:06:06.000Z | scripts/data_dir_to_fasta.py | yuzhiguo07/openfold | 5fb0f074066387b9969578b8bf68f7e046c778af | [
"Apache-2.0"
] | 114 | 2021-11-12T16:00:57.000Z | 2022-03-27T21:32:31.000Z | import argparse
import logging
import os
from openfold.data import mmcif_parsing
from openfold.np import protein, residue_constants
def main(args):
fasta = []
for fname in os.listdir(args.data_dir):
basename, ext = os.path.splitext(fname)
basename = basename.upper()
fpath = os.path.join(args.data_dir, fname)
if(ext == ".cif"):
with open(fpath, 'r') as fp:
mmcif_str = fp.read()
mmcif = mmcif_parsing.parse(
file_id=basename, mmcif_string=mmcif_str
)
if(mmcif.mmcif_object is None):
logging.warning(f'Failed to parse {fname}...')
if(args.raise_errors):
raise list(mmcif.errors.values())[0]
else:
continue
mmcif = mmcif.mmcif_object
for chain, seq in mmcif.chain_to_seqres.items():
chain_id = '_'.join([basename, chain])
fasta.append(f">{chain_id}")
fasta.append(seq)
elif(ext == ".core"):
with open(fpath, 'r') as fp:
core_str = fp.read()
core_protein = protein.from_proteinnet_string(core_str)
aatype = core_protein.aatype
seq = ''.join([
residue_constants.restypes_with_x[aatype[i]]
for i in range(len(aatype))
])
fasta.append(f">{basename}")
fasta.append(seq)
with open(args.output_path, "w") as fp:
fp.write('\n'.join(fasta))
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"data_dir", type=str,
help="Path to a directory containing mmCIF or .core files"
)
parser.add_argument(
"output_path", type=str,
help="Path to output FASTA file"
)
parser.add_argument(
"--raise_errors", type=bool, default=False,
help="Whether to crash on parsing errors"
)
args = parser.parse_args()
main(args)
| 29.685714 | 67 | 0.547161 | import argparse
import logging
import os
from openfold.data import mmcif_parsing
from openfold.np import protein, residue_constants
def main(args):
fasta = []
for fname in os.listdir(args.data_dir):
basename, ext = os.path.splitext(fname)
basename = basename.upper()
fpath = os.path.join(args.data_dir, fname)
if(ext == ".cif"):
with open(fpath, 'r') as fp:
mmcif_str = fp.read()
mmcif = mmcif_parsing.parse(
file_id=basename, mmcif_string=mmcif_str
)
if(mmcif.mmcif_object is None):
logging.warning(f'Failed to parse {fname}...')
if(args.raise_errors):
raise list(mmcif.errors.values())[0]
else:
continue
mmcif = mmcif.mmcif_object
for chain, seq in mmcif.chain_to_seqres.items():
chain_id = '_'.join([basename, chain])
fasta.append(f">{chain_id}")
fasta.append(seq)
elif(ext == ".core"):
with open(fpath, 'r') as fp:
core_str = fp.read()
core_protein = protein.from_proteinnet_string(core_str)
aatype = core_protein.aatype
seq = ''.join([
residue_constants.restypes_with_x[aatype[i]]
for i in range(len(aatype))
])
fasta.append(f">{basename}")
fasta.append(seq)
with open(args.output_path, "w") as fp:
fp.write('\n'.join(fasta))
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"data_dir", type=str,
help="Path to a directory containing mmCIF or .core files"
)
parser.add_argument(
"output_path", type=str,
help="Path to output FASTA file"
)
parser.add_argument(
"--raise_errors", type=bool, default=False,
help="Whether to crash on parsing errors"
)
args = parser.parse_args()
main(args)
| true | true |
f727197bfaf0ad1a02e1a5e39ce0bac083ab567e | 6,741 | py | Python | configs/_base_/models/cascade_mask_rcnn_swin_fpn.py | AminRezaei0x443/Swin-Transformer-Object-Detection | 5376785b9e7b172a1d08cbb87362d5631b47eca9 | [
"Apache-2.0"
] | null | null | null | configs/_base_/models/cascade_mask_rcnn_swin_fpn.py | AminRezaei0x443/Swin-Transformer-Object-Detection | 5376785b9e7b172a1d08cbb87362d5631b47eca9 | [
"Apache-2.0"
] | null | null | null | configs/_base_/models/cascade_mask_rcnn_swin_fpn.py | AminRezaei0x443/Swin-Transformer-Object-Detection | 5376785b9e7b172a1d08cbb87362d5631b47eca9 | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='CascadeRCNN',
pretrained=None,
backbone=dict(
type='SwinTransformer',
embed_dim=96,
depths=[2, 2, 6, 2],
num_heads=[3, 6, 12, 24],
window_size=7,
mlp_ratio=4.,
qkv_bias=True,
qk_scale=None,
drop_rate=0.,
attn_drop_rate=0.,
drop_path_rate=0.2,
ape=False,
patch_norm=True,
out_indices=(0, 1, 2, 3),
use_checkpoint=False),
neck=dict(
type='FPN',
in_channels=[96, 192, 384, 768],
out_channels=256,
num_outs=5),
rpn_head=dict(
type='RPNHead',
in_channels=256,
feat_channels=256,
anchor_generator=dict(
type='AnchorGenerator',
scales=[8],
ratios=[0.5, 1.0, 2.0],
strides=[4, 8, 16, 32, 64]),
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0]),
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
roi_head=dict(
type='CascadeRoIHead',
num_stages=3,
stage_loss_weights=[1, 0.5, 0.25],
bbox_roi_extractor=dict(
type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
out_channels=256,
featmap_strides=[4, 8, 16, 32]),
bbox_head=[
dict(
type='Shared2FCBBoxHead',
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=2,
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2]),
reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0,
loss_weight=1.0)),
dict(
type='Shared2FCBBoxHead',
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=2,
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[0., 0., 0., 0.],
target_stds=[0.05, 0.05, 0.1, 0.1]),
reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0,
loss_weight=1.0)),
dict(
type='Shared2FCBBoxHead',
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=2,
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[0., 0., 0., 0.],
target_stds=[0.033, 0.033, 0.067, 0.067]),
reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0))
],
mask_roi_extractor=None,
mask_head=None),
# model training and testing settings
train_cfg = dict(
rpn=dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.3,
min_pos_iou=0.3,
match_low_quality=True,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=256,
pos_fraction=0.5,
neg_pos_ub=-1,
add_gt_as_proposals=False),
allowed_border=0,
pos_weight=-1,
debug=False),
rpn_proposal=dict(
nms_across_levels=False,
nms_pre=2000,
nms_post=2000,
max_per_img=2000,
nms=dict(type='nms', iou_threshold=0.7),
min_bbox_size=0),
rcnn=[
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.5,
min_pos_iou=0.5,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.6,
neg_iou_thr=0.6,
min_pos_iou=0.6,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.7,
min_pos_iou=0.7,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False)
]),
test_cfg = dict(
rpn=dict(
nms_across_levels=False,
nms_pre=1000,
nms_post=1000,
max_per_img=1000,
nms=dict(type='nms', iou_threshold=0.7),
min_bbox_size=0),
rcnn=dict(
score_thr=0.05,
nms=dict(type='nms', iou_threshold=0.5),
max_per_img=100,
mask_thr_binary=0.5)))
| 34.218274 | 79 | 0.446966 |
model = dict(
type='CascadeRCNN',
pretrained=None,
backbone=dict(
type='SwinTransformer',
embed_dim=96,
depths=[2, 2, 6, 2],
num_heads=[3, 6, 12, 24],
window_size=7,
mlp_ratio=4.,
qkv_bias=True,
qk_scale=None,
drop_rate=0.,
attn_drop_rate=0.,
drop_path_rate=0.2,
ape=False,
patch_norm=True,
out_indices=(0, 1, 2, 3),
use_checkpoint=False),
neck=dict(
type='FPN',
in_channels=[96, 192, 384, 768],
out_channels=256,
num_outs=5),
rpn_head=dict(
type='RPNHead',
in_channels=256,
feat_channels=256,
anchor_generator=dict(
type='AnchorGenerator',
scales=[8],
ratios=[0.5, 1.0, 2.0],
strides=[4, 8, 16, 32, 64]),
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[.0, .0, .0, .0],
target_stds=[1.0, 1.0, 1.0, 1.0]),
loss_cls=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)),
roi_head=dict(
type='CascadeRoIHead',
num_stages=3,
stage_loss_weights=[1, 0.5, 0.25],
bbox_roi_extractor=dict(
type='SingleRoIExtractor',
roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0),
out_channels=256,
featmap_strides=[4, 8, 16, 32]),
bbox_head=[
dict(
type='Shared2FCBBoxHead',
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=2,
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[0., 0., 0., 0.],
target_stds=[0.1, 0.1, 0.2, 0.2]),
reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0,
loss_weight=1.0)),
dict(
type='Shared2FCBBoxHead',
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=2,
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[0., 0., 0., 0.],
target_stds=[0.05, 0.05, 0.1, 0.1]),
reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0,
loss_weight=1.0)),
dict(
type='Shared2FCBBoxHead',
in_channels=256,
fc_out_channels=1024,
roi_feat_size=7,
num_classes=2,
bbox_coder=dict(
type='DeltaXYWHBBoxCoder',
target_means=[0., 0., 0., 0.],
target_stds=[0.033, 0.033, 0.067, 0.067]),
reg_class_agnostic=True,
loss_cls=dict(
type='CrossEntropyLoss',
use_sigmoid=False,
loss_weight=1.0),
loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0))
],
mask_roi_extractor=None,
mask_head=None),
train_cfg = dict(
rpn=dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.3,
min_pos_iou=0.3,
match_low_quality=True,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=256,
pos_fraction=0.5,
neg_pos_ub=-1,
add_gt_as_proposals=False),
allowed_border=0,
pos_weight=-1,
debug=False),
rpn_proposal=dict(
nms_across_levels=False,
nms_pre=2000,
nms_post=2000,
max_per_img=2000,
nms=dict(type='nms', iou_threshold=0.7),
min_bbox_size=0),
rcnn=[
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.5,
min_pos_iou=0.5,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.6,
neg_iou_thr=0.6,
min_pos_iou=0.6,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False),
dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.7,
neg_iou_thr=0.7,
min_pos_iou=0.7,
match_low_quality=False,
ignore_iof_thr=-1),
sampler=dict(
type='RandomSampler',
num=512,
pos_fraction=0.25,
neg_pos_ub=-1,
add_gt_as_proposals=True),
mask_size=28,
pos_weight=-1,
debug=False)
]),
test_cfg = dict(
rpn=dict(
nms_across_levels=False,
nms_pre=1000,
nms_post=1000,
max_per_img=1000,
nms=dict(type='nms', iou_threshold=0.7),
min_bbox_size=0),
rcnn=dict(
score_thr=0.05,
nms=dict(type='nms', iou_threshold=0.5),
max_per_img=100,
mask_thr_binary=0.5)))
| true | true |
f7271afaec979ef8020208ff603d1aed3f64fd7f | 7,132 | py | Python | backend/src/services/asr/iflytek_asr.py | didi/MeetDot | a57009d30c1347a9b85950c2e02b77685ce63952 | [
"Apache-2.0"
] | 6 | 2021-09-23T14:53:58.000Z | 2022-02-18T10:14:17.000Z | backend/src/services/asr/iflytek_asr.py | didi/MeetDot | a57009d30c1347a9b85950c2e02b77685ce63952 | [
"Apache-2.0"
] | null | null | null | backend/src/services/asr/iflytek_asr.py | didi/MeetDot | a57009d30c1347a9b85950c2e02b77685ce63952 | [
"Apache-2.0"
] | 1 | 2021-09-24T02:48:50.000Z | 2021-09-24T02:48:50.000Z | """
iflytek stream ASR service class (using WebSocket)
"""
import gevent
import os
from .interface import (
SpeechRecognitionConfig,
SpeechRecognitionRequest,
SpeechRecognitionResponse,
)
from .stream_asr import StreamAsr
from ..tokenizer import Tokenizer
import sys
import hashlib
from hashlib import sha1
import hmac
import base64
import json
import time
from websocket import create_connection
import websocket
from urllib.parse import quote
import logging
import queue
import re
"""
If you want to use iFlytek ASR service, copy your credentials into .env file under repo dir.
IFLYTEK_URL="XXX"
IFLYTEK_API_ID="XXX"
IFLYTEK_API_KEY="XXX"
"""
# iFlytek ASR use different language codes, mapping languages in our systems to iflytek's.
LANGUAGE_CODE_MAPPING = {"zh": "cn", "en-US": "en"}
class IFlyTekAsr(StreamAsr):
SUPPORTED_LANGUAGES = ("en-US", "zh")
POLLING_INTERVAL = 0.1 # seconds
def __init__(self, config: SpeechRecognitionConfig, logger, callback_fn):
super(IFlyTekAsr, self).__init__(config, logger, callback_fn)
self.start_time = time.time()
self.base_url: str = os.getenv("IFLYTEK_URL", "")
self.api_id = os.getenv("IFLYTEK_API_ID", "")
self.api_key = os.getenv("IFLYTEK_API_KEY", "")
self.init_timestamp = str(int(time.time()))
self.pd = "edu" # ASR domain
self.end_tag = '{"end": true}'
self.got_final = False
self.signa = self._get_signature()
self.lang_code = LANGUAGE_CODE_MAPPING[self.user_language]
# TODO: self.tokenizer does not support on-the-fly language switch.
self.tokenizer = Tokenizer(lang=self.user_language)
self.semaphore = gevent.lock.Semaphore()
self.connect()
def connect(self):
try:
self.ws = create_connection(
self.base_url
+ "?appid="
+ self.api_id
+ "&ts="
+ self.init_timestamp
+ "&signa="
+ quote(self.signa)
+ "&lang="
+ quote(self.lang_code)
)
except ConnectionRefusedError:
raise ConnectionRefusedError(
f"Could not connect to iflytek ASR server at {self.base_url} - is it running?"
)
with self.semaphore:
self.ws.send("")
def _get_signature(self):
tt = (self.api_id + self.init_timestamp).encode("utf-8")
md5 = hashlib.md5()
md5.update(tt)
baseString = md5.hexdigest()
baseString = bytes(baseString, encoding="utf-8")
apiKey = self.api_key.encode("utf-8")
signa = hmac.new(apiKey, baseString, hashlib.sha1).digest()
signa = base64.b64encode(signa)
signa = str(signa, "utf-8")
return signa
def run(self):
if not self.ws.connected:
self.connect()
while self.ws.connected:
try:
api_response = str(self.ws.recv())
except websocket.WebSocketConnectionClosedException:
print("receive result end")
break
if len(api_response) == 0:
self.got_final = True
break
api_response = json.loads(api_response)
response_code = int(api_response["code"])
if response_code != 0:
self.logger.error(f"ASR Response Error code: {response_code}")
continue
data = api_response["data"]
if api_response["action"] == "result":
data = json.loads(data)
pure_words_list = [
i["cw"][0]["w"] for i in data["cn"]["st"]["rt"][0]["ws"]
]
# 0-final result; 1-intermediate result
utterance_is_final = int(data["cn"]["st"]["type"]) == 0
if utterance_is_final:
self.got_final = True
response = SpeechRecognitionResponse(
transcript=self._build_transcript(tokens=pure_words_list),
relative_time_offset=time.time() - self.start_time,
is_final=utterance_is_final,
language=LANGUAGE_CODE_MAPPING[self.detected_language],
)
self.callback_fn(self.last_request, response)
gevent.sleep(IFlyTekAsr.POLLING_INTERVAL)
def __call__(self, request: SpeechRecognitionRequest) -> None:
self.last_request = request
data = request.chunk
self._send_chunk(data)
def end_utterance(self):
# Send special end of stream message
self._send_chunk(bytes(self.end_tag.encode("utf-8")))
def terminate(self, wait_for_final=True):
self.end_utterance()
if wait_for_final:
self.wait_for_final()
self.ws.close()
def wait_for_final(self, timeout_seconds=2.0):
"""
After closing, wait until the final response is sent, up to a timeout
"""
q = queue.Queue()
original_callback = self.callback_fn
def wrapped_callback(request, response):
if response.is_final:
q.put(response)
original_callback(request, response)
self.callback_fn = wrapped_callback
try:
final_response = q.get(timeout=timeout_seconds)
except queue.Empty:
final_response = SpeechRecognitionResponse(
transcript="",
relative_time_offset=0,
is_final=True,
language=self.detected_language,
)
self.callback_fn = original_callback
while not self.got_final:
gevent.sleep(0.01)
return final_response
def _build_transcript(self, tokens: list):
raw_transcript = self.tokenizer.detokenize(tokens)
transcript = self.postprocess(raw_transcript)
return transcript
def postprocess(self, text):
# Remove filler words
word_delimiter = "" if self.config.language == "zh" else " "
filler_words = ("mhm", "uh", "um")
text = word_delimiter.join(
w for w in text.strip().split() if w not in filler_words
)
# Remove content in parenthesis: {}, <>, [], and ()
text = re.sub(r"[<{\(\[].*?[\)\]>}]", "", text.strip())
# Fix acronyms
text = text.replace("._", ".")
# Remove leading and trailing whitespace
text = text.strip()
if self.config.language == "zh":
# Remove spaces, speaker ID in chinese
text = text.replace("[SPK]", "")
text = text.replace(" ", "")
else:
if text:
text = text[0].capitalize() + text[1:]
text = re.sub(r"\bi\b", "I", text)
return text
def _send_chunk(self, data):
try:
self.ws.send(data)
except websocket.WebSocketConnectionClosedException:
self.logger.warning(
"WebSocketConnectionClosedException: socket is already closed."
)
| 31.982063 | 94 | 0.580342 | import gevent
import os
from .interface import (
SpeechRecognitionConfig,
SpeechRecognitionRequest,
SpeechRecognitionResponse,
)
from .stream_asr import StreamAsr
from ..tokenizer import Tokenizer
import sys
import hashlib
from hashlib import sha1
import hmac
import base64
import json
import time
from websocket import create_connection
import websocket
from urllib.parse import quote
import logging
import queue
import re
LANGUAGE_CODE_MAPPING = {"zh": "cn", "en-US": "en"}
class IFlyTekAsr(StreamAsr):
SUPPORTED_LANGUAGES = ("en-US", "zh")
POLLING_INTERVAL = 0.1 # seconds
def __init__(self, config: SpeechRecognitionConfig, logger, callback_fn):
super(IFlyTekAsr, self).__init__(config, logger, callback_fn)
self.start_time = time.time()
self.base_url: str = os.getenv("IFLYTEK_URL", "")
self.api_id = os.getenv("IFLYTEK_API_ID", "")
self.api_key = os.getenv("IFLYTEK_API_KEY", "")
self.init_timestamp = str(int(time.time()))
self.pd = "edu" # ASR domain
self.end_tag = '{"end": true}'
self.got_final = False
self.signa = self._get_signature()
self.lang_code = LANGUAGE_CODE_MAPPING[self.user_language]
# TODO: self.tokenizer does not support on-the-fly language switch.
self.tokenizer = Tokenizer(lang=self.user_language)
self.semaphore = gevent.lock.Semaphore()
self.connect()
def connect(self):
try:
self.ws = create_connection(
self.base_url
+ "?appid="
+ self.api_id
+ "&ts="
+ self.init_timestamp
+ "&signa="
+ quote(self.signa)
+ "&lang="
+ quote(self.lang_code)
)
except ConnectionRefusedError:
raise ConnectionRefusedError(
f"Could not connect to iflytek ASR server at {self.base_url} - is it running?"
)
with self.semaphore:
self.ws.send("")
def _get_signature(self):
tt = (self.api_id + self.init_timestamp).encode("utf-8")
md5 = hashlib.md5()
md5.update(tt)
baseString = md5.hexdigest()
baseString = bytes(baseString, encoding="utf-8")
apiKey = self.api_key.encode("utf-8")
signa = hmac.new(apiKey, baseString, hashlib.sha1).digest()
signa = base64.b64encode(signa)
signa = str(signa, "utf-8")
return signa
def run(self):
if not self.ws.connected:
self.connect()
while self.ws.connected:
try:
api_response = str(self.ws.recv())
except websocket.WebSocketConnectionClosedException:
print("receive result end")
break
if len(api_response) == 0:
self.got_final = True
break
api_response = json.loads(api_response)
response_code = int(api_response["code"])
if response_code != 0:
self.logger.error(f"ASR Response Error code: {response_code}")
continue
data = api_response["data"]
if api_response["action"] == "result":
data = json.loads(data)
pure_words_list = [
i["cw"][0]["w"] for i in data["cn"]["st"]["rt"][0]["ws"]
]
# 0-final result; 1-intermediate result
utterance_is_final = int(data["cn"]["st"]["type"]) == 0
if utterance_is_final:
self.got_final = True
response = SpeechRecognitionResponse(
transcript=self._build_transcript(tokens=pure_words_list),
relative_time_offset=time.time() - self.start_time,
is_final=utterance_is_final,
language=LANGUAGE_CODE_MAPPING[self.detected_language],
)
self.callback_fn(self.last_request, response)
gevent.sleep(IFlyTekAsr.POLLING_INTERVAL)
def __call__(self, request: SpeechRecognitionRequest) -> None:
self.last_request = request
data = request.chunk
self._send_chunk(data)
def end_utterance(self):
# Send special end of stream message
self._send_chunk(bytes(self.end_tag.encode("utf-8")))
def terminate(self, wait_for_final=True):
self.end_utterance()
if wait_for_final:
self.wait_for_final()
self.ws.close()
def wait_for_final(self, timeout_seconds=2.0):
q = queue.Queue()
original_callback = self.callback_fn
def wrapped_callback(request, response):
if response.is_final:
q.put(response)
original_callback(request, response)
self.callback_fn = wrapped_callback
try:
final_response = q.get(timeout=timeout_seconds)
except queue.Empty:
final_response = SpeechRecognitionResponse(
transcript="",
relative_time_offset=0,
is_final=True,
language=self.detected_language,
)
self.callback_fn = original_callback
while not self.got_final:
gevent.sleep(0.01)
return final_response
def _build_transcript(self, tokens: list):
raw_transcript = self.tokenizer.detokenize(tokens)
transcript = self.postprocess(raw_transcript)
return transcript
def postprocess(self, text):
# Remove filler words
word_delimiter = "" if self.config.language == "zh" else " "
filler_words = ("mhm", "uh", "um")
text = word_delimiter.join(
w for w in text.strip().split() if w not in filler_words
)
# Remove content in parenthesis: {}, <>, [], and ()
text = re.sub(r"[<{\(\[].*?[\)\]>}]", "", text.strip())
# Fix acronyms
text = text.replace("._", ".")
# Remove leading and trailing whitespace
text = text.strip()
if self.config.language == "zh":
# Remove spaces, speaker ID in chinese
text = text.replace("[SPK]", "")
text = text.replace(" ", "")
else:
if text:
text = text[0].capitalize() + text[1:]
text = re.sub(r"\bi\b", "I", text)
return text
def _send_chunk(self, data):
try:
self.ws.send(data)
except websocket.WebSocketConnectionClosedException:
self.logger.warning(
"WebSocketConnectionClosedException: socket is already closed."
)
| true | true |
f7271b097f49a4ac7e244128ea6b6cecfc86fd93 | 1,008 | py | Python | api/celery/worker/config.py | keitaroinc/spodeli-novosti | f74d4658f2df02536c0cc05e60ade4c2fd7efeac | [
"BSD-2-Clause"
] | 1 | 2018-06-07T09:21:28.000Z | 2018-06-07T09:21:28.000Z | api/celery/worker/config.py | keitaroinc/spodeli-novosti | f74d4658f2df02536c0cc05e60ade4c2fd7efeac | [
"BSD-2-Clause"
] | null | null | null | api/celery/worker/config.py | keitaroinc/spodeli-novosti | f74d4658f2df02536c0cc05e60ade4c2fd7efeac | [
"BSD-2-Clause"
] | 1 | 2018-06-07T09:21:31.000Z | 2018-06-07T09:21:31.000Z | # -*-coding:utf-8-*-
import os
class BaseConfig(object):
"""Base configuration."""
DEBUG = True
BROKER_URL = os.getenv('BROKER_URL', 'amqp://guest:guest@localhost:5672/')
BROKER_POOL_LIMIT = os.getenv('BROKER_POOL_LIMIT', None)
CELERY_ENABLE_UTC = True
CELERY_TIMEZONE = os.getenv('CELERY_TIMEZONE', 'UTC')
CELERYD_CONCURRENCY = os.getenv('CELERYD_CONCURRENCY', 20)
SMTP_SERVER = os.getenv('SMTP_SERVER', None)
SMTP_SERVER_USER = os.getenv('SMTP_SERVER_USER', None)
SMTP_SERVER_PASSWORD = os.getenv('SMTP_SERVER_PASSWORD', None)
SMTP_SERVER_PORT = os.getenv('SMTP_SERVER_PORT', None)
FROM_EMAIL = os.getenv('FROM_EMAIL', 'info@keitaro.com')
FROM_NAME = os.getenv('FROM_NAME', 'root')
class DevelopmentConfig(BaseConfig):
"""Development configuration."""
DEBUG = True
class TestingConfig(BaseConfig):
"""Testing configuration."""
DEBUG = False
class ProductionConfig(BaseConfig):
"""Production configuration."""
DEBUG = False
| 30.545455 | 78 | 0.703373 |
import os
class BaseConfig(object):
DEBUG = True
BROKER_URL = os.getenv('BROKER_URL', 'amqp://guest:guest@localhost:5672/')
BROKER_POOL_LIMIT = os.getenv('BROKER_POOL_LIMIT', None)
CELERY_ENABLE_UTC = True
CELERY_TIMEZONE = os.getenv('CELERY_TIMEZONE', 'UTC')
CELERYD_CONCURRENCY = os.getenv('CELERYD_CONCURRENCY', 20)
SMTP_SERVER = os.getenv('SMTP_SERVER', None)
SMTP_SERVER_USER = os.getenv('SMTP_SERVER_USER', None)
SMTP_SERVER_PASSWORD = os.getenv('SMTP_SERVER_PASSWORD', None)
SMTP_SERVER_PORT = os.getenv('SMTP_SERVER_PORT', None)
FROM_EMAIL = os.getenv('FROM_EMAIL', 'info@keitaro.com')
FROM_NAME = os.getenv('FROM_NAME', 'root')
class DevelopmentConfig(BaseConfig):
DEBUG = True
class TestingConfig(BaseConfig):
DEBUG = False
class ProductionConfig(BaseConfig):
DEBUG = False
| true | true |
f7271c70df3a4e2a5327a3da3f3419e8bf553154 | 71 | py | Python | ModelHelper/__init__.py | yasarc4/Auto_time_series | 5a9aa5c535fbe09a4cc59e44124a5de435ac5059 | [
"MIT"
] | 7 | 2018-06-18T20:14:30.000Z | 2019-05-24T08:21:52.000Z | ModelHelper/__init__.py | yasarc4/Auto_time_series | 5a9aa5c535fbe09a4cc59e44124a5de435ac5059 | [
"MIT"
] | null | null | null | ModelHelper/__init__.py | yasarc4/Auto_time_series | 5a9aa5c535fbe09a4cc59e44124a5de435ac5059 | [
"MIT"
] | 1 | 2019-06-08T18:20:57.000Z | 2019-06-08T18:20:57.000Z | from .prophet_helper import ProphetHelper
__all__ = ['ProphetHelper']
| 17.75 | 41 | 0.802817 | from .prophet_helper import ProphetHelper
__all__ = ['ProphetHelper']
| true | true |
f7271cc4b96db4c6911f4848e194d1acf37f4ccd | 9,988 | py | Python | spyder/widgets/ipythonconsole/shell.py | computeVision/spyder | 0a71273e0a1bad8fb9812ee8054c0a2711a6178e | [
"MIT"
] | null | null | null | spyder/widgets/ipythonconsole/shell.py | computeVision/spyder | 0a71273e0a1bad8fb9812ee8054c0a2711a6178e | [
"MIT"
] | null | null | null | spyder/widgets/ipythonconsole/shell.py | computeVision/spyder | 0a71273e0a1bad8fb9812ee8054c0a2711a6178e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
"""
Shell Widget for the IPython Console
"""
import ast
import uuid
from qtpy.QtCore import Signal
from qtpy.QtWidgets import QMessageBox
from spyder.config.base import _
from spyder.config.gui import config_shortcut, fixed_shortcut
from spyder.py3compat import to_text_string
from spyder.utils import programs
from spyder.widgets.arraybuilder import SHORTCUT_INLINE, SHORTCUT_TABLE
from spyder.widgets.ipythonconsole import (ControlWidget, DebuggingWidget,
HelpWidget, NamepaceBrowserWidget,
PageControlWidget)
class ShellWidget(NamepaceBrowserWidget, HelpWidget, DebuggingWidget):
"""
Shell widget for the IPython Console
This is the widget in charge of executing code
"""
# NOTE: Signals can't be assigned separately to each widget
# That's why we define all needed signals here.
# For NamepaceBrowserWidget
sig_namespace_view = Signal(object)
sig_var_properties = Signal(object)
# For DebuggingWidget
sig_input_reply = Signal()
sig_pdb_step = Signal(str, int)
sig_prompt_ready = Signal()
# For ShellWidget
focus_changed = Signal()
new_client = Signal()
sig_got_reply = Signal()
def __init__(self, additional_options, interpreter_versions,
external_kernel, *args, **kw):
# To override the Qt widget used by RichJupyterWidget
self.custom_control = ControlWidget
self.custom_page_control = PageControlWidget
super(ShellWidget, self).__init__(*args, **kw)
self.additional_options = additional_options
self.interpreter_versions = interpreter_versions
self.set_background_color()
# Additional variables
self.ipyclient = None
self.external_kernel = external_kernel
# Keyboard shortcuts
self.shortcuts = self.create_shortcuts()
# To save kernel replies in silent execution
self._kernel_reply = None
#---- Public API ----------------------------------------------------------
def set_ipyclient(self, ipyclient):
"""Bind this shell widget to an IPython client one"""
self.ipyclient = ipyclient
self.exit_requested.connect(ipyclient.exit_callback)
def is_running(self):
if self.kernel_client is not None and \
self.kernel_client.channels_running:
return True
else:
return False
# --- To handle the banner
def long_banner(self):
"""Banner for IPython widgets with pylab message"""
# Default banner
from IPython.core.usage import quick_guide
banner_parts = [
'Python %s\n' % self.interpreter_versions['python_version'],
'Type "copyright", "credits" or "license" for more information.\n\n',
'IPython %s -- An enhanced Interactive Python.\n' % \
self.interpreter_versions['ipython_version'],
quick_guide
]
banner = ''.join(banner_parts)
# Pylab additions
pylab_o = self.additional_options['pylab']
autoload_pylab_o = self.additional_options['autoload_pylab']
mpl_installed = programs.is_module_installed('matplotlib')
if mpl_installed and (pylab_o and autoload_pylab_o):
pylab_message = ("\nPopulating the interactive namespace from "
"numpy and matplotlib")
banner = banner + pylab_message
# Sympy additions
sympy_o = self.additional_options['sympy']
if sympy_o:
lines = """
These commands were executed:
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = symbols('f g h', cls=Function)
"""
banner = banner + lines
return banner
def short_banner(self):
"""Short banner with Python and QtConsole versions"""
banner = 'Python %s -- IPython %s' % (
self.interpreter_versions['python_version'],
self.interpreter_versions['ipython_version'])
return banner
# --- To define additional shortcuts
def clear_console(self):
self.execute("%clear")
def reset_namespace(self):
"""Resets the namespace by removing all names defined by the user"""
reply = QMessageBox.question(
self,
_("Reset IPython namespace"),
_("All user-defined variables will be removed."
"<br>Are you sure you want to reset the namespace?"),
QMessageBox.Yes | QMessageBox.No,
)
if reply == QMessageBox.Yes:
self.execute("%reset -f")
def set_background_color(self):
light_color_o = self.additional_options['light_color']
if not light_color_o:
self.set_default_style(colors='linux')
def create_shortcuts(self):
inspect = config_shortcut(self._control.inspect_current_object,
context='Console', name='Inspect current object',
parent=self)
clear_console = config_shortcut(self.clear_console, context='Console',
name='Clear shell', parent=self)
# Fixed shortcuts
fixed_shortcut("Ctrl+T", self, lambda: self.new_client.emit())
fixed_shortcut("Ctrl+Alt+R", self, lambda: self.reset_namespace())
fixed_shortcut(SHORTCUT_INLINE, self,
lambda: self._control.enter_array_inline())
fixed_shortcut(SHORTCUT_TABLE, self,
lambda: self._control.enter_array_table())
return [inspect, clear_console]
# --- To communicate with the kernel
def silent_execute(self, code):
"""Execute code in the kernel without increasing the prompt"""
self.kernel_client.execute(to_text_string(code), silent=True)
def silent_exec_method(self, code):
"""Silently execute a kernel method and save its reply
The methods passed here **don't** involve getting the value
of a variable but instead replies that can be handled by
ast.literal_eval.
To get a value see `get_value`
Parameters
----------
code : string
Code that contains the kernel method as part of its
string
See Also
--------
handle_exec_method : Method that deals with the reply
Note
----
This is based on the _silent_exec_callback method of
RichJupyterWidget. Therefore this is licensed BSD
"""
# Generate uuid, which would be used as an indication of whether or
# not the unique request originated from here
local_uuid = to_text_string(uuid.uuid1())
code = to_text_string(code)
msg_id = self.kernel_client.execute('', silent=True,
user_expressions={ local_uuid:code })
self._kernel_methods[local_uuid] = code
self._request_info['execute'][msg_id] = self._ExecutionRequest(msg_id,
'silent_exec_method')
def handle_exec_method(self, msg):
"""
Handle data returned by silent executions of kernel methods
This is based on the _handle_exec_callback of RichJupyterWidget.
Therefore this is licensed BSD.
"""
user_exp = msg['content'].get('user_expressions')
if not user_exp:
return
for expression in user_exp:
if expression in self._kernel_methods:
# Process kernel reply
method = self._kernel_methods[expression]
reply = user_exp[expression]
data = reply.get('data')
if 'get_namespace_view' in method:
view = ast.literal_eval(data['text/plain'])
self.sig_namespace_view.emit(view)
elif 'get_var_properties' in method:
properties = ast.literal_eval(data['text/plain'])
self.sig_var_properties.emit(properties)
else:
if data is not None:
self._kernel_reply = ast.literal_eval(data['text/plain'])
else:
self._kernel_reply = None
self.sig_got_reply.emit()
# Remove method after being processed
self._kernel_methods.pop(expression)
#---- Private methods (overrode by us) ---------------------------------
def _context_menu_make(self, pos):
"""Reimplement the IPython context menu"""
menu = super(ShellWidget, self)._context_menu_make(pos)
return self.ipyclient.add_actions_to_context_menu(menu)
def _banner_default(self):
"""
Reimplement banner creation to let the user decide if he wants a
banner or not
"""
# Don't change banner for external kernels
if self.external_kernel:
return ''
show_banner_o = self.additional_options['show_banner']
if show_banner_o:
return self.long_banner()
else:
return self.short_banner()
#---- Qt methods ----------------------------------------------------------
def focusInEvent(self, event):
"""Reimplement Qt method to send focus change notification"""
self.focus_changed.emit()
return super(ShellWidget, self).focusInEvent(event)
def focusOutEvent(self, event):
"""Reimplement Qt method to send focus change notification"""
self.focus_changed.emit()
return super(ShellWidget, self).focusOutEvent(event)
| 37.130112 | 83 | 0.605527 |
import ast
import uuid
from qtpy.QtCore import Signal
from qtpy.QtWidgets import QMessageBox
from spyder.config.base import _
from spyder.config.gui import config_shortcut, fixed_shortcut
from spyder.py3compat import to_text_string
from spyder.utils import programs
from spyder.widgets.arraybuilder import SHORTCUT_INLINE, SHORTCUT_TABLE
from spyder.widgets.ipythonconsole import (ControlWidget, DebuggingWidget,
HelpWidget, NamepaceBrowserWidget,
PageControlWidget)
class ShellWidget(NamepaceBrowserWidget, HelpWidget, DebuggingWidget):
# That's why we define all needed signals here.
sig_namespace_view = Signal(object)
sig_var_properties = Signal(object)
sig_input_reply = Signal()
sig_pdb_step = Signal(str, int)
sig_prompt_ready = Signal()
focus_changed = Signal()
new_client = Signal()
sig_got_reply = Signal()
def __init__(self, additional_options, interpreter_versions,
external_kernel, *args, **kw):
self.custom_control = ControlWidget
self.custom_page_control = PageControlWidget
super(ShellWidget, self).__init__(*args, **kw)
self.additional_options = additional_options
self.interpreter_versions = interpreter_versions
self.set_background_color()
self.ipyclient = None
self.external_kernel = external_kernel
self.shortcuts = self.create_shortcuts()
self._kernel_reply = None
def set_ipyclient(self, ipyclient):
self.ipyclient = ipyclient
self.exit_requested.connect(ipyclient.exit_callback)
def is_running(self):
if self.kernel_client is not None and \
self.kernel_client.channels_running:
return True
else:
return False
def long_banner(self):
from IPython.core.usage import quick_guide
banner_parts = [
'Python %s\n' % self.interpreter_versions['python_version'],
'Type "copyright", "credits" or "license" for more information.\n\n',
'IPython %s -- An enhanced Interactive Python.\n' % \
self.interpreter_versions['ipython_version'],
quick_guide
]
banner = ''.join(banner_parts)
pylab_o = self.additional_options['pylab']
autoload_pylab_o = self.additional_options['autoload_pylab']
mpl_installed = programs.is_module_installed('matplotlib')
if mpl_installed and (pylab_o and autoload_pylab_o):
pylab_message = ("\nPopulating the interactive namespace from "
"numpy and matplotlib")
banner = banner + pylab_message
sympy_o = self.additional_options['sympy']
if sympy_o:
lines = """
These commands were executed:
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = symbols('f g h', cls=Function)
"""
banner = banner + lines
return banner
def short_banner(self):
banner = 'Python %s -- IPython %s' % (
self.interpreter_versions['python_version'],
self.interpreter_versions['ipython_version'])
return banner
def clear_console(self):
self.execute("%clear")
def reset_namespace(self):
reply = QMessageBox.question(
self,
_("Reset IPython namespace"),
_("All user-defined variables will be removed."
"<br>Are you sure you want to reset the namespace?"),
QMessageBox.Yes | QMessageBox.No,
)
if reply == QMessageBox.Yes:
self.execute("%reset -f")
def set_background_color(self):
light_color_o = self.additional_options['light_color']
if not light_color_o:
self.set_default_style(colors='linux')
def create_shortcuts(self):
inspect = config_shortcut(self._control.inspect_current_object,
context='Console', name='Inspect current object',
parent=self)
clear_console = config_shortcut(self.clear_console, context='Console',
name='Clear shell', parent=self)
fixed_shortcut("Ctrl+T", self, lambda: self.new_client.emit())
fixed_shortcut("Ctrl+Alt+R", self, lambda: self.reset_namespace())
fixed_shortcut(SHORTCUT_INLINE, self,
lambda: self._control.enter_array_inline())
fixed_shortcut(SHORTCUT_TABLE, self,
lambda: self._control.enter_array_table())
return [inspect, clear_console]
def silent_execute(self, code):
self.kernel_client.execute(to_text_string(code), silent=True)
def silent_exec_method(self, code):
local_uuid = to_text_string(uuid.uuid1())
code = to_text_string(code)
msg_id = self.kernel_client.execute('', silent=True,
user_expressions={ local_uuid:code })
self._kernel_methods[local_uuid] = code
self._request_info['execute'][msg_id] = self._ExecutionRequest(msg_id,
'silent_exec_method')
def handle_exec_method(self, msg):
user_exp = msg['content'].get('user_expressions')
if not user_exp:
return
for expression in user_exp:
if expression in self._kernel_methods:
method = self._kernel_methods[expression]
reply = user_exp[expression]
data = reply.get('data')
if 'get_namespace_view' in method:
view = ast.literal_eval(data['text/plain'])
self.sig_namespace_view.emit(view)
elif 'get_var_properties' in method:
properties = ast.literal_eval(data['text/plain'])
self.sig_var_properties.emit(properties)
else:
if data is not None:
self._kernel_reply = ast.literal_eval(data['text/plain'])
else:
self._kernel_reply = None
self.sig_got_reply.emit()
self._kernel_methods.pop(expression)
def _context_menu_make(self, pos):
menu = super(ShellWidget, self)._context_menu_make(pos)
return self.ipyclient.add_actions_to_context_menu(menu)
def _banner_default(self):
if self.external_kernel:
return ''
show_banner_o = self.additional_options['show_banner']
if show_banner_o:
return self.long_banner()
else:
return self.short_banner()
#---- Qt methods ----------------------------------------------------------
def focusInEvent(self, event):
self.focus_changed.emit()
return super(ShellWidget, self).focusInEvent(event)
def focusOutEvent(self, event):
self.focus_changed.emit()
return super(ShellWidget, self).focusOutEvent(event)
| true | true |
f7271cf5c26369051323e3140d6893796b0e8cba | 1,752 | py | Python | macarico/actors/bow.py | bgalbraith/macarico | 448e3e7f088dde0f4eb016fbdee857221b9523fb | [
"MIT"
] | 121 | 2019-04-09T15:44:26.000Z | 2022-03-29T19:56:19.000Z | macarico/actors/bow.py | bgalbraith/macarico | 448e3e7f088dde0f4eb016fbdee857221b9523fb | [
"MIT"
] | 1 | 2019-04-10T16:07:04.000Z | 2019-05-09T00:41:19.000Z | macarico/actors/bow.py | bgalbraith/macarico | 448e3e7f088dde0f4eb016fbdee857221b9523fb | [
"MIT"
] | 11 | 2019-04-09T16:13:34.000Z | 2019-09-30T23:31:14.000Z | from __future__ import division, generators, print_function
import torch
import torch.nn as nn
import macarico
import macarico.util as util
from macarico.util import Var, Varng
class BOWActor(macarico.Actor):
def __init__(self, attention, n_actions, act_history_length=1, obs_history_length=0):
self.att_dim = sum((att.dim for att in attention))
super().__init__(n_actions,
self.att_dim +
act_history_length * n_actions + \
obs_history_length * self.att_dim,
attention)
self.act_history_length = act_history_length
self.obs_history_length = obs_history_length
self._reset()
def _forward(self, state, x):
feats = x[:]
if self.act_history_length > 0:
f = util.zeros(self, 1, self.act_history_length * self.n_actions)
for i in range(min(self.act_history_length, len(state._trajectory))):
a = state._trajectory[-i]
f[0, i * self.n_actions + a] = 1
feats.append(Varng(f))
if self.obs_history_length > 0:
for i in range(self.obs_history_length):
feats.append(Varng(self.obs_history[(self.obs_history_pos+i) % self.obs_history_length]))
# update history
self.obs_history[self.obs_history_pos] = torch.cat(x, dim=1).data
self.obs_history_pos = (self.obs_history_pos + 1) % self.obs_history_length
return torch.cat(feats, dim=1)
def _reset(self):
self.obs_history = []
for _ in range(self.obs_history_length):
self.obs_history.append(util.zeros(self, 1, self.att_dim))
self.obs_history_pos = 0
| 39.818182 | 105 | 0.619863 | from __future__ import division, generators, print_function
import torch
import torch.nn as nn
import macarico
import macarico.util as util
from macarico.util import Var, Varng
class BOWActor(macarico.Actor):
def __init__(self, attention, n_actions, act_history_length=1, obs_history_length=0):
self.att_dim = sum((att.dim for att in attention))
super().__init__(n_actions,
self.att_dim +
act_history_length * n_actions + \
obs_history_length * self.att_dim,
attention)
self.act_history_length = act_history_length
self.obs_history_length = obs_history_length
self._reset()
def _forward(self, state, x):
feats = x[:]
if self.act_history_length > 0:
f = util.zeros(self, 1, self.act_history_length * self.n_actions)
for i in range(min(self.act_history_length, len(state._trajectory))):
a = state._trajectory[-i]
f[0, i * self.n_actions + a] = 1
feats.append(Varng(f))
if self.obs_history_length > 0:
for i in range(self.obs_history_length):
feats.append(Varng(self.obs_history[(self.obs_history_pos+i) % self.obs_history_length]))
self.obs_history[self.obs_history_pos] = torch.cat(x, dim=1).data
self.obs_history_pos = (self.obs_history_pos + 1) % self.obs_history_length
return torch.cat(feats, dim=1)
def _reset(self):
self.obs_history = []
for _ in range(self.obs_history_length):
self.obs_history.append(util.zeros(self, 1, self.att_dim))
self.obs_history_pos = 0
| true | true |
f7271d2609206d32d2b77afed5f598fa29a5e6b0 | 1,463 | py | Python | api/v2/serializers/details/project_volume.py | simpsonw/atmosphere | 3a5203ef0b563de3a0e8c8c8715df88186532d7a | [
"BSD-3-Clause"
] | 197 | 2016-12-08T02:33:32.000Z | 2022-03-23T14:27:47.000Z | api/v2/serializers/details/project_volume.py | simpsonw/atmosphere | 3a5203ef0b563de3a0e8c8c8715df88186532d7a | [
"BSD-3-Clause"
] | 385 | 2017-01-03T22:51:46.000Z | 2020-12-16T16:20:42.000Z | api/v2/serializers/details/project_volume.py | benlazarine/atmosphere | 38fad8e4002e510e8b4294f2bb5bc75e8e1817fa | [
"BSD-3-Clause"
] | 50 | 2016-12-08T08:32:25.000Z | 2021-12-10T00:21:39.000Z | from core.models import Project, Volume
from rest_framework import serializers
from api.v2.serializers.summaries import ProjectSummarySerializer
from .volume import VolumeSerializer
class ProjectRelatedField(serializers.PrimaryKeyRelatedField):
def get_queryset(self):
return Project.objects.all()
def to_representation(self, value):
project = Project.objects.get(pk=value.pk)
serializer = ProjectSummarySerializer(project, context=self.context)
return serializer.data
class VolumeRelatedField(serializers.PrimaryKeyRelatedField):
def get_queryset(self):
return Volume.objects.all()
def to_representation(self, value):
instance = Volume.objects.get(pk=value.pk)
serializer = VolumeSerializer(instance, context=self.context)
return serializer.data
class ProjectVolumeSerializer(serializers.HyperlinkedModelSerializer):
project = ProjectRelatedField(queryset=Project.objects.none())
volume = VolumeRelatedField(source="pk", queryset=Volume.objects.none())
# Could not fix 'ImproperlyConfiguredError'
# url = serializers.HyperlinkedIdentityField(
# view_name='api:v2:projectvolume-detail',
# )
class Meta:
model = Volume
fields = ('id', 'project', 'volume')
def create(self, validated_data):
validated_data['pk'].project = validated_data['project']
validated_data['pk'].save()
return validated_data
| 33.25 | 76 | 0.726589 | from core.models import Project, Volume
from rest_framework import serializers
from api.v2.serializers.summaries import ProjectSummarySerializer
from .volume import VolumeSerializer
class ProjectRelatedField(serializers.PrimaryKeyRelatedField):
def get_queryset(self):
return Project.objects.all()
def to_representation(self, value):
project = Project.objects.get(pk=value.pk)
serializer = ProjectSummarySerializer(project, context=self.context)
return serializer.data
class VolumeRelatedField(serializers.PrimaryKeyRelatedField):
def get_queryset(self):
return Volume.objects.all()
def to_representation(self, value):
instance = Volume.objects.get(pk=value.pk)
serializer = VolumeSerializer(instance, context=self.context)
return serializer.data
class ProjectVolumeSerializer(serializers.HyperlinkedModelSerializer):
project = ProjectRelatedField(queryset=Project.objects.none())
volume = VolumeRelatedField(source="pk", queryset=Volume.objects.none())
class Meta:
model = Volume
fields = ('id', 'project', 'volume')
def create(self, validated_data):
validated_data['pk'].project = validated_data['project']
validated_data['pk'].save()
return validated_data
| true | true |
f7271d3ae4367499cf666b0eda40d2fc6daee534 | 20,768 | py | Python | jax/_src/errors.py | machineko/jax | 5a9048a0058d027000afc5707413d24209aa6f9f | [
"Apache-2.0"
] | 1 | 2021-09-14T07:12:46.000Z | 2021-09-14T07:12:46.000Z | jax/_src/errors.py | josephrocca/jax | ab544cb26dfea3147c336754d3e3eb457a405e38 | [
"Apache-2.0"
] | 6 | 2022-01-03T22:13:42.000Z | 2022-02-14T22:07:51.000Z | jax/_src/errors.py | kbnarayanavit/jax | 1e3c4833c97302caf6046ff99656b8ff21430b8d | [
"Apache-2.0"
] | 1 | 2021-08-11T20:57:59.000Z | 2021-08-11T20:57:59.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, 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 jax import core
class _JAXErrorMixin:
"""Mixin for JAX-specific errors"""
_error_page = 'https://jax.readthedocs.io/en/latest/errors.html'
_module_name = "jax.errors"
def __init__(self, message: str):
error_page = self._error_page
module_name = self._module_name
class_name = self.__class__.__name__
error_msg = f'{message}\nSee {error_page}#{module_name}.{class_name}'
# https://github.com/python/mypy/issues/5887
super().__init__(error_msg) # type: ignore
class JAXTypeError(_JAXErrorMixin, TypeError):
pass
class JAXIndexError(_JAXErrorMixin, IndexError):
pass
class ConcretizationTypeError(JAXTypeError):
"""
This error occurs when a JAX Tracer object is used in a context where a
concrete value is required. In some situations, it can be easily fixed by
marking problematic values as static; in others, it may indicate that your
program is doing operations that are not directly supported by JAX's JIT
compilation model.
Traced value where static value is expected
One common cause of this error is using a traced value where a static value
is required. For example:
>>> from jax import jit, partial
>>> import jax.numpy as jnp
>>> @jit
... def func(x, axis):
... return x.min(axis)
>>> func(jnp.arange(4), 0) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
ConcretizationTypeError: Abstract tracer value encountered where concrete
value is expected: axis argument to jnp.min().
This can often be fixed by marking the problematic argument as static::
>>> @partial(jit, static_argnums=1)
... def func(x, axis):
... return x.min(axis)
>>> func(jnp.arange(4), 0)
DeviceArray(0, dtype=int32)
Traced value used in control flow
Another case where this often arises is when a traced value is used in
Python control flow. For example::
>>> @jit
... def func(x, y):
... return x if x.sum() < y.sum() else y
>>> func(jnp.ones(4), jnp.zeros(4)) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
ConcretizationTypeError: Abstract tracer value encountered where concrete
value is expected: [...]
We could mark both inputs ``x`` and ``y`` as static, but that would defeat
the purpose of using :func:`jax.jit` here. Another option is to re-express
the if statement in terms of :func:`jax.numpy.where`::
>>> @jit
... def func(x, y):
... return jnp.where(x.sum() < y.sum(), x, y)
>>> func(jnp.ones(4), jnp.zeros(4))
DeviceArray([0., 0., 0., 0.], dtype=float32)
For more complicated control flow including loops, see
:ref:`lax-control-flow`.
Shape depends on Traced Value
Such an error may also arise when a shape in your JIT-compiled computation
depends on the values within a traced quantity. For example::
>>> @jit
... def func(x):
... return jnp.where(x < 0)
>>> func(jnp.arange(4)) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
ConcretizationTypeError: Abstract tracer value encountered where concrete value is expected:
The error arose in jnp.nonzero.
This is an example of an operation that is incompatible with JAX's JIT
compilation model, which requires array sizes to be known at compile-time.
Here the size of the returned array depends on the contents of `x`, and such
code cannot be JIT compiled.
In many cases it is possible to work around this by modifying the logic used
in the function; for example here is code with a similar issue::
>>> @jit
... def func(x):
... indices = jnp.where(x > 1)
... return x[indices].sum()
>>> func(jnp.arange(4)) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
ConcretizationTypeError: Abstract tracer value encountered where concrete
value is expected: The error arose in jnp.nonzero.
And here is how you might express the same operation in a way that avoids
creation of a dynamically-sized index array::
>>> @jit
... def func(x):
... return jnp.where(x > 1, x, 0).sum()
>>> func(jnp.arange(4))
DeviceArray(5, dtype=int32)
To understand more subtleties having to do with tracers vs. regular values,
and concrete vs. abstract values, you may want to read
:ref:`faq-different-kinds-of-jax-values`.
"""
def __init__(self, tracer: "core.Tracer", context: str = ""):
super().__init__(
"Abstract tracer value encountered where concrete value is expected: "
f"{tracer}\n{context}{tracer._origin_msg()}\n")
class NonConcreteBooleanIndexError(JAXIndexError):
"""
This error occurs when a program attempts to use non-concrete boolean indices
in a traced indexing operation. Under JIT compilation, JAX arrays must have
static shapes (i.e. shapes that are known at compile-time) and so boolean
masks must be used carefully. Some logic implemented via boolean masking is
simply not possible in a :func:`jax.jit` function; in other cases, the logic
can be re-expressed in a JIT-compatible way, often using the three-argument
version of :func:`~jax.numpy.where`.
Following are a few examples of when this error might arise.
Constructing arrays via boolean masking
This most commonly arises when attempting to create an array via a boolean
mask within a JIT context. For example::
>>> import jax
>>> import jax.numpy as jnp
>>> @jax.jit
... def positive_values(x):
... return x[x > 0]
>>> positive_values(jnp.arange(-5, 5)) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
NonConcreteBooleanIndexError: Array boolean indices must be concrete: ShapedArray(bool[10])
This function is attempting to return only the positive values in the input
array; the size of this returned array cannot be determined at compile-time
unless `x` is marked as static, and so operations like this cannot be
performed under JIT compilation.
Reexpressible Boolean Logic
Although creating dynamically sized arrays is not supported directly, in
many cases it is possible to re-express the logic of the computation in
terms of a JIT-compatible operation. For example, here is another function
that fails under JIT for the same reason::
>>> @jax.jit
... def sum_of_positive(x):
... return x[x > 0].sum()
>>> sum_of_positive(jnp.arange(-5, 5)) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
NonConcreteBooleanIndexError: Array boolean indices must be concrete: ShapedArray(bool[10])
In this case, however, the problematic array is only an intermediate value,
and we can instead express the same logic in terms of the JIT-compatible
three-argument version of :func:`jax.numpy.where`::
>>> @jax.jit
... def sum_of_positive(x):
... return jnp.where(x > 0, x, 0).sum()
>>> sum_of_positive(jnp.arange(-5, 5))
DeviceArray(10, dtype=int32)
This pattern of replacing boolean masking with three-argument
:func:`~jax.numpy.where` is a common solution to this sort of problem.
Boolean indices in :mod:`jax.ops`
The other situation where this error often arises is when using boolean
indices within functions in :mod:`jax.ops`, such as
:func:`jax.ops.index_update`. Here is a simple example::
>>> @jax.jit
... def manual_clip(x):
... return jax.ops.index_update(x, x < 0, 0)
>>> manual_clip(jnp.arange(-2, 2)) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
NonConcreteBooleanIndexError: Array boolean indices must be concrete: ShapedArray(bool[4])
This function is attempting to set values smaller than zero to a scalar fill
value. As above, this can be addressed by re-expressing the logic in terms
of :func:`~jax.numpy.where`::
>>> @jax.jit
... def manual_clip(x):
... return jnp.where(x < 0, 0, x)
>>> manual_clip(jnp.arange(-2, 2))
DeviceArray([0, 0, 0, 1], dtype=int32)
These operations also commonly are written in terms of the
:ref:`syntactic-sugar-for-ops`; for example, this is syntactic sugar for
:func:`~jax.ops.index_mul`, and fails under JIT::
>>> @jax.jit
... def manual_abs(x):
... return x.at[x < 0].mul(-1)
>>> manual_abs(jnp.arange(-2, 2)) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
NonConcreteBooleanIndexError: Array boolean indices must be concrete: ShapedArray(bool[4])
As above, the solution is to re-express this in terms of
:func:`~jax.numpy.where`::
>>> @jax.jit
... def manual_abs(x):
... return jnp.where(x < 0, x * -1, x)
>>> manual_abs(jnp.arange(-2, 2))
DeviceArray([2, 1, 0, 1], dtype=int32)
"""
def __init__(self, tracer: "core.Tracer"):
super().__init__(
f"Array boolean indices must be concrete; got {tracer}\n")
class TracerArrayConversionError(JAXTypeError):
"""
This error occurs when a program attempts to convert a JAX Tracer object into
a standard NumPy array. It typically occurs in one of a few situations.
Using `numpy` rather than `jax.numpy` functions
This error can occur when a JAX Tracer object is passed to a raw numpy
function, or a method on a numpy.ndarray object. For example::
>>> from jax import jit, partial
>>> import numpy as np
>>> import jax.numpy as jnp
>>> @jit
... def func(x):
... return np.sin(x)
>>> func(jnp.arange(4)) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
TracerArrayConversionError: The numpy.ndarray conversion method
__array__() was called on the JAX Tracer object
In this case, check that you are using `jax.numpy` methods rather than
`numpy` methods::
>>> @jit
... def func(x):
... return jnp.sin(x)
>>> func(jnp.arange(4))
DeviceArray([0. , 0.84147096, 0.9092974 , 0.14112 ], dtype=float32)
Indexing a numpy array with a tracer
If this error arises on a line that involves array indexing, it may be that
the array being indexed `x` is a raw numpy.ndarray while the indices `idx`
are traced. For example::
>>> x = np.arange(10)
>>> @jit
... def func(i):
... return x[i]
>>> func(0) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
TracerArrayConversionError: The numpy.ndarray conversion method
__array__() was called on the JAX Tracer object
Depending on the context, you may fix this by converting the numpy array
into a JAX array::
>>> @jit
... def func(i):
... return jnp.asarray(x)[i]
>>> func(0)
DeviceArray(0, dtype=int32)
or by declaring the index as a static argument::
>>> @partial(jit, static_argnums=(0,))
... def func(i):
... return x[i]
>>> func(0)
DeviceArray(0, dtype=int32)
To understand more subtleties having to do with tracers vs. regular values,
and concrete vs. abstract values, you may want to read
:ref:`faq-different-kinds-of-jax-values`.
"""
def __init__(self, tracer: "core.Tracer"):
super().__init__(
"The numpy.ndarray conversion method __array__() was called on "
f"the JAX Tracer object {tracer}{tracer._origin_msg()}")
class TracerIntegerConversionError(JAXTypeError):
"""
This error can occur when a JAX Tracer object is used in a context where a
Python integer is expected. It typically occurs in a few situations.
Passing a tracer in place of an integer
This error can occur if you attempt to pass a tracer to a function that
requires an integer argument; for example::
>>> from jax import jit, partial
>>> import numpy as np
>>> @jit
... def func(x, axis):
... return np.split(x, 2, axis)
>>> func(np.arange(4), 0) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
TracerIntegerConversionError: The __index__() method was called on the JAX
Tracer object
When this happens, the solution is often to mark the problematic argument as
static::
>>> @partial(jit, static_argnums=1)
... def func(x, axis):
... return np.split(x, 2, axis)
>>> func(np.arange(10), 0)
[DeviceArray([0, 1, 2, 3, 4], dtype=int32),
DeviceArray([5, 6, 7, 8, 9], dtype=int32)]
An alternative is to apply the transformation to a closure that encapsulates
the arguments to be protected, either manually as below or by using
:func:`functools.partial`::
>>> jit(lambda arr: np.split(arr, 2, 0))(np.arange(4))
[DeviceArray([0, 1], dtype=int32), DeviceArray([2, 3], dtype=int32)]
**Note a new closure is created at every invocation, which defeats the
compilation caching mechanism, which is why static_argnums is preferred.**
Indexing a list with a Tracer
This error can occur if you attempt to index a Python list with a traced
quantity.
For example::
>>> import jax.numpy as jnp
>>> from jax import jit, partial
>>> L = [1, 2, 3]
>>> @jit
... def func(i):
... return L[i]
>>> func(0) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
TracerIntegerConversionError: The __index__() method was called on the JAX Tracer object
Depending on the context, you can generally fix this either by converting
the list to a JAX array::
>>> @jit
... def func(i):
... return jnp.array(L)[i]
>>> func(0)
DeviceArray(1, dtype=int32)
or by declaring the index as a static argument::
>>> @partial(jit, static_argnums=0)
... def func(i):
... return L[i]
>>> func(0)
DeviceArray(1, dtype=int32, weak_type=True)
To understand more subtleties having to do with tracers vs. regular values,
and concrete vs. abstract values, you may want to read
:ref:`faq-different-kinds-of-jax-values`.
"""
def __init__(self, tracer: "core.Tracer"):
super().__init__(
f"The __index__() method was called on the JAX Tracer object {tracer}")
class UnexpectedTracerError(JAXTypeError):
"""
This error occurs when you use a JAX value that has leaked out of a function.
What does it mean to leak a value? If you use a JAX transformation on a
function ``f`` that stores, in some scope outside of ``f``, a reference to
an intermediate value, that value is considered to have been leaked.
Leaking values is a side effect. (Read more about avoiding side effects in
`Pure Functions <https://jax.readthedocs.io/en/latest/notebooks/Common_Gotchas_in_JAX.html#pure-functions>`_)
JAX detects leaks when you then use the leaked value in another
operation later on, at which point it raises an ``UnexpectedTracerError``.
To fix this, avoid side effects: if a function computes a value needed
in an outer scope, return that value from the transformed function explictly.
Specifically, a ``Tracer`` is JAX's internal representation of a function's
intermediate values during transformations, e.g. within ``jit``, ``pmap``,
``vmap``, etc. Encountering a ``Tracer`` outside of a transformation implies a
leak.
Life-cycle of a leaked value
Consider the following example of a transformed function which leaks a value
to an outer scope::
>>> from jax import jit
>>> import jax.numpy as jnp
>>> outs = []
>>> @jit # 1
... def side_effecting(x):
... y = x + 1 # 3
... outs.append(y) # 4
>>> x = 1
>>> side_effecting(x) # 2
>>> outs[0] + 1 # 5 # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
UnexpectedTracerError: Encountered an unexpected tracer.
In this example we leak a Traced value from an inner transformed scope to an
outer scope. We get an ``UnexpectedTracerError`` when the leaked value is
used, not when the value is leaked.
This example also demonstrates the life-cycle of a leaked value:
1. A function is transformed (in this case, by ``jit``)
2. The transformed function is called (initiating an abstract trace of the
function and turning ``x`` into a ``Tracer``)
3. The intermediate value ``y``, which will later be leaked, is created
(an intermediate value of a traced function is also a ``Tracer``)
4. The value is leaked (appended to a list in an outer scope, escaping
the function through a side-channel)
5. The leaked value is used, and an UnexpectedTracerError is raised.
The UnexpectedTracerError message tries to point to these locations in your
code by including information about each stage. Respectively:
1. The name of the transformed function (``side_effecting``) and which
transform kicked of the trace (``jit``).
2. A reconstructed stack trace of where the leaked Tracer was created,
which includes where the transformed function was called.
(``When the Tracer was created, the final 5 stack frames were...``).
3. From the reconstructed stack trace, the line of code that created
the leaked Tracer.
4. The leak location is not included in the error message because it is
difficult to pin down! JAX can only tell you what the leaked value
looks like (what shape is has and where it was created) and what
boundary it was leaked over (the name of the transformation and the
name of the transformed function).
5. The current error's stack trace points to where the value is used.
The error can be fixed by the returning the value out of the
transformed function::
>>> from jax import jit
>>> import jax.numpy as jnp
>>> outs = []
>>> @jit
... def not_side_effecting(x):
... y = x+1
... return y
>>> x = 1
>>> y = not_side_effecting(x)
>>> outs.append(y)
>>> outs[0] + 1 # all good! no longer a leaked value.
DeviceArray(3, dtype=int32, weak_type=True)
Leak checker
As discussed in point 2 and 3 above, JAX shows a reconstructed stack trace
which points to where the leaked value was created. This is because
JAX only raises an error when the leaked value is used, not when the
value is leaked. This is not the most useful place to raise this error,
because you need to know the location where the Tracer was leaked to fix the
error.
To make this location easier to track down, you can use the leak checker.
When the leak checker is enabled, an error is raised as soon as a ``Tracer``
is leaked. (To be more exact, it will raise an error when the transformed
function from which the ``Tracer`` is leaked returns)
To enable the leak checker you can use the ``JAX_CHECK_TRACER_LEAKS``
environment variable or the ``with jax.checking_leaks()`` context manager.
.. note::
Note that this tool is experimental and may report false positives. It
works by disabling some JAX caches, so it will have a negative effect on
performance and should only be used when debugging.
Example usage::
>>> from jax import jit
>>> import jax.numpy as jnp
>>> outs = []
>>> @jit
... def side_effecting(x):
... y = x+1
... outs.append(y)
>>> x = 1
>>> with jax.checking_leaks():
... y = side_effecting(x) # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
Exception: Leaked Trace
"""
def __init__(self, msg: str):
super().__init__(msg)
| 36.499121 | 111 | 0.658995 |
from jax import core
class _JAXErrorMixin:
_error_page = 'https://jax.readthedocs.io/en/latest/errors.html'
_module_name = "jax.errors"
def __init__(self, message: str):
error_page = self._error_page
module_name = self._module_name
class_name = self.__class__.__name__
error_msg = f'{message}\nSee {error_page}#{module_name}.{class_name}'
super().__init__(error_msg)
class JAXTypeError(_JAXErrorMixin, TypeError):
pass
class JAXIndexError(_JAXErrorMixin, IndexError):
pass
class ConcretizationTypeError(JAXTypeError):
def __init__(self, tracer: "core.Tracer", context: str = ""):
super().__init__(
"Abstract tracer value encountered where concrete value is expected: "
f"{tracer}\n{context}{tracer._origin_msg()}\n")
class NonConcreteBooleanIndexError(JAXIndexError):
def __init__(self, tracer: "core.Tracer"):
super().__init__(
f"Array boolean indices must be concrete; got {tracer}\n")
class TracerArrayConversionError(JAXTypeError):
def __init__(self, tracer: "core.Tracer"):
super().__init__(
"The numpy.ndarray conversion method __array__() was called on "
f"the JAX Tracer object {tracer}{tracer._origin_msg()}")
class TracerIntegerConversionError(JAXTypeError):
def __init__(self, tracer: "core.Tracer"):
super().__init__(
f"The __index__() method was called on the JAX Tracer object {tracer}")
class UnexpectedTracerError(JAXTypeError):
def __init__(self, msg: str):
super().__init__(msg)
| true | true |
f7271e85642896049a5ab911d13a4ad8df8ec1de | 14,429 | py | Python | PaddleNLP/emotion_detection/run_classifier.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 1 | 2022-02-08T06:00:29.000Z | 2022-02-08T06:00:29.000Z | PaddleNLP/emotion_detection/run_classifier.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | null | null | null | PaddleNLP/emotion_detection/run_classifier.py | FrancisLiang/models-1 | e14d5bc1ab36d0dd11977f27cff54605bf99c945 | [
"Apache-2.0"
] | 2 | 2019-05-06T12:10:15.000Z | 2019-09-01T04:28:10.000Z | """
Emotion Detection Task
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import time
import argparse
import multiprocessing
import sys
sys.path.append("../")
import paddle
import paddle.fluid as fluid
import numpy as np
from models.classification import nets
import reader
import config
import utils
parser = argparse.ArgumentParser(__doc__)
model_g = utils.ArgumentGroup(parser, "model", "model configuration and paths.")
model_g.add_arg("config_path", str, None, "Path to the json file for EmoTect model config.")
model_g.add_arg("init_checkpoint", str, None, "Init checkpoint to resume training from.")
model_g.add_arg("output_dir", str, None, "Directory path to save checkpoints")
train_g = utils.ArgumentGroup(parser, "training", "training options.")
train_g.add_arg("epoch", int, 10, "Number of epoches for training.")
train_g.add_arg("save_steps", int, 10000, "The steps interval to save checkpoints.")
train_g.add_arg("validation_steps", int, 1000, "The steps interval to evaluate model performance.")
train_g.add_arg("lr", float, 0.002, "The Learning rate value for training.")
log_g = utils.ArgumentGroup(parser, "logging", "logging related")
log_g.add_arg("skip_steps", int, 10, "The steps interval to print loss.")
log_g.add_arg("verbose", bool, False, "Whether to output verbose log")
data_g = utils.ArgumentGroup(parser, "data", "Data paths, vocab paths and data processing options")
data_g.add_arg("data_dir", str, None, "Directory path to training data.")
data_g.add_arg("vocab_path", str, None, "Vocabulary path.")
data_g.add_arg("batch_size", int, 256, "Total examples' number in batch for training.")
data_g.add_arg("random_seed", int, 0, "Random seed.")
run_type_g = utils.ArgumentGroup(parser, "run_type", "running type options.")
run_type_g.add_arg("use_cuda", bool, False, "If set, use GPU for training.")
run_type_g.add_arg("task_name", str, None, "The name of task to perform sentiment classification.")
run_type_g.add_arg("do_train", bool, False, "Whether to perform training.")
run_type_g.add_arg("do_val", bool, False, "Whether to perform evaluation.")
run_type_g.add_arg("do_infer", bool, False, "Whether to perform inference.")
parser.add_argument('--enable_ce', action='store_true', help='If set, run the task with continuous evaluation logs.')
args = parser.parse_args()
def create_model(args,
pyreader_name,
emotect_config,
num_labels,
is_infer=False):
"""
Create Model for sentiment classification
"""
if is_infer:
pyreader = fluid.layers.py_reader(
capacity=16,
shapes=[[-1, 1]],
dtypes=['int64'],
lod_levels=[1],
name=pyreader_name,
use_double_buffer=False)
else:
pyreader = fluid.layers.py_reader(
capacity=16,
shapes=([-1, 1], [-1, 1]),
dtypes=('int64', 'int64'),
lod_levels=(1, 0),
name=pyreader_name,
use_double_buffer=False)
if emotect_config['model_type'] == "cnn_net":
network = nets.cnn_net
elif emotect_config['model_type'] == "bow_net":
network = nets.bow_net
elif emotect_config['model_type'] == "lstm_net":
network = nets.lstm_net
elif emotect_config['model_type'] == "bilstm_net":
network = nets.bilstm_net
elif emotect_config['model_type'] == "gru_net":
network = nets.gru_net
elif emotect_config['model_type'] == "textcnn_net":
network = nets.textcnn_net
else:
raise ValueError("Unknown network type!")
if is_infer:
data = fluid.layers.read_file(pyreader)
probs = network(data, None, emotect_config["vocab_size"], class_dim=num_labels, is_infer=True)
return pyreader, probs
data, label = fluid.layers.read_file(pyreader)
avg_loss, probs = network(data, label, emotect_config["vocab_size"], class_dim=num_labels)
num_seqs = fluid.layers.create_tensor(dtype='int64')
accuracy = fluid.layers.accuracy(input=probs, label=label, total=num_seqs)
return pyreader, avg_loss, accuracy, num_seqs
def evaluate(exe, test_program, test_pyreader, fetch_list, eval_phase):
"""
Evaluation Function
"""
test_pyreader.start()
total_cost, total_acc, total_num_seqs = [], [], []
time_begin = time.time()
while True:
try:
np_loss, np_acc, np_num_seqs = exe.run(program=test_program,
fetch_list=fetch_list,
return_numpy=False)
np_loss = np.array(np_loss)
np_acc = np.array(np_acc)
np_num_seqs = np.array(np_num_seqs)
total_cost.extend(np_loss * np_num_seqs)
total_acc.extend(np_acc * np_num_seqs)
total_num_seqs.extend(np_num_seqs)
except fluid.core.EOFException:
test_pyreader.reset()
break
time_end = time.time()
print("[%s evaluation] avg loss: %f, avg acc: %f, elapsed time: %f s" %
(eval_phase, np.sum(total_cost) / np.sum(total_num_seqs),
np.sum(total_acc) / np.sum(total_num_seqs), time_end - time_begin))
def infer(exe, infer_program, infer_pyreader, fetch_list, infer_phase):
infer_pyreader.start()
time_begin = time.time()
while True:
try:
batch_probs = exe.run(program=infer_program,
fetch_list=fetch_list,
return_numpy=True)
for probs in batch_probs[0]:
print("%d\t%f\t%f\t%f" % (np.argmax(probs), probs[0], probs[1], probs[2]))
except fluid.core.EOFException as e:
infer_pyreader.reset()
break
time_end = time.time()
print("[%s] elapsed time: %f s" % (infer_phase, time_end - time_begin))
def main(args):
"""
Main Function
"""
emotect_config = config.EmoTectConfig(args.config_path)
if args.use_cuda:
place = fluid.CUDAPlace(int(os.getenv('FLAGS_selected_gpus', '0')))
else:
place = fluid.CPUPlace()
exe = fluid.Executor(place)
task_name = args.task_name.lower()
processor = reader.EmoTectProcessor(data_dir=args.data_dir,
vocab_path=args.vocab_path,
random_seed=args.random_seed)
num_labels = len(processor.get_labels())
if not (args.do_train or args.do_val or args.do_infer):
raise ValueError("For args `do_train`, `do_val` and `do_infer`, at "
"least one of them must be True.")
startup_prog = fluid.Program()
if args.random_seed is not None:
startup_prog.random_seed = args.random_seed
if args.do_train:
train_data_generator = processor.data_generator(
batch_size=args.batch_size,
phase='train',
epoch=args.epoch)
num_train_examples = processor.get_num_examples(phase="train")
max_train_steps = args.epoch * num_train_examples // args.batch_size + 1
print("Num train examples: %d" % num_train_examples)
print("Max train steps: %d" % max_train_steps)
train_program = fluid.Program()
if args.random_seed is not None:
train_program.random_seed = args.random_seed
with fluid.program_guard(train_program, startup_prog):
with fluid.unique_name.guard():
train_pyreader, loss, accuracy, num_seqs = create_model(
args,
pyreader_name='train_reader',
emotect_config=emotect_config,
num_labels=num_labels,
is_infer=False)
sgd_optimizer = fluid.optimizer.Adagrad(learning_rate=args.lr)
sgd_optimizer.minimize(loss)
if args.verbose:
lower_mem, upper_mem, unit = fluid.contrib.memory_usage(
program=train_program, batch_size=args.batch_size)
print("Theoretical memory usage in training: %.3f - %.3f %s" %
(lower_mem, upper_mem, unit))
if args.do_val:
test_prog = fluid.Program()
with fluid.program_guard(test_prog, startup_prog):
with fluid.unique_name.guard():
test_pyreader, loss, accuracy, num_seqs = create_model(
args,
pyreader_name='test_reader',
emotect_config=emotect_config,
num_labels=num_labels,
is_infer=False)
test_prog = test_prog.clone(for_test=True)
if args.do_infer:
test_prog = fluid.Program()
with fluid.program_guard(test_prog, startup_prog):
with fluid.unique_name.guard():
infer_pyreader, probs = create_model(
args,
pyreader_name='infer_reader',
emotect_config=emotect_config,
num_labels=num_labels,
is_infer=True)
test_prog = test_prog.clone(for_test=True)
exe.run(startup_prog)
if args.do_train:
if args.init_checkpoint:
utils.init_checkpoint(
exe,
args.init_checkpoint,
main_program=startup_prog)
elif args.do_val or args.do_infer:
if not args.init_checkpoint:
raise ValueError("args 'init_checkpoint' should be set if"
"only doing validation or infer!")
utils.init_checkpoint(
exe,
args.init_checkpoint,
main_program=test_prog)
if args.do_train:
train_exe = exe
train_pyreader.decorate_paddle_reader(train_data_generator)
else:
train_exe = None
if args.do_val or args.do_infer:
test_exe = exe
if args.do_train:
train_pyreader.start()
steps = 0
total_cost, total_acc, total_num_seqs = [], [], []
time_begin = time.time()
ce_info = []
while True:
try:
steps += 1
if steps % args.skip_steps == 0:
fetch_list = [loss.name, accuracy.name, num_seqs.name]
else:
fetch_list = []
outputs = train_exe.run(program=train_program,
fetch_list=fetch_list,
return_numpy=False)
if steps % args.skip_steps == 0:
np_loss, np_acc, np_num_seqs = outputs
np_loss = np.array(np_loss)
np_acc = np.array(np_acc)
np_num_seqs = np.array(np_num_seqs)
total_cost.extend(np_loss * np_num_seqs)
total_acc.extend(np_acc * np_num_seqs)
total_num_seqs.extend(np_num_seqs)
if args.verbose:
verbose = "train pyreader queue size: %d, " % train_pyreader.queue.size()
print(verbose)
time_end = time.time()
used_time = time_end - time_begin
print("step: %d, avg loss: %f, "
"avg acc: %f, speed: %f steps/s" %
(steps, np.sum(total_cost) / np.sum(total_num_seqs),
np.sum(total_acc) / np.sum(total_num_seqs),
args.skip_steps / used_time))
ce_info.append([np.sum(total_cost) / np.sum(total_num_seqs), np.sum(total_acc) / np.sum(total_num_seqs), used_time])
total_cost, total_acc, total_num_seqs = [], [], []
time_begin = time.time()
if steps % args.save_steps == 0:
save_path = os.path.join(args.output_dir, "step_" + str(steps))
fluid.io.save_persistables(exe, save_path, train_program)
if steps % args.validation_steps == 0:
# evaluate on dev set
if args.do_val:
test_pyreader.decorate_paddle_reader(
processor.data_generator(
batch_size=args.batch_size,
phase='dev',
epoch=1))
evaluate(test_exe, test_prog, test_pyreader,
[loss.name, accuracy.name, num_seqs.name],
"dev")
except fluid.core.EOFException:
save_path = os.path.join(args.output_dir, "step_" + str(steps))
fluid.io.save_persistables(exe, save_path, train_program)
train_pyreader.reset()
break
if args.do_train and args.enable_ce:
card_num = get_cards()
ce_loss = 0
ce_acc = 0
ce_time = 0
try:
ce_loss = ce_info[-2][0]
ce_acc = ce_info[-2][1]
ce_time = ce_info[-2][2]
except:
print("ce info error")
print("kpis\teach_step_duration_%s_card%s\t%s" %
(task_name, card_num, ce_time))
print("kpis\ttrain_loss_%s_card%s\t%f" %
(task_name, card_num, ce_loss))
print("kpis\ttrain_acc_%s_card%s\t%f" %
(task_name, card_num, ce_acc))
# evaluate on test set
if not args.do_train and args.do_val:
test_pyreader.decorate_paddle_reader(
processor.data_generator(
batch_size=args.batch_size,
phase='test',
epoch=1))
print("Final test result:")
evaluate(test_exe, test_prog, test_pyreader,
[loss.name, accuracy.name, num_seqs.name],
"test")
# infer
if args.do_infer:
infer_pyreader.decorate_paddle_reader(
processor.data_generator(
batch_size=args.batch_size,
phase='infer',
epoch=1))
infer(test_exe, test_prog, infer_pyreader,
[probs.name], "infer")
def get_cards():
num = 0
cards = os.environ.get('CUDA_VISIBLE_DEVICES', '')
if cards != '':
num = len(cards.split(","))
return num
if __name__ == "__main__":
utils.print_arguments(args)
main(args)
| 38.171958 | 136 | 0.587012 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import time
import argparse
import multiprocessing
import sys
sys.path.append("../")
import paddle
import paddle.fluid as fluid
import numpy as np
from models.classification import nets
import reader
import config
import utils
parser = argparse.ArgumentParser(__doc__)
model_g = utils.ArgumentGroup(parser, "model", "model configuration and paths.")
model_g.add_arg("config_path", str, None, "Path to the json file for EmoTect model config.")
model_g.add_arg("init_checkpoint", str, None, "Init checkpoint to resume training from.")
model_g.add_arg("output_dir", str, None, "Directory path to save checkpoints")
train_g = utils.ArgumentGroup(parser, "training", "training options.")
train_g.add_arg("epoch", int, 10, "Number of epoches for training.")
train_g.add_arg("save_steps", int, 10000, "The steps interval to save checkpoints.")
train_g.add_arg("validation_steps", int, 1000, "The steps interval to evaluate model performance.")
train_g.add_arg("lr", float, 0.002, "The Learning rate value for training.")
log_g = utils.ArgumentGroup(parser, "logging", "logging related")
log_g.add_arg("skip_steps", int, 10, "The steps interval to print loss.")
log_g.add_arg("verbose", bool, False, "Whether to output verbose log")
data_g = utils.ArgumentGroup(parser, "data", "Data paths, vocab paths and data processing options")
data_g.add_arg("data_dir", str, None, "Directory path to training data.")
data_g.add_arg("vocab_path", str, None, "Vocabulary path.")
data_g.add_arg("batch_size", int, 256, "Total examples' number in batch for training.")
data_g.add_arg("random_seed", int, 0, "Random seed.")
run_type_g = utils.ArgumentGroup(parser, "run_type", "running type options.")
run_type_g.add_arg("use_cuda", bool, False, "If set, use GPU for training.")
run_type_g.add_arg("task_name", str, None, "The name of task to perform sentiment classification.")
run_type_g.add_arg("do_train", bool, False, "Whether to perform training.")
run_type_g.add_arg("do_val", bool, False, "Whether to perform evaluation.")
run_type_g.add_arg("do_infer", bool, False, "Whether to perform inference.")
parser.add_argument('--enable_ce', action='store_true', help='If set, run the task with continuous evaluation logs.')
args = parser.parse_args()
def create_model(args,
pyreader_name,
emotect_config,
num_labels,
is_infer=False):
if is_infer:
pyreader = fluid.layers.py_reader(
capacity=16,
shapes=[[-1, 1]],
dtypes=['int64'],
lod_levels=[1],
name=pyreader_name,
use_double_buffer=False)
else:
pyreader = fluid.layers.py_reader(
capacity=16,
shapes=([-1, 1], [-1, 1]),
dtypes=('int64', 'int64'),
lod_levels=(1, 0),
name=pyreader_name,
use_double_buffer=False)
if emotect_config['model_type'] == "cnn_net":
network = nets.cnn_net
elif emotect_config['model_type'] == "bow_net":
network = nets.bow_net
elif emotect_config['model_type'] == "lstm_net":
network = nets.lstm_net
elif emotect_config['model_type'] == "bilstm_net":
network = nets.bilstm_net
elif emotect_config['model_type'] == "gru_net":
network = nets.gru_net
elif emotect_config['model_type'] == "textcnn_net":
network = nets.textcnn_net
else:
raise ValueError("Unknown network type!")
if is_infer:
data = fluid.layers.read_file(pyreader)
probs = network(data, None, emotect_config["vocab_size"], class_dim=num_labels, is_infer=True)
return pyreader, probs
data, label = fluid.layers.read_file(pyreader)
avg_loss, probs = network(data, label, emotect_config["vocab_size"], class_dim=num_labels)
num_seqs = fluid.layers.create_tensor(dtype='int64')
accuracy = fluid.layers.accuracy(input=probs, label=label, total=num_seqs)
return pyreader, avg_loss, accuracy, num_seqs
def evaluate(exe, test_program, test_pyreader, fetch_list, eval_phase):
test_pyreader.start()
total_cost, total_acc, total_num_seqs = [], [], []
time_begin = time.time()
while True:
try:
np_loss, np_acc, np_num_seqs = exe.run(program=test_program,
fetch_list=fetch_list,
return_numpy=False)
np_loss = np.array(np_loss)
np_acc = np.array(np_acc)
np_num_seqs = np.array(np_num_seqs)
total_cost.extend(np_loss * np_num_seqs)
total_acc.extend(np_acc * np_num_seqs)
total_num_seqs.extend(np_num_seqs)
except fluid.core.EOFException:
test_pyreader.reset()
break
time_end = time.time()
print("[%s evaluation] avg loss: %f, avg acc: %f, elapsed time: %f s" %
(eval_phase, np.sum(total_cost) / np.sum(total_num_seqs),
np.sum(total_acc) / np.sum(total_num_seqs), time_end - time_begin))
def infer(exe, infer_program, infer_pyreader, fetch_list, infer_phase):
infer_pyreader.start()
time_begin = time.time()
while True:
try:
batch_probs = exe.run(program=infer_program,
fetch_list=fetch_list,
return_numpy=True)
for probs in batch_probs[0]:
print("%d\t%f\t%f\t%f" % (np.argmax(probs), probs[0], probs[1], probs[2]))
except fluid.core.EOFException as e:
infer_pyreader.reset()
break
time_end = time.time()
print("[%s] elapsed time: %f s" % (infer_phase, time_end - time_begin))
def main(args):
emotect_config = config.EmoTectConfig(args.config_path)
if args.use_cuda:
place = fluid.CUDAPlace(int(os.getenv('FLAGS_selected_gpus', '0')))
else:
place = fluid.CPUPlace()
exe = fluid.Executor(place)
task_name = args.task_name.lower()
processor = reader.EmoTectProcessor(data_dir=args.data_dir,
vocab_path=args.vocab_path,
random_seed=args.random_seed)
num_labels = len(processor.get_labels())
if not (args.do_train or args.do_val or args.do_infer):
raise ValueError("For args `do_train`, `do_val` and `do_infer`, at "
"least one of them must be True.")
startup_prog = fluid.Program()
if args.random_seed is not None:
startup_prog.random_seed = args.random_seed
if args.do_train:
train_data_generator = processor.data_generator(
batch_size=args.batch_size,
phase='train',
epoch=args.epoch)
num_train_examples = processor.get_num_examples(phase="train")
max_train_steps = args.epoch * num_train_examples // args.batch_size + 1
print("Num train examples: %d" % num_train_examples)
print("Max train steps: %d" % max_train_steps)
train_program = fluid.Program()
if args.random_seed is not None:
train_program.random_seed = args.random_seed
with fluid.program_guard(train_program, startup_prog):
with fluid.unique_name.guard():
train_pyreader, loss, accuracy, num_seqs = create_model(
args,
pyreader_name='train_reader',
emotect_config=emotect_config,
num_labels=num_labels,
is_infer=False)
sgd_optimizer = fluid.optimizer.Adagrad(learning_rate=args.lr)
sgd_optimizer.minimize(loss)
if args.verbose:
lower_mem, upper_mem, unit = fluid.contrib.memory_usage(
program=train_program, batch_size=args.batch_size)
print("Theoretical memory usage in training: %.3f - %.3f %s" %
(lower_mem, upper_mem, unit))
if args.do_val:
test_prog = fluid.Program()
with fluid.program_guard(test_prog, startup_prog):
with fluid.unique_name.guard():
test_pyreader, loss, accuracy, num_seqs = create_model(
args,
pyreader_name='test_reader',
emotect_config=emotect_config,
num_labels=num_labels,
is_infer=False)
test_prog = test_prog.clone(for_test=True)
if args.do_infer:
test_prog = fluid.Program()
with fluid.program_guard(test_prog, startup_prog):
with fluid.unique_name.guard():
infer_pyreader, probs = create_model(
args,
pyreader_name='infer_reader',
emotect_config=emotect_config,
num_labels=num_labels,
is_infer=True)
test_prog = test_prog.clone(for_test=True)
exe.run(startup_prog)
if args.do_train:
if args.init_checkpoint:
utils.init_checkpoint(
exe,
args.init_checkpoint,
main_program=startup_prog)
elif args.do_val or args.do_infer:
if not args.init_checkpoint:
raise ValueError("args 'init_checkpoint' should be set if"
"only doing validation or infer!")
utils.init_checkpoint(
exe,
args.init_checkpoint,
main_program=test_prog)
if args.do_train:
train_exe = exe
train_pyreader.decorate_paddle_reader(train_data_generator)
else:
train_exe = None
if args.do_val or args.do_infer:
test_exe = exe
if args.do_train:
train_pyreader.start()
steps = 0
total_cost, total_acc, total_num_seqs = [], [], []
time_begin = time.time()
ce_info = []
while True:
try:
steps += 1
if steps % args.skip_steps == 0:
fetch_list = [loss.name, accuracy.name, num_seqs.name]
else:
fetch_list = []
outputs = train_exe.run(program=train_program,
fetch_list=fetch_list,
return_numpy=False)
if steps % args.skip_steps == 0:
np_loss, np_acc, np_num_seqs = outputs
np_loss = np.array(np_loss)
np_acc = np.array(np_acc)
np_num_seqs = np.array(np_num_seqs)
total_cost.extend(np_loss * np_num_seqs)
total_acc.extend(np_acc * np_num_seqs)
total_num_seqs.extend(np_num_seqs)
if args.verbose:
verbose = "train pyreader queue size: %d, " % train_pyreader.queue.size()
print(verbose)
time_end = time.time()
used_time = time_end - time_begin
print("step: %d, avg loss: %f, "
"avg acc: %f, speed: %f steps/s" %
(steps, np.sum(total_cost) / np.sum(total_num_seqs),
np.sum(total_acc) / np.sum(total_num_seqs),
args.skip_steps / used_time))
ce_info.append([np.sum(total_cost) / np.sum(total_num_seqs), np.sum(total_acc) / np.sum(total_num_seqs), used_time])
total_cost, total_acc, total_num_seqs = [], [], []
time_begin = time.time()
if steps % args.save_steps == 0:
save_path = os.path.join(args.output_dir, "step_" + str(steps))
fluid.io.save_persistables(exe, save_path, train_program)
if steps % args.validation_steps == 0:
# evaluate on dev set
if args.do_val:
test_pyreader.decorate_paddle_reader(
processor.data_generator(
batch_size=args.batch_size,
phase='dev',
epoch=1))
evaluate(test_exe, test_prog, test_pyreader,
[loss.name, accuracy.name, num_seqs.name],
"dev")
except fluid.core.EOFException:
save_path = os.path.join(args.output_dir, "step_" + str(steps))
fluid.io.save_persistables(exe, save_path, train_program)
train_pyreader.reset()
break
if args.do_train and args.enable_ce:
card_num = get_cards()
ce_loss = 0
ce_acc = 0
ce_time = 0
try:
ce_loss = ce_info[-2][0]
ce_acc = ce_info[-2][1]
ce_time = ce_info[-2][2]
except:
print("ce info error")
print("kpis\teach_step_duration_%s_card%s\t%s" %
(task_name, card_num, ce_time))
print("kpis\ttrain_loss_%s_card%s\t%f" %
(task_name, card_num, ce_loss))
print("kpis\ttrain_acc_%s_card%s\t%f" %
(task_name, card_num, ce_acc))
# evaluate on test set
if not args.do_train and args.do_val:
test_pyreader.decorate_paddle_reader(
processor.data_generator(
batch_size=args.batch_size,
phase='test',
epoch=1))
print("Final test result:")
evaluate(test_exe, test_prog, test_pyreader,
[loss.name, accuracy.name, num_seqs.name],
"test")
# infer
if args.do_infer:
infer_pyreader.decorate_paddle_reader(
processor.data_generator(
batch_size=args.batch_size,
phase='infer',
epoch=1))
infer(test_exe, test_prog, infer_pyreader,
[probs.name], "infer")
def get_cards():
num = 0
cards = os.environ.get('CUDA_VISIBLE_DEVICES', '')
if cards != '':
num = len(cards.split(","))
return num
if __name__ == "__main__":
utils.print_arguments(args)
main(args)
| true | true |
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 |
f72730c9259d1d4a5dd9d24f84dc6bcf9bf25740 | 7,306 | py | Python | fuzzyJets.py | hbawa120578/JetClustering | b0991927258e5a80e61b985695f06f45740e706b | [
"MIT"
] | 3 | 2018-06-15T09:12:17.000Z | 2021-06-20T15:58:21.000Z | fuzzyJets.py | hbawa120578/JetClustering | b0991927258e5a80e61b985695f06f45740e706b | [
"MIT"
] | 1 | 2018-06-22T00:03:45.000Z | 2018-06-22T00:03:45.000Z | fuzzyJets.py | mickypaganini/SSI2016-jet-clustering | a340558957f55159197e845850fc16e622082e7e | [
"MIT"
] | 6 | 2016-08-18T23:16:00.000Z | 2020-04-13T01:13:20.000Z | import sys
import numpy as np
from numpy import matlib
from scipy.stats import multivariate_normal
from read_data import read_data
import matplotlib.pyplot as plt
import time
import visual
########## Description of Algorithm ###########
# We will assume having m events
# Each event should have k=3 jets
# Each event should have n 'parrticles' to be clustered into the k jets
# Input: cells (size = [m,k,2])
# np vector of size m
# each entry is a np vector of size k
# each entry of the above vector is of size d=2 dimentions (eta, phi)
# Input: energies (size = [m,k,1])
# similar structure as cells, but only energy information
def visualize(particles, ghost, mu, sigma, pi, nameString):
visual.render_particlesAndJetsAndGhosts(particles, mu, sigma, ghost, nameString)
pass
"""
#import code; code.interact(local=locals())
"""
# A little inefficient, can be fixed...
def makeJets(Q, particles):
thresholdP = 0.95
for j in range(len(Q[0])):
newJet = [0.]*4 #4-vector
for i in range(len(particles)):
if Q[i][j] > thresholdP:
newParticle = [0.]*4
newParticle[0] = particles[i][2]
newParticle[1] = particles[i][0]
newParticle[2] = particles[i][1]
newParticle[0] = particles[i][2]
newJet = np.array(newJet) + np.array(newParticle)
print "Jet "+str(j)+": "+str(newJet[0])+" GeV (I guess?)"
def jetFunction(particleVec,mu,sigma):
myPhi1 = abs(particleVec[1]-mu[1])
myPhi2 = abs(particleVec[1]-(mu[1]+2*np.pi))
myPhi3 = abs(particleVec[1]-(mu[1]-2*np.pi))
wrap = 0
if myPhi2 < myPhi1 and myPhi2 < myPhi3:
wrap = 1
if myPhi3 < myPhi1 and myPhi3 < myPhi2:
wrap = -1
absdeltaPhi = min(myPhi1, myPhi2, myPhi3)
deltaR = np.sqrt((absdeltaPhi)**2 + (particleVec[0]-mu[0])**2)
denom = 2*np.pi*(sigma**2)
numerator = np.exp(-deltaR**2/(2*sigma**2))
return numerator/denom, wrap
def expectation(mu, sigma, pi, particles):
k = len(mu)
d = len(mu[0])
Q = np.empty((len(particles),k))
wrapAround = []
for i in range(len(particles)):
wrapArr = [0]*k
for j in range(k):
denom = 0
for jP in range(k):
phiF1, wrap1 = jetFunction(particles[i],mu[jP],sigma[jP])
denom += pi[jP]*phiF1
phiF2, wrap2 = jetFunction(particles[i], mu[j], sigma[j])
Q[i,j] = pi[j]*phiF2/denom
wrapArr[j] = wrap2
wrapAround.append(wrapArr)
return Q, wrapAround
def maximization(Q, particles, mu, sigma, pi, wrapAround):
#ptThreshold = 5
#sigmaThreshold = 0.01
#sigmaLimit = 1.5
eventNumber = 8
k = len(mu)
d = len(mu[0]) #2-d grid
allSigma = [] #Note that what goes in here is sigma and not sigma^2 (scalars)
allMu = [] #Each entry is a 2-vector
allPi = [] #scalars
for j in range(k):
if not convergedArr[j]:
newMu = [0.,0.]
newSigma = 0.
newPi = 0.
piDenom = 0.
muDenom = 0.
for i in range(len(particles)):
piDenom += particles[i][2]
muDenom += particles[i][2] * Q[i][j]
newPi += particles[i][2] * Q[i][j]
for c in range(d):
newMu[c] += particles[i][2] * Q[i][j] * (particles[i][c]+wrapAround[i][j]*2*np.pi)
newMu = newMu/muDenom
newPi = newPi/piDenom
for myL in range(len(particles)):
phi1 = abs(particles[myL][1]-newMu[1])
phi2 = abs(particles[myL][1]-(newMu[1]+2*np.pi))
phi3 = abs(particles[myL][1]-(newMu[1]-2*np.pi))
absdeltaPhi = min(phi1, phi2, phi3)
deltaR = np.sqrt((absdeltaPhi)**2 + (particles[myL][0]-newMu[0])**2)
#if particles[myL][2] < ptThreshold:
newSigma += Q[myL][j]*particles[myL][2]*deltaR**2
newSigma = newSigma/(2.*muDenom)
#if newSigma >= sigmaThreshold:
# newSigma = sigmaThreshold
#if newSigma <= sigmaLimit:
#newSigma = sigmaLimit
else:
newMu = mu[j]
newSigma = sigma[j]**2 #Careful with sigma squared
newPi = pi[j]
allMu.append(newMu)
allPi.append(newPi)
allSigma.append(np.sqrt(np.abs(newSigma)))
return allMu, allSigma, allPi
if __name__ == '__main__':
debug = False
eventNumber = 8
### Read in data ###
particles = []
myX, myE = read_data()
for i in range(len(myE[eventNumber])):
newEntry = []
newEntry.append(myX[eventNumber][i][0])
newEntry.append(myX[eventNumber][i][1])
newEntry.append(myE[eventNumber][i][0])
particles.append(newEntry)
if debug:
print "particles", particles
### InitializeParameters ###
numK = 3 #Seed from AntiKt eventually
d = 2
pi = [1./numK]*numK #length k
sigma = [1.]*numK #length k
mu = [[0.0,3.],[2.,-1.],[2.5,3.]] #Seed with AntiKt eventually
numParticles = len(particles) #total number of partcles in event
numGhosts = numParticles * 10
epsilonR = 0.4/100 #pt cone / 100
epsilonS = 1./100
smallPt = 1./10
convergedArr = [False]*numK
### Make ghosts ###
ghost = [[np.random.uniform(-np.pi,np.pi) for i in range(0,numK)] for j in range (0,numGhosts)]
for g in ghost:
g[2] = smallPt
allParticles = particles + ghost
num = 0
visualize(particles, ghost, mu, sigma, pi,"fuzzy"+str(num)+".jpg")
num += 1
while True:
if debug:
print "Pi", pi
print "mu", mu
print "sigma", sigma
print "bool", convergedArr
### Expectation Step ###
Q, qWrap = expectation(mu, sigma, pi, allParticles)
if debug:
print "Q: ", Q
if num==1:
print "First Q: "
print Q
### Maximization ###
muPrime, sigmaPrime, piPrime = maximization(Q, allParticles, mu, sigma, pi, qWrap)
### Convergence Criteria ###
for i in range(numK):
absdeltaPhi = min(abs(mu[i][1]-muPrime[i][1]),abs(mu[i][1]-(muPrime[i][1]+2*np.pi)),abs(mu[i][1]-(muPrime[i][1]-2*np.pi)))
deltaR = np.sqrt((absdeltaPhi)**2 + (mu[i][0]-muPrime[i][0])**2)
if deltaR < epsilonR and np.abs(sigmaPrime[i]-sigma[i]) < epsilonS:
convergedArr[i] = True
### Update ###
mu = muPrime
sigma = sigmaPrime
pi = piPrime
### Visualization ###
visualize(particles, ghost, mu, sigma, pi,"fuzzy"+str(num)+".jpg")
num += 1
### Exit Criteria ###
if convergedArr == [True]*numK:
print "Final Q: "
print Q
makeJets(Q, allParticles)
break
arrLab = ["First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eigth","Ninth"]
for i in range(len(mu)):
print arrLab[i]+" centroid: eta="+str(mu[i][0])+", phi="+str(mu[i][1])+", weight="+str(pi[i])+", sigma="+str(sigma[i])
| 34.956938 | 134 | 0.540378 | import sys
import numpy as np
from numpy import matlib
from scipy.stats import multivariate_normal
from read_data import read_data
import matplotlib.pyplot as plt
import time
import visual
newParticle[0] = particles[i][2]
newParticle[1] = particles[i][0]
newParticle[2] = particles[i][1]
newParticle[0] = particles[i][2]
newJet = np.array(newJet) + np.array(newParticle)
print "Jet "+str(j)+": "+str(newJet[0])+" GeV (I guess?)"
def jetFunction(particleVec,mu,sigma):
myPhi1 = abs(particleVec[1]-mu[1])
myPhi2 = abs(particleVec[1]-(mu[1]+2*np.pi))
myPhi3 = abs(particleVec[1]-(mu[1]-2*np.pi))
wrap = 0
if myPhi2 < myPhi1 and myPhi2 < myPhi3:
wrap = 1
if myPhi3 < myPhi1 and myPhi3 < myPhi2:
wrap = -1
absdeltaPhi = min(myPhi1, myPhi2, myPhi3)
deltaR = np.sqrt((absdeltaPhi)**2 + (particleVec[0]-mu[0])**2)
denom = 2*np.pi*(sigma**2)
numerator = np.exp(-deltaR**2/(2*sigma**2))
return numerator/denom, wrap
def expectation(mu, sigma, pi, particles):
k = len(mu)
d = len(mu[0])
Q = np.empty((len(particles),k))
wrapAround = []
for i in range(len(particles)):
wrapArr = [0]*k
for j in range(k):
denom = 0
for jP in range(k):
phiF1, wrap1 = jetFunction(particles[i],mu[jP],sigma[jP])
denom += pi[jP]*phiF1
phiF2, wrap2 = jetFunction(particles[i], mu[j], sigma[j])
Q[i,j] = pi[j]*phiF2/denom
wrapArr[j] = wrap2
wrapAround.append(wrapArr)
return Q, wrapAround
def maximization(Q, particles, mu, sigma, pi, wrapAround):
eventNumber = 8
k = len(mu)
d = len(mu[0])
allSigma = []
allMu = []
allPi = []
for j in range(k):
if not convergedArr[j]:
newMu = [0.,0.]
newSigma = 0.
newPi = 0.
piDenom = 0.
muDenom = 0.
for i in range(len(particles)):
piDenom += particles[i][2]
muDenom += particles[i][2] * Q[i][j]
newPi += particles[i][2] * Q[i][j]
for c in range(d):
newMu[c] += particles[i][2] * Q[i][j] * (particles[i][c]+wrapAround[i][j]*2*np.pi)
newMu = newMu/muDenom
newPi = newPi/piDenom
for myL in range(len(particles)):
phi1 = abs(particles[myL][1]-newMu[1])
phi2 = abs(particles[myL][1]-(newMu[1]+2*np.pi))
phi3 = abs(particles[myL][1]-(newMu[1]-2*np.pi))
absdeltaPhi = min(phi1, phi2, phi3)
deltaR = np.sqrt((absdeltaPhi)**2 + (particles[myL][0]-newMu[0])**2)
newSigma += Q[myL][j]*particles[myL][2]*deltaR**2
newSigma = newSigma/(2.*muDenom)
else:
newMu = mu[j]
newSigma = sigma[j]**2
newPi = pi[j]
allMu.append(newMu)
allPi.append(newPi)
allSigma.append(np.sqrt(np.abs(newSigma)))
return allMu, allSigma, allPi
if __name__ == '__main__':
debug = False
eventNumber = 8
a()
for i in range(len(myE[eventNumber])):
newEntry = []
newEntry.append(myX[eventNumber][i][0])
newEntry.append(myX[eventNumber][i][1])
newEntry.append(myE[eventNumber][i][0])
particles.append(newEntry)
if debug:
print "particles", particles
= [1.]*numK
mu = [[0.0,3.],[2.,-1.],[2.5,3.]]
numParticles = len(particles)
numGhosts = numParticles * 10
epsilonR = 0.4/100
epsilonS = 1./100
smallPt = 1./10
convergedArr = [False]*numK
p.pi) for i in range(0,numK)] for j in range (0,numGhosts)]
for g in ghost:
g[2] = smallPt
allParticles = particles + ghost
num = 0
visualize(particles, ghost, mu, sigma, pi,"fuzzy"+str(num)+".jpg")
num += 1
while True:
if debug:
print "Pi", pi
print "mu", mu
print "sigma", sigma
print "bool", convergedArr
articles)
if debug:
print "Q: ", Q
if num==1:
print "First Q: "
print Q
imization(Q, allParticles, mu, sigma, pi, qWrap)
n(abs(mu[i][1]-muPrime[i][1]),abs(mu[i][1]-(muPrime[i][1]+2*np.pi)),abs(mu[i][1]-(muPrime[i][1]-2*np.pi)))
deltaR = np.sqrt((absdeltaPhi)**2 + (mu[i][0]-muPrime[i][0])**2)
if deltaR < epsilonR and np.abs(sigmaPrime[i]-sigma[i]) < epsilonS:
convergedArr[i] = True
igma = sigmaPrime
pi = piPrime
a, pi,"fuzzy"+str(num)+".jpg")
num += 1
print "Final Q: "
print Q
makeJets(Q, allParticles)
break
arrLab = ["First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eigth","Ninth"]
for i in range(len(mu)):
print arrLab[i]+" centroid: eta="+str(mu[i][0])+", phi="+str(mu[i][1])+", weight="+str(pi[i])+", sigma="+str(sigma[i])
| false | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.